添加菜单

master
夜笙歌 1 month ago
parent 684ac2ed20
commit 2a9b6ab954

@ -1,11 +1,13 @@
<template> <template>
<div class="menu"> <div class="menu">
<div v-for="(i,k) in menuList" :class="`menuItem ${$route.path === i.path ? 'focus':''}`" @mouseenter="getChildren(i)" @click="toLink((i.children||[]).length===0 ? i.path:'')"> <div v-for="(i,k) in menuList" :class="`menuItem ${$route.path === i.path ? 'focus':''}`"
<div :class="`name `" >{{ i.name }}</div> @mouseenter="getChildren(i)" @click="toLink((i.children||[]).length===0 ? i.path:'')">
<div :class="`name `">{{ i.name }}</div>
<div class="line"></div> <div class="line"></div>
</div> </div>
<div class="subMenu" v-if="(subMenuList||[]).length>0" @mouseleave="clearChildren"> <div class="subMenu" v-if="(subMenuList||[]).length>0" @mouseleave="clearChildren">
<div :class="`topMenuItem${$route.fullPath === ii.path ? ' active':''}`" v-for="(ii,k) in subMenuList" @click="toLink(ii.path)"> <div :class="`topMenuItem${$route.fullPath === ii.path ? ' active':''}`" v-for="(ii,k) in subMenuList"
@click="toLink(ii.path)">
<div class="icon"> <div class="icon">
<img :src="ii.icon" alt="" style="width: 1.8vw;height: 1.8vw;object-fit: contain"> <img :src="ii.icon" alt="" style="width: 1.8vw;height: 1.8vw;object-fit: contain">
</div> </div>
@ -35,13 +37,18 @@ export default {
name: '首页', name: '首页',
path: '/index' path: '/index'
}, },
{
name: '关于海威',
path: '/productCenter/industrialInternet',
children: []
},
{ {
name: '产品中心', name: '产品中心',
path: '/productCenter/industrialInternet', path: '/productCenter/industrialInternet',
children: [] children: []
}, },
{ {
name: '例与客户', name: '行业方案',
path: '/casesAndClients/IOT', path: '/casesAndClients/IOT',
children: [] children: []
}, },
@ -50,7 +57,7 @@ export default {
// path: '/newsCenter' // path: '/newsCenter'
// }, // },
{ {
name: '关于我们', name: '服务支持',
path: '/contactUs' path: '/contactUs'
}, },
], ],
@ -87,11 +94,11 @@ export default {
pageSize: 111 pageSize: 111
}).then(e => { }).then(e => {
console.log(e) console.log(e)
this.menuList[1].children = e.rows.map(v => { this.menuList[2].children = e.rows.map(v => {
return { return {
name: v.configTypeName, name: v.configTypeName,
icon: v.configTypeIcon, icon: v.configTypeIcon,
path: '/productCenter/industrialInternet?portalConfigTypeId='+v.configTypeId path: '/productCenter/industrialInternet?portalConfigTypeId=' + v.configTypeId
} }
}) })
}) })
@ -102,11 +109,26 @@ export default {
pageSize: 111 pageSize: 111
}).then(e => { }).then(e => {
console.log(e) console.log(e)
this.menuList[2].children = e.rows.map(v => { this.menuList[3].children = e.rows.map(v => {
return { return {
name: v.configTypeName, name: v.configTypeName,
icon: v.configTypeIcon, icon: v.configTypeIcon,
path: '/casesAndClients/IOT?portalConfigTypeId='+v.configTypeId path: '/casesAndClients/IOT?portalConfigTypeId=' + v.configTypeId
}
})
})
getPortalConfigTypeList({
configTypeClassfication: 3,
parentId: 0,
pageNum: 1,
pageSize: 111
}).then(e => {
console.log(e)
this.menuList[1].children = e.rows.map(v => {
return {
name: v.configTypeName,
icon: v.configTypeIcon,
path: '/casesAndClients/IOT?portalConfigTypeId=' + v.configTypeId
} }
}) })
}) })

@ -26,7 +26,7 @@ import wlw from "@/assets/icon/wlw.png";
let map = null let map = null
export default { export default {
name: 'PlatformAdvantages', name: 'PlatformAdvantages2',
components: { components: {
TitleGroup TitleGroup
}, },

@ -23,7 +23,7 @@ import wlw from "@/assets/icon/wlw.png";
let map = null let map = null
export default { export default {
name: 'PlatformAdvantages', name: 'PlatformAdvantages3',
components: { components: {
TitleGroup TitleGroup
}, },

@ -10,7 +10,7 @@ module.exports = defineConfig({
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
'/dev-api': { '/dev-api': {
target: `http://175.27.215.92/prod-api`, target: `http://175.27.215.92:8899/prod-api`,
// target: `http://1345442242.gnway.cc:80`, // target: `http://1345442242.gnway.cc:80`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {

10751
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save