From 898fd9b3209eca6eec748eb3f0f4b7ebbc0aef4c Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 12 Oct 2021 10:37:38 +0800 Subject: [PATCH] workflowBranch --- hb_client/src/api/workflow.js | 8 + hb_client/src/router/index.js | 7 + .../src/views/workflow/configuration.vue | 19 +- hb_client/src/views/workflow/index.vue | 170 ++++++- hb_client/src/views/workflow/ticket.vue | 386 +++++++++------ hb_client/src/views/workflow/ticketHandle.vue | 462 ++++++++++++++++++ hb_client/src/views/workflow/transitions.vue | 27 +- 7 files changed, 920 insertions(+), 159 deletions(-) create mode 100644 hb_client/src/views/workflow/ticketHandle.vue diff --git a/hb_client/src/api/workflow.js b/hb_client/src/api/workflow.js index 0b11d69..9e69564 100644 --- a/hb_client/src/api/workflow.js +++ b/hb_client/src/api/workflow.js @@ -176,3 +176,11 @@ export function getTicketTransitions(id) { method: 'get' }) } + +//工单流转记录 +export function getTicketFlowlog(id) { + return request({ + url: `/wf/ticket/${id}/flowlogs/`, + method: 'get' + }) +} diff --git a/hb_client/src/router/index.js b/hb_client/src/router/index.js index 48d89d0..7befda0 100644 --- a/hb_client/src/router/index.js +++ b/hb_client/src/router/index.js @@ -305,6 +305,13 @@ export const asyncRoutes = [ meta: { title: '人员信息详情', icon: 'example', perms: ['workflow_manage'] }, hidden: true }, + { + path: 'ticketHandle', + name: 'ticketHandle', + component: () => import('@/views/workflow/ticketHandle'), + meta: { title: '工单处理', icon: 'example', perms: ['workflow_manage'] }, + hidden: true + }, ] }, { diff --git a/hb_client/src/views/workflow/configuration.vue b/hb_client/src/views/workflow/configuration.vue index 1e55695..aaee8bc 100644 --- a/hb_client/src/views/workflow/configuration.vue +++ b/hb_client/src/views/workflow/configuration.vue @@ -27,9 +27,20 @@ import TST from "@/views/workflow/transitions" }; }, created() { - - this.ID = this.$route.params.workflow; - + let id = sessionStorage.getItem('configurationId'); + if(this.$route.params.workflow){ + this.ID = this.$route.params.workflow; + if(id){ + sessionStorage.removeItem('configurationId'); + sessionStorage.setItem('configurationId',this.$route.params.workflow); + }else{ + sessionStorage.setItem('configurationId',this.$route.params.workflow); + } + }else{ + if(id){ + this.ID = id; + } + } }, methods: { handleClick(tab, event) { @@ -38,4 +49,4 @@ import TST from "@/views/workflow/transitions" } }; - \ No newline at end of file + diff --git a/hb_client/src/views/workflow/index.vue b/hb_client/src/views/workflow/index.vue index c92c762..40d6889 100644 --- a/hb_client/src/views/workflow/index.vue +++ b/hb_client/src/views/workflow/index.vue @@ -50,13 +50,13 @@ {{ !!(scope.row.view_permission_check)?'是':'否' }} - + @@ -87,6 +91,21 @@ @pagination="getList" /> +
+
+
工作流流程图
+ + +

工作流名称 :{{watchedName}}

+
+ +

创建时间 :{{watchedCreateTime}}

+
+
+ + +
+
@@ -139,12 +158,14 @@ + + diff --git a/hb_client/src/views/workflow/ticket.vue b/hb_client/src/views/workflow/ticket.vue index 77078da..dd781ae 100644 --- a/hb_client/src/views/workflow/ticket.vue +++ b/hb_client/src/views/workflow/ticket.vue @@ -62,7 +62,7 @@
@@ -106,8 +106,6 @@ @@ -152,7 +150,7 @@ @@ -195,9 +193,8 @@ @@ -212,13 +209,19 @@
工单流程图
+ + +

工单名称 :{{watchedName}}

+
+ +

创建时间 :{{watchedCreateTime}}

+
+
- - - +
@@ -307,7 +310,7 @@ - - + + diff --git a/hb_client/src/views/workflow/transitions.vue b/hb_client/src/views/workflow/transitions.vue index a11521a..341fa2b 100644 --- a/hb_client/src/views/workflow/transitions.vue +++ b/hb_client/src/views/workflow/transitions.vue @@ -97,10 +97,14 @@ - + - import {getWfStateList, getWfTransitionList, createWfTransition,updateWfTransition,deleteWfTransition } from "@/api/workflow"; import checkPermission from "@/utils/permission"; - +import vueJsonEditor from 'vue-json-editor' import { genTree } from "@/utils" const defaultwftransition = { name: "", }; export default { - components: { }, + components: { vueJsonEditor }, name: "TST", props: ["ID"], data() { @@ -211,13 +215,11 @@ export default { this.wftransition = Object.assign({}, scope.row); // copy obj this.dialogType = "edit"; this.dialogVisible = true; - this.$nextTick(() => { - this.$refs["Form"].clearValidate(); - }); + // this.wftransition.condition_expression = JSON.stringify(scope.row.condition_expression) + // this.$nextTick(() => { + // this.$refs["Form"].clearValidate(); + // }); }, - - - async confirm(form) { this.$refs[form].validate((valid) => { if (valid) { @@ -245,8 +247,6 @@ export default { } }); }, - - handleDelete(scope) { this.$confirm("确认删除?", "警告", { confirmButtonText: "确认", @@ -262,9 +262,6 @@ export default { console.error(err); }); }, - - - }, };