1 line
29 KiB
JavaScript
1 line
29 KiB
JavaScript
|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-bd140b24"],{"011e":function(t,e,a){"use strict";a.r(e);var s=(a("4160"),a("a9e3"),a("b680"),a("159b"),a("66b9")),i=a.n(s),r=a("5769"),n=(a("99af"),{data:function(){return{statusArr1:this.$t("message.dataBoard.statusArr1"),inspectTypeNameList:[],dataType1:1,dataType2:1,total:{closeNum:0,monthInspectNum:0,notRectificationNum:0,otherInspectNum:0,rectificationNum:1,reviewedNum:0,totalNum:1,weekInspectNum:1},noData1:!0,noData2:!0,noData3:!0,projectSn:"",alarmList:[],activityList:[],statusArr:this.$t("message.dataBoard.statusArr"),totalNum2:0,pageNo:1,pageSize:10,total2:0,tableData:[],dialogVisible2:!1,dialogVisible:!1,valueTime:""}},mounted:function(){this.projectSn=this.$store.state.projectSn,this.getData1(),this.getActivity(),this.getNewestData()},methods:{handleSizeChange:function(t){this.pageSize=t,this.securityManageList()},handleCurrentChange:function(t){this.pageNo=t,this.securityManageList()},handleSizeChangeTwo:function(t){this.pageSize=t,this.selectAllAlarmList()},handleCurrentChangeTwo:function(t){this.pageNo=t,this.selectAllAlarmList()},securityManageList:function(){var t=this,e={pageNo:this.pageNo,pageSize:this.pageSize,projectSn:this.projectSn};Object(r.o)(e).then((function(e){t.tableData=e.result.records,t.total2=e.result.total}))},selectAllAlarmList:function(){var t=this,e={startTime:this.valueTime?this.valueTime[0]:"",endTime:this.valueTime?this.valueTime[1]:"",pageNo:this.pageNo,pageSize:this.pageSize,projectSn:this.projectSn};Object(r.p)(e).then((function(e){t.tableData=e.result.records,t.total2=e.result.total}))},Refresh:function(){this.valueTime="",this.pageNo=1,this.pageSize=10,this.total2=0,this.selectAllAlarmList()},selectInspectTypeStatisticsList:function(){var t=this,e={projectSn:this.projectSn};Object(r.x)(e).then((function(e){t.inspectTypeNameList=e.result,t.createPieChart([{value:t.inspectTypeNameList[0].num,name:""},{value:t.inspectTypeNameList[1].num,name:""},{value:t.inspectTypeNameList[2].num,name:""}],t.$refs.safeTrainChart,["rgba(254, 108, 127, 1)","rgba(120, 111, 240, 1)","rgba(68, 215, 182, 1)"],t.$t("message.dataBoard.questionAllCounts"),t.inspectTypeNameList[0].num+t.inspectTypeNameList[1].num+t.inspectTypeNameList[2].num)}))},getData1:function(){var t=this,e={projectSn:this.projectSn};Object(r.w)(e).then((function(e){t.total=e.result.total,t.selectInspectTypeStatisticsList(),t.getAllAlarmTotal(),t.createPieChart([{value:1,name:""},{value:0,name:""}],t.$refs.ratioChart2,["#7718fe","rgba(68, 215, 182, 0.2)"],t.$t("message.dataBoard.statusArr1")[2]+t.$t("message.dataBoard.problenNum"),t.total.reviewNum),t.createPieChart([{value:1,name:""},{value:0,name:""}],t.$refs.ratioChart3,["#fe6c7f","rgba(68, 215, 182, 0.2)"],t.$t("message.dataBoard.statusArr1")[0]+t.$t("message.dataBoard.problenNum"),t.total.rectificationNum);var a=t.total.totalNum?(t.total.closeNum/t.total.totalNum*100).toFixed(2):0;t.createPieChart([{value:a,name:""},{value:100-a,name:""}],t.$refs.ratioChart4,["rgba(68, 215, 182, 1)","rgba(68, 215, 182, 0.2)"],t.$t("message.dataBoard.statusArr")[2]+t.$t("message.dataBoard.rate"),a+"%");var s=e.result.monthList,i=[],r=[];s.length>0?(s.forEach((function(t){var e=t.titleName.substr(5,t.titleName.length);i.push(e),r.push(t.num)})),t.noData3=!1):t.noData3=!0,t.createLineChart(i,r)}))},getAllAlarmTotal:function(){var t=this;Object(r.f)({projectSn:this.projectSn}).then((function(e){t.totalNum2=e.result,t.createPieChart1()}))},createPieChart1:function(){var t=this,e=i.a.init(this.$refs.ratioChart1),a={color:["rgba(254, 108, 127, 1)","rgba(120, 111, 240, 1)"],title:{show:!0,text:this.total.totalNum+this.totalNum2,x:"48%",y:"36%",z:5,textAlign:"center",textStyle:{color:"rgba(255, 255, 255, 1)",fontSize:20},subtext:this.$t("message.dataBoard.questionAllCounts"),subtextStyle:{color:"rgba(255, 255, 255, 0.8)",fontSize:13}},tooltip:{data:this.$t("message.dataBoard.enteringStatus"),trigger:"item",formatter:function(e,a){return"".concat(this.$t("message.dataBoard.enteringStatus")[0],":").concat(t.total.totalNum,"/").concat((t.total.total
|