From fb537fdc00755cc2f50878f3b89dd64d7ff1ccb5 Mon Sep 17 00:00:00 2001 From: zcxlsm Date: Tue, 29 Jul 2025 02:05:02 +0800 Subject: [PATCH 1/7] =?UTF-8?q?feat(property):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=AF=BC=E5=85=A5=E5=92=8C=E4=BA=BA=E8=84=B8?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/property/resident/person/index.ts | 55 ++++++- .../api/property/resident/person/model.d.ts | 12 ++ .../resident/person/face-import-modal.vue | 115 ++++++++++++++ .../views/property/resident/person/index.vue | 148 +++++++++--------- .../resident/person/person-import-modal.vue | 131 ++++++++++++++++ 5 files changed, 382 insertions(+), 79 deletions(-) create mode 100644 apps/web-antd/src/views/property/resident/person/face-import-modal.vue create mode 100644 apps/web-antd/src/views/property/resident/person/person-import-modal.vue diff --git a/apps/web-antd/src/api/property/resident/person/index.ts b/apps/web-antd/src/api/property/resident/person/index.ts index f3593634..43f57891 100644 --- a/apps/web-antd/src/api/property/resident/person/index.ts +++ b/apps/web-antd/src/api/property/resident/person/index.ts @@ -1,9 +1,9 @@ -import type { PersonVO, PersonForm, PersonQuery } from './model'; +import type { PersonVO, PersonForm, PersonQuery, PerssonImportParam } from './model'; import type { ID, IDS } from '#/api/common'; import type { PageResult } from '#/api/common'; -import { commonExport } from '#/api/helper'; +import { commonExport, ContentTypeEnum } from '#/api/helper'; import { requestClient } from '#/api/request'; /** @@ -59,3 +59,54 @@ export function personUpdate(data: PersonForm) { export function personRemove(id: ID | IDS) { return requestClient.deleteWithMsg(`/property/person/${id}`); } + +/** + * 从excel导入用户 + * @param data + * @returns void + */ +export function personImportData(data: PerssonImportParam) { + return requestClient.post<{ code: number; msg: string }>( + '/property/person/importData', + data, + { + headers: { + 'Content-Type': ContentTypeEnum.FORM_DATA, + }, + isTransformResponse: false, + }, + ); +} + +/** + * 导入人脸 + * @param data + * @returns void + */ +export function personImportFace(data: PerssonImportParam) { + return requestClient.post<{ code: number; msg: string }>( + '/property/person/importFace', + data, + { + headers: { + 'Content-Type': ContentTypeEnum.FORM_DATA, + }, + isTransformResponse: false, + }, + ); +} + +/** + * 下载用户导入模板 + * @returns blob + */ +export function downloadImportTemplate() { + return requestClient.post( + '/property/person/importTemplate', + {}, + { + isTransformResponse: false, + responseType: 'blob', + }, + ); +} 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 83b2c7a5..57f03f6b 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 @@ -285,3 +285,15 @@ export interface Person extends BaseEntity { email: string } + +/** + * @description: 用户导入 + * @param updateSupport 是否覆盖数据 + * @param unitId 单位Id + * @param file excel文件 + */ +export interface PerssonImportParam { + updateSupport: boolean; + unitId: number; + file: Blob | File; +} diff --git a/apps/web-antd/src/views/property/resident/person/face-import-modal.vue b/apps/web-antd/src/views/property/resident/person/face-import-modal.vue new file mode 100644 index 00000000..3fd90094 --- /dev/null +++ b/apps/web-antd/src/views/property/resident/person/face-import-modal.vue @@ -0,0 +1,115 @@ + + + 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 50d4af5a..2166815f 100644 --- a/apps/web-antd/src/views/property/resident/person/index.vue +++ b/apps/web-antd/src/views/property/resident/person/index.vue @@ -1,29 +1,31 @@ @@ -127,68 +143,44 @@ function handleInfo(row: Required) { diff --git a/apps/web-antd/src/views/property/resident/person/person-import-modal.vue b/apps/web-antd/src/views/property/resident/person/person-import-modal.vue new file mode 100644 index 00000000..03d085da --- /dev/null +++ b/apps/web-antd/src/views/property/resident/person/person-import-modal.vue @@ -0,0 +1,131 @@ + + + From ce445ae088e7e3ed9478976e3eff49e40980cc6f Mon Sep 17 00:00:00 2001 From: fyy <2717885210@qq.com> Date: Tue, 29 Jul 2025 11:42:20 +0800 Subject: [PATCH 2/7] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=AF=BC=E8=88=AA=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/@core/preferences/src/types.ts | 2 ++ .../effects/layouts/src/basic/header/header.vue | 13 ++++++++++++- .../layouts/src/widgets/back-navigation.vue | 14 ++++++++++++++ packages/effects/layouts/src/widgets/index.ts | 1 + 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 packages/effects/layouts/src/widgets/back-navigation.vue diff --git a/packages/@core/preferences/src/types.ts b/packages/@core/preferences/src/types.ts index e640edb5..f2094073 100644 --- a/packages/@core/preferences/src/types.ts +++ b/packages/@core/preferences/src/types.ts @@ -267,6 +267,8 @@ interface WidgetPreferences { sidebarToggle: boolean; /** 是否显示主题切换部件 */ themeToggle: boolean; + /** 是否显示返回导航部件 */ + backNavigation: boolean; } interface Preferences { diff --git a/packages/effects/layouts/src/basic/header/header.vue b/packages/effects/layouts/src/basic/header/header.vue index 97387460..59276af9 100644 --- a/packages/effects/layouts/src/basic/header/header.vue +++ b/packages/effects/layouts/src/basic/header/header.vue @@ -11,6 +11,7 @@ import { LanguageToggle, PreferencesButton, ThemeToggle, + BackNavigation, } from '../../widgets'; interface Props { @@ -43,7 +44,8 @@ const rightSlots = computed(() => { list.push({ index: REFERENCE_VALUE, name: 'global-search', - }); + } + ); } if (preferencesButtonPosition.value.header) { @@ -76,6 +78,12 @@ const rightSlots = computed(() => { name: 'notification', }); } + if (preferences.widget.backNavigation) { + list.push({ + index: REFERENCE_VALUE + 60, + name: 'back-navigation', + }); + } Object.keys(slots).forEach((key) => { const name = key.split('-'); @@ -164,6 +172,9 @@ function clearPreferencesAndLogout() { + diff --git a/packages/effects/layouts/src/widgets/back-navigation.vue b/packages/effects/layouts/src/widgets/back-navigation.vue new file mode 100644 index 00000000..d2b51266 --- /dev/null +++ b/packages/effects/layouts/src/widgets/back-navigation.vue @@ -0,0 +1,14 @@ + + \ No newline at end of file diff --git a/packages/effects/layouts/src/widgets/index.ts b/packages/effects/layouts/src/widgets/index.ts index f6a4a7ba..9b0b9be7 100644 --- a/packages/effects/layouts/src/widgets/index.ts +++ b/packages/effects/layouts/src/widgets/index.ts @@ -9,3 +9,4 @@ export * from './notification'; export * from './preferences'; export * from './theme-toggle'; export * from './user-dropdown'; +export { default as BackNavigation } from './back-navigation.vue'; From b912ca5aa51b3db838a4f8ee65663fb3de5b9fcd Mon Sep 17 00:00:00 2001 From: FLL <2162874245@qq.com> Date: Tue, 29 Jul 2025 14:43:50 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E8=83=BD=E8=80=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../property/businessManagement/workOrdersType/data.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web-antd/src/views/property/businessManagement/workOrdersType/data.ts b/apps/web-antd/src/views/property/businessManagement/workOrdersType/data.ts index 56133e2b..3c5f97ab 100644 --- a/apps/web-antd/src/views/property/businessManagement/workOrdersType/data.ts +++ b/apps/web-antd/src/views/property/businessManagement/workOrdersType/data.ts @@ -26,10 +26,10 @@ export const querySchema: FormSchemaGetter = () => [ export const columns: VxeGridProps['columns'] = [ { type: 'checkbox', width: 60 }, - { - title: '工单类型编号', - field: 'orderTypeNo', - }, + // { + // title: '工单类型编号', + // field: 'orderTypeNo', + // }, { title: '类型名称', field: 'orderTypeName', From 9cb6d99e9079feb0d6d97780865071b84328bf22 Mon Sep 17 00:00:00 2001 From: FLL <2162874245@qq.com> Date: Tue, 29 Jul 2025 14:56:52 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E8=83=BD=E8=80=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../businessManagement/workOrders/orders-modal.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/web-antd/src/views/property/businessManagement/workOrders/orders-modal.vue b/apps/web-antd/src/views/property/businessManagement/workOrders/orders-modal.vue index df252f63..1cac71f2 100644 --- a/apps/web-antd/src/views/property/businessManagement/workOrders/orders-modal.vue +++ b/apps/web-antd/src/views/property/businessManagement/workOrders/orders-modal.vue @@ -8,10 +8,10 @@ import { } from '#/api/property/businessManagement/workOrders'; import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup'; import {ordersModalSchema} from './data'; -import {personList} from "#/api/property/resident/person"; import {renderDictValue} from "#/utils/render"; -import {onMounted, ref} from "vue"; -import { useUserStore } from '@vben/stores'; +import {ref} from "vue"; +import {useUserStore} from '@vben/stores'; +import {userList} from "#/api/system/user"; const userStore = useUserStore(); const emit = defineEmits<{ reload: [] }>(); @@ -109,10 +109,10 @@ async function queryPersonData() { pageSize: 1000, pageNum: 1, } - const res = await personList(params); + const res = await userList(params); const options = res.rows.map((user) => ({ - label: user.userName + '-' + renderDictValue(user.gender, 'sys_user_sex') + '-' + user.phone, - value: user.id, + label: user.nickName + '-' + renderDictValue(user.sex, 'sys_user_sex') + '-' + user.phonenumber, + value: user.userId, })); formApi.updateSchema([ { From 84cade81df5fc27d62e7f4f3738d0603039a21ff Mon Sep 17 00:00:00 2001 From: dev_ljl <2590379346@qq.com> Date: Tue, 29 Jul 2025 15:26:41 +0800 Subject: [PATCH 5/7] =?UTF-8?q?fix=EF=BC=9A=E5=B7=A1=E6=A3=80=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E7=BC=96=E8=BE=91=E3=80=81=E4=BF=9D=E5=85=BB=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../attendanceGroupSettings/model.d.ts | 10 ++++++++-- .../equipmentManagement/maintainPlan/model.d.ts | 2 ++ .../inspectionManagement/inspectionPlan/model.d.ts | 2 +- .../attendance-group-detail.vue | 6 +++--- .../attendanceGroupSettings/group-modal.vue | 2 +- .../equipmentManagement/maintainPlan/data.ts | 2 +- .../maintainPlan/maintainPlan-modal.vue | 14 +++++++------- .../maintainPlan/plan-detail.vue | 8 ++++++-- .../inspectionPlan/inspectionPlan-modal.vue | 12 ++++++------ 9 files changed, 35 insertions(+), 23 deletions(-) diff --git a/apps/web-antd/src/api/property/attendanceManagement/attendanceGroupSettings/model.d.ts b/apps/web-antd/src/api/property/attendanceManagement/attendanceGroupSettings/model.d.ts index 0bc06bd2..21ade3dc 100644 --- a/apps/web-antd/src/api/property/attendanceManagement/attendanceGroupSettings/model.d.ts +++ b/apps/web-antd/src/api/property/attendanceManagement/attendanceGroupSettings/model.d.ts @@ -19,9 +19,15 @@ export interface GroupVO { /** * 考勤类型(0:固定班制,1:排班制) */ - attendanceType: number; + attendanceType: number| string; - isAutomatic: number; + isAutomatic: boolean; + + clockDateList: any[]; + + weekList: any[]; + + attendanceList:any[]; } diff --git a/apps/web-antd/src/api/property/equipmentManagement/maintainPlan/model.d.ts b/apps/web-antd/src/api/property/equipmentManagement/maintainPlan/model.d.ts index 6350b7c2..4f89a0b2 100644 --- a/apps/web-antd/src/api/property/equipmentManagement/maintainPlan/model.d.ts +++ b/apps/web-antd/src/api/property/equipmentManagement/maintainPlan/model.d.ts @@ -61,6 +61,8 @@ export interface MaintainPlanVO { userId: string[]; machineMaintainPlanStaffBoList:any[]; + + machineMaintainPlanStaffVos:any[]; } export interface MaintainPlanForm extends BaseEntity { diff --git a/apps/web-antd/src/api/property/inspectionManagement/inspectionPlan/model.d.ts b/apps/web-antd/src/api/property/inspectionManagement/inspectionPlan/model.d.ts index 56008843..7467c144 100644 --- a/apps/web-antd/src/api/property/inspectionManagement/inspectionPlan/model.d.ts +++ b/apps/web-antd/src/api/property/inspectionManagement/inspectionPlan/model.d.ts @@ -19,7 +19,7 @@ export interface InspectionPlanVO { /** * 巡检周期 */ - inspectionPlanPeriod: number; + inspectionPlanPeriod: string; /** * 任务提前分组 diff --git a/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/attendance-group-detail.vue b/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/attendance-group-detail.vue index def438ed..95c1db8e 100644 --- a/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/attendance-group-detail.vue +++ b/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/attendance-group-detail.vue @@ -45,7 +45,7 @@ async function handleOpenChange(open: boolean) { } modalApi.modalLoading(true); const {id,attendanceType} = modalApi.getData() as { id?: number | string,attendanceType?:string }; - const res = await groupInfo(id,attendanceType); + const res = await groupInfo(id as string,attendanceType as string); groupDetail.value=res; if(res.attendanceType==0){ unCheckInData.value=res.clockDateList.filter(item=>item.mustNoCheck==0) @@ -65,7 +65,7 @@ async function handleOpenChange(open: boolean) { }) groupDetail.value.isAutomatic=true }else { - cycleData.value=res; + cycleData.value=[]; } modalApi.modalLoading(false); } @@ -115,7 +115,7 @@ async function showHoliday() { size="small" :pagination="false" > -