Newer
Older
casic-smartcity-well-front / smartwell / static / js / chunk-01fb.c3caed72.js
wangxitong on 20 Jan 2021 17 KB 总览修改
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-01fb"],{"7G3W":function(e,t,l){},AzQF:function(e,t,l){"use strict";l.r(t);var a=l("FyfS"),n=l.n(a),r=l("Yc9P"),i=l("ngQV"),o=l("41Be"),s=!1,c={name:"ListAlarmRecords",components:{infoWell:r.a},data:function(){return{listQuery:{keywords:"",alarmType:"",alarmContentType:"",beginTime:"",endTime:"",offset:1,limit:20,sort:"",order:""},timeRange:[],columns:[{text:"井编号",value:"wellCode",align:"center",type:"Button"},{text:"设备编号",value:"devcode",align:"center"},{text:"详细地址",value:"position",align:"center"},{text:"告警类型",value:"alarmTypeName",align:"center"},{text:"告警等级",value:"alarmLevel",align:"center",level:!0},{text:"告警原因",value:"alarmContentName",align:"center"},{text:"告警数值",value:"alarmValue",width:90,align:"center",class:"warning"},{text:"权属单位",value:"deptName",align:"center"},{text:"告警时间",value:"alarmTime",width:170,align:"center"}],multipleSelection:[],list:[],total:0,alarmTypeList:[],alarmContentTypeList:[],showAlarmType:!0,listLoading:!0,fullscreenLoading:!1,wellShow:!1,detailShow:!1}},computed:{alarmType:function(){return this.listQuery.alarmType}},watch:{alarmType:function(e){this.listQuery.alarmContentType="",e&&""!==e?this.fetchAlarmContentType():this.alarmContentTypeList=[]},timeRange:function(e){e&&e.length>0?(this.listQuery.beginTime=e[0],this.listQuery.endTime=e[1]):(this.listQuery.beginTime="",this.listQuery.endTime="")}},created:function(){this.fetchAlarmType(),console.log("records created")},beforeRouteEnter:function(e,t,l){s=!!t.name&&-1!==t.name.indexOf("DetailJob"),l()},mounted:function(){this.$route.query&&this.$route.query.wellCode?(this.listQuery.keywords=this.$route.query.wellCode,this.fetchData(!1)):(this.listQuery.keywords="",this.listQuery.alarmType="",this.listQuery.alarmContentType="",this.listQuery.beginTime="",this.listQuery.endTime="",this.timeRange=[],this.fetchData(!1))},activated:function(){console.log("alarmRecored actived"),s||(this.$route.query&&this.$route.query.wellCode?(this.listQuery.keywords=this.$route.query.wellCode,this.fetchData(!1)):(this.listQuery.keywords="",this.listQuery.alarmType="",this.listQuery.alarmContentType="",this.listQuery.beginTime="",this.listQuery.endTime="",this.timeRange=[],this.fetchData(!1)))},methods:{showWellDetail:function(e){this.wellShow=!0,this.$refs.wellInfo.initDialog(e.wellId)},formatValue:function(e){return 1===e?"一级告警":2===e?"二级告警":3===e?"三级告警":"--"},showJob:function(e){var t=e.jobId;this.$router.push({path:"/detailJob/"+t,query:{jobId:t}})},batchExport:function(){var e=this,t=this.$loading({lock:!0,text:"数据处理中,请稍后...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});Object(i.b)(this.listQuery).then(function(e){t.close(),console.log("download===",e);var l=new Blob([e.data]),a=document.createElement("a"),n=window.URL.createObjectURL(l);a.href=n,a.download="告警记录.xlsx",document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(n)}).catch(function(l){t.close(),e.$message.error(l.message)})},search:function(){this.fetchData(!1)},fetchData:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.listLoading=!0,t||(this.listQuery.offset=1),Object(i.e)(this.listQuery).then(function(t){e.list=t.data.rows,e.total=parseInt(t.data.total),e.listLoading=!1})},fetchAlarmType:function(){var e=this;Object(i.f)().then(function(t){e.alarmTypeList=t.data,Object(o.c)()||(e.showAlarmType=!1,e.listQuery.alarmType="1")})},fetchAlarmContentType:function(){var e=this;this.alarmContentTypeList=[],Object(i.d)(this.listQuery.alarmType).then(function(t){var l=e.$store.getters.deviceTypes,a=!0,r=!1,i=void 0;try{for(var o,s=n()(t.data.list);!(a=(o=s.next()).done);a=!0){var c=o.value;-1!==l.indexOf(c.deviceType)&&e.alarmContentTypeList.push(c)}}catch(e){r=!0,i=e}finally{try{!a&&s.return&&s.return()}finally{if(r)throw i}}})},indexMethod:function(e){return this.listQuery.limit*(this.listQuery.offset-1)+e+1},handleSizeChange:function(e){this.listQuery.limit=e,this.fetchData()},handleCurrentChange:function(e){this.listQuery.offset=e,this.fetchData()},handleSelectionChange:function(e){this.multipleSelection=e}}},u=(l("TRXm"),l("KHd+")),d=Object(u.a)(c,function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("div",{staticClass:"app-container"},[l("div",{staticClass:"search-div"},[l("el-form",{ref:"selectForm",staticClass:"form-container",attrs:{inline:!0,model:e.listQuery}},[l("el-row",[l("el-form-item",{staticClass:"selectForm-container-item",attrs:{prop:"keywords"}},[l("el-input",{attrs:{placeholder:"井编号",clearable:""},model:{value:e.listQuery.keywords,callback:function(t){e.$set(e.listQuery,"keywords","string"==typeof t?t.trim():t)},expression:"listQuery.keywords"}})],1),e._v(" "),e.isOperation()?l("el-form-item",{staticClass:"selectForm-container-item",attrs:{prop:"alarmType"}},[l("el-select",{attrs:{placeholder:"告警类型",clearable:""},model:{value:e.listQuery.alarmType,callback:function(t){e.$set(e.listQuery,"alarmType",t)},expression:"listQuery.alarmType"}},e._l(e.alarmTypeList,function(e){return l("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})}))],1):e._e(),e._v(" "),l("el-form-item",{staticClass:"selectForm-container-item",attrs:{prop:"alarmType"}},[l("el-select",{attrs:{disabled:!(e.alarmContentTypeList.length>0),placeholder:"告警内容",clearable:""},model:{value:e.listQuery.alarmContentType,callback:function(t){e.$set(e.listQuery,"alarmContentType",t)},expression:"listQuery.alarmContentType"}},e._l(e.alarmContentTypeList,function(e){return l("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})}))],1),e._v(" "),l("el-form-item",{staticClass:"selectForm-container-item",attrs:{prop:"beginTime"}},[l("el-date-picker",{attrs:{type:"datetimerange","range-separator":"至","value-format":"yyyy-MM-dd HH:mm:ss","start-placeholder":"报警开始时间","end-placeholder":"报警结束时间"},model:{value:e.timeRange,callback:function(t){e.timeRange=t},expression:"timeRange"}})],1),e._v(" "),l("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.search}},[e._v("搜索")])],1)],1)],1),e._v(" "),l("div",[l("el-row",{staticClass:"table-title"},[l("el-col",{attrs:{span:6}},[l("div",{staticClass:"title-header"},[l("i",{staticClass:"el-icon-menu"}),e._v("数据列表")])]),e._v(" "),l("el-col",{staticClass:"edit_btns",attrs:{span:12,offset:6}},[e.hasPerm("/alarm/export")?l("el-button",{staticClass:"edit_btn",attrs:{disabled:0===e.total,size:"small"},on:{click:e.batchExport}},[e._v("导出记录")]):e._e()],1)],1),e._v(" "),l("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticClass:"table",attrs:{data:e.list,border:""},on:{"selection-change":e.handleSelectionChange}},[l("el-table-column",{attrs:{index:e.indexMethod,align:"center",type:"index"}}),e._v(" "),e._l(e.columns,function(t){return l("el-table-column",{key:t.value,attrs:{label:t.text,width:t.width,align:t.align,"show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(a){return["Button"==t.type||t.level?e._e():l("span",{class:t.class},[e._v(e._s(a.row[t.value]))]),e._v(" "),"Button"!=t.type&&t.level?l("span",{class:t.class},[e._v(e._s(e.formatValue(a.row[t.value])))]):e._e(),e._v(" "),"Button"==t.type?l("el-button",{attrs:{type:"text"},on:{click:function(t){e.showWellDetail(a.row)}}},[e._v(e._s(a.row[t.value]))]):e._e()]}}])})}),e._v(" "),l("el-table-column",{attrs:{label:"操作",align:"center",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-button",{attrs:{type:"text"},on:{click:function(l){e.showJob(t.row)}}},[e._v("查看工单")])]}}])})],2)],1),e._v(" "),l("div",{staticClass:"pagination-container"},[l("el-pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>e.listQuery.limit,expression:"total>listQuery.limit"}],attrs:{"current-page":e.listQuery.offset,"page-sizes":[20,30,50],"page-size":e.listQuery.limit,total:e.total,align:"center",layout:"total, sizes, prev, pager, next"},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1),e._v(" "),l("info-well",{directives:[{name:"show",rawName:"v-show",value:e.wellShow,expression:"wellShow"}],ref:"wellInfo"})],1)},[],!1,null,"61667650",null);d.options.__file="listAlarmRecords.vue";t.default=d.exports},H4eu:function(e,t,l){"use strict";var a=l("dxun");l.n(a).a},TRXm:function(e,t,l){"use strict";var a=l("7G3W");l.n(a).a},WZwz:function(e,t,l){"use strict";l.d(t,"d",function(){return n}),l.d(t,"c",function(){return r}),l.d(t,"e",function(){return i}),l.d(t,"f",function(){return o}),l.d(t,"a",function(){return s}),l.d(t,"g",function(){return c}),l.d(t,"b",function(){return u});var a=l("t3Un");function n(e){return Object(a.a)({url:"area/list",method:"get",params:{pid:e}})}function r(e){return Object(a.a)({url:"config/getAreaByDept",method:"get",params:{deptId:e}})}function i(e){return Object(a.a)({url:"area/list",method:"get",params:e})}function o(){return Object(a.a)({url:"dict/code/levelType",method:"get"})}function s(e){return Object(a.a)({url:"area/add",method:"post",params:e})}function c(e){return Object(a.a)({url:"area/update",method:"post",params:e})}function u(e){return Object(a.a)({url:"area/delete",method:"post",params:{id:e}})}},Yc9P:function(e,t,l){"use strict";var a=l("WZwz"),n=l("hgDB"),r=l("j5sf"),i={name:"DetailWell",data:function(){return{dialogFormVisible:!1,wellForm:{id:null,wellCode:"",wellName:"",wellType:"",wellTypeName:"",deptid:"",deptName:"",bfztName:"",deep:"",position:"",coordinateX:"",coordinateY:"",latBaidu:"",lngBaidu:"",latGaode:"",lngGaode:"",photos:"",notes:"",qu:"",area:"",responsibleDept:""},AMapManager:r.AMapManager,center:[121.59996,31.197646],zoom:16,markers:[],quList:null,jiedaoList:null,labelPosition:"right",loading:!0}},computed:{qu:function(){return this.wellForm.qu}},watch:{qu:function(e){this.fetchArea2()}},mounted:function(){},methods:{initDialog:function(e){var t=this;this.dialogFormVisible=!0,Object(n.g)(e).then(function(e){t.markers=[],t.listLoading=!1;var l=e.data;t.wellForm={id:l.id,wellCode:l.wellCode,wellName:l.wellName,wellType:l.wellType,wellTypeName:l.wellTypeName,deptid:l.deptid,deptName:l.deptName,deep:l.deep,bfztName:l.bfztName,position:l.position,photos:l.photos,notes:l.notes,coordinateX:l.coordinateX,coordinateY:l.coordinateY,latBaidu:l.latBaidu,lngBaidu:l.lngBaidu,latGaode:l.latGaode,lngGaode:l.lngGaode,qu:l.qu,area:l.area,responsibleDept:l.responsibleDept},t.center=[l.lngGaode,l.latGaode],t.markers.push({position:[l.lngGaode,l.latGaode]}),l.deptid&&""!==l.deptid?(t.fetchArea1(),t.fetchArea2()):t.loading=!1})},fetchArea1:function(){var e=this;Object(a.c)(this.wellForm.deptid).then(function(t){if(200===t.code){var l=t.data.area;Object(a.d)(l).then(function(t){e.quList=t.data})}})},fetchArea2:function(){var e=this;Object(a.d)(this.wellForm.qu).then(function(t){e.jiedaoList=t.data,e.loading=!1})},cancel:function(){this.dialogFormVisible=!1}}},o=(l("H4eu"),l("KHd+")),s=Object(o.a)(i,function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("el-dialog",{staticClass:"editDialog",attrs:{visible:e.dialogFormVisible,title:"井详情","append-to-body":""},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[l("el-scrollbar",{attrs:{native:!1}},[l("el-form",{ref:"dataForm",attrs:{"label-position":e.labelPosition,model:e.wellForm,"v-loading":e.loading,"label-width":"120px"}},[l("el-row",[l("el-col",{attrs:{span:7}},[l("el-form-item",{attrs:{label:"井名称",prop:"wellName"}},[l("el-input",{attrs:{type:"text",placeholder:"未知",disabled:""},model:{value:e.wellForm.wellName,callback:function(t){e.$set(e.wellForm,"wellName",t)},expression:"wellForm.wellName"}})],1)],1),e._v(" "),l("el-col",{attrs:{span:7}},[l("el-form-item",{attrs:{label:"井编号",prop:"wellCode"}},[l("el-input",{attrs:{type:"text",placeholder:"未知",disabled:""},model:{value:e.wellForm.wellCode,callback:function(t){e.$set(e.wellForm,"wellCode",t)},expression:"wellForm.wellCode"}})],1)],1),e._v(" "),l("el-col",{attrs:{span:7}},[l("el-form-item",{attrs:{label:"井类型",prop:"wellType"}},[l("el-input",{attrs:{type:"text",placeholder:"未知",disabled:""},model:{value:e.wellForm.wellTypeName,callback:function(t){e.$set(e.wellForm,"wellTypeName",t)},expression:"wellForm.wellTypeName"}})],1)],1)],1),e._v(" "),l("el-row",[l("el-col",{attrs:{span:7}},[l("el-form-item",{attrs:{label:"权属单位",prop:"deptid"}},[l("el-input",{attrs:{type:"text",placeholder:"未知",disabled:""},model:{value:e.wellForm.deptName,callback:function(t){e.$set(e.wellForm,"deptName",t)},expression:"wellForm.deptName"}})],1)],1),e._v(" "),l("el-col",{attrs:{span:7}},[l("el-form-item",{attrs:{label:"井深(m)",prop:"deep"}},[l("el-input",{attrs:{type:"text",placeholder:"未知",disabled:""},model:{value:e.wellForm.deep,callback:function(t){e.$set(e.wellForm,"deep",t)},expression:"wellForm.deep"}})],1)],1),e._v(" "),l("el-col",{attrs:{span:7}},[l("el-form-item",{attrs:{label:"布防状态",prop:"coordinateX"}},[l("el-input",{attrs:{type:"text",placeholder:"未知",disabled:""},model:{value:e.wellForm.bfztName,callback:function(t){e.$set(e.wellForm,"bfztName",t)},expression:"wellForm.bfztName"}})],1)],1)],1),e._v(" "),l("el-row",{attrs:{gutter:1}},[l("el-form-item",{attrs:{label:"所在区域",required:""}},[l("el-col",{attrs:{span:4}},[l("el-select",{attrs:{placeholder:"未知",disabled:""},model:{value:e.wellForm.qu,callback:function(t){e.$set(e.wellForm,"qu",t)},expression:"wellForm.qu"}},e._l(e.quList,function(e){return l("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1),e._v(" "),l("el-col",{staticClass:"line",attrs:{span:1}},[e._v("区/县")]),e._v(" "),l("el-col",{attrs:{span:5}},[l("el-select",{attrs:{placeholder:"未知",disabled:""},model:{value:e.wellForm.area,callback:function(t){e.$set(e.wellForm,"area",t)},expression:"wellForm.area"}},e._l(e.jiedaoList,function(e){return l("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1),e._v(" "),l("el-col",{staticClass:"line",attrs:{span:1}},[e._v("街道/镇")])],1)],1),e._v(" "),l("el-row",[l("el-col",{attrs:{span:15}},[l("el-form-item",{attrs:{label:"详细地址",prop:"position"}},[l("el-input",{attrs:{type:"text",placeholder:"未知",disabled:""},model:{value:e.wellForm.position,callback:function(t){e.$set(e.wellForm,"position",t)},expression:"wellForm.position"}})],1)],1)],1)],1),e._v(" "),l("div",{staticClass:"watch-div"},[l("el-amap",{ref:"map",staticClass:"map-demo",attrs:{center:e.center,zoom:e.zoom,vid:"map_info"}},e._l(e.markers,function(e,t){return l("el-amap-marker",{key:t,attrs:{"v-bind":t,position:e.position,vid:t,visible:"true"}})}))],1)],1)],1)},[],!1,null,null,null);s.options.__file="infoWell.vue";t.a=s.exports},dxun:function(e,t,l){},hgDB:function(e,t,l){"use strict";l.d(t,"h",function(){return s}),l.d(t,"g",function(){return c}),l.d(t,"j",function(){return u}),l.d(t,"a",function(){return d}),l.d(t,"k",function(){return m}),l.d(t,"f",function(){return p}),l.d(t,"d",function(){return f}),l.d(t,"c",function(){return h}),l.d(t,"l",function(){return y}),l.d(t,"e",function(){return b}),l.d(t,"b",function(){return w}),l.d(t,"m",function(){return v}),l.d(t,"i",function(){return g});var a=l("QbLZ"),n=l.n(a),r=l("t3Un"),i=l("Qyje"),o=l.n(i);function s(e){return Object(r.a)({url:"well/list",method:"get",params:e})}function c(e){return Object(r.a)({url:"well/info",method:"get",params:{id:e}})}function u(e){return Object(r.a)({url:"dict/code/sluicewellType",method:"get",params:e})}function d(e){return Object(r.a)({url:"well/add",method:"post",params:e})}function m(e){return Object(r.a)({url:"well/update",method:"post",params:e})}function p(e){return Object(r.a)({url:"well/delete",method:"post",params:{ids:e},paramsSerializer:function(e){return o.a.stringify(e,{indices:!1})}})}function f(e){var t=new FormData;return t.append("file",e),Object(r.a)({url:"well/batchImport",method:"post",headers:{"Content-Type":"multipart/form-data"},data:t})}function h(e,t){return Object(r.a)(n()({url:"well/batchExport",method:"get",timeout:12e4,params:e},t,{responseType:"blob"}))}function y(e){return Object(r.a)({url:"well/watchDataByWell",method:"get",params:{id:e}})}function b(e,t){return Object(r.a)({url:"well/bfcf",method:"post",params:{wellId:e,bfzt:t}})}function w(e){return Object(r.a)({url:"well/batchBfcf",method:"post",params:e})}function v(){return Object(r.a)({url:"well/countByBfzt",method:"get"})}function g(e){return Object(r.a)({url:"well/selectOne",method:"get",params:e})}},ngQV:function(e,t,l){"use strict";l.d(t,"e",function(){return n}),l.d(t,"f",function(){return r}),l.d(t,"d",function(){return i}),l.d(t,"b",function(){return o}),l.d(t,"c",function(){return s}),l.d(t,"a",function(){return c});var a=l("t3Un");function n(e){return Object(a.a)({url:"alarm/list",method:"get",params:e})}function r(e){return Object(a.a)({url:"dict/code/alarmType",method:"get",params:e})}function i(e){return Object(a.a)({url:"alarm/contentType",method:"get",params:{alarmType:e}})}function o(e){return Object(a.a)({url:"alarm/export",method:"get",timeout:12e4,params:e,responseType:"blob"})}function s(e){return Object(a.a)({url:"alarm/cancelAlarm",method:"post",params:e})}function c(e){return Object(a.a)({url:"alarm/batchCancel",method:"post",params:e})}}}]);