田源
2023-12-01 c71cca6babec17f4bdfa54f80aeaf4135e7440ef
Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
@@ -107,7 +107,10 @@
  data() {
    return {
      //年代号
      dataYearValue:null,
      dataYearCode: {
        type: "",
        value: ""
      },
      filteredObject: {},
      filteredArray: [],
      isSeriesType: {},
@@ -197,11 +200,11 @@
        this.$emit("isShow", newV)
      }
    },
    dataYearValue:{
      handler(newV){
        if(newV){
          this.$emit("dataYearValue",newV)
        }
    dataYearCode: {
      deep:true,
      immediate:true,
      handler(newV) {
        this.$emit("dataYearCode", newV)
      }
    }
  },
@@ -287,11 +290,13 @@
                this.isShow = false;
              }
            }
            if(val.column.field === "releaseDate"){
              if(val.value){
                this.dataYearValue = val.column.valueFormat;
              }else {
                this.dataYearValue = null;
            if (val.column.field === "releaseDate") {
              if (val.value) {
                this.dataYearCode.type = val.column.valueFormat;
                this.dataYearCode.value = val.value;
              } else {
                this.dataYearCode.type = "";
                this.dataYearCode.value = "";
              }
            }
          },
@@ -312,9 +317,10 @@
          valueFormat: formItem.dateFormate || "yyyy-MM-dd HH:mm:ss",
          format: formItem.dateFormate,
          keyAttr: formItem.keyAttr,
          value: (formItem.dicData && formItem.dicData.length > 0 && formItem.secType == "codefixedsec" ? formItem.dicData[0].id : null) ||
          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),
            (formItem.secType == "codeattrsec" ? this.add : null) || (this.status === "apply" && formItem.field === "codeStandardEditType" ? "1" : null) ||
            (this.status === "amend" && formItem.field === "codeStandardEditType" ? "2" : null),
          placeholder: formItem.inputTip,
          comboxKey: formItem.comboxKey,
          tip: formItem.tooltips,
@@ -421,7 +427,9 @@
          format: formItem.dateFormate,
          keyAttr: formItem.keyAttr,
          value: (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 == "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),
          placeholder: formItem.inputTip,
          comboxKey: formItem.comboxKey,
          tip: formItem.tooltips,
@@ -593,12 +601,16 @@
    // 获取表单详情数据
    getFormDetail() {
      if (this.type === "add") return;
      getFormDetail({templateOid: this.templateOid, oid: this.rowOid}).then(
        (res) => {
          this.form = Object.assign(this.form, res.data.data[0]);
          this.loading = false;
        }
      );
      if(this.templateOid){
        getFormDetail({templateOid: this.templateOid, oid: this.rowOid}).then(
          (res) => {
            this.form = Object.assign(this.form, res.data.data[0]);
            this.loading = false;
          }
        );
        return;
      }
    },
    setReferValue(data) {
      if (data.field) {