流程卡片组回显
parent
a0af3af494
commit
a7f0b7a2d3
|
|
@ -84,6 +84,21 @@
|
|||
showActionButtonGroup: false,
|
||||
baseColProps: { lg: 24, md: 24 },
|
||||
});
|
||||
watch(() => subTableDataStore.getToSetGroupData, () => {
|
||||
if(subTableDataStore.getToSetGroupData){
|
||||
if (Object.keys(subTableDataStore.getGroupData).includes(tableData.field)) {
|
||||
noTitleKey.value = subTableDataStore.getGroupData[tableData.field];
|
||||
if (tableData.ifShow) {
|
||||
onTabChange({ target: { value: noTitleKey.value } }, tableData.field);
|
||||
}
|
||||
} else {
|
||||
noTitleKey.value = tableData.componentProps.options[0].value;
|
||||
if (tableData.ifShow) {
|
||||
onTabChange({ target: { value: noTitleKey.value } }, tableData.field);
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
watch(
|
||||
() => props.formData,
|
||||
(newVal) => {
|
||||
|
|
|
|||
|
|
@ -369,6 +369,7 @@
|
|||
}
|
||||
cardGourpFormData.value = obj;
|
||||
subTableDataStore.setGroupData(obj);
|
||||
subTableDataStore.setToSetGroupData();
|
||||
FieldsValue.value = obj;
|
||||
setFieldsValue({
|
||||
...obj,
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ export const subTableStore = defineStore({
|
|||
state: () => ({
|
||||
tableDta: [],
|
||||
groupData: {},
|
||||
toSetGroupData: false,
|
||||
}),
|
||||
getters: {
|
||||
getTableData(state) {
|
||||
|
|
@ -13,11 +14,17 @@ export const subTableStore = defineStore({
|
|||
getGroupData(state) {
|
||||
return state.groupData;
|
||||
},
|
||||
getToSetGroupData(state){
|
||||
return state.toSetGroupData;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
setTableData(data) {
|
||||
this.tableDta = data;
|
||||
},
|
||||
setToSetGroupData(){
|
||||
this.toSetGroupData = true
|
||||
},
|
||||
setSingleData(parentFileId, data) {
|
||||
this.tableDta.forEach((item, i) => {
|
||||
if (item.parentFileId == parentFileId) {
|
||||
|
|
@ -38,6 +45,7 @@ export const subTableStore = defineStore({
|
|||
},
|
||||
clearGoupData() {
|
||||
this.groupData = {};
|
||||
this.toSetGroupData = false;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue