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

@@ -35,6 +35,7 @@ export interface Resident_unitVO {
* 入驻位置 * 入驻位置
*/ */
location: string; location: string;
locations: string[];
/** /**
* 入驻时间 * 入驻时间

View File

@@ -157,7 +157,7 @@ export const modalSchema: FormSchemaGetter = () => [
}, },
{ {
label: '入驻位置', label: '入驻位置',
fieldName: 'location', fieldName: 'locations',
component: 'TreeSelect', component: 'TreeSelect',
rules: 'selectRequired', rules: 'selectRequired',
formItemClass: 'col-span-2' formItemClass: 'col-span-2'

View File

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

View File

@@ -43,16 +43,16 @@ export const columns: VxeGridProps['columns'] = [
field: 'unitName', field: 'unitName',
minWidth:'120' minWidth:'120'
}, },
{ // {
title: '预定人', // title: '预定人',
field: 'personName', // field: 'personName',
minWidth:'120' // minWidth:'120'
}, // },
{ // {
title: '联系方式', // title: '联系方式',
field: 'phone', // field: 'phone',
minWidth:'120' // minWidth:'120'
}, // },
// { // {
// title: '预定时间', // title: '预定时间',
// field: 'scheduledStarttime', // field: 'scheduledStarttime',
@@ -64,7 +64,7 @@ export const columns: VxeGridProps['columns'] = [
{ {
title: '预定时间', title: '预定时间',
field: 'scheduledStarttime', field: 'scheduledStarttime',
minWidth: '180', minWidth: '200',
formatter: ({ row }) => { formatter: ({ row }) => {
const start = row.scheduledStarttime; const start = row.scheduledStarttime;
const end = row.scheduledEndtime; const end = row.scheduledEndtime;

View File

@@ -10,8 +10,8 @@
<Select <Select
v-model:value="formState.meetingRoomType" v-model:value="formState.meetingRoomType"
class="room-select" class="room-select"
placeholder="请选择会议室类型" placeholder="请选择类型"
style="width: 180px;" style="width: 150px;"
> >
<SelectOption <SelectOption
v-for="item in getDictOptions('meeting_room_type')" v-for="item in getDictOptions('meeting_room_type')"
@@ -23,14 +23,14 @@
</Select> </Select>
</a-form-item> </a-form-item>
<a-form-item label="会议日期"> <a-form-item label="会议日期">
<DatePicker v-model:value="formState.appointmentTime" style="width: 180px;"/> <DatePicker v-model:value="formState.appointmentTime" style="width: 130px;"/>
</a-form-item> </a-form-item>
<a-form-item label="会议时段"> <a-form-item label="会议时段">
<TimeRangePicker style="width: 200px;" format="HH:mm" <TimeRangePicker style="width: 190px;" format="HH:mm"
v-model:value="formState.openHours"></TimeRangePicker> v-model:value="formState.openHours"></TimeRangePicker>
</a-form-item> </a-form-item>
<a-form-item label="参会人数"> <a-form-item label="参会人数">
<InputNumber style="width: 150px;" placeholder="请输入参会人数" <InputNumber style="width: 120px;" placeholder="请输入人数"
v-model:value="formState.personNumber"/> v-model:value="formState.personNumber"/>
</a-form-item> </a-form-item>
<a-form-item > <a-form-item >

View File

@@ -42,7 +42,7 @@ export const columns: VxeGridProps['columns'] = [
field: 'meetingRoomType', field: 'meetingRoomType',
slots: { slots: {
default: ({row}) => { default: ({row}) => {
return renderDict(row.meetingRoomType, 'meeting_room_type'); return row.meetingRoomType!=null?renderDict(row.meetingRoomType, 'meeting_room_type'):'';
}, },
}, },
minWidth:100, minWidth:100,