From 2b278d5de05d4e7764b9bac058bd43b53dafb09a Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期四, 30 十一月 2023 10:38:45 +0800 Subject: [PATCH] 修订码值显示 --- Source/UBCS-WEB/src/components/FormTemplate/index.vue | 8 ++++++-- Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue | 17 ++++++++++------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue index affa381..bfd0254 100644 --- a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue +++ b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue @@ -378,7 +378,6 @@ } this.geDictData(dictKeys); - this.getFormDetail(); }, //淇敼绾ц仈椤� @@ -600,12 +599,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) { diff --git a/Source/UBCS-WEB/src/components/FormTemplate/index.vue b/Source/UBCS-WEB/src/components/FormTemplate/index.vue index 100ee4a..2567d87 100644 --- a/Source/UBCS-WEB/src/components/FormTemplate/index.vue +++ b/Source/UBCS-WEB/src/components/FormTemplate/index.vue @@ -250,9 +250,11 @@ }, methods: { openDialog() { + //鏂板鍜屼慨鏀瑰叡鍚岃皟鐢� this.getFormTemplate(); - if (this.type === "add" || this.status === "amend") { + if (this.type === "add" || (this.type !== "add" && this.status === "amend")) { this.getCodeRule(); + return; } }, close() { @@ -260,6 +262,7 @@ }, // 鎺ュ彛鑾峰彇琛ㄥ崟鏁版嵁 getFormTemplate() { + //鏂板鍜屼慨鏀瑰叡鍚岃皟鐢� getFormTemplate({ templateOid: this.templateOid, codeClassifyOid: this.codeClassifyOid, @@ -277,6 +280,7 @@ } else { this.showResembleQuery = false; } + //浼犻�掕〃鍗曚笂鏂瑰尯鍩熸暟鎹� 锛堟柊澧炲拰淇敼锛� this.$nextTick(() => { this.$refs.FormTemplate.templateRender( res.data.formDefineVO.items @@ -319,7 +323,7 @@ that.secVOList = (res.data.data.secVOList || []).filter((item) => typeList.includes(item.secType) ); - if ((that.secVOList.length > 0 && that.type === "add") || that.status === "amend") { + if (that.secVOList.length > 0 && that.type === "add" ||(that.type !== "add" && that.status === "amend")) { that.showCodeApply = true; that.activeName = "codeApply"; -- Gitblit v1.9.3