审核切换区县审核后切回线索填报后校验问题

dianlixunjian
Zhufu 2024-08-08 17:41:54 +08:00
parent b826789786
commit af7a6bfa1e
1 changed files with 19 additions and 6 deletions

View File

@ -3,7 +3,7 @@
<div v-show="tabsColumns.length > 1">
<a-tabs style="width: 100%" @change="tabsChange">
<a-tab-pane v-for="(colItem, index) in tabsColumns" :tab="colItem.label" :key="index">
<BasicForm ref="myDataBaseFormRef" @register="registerForm">
<BasicForm ref="tabsFormRef" @register="registerForm">
<template #CardGroup>
<CardGourp
v-if="cardGroupData.length > 0 && cardGroupData[index]"
@ -24,7 +24,7 @@
</a-tabs>
</div>
<BasicForm
ref="myDataBaseFormRef"
ref="formRef"
@register="registerForm"
v-if="formModalVisible && tabsColumns.length < 1"
>
@ -91,7 +91,8 @@
const { proxy } = getCurrentInstance();
const emit = defineEmits(['getFormSuccess']);
const subTableDataStore = subTableStore();
const tabsFormRef = ref()
const formRef = ref()
let formColumns: FormSchema[] = [];
const props = defineProps({
formConfig: Object,
@ -315,8 +316,7 @@
}, 10);
}
}
async function tabsChange(e) {
clearValidate();
function tabsChange(e) {
tabsKey.value = e;
formColumns.forEach((element) => {
element.show = false;
@ -341,6 +341,7 @@
}
setTimeout(() => {
setFieldsValue(FieldsValue.value);
clearValidate()
}, 10);
}
@ -425,8 +426,19 @@
}
}
console.log(subTableDataStore.getGroupData);
let resultObj = {}
tabsFormRef.value.forEach((item,index) => {
console.log(item.getFieldsValue(),index)
let data = item.getFieldsValue()
Object.keys(data).forEach(key => {
if(!resultObj[key]){
resultObj[key] = data[key]
}
})
})
//form
setFieldsValue({
...resultObj,
...subTableDataStore.getGroupData,
});
@ -491,7 +503,8 @@
if (props.formVerison) {
getFormHistory();
}
clearValidate();
tabsFormRef.value && tabsFormRef.value.clearValidate();
formRef.value && formRef.value.clearValidate();
});
function radioVal() {
console.log('radioVal');