/*!
 *  build: vue-admin-beautiful 
 *  vue-admin-beautiful author: chuzhixin 1204505056@qq.com 
 *  vue-admin-beautiful QQ Group(QQ群): 972435319、1139183756 
 *  time: 2024-10-10 11:14:28
 */
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-fd58e646"],{"365c":function(t,e,a){"use strict";a.r(e),a.d(e,"getBasicData",(function(){return n})),a.d(e,"getConsumptionData",(function(){return o})),a.d(e,"getInspectionData",(function(){return i})),a.d(e,"getAlarmData",(function(){return d})),a.d(e,"getTaskData",(function(){return c})),a.d(e,"getAttendanceData",(function(){return u}));var r=a("b775");function n(t){var e="?month="+t.month;return void 0!=t.projectId&&(e+="&projectId="+t.projectId),Object(r["default"])({url:"/overview/basic"+e,method:"get",data:t})}function o(t){var e="?start="+t.start+"&end="+t.end;return void 0!=t.projectId&&(e+="&projectId="+t.projectId),Object(r["default"])({url:"/overview/energyConsumption"+e,method:"get",data:t})}function i(t){var e="?start="+t.start+"&end="+t.end;return void 0!=t.projectId&&(e+="&projectId="+t.projectId),Object(r["default"])({url:"/overview/inspection"+e,method:"get",data:t})}function d(t){var e="?start="+t.start+"&end="+t.end;return void 0!=t.projectId&&(e+="&projectId="+t.projectId),Object(r["default"])({url:"/overview/alarm"+e,method:"get",data:t})}function c(t){var e="?start="+t.start+"&end="+t.end;return void 0!=t.projectId&&(e+="&projectId="+t.projectId),Object(r["default"])({url:"/overview/task"+e,method:"get",data:t})}function u(t){var e="?start="+t.start+"&end="+t.end;return void 0!=t.projectId&&(e+="&projectId="+t.projectId),Object(r["default"])({url:"/overview/attendance"+e,method:"get",data:t})}},"5f99":function(t,e,a){"use strict";function r(t,e){const a=parseInt(t),r=new Date,n=r.getDate(),o=new Date(r.setDate(n+a)),i=o.getFullYear(),d=o.getMonth()+1,c=o.getDate();let u,s;u=d<10?"0"+d:d,s=c<10?"0"+c:c;const l=e||"-";return i+l+u+l+s}function n(t=""){var e=new Date;""!=t&&(e=new Date(t));const a=e.getFullYear();let r=e.getMonth(),n=e.getDate();return r+=1,r=r.toString().padStart(2,"0"),n=n.toString().padStart(2,"0"),`${a}-${r}-${n}`}function o(t=""){var e=new Date;""!=t&&(e=new Date(t));const a=e.getFullYear();let r=e.getMonth();return r+=1,r=r.toString().padStart(2,"0"),`${a}-${r}`}function i(t=""){var e=new Date;""!=t&&(e=new Date(t));const a=e.getFullYear();return""+a}function d(t){const e=new Date,a=e.getFullYear(),r=e.getMonth()+1,n=e.getDate(),o=r-t,i=o<0?o+12:o>10?o:"0"+o,d=r>9?r:"0"+r,c=n>9?n:"0"+n,u=a+"-"+i+"-"+c,s=a+"-"+d+"-"+c;return[u,s]}function c(){const t=new Date,e=t.getFullYear(),a=t.getMonth()+1,r=t.getDate(),n=new Date(t);n.setDate(t.getDate()-1);const o=n.getFullYear(),i=(n.getMonth()+1).toString().padStart(2,"0"),d=n.getDate().toString().padStart(2,"0"),c=a>9?a:"0"+a,u=r>9?r:"0"+r,s=o+"-"+i+"-"+d,l=e+"-"+c+"-"+u;return[s,l]}function u(t){var e=new Date;""!=t&&(e=new Date(t));const a=e.getFullYear();let r=e.getMonth()+1;r=r<10?"0"+r:r;let n=e.getDate();n=n<10?"0"+n:n;let o=e.getHours();o=o<10?"0"+o:o;let i=e.getMinutes();i=i<10?"0"+i:i;let d=e.getSeconds();return d=d<10?"0"+d:d,a+"-"+r+"-"+n+" "+o+":"+i+":"+d}a.r(e),a.d(e,"getFMdate",(function(){return r})),a.d(e,"getDate",(function(){return n})),a.d(e,"getDate1",(function(){return o})),a.d(e,"getDate2",(function(){return i})),a.d(e,"getPastTime",(function(){return d})),a.d(e,"getPastTime1",(function(){return c})),a.d(e,"formatDateTime",(function(){return u}))},a72c:function(t,e,a){"use strict";a.r(e);var r=a("f2bf");const n={id:"alarm",style:{width:"100%",height:"300px"}};function o(t,e,a,o,i,d){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",n)}var i=a("365c"),d=a("313e"),c=a("5f99"),u={props:{time:{type:Array},all:{type:Boolean,default:!1}},data(){return{chartPie:null,alarmData:[],alarmTime:"",isAllProject:!1}},watch:{time(t){this.alarmTime=t,this.getAlarmData(),setTimeout(()=>{this.drawCharts()},2e3)},all(t){this.isAllProject=t,this.getAlarmData(),setTimeout(()=>{this.drawCharts()},2e3)}},mounted:function(){},methods:{async getAlarmData(){var t=sessionStorage.getItem("projectId"),e={};e=0==this.isAllProject?{start:Object(c["getDate"])(this.alarmTime[0]),end:Object(c["getDate"])(this.alarmTime[1]),projectId:t}:{start:Object(c["getDate"])(this.alarmTime[0]),end:Object(c["getDate"])(this.alarmTime[1])};const{data:a}=await Object(i["getAlarmData"])(e);this.alarmData=[{value:a.handle,name:"processed"},{value:a.unHandle,name:"untreated"},{value:a.total,name:"total"}]},drawPieChart(){this.chartPie=d["a"](document.getElementById("alarm")),this.chartPie.setOption({title:{text:"Alarm Statistics",left:"center"},tooltip:{trigger:"item"},legend:{orient:"vertical",left:"bottom"},series:[{type:"pie",radius:"50%",data:this.alarmData,emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]})},drawCharts(){this.drawPieChart()}}},s=a("d959"),l=a.n(s);const g=l()(u,[["render",o]]);e["default"]=g}}]);