ludc
2023-11-17 ac8e8998235f247365280d1a1632115c43b10037
Source/UBCS-WEB/src/components/FormTemplate/index.vue
@@ -41,6 +41,7 @@
            :selfColumnConfig="selfColumnConfig"
            ref="CodeApply"
            @getFormData="getCodeApplyFormData"
            @attrList="attrListForm"
            @referConfigDataUpdate="referConfigDataUpdate"
          ></FormTemplate>
        </el-tab-pane>
@@ -131,6 +132,7 @@
  },
  data() {
    return {
      attrList:[],
      eventList:[],
      //码值的第二种只读隐藏情况
      codeValueApplyStatus:'',
@@ -226,6 +228,13 @@
      },
    },
  },
  watch:{
    codeApplyForm:{
      handler(newval,oldval){
        // console.log('newval',newval)
      }
    }
  },
  methods: {
    openDialog() {
      this.getFormTemplate();
@@ -311,6 +320,18 @@
    },
    getFormData(form) {
      this.form = form;
      //属性码段赋值
      if (this.attrList) {
        this.attrList.forEach(item => {
          if (this.form.hasOwnProperty(item.referAttributeId)) {
            this.codeApplyForm[item.oid] = this.form[item.referAttributeId];
          }
        })
      }
    },
    //属性码段赋值
    attrListForm(attrListForm){
      this.attrList=attrListForm;
    },
    getCodeApplyFormData(codeApplyForm) {
      this.codeApplyForm = codeApplyForm;
@@ -325,6 +346,7 @@
          this.$refs.CodeApply.form[item.name] = undefined;
          item.readOnly=false;
          item.referConfig.extraParams.parentClassifyValueOid=data.value;
          item.referConfig.reloadData = true;
          childItems.push(item)
        }
        return item;
@@ -355,7 +377,7 @@
      //   }
      // }
      let resembleQueryList = [];
      if (this.$refs.resembleQueryRef) {
      if (this.showResembleQuery && this.$refs.resembleQueryRef) {
        // 进行相似项查询
        resembleQueryList = await this.$refs.resembleQueryRef.resembleQuery(
          this.form