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 @@ + + + +