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 57f03f6b..0e3d6e57 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 @@ -24,7 +24,7 @@ export interface PersonVO { /** * 性别 */ - gender: number + gender: string | number /** * 人脸图片 @@ -75,6 +75,10 @@ export interface PersonVO { authEndDate?: string + authTime: any[] + + rosterType?: string | number + } export interface PersonForm extends BaseEntity { @@ -293,7 +297,7 @@ export interface Person extends BaseEntity { * @param file excel文件 */ export interface PerssonImportParam { - updateSupport: boolean; - unitId: number; - file: Blob | File; + updateSupport: boolean + unitId: number + file: Blob | File } 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 171b1b1a..aee41767 100644 --- a/apps/web-antd/src/views/property/resident/person/data.ts +++ b/apps/web-antd/src/views/property/resident/person/data.ts @@ -41,19 +41,10 @@ export const querySchema: FormSchemaGetter = () => [ export const columns: VxeGridProps['columns'] = [ { type: 'checkbox', width: 60 }, // { - // title: '序号', + // title: '员工编号', // field: 'id', - // slots: { - // default: ({ rowIndex }) => { - // return (rowIndex + 1).toString(); - // }, - // }, + // width: 100, // }, - { - title: '员工编号', - field: 'id', - width: 100, - }, { title: '员工名称', field: 'userName', @@ -62,7 +53,7 @@ export const columns: VxeGridProps['columns'] = [ { title: '联系电话', field: 'phone', - width: 100, + width: 120, }, { title: '性别', @@ -72,18 +63,18 @@ export const columns: VxeGridProps['columns'] = [ return renderDict(row.gender, 'sys_user_sex') }, }, - width: 100, + width: 80, }, { field: 'img', title: '人脸图片', slots: { default: 'img' }, - minWidth: 80, + width: 100, }, { title: '所属单位', field: 'unitName', - width: 100, + width: 160, }, // { // title: '入驻位置', @@ -93,10 +84,18 @@ export const columns: VxeGridProps['columns'] = [ title: '入驻时间', field: 'time', width: 100, + formatter: ({ cellValue }) => { + return cellValue ? new Date(cellValue).toLocaleDateString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '-') : '' + } }, { - title: '车牌号码', - field: 'carNumber', + title: '人员标签', + field: 'rosterType', + slots: { + default: ({ row }) => { + return renderDict(row.rosterType, 'roster_type') + }, + }, width: 100, }, { @@ -112,14 +111,13 @@ export const columns: VxeGridProps['columns'] = [ { title: '备注', field: 'remark', - width: 100, }, { field: 'action', fixed: 'right', slots: { default: 'action' }, title: '操作', - minWidth: 180, + width: 200, }, ] @@ -236,7 +234,24 @@ export const modalSchema: FormSchemaGetter = () => [ }, triggerFields: ['id'], }, - + }, + { + label: '人员标签', + fieldName: 'rosterType', + component: 'Select', + formItemClass: 'col-span-1', + componentProps: { + options: getDictOptions('roster_type') + }, + dependencies: { + show: (values) => { + return typeof values.id !== 'undefined' + }, + disabled: (values) => { + return !values.authSwitch + }, + triggerFields: ['id', 'authSwitch'], + }, }, { label: '授权期限', @@ -253,7 +268,7 @@ export const modalSchema: FormSchemaGetter = () => [ show: (values) => { return typeof values.id !== 'undefined' }, - disabled:(values) => { + disabled: (values) => { return !values.authSwitch }, triggerFields: ['id', 'authSwitch'], @@ -263,12 +278,12 @@ export const modalSchema: FormSchemaGetter = () => [ label: '通行权限组', fieldName: 'authGroupId', component: 'ApiSelect', - formItemClass: 'col-span-2', + formItemClass: 'col-span-1', dependencies: { show: (values) => { return typeof values.id !== 'undefined' }, - disabled:(values) => { + disabled: (values) => { return !values.authSwitch }, triggerFields: ['id', 'authSwitch'], @@ -393,8 +408,8 @@ export async function getUnitList(): Promise< { value: number; label: string }[] > { const queryParam = { - pageNum: 1000, - pageSize: 1, + pageNum: 1, + pageSize: 1000, } const res = await resident_unitList(queryParam) const data: { value: number; label: string }[] = [] diff --git a/apps/web-antd/src/views/property/resident/person/index.vue b/apps/web-antd/src/views/property/resident/person/index.vue index 2166815f..6413e2a1 100644 --- a/apps/web-antd/src/views/property/resident/person/index.vue +++ b/apps/web-antd/src/views/property/resident/person/index.vue @@ -165,11 +165,6 @@ function handleInfo(row: Required) { -