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)" />