田源
2023-12-04 5f03300404c8e4f32c17a7216ea8c99818112eba
标准-源标准号非参照回填输入框
已修改3个文件
55 ■■■■ 文件已修改
Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/FormTemplate/index.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
@@ -103,9 +103,14 @@
      type: String,
      default: "",
    },
    selectRow:{
      type:Array,
      default:[]
    }
  },
  data() {
    return {
      selectValue:"",
      //年代号
      dataYearCode: {
        type: "",
@@ -206,6 +211,15 @@
      handler(newV) {
        this.$emit("dataYearCode", newV)
      }
    },
    selectRow:{
      handler(newval){
        console.log(newval);
        let ids = newval.map(item => item.id);
        this.selectValue= ids.join(",");
      },
      deep:true,
      immediate:true
    }
  },
  methods: {
@@ -320,7 +334,9 @@
          value:formItem.defaultValue || (formItem.dicData && formItem.dicData.length > 0 && formItem.secType == "codefixedsec" ? formItem.dicData[0].id : null) ||
            (formItem.secType == "codedatesec" ? formItem.codeDateValue : null) || (TreeValue && formItem.secType == "codelevelsec" ? TreeValue : null) ||
            (formItem.secType == "codeattrsec" ? this.add : null) || (this.status === "apply" && formItem.field === "codeStandardEditType" ? "1" : null) ||
            (this.status === "amend" && formItem.field === "codeStandardEditType" ? "2" : null),
            (this.status === "amend" && formItem.field === "codeStandardEditType" ? "2" : null) ||
            //父组件如果是参照数据会将selectRow置空,selectRow不为空就说明不是参照要回填源标准号数据
            (this.status === "amend" && this.selectRow && (formItem.field === "oldcode" ? this.selectValue : null)),
          placeholder: formItem.inputTip,
          comboxKey: formItem.comboxKey,
          tip: formItem.tooltips,
Source/UBCS-WEB/src/components/FormTemplate/index.vue
@@ -14,6 +14,7 @@
      v-if="dialogVisible" key="masterForm"
      ref="FormTemplate"
      v-bind="$attrs"
      :selectRow="selectRow"
      :TreeValue="TreeValue"
      :eventList="eventList"
      :rowOid="rowOid"
@@ -139,6 +140,10 @@
      type: Object,
      default: () => ({}),
    },
    selectRow:{
      type:Array,
      default:[]
    }
  },
  data() {
    return {
@@ -242,11 +247,7 @@
    },
  },
  watch: {
    codeApplyForm: {
      handler(newval, oldval) {
        // console.log('newval',newval)
      }
    }
  },
  methods: {
    openDialog() {
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -100,7 +100,7 @@
          <!--          修订-->
          <FormTemplateDialog :codeClassifyOid="this.codeClassifyOid" :codeRuleOid="this.codeRuleOid"
                              :disabledProp="disabledProp" :templateOid="templateOid" :title="'数据修订'"
                              :visible.sync="amendvisible" status="amend"
                              :visible.sync="amendvisible" status="amend" :selectRow="selectRow"
                              type="add" @submit="amendSumbit"></FormTemplateDialog>
          <!--          新增-->
          <FormTemplateDialog :TreeValue="TreeValue" :codeClassifyOid="this.codeClassifyOid"
@@ -485,8 +485,7 @@
      this.LinkObject = row;
      this.LinkVisible = true;
      this.LinkList = Object.keys(row).map(property => property)
      // console.log(result);
      // console.log(this.LinkObject)
    },
    //状态搜索
    cellSelectHandler(row) {
@@ -589,20 +588,35 @@
    //标准修订
    codeAMENDHandler() {
      let foundItem = false;
      this.tableHeadFindData.forEach(item => {
        if (item.field === "oldcode" && Object.keys(item.referConfig).length >= 1) {
          foundItem = true;
        }
      });
      if (foundItem) {
        if(this.selectRow.length >= 1){
          this.$confirm('已有参照是否取消勾选继续执行?', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          }).then(() => {
            this.selectRow = [];
            //取消勾选状态
            this.$refs.dataTable.clearSelection();
        this.amendvisible = true;
          }).catch(() => {
            this.$message({
              type: 'info',
              message: '已取消当前操作'
            });
          });
        }else {
          this.amendvisible = true;
        }
      } else {
        if (this.selectRow.length <= 0) {
          this.$message.warning("请至少选择一条数据");
        } else {
          console.log(this.selectRow)
          this.amendvisible = true;
        }