Merge branch 'feature/bpm' of https://gitee.com/yudaocode/yudao-ui-admin-vue3 into feature/bpm

pull/655/MERGE
YunaiV 2025-01-15 19:08:03 +08:00
commit f1ac8ba622
6 changed files with 15 additions and 29 deletions

View File

@ -1,4 +1,3 @@
import { cloneDeep } from 'lodash-es'
import { TaskStatusEnum } from '@/api/bpm/task'
import * as RoleApi from '@/api/system/role'
import * as DeptApi from '@/api/system/dept'
@ -47,9 +46,9 @@ export function useFormFieldsPermission(defaultPermission: FieldPermissionType)
// 字段权限配置. 需要有 field, title, permissioin 属性
const fieldsPermissionConfig = ref<Array<Record<string, any>>>([])
const formType = inject<Ref<number>>('formType') // 表单类型
const formType = inject<Ref<number|undefined>>('formType', ref()) // 表单类型
const formFields = inject<Ref<string[]>>('formFields') // 流程表单字段
const formFields = inject<Ref<string[]>>('formFields', ref([])) // 流程表单字段
const getNodeConfigFormFields = (nodeFormFields?: Array<Record<string, string>>) => {
nodeFormFields = toRaw(nodeFormFields)
@ -170,13 +169,13 @@ export type CopyTaskFormType = {
* @description
*/
export function useNodeForm(nodeType: NodeType) {
const roleOptions = inject<Ref<RoleApi.RoleVO[]>>('roleList') // 角色列表
const postOptions = inject<Ref<PostApi.PostVO[]>>('postList') // 岗位列表
const userOptions = inject<Ref<UserApi.UserVO[]>>('userList') // 用户列表
const deptOptions = inject<Ref<DeptApi.DeptVO[]>>('deptList') // 部门列表
const userGroupOptions = inject<Ref<UserGroupApi.UserGroupVO[]>>('userGroupList') // 用户组列表
const deptTreeOptions = inject('deptTree') // 部门树
const formFields = inject<Ref<string[]>>('formFields') // 流程表单字段
const roleOptions = inject<Ref<RoleApi.RoleVO[]>>('roleList', ref([])) // 角色列表
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 deptTreeOptions = inject('deptTree', ref()) // 部门树
const formFields = inject<Ref<string[]>>('formFields', ref([])) // 流程表单字段
const configForm = ref<UserTaskFormType | CopyTaskFormType>()
if (nodeType === NodeType.USER_TASK_NODE) {
configForm.value = {

View File

@ -77,7 +77,7 @@ const props = defineProps({
const currentNode = useWatchNode(props)
//
const readonly = inject<Boolean>('readonly')
const processInstance = inject<Ref<any>>('processInstance')
const processInstance = inject<Ref<any>>('processInstance', ref({}))
//
const dialogVisible = ref(false) //
const processInstanceInfos = ref<any[]>([]) //

View File

@ -13,7 +13,7 @@
><span class="iconfont icon-start-user"></span
></div>
<input
v-if="showInput"
v-if="!readonly && showInput"
type="text"
class="editable-title-input"
@blur="blurEvent()"
@ -117,7 +117,7 @@ const props = defineProps({
}
})
const readonly = inject<Boolean>('readonly') //
const tasks = inject<Ref<any[]>>('tasks')
const tasks = inject<Ref<any[]>>('tasks', ref([]))
//
const emits = defineEmits<{
'update:modelValue': [node: SimpleFlowNode | undefined]

View File

@ -131,7 +131,7 @@ const emits = defineEmits<{
//
const readonly = inject<Boolean>('readonly')
const tasks = inject<Ref<any[]>>('tasks')
const tasks = inject<Ref<any[]>>('tasks', ref([]))
//
const currentNode = useWatchNode(props)
//

View File

@ -4,7 +4,6 @@
:flow-node="simpleModel"
:tasks="tasks"
:process-instance="processInstance"
class="process-viewer"
/>
</div>
</template>
@ -20,7 +19,7 @@ const props = defineProps({
modelView: propTypes.object,
simpleJson: propTypes.string // Simple (json )
})
const simpleModel = ref()
const simpleModel = ref<any>({})
//
const tasks = ref([])
//
@ -161,15 +160,4 @@ const setSimpleModelNodeTaskStatus = (
</script>
<style lang="scss" scoped>
.process-viewer-container {
width: 100%;
height: 100%;
:deep(.process-viewer) {
width: 100%;
height: 100% !important;
min-height: 100%;
overflow: auto;
}
}
</style>

View File

@ -23,7 +23,7 @@ const props = defineProps<{
modelId?: string
modelKey?: string
modelName?: string
value?: string
value?: any
startUserIds?: number[]
}>()
@ -34,7 +34,6 @@ const currentValue = ref('')
//
const initOrUpdateValue = async () => {
console.log('initOrUpdateValue', props.value)
if (props.value) {
currentValue.value = props.value
//