Merge branch 'feature/bpm' of https://gitee.com/yudaocode/yudao-ui-admin-vue3 into feature/bpm
This commit is contained in:
@@ -16,7 +16,8 @@ import {
|
||||
FieldPermissionType,
|
||||
ListenerParam
|
||||
} from './consts'
|
||||
import { parseFormFields } from '@/components/FormCreate/src/utils/index'
|
||||
import { parseFormFields } from '@/components/FormCreate/src/utils'
|
||||
|
||||
export function useWatchNode(props: { flowNode: SimpleFlowNode }): Ref<SimpleFlowNode> {
|
||||
const node = ref<SimpleFlowNode>(props.flowNode)
|
||||
watch(
|
||||
@@ -46,7 +47,7 @@ export function useFormFieldsPermission(defaultPermission: FieldPermissionType)
|
||||
// 字段权限配置. 需要有 field, title, permissioin 属性
|
||||
const fieldsPermissionConfig = ref<Array<Record<string, any>>>([])
|
||||
|
||||
const formType = inject<Ref<number|undefined>>('formType', ref()) // 表单类型
|
||||
const formType = inject<Ref<number | undefined>>('formType', ref()) // 表单类型
|
||||
|
||||
const formFields = inject<Ref<string[]>>('formFields', ref([])) // 流程表单字段
|
||||
|
||||
@@ -108,7 +109,7 @@ export function useFormFieldsPermission(defaultPermission: FieldPermissionType)
|
||||
* @description 获取表单的字段
|
||||
*/
|
||||
export function useFormFields() {
|
||||
const formFields = inject<Ref<string[]>>('formFields',ref([])) // 流程表单字段
|
||||
const formFields = inject<Ref<string[]>>('formFields', ref([])) // 流程表单字段
|
||||
return parseFormCreateFields(unref(formFields))
|
||||
}
|
||||
|
||||
@@ -178,7 +179,7 @@ export function useNodeForm(nodeType: NodeType) {
|
||||
const postOptions = inject<Ref<PostApi.PostVO[]>>('postList', ref([])) // 岗位列表
|
||||
const userOptions = inject<Ref<UserApi.UserVO[]>>('userList', ref([])) // 用户列表
|
||||
const deptOptions = inject<Ref<DeptApi.DeptVO[]>>('deptList', ref([])) // 部门列表
|
||||
const userGroupOptions = inject<Ref<UserGroupApi.UserGroupVO[]>>('userGroupList',ref([])) // 用户组列表
|
||||
const userGroupOptions = inject<Ref<UserGroupApi.UserGroupVO[]>>('userGroupList', ref([])) // 用户组列表
|
||||
const deptTreeOptions = inject('deptTree', ref()) // 部门树
|
||||
const formFields = inject<Ref<string[]>>('formFields', ref([])) // 流程表单字段
|
||||
const configForm = ref<UserTaskFormType | CopyTaskFormType>()
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
]"
|
||||
>
|
||||
<div class="node-title-container">
|
||||
<!-- TODO @芋艿 需要更换图标 -->
|
||||
<div class="node-title-icon delay-node"><span class="iconfont icon-delay"></span></div>
|
||||
<input
|
||||
v-if="!readonly && showInput"
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<template>
|
||||
<div class="panel-tab__content">
|
||||
<el-radio-group v-model="approveMethod" @change="onApproveMethodChange">
|
||||
<el-radio-group
|
||||
v-if="type === 'UserTask'"
|
||||
v-model="approveMethod"
|
||||
@change="onApproveMethodChange"
|
||||
>
|
||||
<div class="flex-col">
|
||||
<div v-for="(item, index) in APPROVE_METHODS" :key="index">
|
||||
<el-radio :value="item.value" :label="item.value">
|
||||
@@ -23,6 +27,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-radio-group>
|
||||
<div v-else>
|
||||
除了UserTask以外节点的多实例待实现
|
||||
</div>
|
||||
<!-- 与Simple设计器配置合并,保留以前的代码 -->
|
||||
<el-form label-width="90px" style="display: none">
|
||||
<el-form-item label="快捷配置">
|
||||
@@ -301,19 +308,21 @@ const approveMethod = ref()
|
||||
const approveRatio = ref(100)
|
||||
const otherExtensions = ref()
|
||||
const getElementLoopNew = () => {
|
||||
const extensionElements =
|
||||
bpmnElement.value.businessObject?.extensionElements ??
|
||||
bpmnInstances().moddle.create('bpmn:ExtensionElements', { values: [] })
|
||||
approveMethod.value = extensionElements.values.filter(
|
||||
(ex) => ex.$type === `${prefix}:ApproveMethod`
|
||||
)?.[0]?.value
|
||||
if (props.type === 'UserTask') {
|
||||
const extensionElements =
|
||||
bpmnElement.value.businessObject?.extensionElements ??
|
||||
bpmnInstances().moddle.create('bpmn:ExtensionElements', { values: [] })
|
||||
approveMethod.value = extensionElements.values.filter(
|
||||
(ex) => ex.$type === `${prefix}:ApproveMethod`
|
||||
)?.[0]?.value
|
||||
|
||||
otherExtensions.value =
|
||||
extensionElements.values.filter((ex) => ex.$type !== `${prefix}:ApproveMethod`) ?? []
|
||||
otherExtensions.value =
|
||||
extensionElements.values.filter((ex) => ex.$type !== `${prefix}:ApproveMethod`) ?? []
|
||||
|
||||
if (!approveMethod.value) {
|
||||
approveMethod.value = ApproveMethodType.SEQUENTIAL_APPROVE
|
||||
updateLoopCharacteristics()
|
||||
if (!approveMethod.value) {
|
||||
approveMethod.value = ApproveMethodType.SEQUENTIAL_APPROVE
|
||||
updateLoopCharacteristics()
|
||||
}
|
||||
}
|
||||
}
|
||||
const onApproveMethodChange = () => {
|
||||
|
||||
Reference in New Issue
Block a user