feat:入驻单位入驻位置多选
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
2025-08-25 17:00:32 +08:00
parent b44fa6ee7f
commit 67b80d7687
6 changed files with 27 additions and 21 deletions

View File

@@ -64,7 +64,11 @@ const [BasicModal, modalApi] = useVbenModal({
await initLocationOptions();
if (isUpdate.value && id) {
const record = await resident_unitInfo(id);
await formApi.setValues({...record,authTime:[record.authBegDate,record.authEndDate]});
let roomIds=record.location.split(',')
await formApi.setValues({...record,
authTime:[record.authBegDate,record.authEndDate],
locations:roomIds
});
}
await markInitialized();
@@ -84,7 +88,7 @@ async function handleConfirm() {
data.authBegDate = data.authTime[0];
data.authEndDate = data.authTime[1];
data.location=data.locations.join(',')
await (isUpdate.value ? resident_unitUpdate(data) : resident_unitAdd(data));
resetInitialized();
emit('reload');
@@ -125,8 +129,9 @@ async function initLocationOptions() {
treeNodeFilterProp: 'label',
// 选中后显示在输入框的值
treeNodeLabelProp: 'fullName',
multiple:true
}),
fieldName: 'location',
fieldName: 'locations',
},
]);
}