nav优化
This commit is contained in:
parent
d4c1671039
commit
fbdfdfc8ea
|
|
@ -1,8 +1,7 @@
|
|||
<template>
|
||||
<!-- <h1>{{ navStore.topNavList }}</h1> -->
|
||||
<subMenu :menuList="menuInfo.menuList" :collapse="menuInfo.collapse" :backgroundColor="menuInfo.backgroundColor"
|
||||
:textColor="menuInfo.textColor" :activeTextColor="menuInfo.activeTextColor" :defaultActive="navStore.defaultActive"
|
||||
:defaultOpeneds="menuInfo.defaultOpeneds" :uniqueOpened="menuInfo.uniqueOpened" :menuTrigger="menuInfo.menuTrigger"
|
||||
:defaultOpeneds="menuInfo.defaultOpeneds" :menuTrigger="menuInfo.menuTrigger"
|
||||
:router="menuInfo.router" :collapseTransition="menuInfo.collapseTransition" :popperEffect="menuInfo.popperEffect"
|
||||
:isCustomLink="menuInfo.isCustomLink" :customLinkCallBack="menuInfo.customLinkCallBack"></subMenu>
|
||||
</template>
|
||||
|
|
@ -20,56 +19,41 @@ const menuInfo: any = reactive({
|
|||
backgroundColor: '#fff',
|
||||
textColor: "",
|
||||
activeTextColor: '',
|
||||
defaultActive: "",
|
||||
defaultOpeneds: ['staticDefault_PathParent&&配置管理'],
|
||||
defaultActive: '',
|
||||
defaultOpeneds:[],
|
||||
router: false,
|
||||
collapseTransition: true,
|
||||
menuList: list,
|
||||
isCustomLink: true,
|
||||
customLinkCallBack: (ev: any) => {
|
||||
console.log("customLinkCallBack", ev)
|
||||
if (ev.title.startsWith('staticDefault')) {
|
||||
return
|
||||
}
|
||||
// console.log("customLinkCallBack", ev)
|
||||
// if (ev.title.startsWith('staticDefault')) {
|
||||
// return
|
||||
// }
|
||||
console.log("evevevevev",ev)
|
||||
router.push({
|
||||
name: ev.path
|
||||
path: ev.path
|
||||
})
|
||||
navStore.setDefaultActive(ev)
|
||||
navStore.addNavTarget(ev)
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
onBeforeMount(() => {
|
||||
menuInfo.defaultActive = routes.path
|
||||
console.log("routes", router.getRoutes())
|
||||
initRouteList()
|
||||
|
||||
// initRouteList()
|
||||
console.log("menuInfomenuInfo",menuInfo)
|
||||
navStore.setDefaultActive(routes.path)
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
const initRouteList = () => {
|
||||
// const routeList = router.getRoutes()
|
||||
// menuInfo.menuList = routeList.find(ele=>ele.meta.routeListRoot)?.children
|
||||
// menuInfo.defaultOpeneds = menuInfo.menuList[0].path
|
||||
// console.log("menuInfo.menuList",menuInfo.menuList)
|
||||
menuInfo.defaultOpeneds.push()
|
||||
const routes: any = list
|
||||
console.log("routes", router)
|
||||
const currentNav = routes.find((ele:any)=>ele.meta.folder).children[0]
|
||||
// if (navStore.topNavList.length == 0) {
|
||||
// let firstNav = {
|
||||
// title: currentNav.meta.title,
|
||||
// name: currentNav.name,
|
||||
// path: currentNav.path
|
||||
// }
|
||||
// navStore.addNavTarget(firstNav)
|
||||
// navStore.setCurrentNav(currentNav.path)
|
||||
// }
|
||||
console.log("currentNav", currentNav)
|
||||
menuInfo.defaultActive = currentNav.name + '&&' + currentNav.meta.title
|
||||
console.log("currentNav", menuInfo.defaultActive)
|
||||
}
|
||||
// const initRouteList = () => {
|
||||
// menuInfo.defaultActive = routes.path
|
||||
// menuInfo.defaultOpeneds.push()
|
||||
// }
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<template v-for="(item) in props.menuList" :key="item.path">
|
||||
|
||||
<el-sub-menu :index="item.name+'&&'+item.meta.title" v-if="item.children && item.children.length > 0">
|
||||
<el-sub-menu :index="item.path" v-if="item.children && item.children.length > 0">
|
||||
<template #title v-if="item.meta.icon">
|
||||
<el-icon>
|
||||
<Edit />
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
<template #title v-else>{{ item.meta.title }}</template>
|
||||
<menuItem :menuList="(item.children as any)" />
|
||||
</el-sub-menu>
|
||||
<el-menu-item :index="item.name+'&&'+item.meta.title" v-else @click="handleSelectItem(item)">
|
||||
<el-menu-item :index="item.path" :id="'navItem'+item.path" v-else >
|
||||
<template v-if="item.meta.icon">
|
||||
<el-icon >
|
||||
<Search/> </el-icon>
|
||||
|
|
@ -26,11 +26,8 @@
|
|||
|
||||
|
||||
<script lang="ts" setup>
|
||||
const emits = defineEmits(['selectItem'])
|
||||
const menuInfo: any = reactive({
|
||||
list: []
|
||||
})
|
||||
|
||||
|
||||
|
||||
// 获取父组件传进来的子菜单列表
|
||||
const props = defineProps({
|
||||
menuList: {
|
||||
|
|
@ -43,9 +40,5 @@ const props = defineProps({
|
|||
}
|
||||
})
|
||||
|
||||
const handleSelectItem =(ev:any)=>{
|
||||
console.log("ev=========666",ev)
|
||||
emits("selectItem",ev)
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
@ -2,13 +2,14 @@
|
|||
<el-menu :collapse="props.collapse" :background-color="props.backgroundColor" :text-color="props.textColor"
|
||||
:active-text-color="props.activeTextColor" :default-active="props.defaultActive"
|
||||
:default-openeds="props.defaultOpeneds" :unique-opened="props.uniqueOpened" :menu-trigger="props.menuTrigger"
|
||||
:router="props.router" :collapse-transition="props.collapseTransition" :popper-effect="props.popperEffect" @select="customLinkCallBackFn" >
|
||||
:router="props.router" :collapse-transition="props.collapseTransition" :popper-effect="props.popperEffect" @select="customLinkCallBackFn($event)" >
|
||||
<menuItem :menuList="props.menuList" :isCustomLink="props.isCustomLink" >
|
||||
</menuItem>
|
||||
</el-menu>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { Console } from "console";
|
||||
import menuItem from "./menuItem.vue"
|
||||
|
||||
const props: any = defineProps({
|
||||
|
|
@ -69,10 +70,13 @@ const props: any = defineProps({
|
|||
|
||||
const customLinkCallBackFn =(ev:any)=>{
|
||||
console.log("2342423",ev)
|
||||
const current = ev.split("&&")
|
||||
let navItemStr ="navItem"+ev
|
||||
const navDom = document.getElementById(navItemStr)
|
||||
console.log("navDomnavDomnavDom",navDom)
|
||||
const currentText = navDom?.innerText
|
||||
let currentItem = {
|
||||
title:current[1],
|
||||
path:current[0]
|
||||
title:currentText,
|
||||
path:ev
|
||||
}
|
||||
props.customLinkCallBack(currentItem)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="nav_out">
|
||||
<el-tag v-for="(tag,index) in navStore.topNavList" :key="tag.name" size="large" :effect="navStore.currentNav==tag.path?'dark':'info'" closable @close="closeNavTagFn(index)" @click="TapNavTagFn(tag)" class="navItem">
|
||||
<el-tag v-for="(tag,index) in navStore.topNavList" :key="tag.name" size="small" :effect="navStore.currentNav==tag.path?'dark':'info'" closable @close="closeNavTagFn(index)" @click="TapNavTagFn(tag)" class="navItem">
|
||||
{{ tag.title }}
|
||||
</el-tag>
|
||||
</div>
|
||||
|
|
@ -31,8 +31,12 @@ const TapNavTagFn=(tag:any)=>{
|
|||
padding-left: 12px;
|
||||
background-color: #fff;
|
||||
}
|
||||
.navItem{
|
||||
:deep(.navItem) {
|
||||
margin-right:8px;
|
||||
padding: 8px 8px 8px 10px;
|
||||
.el-tag__content{
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -9,37 +9,59 @@
|
|||
<div class="right_user_opert">
|
||||
<div class="user_info">
|
||||
|
||||
|
||||
|
||||
<div class="user_name">
|
||||
<!-- 何以解忧 -->
|
||||
<!-- 何以解忧 -->
|
||||
</div>
|
||||
<div class="user_icon">
|
||||
<img src="/src/assets/img/defaultUser.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="login_opert">
|
||||
<el-button type="plain">
|
||||
<el-button type="plain" @click="loginOutFn">
|
||||
|
||||
退出登录
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
|
||||
|
||||
import { apiLogout } from 'http/api/myInfo'
|
||||
import {comNavStore} from "store/comNav"
|
||||
import { ElConfirmBeforeOpert } from "utils/elementCom"
|
||||
const navStore = comNavStore()
|
||||
const router = useRouter()
|
||||
const loginOutFn = async () => {
|
||||
const res: any = await apiLogout({})
|
||||
console.log("res===apiLogout", res)
|
||||
if (res.code == 200) {
|
||||
confirmLoginOut()
|
||||
}
|
||||
}
|
||||
const loginOut = () => {
|
||||
router.replace({
|
||||
name: "login"
|
||||
})
|
||||
navStore.clearTarget()
|
||||
}
|
||||
const confirmLoginOut = () => {
|
||||
ElConfirmBeforeOpert(
|
||||
"操作确认",
|
||||
'是否确定退出登录?',
|
||||
loginOut,
|
||||
"确定",
|
||||
'取消',
|
||||
""
|
||||
)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
|
||||
.header_top {
|
||||
height: 72px;
|
||||
background-color:#fff;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
|
@ -47,29 +69,35 @@
|
|||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.header_top_left_title{
|
||||
|
||||
.header_top_left_title {
|
||||
font-size: 32px;
|
||||
color: #0960bd;
|
||||
}
|
||||
.right_user_opert{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
.user_info{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
.user_icon{
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
border-radius:50%;
|
||||
// border: 2px solid #ccc;
|
||||
margin: 0 12px;
|
||||
img{ width: 42px;
|
||||
height: 42px;
|
||||
|
||||
.right_user_opert {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
|
||||
.user_info {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
|
||||
.user_icon {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
border-radius: 50%;
|
||||
// border: 2px solid #ccc;
|
||||
margin: 0 12px;
|
||||
|
||||
img {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,7 +1,13 @@
|
|||
import { post } from '../index'
|
||||
import { get, post ,detele} from '../index'
|
||||
|
||||
// 登录接口
|
||||
|
||||
export const loginApi = (data: any) => {
|
||||
return post('/zlpt-auth/login', data)
|
||||
}
|
||||
}
|
||||
|
||||
// 登录接口
|
||||
|
||||
export const apiLogout = (data: any) => {
|
||||
return detele('/zlpt-auth/logout', data)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
|
||||
import {useStore} from "store/main"
|
||||
const routes: Array<RouteRecordRaw> = [
|
||||
|
||||
{
|
||||
path: '/',
|
||||
name: 'home',
|
||||
|
|
@ -13,7 +12,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
routeListRoot: true
|
||||
},
|
||||
children: [],
|
||||
redirect: '/index/enterpriseType',
|
||||
|
||||
},
|
||||
{
|
||||
path: '/index',
|
||||
|
|
@ -28,7 +27,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
},
|
||||
children: [
|
||||
{
|
||||
path: 'swiperConfig',
|
||||
path:'configManage/swiperConfig',
|
||||
name: 'swiperConfig',
|
||||
component: () => import('views/configuration/swiperConfig/index.vue'),
|
||||
meta: {
|
||||
|
|
@ -40,7 +39,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
|
||||
},
|
||||
{
|
||||
path: 'specialInformationConfiguration',
|
||||
path:'configManage/specialInformationConfiguration',
|
||||
name: 'specialInformationConfiguration',
|
||||
component: () => import('views/configuration/specialInformationConfiguration/index.vue'),
|
||||
meta: {
|
||||
|
|
@ -50,7 +49,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
}
|
||||
},
|
||||
{
|
||||
path: 'privacyAgreement',
|
||||
path:'configManage/privacyAgreement',
|
||||
name: 'privacyAgreement',
|
||||
component: () => import('views/configuration/privacyAgreement/index.vue'),
|
||||
meta: {
|
||||
|
|
@ -61,7 +60,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
},
|
||||
|
||||
{
|
||||
path: 'enterpriseManagement',
|
||||
path:'enterpriseTypeManage',
|
||||
name: 'enterpriseManagement',
|
||||
component: () => import('views/enterpriseManagement/index.vue'),
|
||||
meta: {
|
||||
|
|
@ -72,7 +71,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
},
|
||||
|
||||
{
|
||||
path: 'enterpriseType',
|
||||
path:'enterpriseTypeManage/enterpriseType',
|
||||
name: 'enterpriseType',
|
||||
component: () => import('views/enterpriseManagement/enterpriseType/index.vue'),
|
||||
meta: {
|
||||
|
|
@ -82,7 +81,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
}
|
||||
},
|
||||
{
|
||||
path: 'enterpriseEntryReview',
|
||||
path:'enterpriseTypeManage/enterpriseEntryReview',
|
||||
name: 'enterpriseEntryReview',
|
||||
component: () => import('views/enterpriseManagement/enterpriseEntryReview/index.vue'),
|
||||
meta: {
|
||||
|
|
@ -93,7 +92,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
|
||||
},
|
||||
{
|
||||
path: 'businessReview',
|
||||
path:'enterpriseTypeManage/businessReview',
|
||||
name: 'businessReview',
|
||||
component: () => import('views/enterpriseManagement/businessReview/index.vue'),
|
||||
meta: {
|
||||
|
|
@ -103,7 +102,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
}
|
||||
},
|
||||
{
|
||||
path: 'enterpriseInfo',
|
||||
path:'enterpriseTypeManage/enterpriseInfo',
|
||||
name: 'enterpriseInfo',
|
||||
component: () => import('views/enterpriseManagement/enterpriseInfo/index.vue'),
|
||||
meta: {
|
||||
|
|
@ -114,7 +113,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
},
|
||||
// 企业装备管理
|
||||
{
|
||||
path: 'equipmentTypeTemplate',
|
||||
path:'enterpriseEquipmentManage/equipmentTypeTemplate',
|
||||
name: 'equipmentTypeTemplate',
|
||||
component: () => import('views/enterpriseEquipmentManage/equipmentTypeTemplate/index.vue'),
|
||||
meta: {
|
||||
|
|
@ -125,7 +124,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
|
||||
},
|
||||
{
|
||||
path: 'equipmentListingApproval',
|
||||
path:'enterpriseEquipmentManage/equipmentListingApproval',
|
||||
name: 'equipmentListingApproval',
|
||||
component: () => import('views/enterpriseEquipmentManage/equipmentListingApproval/index.vue'),
|
||||
meta: {
|
||||
|
|
@ -135,7 +134,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
}
|
||||
},
|
||||
{
|
||||
path: 'iotEquipmentManagement',
|
||||
path:'enterpriseEquipmentManage/iotEquipmentManagement',
|
||||
name: 'iotEquipmentManagement',
|
||||
component: () => import('views/enterpriseEquipmentManage/iotEquipmentManagement/index.vue'),
|
||||
meta: {
|
||||
|
|
@ -144,19 +143,10 @@ const routes: Array<RouteRecordRaw> = [
|
|||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'orderManagement',
|
||||
name: 'orderManagement',
|
||||
component: () => import('views/enterpriseEquipmentManage/iotEquipmentManagement/index.vue'),
|
||||
meta: {
|
||||
title: 'iot设备管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: "orderManagement",
|
||||
path: 'orderManagement',
|
||||
path:'orderManagement',
|
||||
component: () => import('views/orderManagement/index.vue'),
|
||||
meta: {
|
||||
title: '订单管理',
|
||||
|
|
@ -168,7 +158,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
// 111
|
||||
{
|
||||
name: "systemVersion",
|
||||
path: 'systemVersion',
|
||||
path:'systemManage/systemVersion',
|
||||
component: () => import('views/systemManage/systemVersion/index.vue'),
|
||||
meta: {
|
||||
title: '系统版本管理',
|
||||
|
|
@ -179,7 +169,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
},
|
||||
{
|
||||
name: "userManage",
|
||||
path: 'userManage',
|
||||
path:'systemManage/userManage',
|
||||
component: () => import('views/systemManage/userManage/index.vue'),
|
||||
meta: {
|
||||
title: '用户管理',
|
||||
|
|
@ -191,18 +181,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
|
||||
{
|
||||
name: "systemLog",
|
||||
path: 'systemLog',
|
||||
component: () => import('views/systemManage/systemLog/index.vue'),
|
||||
meta: {
|
||||
title: '系统日志',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
},
|
||||
children: []
|
||||
},
|
||||
{
|
||||
name: "systemLog",
|
||||
path: 'systemLog',
|
||||
path:'systemManage/systemLog',
|
||||
component: () => import('views/systemManage/systemLog/index.vue'),
|
||||
meta: {
|
||||
title: '系统日志',
|
||||
|
|
@ -211,9 +190,10 @@ const routes: Array<RouteRecordRaw> = [
|
|||
},
|
||||
children: []
|
||||
},
|
||||
|
||||
{
|
||||
name: "entryAuditDetails",
|
||||
path: 'entryAuditDetails',
|
||||
path: 'enterpriseManagement/entryAuditDetails',
|
||||
component: () => import('views/enterpriseManagement/enterpriseEntryReview/details.vue'),
|
||||
meta: {
|
||||
title: '审批详情',
|
||||
|
|
@ -224,7 +204,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
},
|
||||
{
|
||||
name: "businessReviewDetails",
|
||||
path: 'businessReviewDetails',
|
||||
path: 'enterpriseManagement/businessReviewDetails',
|
||||
component: () => import('views/enterpriseManagement/businessReview/details.vue'),
|
||||
meta: {
|
||||
title: '审批详情',
|
||||
|
|
@ -234,7 +214,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
children: []
|
||||
}, {
|
||||
name: "enterpriseInfoDetails",
|
||||
path: 'enterpriseInfoDetails',
|
||||
path: 'enterpriseManagement/enterpriseInfoDetails',
|
||||
component: () => import('views/enterpriseManagement/enterpriseInfo/details.vue'),
|
||||
meta: {
|
||||
title: '审批详情',
|
||||
|
|
@ -244,7 +224,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
children: []
|
||||
}, {
|
||||
name: "lonLatPick",
|
||||
path: 'lonLatPick',
|
||||
path: 'systemManage/lonLatPick',
|
||||
component: () => import('views/enterpriseManagement/lonLatPick/index.vue'),
|
||||
meta: {
|
||||
title: '经纬度拾取',
|
||||
|
|
@ -256,9 +236,9 @@ const routes: Array<RouteRecordRaw> = [
|
|||
]
|
||||
},
|
||||
{
|
||||
name: "Login",
|
||||
path: '/Login',
|
||||
component: () => import('views/Login.vue'),
|
||||
name: "login",
|
||||
path: '/login',
|
||||
component: () => import('views/login.vue'),
|
||||
meta: {
|
||||
title: '登录',
|
||||
keepAlive: true,
|
||||
|
|
|
|||
|
|
@ -1,204 +0,0 @@
|
|||
export const list: any = [
|
||||
{
|
||||
name: "configManage",
|
||||
path:'/index/configManage',
|
||||
meta: {
|
||||
title: '配置管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path:'/index/configManage/swiperConfig',
|
||||
name: 'swiperConfig',
|
||||
component: 'views/configuration/swiperConfig.vue',
|
||||
meta: {
|
||||
title: '轮播图配置',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path:'/index/configManage/specialInformationConfiguration',
|
||||
name: 'specialInformationConfiguration',
|
||||
component: 'views/configuration/specialInformationConfiguration/index.vue',
|
||||
meta: {
|
||||
title: '专题资讯配置',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path:'/index/configManage/privacyAgreement',
|
||||
name: 'privacyAgreement',
|
||||
component: 'views/configuration/privacyAgreement/index.vue',
|
||||
meta: {
|
||||
title: '隐私协议模板管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "企业管理",
|
||||
path:'/index/enterpriseTypeManage',
|
||||
meta: {
|
||||
title: '企业管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
},
|
||||
children: [
|
||||
|
||||
|
||||
{
|
||||
path:'/index/enterpriseTypeManage/enterpriseType',
|
||||
name: 'configuration',
|
||||
component: 'views/enterpriseManagement/enterpriseType/index.vue',
|
||||
meta: {
|
||||
title: '企业类型',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path:'/index/enterpriseTypeManage/enterpriseEntryReview',
|
||||
name: 'enterpriseEntryReview',
|
||||
component: 'views/enterpriseManagement/enterpriseEntryReview/index.vue',
|
||||
meta: {
|
||||
title: '企业入驻审核',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
},
|
||||
|
||||
},
|
||||
{
|
||||
path:'/index/enterpriseTypeManage/businessReview',
|
||||
name: 'businessReview',
|
||||
component: 'views/enterpriseManagement/businessReview/index.vue',
|
||||
meta: {
|
||||
title: '企业业务开通审核',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path:'/index/enterpriseTypeManage/enterpriseInfo',
|
||||
name: 'enterpriseInfo',
|
||||
component: 'views/enterpriseManagement/enterpriseInfo/index.vue',
|
||||
meta: {
|
||||
title: '企业信息',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "企业装备管理",
|
||||
path:'/index/enterpriseEquipmentManage',
|
||||
meta: {
|
||||
title: '企业装备管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path:'/index/enterpriseEquipmentManage/equipmentTypeTemplate',
|
||||
name: 'equipmentTypeTemplate',
|
||||
component: 'views/enterpriseEquipmentManage/equipmentTypeTemplate/index.vue',
|
||||
meta: {
|
||||
title: '装备类型模板',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
path:'/index/enterpriseEquipmentManage/equipmentListingApproval',
|
||||
name: 'equipmentListingApproval',
|
||||
component: 'views/enterpriseEquipmentManage/equipmentListingApproval/index.vue',
|
||||
meta: {
|
||||
title: '装备上架审批',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
},
|
||||
|
||||
},
|
||||
// iotEquipmentManagement
|
||||
{
|
||||
path:'/index/enterpriseEquipmentManage/iotEquipmentManagement',
|
||||
name: 'iotEquipmentManagement',
|
||||
component: 'views/enterpriseEquipmentManage/iotEquipmentManagement/index.vue',
|
||||
meta: {
|
||||
title: 'iot设备管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "orderManagement",
|
||||
path:'/index/orderManagement',
|
||||
component: 'views/orderManagement/index.vue',
|
||||
meta: {
|
||||
title: '订单管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
},
|
||||
children: []
|
||||
},
|
||||
{
|
||||
name: "systemManage",
|
||||
path:'/index/systemManage',
|
||||
meta: {
|
||||
title: '系统管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path:'/index/systemManage/systemVersion',
|
||||
name: 'systemVersion',
|
||||
component: 'views/systemManage/systemVersion/index.vue',
|
||||
meta: {
|
||||
title: '系统版本管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path:'/index/systemManage/userManage',
|
||||
name: 'userManage',
|
||||
component: 'views/systemManage/userManage/index.vue',
|
||||
meta: {
|
||||
title: '用户管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
} ,
|
||||
{
|
||||
path:'/index/systemManage/systemLog',
|
||||
name: 'systemLog',
|
||||
component: 'views/systemManage/systemLog/index.vue',
|
||||
meta: {
|
||||
title: '系统日志',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
} ,
|
||||
{
|
||||
name: "lonLatPick",
|
||||
path: 'lonLatPick',
|
||||
component: () => import('views/enterpriseManagement/lonLatPick/index.vue'),
|
||||
meta: {
|
||||
title: '经纬度拾取',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
]
|
||||
|
|
@ -1,61 +1,57 @@
|
|||
export const list: any = [
|
||||
// {
|
||||
// name: "configManage",
|
||||
// path:'/index/configManage',
|
||||
// meta: {
|
||||
// title: '配置管理',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path:'/index/configManage/swiperConfig',
|
||||
// name: 'swiperConfig',
|
||||
// component: 'views/configuration/swiperConfig.vue',
|
||||
// meta: {
|
||||
// title: '轮播图配置',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path:'/index/configManage/specialInformationConfiguration',
|
||||
// name: 'specialInformationConfiguration',
|
||||
// component: 'views/configuration/specialInformationConfiguration/index.vue',
|
||||
// meta: {
|
||||
// title: '专题资讯配置',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path:'/index/configManage/privacyAgreement',
|
||||
// name: 'privacyAgreement',
|
||||
// component: 'views/configuration/privacyAgreement/index.vue',
|
||||
// meta: {
|
||||
// title: '隐私协议模板管理',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// }
|
||||
// },
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
name: "enterpriseTypeManage",
|
||||
path:'/index/enterpriseTypeManage',
|
||||
name: "configManage",
|
||||
path: '/index/configManage/swiperConfig',
|
||||
meta: {
|
||||
title: '配置管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true,
|
||||
folder: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '/index/configManage/swiperConfig',
|
||||
name: 'swiperConfig',
|
||||
meta: {
|
||||
title: '轮播图配置',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/index/configManage/specialInformationConfiguration',
|
||||
name: 'specialInformationConfiguration',
|
||||
meta: {
|
||||
title: '专题资讯配置',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/index/configManage/privacyAgreement',
|
||||
name: 'privacyAgreement',
|
||||
meta: {
|
||||
title: '隐私协议模板管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "企业管理",
|
||||
path: '/index/enterpriseTypeManage/enterpriseType',
|
||||
meta: {
|
||||
title: '企业管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true,
|
||||
folder:true
|
||||
folder: true
|
||||
},
|
||||
children: [
|
||||
|
||||
|
||||
{
|
||||
path:'/index/enterpriseTypeManage/enterpriseType',
|
||||
path: '/index/enterpriseTypeManage/enterpriseType',
|
||||
name: 'enterpriseType',
|
||||
component: 'views/enterpriseManagement/enterpriseType/index.vue',
|
||||
meta: {
|
||||
title: '企业类型',
|
||||
keepAlive: true,
|
||||
|
|
@ -63,9 +59,9 @@ export const list: any = [
|
|||
}
|
||||
},
|
||||
{
|
||||
path:'/index/enterpriseTypeManage/enterpriseEntryReview',
|
||||
path: '/index/enterpriseTypeManage/enterpriseEntryReview',
|
||||
name: 'enterpriseEntryReview',
|
||||
component: 'views/enterpriseManagement/enterpriseEntryReview/index.vue',
|
||||
|
||||
meta: {
|
||||
title: '企业入驻审核',
|
||||
keepAlive: true,
|
||||
|
|
@ -74,9 +70,9 @@ export const list: any = [
|
|||
|
||||
},
|
||||
{
|
||||
path:'/index/enterpriseTypeManage/businessReview',
|
||||
path: '/index/enterpriseTypeManage/businessReview',
|
||||
name: 'businessReview',
|
||||
component: 'views/enterpriseManagement/businessReview/index.vue',
|
||||
|
||||
meta: {
|
||||
title: '企业业务开通审核',
|
||||
keepAlive: true,
|
||||
|
|
@ -84,9 +80,8 @@ export const list: any = [
|
|||
}
|
||||
},
|
||||
{
|
||||
path:'/index/enterpriseTypeManage/enterpriseInfo',
|
||||
path: '/index/enterpriseTypeManage/enterpriseInfo',
|
||||
name: 'enterpriseInfo',
|
||||
component: 'views/enterpriseManagement/enterpriseInfo/index.vue',
|
||||
meta: {
|
||||
title: '企业信息',
|
||||
keepAlive: true,
|
||||
|
|
@ -97,29 +92,27 @@ export const list: any = [
|
|||
},
|
||||
{
|
||||
name: "企业装备管理",
|
||||
path:'/index/enterpriseEquipmentManage',
|
||||
path: '/index/enterpriseEquipmentManage/equipmentTypeTemplate',
|
||||
meta: {
|
||||
title: '企业装备管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true,
|
||||
folder:true
|
||||
folder: true
|
||||
},
|
||||
children: [
|
||||
// {
|
||||
// path:'/index/enterpriseEquipmentManage/equipmentTypeTemplate',
|
||||
// name: 'equipmentTypeTemplate',
|
||||
// component: 'views/enterpriseEquipmentManage/equipmentTypeTemplate/index.vue',
|
||||
// meta: {
|
||||
// title: '装备类型模板',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// }
|
||||
// },
|
||||
|
||||
{
|
||||
path:'/index/enterpriseEquipmentManage/equipmentListingApproval',
|
||||
path: '/index/enterpriseEquipmentManage/equipmentTypeTemplate',
|
||||
name: 'equipmentTypeTemplate',
|
||||
meta: {
|
||||
title: '装备类型模板',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
path: '/index/enterpriseEquipmentManage/equipmentListingApproval',
|
||||
name: 'equipmentListingApproval',
|
||||
component: 'views/enterpriseEquipmentManage/equipmentListingApproval/index.vue',
|
||||
meta: {
|
||||
title: '装备上架审批',
|
||||
keepAlive: true,
|
||||
|
|
@ -128,79 +121,75 @@ export const list: any = [
|
|||
|
||||
},
|
||||
// iotEquipmentManagement
|
||||
// {
|
||||
// path:'/index/enterpriseEquipmentManage/iotEquipmentManagement',
|
||||
// name: 'iotEquipmentManagement',
|
||||
// component: 'views/enterpriseEquipmentManage/iotEquipmentManagement/index.vue',
|
||||
// meta: {
|
||||
// title: 'iot设备管理',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// }
|
||||
// }
|
||||
{
|
||||
path: '/index/enterpriseEquipmentManage/iotEquipmentManagement',
|
||||
name: 'iotEquipmentManagement',
|
||||
meta: {
|
||||
title: 'iot设备管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// name: "orderManagement",
|
||||
// path:'/index/orderManagement',
|
||||
// component: 'views/orderManagement/index.vue',
|
||||
// meta: {
|
||||
// title: '订单管理',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// },
|
||||
// children: []
|
||||
// },
|
||||
// {
|
||||
// name: "systemManage",
|
||||
// path:'/index/systemManage',
|
||||
// meta: {
|
||||
// title: '系统管理',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path:'/index/systemManage/systemVersion',
|
||||
// name: 'systemVersion',
|
||||
// component: 'views/systemManage/systemVersion/index.vue',
|
||||
// meta: {
|
||||
// title: '系统版本管理',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path:'/index/systemManage/userManage',
|
||||
// name: 'userManage',
|
||||
// component: 'views/systemManage/userManage/index.vue',
|
||||
// meta: {
|
||||
// title: '用户管理',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// }
|
||||
// } ,
|
||||
// {
|
||||
// path:'/index/systemManage/systemLog',
|
||||
// name: 'systemLog',
|
||||
// component: 'views/systemManage/systemLog/index.vue',
|
||||
// meta: {
|
||||
// title: '系统日志',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// }
|
||||
// } ,
|
||||
// {
|
||||
// name: "lonLatPick",
|
||||
// path: 'lonLatPick',
|
||||
// component: () => import('views/enterpriseManagement/lonLatPick/index.vue'),
|
||||
// meta: {
|
||||
// title: '经纬度拾取',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// },
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
{
|
||||
name: "orderManagement",
|
||||
path: '/index/orderManagement',
|
||||
meta: {
|
||||
title: '订单管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true,
|
||||
folder: true
|
||||
},
|
||||
children: []
|
||||
},
|
||||
{
|
||||
name: "systemManage",
|
||||
path: '/index/systemManage/systemVersion',
|
||||
meta: {
|
||||
title: '系统管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true,
|
||||
folder: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '/index/systemManage/systemVersion',
|
||||
name: 'systemVersion',
|
||||
meta: {
|
||||
title: '系统版本管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/index/systemManage/userManage',
|
||||
name: 'userManage',
|
||||
meta: {
|
||||
title: '用户管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/index/systemManage/systemLog',
|
||||
name: 'systemLog',
|
||||
meta: {
|
||||
title: '系统日志',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "lonLatPick",
|
||||
path: '/index/systemManage/lonLatPick',
|
||||
meta: {
|
||||
title: '经纬度拾取',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
]
|
||||
|
|
@ -0,0 +1,206 @@
|
|||
export const list: any = [
|
||||
// {
|
||||
// name: "configManage",
|
||||
// path:'/index/configManage',
|
||||
// meta: {
|
||||
// title: '配置管理',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path:'/index/configManage/swiperConfig',
|
||||
// name: 'swiperConfig',
|
||||
// component: 'views/configuration/swiperConfig.vue',
|
||||
// meta: {
|
||||
// title: '轮播图配置',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path:'/index/configManage/specialInformationConfiguration',
|
||||
// name: 'specialInformationConfiguration',
|
||||
// component: 'views/configuration/specialInformationConfiguration/index.vue',
|
||||
// meta: {
|
||||
// title: '专题资讯配置',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path:'/index/configManage/privacyAgreement',
|
||||
// name: 'privacyAgreement',
|
||||
// component: 'views/configuration/privacyAgreement/index.vue',
|
||||
// meta: {
|
||||
// title: '隐私协议模板管理',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// }
|
||||
// },
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
name: "enterpriseTypeManage",
|
||||
path:'/index/enterpriseTypeManage',
|
||||
meta: {
|
||||
title: '企业管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true,
|
||||
folder:true
|
||||
},
|
||||
children: [
|
||||
|
||||
|
||||
{
|
||||
path:'/index/enterpriseTypeManage/enterpriseType',
|
||||
name: 'enterpriseType',
|
||||
component: 'views/enterpriseManagement/enterpriseType/index.vue',
|
||||
meta: {
|
||||
title: '企业类型',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path:'/index/enterpriseTypeManage/enterpriseEntryReview',
|
||||
name: 'enterpriseEntryReview',
|
||||
component: 'views/enterpriseManagement/enterpriseEntryReview/index.vue',
|
||||
meta: {
|
||||
title: '企业入驻审核',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
},
|
||||
|
||||
},
|
||||
{
|
||||
path:'/index/enterpriseTypeManage/businessReview',
|
||||
name: 'businessReview',
|
||||
component: 'views/enterpriseManagement/businessReview/index.vue',
|
||||
meta: {
|
||||
title: '企业业务开通审核',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path:'/index/enterpriseTypeManage/enterpriseInfo',
|
||||
name: 'enterpriseInfo',
|
||||
component: 'views/enterpriseManagement/enterpriseInfo/index.vue',
|
||||
meta: {
|
||||
title: '企业信息',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "企业装备管理",
|
||||
path:'/index/enterpriseEquipmentManage',
|
||||
meta: {
|
||||
title: '企业装备管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: true,
|
||||
folder:true
|
||||
},
|
||||
children: [
|
||||
// {
|
||||
// path:'/index/enterpriseEquipmentManage/equipmentTypeTemplate',
|
||||
// name: 'equipmentTypeTemplate',
|
||||
// component: 'views/enterpriseEquipmentManage/equipmentTypeTemplate/index.vue',
|
||||
// meta: {
|
||||
// title: '装备类型模板',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// }
|
||||
// },
|
||||
|
||||
{
|
||||
path:'/index/enterpriseEquipmentManage/equipmentListingApproval',
|
||||
name: 'equipmentListingApproval',
|
||||
component: 'views/enterpriseEquipmentManage/equipmentListingApproval/index.vue',
|
||||
meta: {
|
||||
title: '装备上架审批',
|
||||
keepAlive: true,
|
||||
AuthFlag: true
|
||||
},
|
||||
|
||||
},
|
||||
// iotEquipmentManagement
|
||||
// {
|
||||
// path:'/index/enterpriseEquipmentManage/iotEquipmentManagement',
|
||||
// name: 'iotEquipmentManagement',
|
||||
// component: 'views/enterpriseEquipmentManage/iotEquipmentManagement/index.vue',
|
||||
// meta: {
|
||||
// title: 'iot设备管理',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// }
|
||||
// }
|
||||
]
|
||||
},
|
||||
// {
|
||||
// name: "orderManagement",
|
||||
// path:'/index/orderManagement',
|
||||
// component: 'views/orderManagement/index.vue',
|
||||
// meta: {
|
||||
// title: '订单管理',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// },
|
||||
// children: []
|
||||
// },
|
||||
// {
|
||||
// name: "systemManage",
|
||||
// path:'/index/systemManage',
|
||||
// meta: {
|
||||
// title: '系统管理',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path:'/index/systemManage/systemVersion',
|
||||
// name: 'systemVersion',
|
||||
// component: 'views/systemManage/systemVersion/index.vue',
|
||||
// meta: {
|
||||
// title: '系统版本管理',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path:'/index/systemManage/userManage',
|
||||
// name: 'userManage',
|
||||
// component: 'views/systemManage/userManage/index.vue',
|
||||
// meta: {
|
||||
// title: '用户管理',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// }
|
||||
// } ,
|
||||
// {
|
||||
// path:'/index/systemManage/systemLog',
|
||||
// name: 'systemLog',
|
||||
// component: 'views/systemManage/systemLog/index.vue',
|
||||
// meta: {
|
||||
// title: '系统日志',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// }
|
||||
// } ,
|
||||
// {
|
||||
// name: "lonLatPick",
|
||||
// path: 'lonLatPick',
|
||||
// component: () => import('views/enterpriseManagement/lonLatPick/index.vue'),
|
||||
// meta: {
|
||||
// title: '经纬度拾取',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: true
|
||||
// },
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
|
||||
]
|
||||
|
|
@ -26,16 +26,19 @@ export const comNavStore = defineStore('main_com_nav', {
|
|||
}
|
||||
this.currentNav = this.topNavList[index]
|
||||
},
|
||||
clearTarget(val: any) {
|
||||
clearTarget() {
|
||||
this.topNavList = []
|
||||
this.currentNav=''
|
||||
this.defaultActive=""
|
||||
},
|
||||
setCurrentNav(ev:any){
|
||||
console.log("setCurrentNav00",ev)
|
||||
this.currentNav = ev
|
||||
|
||||
} ,
|
||||
setDefaultActive(ev:any){
|
||||
console.log("setCurrentNav")
|
||||
this.defaultActive = ev.path+'&&'+ev.title
|
||||
this.defaultActive = ev
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ export const useStore = defineStore('main', {
|
|||
state: () => {
|
||||
return {
|
||||
loadingFlag: false, //loading控制,
|
||||
token: ""
|
||||
token: "",
|
||||
userInfo:{}
|
||||
}
|
||||
},
|
||||
getters: {},
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
export const useStore = defineStore('myInfo', {
|
||||
state: () => {
|
||||
return {
|
||||
userName: '99'
|
||||
}
|
||||
},
|
||||
getters: {
|
||||
textConbain: (state) => state.userName + '4444',
|
||||
textEnd() {
|
||||
return this.textConbain + '666'
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
updateText() {
|
||||
console.log('updateText')
|
||||
}
|
||||
},
|
||||
persist: {
|
||||
enabled: true, // 开启数据缓存
|
||||
strategies: [
|
||||
{
|
||||
// 自定义存储的 key,默认是 store.$id
|
||||
key: 'userName',
|
||||
storage: sessionStorage, //缓存模式 可选 localStorage sessionStorage
|
||||
// state 中的字段名,按组打包储存
|
||||
paths: ['userName'] //需要缓存的字段 与 state中相关联
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
|
|
@ -65,9 +65,10 @@ import headerNav from "components/headerCom/headerNav.vue"
|
|||
|
||||
.view_out_c {
|
||||
|
||||
width:calc(100% - 24px) ;
|
||||
width:calc(100% - 12px) ;
|
||||
flex: 1;
|
||||
margin: 12px;
|
||||
margin-left:0;
|
||||
display:flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue