IDCDatasync-vue/dist22-04-07/js/chunk-312acad4.9b5c65e9.js

1 line
6.8 KiB
JavaScript
Raw Normal View History

2025-01-15 20:19:34 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-312acad4"],{2832:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-card",{attrs:{bordered:!1}},[a("a-tabs",{attrs:{defaultActiveKey:"1"},on:{change:t.callback}},[a("a-tab-pane",{key:"1",attrs:{tab:"柱状图"}},[a("a-row",[a("a-col",{attrs:{span:10}},[a("a-radio-group",{attrs:{value:t.barType},on:{change:t.statisticst}},[a("a-radio-button",{attrs:{value:"year"}},[t._v("按年统计")]),a("a-radio-button",{attrs:{value:"month"}},[t._v("按月统计")]),a("a-radio-button",{attrs:{value:"category"}},[t._v("按类别统计")]),a("a-radio-button",{attrs:{value:"cabinet"}},[t._v("按柜号统计")])],1)],1),a("a-col",{attrs:{span:14}},[(t.barType,t._e())],1),a("bar",{staticClass:"statistic",attrs:{title:"档案统计",dataSource:t.countSource,height:400}})],1)],1),a("a-tab-pane",{key:"2",attrs:{tab:"饼状图"}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:10}},[a("a-radio-group",{attrs:{value:t.pieType},on:{change:t.statisticst}},[a("a-radio-button",{attrs:{value:"year"}},[t._v("按年统计")]),a("a-radio-button",{attrs:{value:"month"}},[t._v("按月统计")]),a("a-radio-button",{attrs:{value:"category"}},[t._v("按类别统计")]),a("a-radio-button",{attrs:{value:"cabinet"}},[t._v("按柜号统计")])],1)],1),a("a-col",{attrs:{span:14}},[(t.pieType,t._e())],1),a("pie",{staticClass:"statistic",attrs:{title:"档案统计",dataSource:t.countSource,height:450}})],1)],1)],1)],1)},r=[],o=a("edd9"),i=a("6cb2"),u=a("da05"),s=a("0fea"),c={name:"ArchivesStatisticst",components:{ACol:u["b"],Bar:o["default"],Pie:i["default"]},data:function(){return{description:"档案统计页面",queryParam:{},countSource:[],barType:"year",barDate:["month","month"],barValue:[],pieType:"year",pieDate:["month","month"],pieValue:[],tabStatus:"bar",url:{getYearCountInfo:"/mock/api/report/getYearCountInfo",getMonthCountInfo:"/mock/api/report/getMonthCountInfo",getCntrNoCountInfo:"/mock/api/report/getCntrNoCountInfo",getCabinetCountInfo:"/mock/api/report/getCabinetCountInfo"}}},created:function(){var t=this.url.getYearCountInfo;this.loadDate(t,"year",{})},methods:{loadDate:function(t,e,a){var n=this;Object(s["c"])(t,a,"get").then((function(t){if(t.success)n.countSource=[],"year"===e&&n.getYearCountSource(t.result),"month"===e&&n.getMonthCountSource(t.result),"category"===e&&n.getCategoryCountSource(t.result),"cabinet"===e&&n.getCabinetCountSource(t.result);else{var a=n;a.$message.warning(t.message)}}))},getYearCountSource:function(t){for(var e=0;e<t.length;e++)"bar"===this.tabStatus?this.countSource.push({x:"".concat(t[e].year,"年"),y:t[e].yearcount}):this.countSource.push({item:"".concat(t[e].year,"年"),count:t[e].yearcount})},getMonthCountSource:function(t){for(var e=0;e<t.length;e++)"bar"===this.tabStatus?this.countSource.push({x:t[e].month,y:t[e].monthcount}):this.countSource.push({item:t[e].month,count:t[e].monthcount})},getCategoryCountSource:function(t){for(var e=0;e<t.length;e++)"bar"===this.tabStatus?this.countSource.push({x:t[e].classifyname,y:t[e].cntrnocount}):this.countSource.push({item:t[e].classifyname,count:t[e].cntrnocount})},getCabinetCountSource:function(t){for(var e=0;e<t.length;e++)"bar"===this.tabStatus?this.countSource.push({x:t[e].cabinetname,y:t[e].cabinetcocunt}):this.countSource.push({item:t[e].cabinetname,count:t[e].cabinetcocunt})},callback:function(t){"1"===t?(this.tabStatus="bar",this.queryDatebar()):(this.tabStatus="pie",this.queryDatepie())},statisticst:function(t){"pie"===this.tabStatus?(this.pieType=t.target.value,this.queryDatepie()):(this.barType=t.target.value,this.queryDatebar())},queryDatebar:function(){this.barValue.length>0?this.getUrl(this.barType,{startTime:this.barValue[0]._d,endTime:this.barValue[1]._d}):this.getUrl(this.barType,{})},queryDatepie:function(){this.pieValue.length>0?this.getUrl(this.pieType,{startTime:this.pieValue[0]._d,endTime:this.pieValue[1]._d}):this.getUrl(this.pieType,{})},searchReset:function(){"pie"===this.tabStatus?this.pieValue=[]:this.barValue=[],th