{"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.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\flow\\task.vue","mtime":1667327529419},{"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\r\nimport FormContent from \"@/components/flow/formContent.vue\";\r\nimport RelatedInformation from \"@/components/flow/relatedInformation.vue\";\r\nimport FlowAction from \"@/components/flow/flowAction.vue\";\r\nimport DoneAction from \"@/components/flow/doneAction.vue\";\r\nimport ProcessRecord from \"@/components/flow/processRecord.vue\";\r\nimport TaskToCopyTo from \"@/components/flow/task/taskToCopyTo.vue\";\r\nimport TaskToCommu from \"@/components/flow/task/taskToCommu.vue\";\r\nimport TaskFollow from \"@/components/flow/task/taskFollow.vue\";\r\nimport TaskImage from \"@/components/flow/task/taskImage.vue\";\r\nimport UrgentRecord from \"@/components/flow/urgentRecord.vue\";\r\nimport ModifyRecord from \"@/components/flow/modifyRecord.vue\";\r\nimport TaskUrgent from \"@/components/flow/task/taskUrgent.vue\";\r\nimport FlowPrint from \"@/components/flow/flowPrint.vue\";\r\nimport ProcessRecordDialog from \"@/components/flow/processRecordDialog.vue\";\r\nimport req from \"@/request.js\";\r\nimport utils from \"@/utils.js\";\r\nimport { Loading } from \"element-ui\";\r\nimport { mapState, mapActions } from \"vuex\";\r\nimport watermark from \"@/watermark.js\";\r\n\r\nexport default {\r\n name: \"task\",\r\n components: {\r\n FormContent,\r\n FlowAction,\r\n ProcessRecord,\r\n TaskToCommu,\r\n TaskFollow,\r\n TaskImage,\r\n RelatedInformation,\r\n TaskToCopyTo,\r\n UrgentRecord,\r\n ModifyRecord,\r\n TaskUrgent,\r\n DoneAction,\r\n FlowPrint,\r\n ProcessRecordDialog,\r\n },\r\n props: [\r\n \"task_state\",\r\n \"instId\",\r\n \"type\",\r\n \"taskId\",\r\n \"readId\",\r\n \"leaderId\",\r\n \"readDoneId\",\r\n \"myReadType\",\r\n \"noSingle\",\r\n \"defKey\"\r\n ],\r\n data() {\r\n return {\r\n sponsorRevoke: false, //允许发起人撤回(默认不勾选)\r\n isLook: false,\r\n tasks: {}, //任务详情\r\n procInstId: this.instId,\r\n copyTaskId: this.taskId,\r\n defId: \"\",\r\n bpmnInstId: \"\",\r\n subject: \"\",\r\n status: \"\",\r\n instStatus: \"\",\r\n choiceExcutor: \"\",\r\n show: true,\r\n jumpType: \"\",\r\n promoterId: \"\",\r\n execId: \"\",\r\n selectNodeId: \"\",\r\n approvalArea: \"\", //审批区域显示的内容\r\n referOpinion: true, //允许参考意见 (选择否,则审批时不允许参考同环节其他会签人员的意见)\r\n nodeType: \"\", //当前任务类型\r\n nodeId: \"\", //当前任务节点\r\n showModifyRecord: false, //是否显示表单修改记录\r\n formKey: \"\",\r\n opinionField: \"\", //审批意见反填字段\r\n appendOpinion: \"\", //是否覆盖审批意见\r\n signatureField: \"\", //自动签章字段\r\n signatureCover: false, //自动签章是否覆盖\r\n secretFree: false, //自动签章时是否免密\r\n previewWordDialog: false,\r\n previewWordHeight: 800,\r\n previewWordPdfSrc: \"\",\r\n flowDefKey:\"\"\r\n };\r\n },\r\n mounted() {\r\n this.previewWordHeight = document.documentElement.clientHeight - 80;\r\n },\r\n methods: {\r\n //复制流程\r\n copeInst() {\r\n this.$confirm(\r\n \"此操作将把当前实例数据复制到新流程待启动,是否继续?\",\r\n \"提示\",\r\n {\r\n confirmButtonText: \"继续\",\r\n cancelButtonText: \"取消\",\r\n type: \"warning\",\r\n }\r\n )\r\n .then(() => {\r\n this.$router.push(\"/agentStart/\" + this.defId + \"/0/\" + this.instId);\r\n })\r\n .catch(() => { });\r\n },\r\n //流程催办\r\n taskUrgent() {\r\n this.$store.dispatch(\"storeProcess/isEnd\", this.procInstId).then(() => {\r\n this.$refs.taskUrgent.handleClose(); //父组件调用子组件方法\r\n });\r\n },\r\n //催办记录\r\n urgentRecord() {\r\n this.$refs.urgentRecord.handleClose(); //父组件调用子组件方法\r\n },\r\n //表单修改记录\r\n openModifyRecord() {\r\n this.$refs.modifyRecord.handleClose(); //父组件调用子组件方法\r\n },\r\n //流程传阅\r\n taskToCopyTo() {\r\n if (this.type && this.type == \"doneList\") {\r\n this.selectNodeId = this.$refs.doneAction.getSelectNodeId();\r\n }\r\n this.$refs.taskToCopyTo.handleClose(this.selectNodeId, this.copyTaskId); //父组件调用子组件方法\r\n },\r\n //发起沟通\r\n taskToCommu() {\r\n this.$store.dispatch(\"storeProcess/isEnd\", this.procInstId).then(() => {\r\n this.$refs.taskToCommu.handleClose(); //父组件调用子组件方法\r\n });\r\n },\r\n //跟踪设置\r\n taskFollow() {\r\n this.$store.dispatch(\"storeProcess/isEnd\", this.procInstId).then(() => {\r\n this.$refs.taskFollow.handleOpen(); //父组件调用子组件方法\r\n });\r\n },\r\n //流程图\r\n taskImage() {\r\n this.$refs.taskImage.handleOpen(); //父组件调用子组件方法\r\n },\r\n //相关信息\r\n relatedInformation() {\r\n this.$refs.relatedInformation.handleClose(); //父组件调用子组件方法\r\n },\r\n //处理记录信息\r\n processRecordDialog() {\r\n this.$refs.processRecordDialog.handleClose(); //父组件调用子组件方法\r\n },\r\n //相关信息\r\n showPrint() {\r\n let this_ = this;\r\n if (!this.formKey || this.formKey == \"\") {\r\n if (!this.nodeId) {\r\n this.nodeId = \"\";\r\n }\r\n var url =\r\n \"${bpmRunTime}/runtime/instance/v1/printBoAndFormKey?defId=\" +\r\n this.defId +\r\n \"&nodeId=\" +\r\n this.nodeId +\r\n \"&procInstId=\" +\r\n this.procInstId;\r\n req.get(url).then((res) => {\r\n if (res.data) {\r\n this.formKey = res.data.formKey;\r\n let param = {\r\n pageBean: { page: 1, pageSize: 20, total: 0 },\r\n querys: [{ group: \"defaultQueryGroup\", operation: \"EQUAL\", relation: \"AND\", property: \"formKey\", value: this.formKey }]\r\n };\r\n req.post(req.getContext().form + \"/form/printTemplate/v1/getPrintList\", param).then(response => {\r\n if (response.data.rows && response.data.rows.length > 0) {\r\n this.$refs.flowPrint.handleOpen(); //父组件调用子组件方法\r\n } else {\r\n this_.printHtml();\r\n }\r\n });\r\n }\r\n });\r\n } else {\r\n let param = {\r\n pageBean: { page: 1, pageSize: 20, total: 0 },\r\n querys: [{ group: \"defaultQueryGroup\", operation: \"EQUAL\", relation: \"AND\", property: \"formKey\", value: this.formKey }]\r\n };\r\n req.post(req.getContext().form + \"/form/printTemplate/v1/getPrintList\", param).then(response => {\r\n if (response.data.rows && response.data.rows.length > 0) {\r\n this.$refs.flowPrint.handleOpen(); //父组件调用子组件方法\r\n } else {\r\n this_.printHtml();\r\n }\r\n });\r\n }\r\n },\r\n //未设置word套打模板,直接调用打印\r\n printHtml(data) {\r\n if (this.type != \"doneList\") {\r\n this.$refs.flowAction.hiddenOpertion();\r\n } else {\r\n this.$refs.doneAction.hiddenOpertion();\r\n }\r\n \r\n setTimeout(() => {\r\n document.getElementsByTagName('body')[0].style.zoom = 0.8;\r\n window.print();\r\n utils.reload();\r\n document.getElementsByTagName('body')[0].style.zoom = 1;\r\n }, 500);\r\n },\r\n previewWordTemplate(data) {\r\n if (!data) {\r\n this.$message({\r\n message: \"请选择打印模板\",\r\n type: \"warning\",\r\n });\r\n return false;\r\n }\r\n if (data && data.printType == \"form\") {\r\n this.$message({\r\n message: \"请选择word套打模板\",\r\n type: \"warning\",\r\n });\r\n return false;\r\n }\r\n Loading.service(\"表单打印中\");\r\n var url =\r\n \"${form}/form/printTemplate/v1/wordPrint?id=\" +\r\n data.id +\r\n \"&defId=\" +\r\n this.defId +\r\n \"&nodeId=\" +\r\n this.nodeId +\r\n \"&procInstId=\" +\r\n this.procInstId;\r\n req.get(url).then((res) => {\r\n let loadingInstance = Loading.service(\"表单打印中\");\r\n if (!res.data.state) {\r\n this.$message({\r\n message: res.data.message,\r\n type: \"warning\",\r\n });\r\n this.$nextTick(() => {\r\n // 以服务的方式调用的 Loading 需要异步关闭\r\n loadingInstance.close();\r\n });\r\n } else {\r\n let url =\r\n window.context.portal +\r\n \"/file/onlinePreviewController/v1/onlinePreview?fileId=\" +\r\n res.data.value;\r\n this.$http.get(url).then((resp) => {\r\n let data = resp.data;\r\n if (data.result == \"error\") {\r\n Message.error(\"附件不存在\");\r\n } else {\r\n req.get(window.context.portal + data.pdfUrl, 'arraybuffer').then(response => {\r\n let type = response.headers['content-type'];\r\n if (type) {\r\n this.previewWordPdfSrc = window.URL.createObjectURL(new Blob([response.data], { type: type }));\r\n } else {\r\n this.previewWordPdfSrc = window.URL.createObjectURL(new Blob([response.data]));\r\n }\r\n this.previewWordDialog = true;\r\n });\r\n Loading.service(\"表单打印中\").close();\r\n }\r\n });\r\n }\r\n });\r\n },\r\n printWordTemplate(data) {\r\n if (!data) {\r\n this.$message({\r\n message: \"请选择打印模板\",\r\n type: \"warning\",\r\n });\r\n return false;\r\n }\r\n if (data && data.printType == \"form\") {\r\n this.$message({\r\n message: \"请选择word套打模板\",\r\n type: \"warning\",\r\n });\r\n return false;\r\n }\r\n Loading.service(\"表单打印中\");\r\n var url =\r\n \"${form}/form/printTemplate/v1/wordPrint?id=\" +\r\n data.id +\r\n \"&defId=\" +\r\n this.defId +\r\n \"&nodeId=\" +\r\n this.nodeId +\r\n \"&procInstId=\" +\r\n this.procInstId;\r\n req.get(url).then((res) => {\r\n let loadingInstance = Loading.service(\"表单打印中\");\r\n if (!res.data.state) {\r\n this.$message({\r\n message: res.data.message,\r\n type: \"warning\",\r\n });\r\n this.$nextTick(() => {\r\n // 以服务的方式调用的 Loading 需要异步关闭\r\n loadingInstance.close();\r\n });\r\n } else {\r\n req\r\n .download(\r\n \"${portal}/system/file/v1/downloadFile?fileId=\" + res.data.value\r\n )\r\n .then((r) => {\r\n this.$nextTick(() => {\r\n // 以服务的方式调用的 Loading 需要异步关闭\r\n loadingInstance.close();\r\n });\r\n });\r\n }\r\n });\r\n },\r\n },\r\n created() {\r\n //不是待办进来\r\n if (!this.taskId && this.type != \"read\" && !this.myReadType) {\r\n //是否是查看实例页面\r\n this.isLook = true;\r\n }\r\n window.agentLeaderId = this.leaderId;\r\n let this_ = this;\r\n if (this.instId == undefined) {\r\n this.$store\r\n .dispatch(\"storeProcess/getNotice\", this.taskId)\r\n .then((tasks) => {\r\n this_.tasks = tasks;\r\n this_.procInstId = tasks.bpmTask.procInstId;\r\n this_.defId = tasks.bpmTask.procDefId;\r\n this_.bpmnInstId = tasks.bpmTask.bpmnInstId;\r\n this_.subject = tasks.bpmTask.subject;\r\n this_.status = tasks.bpmTask.status;\r\n this_.execId = tasks.bpmTask.execId;\r\n this_.instStatus = tasks.bpmTask.instStatus;\r\n this_.flowDefKey = tasks.bpmTask.procDefKey;\r\n if (tasks.curNodeDef && tasks.curNodeDef.nodeProperties) {\r\n this.nodeType = tasks.curNodeDef.type;\r\n this.nodeId = tasks.curNodeDef.nodeId;\r\n let nodeProperties =\r\n tasks.curNodeDef.nodeProperties[0] ||\r\n tasks.curNodeDef.localProperties;\r\n this.choiceExcutor = nodeProperties.choiceExcutor;\r\n this.jumpType = nodeProperties.jumpType;\r\n this.approvalArea = nodeProperties.approvalArea;\r\n this.referOpinion = nodeProperties.referOpinion;\r\n this.opinionField = nodeProperties.opinionField;\r\n this.signatureField = nodeProperties.signatureField?nodeProperties.signatureField:'';\r\n this.signatureCover = nodeProperties.signatureCover?nodeProperties.signatureCover:false;\r\n this.secretFree = nodeProperties.secretFree?nodeProperties.secretFree:false;\r\n this.appendOpinion = nodeProperties.appendOpinion;\r\n }\r\n //是否显示表单修改记录\r\n if (tasks.showModifyRecord) {\r\n this_.showModifyRecord = true;\r\n }\r\n //表单formKey\r\n this_.formKey = tasks.formKey;\r\n if (!this.bpmnInstId && this.status != \"COMMU\") {\r\n this.$store.dispatch(\"storeProcess/noticeTurnDode\", this.taskId); //知会任务待办转已办\r\n }\r\n });\r\n this.$store.dispatch(\"storeProcess/addReadRecord\", this.taskId); //添加阅读记录\r\n } else {\r\n \r\n //根据实例id获取实例对象\r\n this.$store\r\n .dispatch(\"storeProcess/getInstanceByInstId\", this.instId)\r\n .then((insts) => {\r\n this.approvalArea = \"processRecord\";\r\n this.defId = insts.procDefId;\r\n this.bpmnInstId = insts.bpmnInstId;\r\n this.subject = insts.subject;\r\n this.instStatus = insts.status;\r\n //是否显示表单修改记录\r\n if (insts.showModifyRecord) {\r\n this.showModifyRecord = true;\r\n }\r\n //表单formKey\r\n this.formKey = insts.bpmFormKey;\r\n\r\n //我的请求列表页面进来的\r\n if (this.type == \"request\") {\r\n //根据流程实例Id获取发起节点并判断是否允许发起人撤回\r\n let url =\r\n req.getContext().bpmRunTime +\r\n \"/runtime/instance/v1/getSponsorRevokeByInstId?instId=\" +\r\n this.instId;\r\n req.get(url).then((req) => {\r\n this.sponsorRevoke = req.data.value;\r\n });\r\n }\r\n });\r\n //知会任务待办转已办(待阅列表进来的)\r\n if (this.readId && !this.myReadType) {\r\n this.$store.dispatch(\"storeProcess/noticeTurnDode\", this.readId);\r\n }\r\n //获取知会任务待办详情\r\n if (this.readId) {\r\n this.$store\r\n .dispatch(\"storeProcess/getBpmTaskNoticeById\", this.readId)\r\n .then((row) => {\r\n if (row.taskId) {\r\n this.copyTaskId = row.taskId;\r\n } else if (row.nodeId) {\r\n this.selectNodeId = row.nodeId;\r\n }\r\n });\r\n }\r\n //获取知会任务已办详情\r\n if (this.readDoneId) {\r\n this.$store\r\n .dispatch(\"storeProcess/getBpmTaskNoticeDoneById\", this.readDoneId)\r\n .then((row) => {\r\n if (row.taskId) {\r\n this.copyTaskId = row.taskId;\r\n } else if (row.nodeId) {\r\n this.selectNodeId = row.taskKey;\r\n }\r\n });\r\n }\r\n }\r\n //获取当前用户ID\r\n this.promoterId = JSON.parse(sessionStorage.getItem(\"currentUser\")).userId;\r\n },\r\n};\r\n",null]}