{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\flow\\task\\taskToDelay.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\flow\\task\\taskToDelay.vue","mtime":1667327529466},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport { mapState, mapActions } from \"vuex\";\r\nimport OpinionText from \"@/components/common/opinionText.vue\";\r\nimport FileUpload from \"@/components/common/fileUpload.vue\";\r\nimport { Message } from \"element-ui\";\r\nimport utils from \"@/utils.js\";\r\nexport default {\r\n name: \"taskToDelay\",\r\n props: [\"taskId\"],\r\n components: { OpinionText,FileUpload},\r\n data() {\r\n return {\r\n delayDialog:false,\r\n percent:\"\", //已用时间\r\n addDueTime:0,//延期时间(小时)\r\n expirationDate2:\"\",//延期后的时间 yyyy-mm-dd HH:mm:ss\r\n id:\"\",\r\n confirmData:{},\r\n addMinute:0 //延期时间(分钟)\r\n };\r\n },\r\n watch: {\r\n addDueTime: function(newVal,oldVal){\r\n if(newVal!=0){\r\n this.addMinute = newVal*60;\r\n let data = {\"id\":this.id,\"time\":newVal*60};\r\n this.$store.dispatch(\"storeProcess/getExpirationDate\",data).then(data => {\r\n this.expirationDate2 = data;\r\n });\r\n }else{\r\n this.addMinute = 0;\r\n this.expirationDate2=\"\";\r\n }\r\n }\r\n },\r\n computed: mapState({\r\n dueTime: state => state.storeProcess.dueTime\r\n }),\r\n methods: {\r\n //鼠标点击页面其他其他位置不关闭弹框\r\n handleClose(done) {\r\n this.delayDialog = true;\r\n this.$store.dispatch(\"storeProcess/bpmTaskDueTime\",this.taskId).then(data => {\r\n this.confirmData = data;\r\n this.id = data.id;\r\n let percent = (data.dueTime - data.remainingTime)*100/data.dueTime;\r\n this.percent = parseFloat(percent.toFixed(2));\r\n if(percent>100){\r\n this.percent = 100;\r\n }\r\n this.percent = this.percent + \"%\";\r\n });\r\n },\r\n //取消\r\n cancel() {\r\n this.delayDialog = false;\r\n },\r\n //确认\r\n confirm() {\r\n if(this.addDueTime==0){\r\n Message.warning(\"请填写延期时间\");\r\n return;\r\n }else if(this.$refs.opinionText.getOpinion()==\"\"){\r\n Message.warning(\"请填写延期说明\");\r\n return;\r\n };\r\n let files =\"\";\r\n if(this.$refs.fileUpload.getFiles()!=\"\"){\r\n files = JSON.stringify(this.$refs.fileUpload.getFiles())\r\n }\r\n let data = {\"id\":this.confirmData.id,\"parentId\":this.confirmData.parentId,\"instId\":this.confirmData.instId,\r\n \"dateType\":this.confirmData.dateType,\"taskId\":this.confirmData.taskId,\"dueTime\":this.confirmData.dueTime,\r\n \"addDueTime\":this.addMinute,\"startTime\":this.confirmData.startTime,\"expirationDate\":this.confirmData.expirationDate,\r\n \"remainingTime\":this.confirmData.remainingTime,\"status\":this.confirmData.status,\"userId\":this.confirmData.userId,\r\n \"userName\":this.confirmData.userName,\"isNew\":this.confirmData.isNew,\"createTime\":this.confirmData.createTime,\r\n \"remark\":this.$refs.opinionText.getOpinion(),\"fileId\":files}\r\n this.$store.dispatch(\"storeProcess/dueTimeSave\",data).then(()=>{\r\n this.delayDialog = false;\r\n utils.reload();\r\n });\r\n }\r\n }\r\n};\r\n",null]}