1 line
9.0 KiB
JavaScript
1 line
9.0 KiB
JavaScript
|
webpackJsonp([228],{"9+AF":function(e,t){},"c/6g":function(e,t){},xvjZ:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("d7EF"),l=a.n(i),r=a("//Fk"),o=a.n(r),n=a("woOf"),s=a.n(n),c=a("Dd8w"),m=a.n(c),d=a("NYxO"),f=a("3MlD"),u=a("bzuE"),p=a("Dod7"),h={components:{DialogChooseSingleUser:f.a},name:"repair_detail",data:function(){return{uploadUrl:p.a.uploadUrl,ftpPrefix:p.a.ftpPrefix,formDetail:{},formData:{targetList:[],taglocationappearanceImage:[],deletetag_appearanceImage:[]},eventId:"",hitchList:[],deviceStatusList:[],tableData:[],initFilePaths:[],dialogVisible:!1,dialogImageUrl:"",repairRecordImage:[],loading:!1,btnCompleteShow:!1,btnSendShow:!1,btnHandleShow:!1,chooseUserVisible:!1,recordList:[],type:null,config:u.a}},mounted:function(){this.$route.query.type&&(this.type=this.$route.query.type),this.eventId=this.$route.query.id,this.updateTagNav(this.$route),this.getDetail()},methods:m()({},Object(d.d)({removeTagNav:"tagNav/removeTagNav",updateTagNav:"tagNav/updateTagNav"}),{getDetail:function(){var e=this;this.loading=!0,this.$api.repairCheckAPI.getDetail(this.eventId).then(function(t){if(0===t.code){if(e.formDetail=s()({},e.formDetail,t.repairEvent),e.formDetail.checkContent=t.checkContent,e.recordList=t.records,56===t.repairEvent.reventStatusId?(e.btnSendShow=!0,e.btnHandleShow=!0):57===t.repairEvent.reventStatusId&&(e.btnCompleteShow=!0),371===e.type&&(e.btnSendShow=!1,e.btnHandleShow=!1,e.btnCompleteShow=!1),t.ccIdList){var a="";t.ccIdList.forEach(function(e){a+=e.name+","}),a=a.substring(0,a.length-1),e.formDetail.ccID=a}if(t.repairEventImage){e.initFilePaths=[];for(var i=0;i<t.repairEventImage.length;i++){var l={name:"pic"+i,url:e.ftpPrefix+t.repairEventImage[i].filePath};e.initFilePaths.push(l)}}if(t.repairRecordImage){e.repairRecordImage=[];for(i=0;i<t.repairRecordImage.length;i++){var r={name:"pic"+i,url:e.ftpPrefix+t.repairRecordImage[i].filePath};e.repairRecordImage.push(r)}}}e.loading=!1}).catch(function(t){e.loading=!1})},initialize:function(){var e=this;o.a.all([this.$api.dictAPI.getDictsByType("device_malfunction"),this.$api.dictAPI.getDictsByType("device_status")]).then(function(t){var a=l()(t,2),i=a[0],r=a[1];0===i.code&&(e.hitchList=i.datas,e.hitchList&&(e.formData.type=e.hitchList[0].id)),0===r.code&&(e.deviceStatusList=r.datas)}).catch(function(e){console.log(e)})},complete:function(){this.$router.push({path:"/wwbx/check",query:{id:this.eventId,t:Date.now(),redirect:this.$route.path}})},repair:function(){this.$router.push({path:"/wwbx/handle",query:{id:this.eventId,t:Date.now(),redirect:this.$route.path}})},recordDetail:function(e){this.$router.push({path:"/wwbx/record_detail",query:{id:e.id,t:Date.now()}})},getUser:function(e){var t=this,a=e.id,i=this.eventId;this.$confirm("确认将维修单转派给【"+e.name+"】吗?","提示",{type:"warning"}).then(function(){t.$api.repairCheckAPI.reventTurnToSend({eventId:i,userId:a}).then(function(e){0===e.code?(t.$message({message:e.msg,type:"success"}),t.save_back()):t.$message({message:e.msg?e.msg:"转派失败,请重试",type:"error"})}).catch(function(e){t.$message({message:"转派失败,请重试",type:"error"})})})},send:function(){this.chooseUserVisible=!0},back:function(){this.removeTagNav({path:this.$route.path,title:this.$route.meta.name}),this.$router.go(-1)},save_back:function(){this.removeTagNav({path:this.$route.path,title:this.$route.meta.name}),this.$router.push({path:"/wwbx/index",t:Date.now()})},handlePictureCardPreview:function(e){this.dialogImageUrl=e.url,this.dialogVisible=!0}})},v={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"sys-box repair-box"},[a("div",{staticClass:"sys-operate"},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.back()}}},[e._v(e._s(e.config.cancelText))]),e._v(" "),e.btnHandleShow?a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.repair()}}},[e._v("维修处理")]):e._e(),e._v(" "),e.btnSendShow?a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.send()}}},[e._v("维修
|