diff --git a/server/resource/template/web/workflowForm.vue.tpl b/server/resource/template/web/workflowForm.vue.tpl index cde680ea..ae312026 100644 --- a/server/resource/template/web/workflowForm.vue.tpl +++ b/server/resource/template/web/workflowForm.vue.tpl @@ -31,6 +31,7 @@ 启动 提交 + 确认 返回 @@ -56,8 +57,12 @@ export default { type:Object, default:function(){return{}} }, + move:{ + type:Object, + default:function(){return{}} + }, workflowMoveID:{ - type:Number, + type:[Number,String], default:0 } }, @@ -91,6 +96,13 @@ export default { }; }, computed:{ + showSelfNode(){ + if(this.wf.assignType == "self" && this.move.promoterID == this.userInfo.ID){ + return true + }else{ + return false + } + }, canShow(){ if(this.wf.assignType == "user"){ if(this.wf.assignValue.indexOf(","+this.userInfo.ID+",")>-1 && this.wf.clazz == 'userTask'){ @@ -105,7 +117,6 @@ export default { return false } } - return false }, ...mapGetters("user", ["userInfo"]) }, diff --git a/server/service/sys_workflow.go b/server/service/sys_workflow.go index 38f039de..b588d2ee 100644 --- a/server/service/sys_workflow.go +++ b/server/service/sys_workflow.go @@ -406,7 +406,7 @@ func GetMyStated(userID uint) (err error, wfms []model.WorkflowMove) { func GetMyNeed(userID uint, AuthorityID string) (err error, wfms []model.WorkflowMove) { user := "%," + strconv.Itoa(int(userID)) + ",%" auth := "%," + AuthorityID + ",%" - err = global.GVA_DB.Preload("Promoter").Preload("Operator").Preload("WorkflowNode").Preload("WorkflowProcess").Joins("INNER JOIN workflow_nodes as node ON workflow_moves.workflow_node_id = node.id").Where("is_active = ? AND (node.assign_type = ? AND node.assign_value LIKE ? ) OR (node.assign_type = ? AND node.assign_value LIKE ? )", true, "user", user, "authority", auth).Find(&wfms).Error + err = global.GVA_DB.Preload("Promoter").Preload("Operator").Preload("WorkflowNode").Preload("WorkflowProcess").Joins("INNER JOIN workflow_nodes as node ON workflow_moves.workflow_node_id = node.id").Where("is_active = ? AND ((node.assign_type = ? AND node.assign_value LIKE ? ) OR (node.assign_type = ? AND node.assign_value LIKE ? ) OR (node.assign_type = ? AND promoter_id = ? ))", true, "user", user, "authority", auth, "self", userID).Find(&wfms).Error return err, wfms } diff --git a/web/src/components/gva-wfd/components/DetailPanel/UserTaskDetail.vue b/web/src/components/gva-wfd/components/DetailPanel/UserTaskDetail.vue index ee9c3db5..99cdfb87 100644 --- a/web/src/components/gva-wfd/components/DetailPanel/UserTaskDetail.vue +++ b/web/src/components/gva-wfd/components/DetailPanel/UserTaskDetail.vue @@ -4,7 +4,7 @@
-
选择角色:
+
选择审批人类别:
+
diff --git a/web/src/view/workflow/workflowCreate/workflowCreate.vue b/web/src/view/workflow/workflowCreate/workflowCreate.vue index d4357984..1d977e79 100644 --- a/web/src/view/workflow/workflowCreate/workflowCreate.vue +++ b/web/src/view/workflow/workflowCreate/workflowCreate.vue @@ -130,6 +130,17 @@ export default { }, saveImg() { console.log(this.$refs["wfd"].graph.saveImg()); + }, + fmtAuthority(authorityList,list){ + authorityList.map(item => { + list.push({ + id: item.authorityId, + name: item.authorityName + }); + if(item.children){ + this.fmtAuthority(item.children,list) + } + }); } }, async created() { @@ -140,14 +151,8 @@ export default { }); } const authorityRes = await getAuthorityList({ page: 1, pageSize: 9999999 }); - console.log(authorityRes) if (authorityRes.code == 0) { - authorityRes.data.list.map(item => { - this.authorities.push({ - id: item.authorityId, - name: item.authorityName - }); - }); + this.fmtAuthority(authorityRes.data.list,this.authorities) } if(this.$route.query.id){ const res = await findWorkflowProcess({ id: this.$route.query.id }); diff --git a/web/src/view/workflow/workflowUse/workflowUse.vue b/web/src/view/workflow/workflowUse/workflowUse.vue index 5e6846f7..862f9fc4 100644 --- a/web/src/view/workflow/workflowUse/workflowUse.vue +++ b/web/src/view/workflow/workflowUse/workflowUse.vue @@ -14,8 +14,9 @@
@@ -29,7 +30,8 @@ export default { done:false, business:null, node:null, - moves:[] + moves:[], + move:null } }, computed:{ @@ -74,6 +76,7 @@ export default { this.business = res.data.business this.workflow = res.data.move.workflowProcess this.node = res.data.move.workflowNode + this.move = res.data.move this.moves = res.data.moves this.createDone() }