【代码评审】Bpm:数据报表

pull/686/head
YunaiV 2025-01-26 13:35:07 +08:00
parent f35f62d2f8
commit 79a53412d6
2 changed files with 15 additions and 7 deletions

View File

@ -106,14 +106,16 @@ export function useFormFieldsPermission(defaultPermission: FieldPermissionType)
getNodeConfigFormFields
}
}
/**
* @description
* @description
*/
export function useFormFields() {
const formFields = inject<Ref<string[]>>('formFields', ref([])) // 流程表单字段
return parseFormCreateFields(unref(formFields))
}
// TODO @芋艿:后续需要把各种类似 useFormFieldsPermission 的逻辑,抽成一个通用方法。
/**
* @description
*/
@ -155,19 +157,19 @@ export type UserTaskFormType = {
taskCreateListenerEnable?: boolean
taskCreateListenerPath?: string
taskCreateListener?: {
header: HttpRequestParam[],
header: HttpRequestParam[]
body: HttpRequestParam[]
}
taskAssignListenerEnable?: boolean
taskAssignListenerPath?: string
taskAssignListener?: {
header: HttpRequestParam[],
header: HttpRequestParam[]
body: HttpRequestParam[]
}
taskCompleteListenerEnable?: boolean
taskCompleteListenerPath?: string
taskCompleteListener?:{
header: HttpRequestParam[],
taskCompleteListener?: {
header: HttpRequestParam[]
body: HttpRequestParam[]
}
signEnable: boolean

View File

@ -72,7 +72,7 @@
:label="item.title"
:prop="item.field"
>
<!-- TODO 目前只支持input类型的字符串搜索 -->
<!-- TODO @lesan目前只支持input类型的字符串搜索 -->
<el-input
:disabled="item.type !== 'input'"
v-model="queryParams.formFieldsParams[item.field]"
@ -120,11 +120,12 @@
:prop="item.field"
width="120"
>
<!-- TODO 可以根据formField的type进行展示方式的控制现在全部以字符串 -->
<!-- TODO @lesan可以根据formField的type进行展示方式的控制现在全部以字符串 -->
<template #default="scope">
{{ scope.row.formVariables[item.field] ?? '' }}
</template>
</el-table-column>
<!-- TODO @lesan可能要类似 manager 加个详情和取消 -->
</el-table>
<!-- 分页 -->
<Pagination
@ -180,11 +181,13 @@ const getList = async () => {
}
}
/** 获取流程定义 */
const getProcessDefinition = async () => {
const processDefinition = await DefinitionApi.getProcessDefinition(processDefinitionId)
formFields.value = parseFormCreateFields(processDefinition.formFields)
}
/** 解析表单字段 */
const parseFormCreateFields = (formFields?: string[]) => {
const result: Array<Record<string, any>> = []
if (formFields) {
@ -210,8 +213,11 @@ const resetQuery = () => {
/** 初始化 **/
onMounted(async () => {
// table column
await getProcessDefinition()
//
await getList()
//
userList.value = await UserApi.getSimpleUserList()
})
</script>