ludc
2023-07-11 9d8be8e7580ef577def96c852288a5a95eab4ea3
Source/UBCS-WEB/src/mixins/codeApply.js
@@ -41,10 +41,15 @@
      codeApplyForm: {},
    }
  },
  created() {
    if (this.type === 'batchImportApply') {
      this.getCodeRule()
    }
  },
  methods: {
    // 获取码值申请数据
    getCodeRule() {
      getCodeRule({ codeClassifyOid: this.localCodeClassifyOid }).then((res) => {
      getCodeRule({ codeClassifyOid: this.localCodeClassifyOid || this.codeClassifyOid }).then((res) => {
        if (res.data && res.data.code === 200) {
          const typeList = [
            "codefixedsec",
@@ -59,8 +64,13 @@
          if (this.localSecVOList.length > 0) {
            this.showCodeApply = true
            this.$nextTick(() => {
              if (this.batchApplyCodeTableData) {
                this.batchApplyCodeTableData[this.codeRuleOid]["localSecVOList"] = this.localSecVOList
              }
              this.$refs.CodeApply.templateRender(this.localSecVOList);
            });
          } else {
            this.showCodeApply = false
          }
        }
@@ -68,7 +78,9 @@
    },
    getCodeApplyFormData(codeApplyForm) {
      this.codeApplyForm = codeApplyForm;
      this.batchApplyCodeTableData[this.codeRuleOid]["codeApply"] = codeApplyForm
      if (this.batchApplyCodeTableData) {
        this.batchApplyCodeTableData[this.codeRuleOid]["codeApply"] = codeApplyForm
      }
    },
    getType(item) {
      console.log(item.secType, 'item.secType');
@@ -165,14 +177,14 @@
    // 参照组件数据变更
    referConfigDataUpdate(data) {
      const { field } = data;
      this.secVOList = this.secVOList.map((item) => {
      this.localSecVOList = this.localSecVOList.map((item) => {
        if (item.parentClassifySecOid === field) {
          this.$refs.CodeApply.form[item.oid] = undefined;
          this.$refs.CodeApply.form[item.name] = undefined;
        }
        return item;
      });
      this.$refs.CodeApply.templateRender(this.secVOList);
      this.$refs.CodeApply.templateRender(this.localSecVOList);
    },
  }
}