Your Name
2022-09-29 6f954f70f54e492157b97db314eaaaeb12192580
1
(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-4839"],{FyTx:function(t,e,a){"use strict";a.r(e);var n=a("cLjf"),r=a.n(n),i=a("hDQ3"),c=a.n(i),s=a("F9LP"),o={name:"departmentChart",data:function(){return{numData:[],departmentData:[],myChart:"",chartsVisible:!1}},mounted:function(){},methods:{show:function(){this.chartsVisible=!0,this.getChart()},getChart:function(){var t=this;return c()(r.a.mark(function e(){var a;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(s.n)();case 2:"200"===(a=e.sent).data.code?(t.numData=a.data.result.map(function(t){return t.count}),t.departmentData=a.data.result.map(function(t){return t.department}),t.myChart=t.$echarts.init(document.getElementById("departmentChart")),t.myChart.setOption({tooltip:{trigger:"item"},legend:{top:"5%",left:"center",orient:"vertical"},xAxis:{type:"category",data:t.departmentData},yAxis:{type:"value"},series:[{data:t.numData,type:"bar",itemStyle:{normal:{color:function(t){return["#fac858","#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#fc8452","#3ba272","#9a60b4","#ea7ccc"][t.dataIndex]}}},showBackground:!0,backgroundStyle:{color:"#5470c6"}}]})):t.$message({type:"warning",message:a.data.message});case 4:case"end":return e.stop()}},e,t)}))()}}},d=(a("dVgh"),a("ZrdR")),u=Object(d.a)(o,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{attrs:{title:"各部门风险分析单元",visible:t.chartsVisible,"modal-append-to-body":!1,"close-on-click-modal":!1,width:"600px"},on:{"update:visible":function(e){t.chartsVisible=e}}},[a("div",{staticStyle:{width:"90%",height:"360px",margin:"0 auto"},attrs:{id:"departmentChart"}})])},[],!1,null,"d5ed3d56",null);u.options.__file="departmentChart.vue";e.default=u.exports},dVgh:function(t,e,a){"use strict";var n=a("pmRd");a.n(n).a},pmRd:function(t,e,a){}}]);