(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9e25599a"],{"334a":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("div",{staticClass:"box-newcard"},[e._m(0),a("el-form",{ref:"queryForm",staticClass:"searchform",attrs:{model:e.queryParams,size:"small",inline:!0,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"设备名称:",prop:"equipmentName"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择设备"},model:{value:e.queryParams.equipmentName,callback:function(t){e.$set(e.queryParams,"equipmentName",t)},expression:"queryParams.equipmentName"}},e._l(e.selectList,(function(e){return a("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1),a("el-form-item",{attrs:{label:"时间:",prop:"time"}},[a("el-date-picker",{staticStyle:{width:"350px !important"},attrs:{"default-time":["00:00:00","23:59:59"],type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",clearable:"","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.queryParams.time,callback:function(t){e.$set(e.queryParams,"time",t)},expression:"queryParams.time"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.toSearch}},[e._v("搜索")]),a("el-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"info",icon:"el-icon-setting"},on:{click:e.resetTable}},[e._v("重置")])],1)],1),a("el-table",{attrs:{data:e.dmList,height:"535"}},[a("el-table-column",{attrs:{label:"序号",align:"center",width:"60",type:"index"}}),a("el-table-column",{attrs:{label:"设备名称",align:"center",prop:"equipmentName"}}),a("el-table-column",{attrs:{label:"监测项目",align:"center",prop:"equipmentType"}}),a("el-table-column",{attrs:{label:"监测点位",align:"center",prop:"monitoringPoint"}}),a("el-table-column",{attrs:{label:"监测值(mm)",align:"center",prop:"value"}}),a("el-table-column",{attrs:{label:"报警时间",align:"center",prop:"alarmTime"}}),a("el-table-column",{attrs:{label:"操作",align:"center",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"mini",type:"primary",icon:"el-icon-edit"},nativeOn:{click:function(a){return a.preventDefault(),e.addEqupment(t.row)}}},[e._v("解除报警")])]}}])})],1),a("el-pagination",{staticStyle:{padding:"10px 1px 10px 0px","margin-left":"20px"},attrs:{"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange,pagination:e.allData}})],1)])},r=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"top-title"},[a("span",{staticClass:"line"}),a("span",{staticClass:"title-text"},[e._v("报警设备管理")])])}],i=a("fd73"),l=a("ed08"),s={data:function(){return{total:0,dmList:[],selectList:[],queryParams:{pageNum:1,pageSize:10,equipmentName:null,time:null}}},mounted:function(){this.allData(),this.select(),this.$watermark.set(" ",this.$refs.content)},beforeDestroy:function(){this.$watermark.set("",this.$refs.content)},methods:{select:function(){var e=this;Object(i["a"])().then((function(t){var a=t.data||[];e.selectList=a}))},allData:function(){var e=this,t={pageNum:this.queryParams.pageNum,pageSize:this.queryParams.pageSize};Object(i["f"])(t).then((function(t){var a=t.rows||[];e.dmList=a,e.total=t.total}))},handleSizeChange:function(e){this.queryParams.pageSize=e,this.toSearch()},handleCurrentChange:function(e){this.queryParams.pageNum=e,this.toSearch()},toSearch:function(){var e=this,t=this.queryParams;this.queryParams.time instanceof Array&&(t.startTime=Object(l["g"])(new Date(this.queryParams.time[0])),t.endTime=Object(l["g"])(new Date(this.queryParams.time[1]))),Object(i["f"])(t).then((function(t){var a=t.rows||[];e.dmList=a,e.total=t.total}))},resetTable:function(){this.queryParams={},this.allData()},addEqupment:function(e){var t=this,a={equipmentName:e.equipmentName};this.$confirm("确定解除报警吗?, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(i["d"])(a).then((function(e){t.allData(),t.$message({type:"success",message:"解除成功!"})}))})).catch((function(){t.$message({type:"info",message:"解除失败"})}))}}},c=s,o=(a("cfa2"),a("2877")),u=Object(o["a"])(c,n,r,!1,null,null,null);t["default"]=u.exports},"8ee6":function(e,t,a){},cfa2:function(e,t,a){"use strict";a("8ee6")},fd73:function(e,t,a){"use strict";a.d(t,"f",(function(){return r})),a.d(t,"a",(function(){return i})),a.d(t,"d",(function(){return l}));var n=a("b775");function r(e){return Object(n["a"])({url:"/project/alarmEquipment/getAlarmEquipment",method:"get",params:e})}function i(e){return Object(n["a"])({url:"/project/equipment/getNameByType",method:"post",data:e})}function l(e){return Object(n["a"])({url:"/project/alarmEquipment/updateAlarmEquipment",method:"post",params:e})}}}]);