Compare commits

...

2 Commits

Author SHA1 Message Date
fyy
c761c8ba0c Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 2m58s
2025-08-22 19:50:03 +08:00
fyy
553a915027 fix: 修复bug 2025-08-22 19:43:32 +08:00
5 changed files with 30 additions and 21 deletions

View File

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

View File

@ -63,6 +63,9 @@ const [BasicModal, modalApi] = useVbenModal({
if (isUpdate.value && id) { if (isUpdate.value && id) {
const record = await attendanceAreaInfo(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 formApi.setValues(record);
} }
await markInitialized(); await markInitialized();

View File

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

View File

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

View File

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