"use strict";(self["webpackChunknewfront"]=self["webpackChunknewfront"]||[]).push([[4737],{43667:(e,t,a)=>{a.r(t),a.d(t,{default:()=>y});a(74916),a(64765),a(73210),a(68309);var n=function(){var e=this,t=e._self._c;return t("app-container",[t("search-area",{attrs:{"need-search-more":!0,"search-more-type":"default",size:"small",type:"seperate"},on:{search:e.search,toggleSearchMore:e.toggleSearchMore}},[t("search-item",[t("el-input",{attrs:{size:"small",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.showAlarmType?t("search-item",[t("el-select",{attrs:{size:"small",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 t("el-option",{key:"type_"+e.value,attrs:{label:e.name,value:e.value}})})),1)],1):e._e(),t("search-item",[t("el-select",{attrs:{size:"small",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 t("el-option",{key:"content_"+e.value,attrs:{label:e.name,value:e.value}})})),1)],1),t("search-item",[t("el-select",{attrs:{size:"small",placeholder:"工单状态",clearable:""},model:{value:e.listQuery.jobStatus,callback:function(t){e.$set(e.listQuery,"jobStatus",t)},expression:"listQuery.jobStatus"}},e._l(e.jobStatusList,(function(e){return t("el-option",{key:"status_"+e.value,attrs:{label:e.name,value:e.value}})})),1)],1),e.showOtherSearch?t("search-item",[t("el-date-picker",{attrs:{size:"small",type:"datetimerange","value-format":"yyyy-MM-dd HH:mm:ss","range-separator":"至","start-placeholder":"工单创建开始时间","end-placeholder":"工单创建结束时间"},model:{value:e.timeRange,callback:function(t){e.timeRange=t},expression:"timeRange"}})],1):e._e()],1),t("div",[t("el-row",{staticClass:"table-title"},[t("el-col",{attrs:{span:6}},[t("div",{staticClass:"title-header"},[t("i",{staticClass:"el-icon-menu"}),e._v("数据列表 ")])]),t("el-col",{staticClass:"edit_btns",attrs:{span:12,offset:6}},[e.hasPerm("/job/export")?t("el-button",{staticClass:"edit_btn",attrs:{size:"small"},on:{click:e.batchExport}},[e._v(" 导出记录 ")]):e._e()],1)],1),t("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticClass:"table",attrs:{data:e.list,border:"",size:"small"},on:{"selection-change":e.handleSelectionChange}},[t("el-table-column",{attrs:{index:e.indexMethod,align:"center",type:"index"}}),e._l(e.columns,(function(a){return t("el-table-column",{key:a.value,attrs:{label:a.text,width:a.width,align:a.align,"show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(n){return["Button"==a.type||a.format?"Button"==a.type?t("el-button",{attrs:{type:"text",size:"small"},on:{click:function(t){return e.showWellDetail(n.row)}}},[e._v(" "+e._s(n.row.wellCode)+" ")]):a.format?t("span",{attrs:{type:"text"}},[e._v(e._s(e._f("personFilter")(n.row[a.value],n.row.jobStatus)))]):e._e():t("span",{class:a["class"]},[e._v(e._s(n.row[a.value]))])]}}],null,!0)})})),t("el-table-column",{attrs:{label:"操作",align:"center",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button",{attrs:{type:"text",size:"small"},on:{click:function(t){return e.showJob(a.row.id)}}},[e._v(" 查看 ")]),"2"==a.row.alarmType?t("el-button",{attrs:{disabled:e.notFirstState(a.row.jobStatus),type:"text",size:"small"},on:{click:function(t){return e.handleJob(a.row.id)}}},[e._v(" 处理 ")]):e._e()]}}])})],2)],1),t("div",{staticClass:"pagination-container"},[t("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),t("info-well",{directives:[{name:"show",rawName:"v-show",value:e.wellShow,expression:"wellShow"}],ref:"wellInfo",attrs:{mapid:"job-map"}})],1)},l=[],r=a(66347),i=(a(82772),a(41539),a(78783),a(33948),a(60285),a(41637),a(91058),a(34553),a(87756)),o=a(67952),s=a(80064),u=a(16585),c=a(25108),h=!1;const m={name:"ListJobs",components:{infoWell:i.Z},filters:{personFilter:function(e,t){return e||("3"===t||"4"===t?"系统":"")}},beforeRouteEnter:function(e,t,a){h=!!t.name&&-1!==t.name.indexOf("DetailJob"),a()},data:function(){return{listQuery:{keywords:"",alarmType:"",alarmContentType:"",jobStatus:"",beginTime:"",endTime:"",offset:1,limit:20,sort:"",order:""},timeRange:[],columns:[{text:"工单编号",value:"jobCode",width:160,align:"center"},{text:"点位编号",value:"wellCode",align:"center",type:"Button"},{text:"设备编号",value:"devcode",align:"center"},{text:"详细地址",value:"position",align:"center"},{text:"告警类型",value:"alarmTypeName",align:"center"},{text:"告警原因",value:"alarmContentName",align:"center",width:120},{text:"告警数值",value:"alarmValue",width:80,align:"center",class:"warning"},{text:"权属单位",value:"deptName",align:"center"},{text:"工单创建时间",value:"createTime",width:170,align:"center"},{text:"工单状态",value:"jobStatusName",align:"center"},{text:"处理人",value:"jobBelongTo",align:"center",format:!0}],multipleSelection:[],list:[],total:0,deviceTypeList:[],deptProps:{parent:"pid",value:"id",label:"name",children:"children"},alarmTypeList:[],alarmContentTypeList:[],showAlarmType:!0,jobStatusList:[],listLoading:!0,fullscreenLoading:!1,wellShow:!1,detailShow:!1,showOtherSearch:!1}},computed:{alarmType:function(){return this.listQuery.alarmType},operation:function(){return(0,u.lr)()}},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(),this.fetchJobStatus(),this.fetchData()},activated:function(){h||(this.listQuery.keywords="",this.listQuery.alarmType="",this.listQuery.alarmContentType="",this.listQuery.beginTime="",this.listQuery.endTime="",this.timeRange=[],(0,u.lr)()||(this.listQuery.alarmType="1"),this.fetchData(!1))},methods:{notFirstState:function(e){return"0"!==e},showWellDetail:function(e){this.wellShow=!0,this.$refs.wellInfo.initDialog(e.wellId)},showJob:function(e){c.log("showJob"),this.$router.push({path:"/detailJob/"+e,query:{jobId:e}})},batchExport:function(){var e=this;c.log("批量导出集中器");var t=this.$loading({lock:!0,text:"下载中,请稍后...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});(0,s.FD)(this.listQuery).then((function(e){t.close(),c.log("download===",e);var a=new Blob([e.data]),n=document.createElement("a"),l=window.URL.createObjectURL(a);n.href=l,n.download="工单列表.xlsx",document.body.appendChild(n),n.click(),document.body.removeChild(n),window.URL.revokeObjectURL(l)}))["catch"]((function(a){t.close(),e.$message.error(a.message)}))},toggleSearchMore:function(){c.log("---------123---"),this.showOtherSearch=!this.showOtherSearch},search:function(){c.log("==========0000"),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),(0,s.Go)(this.listQuery).then((function(t){e.list=t.data.rows,e.total=parseInt(t.data.total),e.listLoading=!1}))},fetchJobStatus:function(){var e=this;(0,s.jW)().then((function(t){e.jobStatusList=t.data}))},fetchAlarmType:function(){var e=this;(0,o.Jc)().then((function(t){e.alarmTypeList=t.data,(0,u.lr)()||(e.showAlarmType=!1,e.listQuery.alarmType="1")}))},fetchAlarmContentType:function(){var e=this;this.alarmContentTypeList=[],(0,o.f5)(this.listQuery.alarmType).then((function(t){var a,n=e.$store.getters.deviceTypes,l=(0,r.Z)(t.data.list);try{var i=function(){var t=a.value,l=""+t.deviceType;-1!==n.indexOf(l)&&-1===e.alarmContentTypeList.findIndex((function(e){return e.name===t.name}))&&e.alarmContentTypeList.push(t)};for(l.s();!(a=l.n()).done;)i()}catch(o){l.e(o)}finally{l.f()}}))},handleJob:function(e){var t=this;this.$confirm("确定后工单状态会转为处理中,您确定要执行此操作吗?","确认操作",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){(0,s.PP)(e).then((function(e){200===e.code&&(t.$message.success("处理成功"),t.fetchData())}))}))},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}}},d=m;var p=a(1001),f=(0,p.Z)(d,n,l,!1,null,"c80e9d7c",null);const y=f.exports},67952:(e,t,a)=>{a.d(t,{GH:()=>s,Gt:()=>l,Jc:()=>r,SY:()=>o,f5:()=>i,vC:()=>u});var n=a(84471);function l(e){return(0,n.Z)({url:"alarm/list",method:"get",params:e})}function r(e){return(0,n.Z)({url:"sys/dict/code/alarmType",method:"get",params:e})}function i(e){return(0,n.Z)({url:"alarm/contentType",method:"get",params:{alarmType:e}})}function o(e){return(0,n.Z)({url:"alarm/export",method:"get",timeout:12e4,params:e,responseType:"blob"})}function s(e){return(0,n.Z)({url:"alarm/cancelAlarm",method:"post",params:e})}function u(e){return(0,n.Z)({url:"alarm/batchCancel",method:"post",params:e})}},80064:(e,t,a)=>{a.d(t,{$$:()=>o,FD:()=>c,Go:()=>r,Ho:()=>m,Km:()=>i,PP:()=>s,TK:()=>h,Z7:()=>u,eB:()=>d,jW:()=>l});var n=a(84471);function l(e){return(0,n.Z)({url:"sys/dict/code/jobStatus",method:"get",params:e})}function r(e){return(0,n.Z)({url:"job/list",method:"get",params:e})}function i(e){return(0,n.Z)({url:"job/overtimeGetList",method:"get",params:e})}function o(e){return(0,n.Z)({url:"job/overtimeHandleList",method:"get",params:e})}function s(e){return(0,n.Z)({url:"job/handleJob",method:"post",params:{id:e}})}function u(e){return(0,n.Z)({url:"job/info",method:"get",params:{id:e}})}function c(e){return(0,n.Z)({url:"job/export",method:"get",timeout:12e4,params:e,responseType:"blob"})}function h(e){return(0,n.Z)({url:"job/exportOvertimeGetList",method:"get",timeout:12e4,params:e,responseType:"blob"})}function m(e){return(0,n.Z)({url:"job/exportOvertimeHandleList",method:"get",timeout:12e4,params:e,responseType:"blob"})}function d(e){return(0,n.Z)({url:"job/countByJobStatus",method:"get",params:e})}}}]);