From 78913feba2881ea8dea745b2f1187e570ee85859 Mon Sep 17 00:00:00 2001 From: fuguobin Date: Fri, 29 Dec 2023 10:53:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/directive/permission/index.ts | 2 -- src/utils/useStorage.ts | 7 +++---- src/views/dataScreen/devicemanage/components/main.vue | 2 -- src/views/dataScreen/screen/components/main.vue | 1 - src/views/monitoring/components/header.vue | 1 - src/views/monitoring/devicemanage/components/main.vue | 2 -- src/views/monitoring/screen/components/main.vue | 1 - 7 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/directive/permission/index.ts b/src/directive/permission/index.ts index 5771274..a910c0c 100644 --- a/src/directive/permission/index.ts +++ b/src/directive/permission/index.ts @@ -8,7 +8,6 @@ export const hasPerm: Directive = { mounted(el: HTMLElement, binding: DirectiveBinding) { // 「超级管理员」拥有所有的按钮权限 const { roles, perms } = useUserStoreHook(); - debugger; if (roles.includes('ROOT')) { return true; } @@ -18,7 +17,6 @@ export const hasPerm: Directive = { const requiredPerms = value; // DOM绑定需要的按钮权限标识 const hasPerm = perms?.some(perm => { - debugger; return requiredPerms.includes(perm); }); diff --git a/src/utils/useStorage.ts b/src/utils/useStorage.ts index e80e17c..f609033 100644 --- a/src/utils/useStorage.ts +++ b/src/utils/useStorage.ts @@ -20,7 +20,6 @@ const getItem = (key: string, storageType: StorageType): any => { try { const storage = getStorage(storageType); const item = storage.getItem(key); - debugger if (item) { return JSON.parse(item); } @@ -69,7 +68,7 @@ const initializeStorage = (storageType: StorageType): void => { const storage = getStorage(storageType); const keys = Object.keys(storage); - storageData.value = keys.map((key) => ({ + storageData.value = keys.map(key => ({ key, value: getItem(key, storageType) })); @@ -77,7 +76,7 @@ const initializeStorage = (storageType: StorageType): void => { const useStorage = (storageType: StorageType) => { const getUseStorage = (key: string) => { - getItem(key,storageType); + getItem(key, storageType); // return computed(() => storageData.value); }; @@ -89,7 +88,7 @@ const useStorage = (storageType: StorageType) => { const removeUseStorage = (key: string) => { removeItem(key, storageType); - const index = storageData.value.findIndex((item) => item.key === key); + const index = storageData.value.findIndex(item => item.key === key); if (index !== -1) { storageData.value.splice(index, 1); } diff --git a/src/views/dataScreen/devicemanage/components/main.vue b/src/views/dataScreen/devicemanage/components/main.vue index c4545b9..c7c6f91 100644 --- a/src/views/dataScreen/devicemanage/components/main.vue +++ b/src/views/dataScreen/devicemanage/components/main.vue @@ -372,7 +372,6 @@ onUnmounted(() => { // const arr = infoData.value[0].header_main // const obj=arr.find((item: any) => item.id === id) // const lable=obj!=undefined?`${obj.label}:${obj.value}`:'' -// debugger // return lable; // }; @@ -381,7 +380,6 @@ onUnmounted(() => { // const arr = infoData.value[0].header_main // const obj = arr.find((item: any) => item.id === id) // const lable = obj != undefined ? `${obj.label}:${obj.value}` : '' -// debugger // return lable; // }; // }); diff --git a/src/views/dataScreen/screen/components/main.vue b/src/views/dataScreen/screen/components/main.vue index 36fc422..508324f 100644 --- a/src/views/dataScreen/screen/components/main.vue +++ b/src/views/dataScreen/screen/components/main.vue @@ -306,7 +306,6 @@ mitt.on('tableMessage', (res: any) => { // } // res.data.map((item: any) => { // console.log(item) - // debugger // const index = tableData.value.findIndex((obj) => obj.id === item.id); // if (index !== -1) { // tableData.value.splice(index, 1, res.data); diff --git a/src/views/monitoring/components/header.vue b/src/views/monitoring/components/header.vue index c58eb0e..6494768 100644 --- a/src/views/monitoring/components/header.vue +++ b/src/views/monitoring/components/header.vue @@ -258,7 +258,6 @@ mitt.on('waringMessage', res => { // console.log(item.deviceName, item.alertSwitch); if (item.alertSwitch === '1') { // alarmRef.value.play(); - // debugger; // if (alarmRef.value) { // // 模拟用户点击事件 // alarmRef.value.addEventListener('canplay', () => { diff --git a/src/views/monitoring/devicemanage/components/main.vue b/src/views/monitoring/devicemanage/components/main.vue index d9967b6..48c7c65 100644 --- a/src/views/monitoring/devicemanage/components/main.vue +++ b/src/views/monitoring/devicemanage/components/main.vue @@ -372,7 +372,6 @@ onUnmounted(() => { // const arr = infoData.value[0].header_main // const obj=arr.find((item: any) => item.id === id) // const lable=obj!=undefined?`${obj.label}:${obj.value}`:'' -// debugger // return lable; // }; @@ -381,7 +380,6 @@ onUnmounted(() => { // const arr = infoData.value[0].header_main // const obj = arr.find((item: any) => item.id === id) // const lable = obj != undefined ? `${obj.label}:${obj.value}` : '' -// debugger // return lable; // }; // }); diff --git a/src/views/monitoring/screen/components/main.vue b/src/views/monitoring/screen/components/main.vue index e9586b7..3700158 100644 --- a/src/views/monitoring/screen/components/main.vue +++ b/src/views/monitoring/screen/components/main.vue @@ -315,7 +315,6 @@ mitt.on('tableMessage', (res: any) => { // } // res.data.map((item: any) => { // console.log(item) - // debugger // const index = tableData.value.findIndex((obj) => obj.id === item.id); // if (index !== -1) { // tableData.value.splice(index, 1, res.data);