feat: bpmn设计器添加UserTask签名配置
							parent
							
								
									37964e740f
								
							
						
					
					
						commit
						69ccd83af3
					
				|  | @ -1438,6 +1438,20 @@ | |||
|           "isBody": true | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     { | ||||
|       "name": "SignEnable", | ||||
|       "superClass": ["Element"], | ||||
|       "meta": { | ||||
|         "allowedIn": ["bpmn:UserTask"] | ||||
|       }, | ||||
|       "properties": [ | ||||
|         { | ||||
|           "name": "value", | ||||
|           "type": "Boolean", | ||||
|           "isBody": true | ||||
|         } | ||||
|       ] | ||||
|     } | ||||
|   ], | ||||
|   "emumerations": [] | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| <template> | ||||
|   <div class="process-panel__container" :style="{ width: `${width}px` }"> | ||||
|   <div class="process-panel__container" :style="{ width: `${width}px`, maxHeight: '600px' }"> | ||||
|     <el-collapse v-model="activeTab" v-if="isReady"> | ||||
|       <el-collapse-item name="base"> | ||||
|         <!-- class="panel-tab__title" --> | ||||
|  |  | |||
|  | @ -5,6 +5,7 @@ | |||
|      4. 操作按钮 | ||||
|      5. 字段权限 | ||||
|      6. 审批类型 | ||||
|      7. 是否需要签名 | ||||
| --> | ||||
| <template> | ||||
|   <div> | ||||
|  | @ -161,6 +162,11 @@ | |||
|         </el-radio-group> | ||||
|       </div> | ||||
|     </div> | ||||
| 
 | ||||
|     <el-divider content-position="left">是否需要签名</el-divider> | ||||
|     <el-form-item prop="signEnable"> | ||||
|       <el-switch v-model="signEnable.value" active-text="是" inactive-text="否" /> | ||||
|     </el-form-item> | ||||
|   </div> | ||||
| </template> | ||||
| 
 | ||||
|  | @ -218,6 +224,9 @@ const { formType, fieldsPermissionConfig, getNodeConfigFormFields } = useFormFie | |||
| // 审批类型 | ||||
| const approveType = ref({ value: ApproveType.USER }) | ||||
| 
 | ||||
| // 是否需要签名 | ||||
| const signEnable = ref({ value: false }) | ||||
| 
 | ||||
| const elExtensionElements = ref() | ||||
| const otherExtensions = ref() | ||||
| const bpmnElement = ref() | ||||
|  | @ -325,6 +334,11 @@ const resetCustomConfigList = () => { | |||
|         ex.$type !== `${prefix}:ApproveType` | ||||
|     ) ?? [] | ||||
| 
 | ||||
|   // 是否需要签名 | ||||
|   signEnable.value = | ||||
|     elExtensionElements.value.values?.filter((ex) => ex.$type === `${prefix}:SignEnable`)?.[0] || | ||||
|     bpmnInstances().moddle.create(`${prefix}:SignEnable`, { value: false }) | ||||
| 
 | ||||
|   // 更新元素扩展属性,避免后续报错 | ||||
|   updateElementExtensions() | ||||
| } | ||||
|  | @ -373,7 +387,8 @@ const updateElementExtensions = () => { | |||
|       assignEmptyUserIdsEl.value, | ||||
|       approveType.value, | ||||
|       ...buttonsSettingEl.value, | ||||
|       ...fieldsPermissionEl.value | ||||
|       ...fieldsPermissionEl.value, | ||||
|       signEnable.value | ||||
|     ] | ||||
|   }) | ||||
|   bpmnInstances().modeling.updateProperties(toRaw(bpmnElement.value), { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Lesan
						Lesan