徐景良 2024-07-12 14:45:05 +08:00
commit 9ebd2dd616
5 changed files with 37 additions and 6 deletions

View File

@ -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) => {
@ -199,7 +214,14 @@
}
function changeForm() {
subTableDataStore.setGroupData(getFieldsValue());
let data = getFieldsValue()
let result = {}
Object.keys(data).forEach(key => {
if(key.indexOf('card_group') == -1){
result[key] = data[key]
}
})
subTableDataStore.setGroupData(result);
}
async function verify() {

View File

@ -369,6 +369,7 @@
}
cardGourpFormData.value = obj;
subTableDataStore.setGroupData(obj);
subTableDataStore.setToSetGroupData();
FieldsValue.value = obj;
setFieldsValue({
...obj,

View File

@ -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;
},
},
});

View File

@ -39,7 +39,7 @@
</div>
<div class="screen-item" style="margin-right:51px;">
<!-- <div class="screen-item-label">图斑号</div> -->
<a-input v-model:value="params.geomid" class="item-input" placeholder="请输入图斑编号"/>
<a-input allowClear v-model:value="params.geomid" class="item-input" placeholder="请输入图斑编号"/>
</div>
<div class="screen-item" style="display: flex; justify-content: end;margin-bottom: 0px;">
<a-button type="primary" class="item-button" :icon="h(SearchOutlined)" @click="query"></a-button>

View File

@ -33,12 +33,11 @@
</div>
<div class="screen-item" style="margin-bottom:12px;">
<div class="screen-item-label">批次</div>
<a-select
allowClear
<a-input
class="item-input"
style="width:117px;"
v-model:value="props.infoScreenData.batch"
:options="batchOptions"
@change="(value) => emits('mapListScreenChange',value,'batch')"
@change="(value) => emits('mapListScreenChange',value.target.value,'batch')"
/>
</div>
<div class="screen-item" style="margin-right:15px;margin-bottom:22px;">
@ -73,6 +72,7 @@
</div>
<div class="screen-item" style="margin-right: 14px;">
<a-input
allowClear
placeholder="请输入图斑编号"
class="item-input"
v-model:value="props.infoScreenData.mapNo"