From a0f5599d9249022dfd22f516aa1ddc18a41367aa Mon Sep 17 00:00:00 2001 From: fyy <2717885210@qq.com> Date: Tue, 24 Jun 2025 16:43:49 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E8=AE=BE=E7=BD=AE=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E4=BF=9D=E6=B4=81=E8=AE=A2=E5=8D=95=E5=8F=AF=E9=80=89?= =?UTF-8?q?=E5=A4=9A=E4=B8=AA=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../clean/cleanOrders/clean-detail-modal.vue | 230 ++++++++++++++++++ .../clean/cleanOrders/clean-modal.vue | 182 +++++++++++++- .../views/property/clean/cleanOrders/data.ts | 44 ++-- 3 files changed, 427 insertions(+), 29 deletions(-) create mode 100644 apps/web-antd/src/views/property/clean/cleanOrders/clean-detail-modal.vue diff --git a/apps/web-antd/src/views/property/clean/cleanOrders/clean-detail-modal.vue b/apps/web-antd/src/views/property/clean/cleanOrders/clean-detail-modal.vue new file mode 100644 index 00000000..daffa3a2 --- /dev/null +++ b/apps/web-antd/src/views/property/clean/cleanOrders/clean-detail-modal.vue @@ -0,0 +1,230 @@ + + + + \ No newline at end of file diff --git a/apps/web-antd/src/views/property/clean/cleanOrders/clean-modal.vue b/apps/web-antd/src/views/property/clean/cleanOrders/clean-modal.vue index bdb449e4..cd029e35 100644 --- a/apps/web-antd/src/views/property/clean/cleanOrders/clean-modal.vue +++ b/apps/web-antd/src/views/property/clean/cleanOrders/clean-modal.vue @@ -12,11 +12,19 @@ import type { CleanVO } from '#/api/property/clean/model'; import { clean_orderAdd, clean_orderInfo, clean_orderUpdate } from '#/api/property/clean_order'; import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup'; import { resident_unitList } from '#/api/property/resident/unit'; - +import { useVbenVxeGrid } from '#/adapter/vxe-table'; +import type { VxeGridProps } from '#/adapter/vxe-table'; +import cleanDetailModal from './clean-detail-modal.vue'; +import { Table, Button } from 'ant-design-vue'; import { modalSchema } from './data'; -const emit = defineEmits<{ reload: [] }>(); +const totalSumPeices = computed(() => { + return detailTable.value + .reduce((total: number, item: any) => total + (Number(item.sumPeices) || 0), 0) + .toFixed(2); +}); +const emit = defineEmits<{ reload: [] }>(); const isUpdate = ref(false); const title = computed(() => { return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add'); @@ -99,8 +107,9 @@ const [BasicModal, modalApi] = useVbenModal({ const { id } = modalApi.getData() as { id?: number | string }; isUpdate.value = !!id; + if (isUpdate.value && id) { - const record = await clean_orderInfo(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 || ''; @@ -112,6 +121,121 @@ const [BasicModal, modalApi] = useVbenModal({ }, }); +// 添加订单详情表格配置 +const detailGridOptions: VxeGridProps = { + height: '300px', + columns: [ + { type: 'checkbox', width: 60 }, + { + title: '序号', + field: 'index', + slots: { + default: ({ rowIndex }) => { + return (rowIndex + 1).toString(); + }, + }, + }, + { + title: '劳务名称', + field: 'name', + }, + { + title: '计量单位', + field: 'measure', + }, + { + title: '计算方式', + field: 'method', + }, + { + title: '申报单价含税(元)', + field: 'peices', + }, + { + title: '保洁频率', + field: 'frequency', + }, + { + title: '保洁标准', + field: 'standard', + }, + { + title: '备注', + field: 'remark', + }, + { + title: '状态', + field: 'stater', + slots: { + default: ({ row }) => row.stater === 1 ? '启用' : '禁用', + }, + }, + { + title: '保洁面积', + field: 'area', + }, + { + title: '合计费用', + field: 'sumPeices', + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 120, + }, + ], + data: [], +}; +const detailColumns = [ + { title: '序号', key: 'index'}, + { title: '劳务名称', dataIndex: 'name', key: 'name' }, + { title: '计量单位', dataIndex: 'measure', key: 'measure' }, + { title: '计算方式', dataIndex: 'method', key: 'method' }, + { title: '申报单价含税(元)', dataIndex: 'peices', key: 'peices' }, + { title: '保洁频率', dataIndex: 'frequency', key: 'frequency' }, + { title: '保洁标准', dataIndex: 'standard', key: 'standard' }, + { title: '备注', dataIndex: 'remark', key: 'remark' }, + { + title: '状态', + dataIndex: 'stater', + key: 'stater', + customRender: ({ value }: { value: number }) => (value === 1 ? '启用' : '禁用') + }, + { title: '保洁面积', dataIndex: 'area', key: 'area' }, + { title: '合计费用', dataIndex: 'sumPeices', key: 'sumPeices' }, + { + title: '操作', + key: 'action', + fixed: 'right', + width: 120, + }, +] + +const [DetailTable, detailTableApi] = useVbenVxeGrid({ + gridOptions: detailGridOptions, +}); +const detailTable = ref([]) + +const [CleanDetailModal, detailModalApi] = useVbenModal({ + connectedComponent: cleanDetailModal, +}); + +function handleAddDetail() { + detailModalApi.setData({}); + detailModalApi.open(); +} + +function handleDetailReload(data: any) { + detailTable.value.push(data) +} + +function handleDeleteDetail(record: any,index: number) { + console.log(record,index); + detailTable.value.splice(index,1) +} + async function handleConfirm() { try { modalApi.lock(true); @@ -120,15 +244,13 @@ async function handleConfirm() { return; } const data = cloneDeep(await formApi.getValues()); -console.log(data); - + console.log(data); // 单位数据缓存 if (unitListData.length === 0) { const res = await resident_unitList(); unitListData = res.rows || []; } // 劳务数据缓存 cleanListData 已有 - // 查找label const unitObj = unitListData.find(item => item.id === data.unit); const cleanObj = cleanListData.find(item => item.id === data.name); @@ -160,8 +282,54 @@ async function handleClosed() { + + diff --git a/apps/web-antd/src/views/property/clean/cleanOrders/data.ts b/apps/web-antd/src/views/property/clean/cleanOrders/data.ts index 1e335c47..a8b89e44 100644 --- a/apps/web-antd/src/views/property/clean/cleanOrders/data.ts +++ b/apps/web-antd/src/views/property/clean/cleanOrders/data.ts @@ -131,28 +131,28 @@ export const modalSchema: FormSchemaGetter = () => [ component: 'Input', rules: 'required', }, - { - label: '劳务名称', - fieldName: 'name', - component: 'ApiSelect', - componentProps: { - api: cleanList, - resultField: 'rows', - labelField: 'name', - valueField: 'id', - }, - rules: 'required', - }, - { - label: '服务单价', - fieldName: 'prices', - component: 'Input', - rules: 'required', - componentProps: { - placeholder: '', - disabled: true, - }, - }, + // { + // label: '劳务名称', + // fieldName: 'name', + // component: 'ApiSelect', + // componentProps: { + // api: cleanList, + // resultField: 'rows', + // labelField: 'name', + // valueField: 'id', + // }, + // rules: 'required', + // }, + // { + // label: '服务单价', + // fieldName: 'prices', + // component: 'Input', + // rules: 'required', + // componentProps: { + // placeholder: '', + // disabled: true, + // }, + // }, // { // label: '保洁频率', // fieldName: 'frequency', From 9c08cca0959f233333d5bd92f40a3c11067c9e10 Mon Sep 17 00:00:00 2001 From: 15683799673 Date: Tue, 24 Jun 2025 23:55:59 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=BA=E5=83=8F?= =?UTF-8?q?=E5=BA=93=20=E5=A2=9E=E5=8A=A0=E4=BA=BA=E5=83=8F=E5=BA=93?= =?UTF-8?q?=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/api/sis/personLib/index.ts | 61 +++++ .../web-antd/src/api/sis/personLib/model.d.ts | 144 +++++++++++ .../src/api/sis/personLibImg/index.ts | 61 +++++ .../src/api/sis/personLibImg/model.d.ts | 228 +++++++++++++++++ apps/web-antd/src/views/sis/personLib/data.ts | 157 ++++++++++++ .../src/views/sis/personLib/index.vue | 182 ++++++++++++++ .../views/sis/personLib/personLib-modal.vue | 101 ++++++++ .../src/views/sis/personLibImg/data.ts | 237 ++++++++++++++++++ .../src/views/sis/personLibImg/index.vue | 182 ++++++++++++++ .../sis/personLibImg/personLibImg-modal.vue | 101 ++++++++ 10 files changed, 1454 insertions(+) create mode 100644 apps/web-antd/src/api/sis/personLib/index.ts create mode 100644 apps/web-antd/src/api/sis/personLib/model.d.ts create mode 100644 apps/web-antd/src/api/sis/personLibImg/index.ts create mode 100644 apps/web-antd/src/api/sis/personLibImg/model.d.ts create mode 100644 apps/web-antd/src/views/sis/personLib/data.ts create mode 100644 apps/web-antd/src/views/sis/personLib/index.vue create mode 100644 apps/web-antd/src/views/sis/personLib/personLib-modal.vue create mode 100644 apps/web-antd/src/views/sis/personLibImg/data.ts create mode 100644 apps/web-antd/src/views/sis/personLibImg/index.vue create mode 100644 apps/web-antd/src/views/sis/personLibImg/personLibImg-modal.vue diff --git a/apps/web-antd/src/api/sis/personLib/index.ts b/apps/web-antd/src/api/sis/personLib/index.ts new file mode 100644 index 00000000..e2f43600 --- /dev/null +++ b/apps/web-antd/src/api/sis/personLib/index.ts @@ -0,0 +1,61 @@ +import type { PersonLibVO, PersonLibForm, PersonLibQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询人像库列表 +* @param params +* @returns 人像库列表 +*/ +export function personLibList(params?: PersonLibQuery) { + return requestClient.get>('/sis/personLib/list', { params }); +} + +/** + * 导出人像库列表 + * @param params + * @returns 人像库列表 + */ +export function personLibExport(params?: PersonLibQuery) { + return commonExport('/sis/personLib/export', params ?? {}); +} + +/** + * 查询人像库详情 + * @param id id + * @returns 人像库详情 + */ +export function personLibInfo(id: ID) { + return requestClient.get(`/sis/personLib/${id}`); +} + +/** + * 新增人像库 + * @param data + * @returns void + */ +export function personLibAdd(data: PersonLibForm) { + return requestClient.postWithMsg('/sis/personLib', data); +} + +/** + * 更新人像库 + * @param data + * @returns void + */ +export function personLibUpdate(data: PersonLibForm) { + return requestClient.putWithMsg('/sis/personLib', data); +} + +/** + * 删除人像库 + * @param id id + * @returns void + */ +export function personLibRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/sis/personLib/${id}`); +} diff --git a/apps/web-antd/src/api/sis/personLib/model.d.ts b/apps/web-antd/src/api/sis/personLib/model.d.ts new file mode 100644 index 00000000..5a93ec83 --- /dev/null +++ b/apps/web-antd/src/api/sis/personLib/model.d.ts @@ -0,0 +1,144 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface PersonLibVO { + /** + * 主键id + */ + id: string | number; + + /** + * 人员库编码 + */ + libCode: string; + + /** + * 人员库名称 + */ + libName: string; + + /** + * 人员库描述 + */ + libDesc: string; + + /** + * 库类型,1:人员库,2:工服库 + */ + libType: number; + + /** + * 库的业务类型 1: 门禁库,2: 黑名单库 + */ + busiType: number; + + /** + * 创建人id + */ + createById: string | number; + + /** + * 更新人id + */ + updateById: string | number; + + /** + * 搜索值 + */ + searchValue: string; + +} + +export interface PersonLibForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 人员库编码 + */ + libCode?: string; + + /** + * 人员库名称 + */ + libName?: string; + + /** + * 人员库描述 + */ + libDesc?: string; + + /** + * 库类型,1:人员库,2:工服库 + */ + libType?: number; + + /** + * 库的业务类型 1: 门禁库,2: 黑名单库 + */ + busiType?: number; + + /** + * 创建人id + */ + createById?: string | number; + + /** + * 更新人id + */ + updateById?: string | number; + + /** + * 搜索值 + */ + searchValue?: string; + +} + +export interface PersonLibQuery extends PageQuery { + /** + * 人员库编码 + */ + libCode?: string; + + /** + * 人员库名称 + */ + libName?: string; + + /** + * 人员库描述 + */ + libDesc?: string; + + /** + * 库类型,1:人员库,2:工服库 + */ + libType?: number; + + /** + * 库的业务类型 1: 门禁库,2: 黑名单库 + */ + busiType?: number; + + /** + * 创建人id + */ + createById?: string | number; + + /** + * 更新人id + */ + updateById?: string | number; + + /** + * 搜索值 + */ + searchValue?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/api/sis/personLibImg/index.ts b/apps/web-antd/src/api/sis/personLibImg/index.ts new file mode 100644 index 00000000..351ba3fa --- /dev/null +++ b/apps/web-antd/src/api/sis/personLibImg/index.ts @@ -0,0 +1,61 @@ +import type { PersonLibImgVO, PersonLibImgForm, PersonLibImgQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询人像信息列表 +* @param params +* @returns 人像信息列表 +*/ +export function personLibImgList(params?: PersonLibImgQuery) { + return requestClient.get>('/sis/personLibImg/list', { params }); +} + +/** + * 导出人像信息列表 + * @param params + * @returns 人像信息列表 + */ +export function personLibImgExport(params?: PersonLibImgQuery) { + return commonExport('/sis/personLibImg/export', params ?? {}); +} + +/** + * 查询人像信息详情 + * @param id id + * @returns 人像信息详情 + */ +export function personLibImgInfo(id: ID) { + return requestClient.get(`/sis/personLibImg/${id}`); +} + +/** + * 新增人像信息 + * @param data + * @returns void + */ +export function personLibImgAdd(data: PersonLibImgForm) { + return requestClient.postWithMsg('/sis/personLibImg', data); +} + +/** + * 更新人像信息 + * @param data + * @returns void + */ +export function personLibImgUpdate(data: PersonLibImgForm) { + return requestClient.putWithMsg('/sis/personLibImg', data); +} + +/** + * 删除人像信息 + * @param id id + * @returns void + */ +export function personLibImgRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/sis/personLibImg/${id}`); +} diff --git a/apps/web-antd/src/api/sis/personLibImg/model.d.ts b/apps/web-antd/src/api/sis/personLibImg/model.d.ts new file mode 100644 index 00000000..d0e0d6ca --- /dev/null +++ b/apps/web-antd/src/api/sis/personLibImg/model.d.ts @@ -0,0 +1,228 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface PersonLibImgVO { + /** + * 主键id + */ + id: string | number; + + /** + * 人员库编码 + */ + libCode: string; + + /** + * 人像名称 + */ + imgName: string; + + /** + * 图片编码 + */ + imgCode: string; + + /** + * 图片的存储地址 + */ + imgUrl: string; + + /** + * 性别 1:男 +2:女 99:未说明 + */ + sex: number; + + /** + * 邮箱 + */ + email: string; + + /** + * 联系方式 + */ + tel: string; + + /** + * 证件类型 +1:身份证 2:护照 +3:行驶证 99:其它 + */ + certificateType: number; + + /** + * 证件号码 + */ + certificateNo: string; + + /** + * 出生日期 + */ + birthDate: string; + + /** + * 创建人id + */ + createById: string | number; + + /** + * 更新人id + */ + updateById: string | number; + + /** + * 搜索值 + */ + searchValue: string; + +} + +export interface PersonLibImgForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 人员库编码 + */ + libCode?: string; + + /** + * 人像名称 + */ + imgName?: string; + + /** + * 图片编码 + */ + imgCode?: string; + + /** + * 图片的存储地址 + */ + imgUrl?: string; + + /** + * 性别 1:男 +2:女 99:未说明 + */ + sex?: number; + + /** + * 邮箱 + */ + email?: string; + + /** + * 联系方式 + */ + tel?: string; + + /** + * 证件类型 +1:身份证 2:护照 +3:行驶证 99:其它 + */ + certificateType?: number; + + /** + * 证件号码 + */ + certificateNo?: string; + + /** + * 出生日期 + */ + birthDate?: string; + + /** + * 创建人id + */ + createById?: string | number; + + /** + * 更新人id + */ + updateById?: string | number; + + /** + * 搜索值 + */ + searchValue?: string; + +} + +export interface PersonLibImgQuery extends PageQuery { + /** + * 人员库编码 + */ + libCode?: string; + + /** + * 人像名称 + */ + imgName?: string; + + /** + * 图片编码 + */ + imgCode?: string; + + /** + * 图片的存储地址 + */ + imgUrl?: string; + + /** + * 性别 1:男 +2:女 99:未说明 + */ + sex?: number; + + /** + * 邮箱 + */ + email?: string; + + /** + * 联系方式 + */ + tel?: string; + + /** + * 证件类型 +1:身份证 2:护照 +3:行驶证 99:其它 + */ + certificateType?: number; + + /** + * 证件号码 + */ + certificateNo?: string; + + /** + * 出生日期 + */ + birthDate?: string; + + /** + * 创建人id + */ + createById?: string | number; + + /** + * 更新人id + */ + updateById?: string | number; + + /** + * 搜索值 + */ + searchValue?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/views/sis/personLib/data.ts b/apps/web-antd/src/views/sis/personLib/data.ts new file mode 100644 index 00000000..ab64c53b --- /dev/null +++ b/apps/web-antd/src/views/sis/personLib/data.ts @@ -0,0 +1,157 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; + + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'libCode', + label: '人员库编码', + }, + { + component: 'Input', + fieldName: 'libName', + label: '人员库名称', + }, + { + component: 'Input', + fieldName: 'libDesc', + label: '人员库描述', + }, + { + component: 'Select', + componentProps: { + }, + fieldName: 'libType', + label: '库类型,1:人员库,2:工服库', + }, + { + component: 'Select', + componentProps: { + }, + fieldName: 'busiType', + label: '库的业务类型 1: 门禁库,2: 黑名单库', + }, + { + component: 'Input', + fieldName: 'createById', + label: '创建人id', + }, + { + component: 'Input', + fieldName: 'updateById', + label: '更新人id', + }, + { + component: 'Input', + fieldName: 'searchValue', + label: '搜索值', + }, +]; + +// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 +// export const columns: () => VxeGridProps['columns'] = () => [ +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '主键id', + field: 'id', + }, + { + title: '人员库编码', + field: 'libCode', + }, + { + title: '人员库名称', + field: 'libName', + }, + { + title: '人员库描述', + field: 'libDesc', + }, + { + title: '库类型,1:人员库,2:工服库', + field: 'libType', + }, + { + title: '库的业务类型 1: 门禁库,2: 黑名单库', + field: 'busiType', + }, + { + title: '创建人id', + field: 'createById', + }, + { + title: '更新人id', + field: 'updateById', + }, + { + title: '搜索值', + field: 'searchValue', + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; + +export const modalSchema: FormSchemaGetter = () => [ + { + label: '主键id', + fieldName: 'id', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '人员库编码', + fieldName: 'libCode', + component: 'Input', + rules: 'required', + }, + { + label: '人员库名称', + fieldName: 'libName', + component: 'Input', + rules: 'required', + }, + { + label: '人员库描述', + fieldName: 'libDesc', + component: 'Input', + }, + { + label: '库类型,1:人员库,2:工服库', + fieldName: 'libType', + component: 'Select', + componentProps: { + }, + }, + { + label: '库的业务类型 1: 门禁库,2: 黑名单库', + fieldName: 'busiType', + component: 'Select', + componentProps: { + }, + }, + { + label: '创建人id', + fieldName: 'createById', + component: 'Input', + }, + { + label: '更新人id', + fieldName: 'updateById', + component: 'Input', + }, + { + label: '搜索值', + fieldName: 'searchValue', + component: 'Input', + }, +]; diff --git a/apps/web-antd/src/views/sis/personLib/index.vue b/apps/web-antd/src/views/sis/personLib/index.vue new file mode 100644 index 00000000..68710759 --- /dev/null +++ b/apps/web-antd/src/views/sis/personLib/index.vue @@ -0,0 +1,182 @@ + + + diff --git a/apps/web-antd/src/views/sis/personLib/personLib-modal.vue b/apps/web-antd/src/views/sis/personLib/personLib-modal.vue new file mode 100644 index 00000000..a10f4264 --- /dev/null +++ b/apps/web-antd/src/views/sis/personLib/personLib-modal.vue @@ -0,0 +1,101 @@ + + + + diff --git a/apps/web-antd/src/views/sis/personLibImg/data.ts b/apps/web-antd/src/views/sis/personLibImg/data.ts new file mode 100644 index 00000000..1285cd8a --- /dev/null +++ b/apps/web-antd/src/views/sis/personLibImg/data.ts @@ -0,0 +1,237 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; + + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'libCode', + label: '人员库编码', + }, + { + component: 'Input', + fieldName: 'imgName', + label: '人像名称', + }, + { + component: 'Input', + fieldName: 'imgCode', + label: '图片编码', + }, + { + component: 'Input', + fieldName: 'imgUrl', + label: '图片的存储地址', + }, + { + component: 'Select', + componentProps: { + }, + fieldName: 'sex', + label: '性别 1:男 +2:女 99:未说明', + }, + { + component: 'Input', + fieldName: 'email', + label: '邮箱', + }, + { + component: 'Input', + fieldName: 'tel', + label: '联系方式', + }, + { + component: 'Select', + componentProps: { + }, + fieldName: 'certificateType', + label: '证件类型 +1:身份证 2:护照 +3:行驶证 99:其它', + }, + { + component: 'Input', + fieldName: 'certificateNo', + label: '证件号码', + }, + { + component: 'Input', + fieldName: 'birthDate', + label: '出生日期', + }, + { + component: 'Input', + fieldName: 'createById', + label: '创建人id', + }, + { + component: 'Input', + fieldName: 'updateById', + label: '更新人id', + }, + { + component: 'Input', + fieldName: 'searchValue', + label: '搜索值', + }, +]; + +// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 +// export const columns: () => VxeGridProps['columns'] = () => [ +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '主键id', + field: 'id', + }, + { + title: '人员库编码', + field: 'libCode', + }, + { + title: '人像名称', + field: 'imgName', + }, + { + title: '图片编码', + field: 'imgCode', + }, + { + title: '图片的存储地址', + field: 'imgUrl', + }, + { + title: '性别 1:男 +2:女 99:未说明', + field: 'sex', + }, + { + title: '邮箱', + field: 'email', + }, + { + title: '联系方式', + field: 'tel', + }, + { + title: '证件类型 +1:身份证 2:护照 +3:行驶证 99:其它', + field: 'certificateType', + }, + { + title: '证件号码', + field: 'certificateNo', + }, + { + title: '出生日期', + field: 'birthDate', + }, + { + title: '创建人id', + field: 'createById', + }, + { + title: '更新人id', + field: 'updateById', + }, + { + title: '搜索值', + field: 'searchValue', + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; + +export const modalSchema: FormSchemaGetter = () => [ + { + label: '主键id', + fieldName: 'id', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '人员库编码', + fieldName: 'libCode', + component: 'Input', + rules: 'required', + }, + { + label: '人像名称', + fieldName: 'imgName', + component: 'Input', + rules: 'required', + }, + { + label: '图片编码', + fieldName: 'imgCode', + component: 'Input', + }, + { + label: '图片的存储地址', + fieldName: 'imgUrl', + component: 'Input', + rules: 'required', + }, + { + label: '性别 1:男 +2:女 99:未说明', + fieldName: 'sex', + component: 'Select', + componentProps: { + }, + }, + { + label: '邮箱', + fieldName: 'email', + component: 'Input', + }, + { + label: '联系方式', + fieldName: 'tel', + component: 'Input', + }, + { + label: '证件类型 +1:身份证 2:护照 +3:行驶证 99:其它', + fieldName: 'certificateType', + component: 'Select', + componentProps: { + }, + }, + { + label: '证件号码', + fieldName: 'certificateNo', + component: 'Input', + }, + { + label: '出生日期', + fieldName: 'birthDate', + component: 'Input', + }, + { + label: '创建人id', + fieldName: 'createById', + component: 'Input', + }, + { + label: '更新人id', + fieldName: 'updateById', + component: 'Input', + }, + { + label: '搜索值', + fieldName: 'searchValue', + component: 'Input', + }, +]; diff --git a/apps/web-antd/src/views/sis/personLibImg/index.vue b/apps/web-antd/src/views/sis/personLibImg/index.vue new file mode 100644 index 00000000..aa309e8a --- /dev/null +++ b/apps/web-antd/src/views/sis/personLibImg/index.vue @@ -0,0 +1,182 @@ + + + diff --git a/apps/web-antd/src/views/sis/personLibImg/personLibImg-modal.vue b/apps/web-antd/src/views/sis/personLibImg/personLibImg-modal.vue new file mode 100644 index 00000000..04e93c35 --- /dev/null +++ b/apps/web-antd/src/views/sis/personLibImg/personLibImg-modal.vue @@ -0,0 +1,101 @@ + + + + From b2acba4114bd1fc98e91838f7692e520d31e0f22 Mon Sep 17 00:00:00 2001 From: 15683799673 Date: Wed, 25 Jun 2025 00:37:48 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=BA=E5=83=8F?= =?UTF-8?q?=E5=BA=93=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/sis/personLib/data.ts | 51 +++---------------- .../src/views/sis/personLib/index.vue | 38 +++++++------- .../src/views/sis/personLibImg/data.ts | 39 +++++--------- 3 files changed, 40 insertions(+), 88 deletions(-) diff --git a/apps/web-antd/src/views/sis/personLib/data.ts b/apps/web-antd/src/views/sis/personLib/data.ts index ab64c53b..8a64e9c5 100644 --- a/apps/web-antd/src/views/sis/personLib/data.ts +++ b/apps/web-antd/src/views/sis/personLib/data.ts @@ -1,7 +1,6 @@ import type { FormSchemaGetter } from '#/adapter/form'; import type { VxeGridProps } from '#/adapter/vxe-table'; - export const querySchema: FormSchemaGetter = () => [ { component: 'Input', @@ -20,32 +19,15 @@ export const querySchema: FormSchemaGetter = () => [ }, { component: 'Select', - componentProps: { - }, + componentProps: {}, fieldName: 'libType', - label: '库类型,1:人员库,2:工服库', + label: '库类型', }, { component: 'Select', - componentProps: { - }, + componentProps: {}, fieldName: 'busiType', - label: '库的业务类型 1: 门禁库,2: 黑名单库', - }, - { - component: 'Input', - fieldName: 'createById', - label: '创建人id', - }, - { - component: 'Input', - fieldName: 'updateById', - label: '更新人id', - }, - { - component: 'Input', - fieldName: 'searchValue', - label: '搜索值', + label: '业务类型', }, ]; @@ -126,32 +108,15 @@ export const modalSchema: FormSchemaGetter = () => [ component: 'Input', }, { - label: '库类型,1:人员库,2:工服库', + label: '库类型', fieldName: 'libType', component: 'Select', - componentProps: { - }, + componentProps: {}, }, { - label: '库的业务类型 1: 门禁库,2: 黑名单库', + label: '业务类型', fieldName: 'busiType', component: 'Select', - componentProps: { - }, - }, - { - label: '创建人id', - fieldName: 'createById', - component: 'Input', - }, - { - label: '更新人id', - fieldName: 'updateById', - component: 'Input', - }, - { - label: '搜索值', - fieldName: 'searchValue', - component: 'Input', + componentProps: {}, }, ]; diff --git a/apps/web-antd/src/views/sis/personLib/index.vue b/apps/web-antd/src/views/sis/personLib/index.vue index 68710759..da110e76 100644 --- a/apps/web-antd/src/views/sis/personLib/index.vue +++ b/apps/web-antd/src/views/sis/personLib/index.vue @@ -1,30 +1,24 @@ @@ -138,9 +137,10 @@ function handleDownloadExcel() { + type="primary" + v-access:code="['sis:personLib:remove']" + @click="handleMultiDelete" + > {{ $t('pages.common.delete') }} [ { component: 'Input', @@ -25,11 +24,9 @@ export const querySchema: FormSchemaGetter = () => [ }, { component: 'Select', - componentProps: { - }, + componentProps: {}, fieldName: 'sex', - label: '性别 1:男 -2:女 99:未说明', + label: '性别', }, { component: 'Input', @@ -43,12 +40,9 @@ export const querySchema: FormSchemaGetter = () => [ }, { component: 'Select', - componentProps: { - }, + componentProps: {}, fieldName: 'certificateType', - label: '证件类型 -1:身份证 2:护照 -3:行驶证 99:其它', + label: '证件类型', }, { component: 'Input', @@ -102,9 +96,7 @@ export const columns: VxeGridProps['columns'] = [ field: 'imgUrl', }, { - title: '性别 1:男 -2:女 99:未说明', - field: 'sex', + title: '性别', }, { title: '邮箱', @@ -115,9 +107,7 @@ export const columns: VxeGridProps['columns'] = [ field: 'tel', }, { - title: '证件类型 -1:身份证 2:护照 -3:行驶证 99:其它', + title: '证件类型', field: 'certificateType', }, { @@ -143,7 +133,9 @@ export const columns: VxeGridProps['columns'] = [ { field: 'action', fixed: 'right', - slots: { default: 'action' }, + slots: { + default: 'action', + }, title: '操作', width: 180, }, @@ -183,12 +175,10 @@ export const modalSchema: FormSchemaGetter = () => [ rules: 'required', }, { - label: '性别 1:男 -2:女 99:未说明', + label: '性别 1:男', fieldName: 'sex', component: 'Select', - componentProps: { - }, + componentProps: {}, }, { label: '邮箱', @@ -201,13 +191,10 @@ export const modalSchema: FormSchemaGetter = () => [ component: 'Input', }, { - label: '证件类型 -1:身份证 2:护照 -3:行驶证 99:其它', + label: '证件类型', fieldName: 'certificateType', component: 'Select', - componentProps: { - }, + componentProps: {}, }, { label: '证件号码',