Skip to content

Commit 79a5341

Browse files
committed
【代码评审】Bpm:数据报表
1 parent f35f62d commit 79a5341

File tree

2 files changed

+15
-7
lines changed
  • src
    • components/SimpleProcessDesignerV2/src
    • views/bpm/processInstance/report

2 files changed

+15
-7
lines changed

src/components/SimpleProcessDesignerV2/src/node.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,16 @@ export function useFormFieldsPermission(defaultPermission: FieldPermissionType)
106106
getNodeConfigFormFields
107107
}
108108
}
109+
109110
/**
110-
* @description 获取流程表单的字段
111+
* @description 获取流程表单的字段
111112
*/
112113
export function useFormFields() {
113114
const formFields = inject<Ref<string[]>>('formFields', ref([])) // 流程表单字段
114115
return parseFormCreateFields(unref(formFields))
115116
}
116117

118+
// TODO @芋艿:后续需要把各种类似 useFormFieldsPermission 的逻辑,抽成一个通用方法。
117119
/**
118120
* @description 获取流程表单的字段和发起人字段
119121
*/
@@ -155,19 +157,19 @@ export type UserTaskFormType = {
155157
taskCreateListenerEnable?: boolean
156158
taskCreateListenerPath?: string
157159
taskCreateListener?: {
158-
header: HttpRequestParam[],
160+
header: HttpRequestParam[]
159161
body: HttpRequestParam[]
160162
}
161163
taskAssignListenerEnable?: boolean
162164
taskAssignListenerPath?: string
163165
taskAssignListener?: {
164-
header: HttpRequestParam[],
166+
header: HttpRequestParam[]
165167
body: HttpRequestParam[]
166168
}
167169
taskCompleteListenerEnable?: boolean
168170
taskCompleteListenerPath?: string
169-
taskCompleteListener?:{
170-
header: HttpRequestParam[],
171+
taskCompleteListener?: {
172+
header: HttpRequestParam[]
171173
body: HttpRequestParam[]
172174
}
173175
signEnable: boolean

src/views/bpm/processInstance/report/index.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
:label="item.title"
7373
:prop="item.field"
7474
>
75-
<!-- TODO 目前只支持input类型的字符串搜索 -->
75+
<!-- TODO @lesan:目前只支持input类型的字符串搜索 -->
7676
<el-input
7777
:disabled="item.type !== 'input'"
7878
v-model="queryParams.formFieldsParams[item.field]"
@@ -120,11 +120,12 @@
120120
:prop="item.field"
121121
width="120"
122122
>
123-
<!-- TODO 可以根据formField的type进行展示方式的控制,现在全部以字符串 -->
123+
<!-- TODO @lesan:可以根据formField的type进行展示方式的控制,现在全部以字符串 -->
124124
<template #default="scope">
125125
{{ scope.row.formVariables[item.field] ?? '' }}
126126
</template>
127127
</el-table-column>
128+
<!-- TODO @lesan:可能要类似 manager 那,加个详情和取消? -->
128129
</el-table>
129130
<!-- 分页 -->
130131
<Pagination
@@ -180,11 +181,13 @@ const getList = async () => {
180181
}
181182
}
182183
184+
/** 获取流程定义 */
183185
const getProcessDefinition = async () => {
184186
const processDefinition = await DefinitionApi.getProcessDefinition(processDefinitionId)
185187
formFields.value = parseFormCreateFields(processDefinition.formFields)
186188
}
187189
190+
/** 解析表单字段 */
188191
const parseFormCreateFields = (formFields?: string[]) => {
189192
const result: Array<Record<string, any>> = []
190193
if (formFields) {
@@ -210,8 +213,11 @@ const resetQuery = () => {
210213
211214
/** 初始化 **/
212215
onMounted(async () => {
216+
// 获取流程定义,用于 table column 的展示
213217
await getProcessDefinition()
218+
// 获取流程列表
214219
await getList()
220+
// 获取用户列表
215221
userList.value = await UserApi.getSimpleUserList()
216222
})
217223
</script>

0 commit comments

Comments
 (0)