yxk_pc_mdh/gyhl/static/js/260.2921dce4d408db224615.js

1 line
10 KiB
JavaScript
Raw Normal View History

2025-08-28 15:26:35 +08:00
webpackJsonp([260],{BU4J:function(e,t){},TGuR:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=a("d7EF"),i=a.n(l),r=a("//Fk"),o=a.n(r),n=a("woOf"),s=a.n(n),c=a("Dd8w"),m=a.n(c),d=a("NYxO"),p=a("3MlD"),f=a("bzuE"),u=a("Dod7"),v={components:{DialogChooseSingleUser:p.a},name:"repair_detail",data:function(){return{uploadUrl:u.a.uploadUrl,ftpPrefix:u.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:f.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 l=0;l<t.repairEventImage.length;l++){var i={name:"pic"+l,url:e.ftpPrefix+t.repairEventImage[l].filePath};e.initFilePaths.push(i)}}if(t.repairRecordImage){e.repairRecordImage=[];for(l=0;l<t.repairRecordImage.length;l++){var r={name:"pic"+l,url:e.ftpPrefix+t.repairRecordImage[l].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=i()(t,2),l=a[0],r=a[1];0===l.code&&(e.hitchList=l.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:"/repair/check",query:{id:this.eventId,t:Date.now(),redirect:this.$route.path}})},repair:function(){this.$router.push({path:"/repair/handle",query:{id:this.eventId,t:Date.now(),redirect:this.$route.path}})},recordDetail:function(e){this.$router.push({path:"/repair/record_detail",query:{id:e.id,t:Date.now()}})},getUser:function(e){var t=this,a=e.id,l=this.eventId;this.$confirm("确认将维修单转派给【"+e.name+"】吗?","提示",{type:"warning"}).then(function(){t.$api.repairCheckAPI.reventTurnToSend({eventId:l,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:"/repair/index",t:Date.now()})},handlePictureCardPreview:function(e){this.dialogImageUrl=e.url,this.dialogVisible=!0}})},h={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("维修转派")]):e._e()