From 04b0e21c4f7a473c8a4e3f41168773d3fedefa19 Mon Sep 17 00:00:00 2001 From: qiezi <15576055375@163.com> Date: Tue, 3 Sep 2024 10:33:26 +0800 Subject: [PATCH] 2024-09-02 --- src/views/modules/code/item/itemValue.vue | 27 +++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/views/modules/code/item/itemValue.vue b/src/views/modules/code/item/itemValue.vue index b565b7e..b5d6e6e 100644 --- a/src/views/modules/code/item/itemValue.vue +++ b/src/views/modules/code/item/itemValue.vue @@ -341,10 +341,14 @@ export default { searchCodeItemDefsSeq(params).then(({data})=>{ if (data && data.code === 0){ this.itemDefs = data.rows; - if (this.itemDefs.length > 0){ + if (this.itemDefs.length > 0 && this.conditionDetailModal.seqNo === undefined){ this.conditionDetailModal.SQLStatementExecuteItem = this.itemDefs[0].itemNo; - this.saveCodeItemValue(this.itemDefs[0]); } + let params = { + itemNo: this.conditionDetailModal.SQLStatementExecuteItem, + site:this.itemValue.site, + } + this.saveCodeItemValue(params); }else { this.$message.warning(data.msg) } @@ -361,7 +365,7 @@ export default { if (data && data.code === 0){ this.saveItemValueList = data.rows; this.$nextTick(()=>{ - if (this.saveItemValueList.length > 0){ + if (this.saveItemValueList.length > 0 && this.conditionDetailModal.seqNo === undefined){ this.conditionDetailModal.SQLStatementExecuteValueItemNo = this.saveItemValueList[0].valueItemNo; } }) @@ -383,6 +387,7 @@ export default { Object.keys(this.conditionDetailModal).forEach(key => { this.conditionDetailModal[key] = undefined; }); + this.conditionDetailModal.seqNo = undefined; this.conditionDetailModal.SQLStatementExecuteFlag = 'N'; }, changeItemDef(val){ @@ -452,6 +457,7 @@ export default { }, handleEditConditionDetail(){ this.conditionDetailModal = {...this.conditionDetails[this.selectionDetailIndex]} + this.conditionDetailModal.SQLStatementExecuteItem = parseInt(this.conditionDetailModal.SQLStatementExecuteItem) this.searchCodeItemDefs(); this.itemDefModalVisible = true }, @@ -688,7 +694,7 @@ export default { - + @@ -697,20 +703,23 @@ export default { - - - + - + + +
- + + {{ `(${o.valueNo})${o.itemValue}` }} + {{o.conditionName}} +