数通智联化工云平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

1 lines
32 KiB

import{d as B,u as ie,r as T,o as _,c as E,w as g,a as m,b as y,e as Q,f,F as Y,g as w,E as Ue,h as Te,i as Ee,j as A,t as W,k as Ae,l as Se,m as ce,n as ae,p as je,T as qe,q as Ke,s as J,v as ke,x as Ye,_ as U,y as F,z as ue,A as de,B as Le,C as K,D as be,G as Ge,H as Je,I as Xe,J as xe,K as ye,L as Qe,M as le,N as M,O as Ze,P as Ie,Q as Me,R as et,S as tt,U as Ve,V as ne,W as nt,X as fe,Y as at,Z as st,$ as ot,a0 as Ce,a1 as it,a2 as Be,a3 as re,a4 as Re,a5 as De,a6 as ze,a7 as he,a8 as ge,a9 as $e,aa as lt,ab as rt,ac as ct,ad as ut,ae as dt}from"./index-b0696d90.js";/* empty css *//* empty css */import{_ as ft}from"./caret-bottom-3addd466.js";import{_ as _t}from"./index.vue_vue_type_script_setup_true_lang-652bb926.js";import{S as se}from"./index-43a073f3.js";/* empty css *//* empty css */import{_ as vt}from"./setting-8dddf05b.js";const mt=B({__name:"index",setup(n){const e=ie(),t=T([{label:"默认",value:"default"},{label:"大型",value:"large"},{label:"小型",value:"small"}]);function i(r){e.changeSize(r),Ue.success("切换布局大小成功")}return(r,o)=>{const s=se,a=Ae,l=Te,d=Ee;return _(),E(d,{trigger:"click",onCommand:i},{dropdown:g(()=>[m(l,null,{default:g(()=>[(_(!0),y(Y,null,Q(f(t),c=>(_(),E(a,{key:c.value,disabled:f(e).size==c.value,command:c.value},{default:g(()=>[A(W(c.label),1)]),_:2},1032,["disabled","command"]))),128))]),_:1})]),default:g(()=>[w("div",null,[m(s,{"icon-class":"size"})])]),_:1})}}});function pt(n){for(var e=[],t=0;t<n.length;){var i=n[t];if(i==="*"||i==="+"||i==="?"){e.push({type:"MODIFIER",index:t,value:n[t++]});continue}if(i==="\\"){e.push({type:"ESCAPED_CHAR",index:t++,value:n[t++]});continue}if(i==="{"){e.push({type:"OPEN",index:t,value:n[t++]});continue}if(i==="}"){e.push({type:"CLOSE",index:t,value:n[t++]});continue}if(i===":"){for(var r="",o=t+1;o<n.length;){var s=n.charCodeAt(o);if(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||s===95){r+=n[o++];continue}break}if(!r)throw new TypeError("Missing parameter name at ".concat(t));e.push({type:"NAME",index:t,value:r}),t=o;continue}if(i==="("){var a=1,l="",o=t+1;if(n[o]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(o));for(;o<n.length;){if(n[o]==="\\"){l+=n[o++]+n[o++];continue}if(n[o]===")"){if(a--,a===0){o++;break}}else if(n[o]==="("&&(a++,n[o+1]!=="?"))throw new TypeError("Capturing groups are not allowed at ".concat(o));l+=n[o++]}if(a)throw new TypeError("Unbalanced pattern at ".concat(t));if(!l)throw new TypeError("Missing pattern at ".concat(t));e.push({type:"PATTERN",index:t,value:l}),t=o;continue}e.push({type:"CHAR",index:t,value:n[t++]})}return e.push({type:"END",index:t,value:""}),e}function ht(n,e){e===void 0&&(e={});for(var t=pt(n),i=e.prefixes,r=i===void 0?"./":i,o="[^".concat(bt(e.delimiter||"/#?"),"]+?"),s=[],a=0,l=0,d="",c=function(S){if(l<t.length&&t[l].type===S)return t[l++].value},u=function(S){var R=c(S);if(R!==void 0)return R;var G=t[l],Z=G.type,ee=G.index;throw new TypeError("Unexpected ".concat(Z," at ").concat(ee,", expected ").concat(S))},p=function(){for(var S="",R;R=c("CHAR")||c("ESCAPED_CHAR");)S+=R;return S};l<t.length;){var $=c("CHAR"),P=c("NAME"),L=c("PATTERN");if(P||L){var k=$||"";r.indexOf(k)===-1&&(d+=k,k=""),d&&(s.push(d),d=""),s.push({name:P||a++,prefix:k,suffix:"",pattern:L||o,modifier:c("MODIFIER")||""});continue}var v=$||c("ESCAPED_CHAR");if(v){d+=v;continue}d&&(s.push(d),d="");var b=c("OPEN");if(b){var k=p(),C=c("NAME")||"",h=c("PATTERN")||"",O=p();u("CLOSE"),s.push({name:C||(h?a++:""),pattern:C&&!h?o:h,prefix:k,suffix:O,modifier:c("MODIFIER")||""});continue}u("END")}return s}function gt(n,e){return wt(ht(n,e),e)}function wt(n,e){e===void 0&&(e={});var t=xt(e),i=e.encode,r=i===void 0?function(l){return l}:i,o=e.validate,s=o===void 0?!0:o,a=n.map(function(l){if(typeof l=="object")return new RegExp("^(?:".concat(l.pattern,")$"),t)});return function(l){for(var d="",c=0;c<n.length;c++){var u=n[c];if(typeof u=="string"){d+=u;continue}var p=l?l[u.name]:void 0,$=u.modifier==="?"||u.modifier==="*",P=u.modifier==="*"||u.modifier==="+";if(Array.isArray(p)){if(!P)throw new TypeError('Expected "'.concat(u.name,'" to not repeat, but got an array'));if(p.length===0){if($)continue;throw new TypeError('Expected "'.concat(u.name,'" to not be empty'))}for(var L=0;L<p.length;L++){var k=r(p[L],u);if(s&&!a[c].test(k))throw new TypeError('Expected all "'.concat(u.name,'" to match "').concat(u.pattern,'", but got "').concat(k,'"'));d+=u.prefix+k+u.suffix}continue}if(typeof p=="string"||typeof p=="number"){var k=r(String(p),u);if(s&&!a[c].test(k))throw new TypeError('Expected "'.concat(u.name,'" to match "').concat(u.pattern,'", but got "').concat(k,'"'));d+=u.prefix+k+u.suffix;continue}if(!$){var v=P?"an array":"a string";throw new TypeError('Expected "'.concat(u.name,'" to be ').concat(v))}}return d}}function bt(n){return n.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function xt(n){return n&&n.sensitive?"":"i"}function oe(n){return Se.global.te("route."+n)?Se.global.t("route."+n):n}const yt={key:0,class:"text-[var(--el-disabled-text-color)]"},Ct=["onClick"],St=B({__name:"index",setup(n){const e=ce(),t=a=>{const{params:l}=e;return gt(a)(l)},i=T([]);function r(){let a=e.matched.filter(d=>d.meta&&d.meta.title);const l=a[0];o(l)||(a=[{path:"/dashboard",meta:{title:"dashboard"}}].concat(a)),i.value=a.filter(d=>d.meta&&d.meta.title&&d.meta.breadcrumb!==!1)}function o(a){const l=a&&a.name;return l?l.toString().trim().toLocaleLowerCase()==="Dashboard".toLocaleLowerCase():!1}function s(a){const{redirect:l,path:d}=a;if(l){ke.push(l).catch(c=>{console.warn(c)});return}ke.push(t(d)).catch(c=>{console.warn(c)})}return ae(()=>e.path,a=>{a.startsWith("/redirect/")||r()}),je(()=>{r()}),(a,l)=>{const d=Ye,c=Ke;return _(),E(c,{class:"h-[50px] flex items-center"},{default:g(()=>[m(qe,{name:"breadcrumb"},{default:g(()=>[(_(!0),y(Y,null,Q(i.value,(u,p)=>(_(),E(d,{key:u.path},{default:g(()=>[u.redirect==="noredirect"||p===i.value.length-1?(_(),y("span",yt,W(f(oe)(u.meta.title)),1)):(_(),y("a",{key:1,onClick:J($=>s(u),["prevent"])},W(f(oe)(u.meta.title)),9,Ct))]),_:2},1024))),128))]),_:1})]),_:1})}}});const kt=U(St,[["__scopeId","data-v-2530f4da"]]),Vt=n=>(ue("data-v-5db4ca6c"),n=n(),de(),n),$t=Vt(()=>w("path",{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"},null,-1)),Pt=[$t],Tt=B({__name:"index",props:{isActive:{required:!0,type:Boolean,default:!1}},emits:["toggleClick"],setup(n,{emit:e}){function t(){e("toggleClick")}return(i,r)=>(_(),y("div",{class:"px-[15px] hover:bg-gray-50 cursor-pointer h-[50px] leading-[50px] dark:hover:bg-[var(--el-fill-color-light)]",onClick:t},[(_(),y("svg",{class:F([{"is-active":n.isActive},"hamburger"]),viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",style:{color:"#fff !important"}},Pt,2))]))}});const Et=U(Tt,[["__scopeId","data-v-5db4ca6c"]]),_e=Le("tagsView",()=>{const n=T([]),e=T([]);function t(v){var b,C;n.value.some(h=>h.path===v.path)||(v.meta&&v.meta.affix?n.value.unshift(Object.assign({},v,{title:((b=v.meta)==null?void 0:b.title)||"no-name"})):n.value.push(Object.assign({},v,{title:((C=v.meta)==null?void 0:C.title)||"no-name"})))}function i(v){var C;const b=v.name;e.value.includes(b)||(C=v.meta)!=null&&C.keepAlive&&e.value.push(b)}function r(v){return new Promise(b=>{for(const[C,h]of n.value.entries())if(h.path===v.path){n.value.splice(C,1);break}b([...n.value])})}function o(v){const b=v.name;return new Promise(C=>{const h=e.value.indexOf(b);h>-1&&e.value.splice(h,1),C([...e.value])})}function s(v){return new Promise(b=>{n.value=n.value.filter(C=>{var h;return((h=C.meta)==null?void 0:h.affix)||C.path===v.path}),b([...n.value])})}function a(v){const b=v.name;return new Promise(C=>{const h=e.value.indexOf(b);h>-1?e.value=e.value.slice(h,h+1):e.value=[],C([...e.value])})}function l(v){for(let b of n.value)if(b.path===v.path){b=Object.assign(b,v);break}}function d(v){t(v),i(v)}function c(v){return new Promise(b=>{r(v),o(v),b({visitedViews:[...n.value],cachedViews:[...e.value]})})}function u(v){return new Promise(b=>{s(v),a(v),b({visitedViews:[...n.value],cachedViews:[...e.value]})})}function p(v){return new Promise(b=>{const C=n.value.findIndex(h=>h.path===v.path);C!==-1&&(n.value=n.value.filter((h,O)=>{if(O>=C||h.meta&&h.meta.affix)return!0;const S=e.value.indexOf(h.name);return S>-1&&e.value.splice(S,1),!1}),b({visitedViews:[...n.value]}))})}function $(v){return new Promise(b=>{const C=n.value.findIndex(h=>h.path===v.path);C!==-1&&(n.value=n.value.filter((h,O)=>{if(O<=C||h.meta&&h.meta.affix)return!0;const S=e.value.indexOf(h.name);return S>-1&&e.value.splice(S,1),!1}),b({visitedViews:[...n.value]}))})}function P(){return new Promise(v=>{const b=n.value.filter(C=>{var h;return(h=C.meta)==null?void 0:h.affix});n.value=b,e.value=[],v({visitedViews:[...n.value],cachedViews:[...e.value]})})}function L(){return new Promise(v=>{const b=n.value.filter(C=>{var h;return(h=C.meta)==null?void 0:h.affix});n.value=b,v([...n.value])})}function k(){return new Promise(v=>{e.value=[],v([...e.value])})}return{visitedViews:n,cachedViews:e,addVisitedView:t,addCachedView:i,delVisitedView:r,delCachedView:o,delOtherVisitedViews:s,delOtherCachedViews:a,updateVisitedView:l,addView:d,delView:c,delOtherViews:u,delLeftViews:p,delRightViews:$,delAllViews:P,delAllVisitedViews:L,delAllCachedViews:k}}),At={class:"dialog-footer"},Lt=B({__name:"editmypassword",props:{editPasswordIsShow:{type:Boolean,default:!1}},emits:["update:editPasswordIsShow"],setup(n,{emit:e}){const t=n,i=T(!1),r=K({get:()=>t.editPasswordIsShow,set:l=>{e("update:editPasswordIsShow",l)}});ae(()=>t.editPasswordIsShow,()=>{t.editPasswordIsShow});const o=()=>{e("update:editPasswordIsShow",!1),a()},s=()=>{i.value=!0};function a(){i.value=!1}return(l,d)=>{const c=Ge,u=Je;return _(),E(u,{modelValue:f(r),"onUpdate:modelValue":d[0]||(d[0]=p=>be(r)?r.value=p:null),title:"修改密码",width:"30%","custom-class":"dialog_box","before-close":o},{footer:g(()=>[w("div",At,[m(c,{type:"primary",loading:f(i),onClick:s},{default:g(()=>[A("确 定")]),_:1},8,["loading"]),m(c,{onClick:o},{default:g(()=>[A("取 消")]),_:1})])]),_:1},8,["modelValue"])}}}),It={class:"navbar"},Mt={class:"flex"},Bt={class:"flex"},Rt={key:0,class:"setting-container"},Dt={class:"avatar-container"},zt=["src"],Ot=B({__name:"Navbar",setup(n){const e=ie(),t=_e(),i=Xe(),r=ce(),o=xe(),{device:s}=ye(e),a=T(!1);function l(){e.toggleSidebar(!0)}const{isFullscreen:d,toggle:c}=Qe();function u(){Ze.confirm("确定注销并退出系统吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{i.logout().then(()=>{t.delAllViews()}).then(()=>{o.push(`/login?redirect=${r.fullPath}`)})})}const p=()=>{},$=()=>{a.value=!0};return(P,L)=>{const k=Et,v=kt,b=se,C=mt,h=Ie,O=_t,S=ft,R=Ae,G=le("router-link"),Z=Te,ee=Ee;return _(),y("div",It,[w("div",Mt,[m(k,{"is-active":f(e).sidebar.opened,onToggleClick:l},null,8,["is-active"]),m(v)]),w("div",Bt,[f(s)!=="mobile"?(_(),y("div",Rt,[w("div",{class:"setting-item",onClick:L[0]||(L[0]=(...te)=>f(c)&&f(c)(...te))},[m(b,{"icon-class":f(d)?"exit-fullscreen":"fullscreen"},null,8,["icon-class"])]),m(h,{content:"布局大小",effect:"dark",placement:"bottom"},{default:g(()=>[m(C,{class:"setting-item"})]),_:1}),m(O,{class:"setting-item"})])):M("",!0),m(ee,{trigger:"click"},{dropdown:g(()=>[m(Z,null,{default:g(()=>[m(G,{to:"/"},{default:g(()=>[m(R,null,{default:g(()=>[A(W(P.$t("navbar.dashboard")),1)]),_:1})]),_:1}),m(R,{onClick:p},{default:g(()=>[A(W(P.$t("navbar.archives")),1)]),_:1}),m(R,{onClick:$},{default:g(()=>[A(W(P.$t("navbar.password")),1)]),_:1}),m(R,{divided:"",onClick:u},{default:g(()=>[A(W(P.$t("navbar.logout")),1)]),_:1})]),_:1})]),default:g(()=>[w("div",Dt,[w("img",{src:f(i).avatar+"?imageView2/1/w/80/h/80"},null,8,zt),m(S,{class:"w-3 h-3"})])]),_:1})]),m(Lt,{editPasswordIsShow:f(a),"onUpdate:editPasswordIsShow":L[1]||(L[1]=te=>be(a)?a.value=te:null)},null,8,["editPasswordIsShow"])])}}});const Nt=U(Ot,[["__scopeId","data-v-4ba5c8bd"]]),Ht={class:"app-main"},Wt=B({__name:"AppMain",setup(n){const e=_e();return(t,i)=>{const r=le("router-view");return _(),y("section",Ht,[m(r,null,{default:g(({Component:o,route:s})=>[m(Me,{name:"router-fade",mode:"out-in"},{default:g(()=>[(_(),E(tt,{include:f(e).cachedViews},[(_(),E(et(o),{key:s.fullPath}))],1032,["include"]))]),_:2},1024)]),_:1})])}}});const Ft=U(Wt,[["__scopeId","data-v-3b4dadfa"]]),ve=Le("setting",()=>{const n=Ve("tagsView",ne.tagsView),e=T(ne.showSettings),t=T(ne.fixedHeader),i=T(ne.sidebarLogo),r=Ve("layout",ne.layout);function o(s){const{key:a,value:l}=s;switch(a){case"showSettings":e.value=l;break;case"fixedHeader":t.value=l;break;case"tagsView":n.value=l;break;case"sidevarLogo":i.value=l;break;case"layout":r.value=l;break}}return{showSettings:e,tagsView:n,fixedHeader:t,sidebarLogo:i,layout:r,changeSetting:o}}),Ut={viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"},jt=w("path",{fill:"currentColor",d:"M512 704a192 192 0 1 0 0-384a192 192 0 0 0 0 384zm0 64a256 256 0 1 1 0-512a256 256 0 0 1 0 512zm0-704a32 32 0 0 1 32 32v64a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 768a32 32 0 0 1 32 32v64a32 32 0 1 1-64 0v-64a32 32 0 0 1 32-32zM195.2 195.2a32 32 0 0 1 45.248 0l45.248 45.248a32 32 0 1 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm543.104 543.104a32 32 0 0 1 45.248 0l45.248 45.248a32 32 0 0 1-45.248 45.248l-45.248-45.248a32 32 0 0 1 0-45.248zM64 512a32 32 0 0 1 32-32h64a32 32 0 0 1 0 64H96a32 32 0 0 1-32-32zm768 0a32 32 0 0 1 32-32h64a32 32 0 1 1 0 64h-64a32 32 0 0 1-32-32zM195.2 828.8a32 32 0 0 1 0-45.248l45.248-45.248a32 32 0 0 1 45.248 45.248L240.448 828.8a32 32 0 0 1-45.248 0zm543.104-543.104a32 32 0 0 1 0-45.248l45.248-45.248a32 32 0 0 1 45.248 45.248l-45.248 45.248a32 32 0 0 1-45.248 0z"},null,-1),qt=[jt];function Kt(n,e){return _(),y("svg",Ut,qt)}const Yt={name:"ep-sunny",render:Kt},Gt={viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"},Jt=w("path",{fill:"currentColor",d:"M240.448 240.448a384 384 0 1 0 559.424 525.696a448 448 0 0 1-542.016-542.08a390.592 390.592 0 0 0-17.408 16.384zm181.056 362.048a384 384 0 0 0 525.632 16.384A448 448 0 1 1 405.056 76.8a384 384 0 0 0 16.448 525.696z"},null,-1),Xt=[Jt];function Qt(n,e){return _(),y("svg",Gt,Xt)}const Zt={name:"ep-moon",render:Qt},j=n=>(ue("data-v-f3ea334f"),n=n(),de(),n),en={class:"settings-container"},tn=j(()=>w("h3",{class:"text-base font-bold"},"项目配置",-1)),nn={class:"py-[8px] flex justify-between"},an=j(()=>w("span",{class:"text-xs"},"开启 Tags-View",-1)),sn={class:"py-[8px] flex justify-between"},on=j(()=>w("span",{class:"text-xs"},"固定 Header",-1)),ln={class:"py-[8px] flex justify-between"},rn=j(()=>w("span",{class:"text-xs"},"侧边栏 Logo",-1)),cn={class:"w-full space-x-2 flex justify-center py-2"},un=["onClick"],dn={class:"layout",style:{display:"none"}},fn=j(()=>w("div",null,null,-1)),_n=j(()=>w("div",null,null,-1)),vn=[fn,_n],mn=j(()=>w("div",null,null,-1)),pn=j(()=>w("div",null,null,-1)),hn=[mn,pn],gn=j(()=>w("div",null,null,-1)),wn=j(()=>w("div",null,null,-1)),bn=[gn,wn],xn=B({__name:"index",setup(n){const e=ve(),t=nt(),i=()=>at(t);function r(a){e.changeSetting({key:"layout",value:a}),window.document.body.setAttribute("layout",e.layout)}const o=T(["#409EFF","#304156","#11a983","#13c2c2","#6959CD","#f5222d"]);function s(a){document.documentElement.style.setProperty("--el-color-primary",a),e.changeSetting({key:"layout",value:a})}return fe(()=>{window.document.body.setAttribute("layout",e.layout)}),(a,l)=>{const d=st,c=ot,u=Ie;return _(),y("div",en,[tn,m(d,null,{default:g(()=>[A("主题")]),_:1}),w("div",{class:"flex justify-center",onClick:l[1]||(l[1]=J(()=>{},["stop"]))},[m(c,{modelValue:f(t),"onUpdate:modelValue":l[0]||(l[0]=p=>be(t)?t.value=p:null),"inline-prompt":"","active-icon":f(Zt),"inactive-icon":f(Yt),"active-color":"var(--el-fill-color-dark)","inactive-color":"var(--el-color-primary)",onChange:i},null,8,["modelValue","active-icon","inactive-icon"])]),m(d,null,{default:g(()=>[A("界面设置")]),_:1}),w("div",nn,[an,m(c,{modelValue:f(e).tagsView,"onUpdate:modelValue":l[2]||(l[2]=p=>f(e).tagsView=p)},null,8,["modelValue"])]),w("div",sn,[on,m(c,{modelValue:f(e).fixedHeader,"onUpdate:modelValue":l[3]||(l[3]=p=>f(e).fixedHeader=p)},null,8,["modelValue"])]),w("div",ln,[rn,m(c,{modelValue:f(e).sidebarLogo,"onUpdate:modelValue":l[4]||(l[4]=p=>f(e).sidebarLogo=p)},null,8,["modelValue"])]),m(d,null,{default:g(()=>[A("主题颜色")]),_:1}),w("ul",cn,[(_(!0),y(Y,null,Q(f(o),(p,$)=>(_(),y("li",{key:$,class:"inline-block w-[30px] h-[30px] cursor-pointer",style:Ce({background:p}),onClick:P=>s(p)},null,12,un))),128))]),m(d,{style:{display:"none"}},{default:g(()=>[A("导航设置")]),_:1}),w("ul",dn,[m(u,{content:"左侧模式",placement:"bottom"},{default:g(()=>[w("li",{class:F("layout-item layout-left "+(f(e).layout=="left"?"is-active":"")),onClick:l[5]||(l[5]=p=>r("left"))},vn,2)]),_:1}),m(u,{content:"顶部模式",placement:"bottom"},{default:g(()=>[w("li",{class:F("layout-item layout-top "+(f(e).layout=="top"?"is-active":"")),onClick:l[6]||(l[6]=p=>r("top"))},hn,2)]),_:1}),m(u,{content:"混合模式",placement:"bottom"},{default:g(()=>[w("li",{class:F("layout-item layout-mix "+(f(e).layout=="mix"?"is-active":"")),onClick:l[7]||(l[7]=p=>r("mix"))},bn,2)]),_:1})])])}}});const yn=U(xn,[["__scopeId","data-v-f3ea334f"]]),Cn={viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"},Sn=w("path",{fill:"currentColor",d:"M764.288 214.592L512 466.88L259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512L214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"},null,-1),kn=[Sn];function Vn(n,e){return _(),y("svg",Cn,kn)}const Oe={name:"ep-close",render:Vn};function H(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}function Pe(n,e){for(var t="",i=0,r=-1,o=0,s,a=0;a<=n.length;++a){if(a<n.length)s=n.charCodeAt(a);else{if(s===47)break;s=47}if(s===47){if(!(r===a-1||o===1))if(r!==a-1&&o===2){if(t.length<2||i!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){var l=t.lastIndexOf("/");if(l!==t.length-1){l===-1?(t="",i=0):(t=t.slice(0,l),i=t.length-1-t.lastIndexOf("/")),r=a,o=0;continue}}else if(t.length===2||t.length===1){t="",i=0,r=a,o=0;continue}}e&&(t.length>0?t+="/..":t="..",i=2)}else t.length>0?t+="/"+n.slice(r+1,a):t=n.slice(r+1,a),i=a-r-1;r=a,o=0}else s===46&&o!==-1?++o:o=-1}return t}function $n(n,e){var t=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||"");return t?t===e.root?t+i:t+n+i:i}var X={resolve:function(){for(var e="",t=!1,i,r=arguments.length-1;r>=-1&&!t;r--){var o;r>=0?o=arguments[r]:(i===void 0&&(i=process.cwd()),o=i),H(o),o.length!==0&&(e=o+"/"+e,t=o.charCodeAt(0)===47)}return e=Pe(e,!t),t?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(H(e),e.length===0)return".";var t=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return e=Pe(e,!t),e.length===0&&!t&&(e="."),e.length>0&&i&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return H(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t<arguments.length;++t){var i=arguments[t];H(i),i.length>0&&(e===void 0?e=i:e+="/"+i)}return e===void 0?".":X.normalize(e)},relative:function(e,t){if(H(e),H(t),e===t||(e=X.resolve(e),t=X.resolve(t),e===t))return"";for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var r=e.length,o=r-i,s=1;s<t.length&&t.charCodeAt(s)===47;++s);for(var a=t.length,l=a-s,d=o<l?o:l,c=-1,u=0;u<=d;++u){if(u===d){if(l>d){if(t.charCodeAt(s+u)===47)return t.slice(s+u+1);if(u===0)return t.slice(s+u)}else o>d&&(e.charCodeAt(i+u)===47?c=u:u===0&&(c=0));break}var p=e.charCodeAt(i+u),$=t.charCodeAt(s+u);if(p!==$)break;p===47&&(c=u)}var P="";for(u=i+c+1;u<=r;++u)(u===r||e.charCodeAt(u)===47)&&(P.length===0?P+="..":P+="/..");return P.length>0?P+t.slice(s+c):(s+=c,t.charCodeAt(s)===47&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(H(e),e.length===0)return".";for(var t=e.charCodeAt(0),i=t===47,r=-1,o=!0,s=e.length-1;s>=1;--s)if(t=e.charCodeAt(s),t===47){if(!o){r=s;break}}else o=!1;return r===-1?i?"/":".":i&&r===1?"//":e.slice(0,r)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');H(e);var i=0,r=-1,o=!0,s;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,l=-1;for(s=e.length-1;s>=0;--s){var d=e.charCodeAt(s);if(d===47){if(!o){i=s+1;break}}else l===-1&&(o=!1,l=s+1),a>=0&&(d===t.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=l))}return i===r?r=l:r===-1&&(r=e.length),e.slice(i,r)}else{for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===47){if(!o){i=s+1;break}}else r===-1&&(o=!1,r=s+1);return r===-1?"":e.slice(i,r)}},extname:function(e){H(e);for(var t=-1,i=0,r=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(l===47){if(!o){i=a+1;break}continue}r===-1&&(o=!1,r=a+1),l===46?t===-1?t=a:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||r===-1||s===0||s===1&&t===r-1&&t===i+1?"":e.slice(t,r)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return $n("/",e)},parse:function(e){H(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var i=e.charCodeAt(0),r=i===47,o;r?(t.root="/",o=1):o=0;for(var s=-1,a=0,l=-1,d=!0,c=e.length-1,u=0;c>=o;--c){if(i=e.charCodeAt(c),i===47){if(!d){a=c+1;break}continue}l===-1&&(d=!1,l=c+1),i===46?s===-1?s=c:u!==1&&(u=1):s!==-1&&(u=-1)}return s===-1||l===-1||u===0||u===1&&s===l-1&&s===a+1?l!==-1&&(a===0&&r?t.base=t.name=e.slice(1,l):t.base=t.name=e.slice(a,l)):(a===0&&r?(t.name=e.slice(1,s),t.base=e.slice(1,l)):(t.name=e.slice(a,s),t.base=e.slice(a,l)),t.ext=e.slice(s,l)),a>0?t.dir=e.slice(0,a-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};X.posix=X;var Pn=X;const Ne=it(Pn),Tn=B({__name:"ScrollPane",emits:["scroll"],setup(n,{expose:e,emit:t}){const i=T(4),{proxy:r}=De(),o=()=>{t("scroll")},s=_e(),a=K(()=>r==null?void 0:r.$refs.scrollContainer.$refs.wrapRef);fe(()=>{a.value.addEventListener("scroll",o,!0)}),Be(()=>{a.value.removeEventListener("scroll",o)});function l(c){const u=c.wheelDelta||-c.deltaY*40;a.value.scrollLeft=a.value.scrollLeft+u/4}function d(c){const p=r.$refs.scrollContainer.$el.offsetWidth,$=a.value;let P=null,L=null;if(s.visitedViews.length>0&&(P=s.visitedViews[0],L=s.visitedViews[s.visitedViews.length-1]),P===c)$.scrollLeft=0;else if(L===c)$.scrollLeft=$.scrollWidth-p;else{const k=document.getElementsByClassName("tags-item"),v=s.visitedViews.findIndex(S=>S===c);let b=null,C=null;for(const S in k)S!=="length"&&Object.hasOwnProperty.call(k,S)&&(k[S].dataset.path===s.visitedViews[v-1].path&&(b=k[S]),k[S].dataset.path===s.visitedViews[v+1].path&&(C=k[S]));const h=C.offsetLeft+C.offsetWidth+i.value,O=b.offsetLeft-i.value;h>$.scrollLeft+p?$.scrollLeft=h-p:O<$.scrollLeft&&($.scrollLeft=O)}}return e({moveToTarget:d}),(c,u)=>{const p=Re;return _(),E(p,{ref:"scrollContainer",class:"scroll-container",vertical:!1,onWheel:J(l,["prevent"])},{default:g(()=>[re(c.$slots,"default",{},void 0,!0)]),_:3},8,["onWheel"])}}});const En=U(Tn,[["__scopeId","data-v-1b4ec223"]]),An={class:"tags-container"},Ln=["onClick"],In=B({__name:"index",setup(n){const{proxy:e}=De(),t=xe(),i=ce(),r=ze(),o=_e(),{visitedViews:s}=ye(o),a=T({}),l=T(),d=T(0),c=T(0),u=T([]);ae(i,()=>{L(),k()},{immediate:!0});const p=T(!1);ae(p,x=>{x?document.body.addEventListener("click",me):document.body.removeEventListener("click",me)});function $(x,V="/"){let D=[];return x.forEach(N=>{if(N.meta&&N.meta.affix){const z=Ne.resolve(V,N.path);D.push({fullPath:z,path:z,name:N.name,meta:{...N.meta}})}if(N.children){const z=$(N.children,N.path);z.length>=1&&(D=D.concat(z))}}),D}function P(){const x=$(r.routes);u.value=x;for(const V of x)V.name&&o.addVisitedView(V)}function L(){i.name&&o.addView(i)}function k(){$e(()=>{for(const x of o.visitedViews)x.path===i.path&&(l.value.moveToTarget(x),x.fullPath!==i.fullPath&&o.updateVisitedView(i))})}function v(x){return x.path===i.path}function b(x){return x.meta&&x.meta.affix}function C(){try{return a.value.fullPath===o.visitedViews[1].fullPath||a.value.fullPath==="/index"}catch{return!1}}function h(){try{return a.value.fullPath===o.visitedViews[o.visitedViews.length-1].fullPath}catch{return!1}}function O(x){o.delCachedView(x);const{fullPath:V}=x;$e(()=>{t.replace({path:"/redirect"+V}).catch(D=>{console.warn(D)})})}function S(x,V){const D=x.slice(-1)[0];D&&D.fullPath?t.push(D.fullPath):V.name==="Dashboard"?t.replace({path:"/redirect"+V.fullPath}):t.push("/")}function R(x){o.delView(x).then(V=>{v(x)&&S(V.visitedViews,x)})}function G(){o.delLeftViews(a.value).then(x=>{x.visitedViews.find(V=>V.fullPath===i.fullPath)||S(x.visitedViews)})}function Z(){o.delRightViews(a.value).then(x=>{x.visitedViews.find(V=>V.fullPath===i.fullPath)||S(x.visitedViews)})}function ee(){t.push(a.value),o.delOtherViews(a.value).then(()=>{k()})}function te(x){o.delAllViews().then(V=>{S(V.visitedViews,x)})}function We(x,V){const N=e==null?void 0:e.$el.getBoundingClientRect().left,I=(e==null?void 0:e.$el.offsetWidth)-105,q=V.clientX-N+15;q>I?d.value=I:d.value=q,c.value=V.clientY,p.value=!0,a.value=x}function me(){p.value=!1}function Fe(){me()}return fe(()=>{P()}),(x,V)=>{const D=Oe,N=le("router-link"),z=se;return _(),y("div",An,[m(En,{ref_key:"scrollPaneRef",ref:l,onScroll:Fe},{default:g(()=>[(_(!0),y(Y,null,Q(f(s),I=>(_(),E(N,{key:I.path,class:F("tags-item "+(v(I)?"active":"")),"data-path":I.path,to:{path:I.path,query:I.query},onMouseup:J(q=>b(I)?"":R(I),["middle"]),onContextmenu:J(q=>We(I,q),["prevent"])},{default:g(()=>{var q;return[A(W(f(oe)((q=I.meta)==null?void 0:q.title))+" ",1),b(I)?M("",!0):(_(),y("span",{key:0,class:"tags-item-close",onClick:J(la=>R(I),["prevent","stop"])},[m(D,{class:"text-[10px]"})],8,Ln))]}),_:2},1032,["class","data-path","to","onMouseup","onContextmenu"]))),128))]),_:1},512),he(w("ul",{class:"tag-menu",style:Ce({left:d.value+"px",top:c.value+"px"})},[w("li",{onClick:V[0]||(V[0]=I=>O(a.value))},[m(z,{"icon-class":"refresh"}),A(" 刷新 ")]),b(a.value)?M("",!0):(_(),y("li",{key:0,onClick:V[1]||(V[1]=I=>R(a.value))},[m(z,{"icon-class":"close"}),A(" 关闭 ")])),w("li",{onClick:ee},[m(z,{"icon-class":"close_other"}),A(" 关闭其它 ")]),C()?M("",!0):(_(),y("li",{key:1,onClick:G},[m(z,{"icon-class":"close_left"}),A(" 关闭左侧 ")])),h()?M("",!0):(_(),y("li",{key:2,onClick:Z},[m(z,{"icon-class":"close_right"}),A(" 关闭右侧 ")])),w("li",{onClick:V[2]||(V[2]=I=>te(a.value))},[m(z,{"icon-class":"close_all"}),A(" 关闭所有 ")])],4),[[ge,p.value]])])}}});const Mn=U(In,[["__scopeId","data-v-378c75af"]]);function He(n,e){return!!n.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}function Bn(n,e){He(n,e)||(n.className+=" "+e)}function Rn(n,e){if(He(n,e)){const t=new RegExp("(\\s|^)"+e+"(\\s|$)");n.className=n.className.replace(t," ")}}function we(n){return/^(https?:|http?:|mailto:|tel:)/.test(n)}const Dn=["href"],zn=B({__name:"Link",props:{to:{type:String,required:!0}},setup(n){const e=n,t=ie(),i=K(()=>t.sidebar),r=K(()=>t.device),o=xe();function s(){r.value==="mobile"&&i.value.opened==!0&&t.closeSideBar(!1),o.push(e.to).catch(a=>{console.error(a)})}return(a,l)=>f(we)(n.to)?(_(),y("a",{key:0,href:n.to,target:"_blank",rel:"noopener"},[re(a.$slots,"default")],8,Dn)):(_(),y("div",{key:1,onClick:s},[re(a.$slots,"default")]))}}),On={key:0},Nn={key:1},Hn=B({__name:"SidebarItem",props:{item:{type:Object,required:!0},basePath:{type:String,required:!0}},setup(n){const e=n,t=T();function i(o=[],s){const a=o.filter(l=>{var d;return(d=l.meta)!=null&&d.hidden?!1:(t.value=l,!0)});return a.length===1?!0:a.length===0?(t.value={...s,path:"",noShowingChildren:!0},!0):!1}function r(o){return we(o)?o:we(e.basePath)?e.basePath:Ne.resolve(e.basePath,o)}return(o,s)=>{const a=lt,l=le("sidebar-item",!0),d=rt;return!n.item.meta||!n.item.meta.hidden?(_(),y("div",On,[i(n.item.children,n.item)&&(!f(t).children||f(t).noShowingChildren)?(_(),y(Y,{key:0},[f(t).meta?(_(),E(zn,{key:0,to:r(f(t).path)},{default:g(()=>[m(a,{index:r(f(t).path)},{title:g(()=>[A(W(f(oe)(f(t).meta.title)),1)]),default:g(()=>[f(t).meta&&f(t).meta.icon?(_(),E(se,{key:0,"icon-class":f(t).meta.icon},null,8,["icon-class"])):M("",!0)]),_:1},8,["index"])]),_:1},8,["to"])):M("",!0)],64)):(_(),E(d,{key:1,index:r(n.item.path),teleported:""},{title:g(()=>[n.item.meta&&n.item.meta.icon?(_(),E(se,{key:0,"icon-class":n.item.meta.icon},null,8,["icon-class"])):M("",!0),n.item.meta&&n.item.meta.title?(_(),y("span",Nn,W(f(oe)(n.item.meta.title)),1)):M("",!0)]),default:g(()=>[(_(!0),y(Y,null,Q(n.item.children,c=>(_(),E(l,{key:c.path,item:c,"base-path":r(c.path)},null,8,["item","base-path"]))),128))]),_:1},8,["index"]))])):M("",!0)}}}),Wn=n=>(ue("data-v-4212a113"),n=n(),de(),n),Fn={class:"w-full h-[50px] bg-gray-800 dark:bg-[var(--el-bg-color-overlay)]"},Un=["src"],jn={key:1,class:"ml-3 text-white text-sm font-bold"},qn=["src"],Kn=Wn(()=>w("span",{class:"ml-3 text-white text font-bold"},"数通智联化工云平台",-1)),Yn=B({__name:"Logo",props:{collapse:{type:Boolean,required:!0}},setup(n){const e=ve(),t=T(new URL("/assets/logo-bc03cbe4.png",self.location).href);return(i,r)=>{const o=le("router-link");return _(),y("div",Fn,[m(Me,{name:"sidebarLogoFade"},{default:g(()=>[n.collapse?(_(),E(o,{key:"collapse",class:"h-full w-full flex items-center justify-center",to:"/"},{default:g(()=>[f(e).sidebarLogo?(_(),y("img",{key:0,src:f(t),class:"w-12 h-12"},null,8,Un)):(_(),y("span",jn,"数通智联化工云平台"))]),_:1})):(_(),E(o,{key:"expand",class:"h-full w-full flex items-center justify-center",to:"/"},{default:g(()=>[f(e).sidebarLogo?(_(),y("img",{key:0,src:f(t),class:"w-8 h-8"},null,8,qn)):M("",!0),Kn]),_:1}))]),_:1})])}}});const Gn=U(Yn,[["__scopeId","data-v-4212a113"]]),Jn="var(--menuBg)",Xn="var(--menuText)",Qn="var(--menuActiveText)",pe={menuBg:Jn,menuText:Xn,menuActiveText:Qn},Zn=B({__name:"index",setup(n){const e=ve(),t=ze(),i=ie(),r=ce(),{sidebarLogo:o}=ye(e);return(s,a)=>{const l=ct,d=Re;return _(),y("div",{class:F({"has-logo":f(o)})},[f(o)?(_(),E(Gn,{key:0,collapse:!f(i).sidebar.opened},null,8,["collapse"])):M("",!0),m(d,null,{default:g(()=>[m(l,{"default-active":f(r).path,collapse:!f(i).sidebar.opened,"background-color":f(pe).menuBg,"text-color":f(pe).menuText,"active-text-color":f(pe).menuActiveText,"unique-opened":!1,"collapse-transition":!1,mode:"vertical"},{default:g(()=>[(_(!0),y(Y,null,Q(f(t).routes,c=>(_(),E(Hn,{key:c.path,item:c,"base-path":c.path,"is-collapse":!f(i).sidebar.opened},null,8,["item","base-path","is-collapse"]))),128))]),_:1},8,["default-active","collapse","background-color","text-color","active-text-color"])]),_:1})],2)}}}),ea=n=>(ue("data-v-8be46592"),n=n(),de(),n),ta=ea(()=>w("div",{class:"right-panel-overlay"},null,-1)),na={class:"right-panel-container"},aa=B({__name:"index",props:{buttonTop:{default:250,type:Number}},setup(n){const e=T(!1);ae(e,s=>{s&&t(),s?Bn(document.body,"showRightPanel"):Rn(document.body,"showRightPanel")});function t(){window.addEventListener("click",i,{passive:!0})}function i(s){s.target.closest(".right-panel-container")||(e.value=!1,window.removeEventListener("click",i))}const r=T();function o(){const s=document.querySelector("body");s.insertBefore(r.value,s.firstChild)}return fe(()=>{o()}),Be(()=>{r.value.remove()}),(s,a)=>{const l=Oe,d=vt;return _(),y("div",{ref_key:"rightPanel",ref:r,class:F({show:e.value})},[ta,w("div",na,[w("div",{class:"right-panel-btn",style:Ce({top:n.buttonTop+"px"}),onClick:a[0]||(a[0]=c=>e.value=!e.value)},[he(m(l,null,null,512),[[ge,e.value]]),he(m(d,null,null,512),[[ge,!e.value]])],4),w("div",null,[re(s.$slots,"default",{},void 0,!0)])])],2)}}});const sa=U(aa,[["__scopeId","data-v-8be46592"]]),oa=992,ia=B({__name:"index",setup(n){const{width:e}=ut(),t=ie(),i=ve(),r=K(()=>i.fixedHeader),o=K(()=>i.tagsView),s=K(()=>i.showSettings),a=K(()=>({hideSidebar:!t.sidebar.opened,openSidebar:t.sidebar.opened,withoutAnimation:t.sidebar.withoutAnimation,mobile:t.device==="mobile"}));dt(()=>{e.value<oa?(t.toggleDevice("mobile"),t.closeSideBar(!0)):(t.toggleDevice("desktop"),e.value>=1200?t.openSideBar(!0):t.closeSideBar(!0))});function l(){t.closeSideBar(!1)}return(d,c)=>(_(),y("div",{class:F([a.value,"app-wrapper"])},[a.value.mobile&&a.value.openSidebar?(_(),y("div",{key:0,class:"drawer-bg",onClick:l})):M("",!0),m(Zn,{class:"sidebar-container"}),w("div",{class:F([{hasTagsView:o.value},"main-container"])},[w("div",{class:F({"fixed-header":r.value})},[m(f(Nt)),o.value?(_(),E(f(Mn),{key:0})):M("",!0)],2),m(f(Ft)),s.value?(_(),E(sa,{key:0},{default:g(()=>[m(f(yn))]),_:1})):M("",!0)],2)],2))}});const ha=U(ia,[["__scopeId","data-v-d8e71d6d"]]);export{ha as default};