Browse Source

问题修复

develop
fuguobin 8 months ago
parent
commit
ad654ff121
  1. 6
      src/types/auto-imports.d.ts
  2. 13
      src/views/monitoring/components/menu.vue
  3. 2
      src/views/monitoring/screenData/components/header.vue
  4. 2
      src/views/monitoring/screenData/components/main.vue

6
src/types/auto-imports.d.ts

@ -2,6 +2,9 @@
export {} export {}
declare global { declare global {
const EffectScope: typeof import('vue')['EffectScope'] const EffectScope: typeof import('vue')['EffectScope']
const ElMessage: typeof import('element-plus/es')['ElMessage']
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']
const ElNotification: typeof import('element-plus/es')['ElNotification']
const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
const autoResetRef: typeof import('@vueuse/core')['autoResetRef'] const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
const computed: typeof import('vue')['computed'] const computed: typeof import('vue')['computed']
@ -268,6 +271,9 @@ import { UnwrapRef } from 'vue'
declare module 'vue' { declare module 'vue' {
interface ComponentCustomProperties { interface ComponentCustomProperties {
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']> readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']>
readonly ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']>
readonly ElNotification: UnwrapRef<typeof import('element-plus/es')['ElNotification']>
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']> readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']> readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
readonly computed: UnwrapRef<typeof import('vue')['computed']> readonly computed: UnwrapRef<typeof import('vue')['computed']>

13
src/views/monitoring/components/menu.vue

@ -58,7 +58,7 @@ onMounted(() => {
function menuApi() { function menuApi() {
// //
getMenu().then((res: any) => { getMenu().then((res: any) => {
if (res.code === 200) { if (res.code === 200 && res.data.length != 0) {
menuDeptKey.value = menuDeptKey.value =
routerType.value === '1' routerType.value === '1'
? deptId.value ? deptId.value
@ -71,13 +71,17 @@ function menuApi() {
sessionStorageIns.setUseStorage('deptId', menuDeptKey.value); sessionStorageIns.setUseStorage('deptId', menuDeptKey.value);
mitt.emit('menuKey', menuDeptKey.value); mitt.emit('menuKey', menuDeptKey.value);
emit('tableMenuData', res.data); emit('tableMenuData', res.data);
} else {
menuDeptKey.value = 0;
selectedKey.value = menuDeptKey.value;
sessionStorageIns.setUseStorage('deptId', menuDeptKey.value);
} }
}); });
} }
function comMenuApi() { function comMenuApi() {
// //
getMenuData().then((res: any) => { getMenuData().then((res: any) => {
if (res.code === 200) { if (res.code === 200 && res.data.length != 0) {
menuIdKey.value = menuIdKey.value =
routerType.value === '1' routerType.value === '1'
? id.value ? id.value
@ -91,6 +95,11 @@ function comMenuApi() {
sessionStorageIns.setUseStorage('deptId', routerType.value === '1' ? deptId.value : parentId); sessionStorageIns.setUseStorage('deptId', routerType.value === '1' ? deptId.value : parentId);
mitt.emit('deviceMenuKey', menuIdKey.value); mitt.emit('deviceMenuKey', menuIdKey.value);
emit('tableMenuData', res.data); emit('tableMenuData', res.data);
} else {
menuIdKey.value = 0;
selectedKey.value = menuIdKey.value;
sessionStorageIns.setUseStorage('id', menuIdKey.value);
sessionStorageIns.setUseStorage('deptId', menuIdKey.value);
} }
}); });
} }

2
src/views/monitoring/screenData/components/header.vue

@ -1,6 +1,6 @@
<template> <template>
<div class="title"> <div class="title">
<h3>{{ titleData }}</h3> <h3>联美集团数字化运营平台</h3>
</div> </div>
<div class="weather"> <div class="weather">
<div class="users">{{ timePeriod }} {{ userStore.nickname }}</div> <div class="users">{{ timePeriod }} {{ userStore.nickname }}</div>

2
src/views/monitoring/screenData/components/main.vue

@ -565,7 +565,7 @@ function nameClick(row: any) {
// //
console.log(row); console.log(row);
sessionStorageIns.setUseStorage('id', row.id); sessionStorageIns.setUseStorage('id', row.id);
router.push({ path: '/devicemanage', query: { id: row.id } }); // router.push({ path: '/devicemanage', query: { id: row.id } });
} }
const resetEvent: VxeFormEvents.Reset = () => { const resetEvent: VxeFormEvents.Reset = () => {

Loading…
Cancel
Save