2 lines
20 KiB
JavaScript
2 lines
20 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e7aff04c"],{4381:function(t,e,a){"use strict";a("d3b7"),a("caad"),a("2532"),a("d9e2");var s=a("4360"),i={inserted:function(t,e){var a=e.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 o=a,n=i.some((function(t){return o.includes(t)}));if(console.log(n,"hasPermission"),n)s["a"].state.user.permissionFlag[o]=!1;else{s["a"].state.user.permissionFlag[o]=!0,console.log(s["a"].state.user.permissionFlag[o],"permissionRoles");var r=document.createElement("div");r.style.cursor="not-allowed",r.style.display="inline-block",t.style.pointerEvents="none",t.parentNode.insertBefore(r,t),t.parentNode&&t.parentNode.removeChild(t),r.appendChild(t),console.log(t,"permissionRoles")}}},o=function(t){t.directive("permission",i)};window.Vue&&(window["permission"]=i,Vue.use(o)),i.install=o;e["a"]=i},"9aca":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"filter-container",staticStyle:{"margin-bottom":"16px"}},[a("span",{staticClass:"btn-item",on:{click:t.goBack}},[a("i",{staticClass:"el-icon-upload2"}),t._v(t._s(t.$t("work.return")))]),5==t.$store.state.work.applyStatus?a("span",{staticClass:"btn-item",on:{click:t.getApply}},[a("i",{staticClass:"el-icon-upload2"}),t._v(t._s(t.$t("work.submit")))]):t._e()]),a("div",{staticClass:"app-container"},[a("div",{staticClass:"decorate"}),a("div",{staticClass:"baseInfo"},[a("div",{staticClass:"name"},[a("i",{staticClass:"iconfont icon-biaoti"}),a("span",[t._v(t._s(t.$t("cabinet.basicInfo")))])]),a("el-row",{staticClass:"row"},[a("el-col",{attrs:{span:6}},[a("span",{staticClass:"label"},[t._v(t._s(t.$t("work.taskName")))]),a("span",{staticClass:"value"},[t._v(" "+t._s(t.$store.state.work.taskForm.taskName)+" ")])]),a("el-col",{attrs:{span:6}},[a("span",{staticClass:"label"},[t._v(t._s(t.$t("startTime")))]),a("span",{staticClass:"value"},[t._v(" "+t._s(t.$store.state.work.taskForm.startTime)+" ")])]),a("el-col",{attrs:{span:6}},[a("span",{staticClass:"label"},[t._v(t._s(t.$t("work.recipient")))]),a("span",{staticClass:"value"},[t._v(" "+t._s(t.$store.state.work.taskForm.receiveName)+" ")])]),a("el-col",{attrs:{span:6}},[a("span",{staticClass:"label"},[t._v(t._s(t.$t("completionTime")))]),a("span",{staticClass:"value"},[t._v(" "+t._s(t.$store.state.work.taskForm.finishTime||"- -")+" ")])]),a("el-col",{attrs:{span:6}},[a("span",{staticClass:"label"},[t._v(t._s(t.$t("work.taskNum")))]),a("span",{staticClass:"value"},[t._v(" "+t._s(t.$store.state.work.taskForm.taskNum)+" ")])]),a("el-col",{attrs:{span:6}},[a("span",{staticClass:"label"},[t._v(t._s(t.$t("endTime")))]),a("span",{staticClass:"value"},[t._v(" "+t._s(t.$store.state.work.taskForm.deadline)+" ")])]),a("el-col",{attrs:{span:6}},[a("span",{staticClass:"label"},[t._v(t._s(t.$t("work.accepted")))]),a("span",{staticClass:"value"},[t._v(" "+t._s(t.$store.state.work.taskForm.checkName)+" ")])]),a("el-col",{attrs:{span:6}},[a("span",{staticClass:"label"},[t._v(t._s(t.$t("work.taskType")))]),a("span",{staticClass:"value"},[t._v(" "+t._s(t.getOrder(t.$store.state.work.taskForm.orderType))+" ")])]),a("el-col",{attrs:{span:24}},[a("span",{staticClass:"label"},[t._v(t._s(t.$t("work.remark")))]),a("span",{staticClass:"value"},[t._v(" "+t._s(this.$store.state.work.taskForm.remark)+" ")])])],1)],1),a("div",{staticClass:"table-container"},[a("div",{staticClass:"name"},[a("i",{staticClass:"iconfont icon-biaoti"}),a("span",[t._v(t._s(t.$t("work.deviceList")))])]),a("el-table",{attrs:{data:t.$store.state.work.equipmentList,"highlight-current-row":"","header-row-class-name":"table-header","row-class-name":"table-row"}},[a("el-table-column",{attrs:{property:"deviceName",align:"center",label:t.$t("device.deviceName")}}),a("el-table-column",{attrs:{property:"deviceId",align:"center",label:t.$t("device.deviceCode")}}),a("el-table-column",{attrs:{align:"center",label:t.$t("work.status")},scopedSlots:t._u([{key:"default",fn:function(e){return[1===e.row.checkStatus?a("span",[t._v(t._s(t.$t("work.passed")))]):t._e(),0===e.row.checkStatus?a("span",[t._v(t._s(t.$t("work.failed")))]):t._e(),null==e.row.checkStatus?a("span",[t._v(t._s(t.$t("work.tobeAccepted")))]):t._e()]}}])}),a("el-table-column",{attrs:{label:t.$t("table.operate"),width:"300",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{directives:[{name:"permission",rawName:"v-permission",value:["apply_checkLog"],expression:"['apply_checkLog']"}],staticClass:"btnCancel",on:{click:function(a){return t.applys(e)}}},[a("i",{staticClass:"iconfont icon-kejian"}),t._v(" "+t._s(t.$t("work.see"))+" ")])]}}])})],1)],1),t.dialogVisible?a("el-dialog",{staticClass:"devDialog",attrs:{title:t.$t("work.see"),visible:t.dialogVisible,"before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("div",{staticStyle:{padding:"20px"}},t._l(t.list,(function(e,s){return a("el-timeline",{key:s},[a("el-timeline-item",{attrs:{timestamp:e.createTime,placement:"top"}},[a("el-card",[t._l(e.picAnnexList,(function(t,s){return a("el-image",{key:s,staticStyle:{width:"100px",height:"100px"},attrs:{src:t,"preview-src-list":e.picAnnexList}})})),t._l(e.videoAnnexList,(function(t,e){return a("div",{key:t+"+"+e},[a("video",{staticClass:"video-js",attrs:{id:"video"+t+"+"+e,controls:"",preload:"auto",poster:"//vjs.zencdn.net/v/oceans.png",width:"600",height:"400"}},[a("source",{attrs:{src:t,type:"video/mp4"}}),a("source",{attrs:{src:t,type:"video/webm"}}),a("source",{attrs:{src:t,type:"video/ogg"}})])])})),t._l(e.audioAnnexList,(function(e,s){return a("div",{key:e+"+"+s},[a("audio",{attrs:{controls:"",height:"100",width:"100"}},[a("source",{attrs:{src:e,type:"audio/wav"}}),a("source",{attrs:{src:e,type:"audio/ogg"}}),a("source",{attrs:{src:e,type:"audio/mp3"}}),a("embed",{attrs:{height:"100",width:"100",src:e}}),t._v(" Your browser does not support this audio format. ")])])})),a("p",{staticStyle:{"margin-top":"20px","font-size":"16px"}},[t._v(" "+t._s(e.remark)+" ")]),e.latitude?a("p",{staticStyle:{"margin-top":"20px"}},[t._v(" "+t._s(t.$t("table.longitude"))+":"+t._s(e.latitude)+" "+t._s(t.$t("table.latitude"))+":"+t._s(e.longitude)+" ")]):t._e()],2)],1)],1)})),1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("span",{directives:[{name:"permission",rawName:"v-permission",value:["apply_nopass"],expression:"['apply_nopass']"}],staticClass:"btn-item long",attrs:{disabled:1==t.lastCheck},on:{click:function(e){return t.failCheck(0)}}},[t._v(" "+t._s(t.$t("work.failed")))]),a("span",{directives:[{name:"permission",rawName:"v-permission",value:["apply_pass"],expression:"['apply_pass']"}],staticClass:"btn-item long",attrs:{disabled:1==t.lastCheck},on:{click:function(e){return t.successCheck(1)}}},[t._v(t._s(t.$t("work.passed")))])])]):t._e(),t.checkedVisible?a("el-dialog",{staticClass:"devDialog",attrs:{title:t.$t("work.Acceptance"),visible:t.checkedVisible,"before-close":t.handleClose},on:{"update:visible":function(e){t.checkedVisible=e}}},[a("div",{staticStyle:{padding:"20px"}},[a("div",[a("p",{staticStyle:{"font-size":"24px","margin-bottom":"20px"}},[t._v(" "+t._s(t.$t("work.pictures"))+" ")]),a("el-upload",{staticClass:"upload-demo",attrs:{action:t.uploadHttpList,"on-preview":t.handlePreview,"on-remove":t.handleRemove,"on-success":t.handleSuccess,"before-upload":t.beforeUpload,"file-list":t.fileList,"http-request":t.uploadFile,"list-type":"picture"}},[a("el-button",{attrs:{size:"small",type:"primary"}},[t._v(t._s(t.$t("work.upload")))]),a("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v(" "+t._s(t.$t("work.uploadTip"))+" ")])],1)],1),a("div",[a("p",{staticStyle:{"font-size":"24px","margin-bottom":"20px","margin-top":"40px"}},[t._v(" "+t._s(t.$t("work.video"))+" ")]),a("form",{attrs:{action:"",id:"myForm",enctype:"multipart/form-data",name:"fileinfo",target:"uploadFrame"}},[a("div",{staticClass:"img.file"},[a("label",{staticClass:"addbutton button-green",attrs:{for:"imgFile"}},[t._v(t._s(t.$t("work.upload")))]),a("input",{staticClass:"upload_input",attrs:{type:"file",id:"imgFile",accept:"video/*"},on:{change:t.changeVideo}})])]),a("p",{staticStyle:{"margin-top":"10px","margin-bottom":"10px"}},[t._v(" "+t._s(t.$t("work.videos"))+" ")]),t._l(t.videoFile,(function(e,s){return a("div",{key:s,staticClass:"deletes"},[a("span",{staticClass:"use",staticStyle:{"margin-bottom":"4px","margin-right":"10px"}},[t._v(t._s(e.name))]),a("span",{attrs:{title:t.$t("work.DeleteVideo")},on:{click:function(a){return t.deletes(e,t.videoFile)}}},[a("svg-icon",{attrs:{"icon-class":"deletes"}})],1)])}))],2),a("div",[a("p",{staticStyle:{"font-size":"24px","margin-bottom":"20px","margin-top":"40px"}},[t._v(" "+t._s(t.$t("work.audio"))+" ")]),a("form",{attrs:{action:"",id:"myAudio",enctype:"multipart/form-data",name:"fileAudio",target:"uploadFrame"}},[a("div",{staticClass:"img.file"},[a("label",{staticClass:"addbutton button-green",attrs:{for:"imgFile"}},[t._v(t._s(t.$t("work.upload")))]),a("input",{staticClass:"upload_input",attrs:{type:"file",id:"audioFile",accept:"audio/*"},on:{change:t.changeAudio}})])]),a("p",{staticStyle:{"margin-top":"10px","margin-bottom":"10px"}},[t._v(" "+t._s(t.$t("work.audios"))+" ")]),t._l(t.audioFile,(function(e,s){return a("div",{key:s,staticClass:"deletes"},[a("span",{staticClass:"use",staticStyle:{"margin-bottom":"4px","margin-right":"10px"}},[t._v(t._s(e.name))]),a("span",{attrs:{title:t.$t("work.DeleteAudio")},on:{click:function(a){return t.deletes(e,t.audioFile)}}},[a("svg-icon",{attrs:{"icon-class":"deletes"}})],1)])}))],2),a("div",{staticStyle:{"margin-top":"40px"}},[a("p",{staticStyle:{"font-size":"24px","margin-bottom":"20px"}},[t._v(" "+t._s(t.$t("work.explain"))+" ")]),a("el-input",{staticStyle:{width:"600px"},attrs:{type:"textarea",autosize:{minRows:4,maxRows:10}},model:{value:t.form.Remark,callback:function(e){t.$set(t.form,"Remark",e)},expression:"form.Remark"}})],1)]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("span",{staticClass:"btn-item long",on:{click:function(e){t.checkedVisible=!1}}},[t._v(t._s(t.$t("btn.cancel")))]),a("span",{staticClass:"btn-item long",attrs:{disabled:t.btnFlag},on:{click:function(e){return t.handleGet()}}},[t._v(t._s(t.$t("btn.define")))])])]):t._e()],1)])},i=[],o=(a("ac1f"),a("5319"),a("a434"),a("a15b"),a("00b4"),a("9b41")),n=a("4381"),r=a("5f87"),c=a("bc3a"),l=a.n(c),u={directives:{permission:n["a"]},data:function(){return{url:"",uploadHttpList:"",fileList:[],dialogVisible:!1,checkedVisible:!1,list:null,checkId:"",videoFile:[],videoPath:[],audioPath:[],audioFile:[],form:{deviceType:"",deviceId:"",deviceName:"",taskId:this.$store.state.work.taskForm.taskId,trackType:"验收",checkStatus:"",Remark:"",picAnnex:"",videoAnnex:"",audioAnnex:"",Longitude:"",latitude:""},filePath:[],taskStatus:{taskNum:"",startTime:"",receiveName:"",finishTime:"",taskName:"",stopTime:"",applyTime:"",taskText:""},btnFlag:!1,lastCheck:""}},created:function(){this.url=this.$store.state.user.url+"/trajectory-service",this.uploadHttpList=this.url+"/file/uploadFileList"},watch:{checkedVisible:function(){this.form.videoAnnex="",this.form.audioAnnex="",this.form.picAnnex="",this.videoFile=[],this.videoPath=[],this.audioPath=[],this.audioFile=[],this.filePath=[],this.fileList=[],this.form.Remark=""}},methods:{getOrder:function(t){switch(t){case"1":return this.$t("work.install");case"3":return this.$t("work.dismantle");case"4":return this.$t("work.faults");case"8":return this.$t("work.patrol");default:return this.$store.state.work.taskForm.orderType.replace("5",this.$t("work.other"))}},deletes:function(t,e){var a=this;console.log(t),this.$confirm("是否确定删除","提示",{confirmButtonText:"确定",cancelButtonText:"取消"}).then((function(){var s={fileUrl:t.path};Object(o["d"])(s).then((function(s){if(200==s.status){var i=e.indexOf(t);console.log(i),i>-1&&e.splice(i,1),a.$notify({title:a.$t("title.success"),message:s.message,type:"success",duration:3e3})}}))}))},getList:function(){var t=this;this.$store.state.work.taskId&&Object(o["i"])({taskId:this.$store.state.work.taskId,trackType:"验收"}).then((function(e){t.$store.state.work.equipmentList=e.data.deviceAcceptanceList,t.$store.state.work.taskForm=e.data.task}))},applys:function(t){var e=this;this.form.deviceId=t.row.deviceId,this.form.deviceType=t.row.deviceType,this.form.deviceName=t.row.deviceName,this.dialogVisible=!0;var a={deviceId:t.row.deviceId,taskId:this.$store.state.work.taskForm.taskId};Object(o["l"])(a).then((function(t){e.list=t.data.list,e.lastCheck=e.list[e.list.length-1].checkStatus}))},goBack:function(){this.$store.state.work.flag="task"},getApply:function(){var t=this;this.$confirm("是否确定验收, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(o["a"])({taskId:t.$store.state.work.taskId}).then((function(e){200===e.status&&(t.$store.state.work.flag="task",t.$notify({title:t.$t("title.success"),message:"验收成功",type:"success",duration:3e3}))}))}))},handleClose:function(t){this.$confirm(this.$t("work.Confirm")).then((function(e){t()})).catch((function(t){}))},successCheck:function(t){this.dialogVisible=!1,this.checkedVisible=!0,this.form.checkStatus=t},failCheck:function(t){this.dialogVisible=!1,this.checkedVisible=!0,this.form.checkStatus=t},handleGet:function(){var t=this;this.form.videoAnnex=this.videoPath.join("^"),this.form.audioAnnex=this.audioPath.join("^"),console.log(this.form),Object(o["o"])(this.form).then((function(e){t.$notify({title:t.$t("title.success"),message:e.message,type:"success"}),t.getList()})),this.checkedVisible=!1,this.form.Remark="",this.fileList=[]},handleRemove:function(t,e){console.log(t,e)},handlePreview:function(t){console.log(t)},handleSuccess:function(t,e,a){console.log(t,e,a),this.filePath.push(t.data.path),this.form.picAnnex=this.filePath.join("^")},uploadFile:function(t){var e=this,a=new FormData;a.append("file",t.file),a.append("host",this.url),l()({method:"post",url:this.uploadHttpList,data:a,headers:{"Content-Type":"multipart/form-data",Authorization:Object(r["a"])()}}).then((function(t){200===t.status?(e.$notify({title:e.$t("title.success"),message:t.data.message,type:"success",duration:3e3}),e.filePath.push(t.data.data),e.form.picAnnex=e.filePath.join("^")):e.$notify({title:"失败",message:t.data.message,type:"warning",duration:3e3})}))},beforeUpload:function(t){var e=/^image\/(jpeg|png|jpg|(svg\+xml))$/.test(t.type),a=t.size/1024/1024<5;return e?a?(this.uploading=!1,e&&a):(this.$message.error("上传图片大小不能超过 2MB!"),!1):(this.$message.error("上传图片格式不对!"),!1)},changeVideo:function(){var t=this,e=this;e.btnFlag=!0;var a=document.getElementById("imgFile").files[0];e.file=a;var s=new FormData;a&&(s.append("file",a),s.append("host",this.url)),l()({method:"post",url:this.uploadHttpList,data:s,headers:{"Content-Type":"multipart/form-data",Authorization:Object(r["a"])()}}).then((function(a){e.btnFlag=!1,t.videoFile.push({name:a.data.data,path:a.data.data}),t.videoPath.push(a.data.data)})).catch((function(t){console.log(t)}))},changeAudio:function(){var t=this,e=this;e.btnFlag=!0;var a=document.getElementById("audioFile").files[0];e.file=a;var s=new FormData;a&&(s.append("file",a),s.append("host",this.url)),l()({method:"post",url:this.uploadHttpList,data:s,headers:{"Content-Type":"multipart/form-data",Authorization:Object(r["a"])()}}).then((function(a){e.btnFlag=!1,t.audioFile.push({name:a.data.data,path:a.data.data}),t.audioPath.push(a.data.data)})).catch((function(t){console.log(t)}))}}},d=u,p=(a("fd58"),a("2877")),m=Object(p["a"])(d,s,i,!1,null,"0d2a7507",null);e["default"]=m.exports},"9b41":function(t,e,a){"use strict";a.d(e,"h",(function(){return n})),a.d(e,"n",(function(){return r})),a.d(e,"t",(function(){return c})),a.d(e,"p",(function(){return l})),a.d(e,"j",(function(){return u})),a.d(e,"k",(function(){return d})),a.d(e,"i",(function(){return p})),a.d(e,"q",(function(){return m})),a.d(e,"r",(function(){return f})),a.d(e,"b",(function(){return h})),a.d(e,"a",(function(){return v})),a.d(e,"e",(function(){return k})),a.d(e,"c",(function(){return g})),a.d(e,"l",(function(){return b})),a.d(e,"o",(function(){return y})),a.d(e,"d",(function(){return _})),a.d(e,"g",(function(){return w})),a.d(e,"f",(function(){return $})),a.d(e,"m",(function(){return C})),a.d(e,"s",(function(){return j}));a("e9c4");var s=a("b775"),i=a("4328"),o=a.n(i);function n(t){return Object(s["a"])({url:"device-service/cabinet/getDeviceList",method:"get",params:t})}function r(t){var e=JSON.stringify(t);return Object(s["a"])({url:"trajectory-service/ttask/insertOrderTask",method:"post",headers:{"Content-Type":"application/json"},data:e})}function c(t){var e=JSON.stringify(t);return Object(s["a"])({url:"trajectory-service/ttask/updateTask",method:"post",headers:{"Content-Type":"application/json"},data:e})}function l(t){return Object(s["a"])({url:"trajectory-service/ttask/releaseTask",method:"post",params:t})}function u(t){return Object(s["a"])({url:"trajectory-service/ttask/getTask",method:"get",params:t})}function d(t){return Object(s["a"])({url:"trajectory-service/ttask/getTaskList",method:"get",params:t})}function p(t){return Object(s["a"])({url:"trajectory-service/acceptance/getNeedAcceptanceDeviceList",method:"get",params:t})}function m(t){var e=o.a.stringify(t);return Object(s["a"])({url:"trajectory-service/ttask/releaseTaskBySubId",method:"post",data:e})}function f(t){var e=o.a.stringify(t);return Object(s["a"])({url:"trajectory-service/ttask/stopTaskBySubId",method:"post",data:e})}function h(t){return Object(s["a"])({url:"trajectory-service/acceptance/applyAcceptanceTask",method:"get",params:t})}function v(t){return Object(s["a"])({url:"trajectory-service/acceptance/acceptanceTask",method:"get",params:t})}function k(t){var e=o.a.stringify(t);return Object(s["a"])({url:"trajectory-service/ttask/deleteTask",method:"post",data:e})}function g(t){var e=o.a.stringify(t);return Object(s["a"])({url:"trajectory-service/ttask/batchDeleteTask",method:"post",data:e})}function b(t){return Object(s["a"])({url:"trajectory-service/trajectory/getTrajectoryList",method:"get",params:t})}function y(t){var e=o.a.stringify(t);return Object(s["a"])({url:"trajectory-service/trajectory/insertTrajectory",method:"post",data:e})}function _(t){return Object(s["a"])({url:"trajectory-service/file/deleteFileByUrl",method:"post",params:t})}function w(t){return Object(s["a"])({url:"trajectory-service/dismantle/getDismantleList",method:"get",params:t})}function $(t){return Object(s["a"])({url:"trajectory-service/dismantle/getDismantleInfo",method:"get",params:t})}function C(t){var e=JSON.stringify(t);return Object(s["a"])({url:"trajectory-service/ttask/insertInspectionTask",headers:{"Content-Type":"application/json"},method:"post",data:e})}function j(t){var e=JSON.stringify(t);return Object(s["a"])({url:"trajectory-service/ttask/updateInspectionTask",headers:{"Content-Type":"application/json"},method:"post",data:e})}},bc0a:function(t,e,a){},e9c4:function(t,e,a){var s=a("23e7"),i=a("da84"),o=a("d066"),n=a("2ba4"),r=a("e330"),c=a("d039"),l=i.Array,u=o("JSON","stringify"),d=r(/./.exec),p=r("".charAt),m=r("".charCodeAt),f=r("".replace),h=r(1..toString),v=/[\uD800-\uDFFF]/g,k=/^[\uD800-\uDBFF]$/,g=/^[\uDC00-\uDFFF]$/,b=function(t,e,a){var s=p(a,e-1),i=p(a,e+1);return d(k,t)&&!d(g,i)||d(g,t)&&!d(k,s)?"\\u"+h(m(t,0),16):t},y=c((function(){return'"\\udf06\\ud834"'!==u("\udf06\ud834")||'"\\udead"'!==u("\udead")}));u&&s({target:"JSON",stat:!0,forced:y},{stringify:function(t,e,a){for(var s=0,i=arguments.length,o=l(i);s<i;s++)o[s]=arguments[s];var r=n(u,null,o);return"string"==typeof r?f(r,v,b):r}})},fd58:function(t,e,a){"use strict";a("bc0a")}}]);
|
|
//# sourceMappingURL=chunk-e7aff04c.cfb4f830.js.map
|