From b736fef16a3733d45f38156ef4a0f3b235b7987c Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Thu, 25 Sep 2025 14:48:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=B8=8D=E5=90=8C=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/userInfo.ts | 2 ++ src/utils/plan.ts | 13 +++++++++ src/views/car/carAlarm/index.vue | 6 ++-- .../deviceGroup/camera-table-dialog.vue | 1 + src/views/door/doorAlarm/index.vue | 6 ++-- src/views/door/doorRecord/index.vue | 8 +++++ .../duty/dutyPlan/components/duty-table.vue | 29 ++++++++++++++++--- src/views/duty/dutyPlan/index.vue | 18 ++++++++++++ src/views/login/index.vue | 18 ++++++++---- 9 files changed, 85 insertions(+), 16 deletions(-) diff --git a/src/stores/userInfo.ts b/src/stores/userInfo.ts index b5a8c13..1a605ab 100644 --- a/src/stores/userInfo.ts +++ b/src/stores/userInfo.ts @@ -14,6 +14,7 @@ export const useUserInfo = defineStore('userInfo', { photo: '', time: 0, roles: [], + roleCodes: [], authBtnList: [], }, }), @@ -126,6 +127,7 @@ export const useUserInfo = defineStore('userInfo', { user: res.data.sysUser, time: new Date().getTime(), roles: res.data.roles, + roleCodes: res.data.roleCodes, authBtnList: res.data.permissions, }; this.userInfos = userInfo; diff --git a/src/utils/plan.ts b/src/utils/plan.ts index 8f7b2a1..d5cf00c 100644 --- a/src/utils/plan.ts +++ b/src/utils/plan.ts @@ -11,6 +11,19 @@ export const roleConstant = { DEVICE_ROLE: '400', } +export const roleCodeConstant = { + // 交接班管理员 + WORKFORCE: "WORKFORCE", + // 设备管理员 + DEVICE_MANAGE: "DEVICE_MANAGE", + // 系统管理员 + SYSTEM_ADMIN: "SYSTEM_ADMIN", + // 普通用户 + GENERAL_USER: "GENERAL_USER", + // 管理员 + ROLE_ADMIN: "ROLE_ADMIN", +} + /** * 打开大屏地址 * @param url 大屏地址 diff --git a/src/views/car/carAlarm/index.vue b/src/views/car/carAlarm/index.vue index 1b0247b..3c67542 100644 --- a/src/views/car/carAlarm/index.vue +++ b/src/views/car/carAlarm/index.vue @@ -222,10 +222,10 @@ function getDictByValue(value: any, tag: any) { function openReplayDialog(row: any) { const dateTime = row.capTime if (!dateTime) return - // 获取dateTime前后30秒的时间 + // 获取dateTime前后15秒的时间 const baseTime = new Date(dateTime) - const startDateTime = new Date(baseTime.getTime() - 30 * 1000) - const endDateTime = new Date(baseTime.getTime() + 30 * 1000) + const startDateTime = new Date(baseTime.getTime() - 15 * 1000) + const endDateTime = new Date(baseTime.getTime() + 15 * 1000) const startTime = parseTime(startDateTime, '{y}-{m}-{d} {h}:{i}:{s}') const endTime = parseTime(endDateTime, '{y}-{m}-{d} {h}:{i}:{s}') diff --git a/src/views/device/deviceGroup/camera-table-dialog.vue b/src/views/device/deviceGroup/camera-table-dialog.vue index d5f9213..1b0704c 100644 --- a/src/views/device/deviceGroup/camera-table-dialog.vue +++ b/src/views/device/deviceGroup/camera-table-dialog.vue @@ -29,6 +29,7 @@ + {{ row.deviceIp }} diff --git a/src/views/door/doorAlarm/index.vue b/src/views/door/doorAlarm/index.vue index f57d61d..ca5f437 100644 --- a/src/views/door/doorAlarm/index.vue +++ b/src/views/door/doorAlarm/index.vue @@ -224,10 +224,10 @@ function getDictByValue(value: any, tag: any) { function openReplayDialog(row: any) { const dateTime = row.swingTime if (!dateTime) return - // 获取dateTime前后30秒的时间 + // 获取dateTime前后15秒的时间 const baseTime = new Date(dateTime) - const startDateTime = new Date(baseTime.getTime() - 30 * 1000) - const endDateTime = new Date(baseTime.getTime() + 30 * 1000) + const startDateTime = new Date(baseTime.getTime() - 15 * 1000) + const endDateTime = new Date(baseTime.getTime() + 15 * 1000) const startTime = parseTime(startDateTime, '{y}-{m}-{d} {h}:{i}:{s}') const endTime = parseTime(endDateTime, '{y}-{m}-{d} {h}:{i}:{s}') diff --git a/src/views/door/doorRecord/index.vue b/src/views/door/doorRecord/index.vue index d143236..a8334de 100644 --- a/src/views/door/doorRecord/index.vue +++ b/src/views/door/doorRecord/index.vue @@ -96,6 +96,14 @@ + + + + {{ row.deviceName }} + {{ row.channelName }} + + + diff --git a/src/views/duty/dutyPlan/components/duty-table.vue b/src/views/duty/dutyPlan/components/duty-table.vue index 6b5f4ad..8a583fc 100644 --- a/src/views/duty/dutyPlan/components/duty-table.vue +++ b/src/views/duty/dutyPlan/components/duty-table.vue @@ -5,9 +5,11 @@ - + v-loading="state.loading" border + :cell-style="{ ...tableStyle.cellStyle, fontSize: '12px', padding: '8px 0 !important' }" + :header-cell-style="{ ...tableStyle.headerCellStyle, fontSize: '12px', padding: '8px 0 !important' }" + @sort-change="sortChangeHandle"> + @@ -67,6 +69,13 @@ watch( }, ) +const getWidth = (v: any) => { + if (v.children && v.children.length) { + return 10 + } + return 100 +} + const refresh = async (id: string) => { state.queryForm.dutyId = id if (!id) return @@ -130,4 +139,16 @@ const getsysDutyData = async (id: string) => { - \ No newline at end of file + \ No newline at end of file diff --git a/src/views/duty/dutyPlan/index.vue b/src/views/duty/dutyPlan/index.vue index c1e8aad..017627b 100644 --- a/src/views/duty/dutyPlan/index.vue +++ b/src/views/duty/dutyPlan/index.vue @@ -22,12 +22,30 @@