1 |
- import{N as e,s as t,t as a,D as o}from"../element-plus/element-plus.a206f5fe.js";import{d as s,B as r,r as i,E as l,i as n,ad as c,ap as d,o as u,c as m,P as p,S as f,a as h,W as v,Q as b,a9 as x,a0 as y,a1 as g,X as j,ay as w,az as L,T as N,V as _}from"../@vue/@vue.2e72eb65.js";import{B as E}from"../Controller/Controller.ef4ed6a0.js";import"../echarts/echarts.adb31f9c.js";import{A as k,a as C,c as S,b as T}from"../../assets/index.9d3f0ed9.js";import{m as D}from"../como-admin-web/como-admin-web.4290f457.js";import{V as A}from"../zrender/zrender.a6916eca.js";import{_ as I}from"../vue-count-to/vue-count-to.ec270ea8.js";import"../lodash-es/lodash-es.72245c2f.js";import"../async-validator/async-validator.21881447.js";import"../@vueuse/@vueuse.decddfd9.js";import"../dayjs/dayjs.c17b983f.js";import"../@element-plus/@element-plus.3703707e.js";import"../@ctrl/@ctrl.9c8f424f.js";import"../@popperjs/@popperjs.f1fb8f77.js";import"../normalize-wheel-es/normalize-wheel-es.94de1731.js";import"../vue-como-image/vue-como-image.1f08e6a4.js";import"../como-ts-utils/como-ts-utils.52443996.js";import"../szjcomo-utils/szjcomo-utils.8c09309c.js";import"../crypto-js/crypto-js.38083f5b.js";import"../ua-parser-js/ua-parser-js.f2fc0435.js";import"../como-validator/como-validator.c3b2e2bb.js";import"../tslib/tslib.e35f93b8.js";import"../vue-router/vue-router.8caf83cb.js";import"../mitt/mitt.fcf4f812.js";import"../axios/axios.93b23c89.js";import"../pinia/pinia.0960c1bb.js";import"../@wangeditor/@wangeditor.bc4d1034.js";import"../xlsx/xlsx.a42c9766.js";import"../docx-preview/docx-preview.ad0b8171.js";import"../jszip/jszip.e379f989.js";import"../vue3-count-to/vue3-count-to.20d3c162.js";class M extends E{Select(e,...t){throw new Error("Method not implemented.")}Create(e,...t){throw new Error("Method not implemented.")}Update(e,...t){throw new Error("Method not implemented.")}Delete(e,...t){throw new Error("Method not implemented.")}static get Ins(){return new this}DefaultConsoleData(){return{QuickMenuList:[{icon:"",title:"管理员列表",routerName:""},{icon:"",title:"报名数据分析",routerName:""},{icon:"",title:"数据管理",routerName:""},{icon:"",title:"学校管理",routerName:""},{icon:"",title:"招生计划",routerName:""},{icon:"",title:"报名时间",routerName:""}],DataCountList:[{title:"新生报名总人数",value:100,color:"#ff0000",desc:"所有新生报名总人数"},{title:"新生待审总人数",value:200,desc:"所有新生报名总人数"},{title:"公办小学新生总人数",value:400,color:"#02c367",desc:"所有新生报名总人数"},{title:"公办初中新生总人数",value:0,color:"#139fee",desc:"所有新生报名总人数"},{title:"民办小学新生总人数",value:300,desc:"所有新生报名总人数"},{title:"民办初中新生总人数",value:400,desc:"所有新生报名总人数"},{title:"转学报名总人数",value:150,desc:"所有新生报名总人数"}],EchartsList:[{span:8,options:this.LeftEchartsOptions()},{span:16,options:this.RightEcharsOptions()}]}}async GetConfigData(){const e=this;try{const e=`${k.Ins.GetAppId()}${C.SystemDashboardURL}`,t=D.WebCacheManager.Ins().getItem(e);if(!t)return this.DefaultConsoleData();const a=await this.Request.Get(t);if(!1!==a.error)throw new Error(a.message);return a.data}catch(t){e.Exception(t.message)}}LeftEchartsOptions(){return D.EchartsGenderOptions.Ins.Title({text:"每日人数变化图(演示数据)",textStyle:{fontSize:15,color:"#000000"},textAlign:"left"}).ToolTip({trigger:"item",formatter:"{b0}: {c0}<br />{b1}: {c1}"}).XAxis({type:"category",data:["周一","周二","周三","周四","周五","周六","周日"]}).YAxis({type:"value"}).SeriesLine({type:"line",data:[150,230,224,218,135,147,260]}).ToOptions()}RightEcharsOptions(){return D.EchartsGenderOptions.Ins.Title({text:"访问峰值变化(演示数据)",textStyle:{fontSize:15,color:"#000000"},textAlign:"auto"}).ToolTip({trigger:"axis"}).XAxis([{type:"category",data:["1km","2km","3km","4km","5km","6km"],boundaryGap:!0,axisTick:{show:!0}}]).YAxis([{name:"供回温度(℃)",nameLocation:"middle",nameTextStyle:{padding:[3,4,50,6]},splitLine:{show:!0,lineStyle:{type:"dashed",color:"#f5f5f5"}},axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#000000",formatter:"{value} "}},{name:"压力值(Mpa)",nameLocation:"middle",nameTextStyle:{padding:[50,4,5,6]},splitLine:{show:!1},axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#000000",formatter:"{value} "}}]).BgColor("#ffffff").Legend({data:["高峰","低峰","压力值(Mpa)"],right:0}).Grid({top:70,right:80,bottom:30,left:80}).Series([{name:"低峰",type:"line",smooth:!0,showSymbol:!0,symbol:"path://M150 0 L80 175 L250 75 L50 75 L220 175 Z",symbolSize:12,yAxisIndex:0,areaStyle:{color:new A(0,0,0,1,[{offset:0,color:"rgba(250,180,101,0.3)"},{offset:1,color:"rgba(250,180,101,0)"}]),shadowColor:"rgba(250,180,101,0.2)",shadowBlur:20},itemStyle:{color:"#FF8000"},data:[{value:1,stationName:"s1"},{value:3,stationName:"s2"},{value:4,stationName:"s3"},{value:9,stationName:"s4"},{value:3,stationName:"s5"},{value:2,stationName:"s6"}]},{name:"高峰",type:"line",smooth:!0,showSymbol:!0,symbol:"emptyCircle",symbolSize:12,yAxisIndex:0,areaStyle:{color:new A(0,0,0,1,[{offset:0,color:"rgba(199, 237, 250,0.5)"},{offset:1,color:"rgba(199, 237, 250,0.2)"}],!1)},itemStyle:{color:"#3bbc86"},data:[{value:31,stationName:"s1"},{value:36,stationName:"s2"},{value:54,stationName:"s3"},{value:24,stationName:"s4"},{value:73,stationName:"s5"},{value:22,stationName:"s6"}]},{name:"压力值(Mpa)",type:"bar",barWidth:30,yAxisIndex:1,itemStyle:{color:new A(0,0,0,1,[{offset:0,color:"rgba(108,80,243,0.3)"},{offset:1,color:"rgba(108,80,243,0)"}]),borderRadius:[30,30,0,0]},data:[{value:11,stationName:"s1"},{value:34,stationName:"s2"},{value:54,stationName:"s3"},{value:39,stationName:"s4"},{value:63,stationName:"s5"},{value:24,stationName:"s6"}]}]).ToOptions()}async QuickClick(e){try{const t=(await S().GetAdminMenus()).filter((t=>t.router_name==e.routerName));if(!t.length)return!1;if(e.routerName){if(this.RouteActionAuth(e.routerName),this.Utils.IsURL(t[0].router_path))return void window.open(t[0].router_path,"_blank");this.Router.push({name:e.routerName})}}catch(t){this.Exception(t.message)}}}const z=e=>(w("data-v-916ff38d"),e=e(),L(),e),G={class:"admin-dashboard"},V={class:"admin-dashboard-header"},O={class:"card-header"},Q=z((()=>h("span",null,"数据统计总览,每10分钟更新一次数据(注:更多实时统计请在【数据分析】中查看)",-1))),R={class:"admin-dashboard-header-count-item"},U={class:"como-text-over"},B={class:"admin-dashboard-header"},W={class:"card-header"},X=z((()=>h("span",null,"数据管理中心快捷操作",-1))),q=["onClick"],F={class:"admin-icon como-text-center"},P={class:"como-text-over como-text-center"},Y={class:"echarts-header"},$={class:"admin-dashboard-center-right"},Z=I(s({__name:"Dashboard",setup(s){const w=M.Ins.SetDialogIns(r("comoDialog")),L=i(k.Ins.GetThemeColor()),E=i({QuickMenuList:[],DataCountList:[],EchartsList:[],EchartsTitle:"数据展示图表,每5分钟更新一次"}),C=i(!0);return l((async()=>{L.value=await T().GetAppProThemeColor()})),n((async()=>{const e=await w.GetConfigData();e&&(E.value.QuickMenuList=e.QuickMenuList,E.value.DataCountList=e.DataCountList,E.value.EchartsList=e.EchartsList,e.EchartsTitle&&(E.value.EchartsTitle=e.EchartsTitle),C.value=!1)})),(s,r)=>{const i=c("como-icon"),l=c("count-to"),n=e,k=t,S=a,T=o,D=d("comoEcharts");return u(),m("div",G,[p(S,{gutter:8},{default:f((()=>[p(k,{span:16},{default:f((()=>[h("div",V,[p(T,{class:"box-card","body-style":{padding:"10px"}},{header:f((()=>[h("div",O,[p(i,{color:L.value,left:"-5px",top:"1px"},{default:f((()=>[v("")])),_:1},8,["color"]),Q])])),default:f((()=>[p(S,{gutter:5},{default:f((()=>[(u(!0),m(b,null,x(E.value.DataCountList,((e,t)=>(u(),N(k,{span:6,key:t},{default:f((()=>[h("div",R,[p(n,{animated:"",rows:2,loading:C.value},{default:f((()=>{var t,a;return[h("h4",{style:_({color:null!=(t=e.color)?t:"#000000"}),class:"como-text-over"},j(e.title),5),h("h1",{style:_({color:null!=(a=e.color)?a:"#000000"})},[p(l,{duration:5e3,startVal:0,endVal:e.value,separator:""},null,8,["endVal"])],4),h("p",U,j(e.desc),1)]})),_:2},1032,["loading"])])])),_:2},1024)))),128))])),_:1})])),_:1})])])),_:1}),p(k,{span:8},{default:f((()=>[h("div",B,[p(T,{class:"box-card","body-style":{padding:"10px"}},{header:f((()=>[h("div",W,[p(i,{color:L.value,left:"-5px"},{default:f((()=>[v("")])),_:1},8,["color"]),X])])),default:f((()=>[p(S,{gutter:5},{default:f((()=>[(u(!0),m(b,null,x(E.value.QuickMenuList,((e,t)=>(u(),N(k,{span:6,key:t},{default:f((()=>[h("div",{class:"admin-dashboard-header-quick-item",onClick:t=>(e=>w.QuickClick(e))(e)},[p(n,{animated:"",loading:C.value,rows:2},{default:f((()=>[h("div",F,[p(i,{modelValue:e.icon,"onUpdate:modelValue":t=>e.icon=t,size:"30px",color:L.value},null,8,["modelValue","onUpdate:modelValue","color"])]),h("p",P,j(e.title),1)])),_:2},1032,["loading"])],8,q)])),_:2},1024)))),128))])),_:1})])),_:1})])])),_:1})])),_:1}),y(h("div",Y,[p(i,{style:{"padding-right":"0.5vh"},color:"#02c367",top:"1px"},{default:f((()=>[v("")])),_:1}),h("span",null,j(E.value.EchartsTitle),1)],512),[[g,!C.value]]),p(S,{gutter:8},{default:f((()=>[(u(!0),m(b,null,x(E.value.EchartsList,(e=>{var t;return u(),N(k,{span:null!=(t=e.span)?t:12},{default:f((()=>[p(T,{"body-style":{padding:"5px"},class:"card-echarts"},{default:f((()=>[p(n,{animated:"",loading:C.value,rows:12},{default:f((()=>[y(h("div",$,null,512),[[D,{options:e.options}]])])),_:2},1032,["loading"])])),_:2},1024)])),_:2},1032,["span"])})),256))])),_:1})])}}}),[["__scopeId","data-v-916ff38d"]]);export{Z as default};
|