Browse Source

feat:[模板管理][update]

luojie
luojie 1 week ago
parent
commit
c262ec8893
2 changed files with 10 additions and 7 deletions
  1. +2
    -2
      src/components/Template/CustomTable.vue
  2. +8
    -5
      src/components/Template/HandleFormItem.vue

+ 2
- 2
src/components/Template/CustomTable.vue View File

@ -31,7 +31,7 @@
:value="headerFields[`${colIndex}_${headerIndex}`]" :value="headerFields[`${colIndex}_${headerIndex}`]"
:error="hasHeaderError(colIndex, headerIndex, headerCol.key)" :error="hasHeaderError(colIndex, headerIndex, headerCol.key)"
@update:error="onHeaderColumnErrorUpdate(colIndex, headerIndex, headerCol.key, $event)" @update:error="onHeaderColumnErrorUpdate(colIndex, headerIndex, headerCol.key, $event)"
:orange-bg="regentIsExpired(headerCol.key,rowIndex)"
:orange-bg="regentIsExpired(headerCol.key,colIndex)"
@onRegentSubmit="(data, inputValue) => onHeaderRegentSubmit(data, inputValue, colIndex, headerIndex)" /> @onRegentSubmit="(data, inputValue) => onHeaderRegentSubmit(data, inputValue, colIndex, headerIndex)" />
</template> </template>
<template <template
@ -548,7 +548,7 @@ export default {
}, },
// //
regentIsExpired(key,rowIndex) { regentIsExpired(key,rowIndex) {
const item = this.localDataSource[rowIndex];
const item = this.localDataSource[rowIndex] || {};
const { yxq, sxrq } = item[`selectInfo_${key}`] || {}; const { yxq, sxrq } = item[`selectInfo_${key}`] || {};
const rq = sxrq || yxq; const rq = sxrq || yxq;
if (rq) { if (rq) {

+ 8
- 5
src/components/Template/HandleFormItem.vue View File

@ -1245,7 +1245,10 @@ export default {
return return
} }
let finallyKey = this.fieldKey; let finallyKey = this.fieldKey;
if (recordData) {
this.oldValue = recordData.oldValue;
this.inputValue = recordData.inputValue;
}
let recordOldVlaue = this.oldValue, recordValue = this.inputValue, isModify = !!this.oldValue,oldUrl = "",url=""; let recordOldVlaue = this.oldValue, recordValue = this.inputValue, isModify = !!this.oldValue,oldUrl = "",url="";
if (this.type === "checkboxTag") { if (this.type === "checkboxTag") {
// checkboxTagtagIndex // checkboxTagtagIndex
@ -1288,10 +1291,10 @@ export default {
oldUrl = oldAttList.map(item => item.url).join("|"); oldUrl = oldAttList.map(item => item.url).join("|");
url = attList.map(item => item.url).join("|"); url = attList.map(item => item.url).join("|");
} }
if (recordData) {
recordOldVlaue = recordData.oldValue;
recordValue = recordData.inputValue;
}
// if (recordData) {
// recordOldVlaue = recordData.oldValue;
// recordValue = recordData.inputValue;
// }
const record = { const record = {
...baseInfo, ...baseInfo,
oldValue: recordOldVlaue, oldValue: recordOldVlaue,

Loading…
Cancel
Save