Newer
Older
smartwell_front / smartwell / static / js / chunk-398d.3561feb4.js
StephanieGitHub on 6 Dec 2019 11 KB MOD:element升级
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-398d"],{"d/UG":function(t,e,a){"use strict";var n=a("yS44");a.n(n).a},dv4G:function(t,e,a){"use strict";a.d(e,"f",function(){return r}),a.d(e,"e",function(){return i}),a.d(e,"g",function(){return l}),a.d(e,"h",function(){return o}),a.d(e,"i",function(){return s}),a.d(e,"d",function(){return c}),a.d(e,"a",function(){return u}),a.d(e,"b",function(){return m}),a.d(e,"c",function(){return d}),a.d(e,"j",function(){return h});var n=a("t3Un");function r(t){return Object(n.a)({url:"dict/code/jobStatus",method:"get",params:t})}function i(t){return Object(n.a)({url:"job/list",method:"get",params:t})}function l(t){return Object(n.a)({url:"job/overtimeGetList",method:"get",params:t})}function o(t){return Object(n.a)({url:"job/overtimeHandleList",method:"get",params:t})}function s(t){return Object(n.a)({url:"job/handleJob",method:"post",params:{id:t}})}function c(t){return Object(n.a)({url:"job/info",method:"get",params:{id:t}})}function u(t){return Object(n.a)({url:"job/export",method:"get",timeout:12e4,params:t,responseType:"blob"})}function m(t){return Object(n.a)({url:"job/exportOvertimeGetList",method:"get",timeout:12e4,params:t,responseType:"blob"})}function d(t){return Object(n.a)({url:"job/exportOvertimeHandleList",method:"get",timeout:12e4,params:t,responseType:"blob"})}function h(t){return Object(n.a)({url:"job/countByJobStatus",method:"get",params:t})}},ngQV:function(t,e,a){"use strict";a.d(e,"e",function(){return r}),a.d(e,"f",function(){return i}),a.d(e,"d",function(){return l}),a.d(e,"b",function(){return o}),a.d(e,"c",function(){return s}),a.d(e,"a",function(){return c});var n=a("t3Un");function r(t){return Object(n.a)({url:"alarm/list",method:"get",params:t})}function i(t){return Object(n.a)({url:"dict/code/alarmType",method:"get",params:t})}function l(t){return Object(n.a)({url:"alarm/contentType",method:"get",params:{alarmType:t}})}function o(t){return Object(n.a)({url:"alarm/export",method:"get",timeout:12e4,params:t,responseType:"blob"})}function s(t){return Object(n.a)({url:"alarm/cancelAlarm",method:"post",params:t})}function c(t){return Object(n.a)({url:"alarm/batchCancel",method:"post",params:t})}},yS44:function(t,e,a){},zT4G:function(t,e,a){"use strict";a.r(e);var n=a("FyfS"),r=a.n(n),i=a("Yc9P"),l=a("ngQV"),o=a("dv4G"),s=a("41Be"),c=!1,u={name:"ListJobs",components:{infoWell:i.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,jobStatusList:[],listLoading:!0,fullscreenLoading:!1,wellShow:!1,detailShow:!1,showOtherSearch:!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(),this.fetchJobStatus()},beforeRouteEnter:function(t,e,a){c=!!e.name&&-1!==e.name.indexOf("DetailJob"),a()},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;console.log("批量导出集中器");var e=this.$loading({lock:!0,text:"下载中,请稍后...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});Object(o.a)(this.listQuery).then(function(t){e.close(),console.log("download===",t);var a=new Blob([t.data]),n=document.createElement("a"),r=window.URL.createObjectURL(a);n.href=r,n.download="工单列表.xlsx",document.body.appendChild(n),n.click(),document.body.removeChild(n),window.URL.revokeObjectURL(r)}).catch(function(a){e.close(),t.$message.error(a.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.e)(this.listQuery).then(function(e){t.list=e.data.rows,t.total=parseInt(e.data.total),t.listLoading=!1})},fetchJobStatus:function(){var t=this;Object(o.f)().then(function(e){t.jobStatusList=e.data})},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 a=t.$store.getters.deviceTypes,n=!0,i=!1,l=void 0;try{for(var o,s=r()(e.data.list);!(n=(o=s.next()).done);n=!0){var c=o.value;-1!==a.indexOf(c.deviceType)&&t.alarmContentTypeList.push(c)}}catch(t){i=!0,l=t}finally{try{!n&&s.return&&s.return()}finally{if(i)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=(a("d/UG"),a("KHd+")),d=Object(m.a)(u,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-col",{attrs:{span:20}},[a("el-row",[a("el-form-item",{staticClass:"selectForm-container-item",attrs:{prop:"keywords"}},[a("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()?a("el-form-item",{staticClass:"selectForm-container-item",attrs:{prop:"alarmType"}},[a("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 a("el-option",{key:t.value,attrs:{label:t.name,value:t.value}})}))],1):t._e(),t._v(" "),a("el-form-item",{staticClass:"selectForm-container-item",attrs:{prop:"alarmType"}},[a("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 a("el-option",{key:t.value,attrs:{label:t.name,value:t.value}})}))],1),t._v(" "),a("el-form-item",{staticClass:"selectForm-container-item"},[a("el-select",{attrs:{placeholder:"工单状态",clearable:""},model:{value:t.listQuery.jobStatus,callback:function(e){t.$set(t.listQuery,"jobStatus",e)},expression:"listQuery.jobStatus"}},t._l(t.jobStatusList,function(t){return a("el-option",{key:t.value,attrs:{label:t.name,value:t.value}})}))],1)],1),t._v(" "),a("el-row",{directives:[{name:"show",rawName:"v-show",value:t.showOtherSearch,expression:"showOtherSearch"}]},[a("el-form-item",{staticClass:"selectForm-container-item",attrs:{prop:"beginTime"}},[a("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)],1)],1),t._v(" "),a("el-col",{attrs:{span:2}},[a("el-button",{staticClass:"searchBtn",attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.search}},[t._v("搜索")])],1),t._v(" "),a("el-col",{attrs:{span:2}},[a("el-button",{staticClass:"searchBtn",on:{click:function(e){t.showOtherSearch=!t.showOtherSearch}}},[t._v("高级检索")])],1)],1)],1)],1),t._v(" "),a("div",[a("el-row",{staticClass:"table-title"},[a("el-col",{attrs:{span:6}},[a("div",{staticClass:"title-header"},[a("i",{staticClass:"el-icon-menu"}),t._v("数据列表")])]),t._v(" "),a("el-col",{staticClass:"edit_btns",attrs:{span:12,offset:6}},[t.hasPerm("/job/export")?a("el-button",{staticClass:"edit_btn",attrs:{size:"small"},on:{click:t.batchExport}},[t._v("导出记录")]):t._e()],1)],1),t._v(" "),a("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}},[a("el-table-column",{attrs:{index:t.indexMethod,align:"center",type:"index"}}),t._v(" "),t._l(t.columns,function(e){return a("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(n){return["Button"!=e.type?a("span",{class:e.class},[t._v(t._s(n.row[e.value]))]):"Button"==e.type?a("el-button",{attrs:{type:"text"},on:{click:function(e){t.showWellDetail(n.row)}}},[t._v(t._s(n.row.wellCode))]):t._e()]}}])})}),t._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.showJob(e.row.id)}}},[t._v("查看")]),t._v(" "),"2"==e.row.alarmType?a("el-button",{attrs:{disabled:t.notFirstState(e.row.jobStatus),type:"text"},on:{click:function(a){t.handleJob(e.row.id)}}},[t._v("处理")]):t._e()]}}])})],2)],1),t._v(" "),a("div",{staticClass:"pagination-container"},[a("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(" "),a("info-well",{directives:[{name:"show",rawName:"v-show",value:t.wellShow,expression:"wellShow"}],ref:"wellInfo"})],1)},[],!1,null,"3bbf377c",null);d.options.__file="listJobs.vue";e.default=d.exports}}]);