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 476d7318..4508aa87 100644 --- a/apps/web-antd/src/views/property/resident/person/data.ts +++ b/apps/web-antd/src/views/property/resident/person/data.ts @@ -1,12 +1,11 @@ -import type { FormSchemaGetter } from '#/adapter/form' -import type { VxeGridProps } from '#/adapter/vxe-table' -import { getDictOptions } from "#/utils/dict" -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' - +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; +import { getDictOptions } from '#/utils/dict'; +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 = () => [ { @@ -22,7 +21,7 @@ export const querySchema: FormSchemaGetter = () => [ debounceTime: 500, allowClear: true, placeholder: '请选择所属单位', - filterOption: true + filterOption: true, }, }, { @@ -38,7 +37,7 @@ export const querySchema: FormSchemaGetter = () => [ fieldName: 'state', label: '状态', }, -] +]; export const columns: VxeGridProps['columns'] = [ { type: 'checkbox', width: 60 }, @@ -54,27 +53,27 @@ export const columns: VxeGridProps['columns'] = [ { title: '员工编号', field: 'userId', - width: 100 + width: 100, }, { title: '员工名称', field: 'userName', - width: 100 + width: 100, }, { title: '联系电话', field: 'phone', - width: 100 + width: 100, }, { title: '性别', field: 'gender', slots: { default: ({ row }) => { - return renderDict(row.gender, 'sys_user_sex') - } + return renderDict(row.gender, 'sys_user_sex'); + }, }, - width: 100 + width: 100, }, { field: 'img', @@ -85,7 +84,7 @@ export const columns: VxeGridProps['columns'] = [ { title: '所属单位', field: 'unitName', - width: 100 + width: 100, }, // { // title: '入驻位置', @@ -94,27 +93,27 @@ export const columns: VxeGridProps['columns'] = [ { title: '入驻时间', field: 'time', - width: 100 + width: 100, }, { title: '车牌号码', field: 'carNumber', - width: 100 + width: 100, }, { title: '状态', field: 'state', slots: { default: ({ row }) => { - return renderDict(row.state, 'wy_rzryzt') - } + return renderDict(row.state, 'wy_rzryzt'); + }, }, - width: 100 + width: 100, }, { title: '备注', field: 'remark', - width: 100 + width: 100, }, { field: 'action', @@ -123,9 +122,9 @@ export const columns: VxeGridProps['columns'] = [ title: '操作', minWidth: 180, }, -] +]; -let authGroupArr: AuthGroupVO[] = [] +let authGroupArr: AuthGroupVO[] = []; export const modalSchema: FormSchemaGetter = () => [ { label: '主键id', @@ -139,34 +138,34 @@ export const modalSchema: FormSchemaGetter = () => [ { label: '员工名称', fieldName: 'userName', - component: "Input", + component: 'Input', rules: 'required', }, { label: '联系电话', fieldName: 'phone', - component: "Input", + component: 'Input', rules: 'required', }, { label: '性别', fieldName: 'gender', - component: "Select", + component: 'Select', componentProps: { - options: getDictOptions('sys_user_sex') + options: getDictOptions('sys_user_sex'), }, rules: 'required', }, { label: '证件号', fieldName: 'idCard', - component: "Input", + component: 'Input', rules: 'required', }, { label: '邮箱', fieldName: 'email', - component: "Input", + component: 'Input', }, { label: '人员状态', @@ -175,7 +174,7 @@ export const modalSchema: FormSchemaGetter = () => [ componentProps: { options: getDictOptions('wy_rzryzt'), }, - rules: 'selectRequired' + rules: 'selectRequired', }, // { // label: '入住员工', @@ -207,7 +206,7 @@ export const modalSchema: FormSchemaGetter = () => [ format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss', }, - rules: "required" + rules: 'required', }, { label: '车牌号码', @@ -223,15 +222,12 @@ export const modalSchema: FormSchemaGetter = () => [ format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss', }, -<<<<<<< HEAD -======= dependencies: { show: (values) => { - return typeof (values.id) !== 'undefined' + return typeof values.id !== 'undefined'; }, triggerFields: ['id'], - } ->>>>>>> 54ed694271a4aeb1c3d592f9200e037fb524361f + }, }, { label: '通行权限组', @@ -239,7 +235,7 @@ export const modalSchema: FormSchemaGetter = () => [ component: 'ApiSelect', dependencies: { show: (values) => { - return typeof (values.id) !== 'undefined' + return typeof values.id !== 'undefined'; }, triggerFields: ['id'], }, @@ -255,17 +251,13 @@ export const modalSchema: FormSchemaGetter = () => [ groupType: 2, pageNum: 1, pageSize: 500, - } - const res = await authGroupList(params) - authGroupArr = res.rows + }; + const res = await authGroupList(params); + authGroupArr = res.rows; } - return authGroupArr + return authGroupArr; }, -<<<<<<< HEAD }, -======= - } ->>>>>>> 54ed694271a4aeb1c3d592f9200e037fb524361f }, { label: '人脸图片', @@ -283,7 +275,7 @@ export const modalSchema: FormSchemaGetter = () => [ component: 'Textarea', formItemClass: 'col-span-2', }, -] +]; //门禁记录 export const accessControlColumns: VxeGridProps['columns'] = [ @@ -319,8 +311,7 @@ export const accessControlColumns: VxeGridProps['columns'] = [ title: '状态', field: 'locathon', }, - -] +]; //车辆记录 export const carColumns: VxeGridProps['columns'] = [ @@ -364,20 +355,22 @@ export const carColumns: VxeGridProps['columns'] = [ title: '备注', field: 'remark', }, -] -export async function getUnitList(): Promise<{ value: number; label: string }[]> { +]; +export async function getUnitList(): Promise< + { value: number; label: string }[] +> { const queryParam = { pageNum: 1000, pageSize: 1, - } - const res = await resident_unitList(queryParam) - const data: { value: number; label: string }[] = [] + }; + const res = await resident_unitList(queryParam); + const data: { value: number; label: string }[] = []; res.rows.forEach((r: any) => { data.push({ value: r.id, label: r.name, - }) - }) - return data + }); + }); + return data; }