From a5e41ce6f8fbae908c3c4da43aa207191634844e Mon Sep 17 00:00:00 2001 From: luojie <125330818@qq.com> Date: Mon, 13 Apr 2026 16:59:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86][upd?= =?UTF-8?q?ate]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Template/HandleFormItem.vue | 18 +++--- .../Template/StepComponents/ry/tpjydd.vue | 22 ++++++- .../Template/StepComponents/ry/tpjysd.vue | 71 +++++++++++++++++----- src/components/Template/StepFormPackage.vue | 4 +- .../Template/mixins/formPackageMixins.js | 10 ++- src/components/Template/mixins/stepMixins.js | 2 +- src/utils/massTool.js | 42 +++++++++++++ 7 files changed, 139 insertions(+), 30 deletions(-) diff --git a/src/components/Template/HandleFormItem.vue b/src/components/Template/HandleFormItem.vue index 5f25537..6137993 100644 --- a/src/components/Template/HandleFormItem.vue +++ b/src/components/Template/HandleFormItem.vue @@ -1238,7 +1238,7 @@ export default { }, //处理更新记录 - handleUpdateRecord(data, recordData) { + handleUpdateRecord(data, recordData, isUpdateInputValue = true) { const baseInfo = this.getCommonRecordInfo(); //有recordData表示从组件外部调用的更新操作, if (!this.oldValue && !this.inputValue && !recordData) { @@ -1246,8 +1246,10 @@ export default { } let finallyKey = this.fieldKey; if (recordData) { - this.oldValue = recordData.oldValue; - this.inputValue = recordData.inputValue; + if(isUpdateInputValue){ + this.oldValue = recordData.oldValue; + this.inputValue = recordData.inputValue; + } } let recordOldVlaue = this.oldValue, recordValue = this.inputValue, isModify = !!this.oldValue,oldUrl = "",url=""; if (this.type === "checkboxTag") { @@ -1291,10 +1293,12 @@ export default { oldUrl = oldAttList.map(item => item.url).join("|"); url = attList.map(item => item.url).join("|"); } - // if (recordData) { - // recordOldVlaue = recordData.oldValue; - // recordValue = recordData.inputValue; - // } + if (recordData) { + if(!isUpdateInputValue){//单纯更新记录,不更新表单的值 + recordOldVlaue = recordData.oldValue; + recordValue = recordData.inputValue; + } + } const record = { ...baseInfo, oldValue: recordOldVlaue, diff --git a/src/components/Template/StepComponents/ry/tpjydd.vue b/src/components/Template/StepComponents/ry/tpjydd.vue index 7a1bd80..eab566c 100644 --- a/src/components/Template/StepComponents/ry/tpjydd.vue +++ b/src/components/Template/StepComponents/ry/tpjydd.vue @@ -11,7 +11,7 @@ diff --git a/src/components/Template/StepFormPackage.vue b/src/components/Template/StepFormPackage.vue index 9bdd619..bdb487b 100644 --- a/src/components/Template/StepFormPackage.vue +++ b/src/components/Template/StepFormPackage.vue @@ -7,13 +7,13 @@ :item="sItem" v-model="formFields[key]" :field-key="prefixKey+'_' + key" :ref="key" @copy="onCopy(sItem, key)" :error="errors[key]" @update:error="errors[key] = false" - :orange-bg="orangeBgFields[key]" /> + :orange-bg="getOrangeBg(key,sItem)" />