This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import type {conferenceSettingsDetail} from '#/api/property/roomBooking/conferenceSettings/model';
|
||||
import type {
|
||||
ConferenceSettingsDetail,
|
||||
} from '#/api/property/roomBooking/conferenceSettings/model';
|
||||
import {shallowRef} from 'vue';
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {Descriptions, DescriptionsItem} from 'ant-design-vue';
|
||||
@@ -19,7 +21,7 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
},
|
||||
});
|
||||
|
||||
const conferenceSettingsDetail = shallowRef<null | conferenceSettingsDetail>(null);
|
||||
const conferenceSettingsDetail = shallowRef<null | ConferenceSettingsDetail>(null);
|
||||
|
||||
async function handleOpenChange(open: boolean) {
|
||||
if (!open) {
|
||||
@@ -73,7 +75,7 @@ async function handleOpenChange(open: boolean) {
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="开放时段" :span="2">
|
||||
{{ conferenceSettingsDetail.openHours }}
|
||||
{{ conferenceSettingsDetail.openStartHours+'-'+ conferenceSettingsDetail.openEndHours}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="会议室描述" :span="2">
|
||||
{{ conferenceSettingsDetail.descs }}
|
||||
|
@@ -16,9 +16,10 @@ import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||
import { modalSchema } from './data';
|
||||
import { TimeRangePicker } from 'ant-design-vue';
|
||||
import { renderDictValue } from '#/utils/render';
|
||||
import { personList } from '#/api/property/resident/person';
|
||||
import { communityTree } from '#/api/property/community';
|
||||
import dayjs from 'dayjs';
|
||||
import {userList} from "#/api/system/user";
|
||||
import {getDictOptions} from "#/utils/dict";
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
|
||||
const isUpdate = ref(false);
|
||||
@@ -67,15 +68,15 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
});
|
||||
const { id } = modalApi.getData() as { id?: number | string };
|
||||
isUpdate.value = !!id;
|
||||
getDictOptions('sys_user_sex')
|
||||
await queryPerson();
|
||||
await initLocationOptions();
|
||||
if (isUpdate.value && id) {
|
||||
const record = await meetInfo(id);
|
||||
record.expenseType = record.expenseType.toString();
|
||||
record.isCheck = record.isCheck.toString();
|
||||
let hour = record.openHours.split('-');
|
||||
if (hour.length > 1) {
|
||||
record.openHours = [dayjs(hour[0], 'HH:mm'), dayjs(hour[1], 'HH:mm')];
|
||||
if (record.openStartHours&&record.openEndHours) {
|
||||
record.openHours = [dayjs(record.openStartHours, 'HH:mm'), dayjs(record.openEndHours, 'HH:mm')];
|
||||
}
|
||||
await formApi.setValues(record);
|
||||
}
|
||||
@@ -95,10 +96,8 @@ async function handleConfirm() {
|
||||
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
||||
const data = cloneDeep(await formApi.getValues());
|
||||
if (data.openHours) {
|
||||
data.openHours =
|
||||
data.openHours[0]?.format('HH:mm') +
|
||||
'-' +
|
||||
data.openHours[1]?.format('HH:mm');
|
||||
data.openStartHours=data.openHours[0]?.format('HH:mm');
|
||||
data.openEndHours=data.openHours[1]?.format('HH:mm');
|
||||
}
|
||||
await (isUpdate.value ? meetUpdate(data) : meetAdd(data));
|
||||
resetInitialized();
|
||||
@@ -117,19 +116,18 @@ async function handleClosed() {
|
||||
}
|
||||
|
||||
async function queryPerson() {
|
||||
let params = {
|
||||
pageSize: 1000,
|
||||
const res = await userList({
|
||||
pageNum: 1,
|
||||
};
|
||||
const res = await personList(params);
|
||||
pageSize: 1000,
|
||||
});
|
||||
const options = res.rows.map((user) => ({
|
||||
label:
|
||||
user.userName +
|
||||
user.nickName +
|
||||
'-' +
|
||||
renderDictValue(user.gender, 'sys_user_sex') +
|
||||
renderDictValue(user.sex, 'sys_user_sex') +
|
||||
'-' +
|
||||
user.phone,
|
||||
value: user.id,
|
||||
user.phonenumber,
|
||||
value: user.userId,
|
||||
}));
|
||||
formApi.updateSchema([
|
||||
{
|
||||
@@ -143,6 +141,7 @@ async function queryPerson() {
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
const filterOption = (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
};
|
||||
|
@@ -76,6 +76,11 @@ export const columns: VxeGridProps['columns'] = [
|
||||
title: '开放时段',
|
||||
field: 'openHours',
|
||||
width:100,
|
||||
slots: {
|
||||
default: ({row}) => {
|
||||
return row.openStartHours+'-'+row.openEndHours;
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
|
Reference in New Issue
Block a user