From 2589fbe5601e5fa0c258eb667178189ab8a31720 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Thu, 18 Apr 2024 15:56:49 +0800 Subject: [PATCH] =?UTF-8?q?code=20review=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SimpleProcessDesigner/src/addNode.vue | 9 +-- .../src/drawer/approverDrawer.vue | 78 +++++++++++++------ .../src/drawer/copyerDrawer.vue | 2 +- .../SimpleProcessDesigner/src/nodeWrap.vue | 38 ++++----- src/directives/index.ts | 7 +- src/main.ts | 4 +- src/store/modules/{ => bpm}/simpleWorkflow.ts | 3 +- src/views/bpm/simpleWorkflow/index.vue | 23 +++--- 8 files changed, 91 insertions(+), 73 deletions(-) rename src/store/modules/{ => bpm}/simpleWorkflow.ts (92%) diff --git a/src/components/SimpleProcessDesigner/src/addNode.vue b/src/components/SimpleProcessDesigner/src/addNode.vue index b505f208..4d8053d9 100644 --- a/src/components/SimpleProcessDesigner/src/addNode.vue +++ b/src/components/SimpleProcessDesigner/src/addNode.vue @@ -71,18 +71,15 @@ let props = defineProps({ type:Boolean, default:true }, - defaultFieldsPermission : { - type: Array, - default: () => ([]) - } }) let emits = defineEmits(['update:childNodeP']) let visible = ref(false) +const defaultFieldsPermission = inject('defaultFieldsPermission') + const addType = (type: number) => { visible.value = false // 审核节点 if (type === NodeType.APPROVE_USER_NODE) { - console.log("props.defaultFieldsPermission", props.defaultFieldsPermission) const data = { name: '审核人', error: true, @@ -92,7 +89,7 @@ const addType = (type: number) => { approveMethod: undefined, candidateStrategy: undefined, candidateParam: undefined, - fieldsPermission: props.defaultFieldsPermission, + fieldsPermission: defaultFieldsPermission, }, childNode: props.childNodeP } diff --git a/src/components/SimpleProcessDesigner/src/drawer/approverDrawer.vue b/src/components/SimpleProcessDesigner/src/drawer/approverDrawer.vue index fae369d1..f6196daa 100644 --- a/src/components/SimpleProcessDesigner/src/drawer/approverDrawer.vue +++ b/src/components/SimpleProcessDesigner/src/drawer/approverDrawer.vue @@ -162,7 +162,7 @@ - +
@@ -175,30 +175,43 @@ 只读 隐藏
-
+
-
+
{{ item.title }} - +
- +
- +
- +
@@ -223,8 +236,8 @@ diff --git a/src/components/SimpleProcessDesigner/src/drawer/copyerDrawer.vue b/src/components/SimpleProcessDesigner/src/drawer/copyerDrawer.vue index d8bd01b6..4b074ab8 100644 --- a/src/components/SimpleProcessDesigner/src/drawer/copyerDrawer.vue +++ b/src/components/SimpleProcessDesigner/src/drawer/copyerDrawer.vue @@ -144,7 +144,7 @@