fix: 修复bug

This commit is contained in:
fyy 2025-08-22 19:43:32 +08:00
parent 29adc052c7
commit 553a915027
5 changed files with 30 additions and 21 deletions

View File

@ -20,7 +20,7 @@ export interface AttendanceAreaVO {
*
*/
reamark: string;
areaDevice?: any[];
}
export interface AttendanceAreaForm extends BaseEntity {
@ -43,7 +43,6 @@ export interface AttendanceAreaForm extends BaseEntity {
*
*/
reamark?: string;
}
export interface AttendanceAreaQuery extends PageQuery {
@ -63,7 +62,7 @@ export interface AttendanceAreaQuery extends PageQuery {
reamark?: string;
/**
*
*/
*
*/
params?: any;
}

View File

@ -63,6 +63,9 @@ const [BasicModal, modalApi] = useVbenModal({
if (isUpdate.value && id) {
const record = await attendanceAreaInfo(id);
record.deviceManageId = record.areaDevice
.map((device: any) => device.remoteSisDeviceManage?.id || '')
.filter((id: string) => id);
await formApi.setValues(record);
}
await markInitialized();

View File

@ -201,7 +201,7 @@ const modalSchema = [
fieldName: 'signType',
component: 'Select',
componentProps: {
options:getDictOptions('wy_bjqdfs')
options: getDictOptions('wy_bjqdfs'),
},
dependencies: {
show: () => (isReadonly.value ? true : false),
@ -213,10 +213,11 @@ const modalSchema = [
fieldName: 'signImgUrl',
component: 'ImageUpload',
componentProps: {
helpMessage:false
helpMessage: false,
},
dependencies: {
show: (formValue) => (isReadonly.value&&formValue.signImgUrl ? true : false),
show: (formValue) =>
isReadonly.value && formValue.signImgUrl ? true : false,
triggerFields: [''],
},
},
@ -289,7 +290,6 @@ const [BasicModal, modalApi] = useVbenModal({
if (!isOpen) {
return null;
}
console.log(isReadonly.value);
//
setupCommunitySelect();
@ -314,6 +314,7 @@ const [BasicModal, modalApi] = useVbenModal({
}
if ((isUpdate.value || isReadonly.value) && id) {
const record: any = await clean_orderInfo(id);
if (record.starTime) record.starTime = dayjs(record.starTime);
if (record.endTime) record.endTime = dayjs(record.endTime);
editUnitId.value = record.unitId || '';
@ -496,7 +497,6 @@ async function handleConfirm() {
return;
}
const data = cloneDeep(await formApi.getValues());
console.log(data);
//
if (unitListData.length === 0) {
@ -537,7 +537,6 @@ async function handleClosed() {
//
async function setupCommunitySelect() {
const areaList = await communityTree(4);
console.log(areaList);
// /
// addFullName(areaList, 'areaName', ' / ');

View File

@ -6,7 +6,7 @@ import type { VxeGridProps } from '#/adapter/vxe-table';
import { getDictOptions } from '#/utils/dict';
import { renderDict } from '#/utils/render';
import { costItemSettingList } from '#/api/property/costManagement/costItemSetting';
import { userList } from '#/api/system/user';
import { personList } from '#/api/property/resident/person';
/**
* schema
@ -23,12 +23,12 @@ export const querySchema: FormSchemaGetter = () => [
component: 'ApiSelect',
componentProps: {
api: async () => {
const rows = await userList({ pageSize: 1000000000, pageNum: 1 });
const rows = await personList({ pageSize: 1000000000, pageNum: 1 });
return rows;
},
resultField: 'rows',
labelField: 'userName',
valueField: 'userId',
valueField: 'id',
},
},
{
@ -141,7 +141,11 @@ export const modalSchema: FormSchemaGetter = () => [
component: 'ApiSelect',
componentProps: {
api: async () => {
const rows = await costItemSettingList({ pageSize: 1000000000, pageNum: 1, costType: '2' });
const rows = await costItemSettingList({
pageSize: 1000000000,
pageNum: 1,
costType: '2',
});
return rows;
},
resultField: 'rows',
@ -208,12 +212,12 @@ export const addModalSchema: FormSchemaGetter = () => [
rules: 'required',
componentProps: {
api: async () => {
const rows = await userList({ pageSize: 1000000000, pageNum: 1 });
const rows = await personList({ pageSize: 1000000000, pageNum: 1 });
return rows;
},
resultField: 'rows',
labelField: 'userName',
valueField: 'userId',
valueField: 'id',
},
},
{
@ -242,7 +246,11 @@ export const addModalSchema: FormSchemaGetter = () => [
component: 'ApiSelect',
componentProps: {
api: async () => {
const rows = await costItemSettingList({ pageSize: 1000000000, pageNum: 1, costType: '2' });
const rows = await costItemSettingList({
pageSize: 1000000000,
pageNum: 1,
costType: '2',
});
return rows;
},
resultField: 'rows',

View File

@ -48,11 +48,11 @@ const schema = [
componentProps: {
api: async () => {
const res = await personList({ pageSize: 1000000000, pageNum: 1 });
return res.rows.map((item: any) => ({
label: item.userName,
value: item.id,
}));
return res;
},
resultField: 'rows',
labelField: 'userName',
valueField: 'id',
},
},
{