(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-c90a"],{FcKo:function(t,e,a){"use strict";function r(t){var e=new Date(t);return e.setHours(0,0,0,0),new Date(e)}function n(t){return(new Date).Format(t)}function i(t,e){return t.Format(e)}a.d(e,"b",function(){return r}),a.d(e,"c",function(){return n}),a.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 a in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),e)new RegExp("("+a+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[a]:("00"+e[a]).substr((""+e[a]).length)));return t}},ZXI4:function(t,e,a){"use strict";var r=a("bycR");a.n(r).a},bycR:function(t,e,a){},fh6R:function(t,e,a){"use strict";a.d(e,"s",function(){return n}),a.d(e,"p",function(){return i}),a.d(e,"m",function(){return s}),a.d(e,"k",function(){return o}),a.d(e,"n",function(){return u}),a.d(e,"r",function(){return l}),a.d(e,"t",function(){return c}),a.d(e,"q",function(){return m}),a.d(e,"l",function(){return d}),a.d(e,"o",function(){return h}),a.d(e,"i",function(){return p}),a.d(e,"f",function(){return f}),a.d(e,"c",function(){return g}),a.d(e,"a",function(){return y}),a.d(e,"h",function(){return b}),a.d(e,"d",function(){return v}),a.d(e,"j",function(){return w}),a.d(e,"g",function(){return T}),a.d(e,"b",function(){return D}),a.d(e,"e",function(){return O});var r=a("t3Un");function n(t){return Object(r.a)({url:"welldata/list",method:"get",params:t})}function i(t){return Object(r.a)({url:"liquiddata/list",method:"get",params:t})}function s(t){return Object(r.a)({url:"gasdata/list",method:"get",params:t})}function o(t){return Object(r.a)({url:"digdata/list",method:"get",params:t})}function u(t){return Object(r.a)({url:"harmfuldata/list",method:"get",params:t})}function l(t){return Object(r.a)({url:"tempdata/list",method:"get",params:t})}function c(t){return Object(r.a)({url:"welllocadata/list",method:"get",params:t})}function m(t){return Object(r.a)({url:"meterdata/list",method:"get",params:t})}function d(t){return Object(r.a)({url:"flowdata/list",method:"get",params:t})}function h(t){return Object(r.a)({url:"hyetodata/list",method:"get",params:t})}function p(t){return Object(r.a)({url:"welldata/export",method:"get",timeout:12e4,params:t,responseType:"blob"})}function f(t){return Object(r.a)({url:"liquiddata/export",method:"get",timeout:12e4,params:t,responseType:"blob"})}function g(t){return Object(r.a)({url:"gasdata/export",method:"get",timeout:12e4,params:t,responseType:"blob"})}function y(t){return Object(r.a)({url:"digdata/export",method:"get",timeout:12e4,params:t,responseType:"blob"})}function b(t){return Object(r.a)({url:"tempdata/export",method:"get",timeout:12e4,params:t,responseType:"blob"})}function v(t){return Object(r.a)({url:"harmfuldata/export",method:"get",timeout:12e4,params:t,responseType:"blob"})}function w(t){return Object(r.a)({url:"welllocadata/export",method:"get",timeout:12e4,params:t,responseType:"blob"})}function T(t){return Object(r.a)({url:"meterdata/export",method:"get",timeout:12e4,params:t,responseType:"blob"})}function D(t){return Object(r.a)({url:"flowdata/export",method:"get",timeout:12e4,params:t,responseType:"blob"})}function O(t){return Object(r.a)({url:"hyetodata/export",method:"get",timeout:12e4,params:t,responseType:"blob"})}},hgDB:function(t,e,a){"use strict";a.d(e,"h",function(){return s}),a.d(e,"g",function(){return o}),a.d(e,"j",function(){return u}),a.d(e,"a",function(){return l}),a.d(e,"k",function(){return c}),a.d(e,"f",function(){return m}),a.d(e,"d",function(){return d}),a.d(e,"c",function(){return h}),a.d(e,"l",function(){return p}),a.d(e,"e",function(){return f}),a.d(e,"b",function(){return g}),a.d(e,"m",function(){return y}),a.d(e,"i",function(){return b});var r=a("t3Un"),n=a("Qyje"),i=a.n(n);function s(t){return Object(r.a)({url:"well/list",method:"get",params:t})}function o(t){return Object(r.a)({url:"well/info",method:"get",params:{id:t}})}function u(t){return Object(r.a)({url:"dict/code/sluicewellType",method:"get",params:t})}function l(t){return Object(r.a)({url:"well/add",method:"post",params:t})}function c(t){return Object(r.a)({url:"well/update",method:"post",params:t})}function m(t){return Object(r.a)({url:"well/delete",method:"post",params:{ids:t},paramsSerializer:function(t){return i.a.stringify(t,{indices:!1})}})}function d(t){var e=new FormData;return e.append("file",t),Object(r.a)({url:"well/batchImport",method:"post",headers:{"Content-Type":"multipart/form-data"},data:e})}function h(t){return Object(r.a)({url:"well/batchExport",method:"get",timeout:12e4,params:t,responseType:"blob"})}function p(t){return Object(r.a)({url:"well/watchDataByWell",method:"get",params:{id:t}})}function f(t,e){return Object(r.a)({url:"well/bfcf",method:"post",params:{wellId:t,bfzt:e}})}function g(t){return Object(r.a)({url:"well/batchBfcf",method:"post",params:t})}function y(){return Object(r.a)({url:"well/countByBfzt",method:"get"})}function b(t){return Object(r.a)({url:"well/selectOne",method:"get",params:t})}},oDCp:function(t,e,a){"use strict";a.r(e);var r=a("FyfS"),n=a.n(r),i=a("fh6R");function s(t,e){return e=void 0===e?1:e?1:-1,function(a,r){var n=a[t],i=r[t];return n<i?-1*e:n>i?e:0}}var o={name:"LiquidData",data:function(){return this.title={text:"液位数据曲线图"},this.chartSettings={labelMap:{liquiddata:"液位值(m)",uptime:"上报时间"},metrics:["liquiddata"],dimension:["uptime"]},{listQuery:{keywords:"",deptid:"",beginTime:"",endTime:"",offset:1,limit:1e5,sort:"",order:""},chartData:{columns:["uptime","liquiddata"],rows:[]}}},methods:{fetchData:function(t){var e=this;this.listQuery.keywords=t.wellCode,this.listQuery.beginTime=t.beginTime,this.listQuery.endTime=t.endTime,Object(i.p)(this.listQuery).then(function(t){0===t.data.rows.length&&e.$message.error("此时间段无数据,请修改查询范围"),e.chartData.rows=t.data.rows.sort(s("uptime")),e.$refs.linechart.echarts.resize()})}}},u=a("KHd+"),l=Object(u.a)(o,function(){var t=this.$createElement;return(this._self._c||t)("ve-line",{ref:"linechart",attrs:{title:this.title,data:this.chartData,settings:this.chartSettings}})},[],!1,null,null,null);l.options.__file="liquidData.vue";var c=l.exports,m={name:"GasData",data:function(){return this.title={text:"燃气监测曲线图"},this.chartSettings={labelMap:{strength:"燃气(%LEL)",uptime:"上报时间"},metrics:["strength"],dimension:["uptime"]},{listQuery:{keywords:"",deptid:"",beginTime:"",endTime:"",offset:1,limit:1e5,sort:"",order:""},chartData:{columns:["uptime","strength"],rows:[]}}},methods:{fetchData:function(t){var e=this;this.listQuery.keywords=t.wellCode,this.listQuery.beginTime=t.beginTime,this.listQuery.endTime=t.endTime,Object(i.m)(this.listQuery).then(function(t){0===t.data.rows.length&&e.$message.error("此时间段无数据,请修改查询范围"),e.chartData.rows=t.data.rows.sort(s("uptime")),e.$refs.linechart.echarts.resize()})}}},d=Object(u.a)(m,function(){var t=this.$createElement;return(this._self._c||t)("ve-line",{ref:"linechart",attrs:{title:this.title,data:this.chartData,settings:this.chartSettings}})},[],!1,null,null,null);d.options.__file="gasData.vue";var h=d.exports,p={name:"HamfulData",data:function(){return this.title={text:"有害气体监测曲线图"},this.chartSettings={labelMap:{CO:"一氧化碳(ppm)",CH4:"甲烷(%VOL)",H2S:"硫化氢(ppm)",O2:"氧气(%VOL)",uptime:"上报时间"},metrics:["CO","CH4","H2S","O2"],dimension:["uptime"]},{listQuery:{keywords:"",deptid:"",beginTime:"",endTime:"",offset:1,limit:1e5,sort:"",order:""},chartData:{columns:["uptime","CO"],rows:[]}}},methods:{fetchData:function(t){var e=this;this.listQuery.keywords=t.wellCode,this.listQuery.beginTime=t.beginTime,this.listQuery.endTime=t.endTime,Object(i.n)(this.listQuery).then(function(t){0===t.data.rows.length&&e.$message.error("此时间段无数据,请修改查询范围"),e.chartData.rows=t.data.rows.sort(s("uptime")),e.$refs.linechart.echarts.resize()})}}},f=Object(u.a)(p,function(){var t=this.$createElement;return(this._self._c||t)("ve-line",{ref:"linechart",attrs:{title:this.title,data:this.chartData,settings:this.chartSettings}})},[],!1,null,null,null);f.options.__file="harmfulData.vue";var g=f.exports,y={name:"TempData",data:function(){return this.title={text:"温湿度监测曲线图"},this.chartSettings={labelMap:{temperature:"温度(℃)",humidity:"湿度(%RH)",H2S:"硫化氢(ppm)",O2:"氧气(%VOL)",uptime:"上报时间"},metrics:["temperature","humidity"],dimension:["uptime"]},{listQuery:{keywords:"",deptid:"",beginTime:"",endTime:"",offset:1,limit:1e5,sort:"",order:""},chartData:{columns:["uptime","temperature"],rows:[]}}},methods:{fetchData:function(t){var e=this;this.listQuery.keywords=t.wellCode,this.listQuery.beginTime=t.beginTime,this.listQuery.endTime=t.endTime,Object(i.r)(this.listQuery).then(function(t){0===t.data.rows.length&&e.$message.error("此时间段无数据,请修改查询范围"),e.chartData.rows=t.data.rows.sort(s("uptime")),e.$refs.linechart.echarts.resize()})}}},b=Object(u.a)(y,function(){var t=this.$createElement;return(this._self._c||t)("ve-line",{ref:"linechart",attrs:{title:this.title,data:this.chartData,settings:this.chartSettings}})},[],!1,null,null,null);b.options.__file="tempData.vue";var v=b.exports,w=a("FcKo"),T=a("hgDB"),D={name:"DataStatics",components:{LiquidData:c,GasData:h,HarmfulData:g,TempData:v},data:function(){return{listQuery:{wellCode:"",deviceType:"",beginTime:"",endTime:""},timeRange:[],deviceTypeList:[],chartShow:!1,cmpName:""}},mounted:function(){this.fetchDeviceType()},methods:{search:function(){""!==this.listQuery.wellCode?""!==this.listQuery.deviceType?this.fetchData():this.$message.error("设备类型不能为空"):this.$message.error("窨井编号不能为空")},fetchDeviceType:function(){var t=this.$store.getters.deviceTypes,e=!0,a=!1,r=void 0;try{for(var i,s=n()(t);!(e=(i=s.next()).done);e=!0){var o=i.value;"2"===o?this.deviceTypeList.push({name:"液位",value:"liquid"}):"3"===o?this.deviceTypeList.push({name:"有害气体",value:"harmful"}):"4"===o?this.deviceTypeList.push({name:"燃气",value:"gas"}):"5"===o&&this.deviceTypeList.push({name:"温湿度",value:"temp"})}}catch(t){a=!0,r=t}finally{try{!e&&s.return&&s.return()}finally{if(a)throw r}}},fetchData:function(){var t=this,e={wellCode:this.listQuery.wellCode},a=this;Object(T.i)(e).then(function(e){if(e.data.hasWell){var r=Object(w.b)((new Date).getTime()-6048e5).Format("yyyy-MM-dd hh:mm:ss"),n=(new Date).Format("yyyy-MM-dd hh:mm:ss");0===t.timeRange.length&&(t.timeRange=[r,n]),a.listQuery.beginTime=t.timeRange[0],a.listQuery.endTime=t.timeRange[1],a.checkDate(a.listQuery.beginTime,a.listQuery.endTime,366)?("liquid"===a.listQuery.deviceType?a.cmpName="liquid-data":"gas"===a.listQuery.deviceType?a.cmpName="gas-data":"harmful"===a.listQuery.deviceType?a.cmpName="harmful-data":"temp"===a.listQuery.deviceType&&(a.cmpName="temp-data"),a.chartShow=!0,setTimeout(function(){a.$refs.chart.fetchData(a.listQuery)},100)):a.$message.warning("查询跨度不能超过一年")}else a.$message.warning("井不存在,请确认井编号无误"),a.chartShow=!1})},checkDate:function(t,e,a){var r=new Date(t),n=new Date(e).getTime()-r.getTime();return!(Math.floor(n/864e5*100)/100>a)},changeDate:function(t){var e=void 0,a=void 0;"today"===t?(e=Object(w.b)((new Date).getTime()),a=new Date,this.timeRange=[e,a]):"yesterday"===t?(e=Object(w.b)((new Date).getTime()-864e5),a=Object(w.b)((new Date).getTime())):"sevendays"===t?(e=Object(w.b)((new Date).getTime()-6048e5),a=new Date):"lastmonth"===t&&(e=Object(w.b)((new Date).getTime()-2592e6),a=new Date),this.timeRange=[e.Format("yyyy-MM-dd hh:mm:ss"),a.Format("yyyy-MM-dd hh:mm:ss")],this.fetchData()}}},O=(a("ZXI4"),Object(u.a)(D,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("div",{staticClass:"search-div"},[a("el-form",{ref:"selectForm",staticClass:"form-container",attrs:{inline:!0,model:t.listQuery}},[a("el-row",[a("el-form-item",{staticClass:"selectForm-container-item",attrs:{prop:"keywords"}},[a("el-input",{attrs:{placeholder:"窨井编号",clearable:""},model:{value:t.listQuery.wellCode,callback:function(e){t.$set(t.listQuery,"wellCode","string"==typeof e?e.trim():e)},expression:"listQuery.wellCode"}})],1),t._v(" "),a("el-form-item",[a("el-select",{attrs:{placeholder:"监测指标",clearable:""},model:{value:t.listQuery.deviceType,callback:function(e){t.$set(t.listQuery,"deviceType",e)},expression:"listQuery.deviceType"}},t._l(t.deviceTypeList,function(t){return a("el-option",{key:t.value,attrs:{label:t.name,value:t.value}})}))],1),t._v(" "),a("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.search}},[t._v("搜索")])],1)],1)],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.chartShow,expression:"chartShow"}],staticClass:"chart-container"},[a("el-row",{staticClass:"chart-tools"},[a("el-col",{attrs:{span:21}},[a("span",{staticClass:"chart-tool-button",on:{click:function(e){t.changeDate("today")}}},[t._v("今日")]),t._v(" "),a("span",{staticClass:"chart-tool-button",on:{click:function(e){t.changeDate("yesterday")}}},[t._v("昨日")]),t._v(" "),a("span",{staticClass:"chart-tool-button",on:{click:function(e){t.changeDate("sevendays")}}},[t._v("最近7日")]),t._v(" "),a("span",{staticClass:"chart-tool-button",on:{click:function(e){t.changeDate("lastmonth")}}},[t._v("最近30日")]),t._v(" "),a("el-date-picker",{attrs:{type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"yyyy-MM-dd HH:mm:ss",size:"mini"},on:{change:t.fetchData},model:{value:t.timeRange,callback:function(e){t.timeRange=e},expression:"timeRange"}})],1)],1),t._v(" "),a("div",{staticClass:"chart-body"},[a(t.cmpName,{ref:"chart",tag:"component"})],1)],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:!t.chartShow,expression:"!chartShow"}],staticClass:"introduce"},[a("el-row",[a("h3",[t._v("说明")]),t._v(" "),a("p",[t._v("该模块可以查看指定窨井一段时间范围内的数据(液位、燃气、有害气体、温湿度)曲线图,分析数据变化趋势。")]),t._v(" "),a("p",[t._v("使用方法:请在上方输入框中输入要查询的完整的窨井编号,选择监测指标后点击搜索按钮。默认查询7天数据。")])]),t._v(" "),a("el-row",[a("el-image",{staticStyle:{width:"90%"},attrs:{src:"/static/images/chartSample.png",fit:"fill"}})],1)],1)])},[],!1,null,"32c5101c",null));O.options.__file="dataStatics.vue";e.default=O.exports}}]);