From 532869a4a365c59f97c551362fca2ca645c5432a Mon Sep 17 00:00:00 2001 From: zcxlsm Date: Sat, 26 Jul 2025 02:39:07 +0800 Subject: [PATCH] =?UTF-8?q?refactor(property):=20=E5=85=A5=E9=A9=BB?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E8=A1=A8=E5=8D=95=E5=8F=98=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/property/resident/person/model.d.ts | 4 +- .../views/property/resident/person/data.ts | 22 +++-- .../property/resident/person/person-modal.vue | 80 +++++++++++-------- 3 files changed, 65 insertions(+), 41 deletions(-) diff --git a/apps/web-antd/src/api/property/resident/person/model.d.ts b/apps/web-antd/src/api/property/resident/person/model.d.ts index 17413393..d748edb1 100644 --- a/apps/web-antd/src/api/property/resident/person/model.d.ts +++ b/apps/web-antd/src/api/property/resident/person/model.d.ts @@ -144,9 +144,9 @@ export interface PersonForm extends BaseEntity { */ authGroupId?: string | number - begDate?: string + authBegDate?: string - endDate?: string + authEndDate?: string } export interface PersonQuery extends PageQuery { diff --git a/apps/web-antd/src/views/property/resident/person/data.ts b/apps/web-antd/src/views/property/resident/person/data.ts index b061b2d5..b344beef 100644 --- a/apps/web-antd/src/views/property/resident/person/data.ts +++ b/apps/web-antd/src/views/property/resident/person/data.ts @@ -5,6 +5,7 @@ import { renderDict } from "#/utils/render" import { resident_unitList } from "#/api/property/resident/unit" import { authGroupList } from '#/api/sis/authGroup' import type { AuthGroupVO, AuthGroupQuery } from '#/api/sis/authGroup/model' +import { toRaw } from 'vue' export const querySchema: FormSchemaGetter = () => [ @@ -151,15 +152,16 @@ export const modalSchema: FormSchemaGetter = () => [ label: '性别', fieldName: 'gender', component: "Select", - componentProps:{ + componentProps: { options: getDictOptions('sys_user_sex') }, rules: 'required', }, { - label: '身份证号', + label: '证件号', fieldName: 'idCard', component: "Input", + rules: 'required', }, { label: '邮箱', @@ -221,12 +223,23 @@ export const modalSchema: FormSchemaGetter = () => [ format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss', }, - rules: 'required', + dependencies: { + show: (values) => { + return typeof (values.id) !== 'undefined' + }, + triggerFields: ['id'], + } }, { label: '通行权限组', fieldName: 'authGroupId', component: 'ApiSelect', + dependencies: { + show: (values) => { + return typeof (values.id) !== 'undefined' + }, + triggerFields: ['id'], + }, componentProps: { resultField: 'list', // 根据API返回结构调整 labelField: 'name', @@ -244,8 +257,7 @@ export const modalSchema: FormSchemaGetter = () => [ } return authGroupArr }, - }, - rules: 'required', + } }, { label: '人脸图片', diff --git a/apps/web-antd/src/views/property/resident/person/person-modal.vue b/apps/web-antd/src/views/property/resident/person/person-modal.vue index 38ebe8ed..06d9678a 100644 --- a/apps/web-antd/src/views/property/resident/person/person-modal.vue +++ b/apps/web-antd/src/views/property/resident/person/person-modal.vue @@ -1,56 +1,60 @@