优化驾驶舱页面
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-model="dialogVisible" title="设置" width="600">
|
||||
<el-dialog v-model="dialogVisible" title="自定义功能管理" width="600">
|
||||
<div style="display: flex; justify-content: end" class="mb10">
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
</div>
|
||||
@@ -52,12 +52,13 @@ import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import { getDashboardPageByUserId, deleteDashboard, activatePage } from '@/api/system-boot/csstatisticalset'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
|
||||
import { useNavTabs } from '@/stores/navTabs'
|
||||
import { getMenu } from '@/utils/router'
|
||||
|
||||
const { push } = useRouter()
|
||||
const dialogVisible = ref(false)
|
||||
const route = useRouter()
|
||||
const navTabs = useNavTabs()
|
||||
const adminInfo = useAdminInfo()
|
||||
const pageList: any = ref([])
|
||||
|
||||
@@ -92,7 +93,7 @@ const beforeChange = (row: any): Promise<boolean> => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
activatePage({ id: row.id, state: row.state == 0 ? 1 : 0 }).then((res: any) => {
|
||||
activatePage({ id: row.id, state: row.state == 0 ? 1 : 0 }).then( async(res: any) => {
|
||||
if (res.code == 'A0000') {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
@@ -101,7 +102,11 @@ const beforeChange = (row: any): Promise<boolean> => {
|
||||
}
|
||||
init()
|
||||
resolve(true)
|
||||
getMenu()
|
||||
await getMenu()
|
||||
await setTimeout(() => {
|
||||
navTabs.refresh()
|
||||
}, 1000)
|
||||
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
Reference in New Issue
Block a user