(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c6b82f14"],{4381:function(e,t,a){"use strict";a("d3b7"),a("caad"),a("2532"),a("d9e2");var s=a("4360"),i={inserted:function(e,t){var a=t.value,i=s["a"].getters&&s["a"].getters.butPermission;if(console.log(i,"roles"),!(a&&a instanceof Array&&a.length>0))throw new Error("need roles! Like v-permission=\"['admin','editor']\"");var l=a,r=i.some((function(e){return l.includes(e)}));if(console.log(r,"hasPermission"),r)s["a"].state.user.permissionFlag[l]=!1;else{s["a"].state.user.permissionFlag[l]=!0,console.log(s["a"].state.user.permissionFlag[l],"permissionRoles");var n=document.createElement("div");n.style.cursor="not-allowed",n.style.display="inline-block",e.style.pointerEvents="none",e.parentNode.insertBefore(n,e),e.parentNode&&e.parentNode.removeChild(e),n.appendChild(e),console.log(e,"permissionRoles")}}},l=function(e){e.directive("permission",i)};window.Vue&&(window["permission"]=i,Vue.use(l)),i.install=l;t["a"]=i},"5d1f":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("div",{staticClass:"decorate"}),a("div",{staticClass:"filter-container"},[e._t("default"),a("el-input",{staticClass:"filter-item",staticStyle:{width:"150px"},attrs:{placeholder:e.$t("work.taskName")},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleFilter.apply(null,arguments)}},model:{value:e.getWorkList.search,callback:function(t){e.$set(e.getWorkList,"search",t)},expression:"getWorkList.search"}}),a("el-select",{staticClass:"filter-item",staticStyle:{width:"150px"},attrs:{placeholder:e.$t("device.typeName"),clearable:""},on:{change:function(t){return e.handleFilter()}},model:{value:e.getWorkList.deviceType,callback:function(t){e.$set(e.getWorkList,"deviceType",t)},expression:"getWorkList.deviceType"}},e._l(e.deviceType,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),a("el-select",{staticClass:"filter-item",staticStyle:{width:"150px"},attrs:{placeholder:e.$t("work.status")},on:{change:function(t){return e.handleFilter()}},model:{value:e.getWorkList.status,callback:function(t){e.$set(e.getWorkList,"status",t)},expression:"getWorkList.status"}},e._l(e.status,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),a("el-select",{staticClass:"filter-item",staticStyle:{width:"150px"},attrs:{placeholder:e.$t("work.taskType")},on:{change:function(t){return e.handleFilter()}},model:{value:e.getWorkList.orderType,callback:function(t){e.$set(e.getWorkList,"orderType",t)},expression:"getWorkList.orderType"}},e._l(e.options,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),a("el-date-picker",{staticClass:"filter-item",attrs:{type:"datetimerange","start-placeholder":e.$t("startTime"),"end-placeholder":e.$t("endTime"),"value-format":"yyyy-MM-dd HH:mm:ss","default-time":["12:00:00"],editable:!1},model:{value:e.arrayTime,callback:function(t){e.arrayTime=t},expression:"arrayTime"}}),a("span",{staticClass:"btn-item",on:{click:e.handleFilter}},[a("i",{staticClass:"iconfont icon-sousuo"}),e._v(e._s(e.$t("btn.search"))+" ")]),a("span",{staticClass:"btn-item",on:{click:e.wipeCondition}},[a("i",{staticClass:"el-icon-refresh-left"}),e._v(e._s(e.$t("btn.resetting"))+" ")])],2),a("div",{staticClass:"table-container"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],attrs:{data:e.workForm,"max-height":"580","highlight-current-row":"","header-row-class-name":"table-header","row-class-name":"table-row"}},[a("el-table-column",{attrs:{property:"taskName",align:"left",label:e.$t("work.taskName"),"show-overflow-tooltip":""}}),a("el-table-column",{attrs:{property:"receiveName",align:"left",label:e.$t("work.recipient")}}),a("el-table-column",{attrs:{property:"orderType",align:"left",label:e.$t("work.taskType")},scopedSlots:e._u([{key:"default",fn:function(t){return["1"===t.row.orderType?a("span",{staticClass:"use"},[e._v(" "+e._s(e.$t("work.install")))]):"3"===t.row.orderType?a("span",{staticClass:"use"},[e._v(" "+e._s(e.$t("work.dismantle"))+" ")]):"4"===t.row.orderType?a("span",{staticClass:"use"},[e._v(" "+e._s(e.$t("work.faults"))+" ")]):"5"===t.row.orderType.split(",")[0]?a("span",{staticClass:"otherUse"},[e._v(" "+e._s(e.$t("work.other")+"("+t.row.orderType.split(",")[1])+") ")]):a("span",{staticClass:"use"},[e._v(" "+e._s(t.row.orderType)+" ")])]}}])}),a("el-table-column",{attrs:{property:"startTime",align:"left",label:e.$t("startTime")}}),a("el-table-column",{attrs:{property:"deadline",align:"left",label:e.$t("endTime")}}),a("el-table-column",{attrs:{property:"finishTime",align:"left",label:e.$t("completionTime")},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.finishTime?a("span",[e._v(e._s(t.row.finishTime))]):e._e(),t.row.finishTime?e._e():a("span",[e._v("- -")])]}}])}),a("el-table-column",{attrs:{property:"remark",align:"left",label:e.$t("work.remark"),"show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[null!==t.row.remark?a("span",[e._v(e._s(t.row.remark))]):e._e(),null===!t.row.remark?a("span",[e._v("- -")]):e._e()]}}])}),a("el-table-column",{attrs:{label:e.$t("work.status"),align:"left"},scopedSlots:e._u([{key:"default",fn:function(t){return[-1===t.row.status?a("span",{staticClass:"btn yellow"},[e._v(e._s(e.$t("work.unpublished")))]):e._e(),0===t.row.status?a("span",{staticClass:"btn blue"},[e._v(e._s(e.$t("work.notStarted")))]):e._e(),1===t.row.status?a("span",{staticClass:"btn"},[e._v(e._s(e.$t("work.inProgress")))]):e._e(),2===t.row.status?a("span",{staticClass:"btn white"},[e._v(e._s(e.$t("work.suspend")))]):e._e(),3===t.row.status?a("span",{staticClass:"btn white"},[e._v(e._s(e.$t("work.complete")))]):e._e(),4===t.row.status?a("span",{staticClass:"btn blue"},[e._v(e._s(e.$t("work.failed")))]):e._e(),5===t.row.status?a("span",{staticClass:"btn purple"},[e._v(e._s(e.$t("work.tobeAccepted")))]):e._e(),6===t.row.status?a("span",{staticClass:"btn red"},[e._v(e._s(e.$t("work.timedout")))]):e._e()]}}])}),a("el-table-column",{attrs:{label:e.$t("table.operate"),width:"180",align:"left"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticClass:"btnCancel",staticStyle:{width:"58px",height:"24px"},on:{click:function(a){return e.handleSee(t.row)}}},[a("i",{staticClass:"iconfont icon-kejian"}),e._v(" "+e._s(e.$t("work.see"))+" ")])]}}])})],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.getWorkList.curPage,limit:e.getWorkList.pageSize},on:{"update:page":function(t){return e.$set(e.getWorkList,"curPage",t)},"update:limit":function(t){return e.$set(e.getWorkList,"pageSize",t)},pagination:e.workList}})],1),a("el-dialog",{staticStyle:{height:"800px"},attrs:{title:e.$t("work.see"),visible:e.seeDialog,width:"900px"},on:{"update:visible":function(t){e.seeDialog=t}}},[a("son-equipment")],1)],1)},i=[],l=(a("d81d"),a("7930")),r=a("9b41"),n=a("333d"),o=a("7877"),c=a("cadb"),u=a("4381"),d={components:{Pagination:n["a"],sonEquipment:o["a"]},directives:{permission:u["a"]},data:function(){return{total:0,seeDialog:!1,status:[{value:-1,label:this.$t("work.unpublished")},{value:0,label:this.$t("work.notStarted")},{value:1,label:this.$t("work.inProgress")},{value:2,label:this.$t("work.suspend")},{value:3,label:this.$t("work.passed")},{value:4,label:this.$t("work.failed")}],list:null,listLoading:!0,downloadLoading:!1,workForm:null,getWorkList:{receiveName:localStorage.getItem("sitename2"),curPage:1,pageSize:10,startTime:null,deadline:null,status:null,taskType:"工单",parentId:null,statusNo:-1,deviceType:null,search:null},deviceType:[],options:[{value:"1",label:this.$t("work.install")},{value:"3",label:this.$t("work.dismantle")},{value:"4",label:this.$t("work.faults")},{value:"5",label:this.$t("work.other")}],arrayTime:[],pickerOptions0:{disabledDate:function(e){return e.getTime()>Date.now()-864e4}}}},created:function(){var e=this;this.workList(),Object(l["c"])().then((function(t){e.deviceType=t.data.list.map((function(e){return{value:e.deviceTypeId,label:e.deviceTypeName}})),console.log(e.deviceTypelist)}))},watch:{arrayTime:function(e){e?(this.getWorkList.startTime=e&&e[0],this.getWorkList.deadline=e&&e[1]):(this.getWorkList.startTime=null,this.getWorkList.deadline=null)},seeDialog:function(e){!0===e?this.$store.state.work.isSee="seeEquipment":!1===e&&(this.$store.state.work.isSee="")}},methods:{handleSee:function(e){var t=this;this.seeDialog=!0,Object(r["j"])({taskId:e.taskId}).then((function(e){t.$store.state.work.deviceAllList=e.data.deviceList}))},workList:function(){var e=this;this.listLoading=!0,Object(r["k"])(this.getWorkList).then((function(t){e.listLoading=!1,e.workForm=t.data.list,e.total=t.data.totalRow,e.workForm=e.workForm.map((function(e){return e=Object.assign({},e),6==Object(c["c"])(e.startTime,e.deadline,t.timestamp,e.status)&&(e.status=6),e})),console.log(e.workForm)}))},handleFilter:function(){this.getWorkList.curPage=1,this.workList()},wipeCondition:function(){for(var e in this.getWorkList)"curPage"!==e&&"pageSize"!==e&&"receiveName"!==e&&"taskType"!==e&&"statusNo"!==e&&(this.getWorkList[e]=null);this.arrayTime=[],this.getWorkList.curPage=1,this.workList()},headClassName:function(){return"headName"},rowClassName:function(e){var t=e.row,a=e.rowIndex;return console.log(t,a),(a+1)%2!==0?"cellNameOdd":"cellNameEven"}}},p=d,m=(a("6828"),a("2877")),k=Object(m["a"])(p,s,i,!1,null,"6a8de856",null);t["default"]=k.exports},6828:function(e,t,a){"use strict";a("b3ab")},7930:function(e,t,a){"use strict";a.d(t,"c",(function(){return i})),a.d(t,"a",(function(){return l})),a.d(t,"b",(function(){return r})),a.d(t,"d",(function(){return n}));var s=a("b775");function i(e){return Object(s["a"])({url:"device-service/type/getTypeList",method:"get",params:e})}function l(e){return Object(s["a"])({headers:{"Content-Type":"application/json"},url:"device-service/type/addType",method:"post",data:e})}function r(e){var t={typeById:e};return Object(s["a"])({url:"device-service/type/deleteType",method:"delete",params:t})}function n(e){return Object(s["a"])({headers:{"Content-Type":"application/json"},url:"device-service/type/updateType",method:"put",data:e})}},b3ab:function(e,t,a){}}]); //# sourceMappingURL=chunk-c6b82f14.f67eb1bb.js.map