审批人拒绝时
-
-
-
+
+
+
-
+
-
+
{
timeUnit.value = convertTimeUnit(parseTimeUnit)
}
// 查找可以驳回的用户节点
- const matchNodeList = [];
- emits('find:returnTaskNodes', matchNodeList);
- returnTaskList.value = matchNodeList;
+ const matchNodeList = []
+ emits('find:returnTaskNodes', matchNodeList)
+ returnTaskList.value = matchNodeList
}
defineExpose({ open, setCurrentNode }) // 暴露方法给父组件
@@ -517,12 +529,30 @@ const blurEvent = () => {
currentNode.value.name =
currentNode.value.name || (NODE_DEFAULT_NAME.get(NodeType.USER_TASK_NODE) as string)
}
-const rejectHandlerTypeChange = () => {
- if (currentNode.value.attributes?.rejectHandler.type === RejectHandlerType.RETURN_PRE_USER_TASK) {
-
- console.log('nodeList is {}', returnTaskList.value);
+const approveMethodChanged = () => {
+ const approveMethod = currentNode.value.attributes?.approveMethod
+ if (approveMethod === ApproveMethodType.ANY_APPROVE_ALL_REJECT || approveMethod === ApproveMethodType.APPROVE_BY_RATIO) {
+ currentNode.value.attributes.rejectHandler.type =RejectHandlerType.FINISH_PROCESS_BY_REJECT_RATIO
+ } else {
+ currentNode.value.attributes.rejectHandler.type = RejectHandlerType.FINISH_PROCESS
}
}
+const rejectHandlerOptionDisabled = computed(() => {
+ return (val: number) => {
+ const approveMethod = currentNode.value.attributes?.approveMethod
+ if (val === RejectHandlerType.FINISH_PROCESS_BY_REJECT_RATIO && approveMethod !== ApproveMethodType.APPROVE_BY_RATIO
+ && approveMethod !== ApproveMethodType.ANY_APPROVE_ALL_REJECT) {
+ return true
+ }
+ if ( approveMethod === ApproveMethodType.ANY_APPROVE_ALL_REJECT &&
+ val === RejectHandlerType.FINISH_PROCESS
+ ) {
+ return true
+ }
+
+ return false
+ }
+})
// 默认 6小时
const timeDuration = ref(6)
const timeUnit = ref(TimeUnitType.HOUR)
@@ -540,6 +570,7 @@ const isoTimeDuration = computed(() => {
}
return strTimeDuration
})
+
// 超时开关改变
const timeoutHandlerChange = () => {
if (currentNode.value.attributes.timeoutHandler.enable) {
From cab9553235650f73ac878f08721535b946d3699f Mon Sep 17 00:00:00 2001
From: jason <2667446@qq.com>
Date: Thu, 13 Jun 2024 08:24:54 +0800
Subject: [PATCH 30/62] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?=
=?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1=E5=99=A8=20-=E4=BC=9A=E7=AD=BE?=
=?UTF-8?q?=E6=8C=89=E9=80=9A=E8=BF=87=E6=AF=94=E4=BE=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../SimpleProcessDesignerV2/src/consts.ts | 4 +-
.../src/nodes-config/UserTaskNodeConfig.vue | 43 +++++++++++++------
2 files changed, 33 insertions(+), 14 deletions(-)
diff --git a/src/components/SimpleProcessDesignerV2/src/consts.ts b/src/components/SimpleProcessDesignerV2/src/consts.ts
index a3638415..575bfa3f 100644
--- a/src/components/SimpleProcessDesignerV2/src/consts.ts
+++ b/src/components/SimpleProcessDesignerV2/src/consts.ts
@@ -108,7 +108,7 @@ export enum ApproveMethodType {
*/
ALL_APPROVE = 2,
/**
- * 多人会签(按比例投票)
+ * 多人会签(按通过比例)
*/
APPROVE_BY_RATIO = 3,
/**
@@ -218,7 +218,7 @@ NODE_DEFAULT_NAME.set(NodeType.CONDITION_NODE, '条件')
export const APPROVE_METHODS: DictDataVO [] = [
{ label: '单人审批', value: ApproveMethodType.SINGLE_PERSON_APPROVE },
{ label: '多人会签(需所有审批人同意)', value: ApproveMethodType.ALL_APPROVE },
- // { label: '多人会签(按比例投票)', value: ApproveMethodType.APPROVE_BY_RATIO },
+ { label: '多人会签(按通过比例%)', value: ApproveMethodType.APPROVE_BY_RATIO },
{ label: '多人会签(通过只需一人,拒绝需要全员)', value: ApproveMethodType.ANY_APPROVE_ALL_REJECT },
{ label: '多人或签(一名审批人通过即可)', value: ApproveMethodType.ANY_APPROVE },
{ label: '依次审批(按顺序依次审批)', value: ApproveMethodType.SEQUENTIAL_APPROVE }
diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
index 71fb5411..65af2755 100644
--- a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
+++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
@@ -149,7 +149,7 @@
@change="approveMethodChanged"
>
-
@@ -175,6 +183,7 @@
:label="item.label"
:disabled="rejectHandlerOptionDisabled(item.value)"
/>
+
@@ -512,6 +521,7 @@ const changedCandidateUsers = () => {
currentNode.value.attributes?.candidateStrategy === CandidateStrategy.USER
) {
currentNode.value.attributes.approveMethod = ApproveMethodType.SINGLE_PERSON_APPROVE
+ currentNode.value.attributes.rejectHandler.type = RejectHandlerType.FINISH_PROCESS
notAllowedMultiApprovers.value = true
} else {
notAllowedMultiApprovers.value = false
@@ -530,26 +540,35 @@ const blurEvent = () => {
currentNode.value.name || (NODE_DEFAULT_NAME.get(NodeType.USER_TASK_NODE) as string)
}
const approveMethodChanged = () => {
- const approveMethod = currentNode.value.attributes?.approveMethod
- if (approveMethod === ApproveMethodType.ANY_APPROVE_ALL_REJECT || approveMethod === ApproveMethodType.APPROVE_BY_RATIO) {
- currentNode.value.attributes.rejectHandler.type =RejectHandlerType.FINISH_PROCESS_BY_REJECT_RATIO
+ const approveMethod = currentNode.value.attributes?.approveMethod
+ if ( approveMethod === ApproveMethodType.ANY_APPROVE_ALL_REJECT || approveMethod === ApproveMethodType.APPROVE_BY_RATIO) {
+ currentNode.value.attributes.rejectHandler.type =
+ RejectHandlerType.FINISH_PROCESS_BY_REJECT_RATIO
} else {
currentNode.value.attributes.rejectHandler.type = RejectHandlerType.FINISH_PROCESS
}
+
+ if (approveMethod === ApproveMethodType.APPROVE_BY_RATIO) {
+ currentNode.value.attributes.approveRatio = 50;
+ }
}
const rejectHandlerOptionDisabled = computed(() => {
return (val: number) => {
- const approveMethod = currentNode.value.attributes?.approveMethod
- if (val === RejectHandlerType.FINISH_PROCESS_BY_REJECT_RATIO && approveMethod !== ApproveMethodType.APPROVE_BY_RATIO
- && approveMethod !== ApproveMethodType.ANY_APPROVE_ALL_REJECT) {
- return true
- }
- if ( approveMethod === ApproveMethodType.ANY_APPROVE_ALL_REJECT &&
- val === RejectHandlerType.FINISH_PROCESS
+ const approveMethod = currentNode.value.attributes?.approveMethod
+ if (
+ val === RejectHandlerType.FINISH_PROCESS_BY_REJECT_RATIO &&
+ approveMethod !== ApproveMethodType.APPROVE_BY_RATIO &&
+ approveMethod !== ApproveMethodType.ANY_APPROVE_ALL_REJECT
) {
return true
}
-
+ if (
+ approveMethod === ApproveMethodType.ANY_APPROVE_ALL_REJECT &&
+ val === RejectHandlerType.FINISH_PROCESS
+ ) {
+ return true
+ }
+
return false
}
})
From d5a7ae186517e1c50474d0d46524e90ff08310fd Mon Sep 17 00:00:00 2001
From: jason <2667446@qq.com>
Date: Fri, 14 Jun 2024 11:10:25 +0800
Subject: [PATCH 31/62] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?=
=?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1=E5=99=A8-=20=E7=AE=80=E5=8C=96?=
=?UTF-8?q?=E5=A4=9A=E4=BA=BA=E5=AE=A1=E6=89=B9=E6=96=B9=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/NodeHandler.vue | 2 +-
.../SimpleProcessDesignerV2/src/consts.ts | 30 +++++++------------
.../src/nodes-config/UserTaskNodeConfig.vue | 23 +++++++-------
3 files changed, 21 insertions(+), 34 deletions(-)
diff --git a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
index 5e1db576..e28ef7c9 100644
--- a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
+++ b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
@@ -75,7 +75,7 @@ const addNode = (type: number) => {
type: NodeType.USER_TASK_NODE,
// 审批节点配置
attributes: {
- approveMethod: ApproveMethodType.SINGLE_PERSON_APPROVE,
+ approveMethod: ApproveMethodType.RRANDOM_SELECT_ONE_APPROVE,
candidateStrategy: CandidateStrategy.USER,
candidateParam: undefined,
fieldsPermission: undefined,
diff --git a/src/components/SimpleProcessDesignerV2/src/consts.ts b/src/components/SimpleProcessDesignerV2/src/consts.ts
index 575bfa3f..784e3315 100644
--- a/src/components/SimpleProcessDesignerV2/src/consts.ts
+++ b/src/components/SimpleProcessDesignerV2/src/consts.ts
@@ -95,35 +95,27 @@ export enum ConditionConfigType {
*/
RULE = 2
}
-// 审批方式类型 ( 用于审批节点 )
+// 多人审批方式类型 ( 用于审批节点 )
export enum ApproveMethodType {
/**
- * 单人审批
+ * 随机挑选一人审批
*/
- SINGLE_PERSON_APPROVE = 1,
+ RRANDOM_SELECT_ONE_APPROVE = 1,
- /**
- * 多人会签(需所有审批人同意)
- */
- ALL_APPROVE = 2,
/**
* 多人会签(按通过比例)
*/
- APPROVE_BY_RATIO = 3,
+ APPROVE_BY_RATIO = 2,
+
/**
- * 多人会签(通过只需一人,拒绝需要全员)
+ * 多人或签(通过只需一人,拒绝只需一人)
*/
- ANY_APPROVE_ALL_REJECT = 4,
-
- /**
- * 多人或签(一名审批人通过即可)
- */
- ANY_APPROVE = 5,
+ ANY_APPROVE = 3,
/**
* 多人依次审批
*/
- SEQUENTIAL_APPROVE = 6
+ SEQUENTIAL_APPROVE = 4
}
@@ -216,11 +208,9 @@ NODE_DEFAULT_NAME.set(NodeType.COPY_TASK_NODE, '抄送人')
NODE_DEFAULT_NAME.set(NodeType.CONDITION_NODE, '条件')
export const APPROVE_METHODS: DictDataVO [] = [
- { label: '单人审批', value: ApproveMethodType.SINGLE_PERSON_APPROVE },
- { label: '多人会签(需所有审批人同意)', value: ApproveMethodType.ALL_APPROVE },
+ { label: '随机挑选一人审批', value: ApproveMethodType.RRANDOM_SELECT_ONE_APPROVE },
{ label: '多人会签(按通过比例%)', value: ApproveMethodType.APPROVE_BY_RATIO },
- { label: '多人会签(通过只需一人,拒绝需要全员)', value: ApproveMethodType.ANY_APPROVE_ALL_REJECT },
- { label: '多人或签(一名审批人通过即可)', value: ApproveMethodType.ANY_APPROVE },
+ { label: '多人或签(一人通过或拒绝)', value: ApproveMethodType.ANY_APPROVE },
{ label: '依次审批(按顺序依次审批)', value: ApproveMethodType.SEQUENTIAL_APPROVE }
]
diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
index 65af2755..4ee0d310 100644
--- a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
+++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
@@ -143,7 +143,7 @@
style="width: 100%"
/>
-
+
@@ -163,7 +163,7 @@
{
candidateParamArray.value = []
- currentNode.value.attributes.approveMethod = ApproveMethodType.SINGLE_PERSON_APPROVE
+ currentNode.value.attributes.approveMethod = ApproveMethodType.RRANDOM_SELECT_ONE_APPROVE
if (
currentNode.value.attributes.candidateStrategy === CandidateStrategy.START_USER ||
currentNode.value.attributes.candidateStrategy === CandidateStrategy.USER
@@ -520,7 +520,7 @@ const changedCandidateUsers = () => {
candidateParamArray.value?.length <= 1 &&
currentNode.value.attributes?.candidateStrategy === CandidateStrategy.USER
) {
- currentNode.value.attributes.approveMethod = ApproveMethodType.SINGLE_PERSON_APPROVE
+ currentNode.value.attributes.approveMethod = ApproveMethodType.RRANDOM_SELECT_ONE_APPROVE
currentNode.value.attributes.rejectHandler.type = RejectHandlerType.FINISH_PROCESS
notAllowedMultiApprovers.value = true
} else {
@@ -541,7 +541,7 @@ const blurEvent = () => {
}
const approveMethodChanged = () => {
const approveMethod = currentNode.value.attributes?.approveMethod
- if ( approveMethod === ApproveMethodType.ANY_APPROVE_ALL_REJECT || approveMethod === ApproveMethodType.APPROVE_BY_RATIO) {
+ if ( approveMethod === ApproveMethodType.APPROVE_BY_RATIO) {
currentNode.value.attributes.rejectHandler.type =
RejectHandlerType.FINISH_PROCESS_BY_REJECT_RATIO
} else {
@@ -549,7 +549,7 @@ const approveMethodChanged = () => {
}
if (approveMethod === ApproveMethodType.APPROVE_BY_RATIO) {
- currentNode.value.attributes.approveRatio = 50;
+ currentNode.value.attributes.approveRatio = 100;
}
}
const rejectHandlerOptionDisabled = computed(() => {
@@ -557,15 +557,12 @@ const rejectHandlerOptionDisabled = computed(() => {
const approveMethod = currentNode.value.attributes?.approveMethod
if (
val === RejectHandlerType.FINISH_PROCESS_BY_REJECT_RATIO &&
- approveMethod !== ApproveMethodType.APPROVE_BY_RATIO &&
- approveMethod !== ApproveMethodType.ANY_APPROVE_ALL_REJECT
+ approveMethod !== ApproveMethodType.APPROVE_BY_RATIO
) {
return true
}
- if (
- approveMethod === ApproveMethodType.ANY_APPROVE_ALL_REJECT &&
- val === RejectHandlerType.FINISH_PROCESS
- ) {
+ if ( approveMethod === ApproveMethodType.APPROVE_BY_RATIO
+ && val !== RejectHandlerType.FINISH_PROCESS_BY_REJECT_RATIO) {
return true
}
From 5ee0a7b946a39c9f69009aa52bbf3e0768101d98 Mon Sep 17 00:00:00 2001
From: jason <2667446@qq.com>
Date: Tue, 18 Jun 2024 00:06:52 +0800
Subject: [PATCH 32/62] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?=
=?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1=E5=99=A8-=20=E7=AE=80=E5=8C=96?=
=?UTF-8?q?=E5=AE=A1=E6=89=B9=E6=8B=92=E7=BB=9D=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/bpm/simple/index.ts | 4 +--
.../src/SimpleProcessDesigner.vue | 2 +-
.../SimpleProcessDesignerV2/src/consts.ts | 13 ++-------
.../src/nodes-config/UserTaskNodeConfig.vue | 28 ++-----------------
src/views/bpm/simpleWorkflow/index.vue | 1 -
src/views/bpm/simpleWorkflow/index1.vue | 12 +++-----
6 files changed, 11 insertions(+), 49 deletions(-)
diff --git a/src/api/bpm/simple/index.ts b/src/api/bpm/simple/index.ts
index 28808565..6e1e995a 100644
--- a/src/api/bpm/simple/index.ts
+++ b/src/api/bpm/simple/index.ts
@@ -8,8 +8,8 @@ export const updateBpmSimpleModel = async (data) => {
})
}
-export const getBpmSimpleModel = async (modelId) => {
+export const getBpmSimpleModel = async (id) => {
return await request.get({
- url: '/bpm/model/simple/get?modelId=' + modelId
+ url: '/bpm/model/simple/get?id=' + id
})
}
diff --git a/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue b/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue
index 8b7efff4..d3d0b44c 100644
--- a/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue
+++ b/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue
@@ -82,7 +82,7 @@ const saveSimpleFlowModel = async () => {
return;
}
const data = {
- modelId: props.modelId,
+ id: props.modelId,
simpleModel: processNodeTree.value
}
diff --git a/src/components/SimpleProcessDesignerV2/src/consts.ts b/src/components/SimpleProcessDesignerV2/src/consts.ts
index 784e3315..eb897d47 100644
--- a/src/components/SimpleProcessDesignerV2/src/consts.ts
+++ b/src/components/SimpleProcessDesignerV2/src/consts.ts
@@ -70,15 +70,7 @@ export enum RejectHandlerType {
/**
* 驳回到指定节点
*/
- RETURN_PRE_USER_TASK = 2,
- /**
- * 按拒绝人数比例终止流程
- */
- FINISH_PROCESS_BY_REJECT_RATIO = 3,
- /**
- * 结束任务
- */
- FINISH_TASK = 4
+ RETURN_USER_TASK = 2
}
@@ -233,8 +225,7 @@ export const TIMEOUT_HANDLER_ACTION_TYPES: DictDataVO [] = [
]
export const REJECT_HANDLER_TYPES: DictDataVO [] = [
{ label: '终止流程', value: RejectHandlerType.FINISH_PROCESS },
- { label: '驳回到指定节点', value: RejectHandlerType.RETURN_PRE_USER_TASK },
- { label: '按拒绝人数终止流程(用于会签)', value: RejectHandlerType.FINISH_PROCESS_BY_REJECT_RATIO }
+ { label: '驳回到指定节点', value: RejectHandlerType.RETURN_USER_TASK }
// { label: '结束任务', value: RejectHandlerType.FINISH_TASK }
]
diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
index 4ee0d310..7bb245eb 100644
--- a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
+++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
@@ -181,7 +181,6 @@
:key="item.value"
:value="item.value"
:label="item.label"
- :disabled="rejectHandlerOptionDisabled(item.value)"
/>
@@ -191,7 +190,7 @@
{
currentNode.value.name || (NODE_DEFAULT_NAME.get(NodeType.USER_TASK_NODE) as string)
}
const approveMethodChanged = () => {
+ currentNode.value.attributes.rejectHandler.type = RejectHandlerType.FINISH_PROCESS
const approveMethod = currentNode.value.attributes?.approveMethod
- if ( approveMethod === ApproveMethodType.APPROVE_BY_RATIO) {
- currentNode.value.attributes.rejectHandler.type =
- RejectHandlerType.FINISH_PROCESS_BY_REJECT_RATIO
- } else {
- currentNode.value.attributes.rejectHandler.type = RejectHandlerType.FINISH_PROCESS
- }
-
if (approveMethod === ApproveMethodType.APPROVE_BY_RATIO) {
currentNode.value.attributes.approveRatio = 100;
}
}
-const rejectHandlerOptionDisabled = computed(() => {
- return (val: number) => {
- const approveMethod = currentNode.value.attributes?.approveMethod
- if (
- val === RejectHandlerType.FINISH_PROCESS_BY_REJECT_RATIO &&
- approveMethod !== ApproveMethodType.APPROVE_BY_RATIO
- ) {
- return true
- }
- if ( approveMethod === ApproveMethodType.APPROVE_BY_RATIO
- && val !== RejectHandlerType.FINISH_PROCESS_BY_REJECT_RATIO) {
- return true
- }
-
- return false
- }
-})
// 默认 6小时
const timeDuration = ref(6)
const timeUnit = ref(TimeUnitType.HOUR)
diff --git a/src/views/bpm/simpleWorkflow/index.vue b/src/views/bpm/simpleWorkflow/index.vue
index 9d5d2144..dac9aa82 100644
--- a/src/views/bpm/simpleWorkflow/index.vue
+++ b/src/views/bpm/simpleWorkflow/index.vue
@@ -56,5 +56,4 @@ onMounted( async () => {
})
diff --git a/src/views/bpm/simpleWorkflow/index1.vue b/src/views/bpm/simpleWorkflow/index1.vue
index 04eb8d89..4d612ff0 100644
--- a/src/views/bpm/simpleWorkflow/index1.vue
+++ b/src/views/bpm/simpleWorkflow/index1.vue
@@ -53,18 +53,14 @@ const test = async () => {
message.error('缺少模型 modelId 编号')
return
}
- const test = nodeConfig.value
- console.log('test is ', test)
+
console.log('nodeConfig.value ', nodeConfig.value)
- const data1 = {
- modelId: modelId,
- simpleModelBody: toRaw(nodeConfig.value)
- }
+
const data = {
- modelId: modelId,
+ id: modelId,
simpleModelBody: nodeConfig.value
}
- console.log('request json data1 is ', data1)
+
const result = await updateBpmSimpleModel(data)
console.log('save the result is ', result)
if (result) {
From 58fc91b8107634ebcea1393431dd3ea0479ab224 Mon Sep 17 00:00:00 2001
From: jason <2667446@qq.com>
Date: Wed, 19 Jun 2024 20:39:16 +0800
Subject: [PATCH 33/62] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E8=AE=BE?=
=?UTF-8?q?=E8=AE=A1=E5=99=A8-=E5=AD=97=E6=AE=B5=E6=9D=83=E9=99=90?=
=?UTF-8?q?=E9=A1=BA=E5=BA=8F=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/nodes-config/UserTaskNodeConfig.vue | 26 +++++++++----------
.../SimpleProcessDesignerV2/src/utils.ts | 20 +++++++-------
2 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
index 7bb245eb..86ee6717 100644
--- a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
+++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
@@ -149,7 +149,11 @@
@change="approveMethodChanged"
>
-
@@ -177,21 +184,14 @@
@@ -282,8 +282,8 @@
@@ -542,7 +542,7 @@ const approveMethodChanged = () => {
currentNode.value.attributes.rejectHandler.type = RejectHandlerType.FINISH_PROCESS
const approveMethod = currentNode.value.attributes?.approveMethod
if (approveMethod === ApproveMethodType.APPROVE_BY_RATIO) {
- currentNode.value.attributes.approveRatio = 100;
+ currentNode.value.attributes.approveRatio = 100
}
}
// 默认 6小时
diff --git a/src/components/SimpleProcessDesignerV2/src/utils.ts b/src/components/SimpleProcessDesignerV2/src/utils.ts
index 8cc2fb19..55bb1ab4 100644
--- a/src/components/SimpleProcessDesignerV2/src/utils.ts
+++ b/src/components/SimpleProcessDesignerV2/src/utils.ts
@@ -1,23 +1,23 @@
// 获取条件节点默认的名称
-export const getDefaultConditionNodeName = (index:number, defaultFlow: boolean) : string => {
- if ( defaultFlow ){
- return "其它情况"
+export const getDefaultConditionNodeName = (index: number, defaultFlow: boolean): string => {
+ if (defaultFlow) {
+ return '其它情况'
}
- return '条件' + (index+1)
+ return '条件' + (index + 1)
}
-// 获得默认的表单字段权限.
-export const getDefaultFieldsPermission = (formFields: string[] | undefined) =>{
- const defaultFieldsPermission : any[] = [];
- if(formFields){
+// 获得默认的表单字段权限.
+export const getDefaultFieldsPermission = (formFields: string[] | undefined) => {
+ const defaultFieldsPermission: any[] = []
+ if (formFields) {
formFields.forEach((fieldStr: string) => {
const { field, title } = JSON.parse(fieldStr)
defaultFieldsPermission.push({
field,
title,
- permission: '2' // 只读
+ permission: '1' // 只读
})
})
}
- return defaultFieldsPermission;
+ return defaultFieldsPermission
}
From ea1e51a6558cbbe6743d41222369e9c07093c08c Mon Sep 17 00:00:00 2001
From: jason <2667446@qq.com>
Date: Wed, 19 Jun 2024 23:54:46 +0800
Subject: [PATCH 34/62] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E8=AE=BE?=
=?UTF-8?q?=E8=AE=A1=E5=99=A8-=20=E5=AE=A1=E6=89=B9=E8=8A=82=E7=82=B9?=
=?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=BB=93=E6=9E=84=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/NodeHandler.vue | 71 +++++----
.../SimpleProcessDesignerV2/src/consts.ts | 137 +++++++++++-------
.../src/nodes-config/UserTaskNodeConfig.vue | 117 +++++++--------
3 files changed, 181 insertions(+), 144 deletions(-)
diff --git a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
index e28ef7c9..26aed76c 100644
--- a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
+++ b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
@@ -42,7 +42,14 @@
+
diff --git a/src/components/SimpleProcessDesignerV2/theme/simple-process-designer.scss b/src/components/SimpleProcessDesignerV2/theme/simple-process-designer.scss
index 3d633b6d..ecf4250a 100644
--- a/src/components/SimpleProcessDesignerV2/theme/simple-process-designer.scss
+++ b/src/components/SimpleProcessDesignerV2/theme/simple-process-designer.scss
@@ -241,7 +241,7 @@
.move-node-left {
left: -2px;
top: 0px;
- background: rgba(126, 134, 142, .08);
+ background: rgba(126, 134, 142, 0.08);
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
}
@@ -249,13 +249,12 @@
.move-node-right {
right: -2px;
top: 0px;
- background: rgba(126,134,142,.08);
+ background: rgba(126, 134, 142, 0.08);
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
}
}
-
.node-config-error {
border-color: #ff5219 !important;
}
@@ -306,12 +305,10 @@
background-color: #0089ff;
border-radius: 50%;
- &:hover{
+ &:hover {
transform: scale(1.1);
-
}
}
-
}
.node-handler-arrow {
@@ -323,7 +320,6 @@
}
}
-
// 条件节点包装
.branch-node-wrapper {
position: relative;
@@ -341,8 +337,8 @@
position: absolute;
height: 100%;
width: 4px;
- background-color: #fafafa;
- content: "";
+ background-color: #fafafa;
+ content: '';
left: 50%;
transform: translate(-50%);
}
@@ -498,10 +494,10 @@
border-radius: 4px;
transition: all 0.3s;
- &:focus {
+ &:focus {
border-color: #40a9ff;
outline: 0;
- box-shadow: 0 0 0 2px rgba(24, 144, 255, .2)
+ box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
}
}
@@ -537,11 +533,11 @@
border: 1px solid #d9d9d9;
border-radius: 4px;
transition: all 0.3s;
-
- &:focus {
+
+ &:focus {
border-color: #40a9ff;
outline: 0;
- box-shadow: 0 0 0 2px rgba(24, 144, 255, .2)
+ box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
}
}
@@ -550,7 +546,6 @@
.field-setting-pane {
display: flex;
flex-direction: column;
- padding: 16px 0;
font-size: 14px;
.field-setting-desc {
@@ -569,7 +564,7 @@
line-height: 45px;
background-color: #f8fafc0a;
border: 1px solid #1f38581a;
-
+
.first-title {
text-align: left !important;
}
@@ -588,9 +583,8 @@
color: #000;
text-align: center;
}
-
}
-
+
.field-setting-item {
align-items: center;
display: flex;
@@ -632,56 +626,56 @@
margin-right: 8px;
}
- .handler-item-icon {
- width: 80px;
- height: 80px;
- background: #fff;
- border: 1px solid #e2e2e2;
- border-radius: 50%;
- transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
- user-select: none;
- text-align: center;
+ .handler-item-icon {
+ width: 80px;
+ height: 80px;
+ background: #fff;
+ border: 1px solid #e2e2e2;
+ border-radius: 50%;
+ transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
+ user-select: none;
+ text-align: center;
- &:hover {
- background: #e2e2e2;
- box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
- }
+ &:hover {
+ background: #e2e2e2;
+ box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
+ }
- .icon-size {
- font-size: 35px;
- line-height: 80px;
- }
+ .icon-size {
+ font-size: 35px;
+ line-height: 80px;
+ }
}
- .approve {
- color: #ff943e;
+ .approve {
+ color: #ff943e;
}
.copy {
color: #3296fa;
}
-
+
.condition {
color: #15bc83;
}
- .handler-item-text {
- margin-top: 4px;
- width: 80px;
- text-align: center;
- }
-
+ .handler-item-text {
+ margin-top: 4px;
+ width: 80px;
+ text-align: center;
+ }
}
// iconfont 样式
@font-face {
- font-family: "iconfont"; /* Project id 4495938 */
- src: url('iconfont.woff2?t=1712392083512') format('woff2'),
- url('iconfont.woff?t=1712392083512') format('woff'),
- url('iconfont.ttf?t=1712392083512') format('truetype');
+ font-family: 'iconfont'; /* Project id 4495938 */
+ src:
+ url('iconfont.woff2?t=1712392083512') format('woff2'),
+ url('iconfont.woff?t=1712392083512') format('woff'),
+ url('iconfont.ttf?t=1712392083512') format('truetype');
}
.iconfont {
- font-family: "iconfont" !important;
+ font-family: 'iconfont' !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
@@ -689,25 +683,25 @@
}
.icon-Inclusive:before {
- content: "\e602";
+ content: '\e602';
}
.icon-copy:before {
- content: "\e7eb";
+ content: '\e7eb';
}
.icon-handle:before {
- content: "\e61c";
+ content: '\e61c';
}
.icon-exclusive:before {
- content: "\e717";
+ content: '\e717';
}
.icon-approve:before {
- content: "\e715";
+ content: '\e715';
}
.icon-parallel:before {
- content: "\e688";
-}
\ No newline at end of file
+ content: '\e688';
+}
diff --git a/src/views/bpm/processInstance/detail/index.vue b/src/views/bpm/processInstance/detail/index.vue
index 94475647..0a9f96a3 100644
--- a/src/views/bpm/processInstance/detail/index.vue
+++ b/src/views/bpm/processInstance/detail/index.vue
@@ -56,29 +56,71 @@
-
+
- 通过
+ {{
+ item.buttonsSetting?.[OpsButtonType.APPROVE]?.displayName ||
+ OPERATION_BUTTON_NAME.get(OpsButtonType.APPROVE)
+ }}
-
+
- 不通过
+ {{
+ item.buttonsSetting?.[OpsButtonType.REJECT].displayName ||
+ OPERATION_BUTTON_NAME.get(OpsButtonType.REJECT)
+ }}
-
+
- 转办
+ {{
+ item.buttonsSetting?.[OpsButtonType.TRANSFER]?.displayName ||
+ OPERATION_BUTTON_NAME.get(OpsButtonType.TRANSFER)
+ }}
-
+
- 委派
+ {{
+ item.buttonsSetting?.[OpsButtonType.DELEGATE]?.displayName ||
+ OPERATION_BUTTON_NAME.get(OpsButtonType.DELEGATE)
+ }}
-
+
- 加签
+ {{
+ item.buttonsSetting?.[OpsButtonType.ADD_SIGN]?.displayName ||
+ OPERATION_BUTTON_NAME.get(OpsButtonType.ADD_SIGN)
+ }}
-
+
- 回退
+ {{
+ item.buttonsSetting?.[OpsButtonType.RETURN]?.displayName ||
+ OPERATION_BUTTON_NAME.get(OpsButtonType.RETURN)
+ }}
@@ -147,6 +189,10 @@ import TaskSignCreateForm from './dialog/TaskSignCreateForm.vue'
import { registerComponent } from '@/utils/routerHelper'
import { isEmpty } from '@/utils/is'
import * as UserApi from '@/api/system/user'
+import {
+ OpsButtonType,
+ OPERATION_BUTTON_NAME
+} from '@/components/SimpleProcessDesignerV2/src/consts'
defineOptions({ name: 'BpmProcessInstanceDetail' })
@@ -280,12 +326,16 @@ const getProcessInstance = async () => {
// 设置表单信息
const processDefinition = data.processDefinition
if (processDefinition.formType === 10) {
- setConfAndFields2(
- detailForm,
- processDefinition.formConf,
- processDefinition.formFields,
- data.formVariables
- )
+ if (detailForm.value.rule.length > 0) {
+ detailForm.value.value = data.formVariables
+ } else {
+ setConfAndFields2(
+ detailForm,
+ processDefinition.formConf,
+ processDefinition.formFields,
+ data.formVariables
+ )
+ }
nextTick().then(() => {
fApi.value?.btn.show(false)
fApi.value?.resetBtn.show(false)
From 2c11228f55bacf43f9a9269b898cc40be9558205 Mon Sep 17 00:00:00 2001
From: jason <2667446@qq.com>
Date: Sat, 20 Jul 2024 14:50:05 +0800
Subject: [PATCH 38/62] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81?=
=?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1-=20=20bug=20=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/NodeHandler.vue | 8 +-
.../src/ProcessNodeTree.vue | 28 ++-
.../src/SimpleProcessDesigner.vue | 58 +++---
.../src/nodes-config/CopyTaskNodeConfig.vue | 42 +++--
.../src/nodes-config/UserTaskNodeConfig.vue | 48 +++--
.../src/nodes/CopyTaskNode.vue | 48 ++---
.../src/nodes/ExclusiveNode.vue | 86 +++++----
.../src/nodes/ParallelNode.vue | 66 ++++---
.../src/nodes/UserTaskNode.vue | 45 ++---
src/views/bpm/simpleWorkflow/index1.vue | 165 ------------------
10 files changed, 215 insertions(+), 379 deletions(-)
delete mode 100644 src/views/bpm/simpleWorkflow/index1.vue
diff --git a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
index 3e56e793..b5ba51bf 100644
--- a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
+++ b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
@@ -47,8 +47,7 @@ import {
NodeType,
NODE_DEFAULT_NAME,
ApproveMethodType,
- RejectHandlerType,
- CandidateStrategy
+ RejectHandlerType
} from './consts'
import { generateUUID } from '@/utils'
defineOptions({
@@ -80,7 +79,6 @@ const addNode = (type: number) => {
showText: '',
type: NodeType.USER_TASK_NODE,
approveMethod: ApproveMethodType.RRANDOM_SELECT_ONE_APPROVE,
- candidateStrategy: CandidateStrategy.USER,
// 超时处理
rejectHandler: {
type: RejectHandlerType.FINISH_PROCESS
@@ -88,7 +86,6 @@ const addNode = (type: number) => {
timeoutHandler: {
enable: false
},
-
childNode: props.childNode
}
emits('update:childNode', data)
@@ -99,9 +96,6 @@ const addNode = (type: number) => {
name: NODE_DEFAULT_NAME.get(NodeType.COPY_TASK_NODE) as string,
showText: '',
type: NodeType.COPY_TASK_NODE,
- candidateStrategy: CandidateStrategy.USER,
- candidateParam: undefined,
- fieldsPermission: undefined,
childNode: props.childNode
}
emits('update:childNode', data)
diff --git a/src/components/SimpleProcessDesignerV2/src/ProcessNodeTree.vue b/src/components/SimpleProcessDesignerV2/src/ProcessNodeTree.vue
index c7589089..d11e67cc 100644
--- a/src/components/SimpleProcessDesignerV2/src/ProcessNodeTree.vue
+++ b/src/components/SimpleProcessDesignerV2/src/ProcessNodeTree.vue
@@ -3,20 +3,19 @@
-
-
+
@@ -65,11 +64,14 @@ const props = defineProps({
}
})
const emits = defineEmits<{
- 'update:flowNode',
- 'find:recursiveFindParentNode': [nodeList: SimpleFlowNode[], curentNode: SimpleFlowNode, nodeType: number]
+ 'update:flowNode': [node: SimpleFlowNode | undefined]
+ 'find:recursiveFindParentNode': [
+ nodeList: SimpleFlowNode[],
+ curentNode: SimpleFlowNode,
+ nodeType: number
+ ]
}>()
-
const currentNode = ref(props.flowNode)
// 重要:监控节点变化. 重新绘制节点
@@ -79,16 +81,12 @@ watch(
currentNode.value = newValue
}
)
-
+// 用于删除节点
const handleModelValueUpdate = (updateValue) => {
- console.log('Process Node Tree handleModelValueUpdate', updateValue)
emits('update:flowNode', updateValue)
}
-const findFromParentNode = (
- nodeList: SimpleFlowNode[],
- nodeType: number
-) => {
+const findFromParentNode = (nodeList: SimpleFlowNode[], nodeType: number) => {
emits('find:recursiveFindParentNode', nodeList, props.parentNode, nodeType)
}
diff --git a/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue b/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue
index d3d0b44c..b26c2fea 100644
--- a/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue
+++ b/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue
@@ -15,25 +15,29 @@