From 4f7aec5e212b9e2f2e006985ea76d6b8598b42e4 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期五, 20 十月 2023 15:11:36 +0800 Subject: [PATCH] 最大流水号功能实现 --- Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue | 37 +++++++++++++++++++++++++------------ 1 files changed, 25 insertions(+), 12 deletions(-) diff --git a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue index 9f69e9b..3ff1350 100644 --- a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue +++ b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue @@ -26,13 +26,14 @@ </template> <template :slot="item.prop + ''" v-for="item in slotColumnList"> <vciWebRefer - :key="item.prop" :data-key="item.prop" + :key="item.dataKey" :data-key="item.dataKey" v-if="item.type == 'refer'" :referConfig="item.referConfig || {}" :value="form[item.referConfig.field] || item.value" :text="form[item.referConfig.showField]" :disabled="item.disabled" :display="item.display" + :reloadData="item.referConfig.reloadData || false" @setReferValue="setReferValue" ></vciWebRefer> </template> @@ -61,6 +62,10 @@ type: String, default: "", }, + LoadingStatus:{ + type: String, + default : "code" + }, // 鍒楄〃鏁版嵁oid rowOid: { type: String, @@ -69,7 +74,7 @@ // 琛ㄥ崟绫诲瀷锛坅dd, edit, detail锛� type: { type: String, - default: "add", + default: "", }, // 鑷畾涔夎〃鍗曠被鍨� selfColumnType: { @@ -96,6 +101,7 @@ }, data() { return { + ValidataValue:false, eventFlag:{}, TreeValueForm:'', updateIndex: 0, @@ -127,8 +133,12 @@ mounted() { this.handleResize(); }, + updated() { + }, created() { - + if (this.LoadingStatus === 'code') { + this.loading = false; + } }, computed: { localTrendsSpan() { @@ -158,7 +168,7 @@ }, deep:true, immediate:true - } + }, }, methods: { // 娓叉煋琛ㄥ崟妯℃澘 @@ -218,6 +228,7 @@ formItem.fieldMap[formItem.field+'id']='id' } let columnItem = { + dataKey:formItem.dataKey || formItem.field, label: formItem.text, labelslot: true, prop: this.$utilFunc.isValuableObj(formItem.referConfig) @@ -301,6 +312,7 @@ changeChildItem(items,TreeValue) { let column = this.option.column; let group = this.option.group; + let that=this; items.forEach((item) => { let formItem = this.resetFormConfig(item); if (formItem.field == "lcstatus") { @@ -384,22 +396,22 @@ }; if (group.length === 0) { - this.slotColumnList.forEach((index, colItem) => { + that.slotColumnList.forEach((colItem,index) => { if (colItem.field == columnItem.field) { - this.slotColumnList[index] = columnItem; + that.slotColumnList[index] = columnItem; column[index] = columnItem; return; } }) } else { - this.slotColumnList.forEach((index, colItem) => { + that.slotColumnList.forEach((colItem,index) => { if (colItem.field == columnItem.field) { - this.slotColumnList[index] = columnItem; + that.slotColumnList[index] = columnItem; return; } }) - group.forEach((index, groupItem) => { - groupItem.column.forEach((colIndex, colItem) => { + group.forEach((groupItem,index) => { + groupItem.column.forEach((colItem,colIndex) => { if (colItem.field == columnItem.field) { group[index].column[colIndex] = columnItem; return; @@ -408,8 +420,8 @@ }); } }); - this.$set(this.option, "column", column); - this.$set(this.option, "group", group); + that.$set(that.option, "column", column); + that.$set(that.option, "group", group); }, // 浣跨敤浼犲叆鐨勮〃鍗曟暟鎹厤缃� resetFormConfig(formItem) { @@ -501,6 +513,7 @@ if (valid) { done(); resolve(true); + this.ValidataValue=true; } else { resolve(false); } -- Gitblit v1.9.3