Newer
Older
smartwell_front / smartwell / static / js / chunk-5e5a.3ba23072.js
StephanieGitHub on 6 Dec 2019 10 KB MOD:element升级
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-5e5a"],{"3y+o":function(t,e,n){},M4Nd:function(t,e,n){"use strict";n.r(e);var a=n("FyfS"),i=n.n(a),r=n("Yc9P"),l=n("ngQV"),o=n("dv4G"),s=n("41Be"),c=!1,u={name:"ListJobsOverTimeHandle",components:{infoWell:r.a},data:function(){return{listQuery:{keywords:"",alarmType:"",alarmContentType:"",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:"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:"createTime",width:170,align:"center"},{text:"处理状态",value:"jobStatusName",align:"center"},{text:"处理人",value:"jobBelongTo",align:"center",format:!0},{text:"接单时间",value:"getJobTime",align:"center"}],multipleSelection:[],list:[],total:0,deviceTypeList:[],deptProps:{parent:"pid",value:"id",label:"name",children:"children"},alarmTypeList:[],alarmContentTypeList:[],showAlarmType:!0,listLoading:!0,fullscreenLoading:!1,wellShow:!1,detailShow:!1}},computed:{alarmType:function(){return this.listQuery.alarmType}},watch:{alarmType:function(t){this.listQuery.alarmContentType="",t&&""!==t?this.fetchAlarmContentType():this.alarmContentTypeList=[]},timeRange:function(t){t&&t.length>0?(this.listQuery.beginTime=t[0],this.listQuery.endTime=t[1]):(this.listQuery.beginTime="",this.listQuery.endTime="")}},created:function(){console.log("create"),this.fetchAlarmType(),this.fetchAlarmContentType()},beforeRouteEnter:function(t,e,n){c=!!e.name&&-1!==e.name.indexOf("DetailJob"),n()},mounted:function(){this.fetchData()},activated:function(){c||(this.listQuery.keywords="",this.listQuery.alarmType="",this.listQuery.alarmContentType="",this.listQuery.beginTime="",this.listQuery.endTime="",this.timeRange=[],Object(s.b)()||(this.listQuery.alarmType="1"),this.fetchData(!1))},methods:{formatJobBelongTo:function(t,e){return"待处理"===t.jobStatusName||e?e:"系统"},notFirstState:function(t){return"0"!==t},showWellDetail:function(t){this.wellShow=!0,this.$refs.wellInfo.initDialog(t.wellId)},showJob:function(t){console.log("showJob"),this.$router.push({path:"/detailJob/"+t,query:{jobId:t}})},batchExport:function(){var t=this,e=this.$loading({lock:!0,text:"下载中,请稍后...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});Object(o.c)(this.listQuery).then(function(t){e.close(),console.log("download===",t);var n=new Blob([t.data]),a=document.createElement("a"),i=window.URL.createObjectURL(n);a.href=i,a.download="工单列表.xlsx",document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(i)}).catch(function(n){e.close(),t.$message.error(n.message)})},search:function(){this.fetchData(!1)},fetchData:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.listLoading=!0,e||(this.listQuery.offset=1),Object(o.h)(this.listQuery).then(function(e){t.list=e.data.rows,t.total=parseInt(e.data.total),t.listLoading=!1})},fetchAlarmType:function(){var t=this;Object(l.f)().then(function(e){t.alarmTypeList=e.data,Object(s.b)()||(t.showAlarmType=!1,t.listQuery.alarmType="1")})},fetchAlarmContentType:function(){var t=this;this.alarmContentTypeList=[],Object(l.d)(this.listQuery.alarmType).then(function(e){var n=t.$store.getters.deviceTypes,a=!0,r=!1,l=void 0;try{for(var o,s=i()(e.data.list);!(a=(o=s.next()).done);a=!0){var c=o.value;-1!==n.indexOf(c.deviceType)&&t.alarmContentTypeList.push(c)}}catch(t){r=!0,l=t}finally{try{!a&&s.return&&s.return()}finally{if(r)throw l}}})},handleJob:function(t){var e=this;this.$confirm("确定后工单状态会转为处理中,您确定要执行此操作吗?","确认操作",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o.i)(t).then(function(t){200===t.code&&(e.$message.success("处理成功"),e.fetchData())})})},indexMethod:function(t){return this.listQuery.limit*(this.listQuery.offset-1)+t+1},handleSizeChange:function(t){this.listQuery.limit=t,this.fetchData()},handleCurrentChange:function(t){this.listQuery.offset=t,this.fetchData()},handleSelectionChange:function(t){this.multipleSelection=t}}},m=(n("xCjq"),n("KHd+")),d=Object(m.a)(u,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("div",{staticClass:"search-div"},[n("el-form",{ref:"selectForm",staticClass:"form-container",attrs:{inline:!0,model:t.listQuery}},[n("el-row",[n("el-form-item",{staticClass:"selectForm-container-item",attrs:{prop:"keywords"}},[n("el-input",{attrs:{placeholder:"窨井编号",clearable:""},model:{value:t.listQuery.keywords,callback:function(e){t.$set(t.listQuery,"keywords","string"==typeof e?e.trim():e)},expression:"listQuery.keywords"}})],1),t._v(" "),t.isOperation()?n("el-form-item",{staticClass:"selectForm-container-item",attrs:{prop:"alarmType"}},[n("el-select",{attrs:{placeholder:"告警类型",clearable:""},model:{value:t.listQuery.alarmType,callback:function(e){t.$set(t.listQuery,"alarmType",e)},expression:"listQuery.alarmType"}},t._l(t.alarmTypeList,function(t){return n("el-option",{key:t.value,attrs:{label:t.name,value:t.value}})}))],1):t._e(),t._v(" "),n("el-form-item",{staticClass:"selectForm-container-item",attrs:{prop:"alarmType"}},[n("el-select",{attrs:{disabled:!(t.alarmContentTypeList.length>0),placeholder:"告警内容",clearable:""},model:{value:t.listQuery.alarmContentType,callback:function(e){t.$set(t.listQuery,"alarmContentType",e)},expression:"listQuery.alarmContentType"}},t._l(t.alarmContentTypeList,function(t){return n("el-option",{key:t.value,attrs:{label:t.name,value:t.value}})}))],1),t._v(" "),n("el-form-item",{staticClass:"selectForm-container-item",attrs:{prop:"beginTime"}},[n("el-date-picker",{attrs:{type:"datetimerange","value-format":"yyyy-MM-dd HH:mm:ss","range-separator":"至","start-placeholder":"工单创建开始时间","end-placeholder":"工单创建结束时间"},model:{value:t.timeRange,callback:function(e){t.timeRange=e},expression:"timeRange"}})],1),t._v(" "),n("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.search}},[t._v("搜索")])],1)],1)],1),t._v(" "),n("div",[n("el-row",{staticClass:"table-title"},[n("el-col",{attrs:{span:6}},[n("div",{staticClass:"title-header"},[n("i",{staticClass:"el-icon-menu"}),t._v("数据列表")])]),t._v(" "),n("el-col",{staticClass:"edit_btns",attrs:{span:12,offset:6}},[t.hasPerm("/job/export")?n("el-button",{staticClass:"edit_btn",attrs:{size:"small"},on:{click:t.batchExport}},[t._v("导出记录")]):t._e()],1)],1),t._v(" "),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticClass:"table",attrs:{data:t.list,border:""},on:{"selection-change":t.handleSelectionChange}},[n("el-table-column",{attrs:{index:t.indexMethod,align:"center",type:"index"}}),t._v(" "),t._l(t.columns,function(e){return n("el-table-column",{key:e.value,attrs:{label:e.text,width:e.width,align:e.align,"show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return["Button"!=e.type?n("span",{class:e.class},[t._v(t._s(a.row[e.value]))]):"Button"==e.type?n("el-button",{attrs:{type:"text"},on:{click:function(e){t.showWellDetail(a.row)}}},[t._v(t._s(a.row.wellCode))]):t._e()]}}])})}),t._v(" "),n("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"text"},on:{click:function(n){t.showJob(e.row.id)}}},[t._v("查看")]),t._v(" "),"2"==e.row.alarmType?n("el-button",{attrs:{disabled:t.notFirstState(e.row.jobStatus),type:"text"},on:{click:function(n){t.handleJob(e.row.id)}}},[t._v("处理")]):t._e()]}}])})],2)],1),t._v(" "),n("div",{staticClass:"pagination-container"},[n("el-pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>t.listQuery.limit,expression:"total>listQuery.limit"}],attrs:{"current-page":t.listQuery.offset,"page-sizes":[20,30,50],"page-size":t.listQuery.limit,total:t.total,align:"center",layout:"total, sizes, prev, pager, next"},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),t._v(" "),n("info-well",{directives:[{name:"show",rawName:"v-show",value:t.wellShow,expression:"wellShow"}],ref:"wellInfo"})],1)},[],!1,null,"68180de0",null);d.options.__file="listJobsOvertimeHandle.vue";e.default=d.exports},dv4G:function(t,e,n){"use strict";n.d(e,"f",function(){return i}),n.d(e,"e",function(){return r}),n.d(e,"g",function(){return l}),n.d(e,"h",function(){return o}),n.d(e,"i",function(){return s}),n.d(e,"d",function(){return c}),n.d(e,"a",function(){return u}),n.d(e,"b",function(){return m}),n.d(e,"c",function(){return d}),n.d(e,"j",function(){return h});var a=n("t3Un");function i(t){return Object(a.a)({url:"dict/code/jobStatus",method:"get",params:t})}function r(t){return Object(a.a)({url:"job/list",method:"get",params:t})}function l(t){return Object(a.a)({url:"job/overtimeGetList",method:"get",params:t})}function o(t){return Object(a.a)({url:"job/overtimeHandleList",method:"get",params:t})}function s(t){return Object(a.a)({url:"job/handleJob",method:"post",params:{id:t}})}function c(t){return Object(a.a)({url:"job/info",method:"get",params:{id:t}})}function u(t){return Object(a.a)({url:"job/export",method:"get",timeout:12e4,params:t,responseType:"blob"})}function m(t){return Object(a.a)({url:"job/exportOvertimeGetList",method:"get",timeout:12e4,params:t,responseType:"blob"})}function d(t){return Object(a.a)({url:"job/exportOvertimeHandleList",method:"get",timeout:12e4,params:t,responseType:"blob"})}function h(t){return Object(a.a)({url:"job/countByJobStatus",method:"get",params:t})}},ngQV:function(t,e,n){"use strict";n.d(e,"e",function(){return i}),n.d(e,"f",function(){return r}),n.d(e,"d",function(){return l}),n.d(e,"b",function(){return o}),n.d(e,"c",function(){return s}),n.d(e,"a",function(){return c});var a=n("t3Un");function i(t){return Object(a.a)({url:"alarm/list",method:"get",params:t})}function r(t){return Object(a.a)({url:"dict/code/alarmType",method:"get",params:t})}function l(t){return Object(a.a)({url:"alarm/contentType",method:"get",params:{alarmType:t}})}function o(t){return Object(a.a)({url:"alarm/export",method:"get",timeout:12e4,params:t,responseType:"blob"})}function s(t){return Object(a.a)({url:"alarm/cancelAlarm",method:"post",params:t})}function c(t){return Object(a.a)({url:"alarm/batchCancel",method:"post",params:t})}},xCjq:function(t,e,n){"use strict";var a=n("3y+o");n.n(a).a}}]);