田源
2023-11-28 6b9c331b4499f463717c0ec64a8090d9a96ca7d7
Source/UBCS-WEB/src/components/FormTemplate/index.vue
@@ -12,6 +12,7 @@
  >
    <FormTemplate
      key="masterForm" data-key="masterForm"
      :status="status"
      v-bind="$attrs"
      :type="type"
      :TreeValue="TreeValue"
@@ -41,6 +42,8 @@
            :selfColumnConfig="selfColumnConfig"
            ref="CodeApply"
            @getFormData="getCodeApplyFormData"
            @attrList="attrListForm"
            @isSeriesType="isSeriesTypeString"
            @referConfigDataUpdate="referConfigDataUpdate"
          ></FormTemplate>
        </el-tab-pane>
@@ -91,6 +94,10 @@
  name: "FormTemplateDialog",
  components: { ResembleQuery, FormTemplate },
  props: {
    status:{
      type: String,
      default: "",
    },
    visible: {
      type: Boolean,
      default: false,
@@ -131,6 +138,8 @@
  },
  data() {
    return {
      isSeriesType:{},
      attrList:[],
      eventList:[],
      //码值的第二种只读隐藏情况
      codeValueApplyStatus:'',
@@ -317,9 +326,31 @@
      });
    },
    getFormData(form) {
      // if (this.status === "apply"){
      //   form.codeStandardEditType = "制定";
      //   return;
      // }
      this.form = form;
      // console.log("form",form)
      //属性码段赋值
      if (this.attrList) {
        this.attrList.forEach(item => {
          if (this.form.hasOwnProperty(item.referAttributeId)) {
            this.codeApplyForm[item.oid] = this.form[item.referAttributeId];
          }
        })
      }
    },
    isSeriesTypeString(val){
      this.isSeriesType = val;
    },
    //属性码段赋值
    attrListForm(attrListForm){
      this.attrList=attrListForm;
    },
    getCodeApplyFormData(codeApplyForm) {
      // console.log("codeApplyForm",codeApplyForm)
      this.codeApplyForm = codeApplyForm;
    },
    // 参照组件数据变更
@@ -421,8 +452,6 @@
      resForm.codeClassifyOid = this.codeClassifyOid;
      resForm.codeRuleOid = this.codeRuleOid;
      resForm.templateOid = this.templateOid;
      // console.log('formValue',formValue)
      // console.log('resForm',resForm)
      this.$emit("submit", resForm);
    },
    getDefaultValueAndFormValues(form) {