Skip to content

Commit 69ccd83

Browse files
committed
feat: bpmn设计器添加UserTask签名配置
1 parent 37964e7 commit 69ccd83

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,6 +1438,20 @@
14381438
"isBody": true
14391439
}
14401440
]
1441+
},
1442+
{
1443+
"name": "SignEnable",
1444+
"superClass": ["Element"],
1445+
"meta": {
1446+
"allowedIn": ["bpmn:UserTask"]
1447+
},
1448+
"properties": [
1449+
{
1450+
"name": "value",
1451+
"type": "Boolean",
1452+
"isBody": true
1453+
}
1454+
]
14411455
}
14421456
],
14431457
"emumerations": []

src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="process-panel__container" :style="{ width: `${width}px` }">
2+
<div class="process-panel__container" :style="{ width: `${width}px`, maxHeight: '600px' }">
33
<el-collapse v-model="activeTab" v-if="isReady">
44
<el-collapse-item name="base">
55
<!-- class="panel-tab__title" -->

src/components/bpmnProcessDesigner/package/penal/custom-config/components/UserTaskCustomConfig.vue

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
4. 操作按钮
66
5. 字段权限
77
6. 审批类型
8+
7. 是否需要签名
89
-->
910
<template>
1011
<div>
@@ -161,6 +162,11 @@
161162
</el-radio-group>
162163
</div>
163164
</div>
165+
166+
<el-divider content-position="left">是否需要签名</el-divider>
167+
<el-form-item prop="signEnable">
168+
<el-switch v-model="signEnable.value" active-text="" inactive-text="" />
169+
</el-form-item>
164170
</div>
165171
</template>
166172

@@ -218,6 +224,9 @@ const { formType, fieldsPermissionConfig, getNodeConfigFormFields } = useFormFie
218224
// 审批类型
219225
const approveType = ref({ value: ApproveType.USER })
220226
227+
// 是否需要签名
228+
const signEnable = ref({ value: false })
229+
221230
const elExtensionElements = ref()
222231
const otherExtensions = ref()
223232
const bpmnElement = ref()
@@ -325,6 +334,11 @@ const resetCustomConfigList = () => {
325334
ex.$type !== `${prefix}:ApproveType`
326335
) ?? []
327336
337+
// 是否需要签名
338+
signEnable.value =
339+
elExtensionElements.value.values?.filter((ex) => ex.$type === `${prefix}:SignEnable`)?.[0] ||
340+
bpmnInstances().moddle.create(`${prefix}:SignEnable`, { value: false })
341+
328342
// 更新元素扩展属性,避免后续报错
329343
updateElementExtensions()
330344
}
@@ -373,7 +387,8 @@ const updateElementExtensions = () => {
373387
assignEmptyUserIdsEl.value,
374388
approveType.value,
375389
...buttonsSettingEl.value,
376-
...fieldsPermissionEl.value
390+
...fieldsPermissionEl.value,
391+
signEnable.value
377392
]
378393
})
379394
bpmnInstances().modeling.updateProperties(toRaw(bpmnElement.value), {

0 commit comments

Comments
 (0)