import{C as c}from"./index.bb5f1b0a.js";import{f as l}from"./index.70d38b82.js";import{A as r}from"./index.51e15757.js";import{n as o}from"./vueComponentNormalizer.9ef17bb1.js";import{V as w}from"./VListCard.47c5661c.js";import{C as g}from"./CircleNumberChart.919f2108.js";import{T as x}from"./TableLayout.05a39499.js";/* empty css                                                    */const b={mounted(){this.fetch()},methods:{async fetch(){const t=await l("res-perview");let e=0;const i=t.map(a=>(e+=a.count*=1,{name:r[a.type].name,value:a.count}));this.draw({total:e,data:i})},draw({total:t,data:e}){var i,a;(a=(i=this.chart)==null?void 0:i.destroy)==null||a.call(i),this.chart=new c({padding:[30,0],container:this.$el,autoFit:!0,height:300}),this.chart.scale("value",{formatter:n=>n*100+"%"}),this.chart.coordinate("theta",{radius:.75,innerRadius:.6}),this.chart.tooltip({showTitle:!1,showMarkers:!1,itemTpl:`
        <ul class="g2-tooltip-list">
          <li class="g2-tooltip-list-item">{name}: {value}\u6B21</li>
          <li class="g2-tooltip-list-item"><span style="background-color:{color};" class="g2-tooltip-marker"></span>\u5360\u6BD4: {percent}%</li>
        </ul>`}),this.chart.interval().adjust("stack").position("value").color("name").label("value",n=>({content:()=>`${(n/t*100).toFixed(2)}%`})).tooltip("name*value",(n,s)=>({name:n,value:s,percent:(s/t*100).toFixed(2)})),this.chart.interaction("element-active"),this.chart.data(e),this.chart.annotation().html({position:["50%","50%"],html:`<div style="color:#8c8c8c;font-size: 14px;text-align: center;width: 10em;">\u6D4F\u89C8\u5171\u8BA1<br><span style="color:#8c8c8c;font-size:20px">${t}</span>\u6B21</div>`,alignX:"middle",alignY:"middle"}),this.chart.render()}},render(t){return t("div",{class:"chart",attrs:{"data-title":"\u8D44\u6E90\u6D4F\u89C8\u5360\u6BD4\u7EDF\u8BA1"}})}};let z,T;const h={};var C=o(b,z,T,!1,F,null,null,null);function F(t){for(let e in h)this[e]=h[e]}const S=function(){return C.exports}(),k={mounted(){this.fetch()},methods:{async fetch(){const t=await l("res-quantity");let e=0;const i=t.map(a=>(e+=a.count*=1,{name:r[a.type].name,value:a.count}));this.draw({total:e,data:i})},draw({total:t,data:e}){var i,a;(a=(i=this.chart)==null?void 0:i.destroy)==null||a.call(i),this.chart=new c({padding:[30,0],container:this.$el,autoFit:!0,height:300}),this.chart.scale("value",{formatter:n=>n*100+"%"}),this.chart.coordinate("theta",{radius:.75,innerRadius:.6}),this.chart.tooltip({showTitle:!1,showMarkers:!1,itemTpl:`
        <ul class="g2-tooltip-list">
          <li class="g2-tooltip-list-item">{name}: {value}\u4E2A</li>
          <li class="g2-tooltip-list-item"><span style="background-color:{color};" class="g2-tooltip-marker"></span>\u5360\u6BD4: {percent}%</li>
        </ul>`}),this.chart.interval().adjust("stack").position("value").color("name").label("value",n=>({content:()=>`${(n/t*100).toFixed(2)}%`})).tooltip("name*value",(n,s)=>({name:n,value:s,percent:(s/t*100).toFixed(2)})),this.chart.interaction("element-active"),this.chart.data(e),this.chart.annotation().html({position:["50%","50%"],html:`<div style="color:#8c8c8c;font-size: 14px;text-align: center;width: 10em;">\u8D44\u6E90\u5171\u8BA1<br><span style="color:#8c8c8c;font-size:20px">${t}</span>\u4E2A</div>`,alignX:"middle",alignY:"middle"}),this.chart.render()}},render(t){return t("div",{class:"chart",attrs:{"data-title":"\u8D44\u6E90\u6570\u91CF\u5360\u6BD4\u7EDF\u8BA1"}})}};let R,M;const p={};var j=o(k,R,M,!1,I,null,null,null);function I(t){for(let e in p)this[e]=p[e]}const L=function(){return j.exports}(),D={mounted(){this.fetch()},methods:{async fetch(){const t=await l("res-size");let e=0;const i=t.map(a=>(e+=a.size*=1,{name:r[a.type].name,...a,...a.size.formatFileSize(2,"object")}));this.draw({data:i,total:e})},draw({total:t=0,data:e}){var a,n;(n=(a=this.chart)==null?void 0:a.destroy)==null||n.call(a),this.chart=new c({padding:[30,0],container:this.$el,autoFit:!0,height:300}),this.chart.scale("value",{formatter:s=>s*100+"%"}),this.chart.coordinate("theta",{radius:.75,innerRadius:.6}),this.chart.tooltip({showTitle:!1,showMarkers:!1,itemTpl:`
        <ul class="g2-tooltip-list">
          <li class="g2-tooltip-list-item">{name}: {value}{unit}</li>
          <li class="g2-tooltip-list-item"><span style="background-color:{color};" class="g2-tooltip-marker"></span>\u5360\u6BD4: {percent}%</li>
        </ul>`}),this.chart.interval().adjust("stack").position("size").color("name").label("size",s=>({content:()=>`${(s/t*100).toFixed(2)}%`})).tooltip("name*value*size*unit",(s,y,u,$)=>({name:s,size:u,value:y,unit:$,percent:(u/t*100).toFixed(2)}));const i=t.formatFileSize(2,"object");this.chart.interaction("element-active"),this.chart.data(e),this.chart.annotation().html({position:["50%","50%"],html:`<div style="color:#8c8c8c;font-size: 14px;text-align: center;width: 10em;">\u8D44\u6E90\u5171\u8BA1<br><span style="color:#8c8c8c;font-size:20px">${i.value}</span>${i.unit}</div>`,alignX:"middle",alignY:"middle"}),this.chart.render()}},render(t){return t("div",{class:"chart",attrs:{"data-title":"\u8D44\u6E90\u5927\u5C0F\u5360\u6BD4\u7EDF\u8BA1"}})}};let P,N;const _={};var A=o(D,P,N,!1,E,null,null,null);function E(t){for(let e in _)this[e]=_[e]}const V=function(){return A.exports}();var X=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("VListCard",{staticClass:"mr-12",staticStyle:{width:"200px"},attrs:{cancel:"",title:"\u8D44\u6E90\u5217\u8868",dataList:t.accept_list},on:{change:t.onChangeItem}})},Y=[];const q={components:{VListCard:w},computed:{accept_list(){const t=[],e={};let i=0;for(const a in r)a!=="folder"&&(e[r[a].name]===void 0&&(e[r[a].name]=i,t.push({id:i,title:r[a].name,value:[]}),i++),t[e[r[a].name]].value.push(a));return t}},methods:{onChangeItem(t){this.$parent.activeType=(t==null?void 0:t.value.join())||""}}},d={};var Q=o(q,X,Y,!1,B,"f3dc48b0",null,null);function B(t){for(let e in d)this[e]=d[e]}const G=function(){return Q.exports}();var H=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"chart flex-middle-center",staticStyle:{width:"304px"}},[i("CircleNumberChart",{attrs:{title:"\u6587\u4EF6\u4E2A\u6570",value:t.fileTotal,unit:"\u4E2A"}}),i("CircleNumberChart",t._b({staticClass:"ml-12",attrs:{title:"\u6587\u4EF6\u5927\u5C0F"}},"CircleNumberChart",t.fileSize,!1))],1)},J=[];const K={components:{CircleNumberChart:g},data:()=>({fileTotal:0,fileSize:{value:0,unit:""}}),watch:{"$parent.activeType":{immediate:!0,handler:"fetch"}},methods:{async fetch(t){const{total:e,size:i}=await l("res-file-data",{type:t});this.fileTotal=e,this.fileSize=Number(i).formatFileSize(2,"object")}}},m={};var O=o(K,H,J,!1,U,null,null,null);function U(t){for(let e in m)this[e]=m[e]}const W=function(){return O.exports}();var Z=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("TableLayout",{staticClass:"flex-1",staticStyle:{width:"50%"},attrs:{height:"300px",column:t.column,data:t.list,pageInfo:t.pageInfo},on:{"page-info-change":t.fetch},scopedSlots:t._u([{key:"type",fn:function(a){var n=a.row;return[t._v(t._s(t.acceptMap[n.type].name))]}},{key:"size",fn:function(a){var n,s=a.row;return[t._v(t._s((n=s.size)===null||n===void 0?void 0:n.formatFileSize()))]}},{key:"createTime",fn:function(a){var n=a.row;return[t._v(t._s(new Date(n.createTime).format("yyyy-MM-dd hh:mm")))]}},{key:"action",fn:function(a){var n=a.row;return[i("el-button",{attrs:{type:"text"},on:{click:function(s){return t.toPreview(n)}}},[t._v("\u9884\u89C8")])]}}])})},tt=[];const et={components:{TableLayout:x},data:()=>({list:[],pageInfo:{current:1,size:10,total:0}}),watch:{"$parent.activeType":{immediate:!0,handler(t){this.type=t,this.pageInfo.current=1,this.fetch()}}},created(){this.acceptMap=r,this.column=[{prop:"name",label:"\u6587\u4EF6\u540D"},{prop:"classify",label:"\u5206\u7C7B"},{prop:"type",label:"\u6587\u4EF6\u7C7B\u578B"},{prop:"size",label:"\u6587\u4EF6\u5927\u5C0F"},{prop:"createTime",label:"\u521B\u5EFA\u65F6\u95F4",width:"120"},{prop:"creator",label:"\u4E0A\u4F20\u4EBA"},{prop:"action",label:"\u64CD\u4F5C",width:"100"}]},methods:{async fetch(){const{list:t,total:e}=await l("res-details-table",{type:this.type,pageInfo:this.pageInfo});this.list=t,this.pageInfo.total=e},toPreview(t){this.$store.showResourcePreviewDialog(t.resourceId)}}},f={};var at=o(et,Z,tt,!1,it,null,null,null);function it(t){for(let e in f)this[e]=f[e]}const nt=function(){return at.exports}(),st={data:()=>({activeType:""}),render(t){return t("div",[[V,L,S],[G,W,nt]][this.$store.statistic_tab_active].map(t))}};let rt,ot;const v={};var lt=o(st,rt,ot,!1,ct,null,null,null);function ct(t){for(let e in v)this[e]=v[e]}const yt=function(){return lt.exports}();export{yt as default};
