mirror of
https://gitee.com/myxzgzs/boyue_jnpf.git
synced 2025-08-08 07:12:42 +08:00
2 lines
2.2 KiB
JavaScript
2 lines
2.2 KiB
JavaScript
import{_ as m,r as t,o as a,c as r,F as x,a as y,n as b,b as o,w as d,d as v,e as C,f as g,t as k,g as I,h as w}from"./index-f87df9cc.js";const V={data(){return{navs:[{icon:"el-icon-menu",name:"大屏管理",path:"/"},{icon:"el-icon-folder-opened",name:"大屏分类",path:"/category"},{icon:"el-icon-set-up",name:"数据源管理",path:"/db"},{icon:"el-icon-eleme",name:"组件库",path:"/components"},{icon:"el-icon-opportunity",name:"全局变量",path:"/glob"},{icon:"el-icon-suitcase",name:"数据集管理",path:"/record"},{icon:"el-icon-files",name:"静态资源",path:"/file"},{icon:"el-icon-location-information",name:"地图管理",path:"/map"},{icon:"el-icon-document",name:"工具箱",path:"/document"}],activeIndex:0}},mounted(){let e=this.navs.findIndex(n=>n.path===this.$route.path);this.activeIndex=e},methods:{toggleNav(e,n){this.activeIndex=n,this.$emit("change",e,n)}}},B={class:"nav-main"},D=["onClick"],N={class:"nav-title"};function P(e,n,s,h,c,_){const p=t("el-icon");return a(),r("div",B,[(a(!0),r(x,null,y(c.navs,(i,l)=>(a(),r("div",{class:b(["nav-item",{"is-active":l===c.activeIndex}]),key:l,onClick:u=>_.toggleNav(i,l)},[o(p,{class:"nav-icon"},{default:d(()=>[(a(),v(C(i.icon)))]),_:2},1024),g("div",N,k(i.name),1)],10,D))),128))])}const z=m(V,[["render",P],["__scopeId","data-v-5757d3da"]]);const E={data(){return{publicPath:"/DataV/"}}},F={class:"logo"},G=["src"];function L(e,n,s,h,c,_){return a(),r("div",F,[g("img",{src:`${c.publicPath}img/jnpf.png`},null,8,G)])}const S=m(E,[["render",L]]);const j={name:"index",components:{navs:z,logo:S},data(){return{publicPath:"/DataV/"}},created(){const e=I("token")||"";e&&localStorage.setItem("token",e),this.initGlob()},methods:{initGlob(){w({current:1,size:100}).then(e=>{e.data.data.records.forEach(s=>{window.$glob[s.globalKey]=s.globalValue})})},handleChange(e,n){this.$router.push({path:e.path})}}};function K(e,n,s,h,c,_){const p=t("logo"),i=t("navs"),l=t("el-aside"),u=t("router-view"),f=t("el-main"),$=t("el-container");return a(),v($,{class:"index"},{default:d(()=>[o(l,{class:"left"},{default:d(()=>[o(p),o(i,{onChange:_.handleChange},null,8,["onChange"])]),_:1}),o(f,{class:"main"},{default:d(()=>[o(u)]),_:1})]),_:1})}const q=m(j,[["render",K]]);export{q as default};
|