mooho-base-admin-plus 2.0.32 → 2.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/mooho-base-admin-plus.min.esm.js +21 -14
- package/package/mooho-base-admin-plus.min.js +2 -2
- package/package.json +1 -1
- package/src/index.js +9 -11
- package/src/router/dynamic.js +1 -0
- package/src/router/index.js +18 -6
- package/src/store/modules/admin/modules/menu.js +8 -5
- package/test/main.js +2 -24
- package/src/router/routes.js +0 -89
|
@@ -22142,12 +22142,8 @@ var menu = {
|
|
|
22142
22142
|
const menuHeaderList = getNativeMenuHeader();
|
|
22143
22143
|
commit2("setHeader", menuHeaderList);
|
|
22144
22144
|
const menuSiderList = getNativeMenuSider();
|
|
22145
|
-
let path = to.
|
|
22145
|
+
let path = to.path;
|
|
22146
22146
|
let headerName = getHeaderName(path, menuSiderList);
|
|
22147
|
-
if (headerName === null) {
|
|
22148
|
-
path = to.path;
|
|
22149
|
-
headerName = getHeaderName(path, menuSiderList);
|
|
22150
|
-
}
|
|
22151
22147
|
if (headerName !== null) {
|
|
22152
22148
|
commit2("setHeaderName", headerName);
|
|
22153
22149
|
commit2("setMenuSider", menuSiderList);
|
|
@@ -22681,6 +22677,7 @@ var dynamic = {
|
|
|
22681
22677
|
title: getNameI18n(item),
|
|
22682
22678
|
description: getDescI18n(item),
|
|
22683
22679
|
data: data2,
|
|
22680
|
+
auth: true,
|
|
22684
22681
|
cache: true
|
|
22685
22682
|
},
|
|
22686
22683
|
component: () => {
|
|
@@ -22748,6 +22745,7 @@ const initRouter = (pages2, routes) => {
|
|
|
22748
22745
|
if (Setting.showProgressBar) {
|
|
22749
22746
|
ViewUIPlus.LoadingBar.start();
|
|
22750
22747
|
}
|
|
22748
|
+
store.dispatch("admin/menu/setMenuList", to);
|
|
22751
22749
|
if (!inited) {
|
|
22752
22750
|
await dynamic.init(router, pages2);
|
|
22753
22751
|
store.commit("admin/page/init", router.getRoutes());
|
|
@@ -22758,10 +22756,17 @@ const initRouter = (pages2, routes) => {
|
|
|
22758
22756
|
replace: true
|
|
22759
22757
|
});
|
|
22760
22758
|
} else {
|
|
22761
|
-
if (to.matched.some((
|
|
22759
|
+
if (to.matched.some((item) => item.meta.auth)) {
|
|
22762
22760
|
const token = util$8.cookies.get("token");
|
|
22763
22761
|
if (token && token !== "undefined") {
|
|
22764
|
-
|
|
22762
|
+
const permissions = store.getters["admin/menu/permission"];
|
|
22763
|
+
if (permissions[to.path.substring(1)]) {
|
|
22764
|
+
next();
|
|
22765
|
+
} else {
|
|
22766
|
+
next({
|
|
22767
|
+
path: "home"
|
|
22768
|
+
});
|
|
22769
|
+
}
|
|
22765
22770
|
} else {
|
|
22766
22771
|
next({
|
|
22767
22772
|
name: "login",
|
|
@@ -127310,6 +127315,7 @@ const components = {
|
|
|
127310
127315
|
const install = function(app) {
|
|
127311
127316
|
if (install.installed)
|
|
127312
127317
|
return;
|
|
127318
|
+
app.use(router$1);
|
|
127313
127319
|
app.use(store);
|
|
127314
127320
|
app.use(i18n$1);
|
|
127315
127321
|
app.use(ViewUIPlus, {
|
|
@@ -127331,20 +127337,21 @@ const pages = {};
|
|
|
127331
127337
|
Object.keys(files).forEach((key) => {
|
|
127332
127338
|
pages[key.replace(/(\.\/pages\/)/g, "")] = files[key].default;
|
|
127333
127339
|
});
|
|
127334
|
-
const created = async (app,
|
|
127340
|
+
const created = async (app, routes) => {
|
|
127341
|
+
Object.keys(files).forEach((key) => {
|
|
127342
|
+
pages[key.replace(/(\.\/pages\/)/g, "")] = files[key].default;
|
|
127343
|
+
});
|
|
127344
|
+
app.use(API);
|
|
127335
127345
|
if (window) {
|
|
127336
127346
|
window.$app = getCurrentInstance();
|
|
127337
127347
|
window.$app.$t = i18n$1.global.t;
|
|
127338
127348
|
window.$app.$Message = app.config.globalProperties.$Message;
|
|
127339
127349
|
window.$app.$Notice = app.config.globalProperties.$Notice;
|
|
127340
127350
|
}
|
|
127341
|
-
initRouter(
|
|
127351
|
+
initRouter(pages, routes);
|
|
127342
127352
|
store.dispatch("admin/i18n/load", app);
|
|
127343
127353
|
store.commit("admin/menu/setHeader", menuHeader);
|
|
127344
127354
|
store.dispatch("admin/account/load");
|
|
127345
|
-
app.config.globalProperties.$pages =
|
|
127346
|
-
};
|
|
127347
|
-
const routeChanged = (to) => {
|
|
127348
|
-
store.dispatch("admin/menu/setMenuList", to);
|
|
127355
|
+
app.config.globalProperties.$pages = pages;
|
|
127349
127356
|
};
|
|
127350
|
-
export { App, applicationApi, index as basicLayout, created, customModelApi, dataSourceApi, API as default, i18n$1 as i18n, initRouter, lodop, mixinPage, modelApi, pages, service as request,
|
|
127357
|
+
export { App, applicationApi, index as basicLayout, created, customModelApi, dataSourceApi, API as default, i18n$1 as i18n, initRouter, lodop, mixinPage, modelApi, pages, service as request, router$1 as router, Setting as setting, store, taskApi, util$8 as util };
|
|
@@ -148,7 +148,7 @@ ${f}`:d)}},onCacheKey:c=>shared$1.generateFormatCacheKey(r,o,c)}}function getMes
|
|
|
148
148
|
* screenfull
|
|
149
149
|
* v4.2.1 - 2019-07-27
|
|
150
150
|
* (c) Sindre Sorhus; MIT License
|
|
151
|
-
*/(function(a){(function(){var r=typeof window!="undefined"&&typeof window.document!="undefined"?window.document:{},o=a.exports,s=typeof Element!="undefined"&&"ALLOW_KEYBOARD_INPUT"in Element,l=function(){for(var d,f=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],h=0,p=f.length,v={};h<p;h++)if(d=f[h],d&&d[1]in r){for(h=0;h<d.length;h++)v[f[0][h]]=d[h];return v}return!1}(),u={change:l.fullscreenchange,error:l.fullscreenerror},c={request:function(d){return new Promise(function(f,h){var p=l.requestFullscreen,v=function(){this.off("change",v),f()}.bind(this);this.on("change",v),d=d||r.documentElement;var g;/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)?g=d[p]():g=d[p](s?Element.ALLOW_KEYBOARD_INPUT:{}),Promise.resolve(g).catch(h)}.bind(this))},exit:function(){return new Promise(function(d){if(!this.isFullscreen){d();return}var f=function(){this.off("change",f),d()}.bind(this);r[l.exitFullscreen](),this.on("change",f)}.bind(this))},toggle:function(d){return this.isFullscreen?this.exit():this.request(d)},onchange:function(d){this.on("change",d)},onerror:function(d){this.on("error",d)},on:function(d,f){var h=u[d];h&&r.addEventListener(h,f,!1)},off:function(d,f){var h=u[d];h&&r.removeEventListener(h,f,!1)},raw:l};if(!l){o?a.exports=!1:window.screenfull=!1;return}Object.defineProperties(c,{isFullscreen:{get:function(){return Boolean(r[l.fullscreenElement])}},element:{enumerable:!0,get:function(){return r[l.fullscreenElement]}},enabled:{enumerable:!0,get:function(){return Boolean(r[l.fullscreenEnabled])}}}),o?(a.exports=c,a.exports.default=c):window.screenfull=c})()})(screenfull$1);var screenfull=screenfull$1.exports,layout$4={namespaced:!0,state:{...Setting.layout,isMobile:!1,isTablet:!1,isDesktop:!0,isFullscreen:!1,bodyHeight:0,waterMark:Setting.waterMark},mutations:{setDevice(a,r){a.isMobile=!1,a.isTablet=!1,a.isDesktop=!1,a[`is${r}`]=!0},updateMenuCollapse(a,r){a.menuCollapse=r},setFullscreen(a,r){a.isFullscreen=r},updateLayoutSetting(a,{key:r,value:o}){a[r]=o},setBodyHeight(a,r){a.bodyHeight=r},updateWaterMarkStatus(a,r){a.waterMark.show=r},updateWaterMarkText(a,r){a.waterMark.text=r},updateWaterMarkOptions(a,r){a.waterMark.options=r}},actions:{toggleFullscreen({commit:a}){return new Promise(r=>{screenfull.isFullscreen?(screenfull.exit(),a("setFullscreen",!1)):(screenfull.request(),a("setFullscreen",!0)),r()})}}},__glob_0_5=Object.freeze(Object.defineProperty({__proto__:null,default:layout$4},Symbol.toStringTag,{value:"Module"})),loader={namespaced:!0,state:{count:0,enabled:!0,isLoading:!1},mutations:{start(a){a.count++,a.isLoading=!0},end(a){a.count--,a.isLoading=a.count>0},disable(a){a.enabled=!1},enable(a){a.enabled=!0}}},__glob_0_6=Object.freeze(Object.defineProperty({__proto__:null,default:loader},Symbol.toStringTag,{value:"Module"})),log$2={namespaced:!0,state:{log:[]},getters:{length(a){return a.log.length},lengthError(a){return a.log.filter(r=>r.type==="error").length}},actions:{push({rootState:a,commit:r},{message:o,type:s="info",meta:l}){r("push",{message:o,type:s,time:format$3(new Date,"yyyy-MM-dd HH:mm:ss"),meta:{user:a.admin.user.info,uuid:util$8.cookies.get("uuid"),token:util$8.cookies.get("token"),url:lodash$1.exports.get(window,"location.href",""),...l}})}},mutations:{push(a,r){a.log.push(r)},clean(a){a.log=[]}}},__glob_0_7=Object.freeze(Object.defineProperty({__proto__:null,default:log$2},Symbol.toStringTag,{value:"Module"}));function getHeaderName(a,r){const o=[];r.forEach(l=>{const u=l.header||"",c=transferMenu(l,u);o.push({path:l.path,header:u}),c.forEach(d=>o.push(d))});const s=o.find(l=>l.path===a);return s?s.header:null}function transferMenu(a,r){return a.children&&a.children.length?a.children.reduce((o,s)=>{o.push({path:s.path,header:r});const l=transferMenu(s,r);return o.concat(l)},[]):[a]}function getMenuSider(a,r=""){return r?a.filter(o=>o.header===r):a}function getSiderSubmenu(a,r){const o=[];r.forEach(l=>{const u=transferSubMenu(l,[]);o.push({path:l.path,openNames:[]}),u.forEach(c=>o.push(c))});const s=o.find(l=>l.path===a);return s?s.openNames:[]}function transferSubMenu(a,r){if(a.children&&a.children.length){const o=r.concat([a.path]);return a.children.reduce((s,l)=>{s.push({path:l.path,openNames:o});const u=transferSubMenu(l,o);return s.concat(u)},[])}else return[a].map(o=>({path:o.path,openNames:r}))}function getAllSiderMenu(a){let r=[];return a.forEach(o=>{o.children&&o.children.length?getMenuChildren(o).forEach(l=>r.push(l)):r.push(o)}),r}function getMenuChildren(a){return a.children&&a.children.length?a.children.reduce((r,o)=>{const s=getMenuChildren(o);return r.concat(s)},[]):[a]}function flattenSiderMenu(a,r){return a.forEach(o=>{let s={};for(let l in o)l!=="children"&&(s[l]=lodash$1.exports.cloneDeep(o[l]));r.push(s),o.children&&flattenSiderMenu(o.children,r)}),r}function includeArray(a,r){let o=!1;return r.forEach(s=>{a.includes(s)&&(o=!0)}),o}function setNativeMenuSider(a){a?localStorage.setItem(`admin-plus-${Setting.appID}-menu-sider`,JSON.stringify(a)):localStorage.removeItem(`admin-plus-${Setting.appID}-menu-sider`)}function getNativeMenuSider(){return JSON.parse(localStorage.getItem(`admin-plus-${Setting.appID}-menu-sider`)||"[]")}function getNativeMenuHeader(){return JSON.parse(localStorage.getItem(`admin-plus-${Setting.appID}-menu-header`)||"[]")}function setNativePermission(a){a?localStorage.setItem(`admin-plus-${Setting.appID}-permission`,JSON.stringify(a)):localStorage.removeItem(`admin-plus-${Setting.appID}-permission`)}function getNativePermission(){return JSON.parse(localStorage.getItem(`admin-plus-${Setting.appID}-permission`)||"[]")}const res$k="Permission";var permissionApi={query(){return service({url:`api/${res$k}/query`,method:"get",params:{clientType:"Admin"}})},queryByRoleID(a,r){return service({url:`api/${res$k}/queryByRoleID`,method:"get",params:{roleID:a,clientType:r}})},queryRouter(){return service({url:`api/${res$k}/queryRouter`,method:"get",params:{clientType:"Admin"}})},async exportFile(a){const r=await service({url:`api/${res$k}/exportFile`,method:"post",responseType:"blob",data:{ids:a}}),o=new Blob([r],{type:"application/octet-stream"});saveAs(o,"Permission-"+format$3(new Date,"yyyyMMddHHmmss")+".pms")}};function convertMenu(a){if(!a)return null;var r=/(http|https):\/\/([\w.]+\/?)\S*/;return a.map(o=>({path:r.test(o.url)?o.url:"/"+o.url.split("?")[0],code:o.url,title:o.name,subTitle:o.subName,target:o.isNewWindow?"_blank":null,header:"home",custom:o.icon,children:convertMenu(o.subPermissions)}))}var menu={namespaced:!0,state:{header:[],sider:[],headerName:"",activePath:"",openNames:[],menuSider:[],siderMenuBadge:[],headerMenuBadge:[],userPermissions:null},getters:{filterSider(a){return a.sider},filterHeader(a,r,o){const l=o.admin.user.info.access;return l&&l.length?a.header.filter(u=>{let c=!0;return u.auth&&!includeArray(u.auth,l)&&(c=!1),u.children&&u.children.length&&(u.children=u.children.filter(d=>{let f=!0;return d.auth&&!includeArray(d.auth,l)&&(f=!1),f})),c}):a.header.filter(u=>{let c=!0;return u.auth&&u.auth.length&&(c=!1),u.children&&u.children.length&&(u.children=u.children.filter(d=>{let f=!0;return d.auth&&d.auth.length&&(f=!1),f})),c})},currentHeader(a){return a.header.find(r=>r.name===a.headerName)},hideSider(a,r){let o=!1;return r.currentHeader&&"hideSider"in r.currentHeader&&(o=r.currentHeader.hideSider),o},permission(a){return a.userPermissions}},mutations:{setSider(a,r){a.sider=r},setHeader(a,r){a.header=r},setHeaderName(a,r){a.headerName=r},setActivePath(a,r){a.activePath=r},setOpenNames(a,r){a.openNames=r},setMenuSider(a,r){a.menuSider=r},setAllSiderMenuBadge(a,r){a.siderMenuBadge=r},setSiderMenuBadge(a,{path:r,badge:o}){const s=lodash$1.exports.cloneDeep(a.siderMenuBadge),l=s.findIndex(u=>u.path===r);l>=0?(s[l]=o,a.siderMenuBadge=s):a.siderMenuBadge.push(o)},removeSiderMenuBadge(a,r){const o=a.siderMenuBadge.findIndex(s=>s.path===r);o>=0&&a.siderMenuBadge.splice(o,1)},setAllHeaderMenuBadge(a,r){a.headerMenuBadge=r},setHeaderMenuBadge(a,{path:r,badge:o}){const s=lodash$1.exports.cloneDeep(a.headerMenuBadge),l=s.findIndex(u=>u.path===r);l>=0?(s[l]=o,a.headerMenuBadge=s):a.headerMenuBadge.push(o)},removeHeaderMenuBadge(a,r){const o=a.headerMenuBadge.findIndex(s=>s.path===r);o>=0&&a.headerMenuBadge.splice(o,1)}},actions:{setMenuList({state:a,commit:r},o={}){const s=getNativeMenuHeader();r("setHeader",s);const l=getNativeMenuSider();let u=o.matched[o.matched.length-1].path,c=getHeaderName(u,l);if(c===null&&(u=o.path,c=getHeaderName(u,l)),c!==null){r("setHeaderName",c),r("setMenuSider",l);const d=getMenuSider(l,c);r("setSider",d),r("setActivePath",o.path);const f=getSiderSubmenu(u,l);r("setOpenNames",f)}a.userPermissions==null&&(a.userPermissions=getNativePermission())},getMenuList({state:a,dispatch:r},o){return new Promise((s,l)=>{permissionApi.query().then(u=>{u.menus.unshift({name:window.$app.$t("Permission_home"),subName:window.$app.$t("Permission_home_SubName"),parentID:null,url:"home",templateUrl:"@/home",icon:"fa fa-home"});let c=convertMenu(u.menus);if(setNativeMenuSider(c),o){const f=o===!0?router$1.currentRoute.value:o;r("setMenuList",f)}let d={};u.permissions.forEach(f=>{d[f]=!0}),a.userPermissions=d,setNativePermission(d),s()}).catch(u=>{l(u)})})}}},__glob_0_8=Object.freeze(Object.defineProperty({__proto__:null,default:menu},Symbol.toStringTag,{value:"Module"}));const pre="/dashboard/";var dashboard={path:"/dashboard",title:"Dashboard",header:"home",custom:"i-icon-demo i-icon-demo-dashboard",children:[{path:`${pre}console`,title:"\u4E3B\u63A7\u53F0"},{path:`${pre}monitor`,title:"\u76D1\u63A7\u9875"},{path:`${pre}workplace`,title:"\u5DE5\u4F5C\u53F0",subtitle:"Workplace"}]},menuSider=[dashboard,{path:"/i18n",title:"menu.i18n",header:"home",custom:"i-icon-demo i-icon-demo-i18n"}];const isKeepAlive=a=>lodash$1.exports.get(a,"meta.cache",!1);var page={namespaced:!0,state:{pool:[],opened:Setting.page.opened,current:"",keepAlive:[]},actions:{openedLoad({state:a,commit:r,dispatch:o,rootState:s},{loadOpenedTabs:l=!0}){return new Promise(async u=>{let c=await o("admin/db/get",{dbName:"sys",path:"page.opened",defaultValue:Setting.page.opened,user:!0},{root:!0});l||(c=[]);const d=[];a.opened=c.map(f=>{if(f.fullPath==="/index")return d.push(1),f;const h=a.pool.find(p=>p.name===f.name);return f.keepMeta&&(h.meta=Object.assign({},f.meta)),d.push(h?1:0),Object.assign({},f,h)}).filter((f,h)=>d[h]===1).filter(f=>{const p=getAllSiderMenu(menuSider).find(g=>g.path===f.fullPath);let v=!0;if(p&&p.auth){const g=s.admin.user.info,y=lodash$1.exports.cloneDeep(g.access);y.push("hidden"),y&&!includeArray(p.auth,y)&&(v=!1)}return v}),r("keepAliveRefresh"),u()})},opened2db({state:a,dispatch:r}){return new Promise(async o=>{r("admin/db/set",{dbName:"sys",path:"page.opened",value:a.opened,user:!0},{root:!0}),o()})},openedUpdate({state:a,dispatch:r},{index:o,params:s,query:l,fullPath:u,pageName:c,meta:d,keepMeta:f=!1}){return new Promise(async h=>{let p=a.opened[o];p.params=s||p.params,p.query=l||p.query,p.fullPath=u||p.fullPath,p.pageName=c||p.pageName,p.meta=d||p.meta,p.keepMeta=f,a.opened.splice(o,1,p),await r("opened2db"),h()})},currentUpdate({state:a,dispatch:r},{params:o,query:s,fullPath:l,pageName:u,meta:c,keepMeta:d=!1}){return new Promise(async f=>{setTimeout(async()=>{const h=a.opened.findIndex(v=>v.fullPath===a.current);let p=a.opened[h];p.params=o||p.params,p.query=s||p.query,p.fullPath=l||p.fullPath,p.pageName=u||p.pageName,p.meta=c||p.meta,p.keepMeta=d,a.opened.splice(h,1,p),await r("opened2db"),f()},0)})},add({state:a,commit:r,dispatch:o},{tag:s,params:l,query:u,fullPath:c,pageName:d}){return new Promise(async f=>{let h=s;h.params=l||h.params,h.query=u||h.query,h.fullPath=c||h.fullPath,h.pageName=d||h.pageName,a.opened.push(h),isKeepAlive(h)&&r("keepAliveRefresh"),await o("opened2db"),f()})},open({state:a,commit:r,dispatch:o},{name:s,params:l,query:u,path:c,fullPath:d}){const f=router$1.getRoutes().find(h=>h.path==c).components.default.name;return new Promise(async h=>{setTimeout(async()=>{let p=a.opened,v=0;if(p.find((y,$)=>{const _=y.fullPath===d;return v=_?$:v,_}))await o("openedUpdate",{index:v,params:l,query:u,fullPath:d,pageName:f});else{let y=a.pool.find($=>$.name===s);y&&await o("add",{tag:Object.assign({},y),params:l,query:u,fullPath:d,pageName:f})}r("currentSet",d)}),h()})},close({state:a,commit:r,dispatch:o},{tagName:s}){return new Promise(async l=>{let u=a.opened[0];const c=a.current===s;if(c){let f=a.opened.length;for(let h=0;h<f;h++)if(a.opened[h].fullPath===s){f>1?h===f-1?u=a.opened[h-1]:u=a.opened[h+1]:u={};break}}const d=a.opened.findIndex(f=>f.fullPath===s);if(d>=0&&a.opened.splice(d,1),r("keepAliveRefresh"),await o("opened2db"),c){const{name:f="index",params:h={},query:p={}}=u;let v={name:f,params:h,query:p};router$1.push(v,()=>{})}l()})},closeLeft({state:a,commit:r,dispatch:o},{pageSelect:s}={}){return new Promise(async l=>{const u=s||a.current;let c=0;a.opened.forEach((d,f)=>{d.fullPath===u&&(c=f)}),c>0&&a.opened.splice(1,c-1),r("keepAliveRefresh"),a.current=u,router$1.currentRoute.value.fullPath!==u&&router$1.push(u),await o("opened2db"),l()})},closeRight({state:a,commit:r,dispatch:o},{pageSelect:s}={}){return new Promise(async l=>{const u=s||a.current;let c=0;a.opened.forEach((d,f)=>{d.fullPath===u&&(c=f)}),a.opened.splice(c+1),r("keepAliveRefresh"),a.current=u,router$1.currentRoute.value.fullPath!==u&&router$1.push(u),await o("opened2db"),l()})},closeOther({state:a,commit:r,dispatch:o},{pageSelect:s}={}){return new Promise(async l=>{const u=s||a.current;let c=0;a.opened.forEach((d,f)=>{d.fullPath===u&&(c=f)}),c===0?a.opened.splice(1):(a.opened.splice(c+1),a.opened.splice(1,c-1)),r("keepAliveRefresh"),a.current=u,router$1.currentRoute.value.fullPath!==u&&router$1.push(u),await o("opened2db"),l()})},closeAll({state:a,commit:r,dispatch:o}){return new Promise(async s=>{a.opened.splice(1),r("keepAliveRefresh"),await o("opened2db"),router$1.currentRoute.value.name!=="index"&&router$1.push({name:"index"},()=>{}),s()})},updateOpened({state:a,dispatch:r},{opened:o}){return new Promise(async s=>{a.opened=o,await r("opened2db"),s()})}},mutations:{keepAliveRefresh(a){a.keepAlive=a.opened.filter(r=>isKeepAlive(r)).map(r=>r.pageName)},currentSet(a,r){a.current=r},init(a,r){const o=[];r.forEach(s=>{const{meta:l,name:u,path:c}=s;o.push({meta:l,name:u,path:c})}),a.pool=o}}},__glob_0_9=Object.freeze(Object.defineProperty({__proto__:null,default:page},Symbol.toStringTag,{value:"Module"})),user$1={namespaced:!0,state:{info:{},data:{}},actions:{set({state:a,dispatch:r},o){return new Promise(async s=>{a.info=o,await r("admin/db/set",{dbName:"sys",path:"user.info",value:o,user:!0},{root:!0}),s()})},setData({state:a,dispatch:r},o){return new Promise(async s=>{a.data=o,await r("admin/db/set",{dbName:"sys",path:"user.data",value:o,user:!0},{root:!0}),s()})},load({state:a,dispatch:r}){return new Promise(async o=>{a.info=await r("admin/db/get",{dbName:"sys",path:"user.info",defaultValue:{},user:!0},{root:!0}),a.data=await r("admin/db/get",{dbName:"sys",path:"user.data",defaultValue:{},user:!0},{root:!0}),o()})}}},__glob_0_10=Object.freeze(Object.defineProperty({__proto__:null,default:user$1},Symbol.toStringTag,{value:"Module"}));const res$j="CustomPage";var customPageApi={get(a){return service({url:`api/${res$j}/get`,method:"get",params:{id:a}})}},viewPage$1={namespaced:!0,state:{pages:{}},getters:{get:a=>r=>a.pages[r]},actions:{async load({state:a},r){if(r in a.pages)return a.pages[r];{let o=await customPageApi.get(r);return o&&(a.pages[r]=o),o}}}},__glob_0_11=Object.freeze(Object.defineProperty({__proto__:null,default:viewPage$1},Symbol.toStringTag,{value:"Module"}));const files$1={"./modules/account.js":__glob_0_0,"./modules/cache.js":__glob_0_1,"./modules/dataView.js":__glob_0_2,"./modules/db.js":__glob_0_3,"./modules/i18n.js":__glob_0_4,"./modules/layout.js":__glob_0_5,"./modules/loader.js":__glob_0_6,"./modules/log.js":__glob_0_7,"./modules/menu.js":__glob_0_8,"./modules/page.js":__glob_0_9,"./modules/user.js":__glob_0_10,"./modules/viewPage.js":__glob_0_11},modules={};Object.keys(files$1).forEach(a=>{modules[a.replace(/(\.\/modules\/|\.js)/g,"")]=files$1[a].default});var admin={namespaced:!0,modules},store=createStore({modules:{admin}}),dynamic={async init(a,r){let o=await permissionApi.queryRouter();const s=a.getRoutes().find(l=>l.path=="/");o.forEach(l=>{var u;if(l.isCustomPage&&(l.url+="?id="+l.customPageID,l.customPage.customPageTemplate&&(l.templateUrl="template/"+l.customPage.customPageTemplate.substr(0,1).toLowerCase()+l.customPage.customPageTemplate.substr(1)+".vue")),(l.templateUrl||"").trim()){const c=((u=l.url)==null?void 0:u.split("?")[0])||"",d=c.replace(/\//g,"-"),f={};l.url&&l.url.split("?").length>1&&l.url.split("?")[1].split("&").forEach(h=>{h.split("=").length>1&&h.split("=")[0].length>0&&(f[h.split("=")[0]]=h.split("=")[1])}),s.children.push({path:c,name:d,meta:{title:getNameI18n(l),description:getDescI18n(l),data:f,cache:!0},component:()=>new Promise(h=>{h(r[l.templateUrl])})})}}),a.removeRoute("root"),a.addRoute(s),a.addRoute({path:"/:pathMatch(.*)",name:"404",meta:{title:"404"},component:()=>new Promise(l=>{l(r["system/error/404.vue"])})})}};function getNameI18n(a){if(Setting.layout.showI18n){let r="Permission_"+a.url.split("?")[0],o=window.$app.$t(r);return o==r?a.name:o}else return a.name}function getDescI18n(a){if(Setting.layout.showI18n){let r="Permission_"+a.url.split("?")[0]+"_SubName",o=window.$app.$t(r);return o==r?a.subName:o}else return a.subName}const base$1="admin",router=createRouter({history:Setting.routerMode==="history"?createWebHistory(base$1):Setting.routerMode==="hash"?createWebHashHistory(base$1):createMemoryHistory(base$1),routes:[]});let inited=!1;const initRouter=(a,r)=>{r.forEach(o=>{router.addRoute(o)}),Setting.rootPath="/"+base$1+"/static/",router.beforeEach(async(o,s,l)=>{if(Setting.showProgressBar&&ViewUIPlus__default.default.LoadingBar.start(),!inited)await dynamic.init(router,a),store.commit("admin/page/init",router.getRoutes()),store.dispatch("admin/page/openedLoad",{loadOpenedTabs:!0},{root:!0}),inited=!0,l({...o,replace:!0});else if(o.matched.some(u=>u.meta.auth)){const u=util$8.cookies.get("token");u&&u!=="undefined"?l():l({name:"login",query:{redirect:o.fullPath}})}else l()}),router.afterEach(o=>{Setting.showProgressBar&&ViewUIPlus__default.default.LoadingBar.finish(),Setting.layout.tabs&&store.dispatch("admin/page/open",o),window.document.title=window.$app.$t(o.meta.title)+" - "+Setting.info.title,window.scrollTo(0,0)})};var router$1=router,mixinPage={data(){return{grid4:{xxl:4,xl:4,lg:4,md:6,sm:12,xs:24},grid6:{xxl:6,xl:6,lg:8,md:12,sm:12,xs:24},grid8:{xxl:8,xl:8,lg:8,md:12,sm:24,xs:24},grid12:{xxl:12,xl:12,lg:12,md:12,sm:24,xs:24},grid16:{xxl:16,xl:16,lg:16,md:24,sm:24,xs:24},grid18:{xxl:18,xl:18,lg:18,md:24,sm:24,xs:24},grid24:{xxl:24,xl:24,lg:24,md:24,sm:24,xs:24}}},computed:{...mapState("admin/user",["info"]),...mapState("admin/cache",["userNames","enums","dicts","caches"]),...mapState("admin/menu",["userPermissions"]),rootPath(){return Setting.rootPath},sysInfo(){return Setting.info},layout(){return Setting.layout},apiBaseURL(){return window.$mode==="development"?Setting.apiBaseURL.dev:Setting.apiBaseURL.prd},uploadURL(){return this.apiBaseURL+"api/Attachment/add"},uploadHeaders(){const a=util$8.cookies.get("token");return{Authorization:"Bearer "+a}}},methods:{...mapActions("admin/cache",["loadEnum","loadDict","loadUserName","loadCache"]),copy(a){return lodash$1.exports.cloneDeep(a)},allow(a){if(a.startsWith("permission/"))return this.userPermissions[a];{let r=router$1.currentRoute.value.fullPath.substr(1);if(this.userPermissions[r+"$"+a]==!0)return!0;let o=Object.keys(this.userPermissions).filter(s=>s.startsWith(r+"$")).length;return this.userPermissions[r]==!0&&o==0}},getCache(a,r){return this.loadCache(a),this.caches[a].find(o=>o.id==r)},getCacheList(a){return this.loadCache(a),this.caches[a]},getEnum(a,r){return this.loadEnum(a),r==null?null:this.layout.showI18n?this.$t("Enum_"+a+"_"+r):this.enums[a][r]},getEnumList(a){return this.loadEnum(a),Object.keys(this.enums[a]).map(r=>this.layout.showI18n?{id:r,name:this.$t("Enum_"+a+"_"+r)}:{id:r,name:this.enums[a][r]})},getDict(a,r){return this.loadDict(a),r==null?null:this.layout.showI18n?this.$t("Dict_"+a+"_"+r):this.dicts[a][r]},getDictList(a){return this.loadDict(a),Object.keys(this.dicts[a]).map(r=>this.layout.showI18n?{id:r,name:this.$t("Dict_"+a+"_"+r)}:{id:r,name:this.dicts[a][r]})},getUserName(a){return this.loadUserName(a),this.userNames[a]},getAttachmentUrl(a,r){return a?this.apiBaseURL+"api/Attachment/get?file="+encodeURIComponent(a)+"&name="+encodeURIComponent(r):null},fileDownload(a,r){let o=this.getAttachmentUrl(a,r);o&&(window.location.href=o)},getImgUrl(a){return a?this.apiBaseURL+"api/Attachment/getImage?file="+encodeURIComponent(a):this.rootPath+"images/no-image.png"},showData(a,r){let o=r.code,s=r.dataType,l=r.displayFormat,u=r.digit,c=r.fixedDigit;if(!s)return null;if(s.indexOf("Enum:")===0)return this.getEnum(s.replace("Enum:",""),this.parseData(a,o));if(s==="BigInteger"&&l=="User")return this.getUserName(this.parseData(a,o));let d=this.parseData(a,o);return d==null?null:s==="DateTime"?(l||"").trim()?format$3(new Date(d),l):format$3(new Date(d),"yyyy-MM-dd"):s==="Decimal"||s==="Float"||s==="Double"?(d=parseFloat(d),l==="Money"?this.formatThousand(d.toFixed(2)):l==="Thousand"?this.formatThousand(this.keepDecimal(d,u,c)):l==="Percent"?this.keepDecimal(d,u,c)+"%":this.keepDecimal(d,u,c)):s==="Boolean"?l==="Y"?d?'<i class="fa fa-check info"></i>':"":l==="YN"?d?'<i class="fa fa-check"></i>':'<i class="fa fa-times"></i>':l==="Disabled"?d?'<i class="fa fa-ban error"></i>':"":l==="Valid"?d?'<i class="fa fa-check success"></i>':"":l==="Attention"?d?'<i class="fa fa-exclamation error"></i>':"":d?'<i class="fa fa-check info"></i>':"":s==="String"?l==="Array"?JSON.parse(d).join(", "):this.layout.showI18n?this.tParam(d):d:d},parseData(a,r){return lodash$1.exports.get(a,r)},setData(a,r,o){lodash$1.exports.set(a,r,o)},parseDateTimeData(a,r){let o=this.parseData(a,r);return o==null?"":o},parseArrayData(a,r){let o=[],s=this.parseData(a,r);return this.isJSON(s)&&(o=JSON.parse(s)),o},setArrayData(a,r,o){let s="";o!=null&&(s=JSON.stringify(o)),this.setData(a,r,s)},parseDateRangeData(a,r){let o=[],s=this.parseData(a,r);return this.isJSON(s)&&(o=JSON.parse(s),o[0]=new Date(o[0]),o[1]=new Date(o[1])),o},getTriggers(a){let r=[],o="";for(let s=0;s<a.length;s++)a[s]==" "||a[s]=="+"||a[s]=="-"||a[s]=="*"||a[s]=="/"||a[s]=="("||a[s]==")"||a[s]==">"||a[s]=="<"||a[s]=="!"||a[s]=="&"||a[s]=="|"||a[s]=="="?(o||"").trim()&&(r.push(o),o=""):o+=a[s];return(o||"").trim()&&r.push(o),r},calculate(text,model){if(text==null)return null;text=text.toString();let result="",expression="";for(let a=0;a<text.length;a++)if(text[a]==" "||text[a]=="+"||text[a]=="-"||text[a]=="*"||text[a]=="/"||text[a]=="("||text[a]==")"||text[a]==">"||text[a]=="<"||text[a]=="!"||text[a]=="|"||text[a]=="&"||text[a]=="="||a==text.length-1){if(a==text.length-1&&(expression+=text[a]),(expression||"").trim()){if(!isNaN(expression)||expression.substr(0,1)=="'"||expression.substr(0,1)=='"'||expression=="null")result+=expression;else{let r=this.parseData(model,expression);r==null?result+=expression:isNaN(r)||r.toString().length>16?result+="'"+String(r)+"'":result+=String(r)}expression=""}a!=text.length-1&&(result+=text[a])}else expression+=text[a];let data=null;try{console.log("expression",result),data=eval(result),(data!="NaN"&&String(data)=="NaN"||typeof data=="number"&&(String(data)=="Infinity"||String(data)=="-Infinity"))&&(data=null)}catch(a){}return data},judgeCondition(a,r){if(!a)return!1;if(a.type=="Condition"){for(let o=0;o<a.condition.length;o++){let s=this.parseData(r,a.condition[o].code);s==null&&(s="null");let l=a.condition[o].value;l==null&&(l="");let u=a.condition[o].operator,c=!1;if(u=="Equal"?c=l.split(",").some(d=>String(s)==d):u=="Contains"?c=l.split(",").some(d=>String(s).indexOf(d)!=-1):u=="GreaterThan"?c=s>l:u=="LessThan"?c=s<l:u=="GreaterThanOrEqual"?c=s>=l:u=="LessThanOrEqual"?c=s<=l:u=="NotEqual"&&(c=l.split(",").every(d=>String(s)!=d)),!c)return!1}return!0}else if(a.type=="Expression")return this.calculate(a.expression,r)==!0},confirm(a,r){let o=Swal.fire({title:this.tParam(a),icon:"question",confirmButtonText:this.$t("Front_Btn_OK"),cancelButtonText:this.$t("Front_Btn_Cancel"),showCancelButton:!0});return o.then(s=>{s.value&&typeof r=="function"&&r()}),o},confirmInput(a,r,o,s){let l=Swal.fire({title:this.tParam(a),input:"text",confirmButtonText:this.$t("Front_Btn_OK"),cancelButtonText:this.$t("Front_Btn_Cancel"),inputPlaceholder:r,icon:"question",showCancelButton:!0,preConfirm:s});return l.then(u=>{u.value&&typeof o=="function"&&o()}),l},success(a,r){if(Setting.layout.alertStyle=="Message")this.$Message.success({content:this.tParam(a)}),typeof r=="function"&&r();else if(Setting.layout.alertStyle=="Notice")this.$Notice.success({title:this.tParam(a)}),typeof r=="function"&&r();else{var o=Swal.fire({title:this.tParam(a),icon:"success",confirmButtonText:this.$t("Front_Btn_OK")});return o.then(()=>{typeof r=="function"&&r()}),o}},warning(a,r){if(Setting.layout.alertStyle=="Message")this.$Message.warning({content:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else if(Setting.layout.alertStyle=="Notice")this.$Notice.warning({title:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else{var o=Swal.fire({title:this.tParam(a),icon:"warning",confirmButtonText:this.$t("Front_Btn_OK")});return o.then(()=>{typeof r=="function"&&r()}),o}},error(a,r){if(Setting.layout.alertStyle=="Message")this.$Message.error({content:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else if(Setting.layout.alertStyle=="Notice")this.$Notice.error({title:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else{var o=Swal.fire({title:this.tParam(a),icon:"error",confirmButtonText:this.$t("Front_Btn_OK")});return o.then(()=>{typeof r=="function"&&r()}),o}},getHyperlink(a,r){for(;r.indexOf("{")>=0;){let o=r.indexOf("{"),s=r.indexOf("}"),l=r.substring(o+1,s);r=r.substring(0,o)+this.parseData(a,l)+r.substring(s+1)}return r},keepDecimal(a,r,o){if(r==null)return a;let s=parseFloat(a);return isNaN(s)||isNaN(r)?null:o?s.toFixed(r):Math.round(a*Math.pow(10,r))/Math.pow(10,r)},formatThousand(a){if(a==null)return a;let o=Math.trunc(a).toString().replace(/(\d)(?=(?:\d{3})+$)/g,"$1,"),s=a.toString().split(".");return s.length===2?o+"."+s[1].toString():o},resetNotice(){this.getNotice(this).init()},getNotice(a){return a.$refs.notice!=null?a.$refs.notice:a.$parent!=null?this.getNotice(a.$parent):null},isJSON(a){if((a||"").trim())try{var r=JSON.parse(a);return!!(typeof r=="object"&&r)}catch{return!1}else return!1},tParam(a){let r=a.split("|"),o=r[0];return r.shift(),this.$t(o,r)}}},login_css_vue_type_style_index_0_src_1c48c1b3_scoped_true_lang="",_export_sfc=(a,r)=>{const o=a.__vccOpts||a;for(const[s,l]of r)o[s]=l;return o};const _sfc_main$1r={mixins:[mixinPage],components:{},data(){return{username:"",password:"",autoLogin:!0}},created(){},computed:{},methods:{...mapActions("admin/account",["login"]),async submit(a){if(a){var r=window.event?a.keyCode:a.which;if(!r||r!==0&&r!==1&&r!==13)return}this.username&&this.password&&(await this.login({username:this.username,password:this.password}),setTimeout(()=>{router$1.replace(this.$route.query.redirect||"/home")}))},close(){this.confirm("Front_Sure_To_Exit",()=>{window.location.href="about:blank",window.close()})}}},_withScopeId$1=a=>(require$$0.pushScopeId("data-v-1c48c1b3"),a=a(),require$$0.popScopeId(),a),_hoisted_1$1b={class:"signIn"},_hoisted_2$H={class:"box cf"},_hoisted_3$C={class:"right"},_hoisted_4$q={class:"logo cf"},_hoisted_5$j=["src"],_hoisted_6$f=_withScopeId$1(()=>require$$0.createElementVNode("small",null,null,-1)),_hoisted_7$c=["placeholder"],_hoisted_8$b=["placeholder"],_hoisted_9$9={class:"cpt"};function _sfc_render$1r(a,r,o,s,l,u){return require$$0.openBlock(),require$$0.createElementBlock("div",_hoisted_1$1b,[require$$0.createElementVNode("div",_hoisted_2$H,[require$$0.createElementVNode("div",{class:"left",style:require$$0.normalizeStyle({background:"url("+a.rootPath+"images/login/signIn-img.png) center center no-repeat","background-size":"cover"})},[require$$0.createElementVNode("h3",null,require$$0.toDisplayString(a.sysInfo.banner),1),require$$0.createElementVNode("p",null,require$$0.toDisplayString(a.sysInfo.subBanner),1)],4),require$$0.createElementVNode("div",_hoisted_3$C,[require$$0.createElementVNode("div",_hoisted_4$q,[require$$0.createElementVNode("img",{src:a.rootPath+"images/login/logo.png"},null,8,_hoisted_5$j),require$$0.createElementVNode("h2",null,require$$0.toDisplayString(a.layout.showI18n?a.$t("Front_Label_Setting_Info_Title"):a.sysInfo.title),1),_hoisted_6$f]),require$$0.withDirectives(require$$0.createElementVNode("input",{type:"text","onUpdate:modelValue":r[0]||(r[0]=c=>l.username=c),onKeyup:r[1]||(r[1]=(...c)=>u.submit&&u.submit(...c)),class:"username",autofocus:"",placeholder:a.$t("Front_Msg_Please_Input_Account")},null,40,_hoisted_7$c),[[require$$0.vModelText,l.username]]),require$$0.withDirectives(require$$0.createElementVNode("input",{type:"password","onUpdate:modelValue":r[2]||(r[2]=c=>l.password=c),onKeyup:r[3]||(r[3]=(...c)=>u.submit&&u.submit(...c)),class:"password",placeholder:a.$t("Front_Msg_Please_Input_Password")},null,40,_hoisted_8$b),[[require$$0.vModelText,l.password]]),require$$0.createCommentVNode(`<div class="remenber">\r
|
|
151
|
+
*/(function(a){(function(){var r=typeof window!="undefined"&&typeof window.document!="undefined"?window.document:{},o=a.exports,s=typeof Element!="undefined"&&"ALLOW_KEYBOARD_INPUT"in Element,l=function(){for(var d,f=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],h=0,p=f.length,v={};h<p;h++)if(d=f[h],d&&d[1]in r){for(h=0;h<d.length;h++)v[f[0][h]]=d[h];return v}return!1}(),u={change:l.fullscreenchange,error:l.fullscreenerror},c={request:function(d){return new Promise(function(f,h){var p=l.requestFullscreen,v=function(){this.off("change",v),f()}.bind(this);this.on("change",v),d=d||r.documentElement;var g;/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)?g=d[p]():g=d[p](s?Element.ALLOW_KEYBOARD_INPUT:{}),Promise.resolve(g).catch(h)}.bind(this))},exit:function(){return new Promise(function(d){if(!this.isFullscreen){d();return}var f=function(){this.off("change",f),d()}.bind(this);r[l.exitFullscreen](),this.on("change",f)}.bind(this))},toggle:function(d){return this.isFullscreen?this.exit():this.request(d)},onchange:function(d){this.on("change",d)},onerror:function(d){this.on("error",d)},on:function(d,f){var h=u[d];h&&r.addEventListener(h,f,!1)},off:function(d,f){var h=u[d];h&&r.removeEventListener(h,f,!1)},raw:l};if(!l){o?a.exports=!1:window.screenfull=!1;return}Object.defineProperties(c,{isFullscreen:{get:function(){return Boolean(r[l.fullscreenElement])}},element:{enumerable:!0,get:function(){return r[l.fullscreenElement]}},enabled:{enumerable:!0,get:function(){return Boolean(r[l.fullscreenEnabled])}}}),o?(a.exports=c,a.exports.default=c):window.screenfull=c})()})(screenfull$1);var screenfull=screenfull$1.exports,layout$4={namespaced:!0,state:{...Setting.layout,isMobile:!1,isTablet:!1,isDesktop:!0,isFullscreen:!1,bodyHeight:0,waterMark:Setting.waterMark},mutations:{setDevice(a,r){a.isMobile=!1,a.isTablet=!1,a.isDesktop=!1,a[`is${r}`]=!0},updateMenuCollapse(a,r){a.menuCollapse=r},setFullscreen(a,r){a.isFullscreen=r},updateLayoutSetting(a,{key:r,value:o}){a[r]=o},setBodyHeight(a,r){a.bodyHeight=r},updateWaterMarkStatus(a,r){a.waterMark.show=r},updateWaterMarkText(a,r){a.waterMark.text=r},updateWaterMarkOptions(a,r){a.waterMark.options=r}},actions:{toggleFullscreen({commit:a}){return new Promise(r=>{screenfull.isFullscreen?(screenfull.exit(),a("setFullscreen",!1)):(screenfull.request(),a("setFullscreen",!0)),r()})}}},__glob_0_5=Object.freeze(Object.defineProperty({__proto__:null,default:layout$4},Symbol.toStringTag,{value:"Module"})),loader={namespaced:!0,state:{count:0,enabled:!0,isLoading:!1},mutations:{start(a){a.count++,a.isLoading=!0},end(a){a.count--,a.isLoading=a.count>0},disable(a){a.enabled=!1},enable(a){a.enabled=!0}}},__glob_0_6=Object.freeze(Object.defineProperty({__proto__:null,default:loader},Symbol.toStringTag,{value:"Module"})),log$2={namespaced:!0,state:{log:[]},getters:{length(a){return a.log.length},lengthError(a){return a.log.filter(r=>r.type==="error").length}},actions:{push({rootState:a,commit:r},{message:o,type:s="info",meta:l}){r("push",{message:o,type:s,time:format$3(new Date,"yyyy-MM-dd HH:mm:ss"),meta:{user:a.admin.user.info,uuid:util$8.cookies.get("uuid"),token:util$8.cookies.get("token"),url:lodash$1.exports.get(window,"location.href",""),...l}})}},mutations:{push(a,r){a.log.push(r)},clean(a){a.log=[]}}},__glob_0_7=Object.freeze(Object.defineProperty({__proto__:null,default:log$2},Symbol.toStringTag,{value:"Module"}));function getHeaderName(a,r){const o=[];r.forEach(l=>{const u=l.header||"",c=transferMenu(l,u);o.push({path:l.path,header:u}),c.forEach(d=>o.push(d))});const s=o.find(l=>l.path===a);return s?s.header:null}function transferMenu(a,r){return a.children&&a.children.length?a.children.reduce((o,s)=>{o.push({path:s.path,header:r});const l=transferMenu(s,r);return o.concat(l)},[]):[a]}function getMenuSider(a,r=""){return r?a.filter(o=>o.header===r):a}function getSiderSubmenu(a,r){const o=[];r.forEach(l=>{const u=transferSubMenu(l,[]);o.push({path:l.path,openNames:[]}),u.forEach(c=>o.push(c))});const s=o.find(l=>l.path===a);return s?s.openNames:[]}function transferSubMenu(a,r){if(a.children&&a.children.length){const o=r.concat([a.path]);return a.children.reduce((s,l)=>{s.push({path:l.path,openNames:o});const u=transferSubMenu(l,o);return s.concat(u)},[])}else return[a].map(o=>({path:o.path,openNames:r}))}function getAllSiderMenu(a){let r=[];return a.forEach(o=>{o.children&&o.children.length?getMenuChildren(o).forEach(l=>r.push(l)):r.push(o)}),r}function getMenuChildren(a){return a.children&&a.children.length?a.children.reduce((r,o)=>{const s=getMenuChildren(o);return r.concat(s)},[]):[a]}function flattenSiderMenu(a,r){return a.forEach(o=>{let s={};for(let l in o)l!=="children"&&(s[l]=lodash$1.exports.cloneDeep(o[l]));r.push(s),o.children&&flattenSiderMenu(o.children,r)}),r}function includeArray(a,r){let o=!1;return r.forEach(s=>{a.includes(s)&&(o=!0)}),o}function setNativeMenuSider(a){a?localStorage.setItem(`admin-plus-${Setting.appID}-menu-sider`,JSON.stringify(a)):localStorage.removeItem(`admin-plus-${Setting.appID}-menu-sider`)}function getNativeMenuSider(){return JSON.parse(localStorage.getItem(`admin-plus-${Setting.appID}-menu-sider`)||"[]")}function getNativeMenuHeader(){return JSON.parse(localStorage.getItem(`admin-plus-${Setting.appID}-menu-header`)||"[]")}function setNativePermission(a){a?localStorage.setItem(`admin-plus-${Setting.appID}-permission`,JSON.stringify(a)):localStorage.removeItem(`admin-plus-${Setting.appID}-permission`)}function getNativePermission(){return JSON.parse(localStorage.getItem(`admin-plus-${Setting.appID}-permission`)||"[]")}const res$k="Permission";var permissionApi={query(){return service({url:`api/${res$k}/query`,method:"get",params:{clientType:"Admin"}})},queryByRoleID(a,r){return service({url:`api/${res$k}/queryByRoleID`,method:"get",params:{roleID:a,clientType:r}})},queryRouter(){return service({url:`api/${res$k}/queryRouter`,method:"get",params:{clientType:"Admin"}})},async exportFile(a){const r=await service({url:`api/${res$k}/exportFile`,method:"post",responseType:"blob",data:{ids:a}}),o=new Blob([r],{type:"application/octet-stream"});saveAs(o,"Permission-"+format$3(new Date,"yyyyMMddHHmmss")+".pms")}};function convertMenu(a){if(!a)return null;var r=/(http|https):\/\/([\w.]+\/?)\S*/;return a.map(o=>({path:r.test(o.url)?o.url:"/"+o.url.split("?")[0],code:o.url,title:o.name,subTitle:o.subName,target:o.isNewWindow?"_blank":null,header:"home",custom:o.icon,children:convertMenu(o.subPermissions)}))}var menu={namespaced:!0,state:{header:[],sider:[],headerName:"",activePath:"",openNames:[],menuSider:[],siderMenuBadge:[],headerMenuBadge:[],userPermissions:null},getters:{filterSider(a){return a.sider},filterHeader(a,r,o){const l=o.admin.user.info.access;return l&&l.length?a.header.filter(u=>{let c=!0;return u.auth&&!includeArray(u.auth,l)&&(c=!1),u.children&&u.children.length&&(u.children=u.children.filter(d=>{let f=!0;return d.auth&&!includeArray(d.auth,l)&&(f=!1),f})),c}):a.header.filter(u=>{let c=!0;return u.auth&&u.auth.length&&(c=!1),u.children&&u.children.length&&(u.children=u.children.filter(d=>{let f=!0;return d.auth&&d.auth.length&&(f=!1),f})),c})},currentHeader(a){return a.header.find(r=>r.name===a.headerName)},hideSider(a,r){let o=!1;return r.currentHeader&&"hideSider"in r.currentHeader&&(o=r.currentHeader.hideSider),o},permission(a){return a.userPermissions}},mutations:{setSider(a,r){a.sider=r},setHeader(a,r){a.header=r},setHeaderName(a,r){a.headerName=r},setActivePath(a,r){a.activePath=r},setOpenNames(a,r){a.openNames=r},setMenuSider(a,r){a.menuSider=r},setAllSiderMenuBadge(a,r){a.siderMenuBadge=r},setSiderMenuBadge(a,{path:r,badge:o}){const s=lodash$1.exports.cloneDeep(a.siderMenuBadge),l=s.findIndex(u=>u.path===r);l>=0?(s[l]=o,a.siderMenuBadge=s):a.siderMenuBadge.push(o)},removeSiderMenuBadge(a,r){const o=a.siderMenuBadge.findIndex(s=>s.path===r);o>=0&&a.siderMenuBadge.splice(o,1)},setAllHeaderMenuBadge(a,r){a.headerMenuBadge=r},setHeaderMenuBadge(a,{path:r,badge:o}){const s=lodash$1.exports.cloneDeep(a.headerMenuBadge),l=s.findIndex(u=>u.path===r);l>=0?(s[l]=o,a.headerMenuBadge=s):a.headerMenuBadge.push(o)},removeHeaderMenuBadge(a,r){const o=a.headerMenuBadge.findIndex(s=>s.path===r);o>=0&&a.headerMenuBadge.splice(o,1)}},actions:{setMenuList({state:a,commit:r},o={}){const s=getNativeMenuHeader();r("setHeader",s);const l=getNativeMenuSider();let u=o.path,c=getHeaderName(u,l);if(c!==null){r("setHeaderName",c),r("setMenuSider",l);const d=getMenuSider(l,c);r("setSider",d),r("setActivePath",o.path);const f=getSiderSubmenu(u,l);r("setOpenNames",f)}a.userPermissions==null&&(a.userPermissions=getNativePermission())},getMenuList({state:a,dispatch:r},o){return new Promise((s,l)=>{permissionApi.query().then(u=>{u.menus.unshift({name:window.$app.$t("Permission_home"),subName:window.$app.$t("Permission_home_SubName"),parentID:null,url:"home",templateUrl:"@/home",icon:"fa fa-home"});let c=convertMenu(u.menus);if(setNativeMenuSider(c),o){const f=o===!0?router$1.currentRoute.value:o;r("setMenuList",f)}let d={};u.permissions.forEach(f=>{d[f]=!0}),a.userPermissions=d,setNativePermission(d),s()}).catch(u=>{l(u)})})}}},__glob_0_8=Object.freeze(Object.defineProperty({__proto__:null,default:menu},Symbol.toStringTag,{value:"Module"}));const pre="/dashboard/";var dashboard={path:"/dashboard",title:"Dashboard",header:"home",custom:"i-icon-demo i-icon-demo-dashboard",children:[{path:`${pre}console`,title:"\u4E3B\u63A7\u53F0"},{path:`${pre}monitor`,title:"\u76D1\u63A7\u9875"},{path:`${pre}workplace`,title:"\u5DE5\u4F5C\u53F0",subtitle:"Workplace"}]},menuSider=[dashboard,{path:"/i18n",title:"menu.i18n",header:"home",custom:"i-icon-demo i-icon-demo-i18n"}];const isKeepAlive=a=>lodash$1.exports.get(a,"meta.cache",!1);var page={namespaced:!0,state:{pool:[],opened:Setting.page.opened,current:"",keepAlive:[]},actions:{openedLoad({state:a,commit:r,dispatch:o,rootState:s},{loadOpenedTabs:l=!0}){return new Promise(async u=>{let c=await o("admin/db/get",{dbName:"sys",path:"page.opened",defaultValue:Setting.page.opened,user:!0},{root:!0});l||(c=[]);const d=[];a.opened=c.map(f=>{if(f.fullPath==="/index")return d.push(1),f;const h=a.pool.find(p=>p.name===f.name);return f.keepMeta&&(h.meta=Object.assign({},f.meta)),d.push(h?1:0),Object.assign({},f,h)}).filter((f,h)=>d[h]===1).filter(f=>{const p=getAllSiderMenu(menuSider).find(g=>g.path===f.fullPath);let v=!0;if(p&&p.auth){const g=s.admin.user.info,y=lodash$1.exports.cloneDeep(g.access);y.push("hidden"),y&&!includeArray(p.auth,y)&&(v=!1)}return v}),r("keepAliveRefresh"),u()})},opened2db({state:a,dispatch:r}){return new Promise(async o=>{r("admin/db/set",{dbName:"sys",path:"page.opened",value:a.opened,user:!0},{root:!0}),o()})},openedUpdate({state:a,dispatch:r},{index:o,params:s,query:l,fullPath:u,pageName:c,meta:d,keepMeta:f=!1}){return new Promise(async h=>{let p=a.opened[o];p.params=s||p.params,p.query=l||p.query,p.fullPath=u||p.fullPath,p.pageName=c||p.pageName,p.meta=d||p.meta,p.keepMeta=f,a.opened.splice(o,1,p),await r("opened2db"),h()})},currentUpdate({state:a,dispatch:r},{params:o,query:s,fullPath:l,pageName:u,meta:c,keepMeta:d=!1}){return new Promise(async f=>{setTimeout(async()=>{const h=a.opened.findIndex(v=>v.fullPath===a.current);let p=a.opened[h];p.params=o||p.params,p.query=s||p.query,p.fullPath=l||p.fullPath,p.pageName=u||p.pageName,p.meta=c||p.meta,p.keepMeta=d,a.opened.splice(h,1,p),await r("opened2db"),f()},0)})},add({state:a,commit:r,dispatch:o},{tag:s,params:l,query:u,fullPath:c,pageName:d}){return new Promise(async f=>{let h=s;h.params=l||h.params,h.query=u||h.query,h.fullPath=c||h.fullPath,h.pageName=d||h.pageName,a.opened.push(h),isKeepAlive(h)&&r("keepAliveRefresh"),await o("opened2db"),f()})},open({state:a,commit:r,dispatch:o},{name:s,params:l,query:u,path:c,fullPath:d}){const f=router$1.getRoutes().find(h=>h.path==c).components.default.name;return new Promise(async h=>{setTimeout(async()=>{let p=a.opened,v=0;if(p.find((y,$)=>{const _=y.fullPath===d;return v=_?$:v,_}))await o("openedUpdate",{index:v,params:l,query:u,fullPath:d,pageName:f});else{let y=a.pool.find($=>$.name===s);y&&await o("add",{tag:Object.assign({},y),params:l,query:u,fullPath:d,pageName:f})}r("currentSet",d)}),h()})},close({state:a,commit:r,dispatch:o},{tagName:s}){return new Promise(async l=>{let u=a.opened[0];const c=a.current===s;if(c){let f=a.opened.length;for(let h=0;h<f;h++)if(a.opened[h].fullPath===s){f>1?h===f-1?u=a.opened[h-1]:u=a.opened[h+1]:u={};break}}const d=a.opened.findIndex(f=>f.fullPath===s);if(d>=0&&a.opened.splice(d,1),r("keepAliveRefresh"),await o("opened2db"),c){const{name:f="index",params:h={},query:p={}}=u;let v={name:f,params:h,query:p};router$1.push(v,()=>{})}l()})},closeLeft({state:a,commit:r,dispatch:o},{pageSelect:s}={}){return new Promise(async l=>{const u=s||a.current;let c=0;a.opened.forEach((d,f)=>{d.fullPath===u&&(c=f)}),c>0&&a.opened.splice(1,c-1),r("keepAliveRefresh"),a.current=u,router$1.currentRoute.value.fullPath!==u&&router$1.push(u),await o("opened2db"),l()})},closeRight({state:a,commit:r,dispatch:o},{pageSelect:s}={}){return new Promise(async l=>{const u=s||a.current;let c=0;a.opened.forEach((d,f)=>{d.fullPath===u&&(c=f)}),a.opened.splice(c+1),r("keepAliveRefresh"),a.current=u,router$1.currentRoute.value.fullPath!==u&&router$1.push(u),await o("opened2db"),l()})},closeOther({state:a,commit:r,dispatch:o},{pageSelect:s}={}){return new Promise(async l=>{const u=s||a.current;let c=0;a.opened.forEach((d,f)=>{d.fullPath===u&&(c=f)}),c===0?a.opened.splice(1):(a.opened.splice(c+1),a.opened.splice(1,c-1)),r("keepAliveRefresh"),a.current=u,router$1.currentRoute.value.fullPath!==u&&router$1.push(u),await o("opened2db"),l()})},closeAll({state:a,commit:r,dispatch:o}){return new Promise(async s=>{a.opened.splice(1),r("keepAliveRefresh"),await o("opened2db"),router$1.currentRoute.value.name!=="index"&&router$1.push({name:"index"},()=>{}),s()})},updateOpened({state:a,dispatch:r},{opened:o}){return new Promise(async s=>{a.opened=o,await r("opened2db"),s()})}},mutations:{keepAliveRefresh(a){a.keepAlive=a.opened.filter(r=>isKeepAlive(r)).map(r=>r.pageName)},currentSet(a,r){a.current=r},init(a,r){const o=[];r.forEach(s=>{const{meta:l,name:u,path:c}=s;o.push({meta:l,name:u,path:c})}),a.pool=o}}},__glob_0_9=Object.freeze(Object.defineProperty({__proto__:null,default:page},Symbol.toStringTag,{value:"Module"})),user$1={namespaced:!0,state:{info:{},data:{}},actions:{set({state:a,dispatch:r},o){return new Promise(async s=>{a.info=o,await r("admin/db/set",{dbName:"sys",path:"user.info",value:o,user:!0},{root:!0}),s()})},setData({state:a,dispatch:r},o){return new Promise(async s=>{a.data=o,await r("admin/db/set",{dbName:"sys",path:"user.data",value:o,user:!0},{root:!0}),s()})},load({state:a,dispatch:r}){return new Promise(async o=>{a.info=await r("admin/db/get",{dbName:"sys",path:"user.info",defaultValue:{},user:!0},{root:!0}),a.data=await r("admin/db/get",{dbName:"sys",path:"user.data",defaultValue:{},user:!0},{root:!0}),o()})}}},__glob_0_10=Object.freeze(Object.defineProperty({__proto__:null,default:user$1},Symbol.toStringTag,{value:"Module"}));const res$j="CustomPage";var customPageApi={get(a){return service({url:`api/${res$j}/get`,method:"get",params:{id:a}})}},viewPage$1={namespaced:!0,state:{pages:{}},getters:{get:a=>r=>a.pages[r]},actions:{async load({state:a},r){if(r in a.pages)return a.pages[r];{let o=await customPageApi.get(r);return o&&(a.pages[r]=o),o}}}},__glob_0_11=Object.freeze(Object.defineProperty({__proto__:null,default:viewPage$1},Symbol.toStringTag,{value:"Module"}));const files$1={"./modules/account.js":__glob_0_0,"./modules/cache.js":__glob_0_1,"./modules/dataView.js":__glob_0_2,"./modules/db.js":__glob_0_3,"./modules/i18n.js":__glob_0_4,"./modules/layout.js":__glob_0_5,"./modules/loader.js":__glob_0_6,"./modules/log.js":__glob_0_7,"./modules/menu.js":__glob_0_8,"./modules/page.js":__glob_0_9,"./modules/user.js":__glob_0_10,"./modules/viewPage.js":__glob_0_11},modules={};Object.keys(files$1).forEach(a=>{modules[a.replace(/(\.\/modules\/|\.js)/g,"")]=files$1[a].default});var admin={namespaced:!0,modules},store=createStore({modules:{admin}}),dynamic={async init(a,r){let o=await permissionApi.queryRouter();const s=a.getRoutes().find(l=>l.path=="/");o.forEach(l=>{var u;if(l.isCustomPage&&(l.url+="?id="+l.customPageID,l.customPage.customPageTemplate&&(l.templateUrl="template/"+l.customPage.customPageTemplate.substr(0,1).toLowerCase()+l.customPage.customPageTemplate.substr(1)+".vue")),(l.templateUrl||"").trim()){const c=((u=l.url)==null?void 0:u.split("?")[0])||"",d=c.replace(/\//g,"-"),f={};l.url&&l.url.split("?").length>1&&l.url.split("?")[1].split("&").forEach(h=>{h.split("=").length>1&&h.split("=")[0].length>0&&(f[h.split("=")[0]]=h.split("=")[1])}),s.children.push({path:c,name:d,meta:{title:getNameI18n(l),description:getDescI18n(l),data:f,auth:!0,cache:!0},component:()=>new Promise(h=>{h(r[l.templateUrl])})})}}),a.removeRoute("root"),a.addRoute(s),a.addRoute({path:"/:pathMatch(.*)",name:"404",meta:{title:"404"},component:()=>new Promise(l=>{l(r["system/error/404.vue"])})})}};function getNameI18n(a){if(Setting.layout.showI18n){let r="Permission_"+a.url.split("?")[0],o=window.$app.$t(r);return o==r?a.name:o}else return a.name}function getDescI18n(a){if(Setting.layout.showI18n){let r="Permission_"+a.url.split("?")[0]+"_SubName",o=window.$app.$t(r);return o==r?a.subName:o}else return a.subName}const base$1="admin",router=createRouter({history:Setting.routerMode==="history"?createWebHistory(base$1):Setting.routerMode==="hash"?createWebHashHistory(base$1):createMemoryHistory(base$1),routes:[]});let inited=!1;const initRouter=(a,r)=>{r.forEach(o=>{router.addRoute(o)}),Setting.rootPath="/"+base$1+"/static/",router.beforeEach(async(o,s,l)=>{if(Setting.showProgressBar&&ViewUIPlus__default.default.LoadingBar.start(),store.dispatch("admin/menu/setMenuList",o),!inited)await dynamic.init(router,a),store.commit("admin/page/init",router.getRoutes()),store.dispatch("admin/page/openedLoad",{loadOpenedTabs:!0},{root:!0}),inited=!0,l({...o,replace:!0});else if(o.matched.some(u=>u.meta.auth)){const u=util$8.cookies.get("token");u&&u!=="undefined"?store.getters["admin/menu/permission"][o.path.substring(1)]?l():l({path:"home"}):l({name:"login",query:{redirect:o.fullPath}})}else l()}),router.afterEach(o=>{Setting.showProgressBar&&ViewUIPlus__default.default.LoadingBar.finish(),Setting.layout.tabs&&store.dispatch("admin/page/open",o),window.document.title=window.$app.$t(o.meta.title)+" - "+Setting.info.title,window.scrollTo(0,0)})};var router$1=router,mixinPage={data(){return{grid4:{xxl:4,xl:4,lg:4,md:6,sm:12,xs:24},grid6:{xxl:6,xl:6,lg:8,md:12,sm:12,xs:24},grid8:{xxl:8,xl:8,lg:8,md:12,sm:24,xs:24},grid12:{xxl:12,xl:12,lg:12,md:12,sm:24,xs:24},grid16:{xxl:16,xl:16,lg:16,md:24,sm:24,xs:24},grid18:{xxl:18,xl:18,lg:18,md:24,sm:24,xs:24},grid24:{xxl:24,xl:24,lg:24,md:24,sm:24,xs:24}}},computed:{...mapState("admin/user",["info"]),...mapState("admin/cache",["userNames","enums","dicts","caches"]),...mapState("admin/menu",["userPermissions"]),rootPath(){return Setting.rootPath},sysInfo(){return Setting.info},layout(){return Setting.layout},apiBaseURL(){return window.$mode==="development"?Setting.apiBaseURL.dev:Setting.apiBaseURL.prd},uploadURL(){return this.apiBaseURL+"api/Attachment/add"},uploadHeaders(){const a=util$8.cookies.get("token");return{Authorization:"Bearer "+a}}},methods:{...mapActions("admin/cache",["loadEnum","loadDict","loadUserName","loadCache"]),copy(a){return lodash$1.exports.cloneDeep(a)},allow(a){if(a.startsWith("permission/"))return this.userPermissions[a];{let r=router$1.currentRoute.value.fullPath.substr(1);if(this.userPermissions[r+"$"+a]==!0)return!0;let o=Object.keys(this.userPermissions).filter(s=>s.startsWith(r+"$")).length;return this.userPermissions[r]==!0&&o==0}},getCache(a,r){return this.loadCache(a),this.caches[a].find(o=>o.id==r)},getCacheList(a){return this.loadCache(a),this.caches[a]},getEnum(a,r){return this.loadEnum(a),r==null?null:this.layout.showI18n?this.$t("Enum_"+a+"_"+r):this.enums[a][r]},getEnumList(a){return this.loadEnum(a),Object.keys(this.enums[a]).map(r=>this.layout.showI18n?{id:r,name:this.$t("Enum_"+a+"_"+r)}:{id:r,name:this.enums[a][r]})},getDict(a,r){return this.loadDict(a),r==null?null:this.layout.showI18n?this.$t("Dict_"+a+"_"+r):this.dicts[a][r]},getDictList(a){return this.loadDict(a),Object.keys(this.dicts[a]).map(r=>this.layout.showI18n?{id:r,name:this.$t("Dict_"+a+"_"+r)}:{id:r,name:this.dicts[a][r]})},getUserName(a){return this.loadUserName(a),this.userNames[a]},getAttachmentUrl(a,r){return a?this.apiBaseURL+"api/Attachment/get?file="+encodeURIComponent(a)+"&name="+encodeURIComponent(r):null},fileDownload(a,r){let o=this.getAttachmentUrl(a,r);o&&(window.location.href=o)},getImgUrl(a){return a?this.apiBaseURL+"api/Attachment/getImage?file="+encodeURIComponent(a):this.rootPath+"images/no-image.png"},showData(a,r){let o=r.code,s=r.dataType,l=r.displayFormat,u=r.digit,c=r.fixedDigit;if(!s)return null;if(s.indexOf("Enum:")===0)return this.getEnum(s.replace("Enum:",""),this.parseData(a,o));if(s==="BigInteger"&&l=="User")return this.getUserName(this.parseData(a,o));let d=this.parseData(a,o);return d==null?null:s==="DateTime"?(l||"").trim()?format$3(new Date(d),l):format$3(new Date(d),"yyyy-MM-dd"):s==="Decimal"||s==="Float"||s==="Double"?(d=parseFloat(d),l==="Money"?this.formatThousand(d.toFixed(2)):l==="Thousand"?this.formatThousand(this.keepDecimal(d,u,c)):l==="Percent"?this.keepDecimal(d,u,c)+"%":this.keepDecimal(d,u,c)):s==="Boolean"?l==="Y"?d?'<i class="fa fa-check info"></i>':"":l==="YN"?d?'<i class="fa fa-check"></i>':'<i class="fa fa-times"></i>':l==="Disabled"?d?'<i class="fa fa-ban error"></i>':"":l==="Valid"?d?'<i class="fa fa-check success"></i>':"":l==="Attention"?d?'<i class="fa fa-exclamation error"></i>':"":d?'<i class="fa fa-check info"></i>':"":s==="String"?l==="Array"?JSON.parse(d).join(", "):this.layout.showI18n?this.tParam(d):d:d},parseData(a,r){return lodash$1.exports.get(a,r)},setData(a,r,o){lodash$1.exports.set(a,r,o)},parseDateTimeData(a,r){let o=this.parseData(a,r);return o==null?"":o},parseArrayData(a,r){let o=[],s=this.parseData(a,r);return this.isJSON(s)&&(o=JSON.parse(s)),o},setArrayData(a,r,o){let s="";o!=null&&(s=JSON.stringify(o)),this.setData(a,r,s)},parseDateRangeData(a,r){let o=[],s=this.parseData(a,r);return this.isJSON(s)&&(o=JSON.parse(s),o[0]=new Date(o[0]),o[1]=new Date(o[1])),o},getTriggers(a){let r=[],o="";for(let s=0;s<a.length;s++)a[s]==" "||a[s]=="+"||a[s]=="-"||a[s]=="*"||a[s]=="/"||a[s]=="("||a[s]==")"||a[s]==">"||a[s]=="<"||a[s]=="!"||a[s]=="&"||a[s]=="|"||a[s]=="="?(o||"").trim()&&(r.push(o),o=""):o+=a[s];return(o||"").trim()&&r.push(o),r},calculate(text,model){if(text==null)return null;text=text.toString();let result="",expression="";for(let a=0;a<text.length;a++)if(text[a]==" "||text[a]=="+"||text[a]=="-"||text[a]=="*"||text[a]=="/"||text[a]=="("||text[a]==")"||text[a]==">"||text[a]=="<"||text[a]=="!"||text[a]=="|"||text[a]=="&"||text[a]=="="||a==text.length-1){if(a==text.length-1&&(expression+=text[a]),(expression||"").trim()){if(!isNaN(expression)||expression.substr(0,1)=="'"||expression.substr(0,1)=='"'||expression=="null")result+=expression;else{let r=this.parseData(model,expression);r==null?result+=expression:isNaN(r)||r.toString().length>16?result+="'"+String(r)+"'":result+=String(r)}expression=""}a!=text.length-1&&(result+=text[a])}else expression+=text[a];let data=null;try{console.log("expression",result),data=eval(result),(data!="NaN"&&String(data)=="NaN"||typeof data=="number"&&(String(data)=="Infinity"||String(data)=="-Infinity"))&&(data=null)}catch(a){}return data},judgeCondition(a,r){if(!a)return!1;if(a.type=="Condition"){for(let o=0;o<a.condition.length;o++){let s=this.parseData(r,a.condition[o].code);s==null&&(s="null");let l=a.condition[o].value;l==null&&(l="");let u=a.condition[o].operator,c=!1;if(u=="Equal"?c=l.split(",").some(d=>String(s)==d):u=="Contains"?c=l.split(",").some(d=>String(s).indexOf(d)!=-1):u=="GreaterThan"?c=s>l:u=="LessThan"?c=s<l:u=="GreaterThanOrEqual"?c=s>=l:u=="LessThanOrEqual"?c=s<=l:u=="NotEqual"&&(c=l.split(",").every(d=>String(s)!=d)),!c)return!1}return!0}else if(a.type=="Expression")return this.calculate(a.expression,r)==!0},confirm(a,r){let o=Swal.fire({title:this.tParam(a),icon:"question",confirmButtonText:this.$t("Front_Btn_OK"),cancelButtonText:this.$t("Front_Btn_Cancel"),showCancelButton:!0});return o.then(s=>{s.value&&typeof r=="function"&&r()}),o},confirmInput(a,r,o,s){let l=Swal.fire({title:this.tParam(a),input:"text",confirmButtonText:this.$t("Front_Btn_OK"),cancelButtonText:this.$t("Front_Btn_Cancel"),inputPlaceholder:r,icon:"question",showCancelButton:!0,preConfirm:s});return l.then(u=>{u.value&&typeof o=="function"&&o()}),l},success(a,r){if(Setting.layout.alertStyle=="Message")this.$Message.success({content:this.tParam(a)}),typeof r=="function"&&r();else if(Setting.layout.alertStyle=="Notice")this.$Notice.success({title:this.tParam(a)}),typeof r=="function"&&r();else{var o=Swal.fire({title:this.tParam(a),icon:"success",confirmButtonText:this.$t("Front_Btn_OK")});return o.then(()=>{typeof r=="function"&&r()}),o}},warning(a,r){if(Setting.layout.alertStyle=="Message")this.$Message.warning({content:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else if(Setting.layout.alertStyle=="Notice")this.$Notice.warning({title:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else{var o=Swal.fire({title:this.tParam(a),icon:"warning",confirmButtonText:this.$t("Front_Btn_OK")});return o.then(()=>{typeof r=="function"&&r()}),o}},error(a,r){if(Setting.layout.alertStyle=="Message")this.$Message.error({content:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else if(Setting.layout.alertStyle=="Notice")this.$Notice.error({title:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else{var o=Swal.fire({title:this.tParam(a),icon:"error",confirmButtonText:this.$t("Front_Btn_OK")});return o.then(()=>{typeof r=="function"&&r()}),o}},getHyperlink(a,r){for(;r.indexOf("{")>=0;){let o=r.indexOf("{"),s=r.indexOf("}"),l=r.substring(o+1,s);r=r.substring(0,o)+this.parseData(a,l)+r.substring(s+1)}return r},keepDecimal(a,r,o){if(r==null)return a;let s=parseFloat(a);return isNaN(s)||isNaN(r)?null:o?s.toFixed(r):Math.round(a*Math.pow(10,r))/Math.pow(10,r)},formatThousand(a){if(a==null)return a;let o=Math.trunc(a).toString().replace(/(\d)(?=(?:\d{3})+$)/g,"$1,"),s=a.toString().split(".");return s.length===2?o+"."+s[1].toString():o},resetNotice(){this.getNotice(this).init()},getNotice(a){return a.$refs.notice!=null?a.$refs.notice:a.$parent!=null?this.getNotice(a.$parent):null},isJSON(a){if((a||"").trim())try{var r=JSON.parse(a);return!!(typeof r=="object"&&r)}catch{return!1}else return!1},tParam(a){let r=a.split("|"),o=r[0];return r.shift(),this.$t(o,r)}}},login_css_vue_type_style_index_0_src_1c48c1b3_scoped_true_lang="",_export_sfc=(a,r)=>{const o=a.__vccOpts||a;for(const[s,l]of r)o[s]=l;return o};const _sfc_main$1r={mixins:[mixinPage],components:{},data(){return{username:"",password:"",autoLogin:!0}},created(){},computed:{},methods:{...mapActions("admin/account",["login"]),async submit(a){if(a){var r=window.event?a.keyCode:a.which;if(!r||r!==0&&r!==1&&r!==13)return}this.username&&this.password&&(await this.login({username:this.username,password:this.password}),setTimeout(()=>{router$1.replace(this.$route.query.redirect||"/home")}))},close(){this.confirm("Front_Sure_To_Exit",()=>{window.location.href="about:blank",window.close()})}}},_withScopeId$1=a=>(require$$0.pushScopeId("data-v-1c48c1b3"),a=a(),require$$0.popScopeId(),a),_hoisted_1$1b={class:"signIn"},_hoisted_2$H={class:"box cf"},_hoisted_3$C={class:"right"},_hoisted_4$q={class:"logo cf"},_hoisted_5$j=["src"],_hoisted_6$f=_withScopeId$1(()=>require$$0.createElementVNode("small",null,null,-1)),_hoisted_7$c=["placeholder"],_hoisted_8$b=["placeholder"],_hoisted_9$9={class:"cpt"};function _sfc_render$1r(a,r,o,s,l,u){return require$$0.openBlock(),require$$0.createElementBlock("div",_hoisted_1$1b,[require$$0.createElementVNode("div",_hoisted_2$H,[require$$0.createElementVNode("div",{class:"left",style:require$$0.normalizeStyle({background:"url("+a.rootPath+"images/login/signIn-img.png) center center no-repeat","background-size":"cover"})},[require$$0.createElementVNode("h3",null,require$$0.toDisplayString(a.sysInfo.banner),1),require$$0.createElementVNode("p",null,require$$0.toDisplayString(a.sysInfo.subBanner),1)],4),require$$0.createElementVNode("div",_hoisted_3$C,[require$$0.createElementVNode("div",_hoisted_4$q,[require$$0.createElementVNode("img",{src:a.rootPath+"images/login/logo.png"},null,8,_hoisted_5$j),require$$0.createElementVNode("h2",null,require$$0.toDisplayString(a.layout.showI18n?a.$t("Front_Label_Setting_Info_Title"):a.sysInfo.title),1),_hoisted_6$f]),require$$0.withDirectives(require$$0.createElementVNode("input",{type:"text","onUpdate:modelValue":r[0]||(r[0]=c=>l.username=c),onKeyup:r[1]||(r[1]=(...c)=>u.submit&&u.submit(...c)),class:"username",autofocus:"",placeholder:a.$t("Front_Msg_Please_Input_Account")},null,40,_hoisted_7$c),[[require$$0.vModelText,l.username]]),require$$0.withDirectives(require$$0.createElementVNode("input",{type:"password","onUpdate:modelValue":r[2]||(r[2]=c=>l.password=c),onKeyup:r[3]||(r[3]=(...c)=>u.submit&&u.submit(...c)),class:"password",placeholder:a.$t("Front_Msg_Please_Input_Password")},null,40,_hoisted_8$b),[[require$$0.vModelText,l.password]]),require$$0.createCommentVNode(`<div class="remenber">\r
|
|
152
152
|
<label for="remenber" class="remenber1"><input type="checkbox" ng-model="remember">\u8BB0\u4F4F\u6211</label>\r
|
|
153
153
|
</div>`),require$$0.createElementVNode("button",{type:"button",onClick:r[4]||(r[4]=c=>u.submit()),class:"sign-in"},require$$0.toDisplayString(a.$t("Front_Btn_Login")),1),require$$0.createElementVNode("button",{type:"button",onClick:r[5]||(r[5]=(...c)=>u.close&&u.close(...c)),class:"exit"},require$$0.toDisplayString(a.$t("Front_Btn_Exit")),1)])]),require$$0.createElementVNode("div",_hoisted_9$9,require$$0.toDisplayString(a.sysInfo.copyright),1)])}var login=_export_sfc(_sfc_main$1r,[["render",_sfc_render$1r],["__scopeId","data-v-1c48c1b3"],["__file","D:/Project/Mooho/FrontEnd/mooho-base-admin-plus/src/pages/account/login.vue"]]),__glob_44_0=Object.freeze(Object.defineProperty({__proto__:null,default:login},Symbol.toStringTag,{value:"Module"}));const res$i="Shortcut";var shortcutApi={queryMy(){return service({url:`api/${res$i}/queryMy`,method:"post",data:{}})},save(a){return service({url:`api/${res$i}/save`,method:"post",data:a})}},shortcut_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$1q={name:"home",mixins:[mixinPage],components:{},data(){return{shortcuts:[],colors:["#69C0FF","#95DE64","#FFD666","#FF9C6E","#B37FEB","#5CDBD3","#DC143C","#FF85C0","#FFC069"]}},async mounted(){const a=await shortcutApi.queryMy();this.shortcuts=a},methods:{async setting(){let a=this.copy(this.shortcuts);this.$refs.shortcutSetting.loadData(a),this.$refs.shortcutSetting.open()},up(a,r){let o=this.$refs.shortcutSetting.data;r>0&&(o.splice(r,1),o.splice(r-1,0,a),this.$refs.shortcutSetting.loadData(o))},down(a,r){let o=this.$refs.shortcutSetting.data;r<o.length-1&&(o.splice(r,1),o.splice(r+1,0,a),this.$refs.shortcutSetting.loadData(o))},dragDrop({index1:a,index2:r}){if(a!=r){let o=this.$refs.shortcutSetting.data,s=o[a];o.splice(a,1),o.splice(r,0,s)}},remove(a,r){let o=this.$refs.shortcutSetting.data;o.splice(r,1),this.$refs.shortcutSetting.loadData(o)},save(){this.confirm("Front_Msg_Sure_To_Save_Setting",async()=>{let a=this.$refs.shortcutSetting.data;const r=await shortcutApi.save(a);this.success("Front_Msg_Success",()=>{this.shortcuts=r,this.$refs.shortcutSetting.close()})})}}},_hoisted_1$1a={class:"ivu-pl-8"},_hoisted_2$G={class:"ivu-text-center",style:{height:"250px"}},_hoisted_3$B={class:"ivu-pt-8"};function _sfc_render$1q(a,r,o,s,l,u){const c=require$$0.resolveComponent("Avatar"),d=require$$0.resolveComponent("Icon"),f=require$$0.resolveComponent("Tooltip"),h=require$$0.resolveComponent("i-link"),p=require$$0.resolveComponent("GridItem"),v=require$$0.resolveComponent("Grid"),g=require$$0.resolveComponent("Card"),y=require$$0.resolveComponent("Button"),$=require$$0.resolveComponent("modal-table"),_=require$$0.resolveDirective("color"),C=require$$0.resolveDirective("bg-color");return require$$0.openBlock(),require$$0.createElementBlock("div",null,[require$$0.createVNode(g,{bordered:!1,padding:6,class:"ivu-mb"},{title:require$$0.withCtx(()=>[require$$0.createElementVNode("div",null,[require$$0.withDirectives(require$$0.createVNode(c,{icon:"md-apps",size:"small"},null,512),[[_,"#1890ff"],[C,"#e6f7ff"]]),require$$0.createElementVNode("span",_hoisted_1$1a,require$$0.toDisplayString(a.$t("Front_Label_Shortcut")),1)])]),extra:require$$0.withCtx(()=>[require$$0.createElementVNode("div",null,[require$$0.createVNode(f,{placement:"top",content:a.$t("Front_Label_Setting")},{default:require$$0.withCtx(()=>[require$$0.createVNode(d,{type:"md-settings",style:{cursor:"pointer"},onClick:r[0]||(r[0]=b=>u.setting())})]),_:1},8,["content"])])]),default:require$$0.withCtx(()=>[require$$0.createElementVNode("div",_hoisted_2$G,[require$$0.createVNode(v,{col:3,border:!1,padding:"8px"},{default:require$$0.withCtx(()=>[(require$$0.openBlock(!0),require$$0.createElementBlock(require$$0.Fragment,null,require$$0.renderList(l.shortcuts,(b,w)=>(require$$0.openBlock(),require$$0.createBlock(p,{key:b.id,class:"ivu-mb"},{default:require$$0.withCtx(()=>[require$$0.createVNode(h,{class:"shortcut",to:b.permission.url},{default:require$$0.withCtx(()=>[require$$0.createVNode(d,{custom:b.permission.icon,color:l.colors[w],size:"24"},null,8,["custom","color"]),require$$0.createElementVNode("p",_hoisted_3$B,require$$0.toDisplayString(a.layout.showNotice?a.$t("Permission_"+b.permission.url.split("?")[0]):b.permission.name),1)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1})])]),_:1}),require$$0.createVNode($,{ref:"shortcutSetting","view-code":"ShortcutSetting",static:!0,"footer-enable":!0,draggable:!0,sticky:!0,embedded:!0,onOnDragDrop:u.dragDrop},{command:require$$0.withCtx(({row:b,index:w})=>[require$$0.createVNode(y,{size:"small",title:a.$t("Front_Btn_Up"),type:"primary",ghost:"","custom-icon":"fa fa-chevron-up",onClick:x=>u.up(b,w)},null,8,["title","onClick"]),require$$0.createVNode(y,{size:"small",title:a.$t("Front_Btn_Down"),type:"primary",ghost:"","custom-icon":"fa fa-chevron-down",onClick:x=>u.down(b,w)},null,8,["title","onClick"]),require$$0.createVNode(y,{size:"small",title:a.$t("Front_Btn_Remove"),type:"primary",ghost:"","custom-icon":"fa fa-times",onClick:x=>u.remove(b,w)},null,8,["title","onClick"])]),footer:require$$0.withCtx(()=>[require$$0.createVNode(y,{type:"primary","custom-icon":"fa fa-save",onClick:u.save},{default:require$$0.withCtx(()=>[require$$0.createTextVNode(require$$0.toDisplayString(a.$t("Front_Btn_Save")),1)]),_:1},8,["onClick"])]),_:1},8,["onOnDragDrop"])])}var Shortcut=_export_sfc(_sfc_main$1q,[["render",_sfc_render$1q],["__scopeId","data-v-a9e726d4"],["__file","D:/Project/Mooho/FrontEnd/mooho-base-admin-plus/src/components/home/shortcut.vue"]]);const _sfc_main$1p={name:"notice-list",mixins:[mixinPage],components:{},data(){return{opened:!1,data:{}}},computed:{},async mounted(){},methods:{show(a){this.data=a,this.opened=!0}}},_hoisted_1$19={class:"ivu-pl-8"},_hoisted_2$F=["onClick"],_hoisted_3$A={class:"title"},_hoisted_4$p=require$$0.createElementVNode("span",{class:"description"},null,-1),_hoisted_5$i={style:{margin:"16px","max-height":"500px"}},_hoisted_6$e=["innerHTML"];function _sfc_render$1p(a,r,o,s,l,u){const c=require$$0.resolveComponent("Avatar"),d=require$$0.resolveComponent("view-table"),f=require$$0.resolveComponent("Card"),h=require$$0.resolveComponent("Button"),p=require$$0.resolveComponent("Modal"),v=require$$0.resolveDirective("color"),g=require$$0.resolveDirective("bg-color");return require$$0.openBlock(),require$$0.createElementBlock("div",null,[require$$0.createVNode(f,{bordered:!1,padding:6,class:"ivu-mb"},{title:require$$0.withCtx(()=>[require$$0.createElementVNode("div",null,[require$$0.withDirectives(require$$0.createVNode(c,{icon:"md-apps",size:"small"},null,512),[[v,"#1890ff"],[g,"#e6f7ff"]]),require$$0.createElementVNode("span",_hoisted_1$19,require$$0.toDisplayString(a.$t("Front_Label_Notice")),1)])]),default:require$$0.withCtx(()=>[require$$0.createVNode(d,{style:{height:"250px"},height:200,"view-code":"NoticeModal"},{column:require$$0.withCtx(({row:y,column:$,code:_})=>[_=="title"?(require$$0.openBlock(),require$$0.createElementBlock("a",{key:0,href:"#",onClick:C=>u.show(y)},require$$0.toDisplayString(a.showData(y,$)),9,_hoisted_2$F)):require$$0.createCommentVNode("v-if",!0)]),_:1})]),_:1}),require$$0.createVNode(p,{modelValue:l.opened,"onUpdate:modelValue":r[1]||(r[1]=y=>l.opened=y),scrollable:"","mask-closable":a.layout.maskClosable,draggable:a.layout.draggable,sticky:!0,"reset-drag-position":!0,width:800},{header:require$$0.withCtx(()=>[require$$0.createElementVNode("div",null,[require$$0.renderSlot(a.$slots,"header",{},()=>[require$$0.createElementVNode("span",_hoisted_3$A,require$$0.toDisplayString(l.data.title),1),_hoisted_4$p])])]),footer:require$$0.withCtx(()=>[require$$0.createElementVNode("div",null,[require$$0.createVNode(h,{type:"default","custom-icon":"fa fa-times",onClick:r[0]||(r[0]=y=>l.opened=!1)},{default:require$$0.withCtx(()=>[require$$0.createTextVNode(require$$0.toDisplayString(a.$t("Front_Btn_Close")),1)]),_:1})])]),default:require$$0.withCtx(()=>[require$$0.createElementVNode("div",_hoisted_5$i,[require$$0.createElementVNode("div",{innerHTML:l.data.content},null,8,_hoisted_6$e)])]),_:3},8,["modelValue","mask-closable","draggable"])])}var NoticeList=_export_sfc(_sfc_main$1p,[["render",_sfc_render$1p],["__file","D:/Project/Mooho/FrontEnd/mooho-base-admin-plus/src/components/home/notice-list.vue"]]),home_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$1o={name:"home",mixins:[mixinPage],components:{noticeList:NoticeList,shortcut:Shortcut},data(){return{grid:{xl:12,lg:12,md:12,sm:12,xs:12}}},async mounted(){},methods:{}},_withScopeId=a=>(require$$0.pushScopeId("data-v-9f6133a2"),a=a(),require$$0.popScopeId(),a),_hoisted_1$18=_withScopeId(()=>require$$0.createElementVNode("p",null,[require$$0.createElementVNode("span",null,"\u68C0\u6D4B\u4EFB\u52A1")],-1)),_hoisted_2$E={class:"stat"},_hoisted_3$z={class:"icon"},_hoisted_4$o={class:"content"},_hoisted_5$h=_withScopeId(()=>require$$0.createElementVNode("div",{class:"value1"},"\u5F85\u5206\u6D3E",-1)),_hoisted_6$d=_withScopeId(()=>require$$0.createElementVNode("div",{class:"value2"},"\u5DF2\u5206\u6D3E",-1)),_hoisted_7$b=_withScopeId(()=>require$$0.createElementVNode("p",null,[require$$0.createElementVNode("span",null,"\u539F\u59CB\u8BB0\u5F55")],-1)),_hoisted_8$a={class:"stat"},_hoisted_9$8={class:"icon"},_hoisted_10$4={class:"content"},_hoisted_11$3=_withScopeId(()=>require$$0.createElementVNode("div",{class:"value1"},"\u5F85\u5206\u6D3E",-1)),_hoisted_12$3=_withScopeId(()=>require$$0.createElementVNode("div",{class:"value2"},"\u5DF2\u5206\u6D3E",-1)),_hoisted_13$3=_withScopeId(()=>require$$0.createElementVNode("p",null,[require$$0.createElementVNode("span",null,"\u68C0\u6D4B\u62A5\u544A")],-1)),_hoisted_14$2={class:"stat"},_hoisted_15$2={class:"icon"},_hoisted_16$2={class:"content"},_hoisted_17$2=_withScopeId(()=>require$$0.createElementVNode("div",{class:"value1"},"\u5F85\u5206\u6D3E",-1)),_hoisted_18$2=_withScopeId(()=>require$$0.createElementVNode("div",{class:"value2"},"\u5DF2\u5206\u6D3E",-1)),_hoisted_19$2=_withScopeId(()=>require$$0.createElementVNode("p",null,[require$$0.createElementVNode("span",null,"\u68C0\u6D4B\u6837\u4EF6")],-1)),_hoisted_20$2={class:"stat"},_hoisted_21$2={class:"icon"},_hoisted_22$2={class:"content"},_hoisted_23$2=_withScopeId(()=>require$$0.createElementVNode("div",{class:"value1"},"\u5F85\u5206\u6D3E",-1)),_hoisted_24$2=_withScopeId(()=>require$$0.createElementVNode("div",{class:"value2"},"\u5DF2\u5206\u6D3E",-1));function _sfc_render$1o(a,r,o,s,l,u){const c=require$$0.resolveComponent("Icon"),d=require$$0.resolveComponent("Numeral"),f=require$$0.resolveComponent("Card"),h=require$$0.resolveComponent("Col"),p=require$$0.resolveComponent("Row"),v=require$$0.resolveComponent("notice-list"),g=require$$0.resolveComponent("shortcut"),y=require$$0.resolveDirective("font");return require$$0.openBlock(),require$$0.createElementBlock("div",null,[require$$0.createVNode(p,{gutter:24,class:"ivu-mt"},{default:require$$0.withCtx(()=>[require$$0.createVNode(h,{xxl:8,xl:12,lg:12,md:12,sm:24,xs:24,class:"ivu-mb"},{default:require$$0.withCtx(()=>[require$$0.createElementVNode("div",null,[require$$0.createVNode(p,{gutter:24},{default:require$$0.withCtx(()=>[require$$0.createVNode(h,require$$0.mergeProps(l.grid,{class:"ivu-mb"}),{default:require$$0.withCtx(()=>[require$$0.createVNode(f,{bordered:!1,padding:12},{title:require$$0.withCtx(()=>[_hoisted_1$18]),default:require$$0.withCtx(()=>[require$$0.createElementVNode("div",_hoisted_2$E,[require$$0.createElementVNode("div",_hoisted_3$z,[require$$0.createVNode(c,{type:"md-speedometer",color:"rgb(24, 144, 255)"})]),require$$0.createElementVNode("div",_hoisted_4$o,[require$$0.createElementVNode("div",null,[require$$0.withDirectives(require$$0.createVNode(d,{value:"85",format:"0,0"},null,512),[[y,30]]),_hoisted_5$h]),require$$0.createElementVNode("div",null,[require$$0.withDirectives(require$$0.createVNode(d,{value:"85",format:"0,0"},null,512),[[y,20]]),_hoisted_6$d])])])]),_:1})]),_:1},16),require$$0.createVNode(h,require$$0.mergeProps(l.grid,{class:"ivu-mb"}),{default:require$$0.withCtx(()=>[require$$0.createVNode(f,{bordered:!1,padding:12},{title:require$$0.withCtx(()=>[_hoisted_7$b]),default:require$$0.withCtx(()=>[require$$0.createElementVNode("div",_hoisted_8$a,[require$$0.createElementVNode("div",_hoisted_9$8,[require$$0.createVNode(c,{type:"md-list-box",color:"rgb(250, 173, 20)"})]),require$$0.createElementVNode("div",_hoisted_10$4,[require$$0.createElementVNode("div",null,[require$$0.withDirectives(require$$0.createVNode(d,{value:"85",format:"0,0"},null,512),[[y,30]]),_hoisted_11$3]),require$$0.createElementVNode("div",null,[require$$0.withDirectives(require$$0.createVNode(d,{value:"85",format:"0,0"},null,512),[[y,20]]),_hoisted_12$3])])])]),_:1})]),_:1},16),require$$0.createVNode(h,require$$0.mergeProps(l.grid,{class:"ivu-mb"}),{default:require$$0.withCtx(()=>[require$$0.createVNode(f,{bordered:!1,padding:12},{title:require$$0.withCtx(()=>[_hoisted_13$3]),default:require$$0.withCtx(()=>[require$$0.createElementVNode("div",_hoisted_14$2,[require$$0.createElementVNode("div",_hoisted_15$2,[require$$0.createVNode(c,{type:"md-print",color:"rgb(19, 194, 194)"})]),require$$0.createElementVNode("div",_hoisted_16$2,[require$$0.createElementVNode("div",null,[require$$0.withDirectives(require$$0.createVNode(d,{value:"85",format:"0,0"},null,512),[[y,30]]),_hoisted_17$2]),require$$0.createElementVNode("div",null,[require$$0.withDirectives(require$$0.createVNode(d,{value:"85",format:"0,0"},null,512),[[y,20]]),_hoisted_18$2])])])]),_:1})]),_:1},16),require$$0.createVNode(h,require$$0.mergeProps(l.grid,{class:"ivu-mb"}),{default:require$$0.withCtx(()=>[require$$0.createVNode(f,{bordered:!1,padding:12},{title:require$$0.withCtx(()=>[_hoisted_19$2]),default:require$$0.withCtx(()=>[require$$0.createElementVNode("div",_hoisted_20$2,[require$$0.createElementVNode("div",_hoisted_21$2,[require$$0.createVNode(c,{type:"md-analytics",color:"#b37feb"})]),require$$0.createElementVNode("div",_hoisted_22$2,[require$$0.createElementVNode("div",null,[require$$0.withDirectives(require$$0.createVNode(d,{value:"85",format:"0,0"},null,512),[[y,30]]),_hoisted_23$2]),require$$0.createElementVNode("div",null,[require$$0.withDirectives(require$$0.createVNode(d,{value:"85",format:"0,0"},null,512),[[y,20]]),_hoisted_24$2])])])]),_:1})]),_:1},16)]),_:1})])]),_:1}),require$$0.createVNode(h,{xl:10,lg:8,md:8,sm:12,xs:24,class:"ivu-mb"},{default:require$$0.withCtx(()=>[require$$0.createVNode(v)]),_:1}),require$$0.createVNode(h,{xl:6,lg:8,md:8,sm:12,xs:24,class:"ivu-mb"},{default:require$$0.withCtx(()=>[require$$0.createVNode(g)]),_:1})]),_:1})])}var home=_export_sfc(_sfc_main$1o,[["render",_sfc_render$1o],["__scopeId","data-v-9f6133a2"],["__file","D:/Project/Mooho/FrontEnd/mooho-base-admin-plus/src/pages/common/home.vue"]]),__glob_44_1=Object.freeze(Object.defineProperty({__proto__:null,default:home},Symbol.toStringTag,{value:"Module"}));const res$h="CustomModel";var customModelApi={add(a,r){return service({url:`api/${res$h}/add`,method:"post",data:{modelName:a,model:r}})},update(a,r){return service({url:`api/${res$h}/update`,method:"put",data:{modelName:a,model:r}})},remove(a,r){return service({url:`api/${res$h}/remove`,method:"delete",data:{modelName:a,id:r}})},batchSave(a,r){return service({url:`api/${res$h}/batchSave`,method:"post",data:{modelName:a,data:r}})},get(a,r){return service({url:`api/${res$h}/get`,method:"get",params:{modelName:a,id:r}})},query(a,r){let o=r.isGroupBy?"group":"query";return service({url:`api/${res$h}/${o}`,method:"post",data:{...r,modelName:a}})},async exportExcel(a,r){let o={...r,modelName:a.model,per:1e5,returnType:1,viewCode:a.code},s;a.isGroupBy?(o.groupColumn=JSON.parse(a.groupColumn),o.groupMethod=JSON.parse(a.groupMethod),await service({url:`api/${res$h}/group`,method:"post",responseType:"blob",data:o})):await service({url:`api/${res$h}/query`,method:"post",responseType:"blob",data:o});const l=new Blob([s],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});saveAs(l,a.name+"-"+format$3(new Date,"yyyyMMddHHmmss")+".xlsx")},async exportPdf(a,r){let o={...r,modelName:a.model,per:1e5,returnType:3,viewCode:a.code},s;a.isGroupBy?(o.groupColumn=JSON.parse(a.groupColumn),o.groupMethod=JSON.parse(a.groupMethod),await service({url:`api/${res$h}/group`,method:"post",responseType:"blob",data:o})):await service({url:`api/${res$h}/query`,method:"post",responseType:"blob",data:o});const l=new Blob([s],{type:"application/pdf"});saveAs(l,a.name+"-"+format$3(new Date,"yyyyMMddHHmmss")+".pdf")},async printList(a,r,o=!0){const s=lodop.getLodop();let l={...r,modelName:a.model,per:1e3,returnType:2,viewCode:a.code},u;a.isGroupBy?(l.groupColumn=JSON.parse(a.groupColumn),l.groupMethod=JSON.parse(a.groupMethod),u=await service({url:`api/${res$h}/group`,method:"post",data:l})):u=await service({url:`api/${res$h}/query`,method:"post",data:l}),s.PRINT_INIT("Print"),o?(s.ADD_PRINT_TABLE("4%","3%","94%","90%",u),s.SET_PRINT_PAGESIZE(2,0,0,"A4")):(s.ADD_PRINT_TABLE("4%","3%","94%","90%",u),s.SET_PRINT_PAGESIZE(1,0,0,"A4")),s.PRINTA()}};const res$g="ProcessInst";var processInstApi={addMessage(a,r){return service({url:`api/${res$g}/addMessage`,method:"post",data:{id:a,message:r}})}};const res$f="Task";var taskApi={do(a,r,o,s){return service({url:`api/${res$f}/do`,method:"post",data:{id:a,outcomeID:r,data:o,comment:s}})},reject(a,r){return service({url:`api/${res$f}/reject`,method:"post",data:{id:a,comment:r}})},back(a,r){return service({url:`api/${res$f}/back`,method:"post",data:{id:a,comment:r}})},redirect(a,r,o){return service({url:`api/${res$f}/redirect`,method:"post",data:{id:a,targetID:r,comment:o}})},queryMy(a){return service({url:`api/${res$f}/queryMy`,method:"post",data:a})}};const _sfc_main$1n={mixins:[mixinPage],components:{},data(){return{task:null,model:null,comment:null,outcomes:[],readonly:!0,isRejectable:!1,isBackable:!1,isRedirectable:!1,isMessageEnable:!1,messageData:{message:null},messageOpened:!1,opened:!1,isCustom:!1,width:800,name:null,description:null,customComponent:null,form:null}},async created(){},computed:{},methods:{async open(a){let r=a.processInst.applicationType;this.outcomes=[],this.task=a,this.isRejectable=this.task.activityInst.activity.isRejectable,this.isBackable=this.task.activityInst.activity.isBackable,this.isRedirectable=this.task.activityInst.activity.isRedirectable,this.isMessageEnable=this.task.processInst.isMessageEnable,this.isCustom=!1,setTimeout(async()=>{if(this.task.activityInst.activity.pageMode=="Page"){this.$router.push({path:this.task.activityInst.activity.routerPath,query:{taskID:a.id}});return}else if(this.task.activityInst.activity.pageMode=="Component")this.customComponent=require$$0.markRaw(this.$pages[this.task.activityInst.activity.templateUrl]),this.isCustom=!0,setTimeout(async()=>{r.isCustom?this.model=await customModelApi.get(r.model,a.processInst.modelID):this.model=await modelApi.get(r.model,a.processInst.modelID),this.customComponentReady(),this.opened=!0});else if(this.task.activityInst.activity.pageMode=="Form")this.form=this.$refs.form,this.form.init(this.task.activityInst.activity.formViewCode,async s=>{s.dataView.isCustom?this.model=await customModelApi.get(r.model,a.processInst.modelID):this.model=await modelApi.get(r.model,a.processInst.modelID),this.readonly=!this.task.activityInst.activity.isEditable,this.width=this.form.formView.width||"800",this.name=this.form.formView.name,this.description=this.form.formView.description,this.form.data=this.model,setTimeout(async()=>{this.form.onDataChange(),this.form.clearValidate(),this.opened=!0})});else if(r.pageMode=="Page"){this.$router.push({path:r.routerPath,query:{taskID:a.id}});return}else if(r.pageMode=="Component")this.customComponent=require$$0.markRaw(this.$pages[r.templateUrl]),this.isCustom=!0,setTimeout(async()=>{r.isCustom?this.model=await customModelApi.get(r.model,a.processInst.modelID):this.model=await modelApi.get(r.model,a.processInst.modelID),this.customComponentReady(),this.opened=!0});else if(r.pageMode=="Form")this.form=this.$refs.form,this.form.init(r.formViewCode,async s=>{s.dataView.isCustom?this.model=await customModelApi.get(r.model,a.processInst.modelID):this.model=await modelApi.get(r.model,a.processInst.modelID),this.readonly=!this.task.activityInst.activity.isEditable,this.width=this.form.formView.width||"800",this.name=this.form.formView.name,this.description=this.form.formView.description,this.form.data=this.model,setTimeout(()=>{this.form.onDataChange(),this.form.clearValidate(),this.opened=!0})});else{this.error("Front_Msg_Setting_Error");return}let o=await modelApi.query("Outcome",{activityFromID:a.activityInst.activityID});this.outcomes=o.data})},customComponentReady(){this.$refs.customComponent.form&&(this.form=this.$refs.customComponent.form,this.form.data=this.model,this.form.onDataChange(),this.form.clearValidate(),this.readonly=!this.task.activityInst.activity.isEditable,this.width=this.form.formView.width||"800",this.name=this.form.formView.name,this.description=this.form.formView.description)},async action(a){await this.form.validate()?this.confirmInput("Front_Msg_Sure_To_Application|"+(a.name==null?this.$t("Front_Label_Agree"):a.name),this.$t("Front_Label_Comment"),async()=>{let o=null;!this.readonly&&(o=this.form.getFullData(),!o)||(this.isCustom&&typeof this.$refs.customComponent.beforeAction=="function"&&await this.$refs.customComponent.beforeAction(a),await taskApi.do(this.task.id,a.id,o,this.comment),this.success("Front_Msg_Success"),this.resetNotice(),this.$emit("on-after-action"),this.opened=!1)},o=>(this.comment=o,!0)):this.error("Front_Msg_Form_Validate_Fail")},async reject(){this.confirmInput("Front_Msg_Sure_To_Reject_Application",this.$t("Front_Label_Comment"),async()=>{this.isCustom&&typeof this.$refs.customComponent.beforeReject=="function"&&await this.$refs.customComponent.beforeReject(this.comment),await taskApi.reject(this.task.id,this.comment),this.success("Front_Msg_Success"),this.resetNotice(),this.$emit("on-after-action"),this.opened=!1},a=>(a||"").trim()?(this.comment=a,!0):(this.warning("Front_Msg_Please_Input_Reject_Reason"),!1))},async back(){this.confirmInput("Front_Msg_Sure_To_Back_Application",this.$t("Front_Label_Comment"),async()=>{this.isCustom&&typeof this.$refs.customComponent.beforeBack=="function"&&await this.$refs.customComponent.beforeBack(this.comment),await taskApi.back(this.task.id,this.comment),this.success("Front_Msg_Success"),this.resetNotice(),this.$emit("on-after-action"),this.opened=!1},a=>(a||"").trim()?(this.comment=a,!0):(this.warning("Front_Msg_Please_Input_Back_Reason"),!1))},async redirect(){if(!await this.$refs.redirectTaskForm.validate())this.error("Front_Msg_Form_Validate_Fail");else{let r=this.$refs.redirectTaskForm.data;this.confirm("Front_Msg_Sure_To_Redirect_Application|"+r.target.name,async()=>{await taskApi.redirect(this.task.id,r.targetID,r.comment),this.success("Front_Msg_Success"),this.resetNotice(),this.$emit("on-after-action"),this.$refs.redirectTaskForm.close(),this.opened=!1})}},openMessage(){this.messageData.message=null,this.messageOpened=!0},async submitMessage(){await this.$refs.messageForm.validate()?this.confirm("Front_Msg_Sure_To_Message_Application",async()=>{await processInstApi.addMessage(this.task.processInstID,this.messageData.message),this.success("Front_Msg_Success",()=>{this.messageData.message=null,this.messageOpened=!1})}):this.error("Front_Msg_Form_Validate_Fail")}}},_hoisted_1$17={class:"title"},_hoisted_2$D={class:"description"},_hoisted_3$y={class:"ivu-ml-8 ivu-mr-8"},_hoisted_4$n={class:"title"},_hoisted_5$g={class:"description"},_hoisted_6$c={class:"ivu-ml-8 ivu-mr-8"};function _sfc_render$1n(a,r,o,s,l,u){const c=require$$0.resolveComponent("view-form"),d=require$$0.resolveComponent("Button"),f=require$$0.resolveComponent("Modal"),h=require$$0.resolveComponent("modal-table"),p=require$$0.resolveComponent("modal-form"),v=require$$0.resolveComponent("Input"),g=require$$0.resolveComponent("FormItem"),y=require$$0.resolveComponent("Col"),$=require$$0.resolveComponent("Row"),_=require$$0.resolveComponent("Form");return require$$0.openBlock(),require$$0.createElementBlock("div",null,[require$$0.createVNode(f,{modelValue:l.opened,"onUpdate:modelValue":r[6]||(r[6]=C=>l.opened=C),scrollable:"","mask-closable":a.layout.maskClosable,draggable:a.layout.draggable,sticky:!0,"reset-drag-position":!0,width:l.width},{header:require$$0.withCtx(()=>[require$$0.createElementVNode("div",null,[require$$0.createCommentVNode(`\r
|
|
154
154
|
@slot \u9875\u5934\r
|
|
@@ -456,4 +456,4 @@ echarts.use([`+L+"]);":"Unknown series "+R))}return}if(v==="tooltip"){if(x){D||(
|
|
|
456
456
|
`,"Illegal config:",p,`.
|
|
457
457
|
`),throwError(s));var w=y?getRawValueParser(y):null;y&&!w&&(s=makePrintable("Invalid parser name "+y+`.
|
|
458
458
|
`,"Illegal config:",p,`.
|
|
459
|
-
`),throwError(s)),u.push({dimIdx:b.index,parser:w,comparator:new SortOrderComparator(g,$)})});var c=r.sourceFormat;c!==SOURCE_FORMAT_ARRAY_ROWS&&c!==SOURCE_FORMAT_OBJECT_ROWS&&(s='sourceFormat "'+c+'" is not supported yet',throwError(s));for(var d=[],f=0,h=r.count();f<h;f++)d.push(r.getRawDataItem(f));return d.sort(function(p,v){for(var g=0;g<u.length;g++){var y=u[g],$=r.retrieveValueFromItem(p,y.dimIdx),_=r.retrieveValueFromItem(v,y.dimIdx);y.parser&&($=y.parser($),_=y.parser(_));var C=y.comparator.evaluate($,_);if(C!==0)return C}return 0}),{data:d}}};function install$2(a){a.registerTransform(filterTransform),a.registerTransform(sortTransform)}var DatasetModel=function(a){__extends(r,a);function r(){var o=a!==null&&a.apply(this,arguments)||this;return o.type="dataset",o}return r.prototype.init=function(o,s,l){a.prototype.init.call(this,o,s,l),this._sourceManager=new SourceManager(this),disableTransformOptionMerge(this)},r.prototype.mergeOption=function(o,s){a.prototype.mergeOption.call(this,o,s),disableTransformOptionMerge(this)},r.prototype.optionUpdated=function(){this._sourceManager.dirty()},r.prototype.getSourceManager=function(){return this._sourceManager},r.type="dataset",r.defaultOption={seriesLayoutBy:SERIES_LAYOUT_BY_COLUMN},r}(ComponentModel$1),DatasetView=function(a){__extends(r,a);function r(){var o=a!==null&&a.apply(this,arguments)||this;return o.type="dataset",o}return r.type="dataset",r}(ComponentView$1);function install$1(a){a.registerComponentModel(DatasetModel),a.registerComponentView(DatasetView)}var CMD=PathProxy$1.CMD;function aroundEqual(a,r){return Math.abs(a-r)<1e-5}function pathToBezierCurves(a){var r=a.data,o=a.len(),s=[],l,u=0,c=0,d=0,f=0;function h(F,q){l&&l.length>2&&s.push(l),l=[F,q]}function p(F,q,z,B){aroundEqual(F,z)&&aroundEqual(q,B)||l.push(F,q,z,B,z,B)}function v(F,q,z,B,X,J){var ne=Math.abs(q-F),de=Math.tan(ne/4)*4/3,Y=q<F?-1:1,W=Math.cos(F),te=Math.sin(F),re=Math.cos(q),ee=Math.sin(q),he=W*X+z,ue=te*J+B,ce=re*X+z,Se=ee*J+B,Te=X*de*Y,me=J*de*Y;l.push(he-Te*te,ue+me*W,ce+Te*ee,Se-me*re,ce,Se)}for(var g,y,$,_,C=0;C<o;){var b=r[C++],w=C===1;switch(w&&(u=r[C],c=r[C+1],d=u,f=c,(b===CMD.L||b===CMD.C||b===CMD.Q)&&(l=[d,f])),b){case CMD.M:u=d=r[C++],c=f=r[C++],h(d,f);break;case CMD.L:g=r[C++],y=r[C++],p(u,c,g,y),u=g,c=y;break;case CMD.C:l.push(r[C++],r[C++],r[C++],r[C++],u=r[C++],c=r[C++]);break;case CMD.Q:g=r[C++],y=r[C++],$=r[C++],_=r[C++],l.push(u+2/3*(g-u),c+2/3*(y-c),$+2/3*(g-$),_+2/3*(y-_),$,_),u=$,c=_;break;case CMD.A:var x=r[C++],D=r[C++],A=r[C++],E=r[C++],P=r[C++],O=r[C++]+P;C+=1;var N=!r[C++];g=Math.cos(P)*A+x,y=Math.sin(P)*E+D,w?(d=g,f=y,h(d,f)):p(u,c,g,y),u=Math.cos(O)*A+x,c=Math.sin(O)*E+D;for(var M=(N?-1:1)*Math.PI/2,R=P;N?R>O:R<O;R+=M){var L=N?Math.max(R+M,O):Math.min(R+M,O);v(R,L,x,D,A,E)}break;case CMD.R:d=u=r[C++],f=c=r[C++],g=d+r[C++],y=f+r[C++],h(g,f),p(g,f,g,y),p(g,y,d,y),p(d,y,d,f),p(d,f,g,f);break;case CMD.Z:l&&p(u,c,d,f),u=d,c=f;break}}return l&&l.length>2&&s.push(l),s}function adpativeBezier(a,r,o,s,l,u,c,d,f,h){if(aroundEqual(a,o)&&aroundEqual(r,s)&&aroundEqual(l,c)&&aroundEqual(u,d)){f.push(c,d);return}var p=2/h,v=p*p,g=c-a,y=d-r,$=Math.sqrt(g*g+y*y);g/=$,y/=$;var _=o-a,C=s-r,b=l-c,w=u-d,x=_*_+C*C,D=b*b+w*w;if(x<v&&D<v){f.push(c,d);return}var A=g*_+y*C,E=-g*b-y*w,P=x-A*A,O=D-E*E;if(P<v&&A>=0&&O<v&&E>=0){f.push(c,d);return}var N=[],M=[];cubicSubdivide(a,o,l,c,.5,N),cubicSubdivide(r,s,u,d,.5,M),adpativeBezier(N[0],M[0],N[1],M[1],N[2],M[2],N[3],M[3],f,h),adpativeBezier(N[4],M[4],N[5],M[5],N[6],M[6],N[7],M[7],f,h)}function pathToPolygons(a,r){var o=pathToBezierCurves(a),s=[];r=r||1;for(var l=0;l<o.length;l++){var u=o[l],c=[],d=u[0],f=u[1];c.push(d,f);for(var h=2;h<u.length;){var p=u[h++],v=u[h++],g=u[h++],y=u[h++],$=u[h++],_=u[h++];adpativeBezier(d,f,p,v,g,y,$,_,c,r),d=$,f=_}s.push(c)}return s}function getDividingGrids(a,r,o){var s=a[r],l=a[1-r],u=Math.abs(s/l),c=Math.ceil(Math.sqrt(u*o)),d=Math.floor(o/c);d===0&&(d=1,c=o);for(var f=[],h=0;h<c;h++)f.push(d);var p=c*d,v=o-p;if(v>0)for(var h=0;h<v;h++)f[h%c]+=1;return f}function divideSector(a,r,o){for(var s=a.r0,l=a.r,u=a.startAngle,c=a.endAngle,d=Math.abs(c-u),f=d*l,h=l-s,p=f>Math.abs(h),v=getDividingGrids([f,h],p?0:1,r),g=(p?d:h)/v.length,y=0;y<v.length;y++)for(var $=(p?h:d)/v[y],_=0;_<v[y];_++){var C={};p?(C.startAngle=u+g*y,C.endAngle=u+g*(y+1),C.r0=s+$*_,C.r=s+$*(_+1)):(C.startAngle=u+$*_,C.endAngle=u+$*(_+1),C.r0=s+g*y,C.r=s+g*(y+1)),C.clockwise=a.clockwise,C.cx=a.cx,C.cy=a.cy,o.push(C)}}function divideRect(a,r,o){for(var s=a.width,l=a.height,u=s>l,c=getDividingGrids([s,l],u?0:1,r),d=u?"width":"height",f=u?"height":"width",h=u?"x":"y",p=u?"y":"x",v=a[d]/c.length,g=0;g<c.length;g++)for(var y=a[f]/c[g],$=0;$<c[g];$++){var _={};_[h]=g*v,_[p]=$*y,_[d]=v,_[f]=y,_.x+=a.x,_.y+=a.y,o.push(_)}}function crossProduct2d(a,r,o,s){return a*s-o*r}function lineLineIntersect(a,r,o,s,l,u,c,d){var f=o-a,h=s-r,p=c-l,v=d-u,g=crossProduct2d(p,v,f,h);if(Math.abs(g)<1e-6)return null;var y=a-l,$=r-u,_=crossProduct2d(y,$,p,v)/g;return _<0||_>1?null:new Point$1(_*f+a,_*h+r)}function projPtOnLine(a,r,o){var s=new Point$1;Point$1.sub(s,o,r),s.normalize();var l=new Point$1;Point$1.sub(l,a,r);var u=l.dot(s);return u}function addToPoly(a,r){var o=a[a.length-1];o&&o[0]===r[0]&&o[1]===r[1]||a.push(r)}function splitPolygonByLine(a,r,o){for(var s=a.length,l=[],u=0;u<s;u++){var c=a[u],d=a[(u+1)%s],f=lineLineIntersect(c[0],c[1],d[0],d[1],r.x,r.y,o.x,o.y);f&&l.push({projPt:projPtOnLine(f,r,o),pt:f,idx:u})}if(l.length<2)return[{points:a},{points:a}];l.sort(function(C,b){return C.projPt-b.projPt});var h=l[0],p=l[l.length-1];if(p.idx<h.idx){var v=h;h=p,p=v}for(var g=[h.pt.x,h.pt.y],y=[p.pt.x,p.pt.y],$=[g],_=[y],u=h.idx+1;u<=p.idx;u++)addToPoly($,a[u].slice());addToPoly($,y),addToPoly($,g);for(var u=p.idx+1;u<=h.idx+s;u++)addToPoly(_,a[u%s].slice());return addToPoly(_,g),addToPoly(_,y),[{points:$},{points:_}]}function binaryDividePolygon(a){var r=a.points,o=[],s=[];fromPoints(r,o,s);var l=new BoundingRect$1(o[0],o[1],s[0]-o[0],s[1]-o[1]),u=l.width,c=l.height,d=l.x,f=l.y,h=new Point$1,p=new Point$1;return u>c?(h.x=p.x=d+u/2,h.y=f,p.y=f+c):(h.y=p.y=f+c/2,h.x=d,p.x=d+u),splitPolygonByLine(r,h,p)}function binaryDivideRecursive(a,r,o,s){if(o===1)s.push(r);else{var l=Math.floor(o/2),u=a(r);binaryDivideRecursive(a,u[0],l,s),binaryDivideRecursive(a,u[1],o-l,s)}return s}function clone(a,r){for(var o=[],s=0;s<r;s++)o.push(clonePath(a));return o}function copyPathProps(a,r){r.setStyle(a.style),r.z=a.z,r.z2=a.z2,r.zlevel=a.zlevel}function polygonConvert(a){for(var r=[],o=0;o<a.length;)r.push([a[o++],a[o++]]);return r}function split(a,r){var o=[],s=a.shape,l;switch(a.type){case"rect":divideRect(s,r,o),l=Rect$3;break;case"sector":divideSector(s,r,o),l=Sector$1;break;case"circle":divideSector({r0:0,r:s.r,startAngle:0,endAngle:Math.PI*2,cx:s.cx,cy:s.cy},r,o),l=Sector$1;break;default:var u=a.getComputedTransform(),c=u?Math.sqrt(Math.max(u[0]*u[0]+u[1]*u[1],u[2]*u[2]+u[3]*u[3])):1,d=map$1(pathToPolygons(a.getUpdatedPathProxy(),c),function(b){return polygonConvert(b)}),f=d.length;if(f===0)binaryDivideRecursive(binaryDividePolygon,{points:d[0]},r,o);else if(f===r)for(var h=0;h<f;h++)o.push({points:d[h]});else{var p=0,v=map$1(d,function(b){var w=[],x=[];fromPoints(b,w,x);var D=(x[1]-w[1])*(x[0]-w[0]);return p+=D,{poly:b,area:D}});v.sort(function(b,w){return w.area-b.area});for(var g=r,h=0;h<f;h++){var y=v[h];if(g<=0)break;var $=h===f-1?g:Math.ceil(y.area/p*r);$<0||(binaryDivideRecursive(binaryDividePolygon,{points:y.poly},$,o),g-=$)}}l=Polygon$1;break}if(!l)return clone(a,r);for(var _=[],h=0;h<o.length;h++){var C=new l;C.setShape(o[h]),copyPathProps(a,C),_.push(C)}return _}function alignSubpath(a,r){var o=a.length,s=r.length;if(o===s)return[a,r];for(var l=[],u=[],c=o<s?a:r,d=Math.min(o,s),f=Math.abs(s-o)/6,h=(d-2)/6,p=Math.ceil(f/h)+1,v=[c[0],c[1]],g=f,y=2;y<d;){var $=c[y-2],_=c[y-1],C=c[y++],b=c[y++],w=c[y++],x=c[y++],D=c[y++],A=c[y++];if(g<=0){v.push(C,b,w,x,D,A);continue}for(var E=Math.min(g,p-1)+1,P=1;P<=E;P++){var O=P/E;cubicSubdivide($,C,w,D,O,l),cubicSubdivide(_,b,x,A,O,u),$=l[3],_=u[3],v.push(l[1],u[1],l[2],u[2],$,_),C=l[5],b=u[5],w=l[6],x=u[6]}g-=E-1}return c===a?[v,r]:[a,v]}function createSubpath(a,r){for(var o=a.length,s=a[o-2],l=a[o-1],u=[],c=0;c<r.length;)u[c++]=s,u[c++]=l;return u}function alignBezierCurves(a,r){for(var o,s,l,u=[],c=[],d=0;d<Math.max(a.length,r.length);d++){var f=a[d],h=r[d],p=void 0,v=void 0;f?h?(o=alignSubpath(f,h),p=o[0],v=o[1],s=p,l=v):(v=createSubpath(l||f,f),p=f):(p=createSubpath(s||h,h),v=h),u.push(p),c.push(v)}return[u,c]}function centroid(a){for(var r=0,o=0,s=0,l=a.length,u=0,c=l-2;u<l;c=u,u+=2){var d=a[c],f=a[c+1],h=a[u],p=a[u+1],v=d*p-h*f;r+=v,o+=(d+h)*v,s+=(f+p)*v}return r===0?[a[0]||0,a[1]||0]:[o/r/3,s/r/3,r]}function findBestRingOffset(a,r,o,s){for(var l=(a.length-2)/6,u=1/0,c=0,d=a.length,f=d-2,h=0;h<l;h++){for(var p=h*6,v=0,g=0;g<d;g+=2){var y=g===0?p:(p+g-2)%f+2,$=a[y]-o[0],_=a[y+1]-o[1],C=r[g]-s[0],b=r[g+1]-s[1],w=C-$,x=b-_;v+=w*w+x*x}v<u&&(u=v,c=h)}return c}function reverse(a){for(var r=[],o=a.length,s=0;s<o;s+=2)r[s]=a[o-s-2],r[s+1]=a[o-s-1];return r}function findBestMorphingRotation(a,r,o,s){for(var l=[],u,c=0;c<a.length;c++){var d=a[c],f=r[c],h=centroid(d),p=centroid(f);u==null&&(u=h[2]<0!=p[2]<0);var v=[],g=[],y=0,$=1/0,_=[],C=d.length;u&&(d=reverse(d));for(var b=findBestRingOffset(d,f,h,p)*6,w=C-2,x=0;x<w;x+=2){var D=(b+x)%w+2;v[x+2]=d[D]-h[0],v[x+3]=d[D+1]-h[1]}if(v[0]=d[b]-h[0],v[1]=d[b+1]-h[1],o>0)for(var A=s/o,E=-s/2;E<=s/2;E+=A){for(var P=Math.sin(E),O=Math.cos(E),N=0,x=0;x<d.length;x+=2){var M=v[x],R=v[x+1],L=f[x]-p[0],F=f[x+1]-p[1],q=L*O-F*P,z=L*P+F*O;_[x]=q,_[x+1]=z;var B=q-M,X=z-R;N+=B*B+X*X}if(N<$){$=N,y=E;for(var J=0;J<_.length;J++)g[J]=_[J]}}else for(var ne=0;ne<C;ne+=2)g[ne]=f[ne]-p[0],g[ne+1]=f[ne+1]-p[1];l.push({from:v,to:g,fromCp:h,toCp:p,rotation:-y})}return l}function isCombineMorphing(a){return a.__isCombineMorphing}var SAVED_METHOD_PREFIX="__mOriginal_";function saveAndModifyMethod(a,r,o){var s=SAVED_METHOD_PREFIX+r,l=a[s]||a[r];a[s]||(a[s]=a[r]);var u=o.replace,c=o.after,d=o.before;a[r]=function(){var f=arguments,h;return d&&d.apply(this,f),u?h=u.apply(this,f):h=l.apply(this,f),c&&c.apply(this,f),h}}function restoreMethod(a,r){var o=SAVED_METHOD_PREFIX+r;a[o]&&(a[r]=a[o],a[o]=null)}function applyTransformOnBeziers(a,r){for(var o=0;o<a.length;o++)for(var s=a[o],l=0;l<s.length;){var u=s[l],c=s[l+1];s[l++]=r[0]*u+r[2]*c+r[4],s[l++]=r[1]*u+r[3]*c+r[5]}}function prepareMorphPath(a,r){var o=a.getUpdatedPathProxy(),s=r.getUpdatedPathProxy(),l=alignBezierCurves(pathToBezierCurves(o),pathToBezierCurves(s)),u=l[0],c=l[1],d=a.getComputedTransform(),f=r.getComputedTransform();function h(){this.transform=null}d&&applyTransformOnBeziers(u,d),f&&applyTransformOnBeziers(c,f),saveAndModifyMethod(r,"updateTransform",{replace:h}),r.transform=null;var p=findBestMorphingRotation(u,c,10,Math.PI),v=[];saveAndModifyMethod(r,"buildPath",{replace:function(g){for(var y=r.__morphT,$=1-y,_=[],C=0;C<p.length;C++){var b=p[C],w=b.from,x=b.to,D=b.rotation*y,A=b.fromCp,E=b.toCp,P=Math.sin(D),O=Math.cos(D);lerp$1(_,A,E,y);for(var N=0;N<w.length;N+=2){var M=w[N],R=w[N+1],L=x[N],F=x[N+1],q=M*$+L*y,z=R*$+F*y;v[N]=q*O-z*P+_[0],v[N+1]=q*P+z*O+_[1]}var B=v[0],X=v[1];g.moveTo(B,X);for(var N=2;N<w.length;){var L=v[N++],F=v[N++],J=v[N++],ne=v[N++],de=v[N++],Y=v[N++];B===L&&X===F&&J===de&&ne===Y?g.lineTo(de,Y):g.bezierCurveTo(L,F,J,ne,de,Y),B=de,X=Y}}}})}function morphPath(a,r,o){if(!a||!r)return r;var s=o.done,l=o.during;prepareMorphPath(a,r),r.__morphT=0;function u(){restoreMethod(r,"buildPath"),restoreMethod(r,"updateTransform"),r.__morphT=-1,r.createPathProxy(),r.dirtyShape()}return r.animateTo({__morphT:1},defaults({during:function(c){r.dirtyShape(),l&&l(c)},done:function(){u(),s&&s()}},o)),r}function hilbert(a,r,o,s,l,u){var c=16;a=l===o?0:Math.round(32767*(a-o)/(l-o)),r=u===s?0:Math.round(32767*(r-s)/(u-s));for(var d=0,f,h=(1<<c)/2;h>0;h/=2){var p=0,v=0;(a&h)>0&&(p=1),(r&h)>0&&(v=1),d+=h*h*(3*p^v),v===0&&(p===1&&(a=h-1-a,r=h-1-r),f=a,a=r,r=f)}return d}function sortPaths(a){var r=1/0,o=1/0,s=-1/0,l=-1/0,u=map$1(a,function(d){var f=d.getBoundingRect(),h=d.getComputedTransform(),p=f.x+f.width/2+(h?h[4]:0),v=f.y+f.height/2+(h?h[5]:0);return r=Math.min(p,r),o=Math.min(v,o),s=Math.max(p,s),l=Math.max(v,l),[p,v]}),c=map$1(u,function(d,f){return{cp:d,z:hilbert(d[0],d[1],r,o,s,l),path:a[f]}});return c.sort(function(d,f){return d.z-f.z}).map(function(d){return d.path})}function defaultDividePath(a){return split(a.path,a.count)}function createEmptyReturn(){return{fromIndividuals:[],toIndividuals:[],count:0}}function combineMorph(a,r,o){var s=[];function l(A){for(var E=0;E<A.length;E++){var P=A[E];isCombineMorphing(P)?l(P.childrenRef()):P instanceof Path$1&&s.push(P)}}l(a);var u=s.length;if(!u)return createEmptyReturn();var c=o.dividePath||defaultDividePath,d=c({path:r,count:u});if(d.length!==u)return console.error("Invalid morphing: unmatched splitted path"),createEmptyReturn();s=sortPaths(s),d=sortPaths(d);for(var f=o.done,h=o.during,p=o.individualDelay,v=new Transformable$1,g=0;g<u;g++){var y=s[g],$=d[g];$.parent=r,$.copyTransform(v),p||prepareMorphPath(y,$)}r.__isCombineMorphing=!0,r.childrenRef=function(){return d};function _(A){for(var E=0;E<d.length;E++)d[E].addSelfToZr(A)}saveAndModifyMethod(r,"addSelfToZr",{after:function(A){_(A)}}),saveAndModifyMethod(r,"removeSelfFromZr",{after:function(A){for(var E=0;E<d.length;E++)d[E].removeSelfFromZr(A)}});function C(){r.__isCombineMorphing=!1,r.__morphT=-1,r.childrenRef=null,restoreMethod(r,"addSelfToZr"),restoreMethod(r,"removeSelfFromZr")}var b=d.length;if(p)for(var w=b,x=function(){w--,w===0&&(C(),f&&f())},g=0;g<b;g++){var D=p?defaults({delay:(o.delay||0)+p(g,b,s[g],d[g]),done:x},o):o;morphPath(s[g],d[g],D)}else r.__morphT=0,r.animateTo({__morphT:1},defaults({during:function(A){for(var E=0;E<b;E++){var P=d[E];P.__morphT=r.__morphT,P.dirtyShape()}h&&h(A)},done:function(){C();for(var A=0;A<a.length;A++)restoreMethod(a[A],"updateTransform");f&&f()}},o));return r.__zr&&_(r.__zr),{fromIndividuals:s,toIndividuals:d,count:b}}function separateMorph(a,r,o){var s=r.length,l=[],u=o.dividePath||defaultDividePath;function c(y){for(var $=0;$<y.length;$++){var _=y[$];isCombineMorphing(_)?c(_.childrenRef()):_ instanceof Path$1&&l.push(_)}}if(isCombineMorphing(a)){c(a.childrenRef());var d=l.length;if(d<s)for(var f=0,h=d;h<s;h++)l.push(clonePath(l[f++%d]));l.length=s}else{l=u({path:a,count:s});for(var p=a.getComputedTransform(),h=0;h<l.length;h++)l[h].setLocalTransform(p);if(l.length!==s)return console.error("Invalid morphing: unmatched splitted path"),createEmptyReturn()}l=sortPaths(l),r=sortPaths(r);for(var v=o.individualDelay,h=0;h<s;h++){var g=v?defaults({delay:(o.delay||0)+v(h,s,l[h],r[h])},o):o;morphPath(l[h],r[h],g)}return{fromIndividuals:l,toIndividuals:r,count:r.length}}function isMultiple(a){return isArray$1(a[0])}function prepareMorphBatches(a,r){for(var o=[],s=a.length,l=0;l<s;l++)o.push({one:a[l],many:[]});for(var l=0;l<r.length;l++){var u=r[l].length,c=void 0;for(c=0;c<u;c++)o[c%s].many.push(r[l][c])}for(var d=0,l=s-1;l>=0;l--)if(!o[l].many.length){var f=o[d].many;if(f.length<=1)if(d)d=0;else return o;var u=f.length,h=Math.ceil(u/2);o[l].many=f.slice(h,u),o[d].many=f.slice(0,h),d++}return o}var pathDividers={clone:function(a){for(var r=[],o=1-Math.pow(1-a.path.style.opacity,1/a.count),s=0;s<a.count;s++){var l=clonePath(a.path);l.setStyle("opacity",o),r.push(l)}return r},split:null};function applyMorphAnimation(a,r,o,s,l,u){if(!a.length||!r.length)return;var c=getAnimationConfig("update",s,l);if(!(c&&c.duration>0))return;var d=s.getModel("universalTransition").get("delay"),f=Object.assign({setToFinal:!0},c),h,p;isMultiple(a)&&(h=a,p=r),isMultiple(r)&&(h=r,p=a);function v(b,w,x,D,A){var E=b.many,P=b.one;if(E.length===1&&!A){var O=w?E[0]:P,N=w?P:E[0];if(isCombineMorphing(O))v({many:[O],one:N},!0,x,D,!0);else{var M=d?defaults({delay:d(x,D)},f):f;morphPath(O,N,M),u(O,N,O,N,M)}}else for(var R=defaults({dividePath:pathDividers[o],individualDelay:d&&function(X,J,ne,de){return d(X+x,D)}},f),L=w?combineMorph(E,P,R):separateMorph(P,E,R),F=L.fromIndividuals,q=L.toIndividuals,z=F.length,B=0;B<z;B++){var M=d?defaults({delay:d(B,z)},f):f;u(F[B],q[B],w?E[B]:b.one,w?b.one:E[B],M)}}for(var g=h?h===a:a.length>r.length,y=h?prepareMorphBatches(p,h):prepareMorphBatches(g?r:a,[g?a:r]),$=0,_=0;_<y.length;_++)$+=y[_].many.length;for(var C=0,_=0;_<y.length;_++)v(y[_],g,C,$),C+=y[_].many.length}function getPathList(a){if(!a)return[];if(isArray$1(a)){for(var r=[],o=0;o<a.length;o++)r.push(getPathList(a[o]));return r}var s=[];return a.traverse(function(l){l instanceof Path$1&&!l.disableMorphing&&!l.invisible&&!l.ignore&&s.push(l)}),s}var DATA_COUNT_THRESHOLD=1e4,getUniversalTransitionGlobalStore=makeInner();function getGroupIdDimension(a){for(var r=a.dimensions,o=0;o<r.length;o++){var s=a.getDimensionInfo(r[o]);if(s&&s.otherDims.itemGroupId===0)return r[o]}}function flattenDataDiffItems(a){var r=[];return each$f(a,function(o){var s=o.data;if(s.count()>DATA_COUNT_THRESHOLD){warn("Universal transition is disabled on large data > 10k.");return}for(var l=s.getIndices(),u=getGroupIdDimension(s),c=0;c<l.length;c++)r.push({dataGroupId:o.dataGroupId,data:s,dim:o.dim||u,divide:o.divide,dataIndex:c})}),r}function fadeInElement(a,r,o){a.traverse(function(s){s instanceof Path$1&&initProps(s,{style:{opacity:0}},r,{dataIndex:o,isFrom:!0})})}function removeEl(a){if(a.parent){var r=a.getComputedTransform();a.setLocalTransform(r),a.parent.remove(a)}}function stopAnimation(a){a.stopAnimation(),a.isGroup&&a.traverse(function(r){r.stopAnimation()})}function animateElementStyles(a,r,o){var s=getAnimationConfig("update",o,r);s&&a.traverse(function(l){if(l instanceof Displayable$1){var u=getOldStyle(l);u&&l.animateFrom({style:u},s)}})}function isAllIdSame(a,r){var o=a.length;if(o!==r.length)return!1;for(var s=0;s<o;s++){var l=a[s],u=r[s];if(l.data.getId(l.dataIndex)!==u.data.getId(u.dataIndex))return!1}return!0}function transitionBetween(a,r,o){var s=flattenDataDiffItems(a),l=flattenDataDiffItems(r);function u(b,w,x,D,A){(x||b)&&w.animateFrom({style:x&&x!==b?extend(extend({},x.style),b.style):b.style},A)}function c(b){for(var w=0;w<b.length;w++)if(b[w].dim)return b[w].dim}var d=c(s),f=c(l),h=!1;function p(b,w){return function(x){var D=x.data,A=x.dataIndex;if(w)return D.getId(A);var E=x.dataGroupId,P=b?d||f:f||d,O=P&&D.getDimensionInfo(P),N=O&&O.ordinalMeta;if(O){var M=D.get(O.name,A);return N&&N.categories[M]||M+""}var R=D.getRawDataItem(A);return R&&R.groupId?R.groupId+"":E||D.getId(A)}}var v=isAllIdSame(s,l),g={};if(!v)for(var y=0;y<l.length;y++){var $=l[y],_=$.data.getItemGraphicEl($.dataIndex);_&&(g[_.id]=!0)}function C(b,w){var x=s[w],D=l[b],A=D.data.hostModel,E=x.data.getItemGraphicEl(x.dataIndex),P=D.data.getItemGraphicEl(D.dataIndex);if(E===P){P&&animateElementStyles(P,D.dataIndex,A);return}E&&g[E.id]||P&&(stopAnimation(P),E?(stopAnimation(E),removeEl(E),h=!0,applyMorphAnimation(getPathList(E),getPathList(P),D.divide,A,b,u)):fadeInElement(P,A,b))}new DataDiffer$1(s,l,p(!0,v),p(!1,v),null,"multiple").update(C).updateManyToOne(function(b,w){var x=l[b],D=x.data,A=D.hostModel,E=D.getItemGraphicEl(x.dataIndex),P=filter(map$1(w,function(O){return s[O].data.getItemGraphicEl(s[O].dataIndex)}),function(O){return O&&O!==E&&!g[O.id]});E&&(stopAnimation(E),P.length?(each$f(P,function(O){stopAnimation(O),removeEl(O)}),h=!0,applyMorphAnimation(getPathList(P),getPathList(E),x.divide,A,b,u)):fadeInElement(E,A,x.dataIndex))}).updateOneToMany(function(b,w){var x=s[w],D=x.data.getItemGraphicEl(x.dataIndex);if(!(D&&g[D.id])){var A=filter(map$1(b,function(P){return l[P].data.getItemGraphicEl(l[P].dataIndex)}),function(P){return P&&P!==D}),E=l[b[0]].data.hostModel;A.length&&(each$f(A,function(P){return stopAnimation(P)}),D?(stopAnimation(D),removeEl(D),h=!0,applyMorphAnimation(getPathList(D),getPathList(A),x.divide,E,b[0],u)):each$f(A,function(P){return fadeInElement(P,E,b[0])}))}}).updateManyToMany(function(b,w){new DataDiffer$1(w,b,function(x){return s[x].data.getId(s[x].dataIndex)},function(x){return l[x].data.getId(l[x].dataIndex)}).update(function(x,D){C(b[x],w[D])}).execute()}).execute(),h&&each$f(r,function(b){var w=b.data,x=w.hostModel,D=x&&o.getViewOfSeriesModel(x),A=getAnimationConfig("update",x,0);D&&x.isAnimationEnabled()&&A&&A.duration>0&&D.group.traverse(function(E){E instanceof Path$1&&!E.animators.length&&E.animateFrom({style:{opacity:0}},A)})})}function getSeriesTransitionKey(a){var r=a.getModel("universalTransition").get("seriesKey");return r||a.id}function convertArraySeriesKeyToString(a){return isArray$1(a)?a.sort().join(","):a}function getDivideShapeFromData(a){if(a.hostModel)return a.hostModel.getModel("universalTransition").get("divideShape")}function findTransitionSeriesBatches(a,r){var o=createHashMap(),s=createHashMap(),l=createHashMap();each$f(a.oldSeries,function(c,d){var f=a.oldDataGroupIds[d],h=a.oldData[d],p=getSeriesTransitionKey(c),v=convertArraySeriesKeyToString(p);s.set(v,{dataGroupId:f,data:h}),isArray$1(p)&&each$f(p,function(g){l.set(g,{key:v,dataGroupId:f,data:h})})});function u(c){o.get(c)&&warn("Duplicated seriesKey in universalTransition "+c)}return each$f(r.updatedSeries,function(c){if(c.isUniversalTransitionEnabled()&&c.isAnimationEnabled()){var d=c.get("dataGroupId"),f=c.getData(),h=getSeriesTransitionKey(c),p=convertArraySeriesKeyToString(h),v=s.get(p);if(v)u(p),o.set(p,{oldSeries:[{dataGroupId:v.dataGroupId,divide:getDivideShapeFromData(v.data),data:v.data}],newSeries:[{dataGroupId:d,divide:getDivideShapeFromData(f),data:f}]});else if(isArray$1(h)){u(p);var g=[];each$f(h,function(_){var C=s.get(_);C.data&&g.push({dataGroupId:C.dataGroupId,divide:getDivideShapeFromData(C.data),data:C.data})}),g.length&&o.set(p,{oldSeries:g,newSeries:[{dataGroupId:d,data:f,divide:getDivideShapeFromData(f)}]})}else{var y=l.get(h);if(y){var $=o.get(y.key);$||($={oldSeries:[{dataGroupId:y.dataGroupId,data:y.data,divide:getDivideShapeFromData(y.data)}],newSeries:[]},o.set(y.key,$)),$.newSeries.push({dataGroupId:d,data:f,divide:getDivideShapeFromData(f)})}}}}),o}function querySeries(a,r){for(var o=0;o<a.length;o++){var s=r.seriesIndex!=null&&r.seriesIndex===a[o].seriesIndex||r.seriesId!=null&&r.seriesId===a[o].id;if(s)return o}}function transitionSeriesFromOpt(a,r,o,s){var l=[],u=[];each$f(normalizeToArray(a.from),function(c){var d=querySeries(r.oldSeries,c);d>=0&&l.push({dataGroupId:r.oldDataGroupIds[d],data:r.oldData[d],divide:getDivideShapeFromData(r.oldData[d]),dim:c.dimension})}),each$f(normalizeToArray(a.to),function(c){var d=querySeries(o.updatedSeries,c);if(d>=0){var f=o.updatedSeries[d].getData();u.push({dataGroupId:r.oldDataGroupIds[d],data:f,divide:getDivideShapeFromData(f),dim:c.dimension})}}),l.length>0&&u.length>0&&transitionBetween(l,u,s)}function installUniversalTransition(a){a.registerUpdateLifecycle("series:beforeupdate",function(r,o,s){each$f(normalizeToArray(s.seriesTransition),function(l){each$f(normalizeToArray(l.to),function(u){for(var c=s.updatedSeries,d=0;d<c.length;d++)(u.seriesIndex!=null&&u.seriesIndex===c[d].seriesIndex||u.seriesId!=null&&u.seriesId===c[d].id)&&(c[d][SERIES_UNIVERSAL_TRANSITION_PROP]=!0)})})}),a.registerUpdateLifecycle("series:transition",function(r,o,s){var l=getUniversalTransitionGlobalStore(o);if(l.oldSeries&&s.updatedSeries&&s.optionChanged){var u=s.seriesTransition;if(u)each$f(normalizeToArray(u),function(y){transitionSeriesFromOpt(y,l,s,o)});else{var c=findTransitionSeriesBatches(l,s);each$f(c.keys(),function(y){var $=c.get(y);transitionBetween($.oldSeries,$.newSeries,o)})}each$f(s.updatedSeries,function(y){y[SERIES_UNIVERSAL_TRANSITION_PROP]&&(y[SERIES_UNIVERSAL_TRANSITION_PROP]=!1)})}for(var d=r.getSeries(),f=l.oldSeries=[],h=l.oldDataGroupIds=[],p=l.oldData=[],v=0;v<d.length;v++){var g=d[v].getData();g.count()<DATA_COUNT_THRESHOLD&&(f.push(d[v]),h.push(d[v].get("dataGroupId")),p.push(g))}})}use([install$S]),use([install$T]),use([install$R,install$Q,install$P,install$N,install$L,install$J,install$I,install$H,install$G,install$F,install$E,install$C,install$B,install$A,install$z,install$y,install$x,install$w,install$v,install$u,install$t,install$s]),use(install$q),use(install$p),use(install$K),use(install$o),use(install$D),use(install$n),use(install$m),use(install$k),use(install$j),use(install$r),use(install$i),use(install$h),use(install$g),use(install$f),use(install$e),use(install$d),use(install$a),use(install$7),use(install$9),use(install$8),use(install$4),use(install$6),use(install$5),use(install$3),use(install$2),use(install$1),use(installUniversalTransition),use(installLabelLayout);var echarts=Object.freeze(Object.defineProperty({__proto__:null,registerLocale,version,dependencies,PRIORITY,init:init$1,connect,disConnect,disconnect,dispose,getInstanceByDom,getInstanceById,registerTheme,registerPreprocessor,registerProcessor,registerPostInit,registerPostUpdate,registerUpdateLifecycle,registerAction,registerCoordinateSystem,getCoordinateSystemDimensions,registerLayout,registerVisual,registerLoading,setCanvasCreator,registerMap:registerMap$1,getMap,registerTransform,dataTool,throttle,use,setPlatformAPI,parseGeoJSON,parseGeoJson:parseGeoJSON,env:env$1,Model:Model$1,Axis:Axis$1,innerDrawElementOnCanvas:brushSingle,zrender,matrix,vector,zrUtil:util$1,color,helper,number,time,graphic,format,util,List:SeriesData$1,ComponentModel:ComponentModel$1,ComponentView:ComponentView$1,SeriesModel:SeriesModel$1,ChartView:ChartView$1,extendComponentModel,extendComponentView,extendSeriesModel,extendChartView},Symbol.toStringTag,{value:"Module"}));const components={Copyright,RichEditor,DialogSelect,ItemSelect,AttachmentUpload,ImageUpload,FileUpload,ViewForm,ViewTable,ViewChart,ModalForm,ModalTable,FormSetting,FormSettingLayout,TableSetting,ModalFormFilter,ModalFormSort,Shortcut,NoticeList,iLink:Link},install=function(a){install.installed||(a.use(store),a.use(i18n$1),a.use(ViewUIPlus__default.default,{i18n:i18n$1}),a.mixin(mixinApp),Object.keys(components).forEach(r=>{a.component(r,components[r])}),a.directive("focus",focus),a.directive("tab-hide",tabHide),a.config.globalProperties.$echarts=echarts)},API={install},files={"./pages/account/login.vue":__glob_44_0,"./pages/common/home.vue":__glob_44_1,"./pages/common/task-form.vue":__glob_44_2,"./pages/common/todo.vue":__glob_44_3,"./pages/system/apiLog.vue":__glob_44_4,"./pages/system/applicationType.vue":__glob_44_5,"./pages/system/customPage.vue":__glob_44_6,"./pages/system/customTable.vue":__glob_44_7,"./pages/system/dict.vue":__glob_44_8,"./pages/system/dictType.vue":__glob_44_9,"./pages/system/entityView.vue":__glob_44_10,"./pages/system/extendColumn.vue":__glob_44_11,"./pages/system/formView.vue":__glob_44_12,"./pages/system/i18nText.vue":__glob_44_13,"./pages/system/log.vue":__glob_44_14,"./pages/system/mailTemplate.vue":__glob_44_15,"./pages/system/notice.vue":__glob_44_16,"./pages/system/openApi.vue":__glob_44_17,"./pages/system/openUser.vue":__glob_44_18,"./pages/system/organization.vue":__glob_44_19,"./pages/system/organizationType.vue":__glob_44_20,"./pages/system/permission.vue":__glob_44_21,"./pages/system/planJob.vue":__glob_44_22,"./pages/system/printTemplate.vue":__glob_44_23,"./pages/system/process.vue":__glob_44_24,"./pages/system/processType.vue":__glob_44_25,"./pages/system/role.vue":__glob_44_26,"./pages/system/rolePropertyEdit.vue":__glob_44_27,"./pages/system/sequenceSetting.vue":__glob_44_28,"./pages/system/setting.vue":__glob_44_29,"./pages/system/systemData.vue":__glob_44_30,"./pages/system/tableView.vue":__glob_44_31,"./pages/system/taskQueue.vue":__glob_44_32,"./pages/system/user.vue":__glob_44_33,"./pages/template/processPage.vue":__glob_44_34,"./pages/template/reportPage.vue":__glob_44_35,"./pages/template/viewPage.vue":__glob_44_36,"./pages/system/error/404.vue":__glob_44_37},pages={};Object.keys(files).forEach(a=>{pages[a.replace(/(\.\/pages\/)/g,"")]=files[a].default});const created=async(a,r,o)=>{window&&(window.$app=require$$0.getCurrentInstance(),window.$app.$t=i18n$1.global.t,window.$app.$Message=a.config.globalProperties.$Message,window.$app.$Notice=a.config.globalProperties.$Notice),initRouter(r,o),store.dispatch("admin/i18n/load",a),store.commit("admin/menu/setHeader",menuHeader),store.dispatch("admin/account/load"),a.config.globalProperties.$pages=r},routeChanged=a=>{store.dispatch("admin/menu/setMenuList",a)};exports.App=App,exports.applicationApi=applicationApi,exports.basicLayout=index,exports.created=created,exports.customModelApi=customModelApi,exports.dataSourceApi=dataSourceApi,exports.default=API,exports.i18n=i18n$1,exports.initRouter=initRouter,exports.lodop=lodop,exports.mixinPage=mixinPage,exports.modelApi=modelApi,exports.pages=pages,exports.request=service,exports.routeChanged=routeChanged,exports.router=router$1,exports.setting=Setting,exports.store=store,exports.taskApi=taskApi,exports.util=util$8,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
459
|
+
`),throwError(s)),u.push({dimIdx:b.index,parser:w,comparator:new SortOrderComparator(g,$)})});var c=r.sourceFormat;c!==SOURCE_FORMAT_ARRAY_ROWS&&c!==SOURCE_FORMAT_OBJECT_ROWS&&(s='sourceFormat "'+c+'" is not supported yet',throwError(s));for(var d=[],f=0,h=r.count();f<h;f++)d.push(r.getRawDataItem(f));return d.sort(function(p,v){for(var g=0;g<u.length;g++){var y=u[g],$=r.retrieveValueFromItem(p,y.dimIdx),_=r.retrieveValueFromItem(v,y.dimIdx);y.parser&&($=y.parser($),_=y.parser(_));var C=y.comparator.evaluate($,_);if(C!==0)return C}return 0}),{data:d}}};function install$2(a){a.registerTransform(filterTransform),a.registerTransform(sortTransform)}var DatasetModel=function(a){__extends(r,a);function r(){var o=a!==null&&a.apply(this,arguments)||this;return o.type="dataset",o}return r.prototype.init=function(o,s,l){a.prototype.init.call(this,o,s,l),this._sourceManager=new SourceManager(this),disableTransformOptionMerge(this)},r.prototype.mergeOption=function(o,s){a.prototype.mergeOption.call(this,o,s),disableTransformOptionMerge(this)},r.prototype.optionUpdated=function(){this._sourceManager.dirty()},r.prototype.getSourceManager=function(){return this._sourceManager},r.type="dataset",r.defaultOption={seriesLayoutBy:SERIES_LAYOUT_BY_COLUMN},r}(ComponentModel$1),DatasetView=function(a){__extends(r,a);function r(){var o=a!==null&&a.apply(this,arguments)||this;return o.type="dataset",o}return r.type="dataset",r}(ComponentView$1);function install$1(a){a.registerComponentModel(DatasetModel),a.registerComponentView(DatasetView)}var CMD=PathProxy$1.CMD;function aroundEqual(a,r){return Math.abs(a-r)<1e-5}function pathToBezierCurves(a){var r=a.data,o=a.len(),s=[],l,u=0,c=0,d=0,f=0;function h(F,q){l&&l.length>2&&s.push(l),l=[F,q]}function p(F,q,z,B){aroundEqual(F,z)&&aroundEqual(q,B)||l.push(F,q,z,B,z,B)}function v(F,q,z,B,X,J){var ne=Math.abs(q-F),de=Math.tan(ne/4)*4/3,Y=q<F?-1:1,W=Math.cos(F),te=Math.sin(F),re=Math.cos(q),ee=Math.sin(q),he=W*X+z,ue=te*J+B,ce=re*X+z,Se=ee*J+B,Te=X*de*Y,me=J*de*Y;l.push(he-Te*te,ue+me*W,ce+Te*ee,Se-me*re,ce,Se)}for(var g,y,$,_,C=0;C<o;){var b=r[C++],w=C===1;switch(w&&(u=r[C],c=r[C+1],d=u,f=c,(b===CMD.L||b===CMD.C||b===CMD.Q)&&(l=[d,f])),b){case CMD.M:u=d=r[C++],c=f=r[C++],h(d,f);break;case CMD.L:g=r[C++],y=r[C++],p(u,c,g,y),u=g,c=y;break;case CMD.C:l.push(r[C++],r[C++],r[C++],r[C++],u=r[C++],c=r[C++]);break;case CMD.Q:g=r[C++],y=r[C++],$=r[C++],_=r[C++],l.push(u+2/3*(g-u),c+2/3*(y-c),$+2/3*(g-$),_+2/3*(y-_),$,_),u=$,c=_;break;case CMD.A:var x=r[C++],D=r[C++],A=r[C++],E=r[C++],P=r[C++],O=r[C++]+P;C+=1;var N=!r[C++];g=Math.cos(P)*A+x,y=Math.sin(P)*E+D,w?(d=g,f=y,h(d,f)):p(u,c,g,y),u=Math.cos(O)*A+x,c=Math.sin(O)*E+D;for(var M=(N?-1:1)*Math.PI/2,R=P;N?R>O:R<O;R+=M){var L=N?Math.max(R+M,O):Math.min(R+M,O);v(R,L,x,D,A,E)}break;case CMD.R:d=u=r[C++],f=c=r[C++],g=d+r[C++],y=f+r[C++],h(g,f),p(g,f,g,y),p(g,y,d,y),p(d,y,d,f),p(d,f,g,f);break;case CMD.Z:l&&p(u,c,d,f),u=d,c=f;break}}return l&&l.length>2&&s.push(l),s}function adpativeBezier(a,r,o,s,l,u,c,d,f,h){if(aroundEqual(a,o)&&aroundEqual(r,s)&&aroundEqual(l,c)&&aroundEqual(u,d)){f.push(c,d);return}var p=2/h,v=p*p,g=c-a,y=d-r,$=Math.sqrt(g*g+y*y);g/=$,y/=$;var _=o-a,C=s-r,b=l-c,w=u-d,x=_*_+C*C,D=b*b+w*w;if(x<v&&D<v){f.push(c,d);return}var A=g*_+y*C,E=-g*b-y*w,P=x-A*A,O=D-E*E;if(P<v&&A>=0&&O<v&&E>=0){f.push(c,d);return}var N=[],M=[];cubicSubdivide(a,o,l,c,.5,N),cubicSubdivide(r,s,u,d,.5,M),adpativeBezier(N[0],M[0],N[1],M[1],N[2],M[2],N[3],M[3],f,h),adpativeBezier(N[4],M[4],N[5],M[5],N[6],M[6],N[7],M[7],f,h)}function pathToPolygons(a,r){var o=pathToBezierCurves(a),s=[];r=r||1;for(var l=0;l<o.length;l++){var u=o[l],c=[],d=u[0],f=u[1];c.push(d,f);for(var h=2;h<u.length;){var p=u[h++],v=u[h++],g=u[h++],y=u[h++],$=u[h++],_=u[h++];adpativeBezier(d,f,p,v,g,y,$,_,c,r),d=$,f=_}s.push(c)}return s}function getDividingGrids(a,r,o){var s=a[r],l=a[1-r],u=Math.abs(s/l),c=Math.ceil(Math.sqrt(u*o)),d=Math.floor(o/c);d===0&&(d=1,c=o);for(var f=[],h=0;h<c;h++)f.push(d);var p=c*d,v=o-p;if(v>0)for(var h=0;h<v;h++)f[h%c]+=1;return f}function divideSector(a,r,o){for(var s=a.r0,l=a.r,u=a.startAngle,c=a.endAngle,d=Math.abs(c-u),f=d*l,h=l-s,p=f>Math.abs(h),v=getDividingGrids([f,h],p?0:1,r),g=(p?d:h)/v.length,y=0;y<v.length;y++)for(var $=(p?h:d)/v[y],_=0;_<v[y];_++){var C={};p?(C.startAngle=u+g*y,C.endAngle=u+g*(y+1),C.r0=s+$*_,C.r=s+$*(_+1)):(C.startAngle=u+$*_,C.endAngle=u+$*(_+1),C.r0=s+g*y,C.r=s+g*(y+1)),C.clockwise=a.clockwise,C.cx=a.cx,C.cy=a.cy,o.push(C)}}function divideRect(a,r,o){for(var s=a.width,l=a.height,u=s>l,c=getDividingGrids([s,l],u?0:1,r),d=u?"width":"height",f=u?"height":"width",h=u?"x":"y",p=u?"y":"x",v=a[d]/c.length,g=0;g<c.length;g++)for(var y=a[f]/c[g],$=0;$<c[g];$++){var _={};_[h]=g*v,_[p]=$*y,_[d]=v,_[f]=y,_.x+=a.x,_.y+=a.y,o.push(_)}}function crossProduct2d(a,r,o,s){return a*s-o*r}function lineLineIntersect(a,r,o,s,l,u,c,d){var f=o-a,h=s-r,p=c-l,v=d-u,g=crossProduct2d(p,v,f,h);if(Math.abs(g)<1e-6)return null;var y=a-l,$=r-u,_=crossProduct2d(y,$,p,v)/g;return _<0||_>1?null:new Point$1(_*f+a,_*h+r)}function projPtOnLine(a,r,o){var s=new Point$1;Point$1.sub(s,o,r),s.normalize();var l=new Point$1;Point$1.sub(l,a,r);var u=l.dot(s);return u}function addToPoly(a,r){var o=a[a.length-1];o&&o[0]===r[0]&&o[1]===r[1]||a.push(r)}function splitPolygonByLine(a,r,o){for(var s=a.length,l=[],u=0;u<s;u++){var c=a[u],d=a[(u+1)%s],f=lineLineIntersect(c[0],c[1],d[0],d[1],r.x,r.y,o.x,o.y);f&&l.push({projPt:projPtOnLine(f,r,o),pt:f,idx:u})}if(l.length<2)return[{points:a},{points:a}];l.sort(function(C,b){return C.projPt-b.projPt});var h=l[0],p=l[l.length-1];if(p.idx<h.idx){var v=h;h=p,p=v}for(var g=[h.pt.x,h.pt.y],y=[p.pt.x,p.pt.y],$=[g],_=[y],u=h.idx+1;u<=p.idx;u++)addToPoly($,a[u].slice());addToPoly($,y),addToPoly($,g);for(var u=p.idx+1;u<=h.idx+s;u++)addToPoly(_,a[u%s].slice());return addToPoly(_,g),addToPoly(_,y),[{points:$},{points:_}]}function binaryDividePolygon(a){var r=a.points,o=[],s=[];fromPoints(r,o,s);var l=new BoundingRect$1(o[0],o[1],s[0]-o[0],s[1]-o[1]),u=l.width,c=l.height,d=l.x,f=l.y,h=new Point$1,p=new Point$1;return u>c?(h.x=p.x=d+u/2,h.y=f,p.y=f+c):(h.y=p.y=f+c/2,h.x=d,p.x=d+u),splitPolygonByLine(r,h,p)}function binaryDivideRecursive(a,r,o,s){if(o===1)s.push(r);else{var l=Math.floor(o/2),u=a(r);binaryDivideRecursive(a,u[0],l,s),binaryDivideRecursive(a,u[1],o-l,s)}return s}function clone(a,r){for(var o=[],s=0;s<r;s++)o.push(clonePath(a));return o}function copyPathProps(a,r){r.setStyle(a.style),r.z=a.z,r.z2=a.z2,r.zlevel=a.zlevel}function polygonConvert(a){for(var r=[],o=0;o<a.length;)r.push([a[o++],a[o++]]);return r}function split(a,r){var o=[],s=a.shape,l;switch(a.type){case"rect":divideRect(s,r,o),l=Rect$3;break;case"sector":divideSector(s,r,o),l=Sector$1;break;case"circle":divideSector({r0:0,r:s.r,startAngle:0,endAngle:Math.PI*2,cx:s.cx,cy:s.cy},r,o),l=Sector$1;break;default:var u=a.getComputedTransform(),c=u?Math.sqrt(Math.max(u[0]*u[0]+u[1]*u[1],u[2]*u[2]+u[3]*u[3])):1,d=map$1(pathToPolygons(a.getUpdatedPathProxy(),c),function(b){return polygonConvert(b)}),f=d.length;if(f===0)binaryDivideRecursive(binaryDividePolygon,{points:d[0]},r,o);else if(f===r)for(var h=0;h<f;h++)o.push({points:d[h]});else{var p=0,v=map$1(d,function(b){var w=[],x=[];fromPoints(b,w,x);var D=(x[1]-w[1])*(x[0]-w[0]);return p+=D,{poly:b,area:D}});v.sort(function(b,w){return w.area-b.area});for(var g=r,h=0;h<f;h++){var y=v[h];if(g<=0)break;var $=h===f-1?g:Math.ceil(y.area/p*r);$<0||(binaryDivideRecursive(binaryDividePolygon,{points:y.poly},$,o),g-=$)}}l=Polygon$1;break}if(!l)return clone(a,r);for(var _=[],h=0;h<o.length;h++){var C=new l;C.setShape(o[h]),copyPathProps(a,C),_.push(C)}return _}function alignSubpath(a,r){var o=a.length,s=r.length;if(o===s)return[a,r];for(var l=[],u=[],c=o<s?a:r,d=Math.min(o,s),f=Math.abs(s-o)/6,h=(d-2)/6,p=Math.ceil(f/h)+1,v=[c[0],c[1]],g=f,y=2;y<d;){var $=c[y-2],_=c[y-1],C=c[y++],b=c[y++],w=c[y++],x=c[y++],D=c[y++],A=c[y++];if(g<=0){v.push(C,b,w,x,D,A);continue}for(var E=Math.min(g,p-1)+1,P=1;P<=E;P++){var O=P/E;cubicSubdivide($,C,w,D,O,l),cubicSubdivide(_,b,x,A,O,u),$=l[3],_=u[3],v.push(l[1],u[1],l[2],u[2],$,_),C=l[5],b=u[5],w=l[6],x=u[6]}g-=E-1}return c===a?[v,r]:[a,v]}function createSubpath(a,r){for(var o=a.length,s=a[o-2],l=a[o-1],u=[],c=0;c<r.length;)u[c++]=s,u[c++]=l;return u}function alignBezierCurves(a,r){for(var o,s,l,u=[],c=[],d=0;d<Math.max(a.length,r.length);d++){var f=a[d],h=r[d],p=void 0,v=void 0;f?h?(o=alignSubpath(f,h),p=o[0],v=o[1],s=p,l=v):(v=createSubpath(l||f,f),p=f):(p=createSubpath(s||h,h),v=h),u.push(p),c.push(v)}return[u,c]}function centroid(a){for(var r=0,o=0,s=0,l=a.length,u=0,c=l-2;u<l;c=u,u+=2){var d=a[c],f=a[c+1],h=a[u],p=a[u+1],v=d*p-h*f;r+=v,o+=(d+h)*v,s+=(f+p)*v}return r===0?[a[0]||0,a[1]||0]:[o/r/3,s/r/3,r]}function findBestRingOffset(a,r,o,s){for(var l=(a.length-2)/6,u=1/0,c=0,d=a.length,f=d-2,h=0;h<l;h++){for(var p=h*6,v=0,g=0;g<d;g+=2){var y=g===0?p:(p+g-2)%f+2,$=a[y]-o[0],_=a[y+1]-o[1],C=r[g]-s[0],b=r[g+1]-s[1],w=C-$,x=b-_;v+=w*w+x*x}v<u&&(u=v,c=h)}return c}function reverse(a){for(var r=[],o=a.length,s=0;s<o;s+=2)r[s]=a[o-s-2],r[s+1]=a[o-s-1];return r}function findBestMorphingRotation(a,r,o,s){for(var l=[],u,c=0;c<a.length;c++){var d=a[c],f=r[c],h=centroid(d),p=centroid(f);u==null&&(u=h[2]<0!=p[2]<0);var v=[],g=[],y=0,$=1/0,_=[],C=d.length;u&&(d=reverse(d));for(var b=findBestRingOffset(d,f,h,p)*6,w=C-2,x=0;x<w;x+=2){var D=(b+x)%w+2;v[x+2]=d[D]-h[0],v[x+3]=d[D+1]-h[1]}if(v[0]=d[b]-h[0],v[1]=d[b+1]-h[1],o>0)for(var A=s/o,E=-s/2;E<=s/2;E+=A){for(var P=Math.sin(E),O=Math.cos(E),N=0,x=0;x<d.length;x+=2){var M=v[x],R=v[x+1],L=f[x]-p[0],F=f[x+1]-p[1],q=L*O-F*P,z=L*P+F*O;_[x]=q,_[x+1]=z;var B=q-M,X=z-R;N+=B*B+X*X}if(N<$){$=N,y=E;for(var J=0;J<_.length;J++)g[J]=_[J]}}else for(var ne=0;ne<C;ne+=2)g[ne]=f[ne]-p[0],g[ne+1]=f[ne+1]-p[1];l.push({from:v,to:g,fromCp:h,toCp:p,rotation:-y})}return l}function isCombineMorphing(a){return a.__isCombineMorphing}var SAVED_METHOD_PREFIX="__mOriginal_";function saveAndModifyMethod(a,r,o){var s=SAVED_METHOD_PREFIX+r,l=a[s]||a[r];a[s]||(a[s]=a[r]);var u=o.replace,c=o.after,d=o.before;a[r]=function(){var f=arguments,h;return d&&d.apply(this,f),u?h=u.apply(this,f):h=l.apply(this,f),c&&c.apply(this,f),h}}function restoreMethod(a,r){var o=SAVED_METHOD_PREFIX+r;a[o]&&(a[r]=a[o],a[o]=null)}function applyTransformOnBeziers(a,r){for(var o=0;o<a.length;o++)for(var s=a[o],l=0;l<s.length;){var u=s[l],c=s[l+1];s[l++]=r[0]*u+r[2]*c+r[4],s[l++]=r[1]*u+r[3]*c+r[5]}}function prepareMorphPath(a,r){var o=a.getUpdatedPathProxy(),s=r.getUpdatedPathProxy(),l=alignBezierCurves(pathToBezierCurves(o),pathToBezierCurves(s)),u=l[0],c=l[1],d=a.getComputedTransform(),f=r.getComputedTransform();function h(){this.transform=null}d&&applyTransformOnBeziers(u,d),f&&applyTransformOnBeziers(c,f),saveAndModifyMethod(r,"updateTransform",{replace:h}),r.transform=null;var p=findBestMorphingRotation(u,c,10,Math.PI),v=[];saveAndModifyMethod(r,"buildPath",{replace:function(g){for(var y=r.__morphT,$=1-y,_=[],C=0;C<p.length;C++){var b=p[C],w=b.from,x=b.to,D=b.rotation*y,A=b.fromCp,E=b.toCp,P=Math.sin(D),O=Math.cos(D);lerp$1(_,A,E,y);for(var N=0;N<w.length;N+=2){var M=w[N],R=w[N+1],L=x[N],F=x[N+1],q=M*$+L*y,z=R*$+F*y;v[N]=q*O-z*P+_[0],v[N+1]=q*P+z*O+_[1]}var B=v[0],X=v[1];g.moveTo(B,X);for(var N=2;N<w.length;){var L=v[N++],F=v[N++],J=v[N++],ne=v[N++],de=v[N++],Y=v[N++];B===L&&X===F&&J===de&&ne===Y?g.lineTo(de,Y):g.bezierCurveTo(L,F,J,ne,de,Y),B=de,X=Y}}}})}function morphPath(a,r,o){if(!a||!r)return r;var s=o.done,l=o.during;prepareMorphPath(a,r),r.__morphT=0;function u(){restoreMethod(r,"buildPath"),restoreMethod(r,"updateTransform"),r.__morphT=-1,r.createPathProxy(),r.dirtyShape()}return r.animateTo({__morphT:1},defaults({during:function(c){r.dirtyShape(),l&&l(c)},done:function(){u(),s&&s()}},o)),r}function hilbert(a,r,o,s,l,u){var c=16;a=l===o?0:Math.round(32767*(a-o)/(l-o)),r=u===s?0:Math.round(32767*(r-s)/(u-s));for(var d=0,f,h=(1<<c)/2;h>0;h/=2){var p=0,v=0;(a&h)>0&&(p=1),(r&h)>0&&(v=1),d+=h*h*(3*p^v),v===0&&(p===1&&(a=h-1-a,r=h-1-r),f=a,a=r,r=f)}return d}function sortPaths(a){var r=1/0,o=1/0,s=-1/0,l=-1/0,u=map$1(a,function(d){var f=d.getBoundingRect(),h=d.getComputedTransform(),p=f.x+f.width/2+(h?h[4]:0),v=f.y+f.height/2+(h?h[5]:0);return r=Math.min(p,r),o=Math.min(v,o),s=Math.max(p,s),l=Math.max(v,l),[p,v]}),c=map$1(u,function(d,f){return{cp:d,z:hilbert(d[0],d[1],r,o,s,l),path:a[f]}});return c.sort(function(d,f){return d.z-f.z}).map(function(d){return d.path})}function defaultDividePath(a){return split(a.path,a.count)}function createEmptyReturn(){return{fromIndividuals:[],toIndividuals:[],count:0}}function combineMorph(a,r,o){var s=[];function l(A){for(var E=0;E<A.length;E++){var P=A[E];isCombineMorphing(P)?l(P.childrenRef()):P instanceof Path$1&&s.push(P)}}l(a);var u=s.length;if(!u)return createEmptyReturn();var c=o.dividePath||defaultDividePath,d=c({path:r,count:u});if(d.length!==u)return console.error("Invalid morphing: unmatched splitted path"),createEmptyReturn();s=sortPaths(s),d=sortPaths(d);for(var f=o.done,h=o.during,p=o.individualDelay,v=new Transformable$1,g=0;g<u;g++){var y=s[g],$=d[g];$.parent=r,$.copyTransform(v),p||prepareMorphPath(y,$)}r.__isCombineMorphing=!0,r.childrenRef=function(){return d};function _(A){for(var E=0;E<d.length;E++)d[E].addSelfToZr(A)}saveAndModifyMethod(r,"addSelfToZr",{after:function(A){_(A)}}),saveAndModifyMethod(r,"removeSelfFromZr",{after:function(A){for(var E=0;E<d.length;E++)d[E].removeSelfFromZr(A)}});function C(){r.__isCombineMorphing=!1,r.__morphT=-1,r.childrenRef=null,restoreMethod(r,"addSelfToZr"),restoreMethod(r,"removeSelfFromZr")}var b=d.length;if(p)for(var w=b,x=function(){w--,w===0&&(C(),f&&f())},g=0;g<b;g++){var D=p?defaults({delay:(o.delay||0)+p(g,b,s[g],d[g]),done:x},o):o;morphPath(s[g],d[g],D)}else r.__morphT=0,r.animateTo({__morphT:1},defaults({during:function(A){for(var E=0;E<b;E++){var P=d[E];P.__morphT=r.__morphT,P.dirtyShape()}h&&h(A)},done:function(){C();for(var A=0;A<a.length;A++)restoreMethod(a[A],"updateTransform");f&&f()}},o));return r.__zr&&_(r.__zr),{fromIndividuals:s,toIndividuals:d,count:b}}function separateMorph(a,r,o){var s=r.length,l=[],u=o.dividePath||defaultDividePath;function c(y){for(var $=0;$<y.length;$++){var _=y[$];isCombineMorphing(_)?c(_.childrenRef()):_ instanceof Path$1&&l.push(_)}}if(isCombineMorphing(a)){c(a.childrenRef());var d=l.length;if(d<s)for(var f=0,h=d;h<s;h++)l.push(clonePath(l[f++%d]));l.length=s}else{l=u({path:a,count:s});for(var p=a.getComputedTransform(),h=0;h<l.length;h++)l[h].setLocalTransform(p);if(l.length!==s)return console.error("Invalid morphing: unmatched splitted path"),createEmptyReturn()}l=sortPaths(l),r=sortPaths(r);for(var v=o.individualDelay,h=0;h<s;h++){var g=v?defaults({delay:(o.delay||0)+v(h,s,l[h],r[h])},o):o;morphPath(l[h],r[h],g)}return{fromIndividuals:l,toIndividuals:r,count:r.length}}function isMultiple(a){return isArray$1(a[0])}function prepareMorphBatches(a,r){for(var o=[],s=a.length,l=0;l<s;l++)o.push({one:a[l],many:[]});for(var l=0;l<r.length;l++){var u=r[l].length,c=void 0;for(c=0;c<u;c++)o[c%s].many.push(r[l][c])}for(var d=0,l=s-1;l>=0;l--)if(!o[l].many.length){var f=o[d].many;if(f.length<=1)if(d)d=0;else return o;var u=f.length,h=Math.ceil(u/2);o[l].many=f.slice(h,u),o[d].many=f.slice(0,h),d++}return o}var pathDividers={clone:function(a){for(var r=[],o=1-Math.pow(1-a.path.style.opacity,1/a.count),s=0;s<a.count;s++){var l=clonePath(a.path);l.setStyle("opacity",o),r.push(l)}return r},split:null};function applyMorphAnimation(a,r,o,s,l,u){if(!a.length||!r.length)return;var c=getAnimationConfig("update",s,l);if(!(c&&c.duration>0))return;var d=s.getModel("universalTransition").get("delay"),f=Object.assign({setToFinal:!0},c),h,p;isMultiple(a)&&(h=a,p=r),isMultiple(r)&&(h=r,p=a);function v(b,w,x,D,A){var E=b.many,P=b.one;if(E.length===1&&!A){var O=w?E[0]:P,N=w?P:E[0];if(isCombineMorphing(O))v({many:[O],one:N},!0,x,D,!0);else{var M=d?defaults({delay:d(x,D)},f):f;morphPath(O,N,M),u(O,N,O,N,M)}}else for(var R=defaults({dividePath:pathDividers[o],individualDelay:d&&function(X,J,ne,de){return d(X+x,D)}},f),L=w?combineMorph(E,P,R):separateMorph(P,E,R),F=L.fromIndividuals,q=L.toIndividuals,z=F.length,B=0;B<z;B++){var M=d?defaults({delay:d(B,z)},f):f;u(F[B],q[B],w?E[B]:b.one,w?b.one:E[B],M)}}for(var g=h?h===a:a.length>r.length,y=h?prepareMorphBatches(p,h):prepareMorphBatches(g?r:a,[g?a:r]),$=0,_=0;_<y.length;_++)$+=y[_].many.length;for(var C=0,_=0;_<y.length;_++)v(y[_],g,C,$),C+=y[_].many.length}function getPathList(a){if(!a)return[];if(isArray$1(a)){for(var r=[],o=0;o<a.length;o++)r.push(getPathList(a[o]));return r}var s=[];return a.traverse(function(l){l instanceof Path$1&&!l.disableMorphing&&!l.invisible&&!l.ignore&&s.push(l)}),s}var DATA_COUNT_THRESHOLD=1e4,getUniversalTransitionGlobalStore=makeInner();function getGroupIdDimension(a){for(var r=a.dimensions,o=0;o<r.length;o++){var s=a.getDimensionInfo(r[o]);if(s&&s.otherDims.itemGroupId===0)return r[o]}}function flattenDataDiffItems(a){var r=[];return each$f(a,function(o){var s=o.data;if(s.count()>DATA_COUNT_THRESHOLD){warn("Universal transition is disabled on large data > 10k.");return}for(var l=s.getIndices(),u=getGroupIdDimension(s),c=0;c<l.length;c++)r.push({dataGroupId:o.dataGroupId,data:s,dim:o.dim||u,divide:o.divide,dataIndex:c})}),r}function fadeInElement(a,r,o){a.traverse(function(s){s instanceof Path$1&&initProps(s,{style:{opacity:0}},r,{dataIndex:o,isFrom:!0})})}function removeEl(a){if(a.parent){var r=a.getComputedTransform();a.setLocalTransform(r),a.parent.remove(a)}}function stopAnimation(a){a.stopAnimation(),a.isGroup&&a.traverse(function(r){r.stopAnimation()})}function animateElementStyles(a,r,o){var s=getAnimationConfig("update",o,r);s&&a.traverse(function(l){if(l instanceof Displayable$1){var u=getOldStyle(l);u&&l.animateFrom({style:u},s)}})}function isAllIdSame(a,r){var o=a.length;if(o!==r.length)return!1;for(var s=0;s<o;s++){var l=a[s],u=r[s];if(l.data.getId(l.dataIndex)!==u.data.getId(u.dataIndex))return!1}return!0}function transitionBetween(a,r,o){var s=flattenDataDiffItems(a),l=flattenDataDiffItems(r);function u(b,w,x,D,A){(x||b)&&w.animateFrom({style:x&&x!==b?extend(extend({},x.style),b.style):b.style},A)}function c(b){for(var w=0;w<b.length;w++)if(b[w].dim)return b[w].dim}var d=c(s),f=c(l),h=!1;function p(b,w){return function(x){var D=x.data,A=x.dataIndex;if(w)return D.getId(A);var E=x.dataGroupId,P=b?d||f:f||d,O=P&&D.getDimensionInfo(P),N=O&&O.ordinalMeta;if(O){var M=D.get(O.name,A);return N&&N.categories[M]||M+""}var R=D.getRawDataItem(A);return R&&R.groupId?R.groupId+"":E||D.getId(A)}}var v=isAllIdSame(s,l),g={};if(!v)for(var y=0;y<l.length;y++){var $=l[y],_=$.data.getItemGraphicEl($.dataIndex);_&&(g[_.id]=!0)}function C(b,w){var x=s[w],D=l[b],A=D.data.hostModel,E=x.data.getItemGraphicEl(x.dataIndex),P=D.data.getItemGraphicEl(D.dataIndex);if(E===P){P&&animateElementStyles(P,D.dataIndex,A);return}E&&g[E.id]||P&&(stopAnimation(P),E?(stopAnimation(E),removeEl(E),h=!0,applyMorphAnimation(getPathList(E),getPathList(P),D.divide,A,b,u)):fadeInElement(P,A,b))}new DataDiffer$1(s,l,p(!0,v),p(!1,v),null,"multiple").update(C).updateManyToOne(function(b,w){var x=l[b],D=x.data,A=D.hostModel,E=D.getItemGraphicEl(x.dataIndex),P=filter(map$1(w,function(O){return s[O].data.getItemGraphicEl(s[O].dataIndex)}),function(O){return O&&O!==E&&!g[O.id]});E&&(stopAnimation(E),P.length?(each$f(P,function(O){stopAnimation(O),removeEl(O)}),h=!0,applyMorphAnimation(getPathList(P),getPathList(E),x.divide,A,b,u)):fadeInElement(E,A,x.dataIndex))}).updateOneToMany(function(b,w){var x=s[w],D=x.data.getItemGraphicEl(x.dataIndex);if(!(D&&g[D.id])){var A=filter(map$1(b,function(P){return l[P].data.getItemGraphicEl(l[P].dataIndex)}),function(P){return P&&P!==D}),E=l[b[0]].data.hostModel;A.length&&(each$f(A,function(P){return stopAnimation(P)}),D?(stopAnimation(D),removeEl(D),h=!0,applyMorphAnimation(getPathList(D),getPathList(A),x.divide,E,b[0],u)):each$f(A,function(P){return fadeInElement(P,E,b[0])}))}}).updateManyToMany(function(b,w){new DataDiffer$1(w,b,function(x){return s[x].data.getId(s[x].dataIndex)},function(x){return l[x].data.getId(l[x].dataIndex)}).update(function(x,D){C(b[x],w[D])}).execute()}).execute(),h&&each$f(r,function(b){var w=b.data,x=w.hostModel,D=x&&o.getViewOfSeriesModel(x),A=getAnimationConfig("update",x,0);D&&x.isAnimationEnabled()&&A&&A.duration>0&&D.group.traverse(function(E){E instanceof Path$1&&!E.animators.length&&E.animateFrom({style:{opacity:0}},A)})})}function getSeriesTransitionKey(a){var r=a.getModel("universalTransition").get("seriesKey");return r||a.id}function convertArraySeriesKeyToString(a){return isArray$1(a)?a.sort().join(","):a}function getDivideShapeFromData(a){if(a.hostModel)return a.hostModel.getModel("universalTransition").get("divideShape")}function findTransitionSeriesBatches(a,r){var o=createHashMap(),s=createHashMap(),l=createHashMap();each$f(a.oldSeries,function(c,d){var f=a.oldDataGroupIds[d],h=a.oldData[d],p=getSeriesTransitionKey(c),v=convertArraySeriesKeyToString(p);s.set(v,{dataGroupId:f,data:h}),isArray$1(p)&&each$f(p,function(g){l.set(g,{key:v,dataGroupId:f,data:h})})});function u(c){o.get(c)&&warn("Duplicated seriesKey in universalTransition "+c)}return each$f(r.updatedSeries,function(c){if(c.isUniversalTransitionEnabled()&&c.isAnimationEnabled()){var d=c.get("dataGroupId"),f=c.getData(),h=getSeriesTransitionKey(c),p=convertArraySeriesKeyToString(h),v=s.get(p);if(v)u(p),o.set(p,{oldSeries:[{dataGroupId:v.dataGroupId,divide:getDivideShapeFromData(v.data),data:v.data}],newSeries:[{dataGroupId:d,divide:getDivideShapeFromData(f),data:f}]});else if(isArray$1(h)){u(p);var g=[];each$f(h,function(_){var C=s.get(_);C.data&&g.push({dataGroupId:C.dataGroupId,divide:getDivideShapeFromData(C.data),data:C.data})}),g.length&&o.set(p,{oldSeries:g,newSeries:[{dataGroupId:d,data:f,divide:getDivideShapeFromData(f)}]})}else{var y=l.get(h);if(y){var $=o.get(y.key);$||($={oldSeries:[{dataGroupId:y.dataGroupId,data:y.data,divide:getDivideShapeFromData(y.data)}],newSeries:[]},o.set(y.key,$)),$.newSeries.push({dataGroupId:d,data:f,divide:getDivideShapeFromData(f)})}}}}),o}function querySeries(a,r){for(var o=0;o<a.length;o++){var s=r.seriesIndex!=null&&r.seriesIndex===a[o].seriesIndex||r.seriesId!=null&&r.seriesId===a[o].id;if(s)return o}}function transitionSeriesFromOpt(a,r,o,s){var l=[],u=[];each$f(normalizeToArray(a.from),function(c){var d=querySeries(r.oldSeries,c);d>=0&&l.push({dataGroupId:r.oldDataGroupIds[d],data:r.oldData[d],divide:getDivideShapeFromData(r.oldData[d]),dim:c.dimension})}),each$f(normalizeToArray(a.to),function(c){var d=querySeries(o.updatedSeries,c);if(d>=0){var f=o.updatedSeries[d].getData();u.push({dataGroupId:r.oldDataGroupIds[d],data:f,divide:getDivideShapeFromData(f),dim:c.dimension})}}),l.length>0&&u.length>0&&transitionBetween(l,u,s)}function installUniversalTransition(a){a.registerUpdateLifecycle("series:beforeupdate",function(r,o,s){each$f(normalizeToArray(s.seriesTransition),function(l){each$f(normalizeToArray(l.to),function(u){for(var c=s.updatedSeries,d=0;d<c.length;d++)(u.seriesIndex!=null&&u.seriesIndex===c[d].seriesIndex||u.seriesId!=null&&u.seriesId===c[d].id)&&(c[d][SERIES_UNIVERSAL_TRANSITION_PROP]=!0)})})}),a.registerUpdateLifecycle("series:transition",function(r,o,s){var l=getUniversalTransitionGlobalStore(o);if(l.oldSeries&&s.updatedSeries&&s.optionChanged){var u=s.seriesTransition;if(u)each$f(normalizeToArray(u),function(y){transitionSeriesFromOpt(y,l,s,o)});else{var c=findTransitionSeriesBatches(l,s);each$f(c.keys(),function(y){var $=c.get(y);transitionBetween($.oldSeries,$.newSeries,o)})}each$f(s.updatedSeries,function(y){y[SERIES_UNIVERSAL_TRANSITION_PROP]&&(y[SERIES_UNIVERSAL_TRANSITION_PROP]=!1)})}for(var d=r.getSeries(),f=l.oldSeries=[],h=l.oldDataGroupIds=[],p=l.oldData=[],v=0;v<d.length;v++){var g=d[v].getData();g.count()<DATA_COUNT_THRESHOLD&&(f.push(d[v]),h.push(d[v].get("dataGroupId")),p.push(g))}})}use([install$S]),use([install$T]),use([install$R,install$Q,install$P,install$N,install$L,install$J,install$I,install$H,install$G,install$F,install$E,install$C,install$B,install$A,install$z,install$y,install$x,install$w,install$v,install$u,install$t,install$s]),use(install$q),use(install$p),use(install$K),use(install$o),use(install$D),use(install$n),use(install$m),use(install$k),use(install$j),use(install$r),use(install$i),use(install$h),use(install$g),use(install$f),use(install$e),use(install$d),use(install$a),use(install$7),use(install$9),use(install$8),use(install$4),use(install$6),use(install$5),use(install$3),use(install$2),use(install$1),use(installUniversalTransition),use(installLabelLayout);var echarts=Object.freeze(Object.defineProperty({__proto__:null,registerLocale,version,dependencies,PRIORITY,init:init$1,connect,disConnect,disconnect,dispose,getInstanceByDom,getInstanceById,registerTheme,registerPreprocessor,registerProcessor,registerPostInit,registerPostUpdate,registerUpdateLifecycle,registerAction,registerCoordinateSystem,getCoordinateSystemDimensions,registerLayout,registerVisual,registerLoading,setCanvasCreator,registerMap:registerMap$1,getMap,registerTransform,dataTool,throttle,use,setPlatformAPI,parseGeoJSON,parseGeoJson:parseGeoJSON,env:env$1,Model:Model$1,Axis:Axis$1,innerDrawElementOnCanvas:brushSingle,zrender,matrix,vector,zrUtil:util$1,color,helper,number,time,graphic,format,util,List:SeriesData$1,ComponentModel:ComponentModel$1,ComponentView:ComponentView$1,SeriesModel:SeriesModel$1,ChartView:ChartView$1,extendComponentModel,extendComponentView,extendSeriesModel,extendChartView},Symbol.toStringTag,{value:"Module"}));const components={Copyright,RichEditor,DialogSelect,ItemSelect,AttachmentUpload,ImageUpload,FileUpload,ViewForm,ViewTable,ViewChart,ModalForm,ModalTable,FormSetting,FormSettingLayout,TableSetting,ModalFormFilter,ModalFormSort,Shortcut,NoticeList,iLink:Link},install=function(a){install.installed||(a.use(router$1),a.use(store),a.use(i18n$1),a.use(ViewUIPlus__default.default,{i18n:i18n$1}),a.mixin(mixinApp),Object.keys(components).forEach(r=>{a.component(r,components[r])}),a.directive("focus",focus),a.directive("tab-hide",tabHide),a.config.globalProperties.$echarts=echarts)},API={install},files={"./pages/account/login.vue":__glob_44_0,"./pages/common/home.vue":__glob_44_1,"./pages/common/task-form.vue":__glob_44_2,"./pages/common/todo.vue":__glob_44_3,"./pages/system/apiLog.vue":__glob_44_4,"./pages/system/applicationType.vue":__glob_44_5,"./pages/system/customPage.vue":__glob_44_6,"./pages/system/customTable.vue":__glob_44_7,"./pages/system/dict.vue":__glob_44_8,"./pages/system/dictType.vue":__glob_44_9,"./pages/system/entityView.vue":__glob_44_10,"./pages/system/extendColumn.vue":__glob_44_11,"./pages/system/formView.vue":__glob_44_12,"./pages/system/i18nText.vue":__glob_44_13,"./pages/system/log.vue":__glob_44_14,"./pages/system/mailTemplate.vue":__glob_44_15,"./pages/system/notice.vue":__glob_44_16,"./pages/system/openApi.vue":__glob_44_17,"./pages/system/openUser.vue":__glob_44_18,"./pages/system/organization.vue":__glob_44_19,"./pages/system/organizationType.vue":__glob_44_20,"./pages/system/permission.vue":__glob_44_21,"./pages/system/planJob.vue":__glob_44_22,"./pages/system/printTemplate.vue":__glob_44_23,"./pages/system/process.vue":__glob_44_24,"./pages/system/processType.vue":__glob_44_25,"./pages/system/role.vue":__glob_44_26,"./pages/system/rolePropertyEdit.vue":__glob_44_27,"./pages/system/sequenceSetting.vue":__glob_44_28,"./pages/system/setting.vue":__glob_44_29,"./pages/system/systemData.vue":__glob_44_30,"./pages/system/tableView.vue":__glob_44_31,"./pages/system/taskQueue.vue":__glob_44_32,"./pages/system/user.vue":__glob_44_33,"./pages/template/processPage.vue":__glob_44_34,"./pages/template/reportPage.vue":__glob_44_35,"./pages/template/viewPage.vue":__glob_44_36,"./pages/system/error/404.vue":__glob_44_37},pages={};Object.keys(files).forEach(a=>{pages[a.replace(/(\.\/pages\/)/g,"")]=files[a].default});const created=async(a,r)=>{Object.keys(files).forEach(o=>{pages[o.replace(/(\.\/pages\/)/g,"")]=files[o].default}),a.use(API),window&&(window.$app=require$$0.getCurrentInstance(),window.$app.$t=i18n$1.global.t,window.$app.$Message=a.config.globalProperties.$Message,window.$app.$Notice=a.config.globalProperties.$Notice),initRouter(pages,r),store.dispatch("admin/i18n/load",a),store.commit("admin/menu/setHeader",menuHeader),store.dispatch("admin/account/load"),a.config.globalProperties.$pages=pages};exports.App=App,exports.applicationApi=applicationApi,exports.basicLayout=index,exports.created=created,exports.customModelApi=customModelApi,exports.dataSourceApi=dataSourceApi,exports.default=API,exports.i18n=i18n$1,exports.initRouter=initRouter,exports.lodop=lodop,exports.mixinPage=mixinPage,exports.modelApi=modelApi,exports.pages=pages,exports.request=service,exports.router=router$1,exports.setting=Setting,exports.store=store,exports.taskApi=taskApi,exports.util=util$8,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -114,6 +114,7 @@ const components = {
|
|
|
114
114
|
const install = function (app) {
|
|
115
115
|
if (install.installed) return;
|
|
116
116
|
|
|
117
|
+
app.use(router);
|
|
117
118
|
app.use(store);
|
|
118
119
|
app.use(i18n);
|
|
119
120
|
app.use(ViewUIPlus, {
|
|
@@ -159,7 +160,13 @@ Object.keys(files).forEach(key => {
|
|
|
159
160
|
pages[key.replace(/(\.\/pages\/)/g, '')] = files[key].default;
|
|
160
161
|
});
|
|
161
162
|
|
|
162
|
-
const created = async (app,
|
|
163
|
+
const created = async (app, routes) => {
|
|
164
|
+
Object.keys(files).forEach(key => {
|
|
165
|
+
pages[key.replace(/(\.\/pages\/)/g, '')] = files[key].default;
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
app.use(API);
|
|
169
|
+
|
|
163
170
|
if (window) {
|
|
164
171
|
// 将根实例存全局,可在特殊场景下调用
|
|
165
172
|
window.$app = getCurrentInstance();
|
|
@@ -185,14 +192,6 @@ const created = async (app, pages, routes) => {
|
|
|
185
192
|
app.config.globalProperties.$pages = pages;
|
|
186
193
|
};
|
|
187
194
|
|
|
188
|
-
const routeChanged = to => {
|
|
189
|
-
// 监听路由 控制侧边栏显示 标记当前顶栏菜单(如需要)
|
|
190
|
-
store.dispatch('admin/menu/setMenuList', to);
|
|
191
|
-
|
|
192
|
-
// TODO 权限判断
|
|
193
|
-
//this.appRouteChange(to, from);
|
|
194
|
-
};
|
|
195
|
-
|
|
196
195
|
export default API;
|
|
197
196
|
|
|
198
197
|
export {
|
|
@@ -213,6 +212,5 @@ export {
|
|
|
213
212
|
util,
|
|
214
213
|
router,
|
|
215
214
|
initRouter,
|
|
216
|
-
created
|
|
217
|
-
routeChanged
|
|
215
|
+
created
|
|
218
216
|
};
|
package/src/router/dynamic.js
CHANGED
package/src/router/index.js
CHANGED
|
@@ -35,6 +35,9 @@ const initRouter = (pages, routes) => {
|
|
|
35
35
|
ViewUIPlus.LoadingBar.start();
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
// 监听路由 控制侧边栏显示 标记当前顶栏菜单(如需要)
|
|
39
|
+
store.dispatch('admin/menu/setMenuList', to);
|
|
40
|
+
|
|
38
41
|
if (!inited) {
|
|
39
42
|
// 初始化动态路由
|
|
40
43
|
await dynamic.init(router, pages);
|
|
@@ -50,16 +53,25 @@ const initRouter = (pages, routes) => {
|
|
|
50
53
|
replace: true
|
|
51
54
|
});
|
|
52
55
|
} else {
|
|
53
|
-
//
|
|
54
|
-
if (to.matched.some(
|
|
55
|
-
//
|
|
56
|
+
// 判断权限
|
|
57
|
+
if (to.matched.some(item => item.meta.auth)) {
|
|
58
|
+
// 需要校验权限
|
|
56
59
|
const token = util.cookies.get('token');
|
|
57
60
|
|
|
58
61
|
if (token && token !== 'undefined') {
|
|
59
|
-
|
|
62
|
+
const permissions = store.getters['admin/menu/permission'];
|
|
63
|
+
|
|
64
|
+
if (permissions[to.path.substring(1)]) {
|
|
65
|
+
// 权限验证通过
|
|
66
|
+
next();
|
|
67
|
+
} else {
|
|
68
|
+
// 权限验证不通过,跳转首页
|
|
69
|
+
next({
|
|
70
|
+
path: 'home'
|
|
71
|
+
});
|
|
72
|
+
}
|
|
60
73
|
} else {
|
|
61
|
-
//
|
|
62
|
-
// 携带上登陆成功之后需要跳转的页面完整路径
|
|
74
|
+
// 没有token,跳转登录页
|
|
63
75
|
next({
|
|
64
76
|
name: 'login',
|
|
65
77
|
query: {
|
|
@@ -243,13 +243,16 @@ export default {
|
|
|
243
243
|
|
|
244
244
|
// 设置侧边栏菜单
|
|
245
245
|
const menuSiderList = getNativeMenuSider();
|
|
246
|
-
let path = to.matched[to.matched.length - 1].path;
|
|
247
246
|
|
|
247
|
+
//console.log('setMenuList', to, to.matched, to.matched.length);
|
|
248
|
+
//let path = to.matched[to.matched.length - 1].path;
|
|
249
|
+
|
|
250
|
+
//let headerName = getHeaderName(path, menuSiderList);
|
|
251
|
+
//if (headerName === null) {
|
|
252
|
+
let path = to.path;
|
|
248
253
|
let headerName = getHeaderName(path, menuSiderList);
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
headerName = getHeaderName(path, menuSiderList);
|
|
252
|
-
}
|
|
254
|
+
|
|
255
|
+
//}
|
|
253
256
|
// 在 404 时,是没有 headerName 的
|
|
254
257
|
if (headerName !== null) {
|
|
255
258
|
commit('setHeaderName', headerName);
|
package/test/main.js
CHANGED
|
@@ -5,7 +5,7 @@ if (!!window.ActiveXObject || 'ActiveXObject' in window) {
|
|
|
5
5
|
import { createApp, h } from 'vue';
|
|
6
6
|
|
|
7
7
|
// 基础框架
|
|
8
|
-
import
|
|
8
|
+
import { App, created } from '../src';
|
|
9
9
|
|
|
10
10
|
// 固定路由
|
|
11
11
|
import routes from './router/routes';
|
|
@@ -13,37 +13,15 @@ import routes from './router/routes';
|
|
|
13
13
|
// 自定义css
|
|
14
14
|
import './styles/css/custom.css';
|
|
15
15
|
|
|
16
|
-
// 自定义store
|
|
17
|
-
import cusotmStore from './store/custom';
|
|
18
|
-
store.registerModule('custom', cusotmStore);
|
|
19
|
-
|
|
20
16
|
// 环境模式
|
|
21
17
|
window.$mode = import.meta.env.MODE;
|
|
22
18
|
|
|
23
19
|
// 页面
|
|
24
20
|
const files = import.meta.globEager('./pages/**/*.vue');
|
|
25
21
|
|
|
26
|
-
Object.keys(files).forEach(key => {
|
|
27
|
-
pages[key.replace(/(\.\/pages\/)/g, '')] = files[key].default;
|
|
28
|
-
});
|
|
29
|
-
|
|
30
22
|
const app = createApp({
|
|
31
|
-
// mixins: [mixinApp],
|
|
32
23
|
render: () => h(App),
|
|
33
|
-
created()
|
|
34
|
-
created(app, pages, routes);
|
|
35
|
-
},
|
|
36
|
-
watch: {
|
|
37
|
-
// 监听路由 控制侧边栏显示 标记当前顶栏菜单(如需要)
|
|
38
|
-
$route(to, from) {
|
|
39
|
-
routeChanged(to, from);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
24
|
+
created: () => created(app, routes, files)
|
|
42
25
|
});
|
|
43
26
|
|
|
44
|
-
app.use(router);
|
|
45
|
-
app.use(moohoBaseAdminPlus);
|
|
46
|
-
|
|
47
|
-
//app.config.globalProperties.$pages = pages;
|
|
48
|
-
|
|
49
27
|
app.mount('#app');
|
package/src/router/routes.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { pages, basicLayout } from '../../src';
|
|
2
|
-
import { h } from 'vue';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* 在主框架之外显示
|
|
6
|
-
*/
|
|
7
|
-
const frameOut = [
|
|
8
|
-
// 登录
|
|
9
|
-
{
|
|
10
|
-
path: '/login',
|
|
11
|
-
name: 'login',
|
|
12
|
-
meta: {
|
|
13
|
-
title: 'Front_Label_Login'
|
|
14
|
-
},
|
|
15
|
-
component: () => {
|
|
16
|
-
return new Promise(resolve => {
|
|
17
|
-
resolve(pages['account/login.vue']);
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
];
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* 在主框架内显示
|
|
25
|
-
*/
|
|
26
|
-
const frameIn = [
|
|
27
|
-
{
|
|
28
|
-
path: '/',
|
|
29
|
-
name: 'root',
|
|
30
|
-
redirect: {
|
|
31
|
-
name: 'login'
|
|
32
|
-
},
|
|
33
|
-
component: basicLayout,
|
|
34
|
-
children: [
|
|
35
|
-
{
|
|
36
|
-
path: 'index',
|
|
37
|
-
name: 'index',
|
|
38
|
-
redirect: {
|
|
39
|
-
name: 'home'
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
// 首页
|
|
43
|
-
{
|
|
44
|
-
path: '/home',
|
|
45
|
-
name: 'home',
|
|
46
|
-
meta: {
|
|
47
|
-
title: 'Front_Label_Home',
|
|
48
|
-
description: 'Home',
|
|
49
|
-
closable: false
|
|
50
|
-
},
|
|
51
|
-
component: () => {
|
|
52
|
-
return new Promise(resolve => {
|
|
53
|
-
resolve(pages['common/home.vue']);
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
// 刷新页面 必须保留
|
|
58
|
-
{
|
|
59
|
-
path: 'refresh',
|
|
60
|
-
name: 'refresh',
|
|
61
|
-
hidden: true,
|
|
62
|
-
component: {
|
|
63
|
-
beforeRouteEnter(to, from, next) {
|
|
64
|
-
next(instance => instance.$router.replace(from.fullPath));
|
|
65
|
-
},
|
|
66
|
-
render: () => h()
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
// 页面重定向 必须保留
|
|
70
|
-
{
|
|
71
|
-
path: 'redirect/:route*',
|
|
72
|
-
name: 'redirect',
|
|
73
|
-
hidden: true,
|
|
74
|
-
component: {
|
|
75
|
-
beforeRouteEnter(to, from, next) {
|
|
76
|
-
next(instance => instance.$router.replace(JSON.parse(from.params.route)));
|
|
77
|
-
},
|
|
78
|
-
render: () => h()
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
];
|
|
84
|
-
|
|
85
|
-
// 导出需要显示菜单的
|
|
86
|
-
export const frameInRoutes = frameIn;
|
|
87
|
-
|
|
88
|
-
// 重新组织后导出
|
|
89
|
-
export default [...frameOut, ...frameIn];
|