(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-b3db"],{Djhq:function(t,e,n){"use strict";var a=n("jWVd");n.n(a).a},FcKo:function(t,e,n){"use strict";function a(t){var e=new Date(t);return e.setHours(0,0,0,0),new Date(e)}function r(t){return(new Date).Format(t)}function i(t,e){return t.Format(e)}n.d(e,"b",function(){return a}),n.d(e,"c",function(){return r}),n.d(e,"a",function(){return i}),Date.prototype.Format=function(t){var e={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var n in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),e)new RegExp("("+n+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[n]:("00"+e[n]).substr((""+e[n]).length)));return t}},IlBw:function(t,e,n){"use strict";var a=n("lja6");n.n(a).a},UXik:function(t,e,n){"use strict";n.d(e,"h",function(){return r}),n.d(e,"i",function(){return i}),n.d(e,"f",function(){return o}),n.d(e,"e",function(){return s}),n.d(e,"d",function(){return c}),n.d(e,"a",function(){return u}),n.d(e,"b",function(){return l}),n.d(e,"c",function(){return d}),n.d(e,"g",function(){return h});var a=n("t3Un");function r(t){return Object(a.a)({url:"well/countByBfzt",method:"get",params:t})}function i(t){return Object(a.a)({url:"statics/wellStaticsByType",method:"get",params:t})}function o(t){return Object(a.a)({url:"statics/deviceStaticsByType",method:"get",params:t})}function s(t){return Object(a.a)({url:"statics/deviceStaticsByDept",method:"get",params:t})}function c(t){return Object(a.a)({url:"statics/deviceStaticsByStatus",method:"get",params:t})}function u(t){return Object(a.a)({url:"statics/alarmsNow",method:"get",params:t})}function l(t){return Object(a.a)({url:"statics/alarmsByDay",method:"get",params:t})}function d(t){return Object(a.a)({url:"statics/alarmsByDept",method:"get",params:t})}function h(t){return Object(a.a)({url:"statics/jobsByDept",method:"get",params:t})}},UdmJ:function(t,e,n){},dv4G:function(t,e,n){"use strict";n.d(e,"f",function(){return r}),n.d(e,"e",function(){return i}),n.d(e,"g",function(){return o}),n.d(e,"h",function(){return s}),n.d(e,"i",function(){return c}),n.d(e,"d",function(){return u}),n.d(e,"a",function(){return l}),n.d(e,"b",function(){return d}),n.d(e,"c",function(){return h}),n.d(e,"j",function(){return f});var a=n("t3Un");function r(t){return Object(a.a)({url:"dict/code/jobStatus",method:"get",params:t})}function i(t){return Object(a.a)({url:"job/list",method:"get",params:t})}function o(t){return Object(a.a)({url:"job/overtimeGetList",method:"get",params:t})}function s(t){return Object(a.a)({url:"job/overtimeHandleList",method:"get",params:t})}function c(t){return Object(a.a)({url:"job/handleJob",method:"post",params:{id:t}})}function u(t){return Object(a.a)({url:"job/info",method:"get",params:{id:t}})}function l(t){return Object(a.a)({url:"job/export",method:"get",timeout:12e4,params:t,responseType:"blob"})}function d(t){return Object(a.a)({url:"job/exportOvertimeGetList",method:"get",timeout:12e4,params:t,responseType:"blob"})}function h(t){return Object(a.a)({url:"job/exportOvertimeHandleList",method:"get",timeout:12e4,params:t,responseType:"blob"})}function f(t){return Object(a.a)({url:"job/countByJobStatus",method:"get",params:t})}},fNu8:function(t,e,n){"use strict";var a=n("UdmJ");n.n(a).a},hgDB:function(t,e,n){"use strict";n.d(e,"h",function(){return o}),n.d(e,"g",function(){return s}),n.d(e,"j",function(){return c}),n.d(e,"a",function(){return u}),n.d(e,"k",function(){return l}),n.d(e,"f",function(){return d}),n.d(e,"d",function(){return h}),n.d(e,"c",function(){return f}),n.d(e,"l",function(){return m}),n.d(e,"e",function(){return p}),n.d(e,"b",function(){return b}),n.d(e,"m",function(){return v}),n.d(e,"i",function(){return g});var a=n("t3Un"),r=n("Qyje"),i=n.n(r);function o(t){return Object(a.a)({url:"well/list",method:"get",params:t})}function s(t){return Object(a.a)({url:"well/info",method:"get",params:{id:t}})}function c(t){return Object(a.a)({url:"dict/code/sluicewellType",method:"get",params:t})}function u(t){return Object(a.a)({url:"well/add",method:"post",params:t})}function l(t){return Object(a.a)({url:"well/update",method:"post",params:t})}function d(t){return Object(a.a)({url:"well/delete",method:"post",params:{ids:t},paramsSerializer:function(t){return i.a.stringify(t,{indices:!1})}})}function h(t){var e=new FormData;return e.append("file",t),Object(a.a)({url:"well/batchImport",method:"post",headers:{"Content-Type":"multipart/form-data"},data:e})}function f(t){return Object(a.a)({url:"well/batchExport",method:"get",timeout:12e4,params:t,responseType:"blob"})}function m(t){return Object(a.a)({url:"well/watchDataByWell",method:"get",params:{id:t}})}function p(t,e){return Object(a.a)({url:"well/bfcf",method:"post",params:{wellId:t,bfzt:e}})}function b(t){return Object(a.a)({url:"well/batchBfcf",method:"post",params:t})}function v(){return Object(a.a)({url:"well/countByBfzt",method:"get"})}function g(t){return Object(a.a)({url:"well/selectOne",method:"get",params:t})}},jWVd:function(t,e,n){},lAbF:function(t,e,n){"use strict";n.r(e);var a=n("QbLZ"),r=n.n(a),i=n("L2JU"),o={name:"Card",props:{title:{type:String,default:"标题"},subtitle:{type:String,default:""},icon:{type:String,default:""},context:{type:[String,Number],default:""},color:{type:String,default:"#40c9c6"}},computed:{backgroundColor:function(){return{color:this.color}}}},s=(n("IlBw"),n("KHd+")),c=Object(s.a)(o,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-card",{attrs:{"body-style":{padding:"0px"},shadow:"always"}},[n("div",{staticClass:"card-panel"},[n("div",{staticClass:"card-panel-icon-wrapper",style:t.backgroundColor},[n("svg-icon",{attrs:{"icon-class":t.icon,"class-name":"card-panel-icon"}})],1),t._v(" "),n("div",{staticClass:"card-panel-description"},[n("div",{staticClass:"card-panel-text"},[t._v("\n "+t._s(t.title)+"\n ")]),t._v(" "),n("div",{staticClass:"card-panel-num"},[t._v("\n "+t._s(t.context)+"\n ")])])])])},[],!1,null,"0282952c",null);c.options.__file="index.vue";var u=c.exports,l=n("hgDB"),d=n("UXik"),h=n("dv4G"),f={components:{Card:u},data:function(){return{dataGroup:[{title:"井总数量",context:"--",icon:"icon-well",color:"#40c9c6",path:"/wellList"},{title:"设备数量",context:"--",icon:"icon-device",color:"#36a3f7",path:"/deviceList"},{title:"当前报警数",context:"--",icon:"icon-alarm",color:"#f4516c",path:"/alarmNow"},{title:"未完成工单数",context:"--",icon:"icon-order",color:"#f4516c",path:"/listJob"}]}},created:function(){this.getWellCount(),this.getDeviceCount(),this.getAlarmCount(),this.getJobCount()},methods:{goPage:function(t){this.$router.push(t)},getWellCount:function(){var t=this;Object(l.m)().then(function(e){t.dataGroup[0].context=e.data.total})},getDeviceCount:function(){var t=this;Object(d.d)().then(function(e){t.dataGroup[1].context=e.data.total})},getAlarmCount:function(){var t=this;Object(d.a)().then(function(e){t.dataGroup[2].context=e.data.total})},getJobCount:function(){var t=this;Object(h.j)().then(function(e){var n=e.data,a=n.beforeGet+n.beforeConfirm+n.inHandle;t.dataGroup[3].context=a})}}},m=(n("fNu8"),Object(s.a)(f,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-row",{staticClass:"panel-group",attrs:{gutter:40}},t._l(t.dataGroup,function(e){return n("el-col",{key:e.title,staticClass:"card-panel-col",attrs:{xs:12,sm:12,lg:6}},[n("card",{attrs:{title:e.title,context:e.context,icon:e.icon,color:e.color},nativeOn:{click:function(n){t.goPage(e.path)}}})],1)}))},[],!1,null,"146839e8",null));m.options.__file="PanelGroup.vue";var p=m.exports,b={data:function(){return this.extend={series:{label:{show:!0,position:"outside",formatter:"{b}:{c}"}}},this.chartSettings={labelMap:{bfzt:"布防状态",wellCount:"井数量"},dimension:"bfzt",metrics:"wellCount"},this.title={text:"布防撤防统计"},{chartData:{columns:["bfzt","wellCount"],rows:[]}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var t=this;Object(d.h)(this.listQuery).then(function(e){var n=e.data;t.chartData.rows=[{bfzt:"布防",wellCount:n.bfWell},{bfzt:"撤防",wellCount:n.cfWell}]})}}},v=Object(s.a)(b,function(){var t=this.$createElement;return(this._self._c||t)("ve-pie",{attrs:{data:this.chartData,extend:this.extend,title:this.title}})},[],!1,null,null,null);v.options.__file="WellCountByBfzt.vue";var g=v.exports,y=(n("VFCP"),{data:function(){return this.extend={series:{label:{show:!0,position:"right"}}},this.grid={right:60},this.title={text:"井类型数量统计"},this.chartSettings={itemStyle:{barCategoryGap:5},barWidth:15,labelMap:{wellTypeName:"井类型",wellCount:"井数量"},dimension:["wellTypeName"],metrics:["wellCount"]},{chartData:{columns:["wellTypeName","wellCount"],rows:[]}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var t=this;Object(d.i)().then(function(e){t.chartData.rows=e.data})}}}),w=Object(s.a)(y,function(){var t=this.$createElement;return(this._self._c||t)("ve-bar",{attrs:{data:this.chartData,grid:this.grid,title:this.title,extend:this.extend,settings:this.chartSettings}})},[],!1,null,null,null);w.options.__file="WellCountByType.vue";var j=w.exports,O={data:function(){return this.extend={series:{label:{show:!0,position:"right"}}},this.grid={right:60},this.title={text:"设备数量统计"},this.chartSettings={itemStyle:{barCategoryGap:5},barWidth:15,labelMap:{deviceType:"设备类型",deviceCount:"设备数量"},dimension:["deviceType"],metrics:["deviceCount"]},{chartData:{columns:["deviceType","deviceCount"],rows:[]}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var t=this;Object(d.f)().then(function(e){t.chartData.rows=e.data})}}},D=Object(s.a)(O,function(){var t=this.$createElement;return(this._self._c||t)("ve-bar",{attrs:{data:this.chartData,grid:this.grid,title:this.title,extend:this.extend,settings:this.chartSettings}})},[],!1,null,null,null);D.options.__file="DeviceCount.vue";var x=D.exports,C={data:function(){return this.extend={series:{label:{show:!0,position:"outside",formatter:"{b}:{c}"}}},this.chartSettings={labelMap:{onlineStatus:"在线状态",deviceCount:"设备数量"},dimension:"onlineStatus",metrics:"deviceCount"},this.title={text:"设备在线情况统计"},{chartData:{columns:["onlineStatus","deviceCount"],rows:[]}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var t=this;Object(d.d)().then(function(e){var n=e.data;t.chartData.rows=[{onlineStatus:"在线",deviceCount:n.online},{onlineStatus:"离线",deviceCount:n.offline}]})}}},_=Object(s.a)(C,function(){var t=this.$createElement;return(this._self._c||t)("ve-pie",{attrs:{data:this.chartData,extend:this.extend,title:this.title}})},[],!1,null,null,null);_.options.__file="DeviceCountByOnline.vue";var S=_.exports,B=n("FcKo"),T={name:"AlarmByDays",data:function(){return this.title={text:"7日报警趋势"},this.chartSettings={labelMap:{alarmWells:"报警井数",alarmTimes:"报警次数"},metrics:["alarmTimes","alarmWells"],dimension:["date"]},{listQuery:{deviceType:"",beginTime:"",endTime:""},chartData:{columns:["date","alarmTimes","alarmWells"],rows:[]}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var t=this,e=Object(B.b)((new Date).getTime()-6048e5).Format("yyyy-MM-dd hh:mm:ss"),n=(new Date).Format("yyyy-MM-dd hh:mm:ss");this.listQuery.beginTime=e,this.listQuery.endTime=n,Object(d.b)(this.listQuery).then(function(e){t.chartData.rows=e.data})}}},k=Object(s.a)(T,function(){var t=this.$createElement;return(this._self._c||t)("ve-line",{attrs:{data:this.chartData,title:this.title,settings:this.chartSettings}})},[],!1,null,null,null);k.options.__file="AlarmByDays.vue";var $=k.exports,G={name:"JobByStatus",data:function(){return this.title={text:"30日工单数量统计"},this.chartSettings={labelMap:{deptName:"权属单位",beforeGet:"待处理",beforeConfirm:"待确认",inHandle:"处理中",over:"已完成"},stack:{xxx:["beforeGet","beforeConfirm","inHandle","over"]}},{chartData:{columns:["deptName","beforeGet","beforeConfirm","inHandle","over"],rows:[]}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var t=this,e={beginTime:Object(B.b)((new Date).getTime()-2592e6).Format("yyyy-MM-dd hh:mm:ss"),endTime:(new Date).Format("yyyy-MM-dd hh:mm:ss")};Object(d.g)(e).then(function(e){t.chartData.rows=e.data})}}},M=Object(s.a)(G,function(){var t=this.$createElement;return(this._self._c||t)("ve-bar",{attrs:{data:this.chartData,title:this.title,settings:this.chartSettings}})},[],!1,null,null,null);M.options.__file="JobByStatus.vue";var W={name:"Dashboard",components:{JobByStatus:M.exports,AlarmByDays:$,PanelGroup:p,WellCountByBfzt:g,WellCountByType:j,DeviceCount:x,DeviceCountByOnline:S},data:function(){return{wsPath:"ws://192.168.0.166:14537/websocket/"}},computed:r()({},Object(i.b)(["name","roleNames","roleTips","wellTypes","deviceTypes","communications","area"])),mounted:function(){this.webSocket()},methods:{webSocket:function(){console.log("websocket");var t=this;if("undefined"==typeof WebSocket)this.$notify({title:"提示",message:"当前浏览器无法接收实时报警信息,请使用谷歌浏览器或360浏览器极速模式!",type:"warning",duration:0});else{var e=this.wsPath+this.$store.getters.id;console.log(e),this.socket=new WebSocket(e),this.socket.onopen=function(){console.log("浏览器WebSocket已打开")},this.socket.onmessage=function(e){var n=JSON.parse(e.data);"alarm"===n.type?t.$notify({title:"新报警来了",message:n.message,type:"warning",onClick:function(){t.$router.push({path:"/overview",query:{refresh:!0}})}}):"overtimeGet"===n.type?t.$notify({title:"有新超时未接收工单",message:n.message,type:"warning",onClick:function(){t.$router.push({path:"/listOvertimeGetJob",query:{refresh:!0}})}}):"overtimeHandle"===n.type&&t.$notify({title:"有新超时未处理工单",message:n.message,type:"warning",onClick:function(){t.$router.push({path:"/listOvertimeHandleJob",query:{refresh:!0}})}})},this.socket.onerror=function(){t.$notify({title:"服务器错误",message:"无法接收实时报警信息,请检查服务器后重新刷新页面",type:"error",duration:0})},this.socket.onclose=function(){console.log("WebSocket已关闭")}}}}},J=(n("Djhq"),Object(s.a)(W,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dashboard-container"},[n("panel-group"),t._v(" "),n("el-row",[n("el-col",{attrs:{span:10}},[n("el-card",{attrs:{shadow:"never"}},[n("well-count-by-bfzt")],1)],1),t._v(" "),t.hasPerm("/statics/wellStaticsByType")?n("el-col",{attrs:{span:14}},[n("el-card",{attrs:{shadow:"never"}},[n("well-count-by-type")],1)],1):t._e(),t._v(" "),n("el-col",{attrs:{span:14}},[n("el-card",{attrs:{shadow:"never"}},[n("device-count")],1)],1),t._v(" "),t.hasPerm("/statics/wellStaticsByType")?n("el-col",{attrs:{span:10}},[n("el-card",{attrs:{shadow:"never"}},[n("device-count-by-online")],1)],1):t._e(),t._v(" "),t.hasPerm("/statics/wellStaticsByType")?n("el-col",{attrs:{span:10}},[n("el-card",{attrs:{shadow:"never"}},[n("alarm-by-days")],1)],1):t._e(),t._v(" "),t.hasPerm("/statics/wellStaticsByType")?n("el-col",{attrs:{span:14}},[n("el-card",{attrs:{shadow:"never"}},[n("job-by-status")],1)],1):t._e()],1)],1)},[],!1,null,"8eec296e",null));J.options.__file="index.vue";e.default=J.exports},lja6:function(t,e,n){}}]);