Skip to content

Commit 473d681

Browse files
YunaiVgitee-org
authored andcommitted
!683 代码审查修改
Merge pull request !683 from Lesan/feature/bpm-代码审查
2 parents 7db5ac8 + 092a8ac commit 473d681

File tree

6 files changed

+39
-30
lines changed

6 files changed

+39
-30
lines changed

src/components/SimpleProcessDesignerV2/src/consts.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -246,15 +246,15 @@ export type AssignEmptyHandler = {
246246
export type ListenerHandler = {
247247
enable: boolean
248248
path?: string
249-
header?: ListenerParam[]
250-
body?: ListenerParam[]
249+
header?: HttpRequestParam[]
250+
body?: HttpRequestParam[]
251251
}
252-
export type ListenerParam = {
252+
export type HttpRequestParam = {
253253
key: string
254254
type: number
255255
value: string
256256
}
257-
export enum ListenerParamTypeEnum {
257+
export enum BpmHttpRequestParamTypeEnum {
258258
/**
259259
* 固定值
260260
*/
@@ -264,7 +264,7 @@ export enum ListenerParamTypeEnum {
264264
*/
265265
FROM_FORM = 2
266266
}
267-
export const LISTENER_MAP_TYPES = [
267+
export const BPM_HTTP_REQUEST_PARAM_TYPES = [
268268
{
269269
value: 1,
270270
label: '固定值'
@@ -710,7 +710,7 @@ export type RouterSetting = {
710710
conditionGroups: ConditionGroup
711711
}
712712

713-
// ==================== 触发器相关定义 ====================
713+
// ==================== 触发器相关定义 ====================
714714
/**
715715
* 触发器节点结构定义
716716
*/
@@ -736,9 +736,9 @@ export type HttpRequestTriggerSetting = {
736736
// 请求 URL
737737
url: string
738738
// 请求头参数设置
739-
header?: ListenerParam[] // TODO 需要重命名一下
739+
header?: HttpRequestParam[]
740740
// 请求体参数设置
741-
body?: ListenerParam[]
741+
body?: HttpRequestParam[]
742742
}
743743

744744
export const TRIGGER_TYPES: DictDataVO[] = [

src/components/SimpleProcessDesignerV2/src/node.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
AssignStartUserHandlerType,
1515
AssignEmptyHandlerType,
1616
FieldPermissionType,
17-
ListenerParam
17+
HttpRequestParam
1818
} from './consts'
1919
import { parseFormFields } from '@/components/FormCreate/src/utils'
2020

@@ -139,20 +139,20 @@ export type UserTaskFormType = {
139139
taskCreateListenerEnable?: boolean
140140
taskCreateListenerPath?: string
141141
taskCreateListener?: {
142-
header: ListenerParam[],
143-
body: ListenerParam[]
142+
header: HttpRequestParam[],
143+
body: HttpRequestParam[]
144144
}
145145
taskAssignListenerEnable?: boolean
146146
taskAssignListenerPath?: string
147147
taskAssignListener?: {
148-
header: ListenerParam[],
149-
body: ListenerParam[]
148+
header: HttpRequestParam[],
149+
body: HttpRequestParam[]
150150
}
151151
taskCompleteListenerEnable?: boolean
152152
taskCompleteListenerPath?: string
153153
taskCompleteListener?:{
154-
header: ListenerParam[],
155-
body: ListenerParam[]
154+
header: HttpRequestParam[],
155+
body: HttpRequestParam[]
156156
}
157157
signEnable: boolean
158158
reasonRequire: boolean

src/components/SimpleProcessDesignerV2/src/nodes-config/components/HttpRequestParamSetting.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<div class="mr-2">
1717
<el-select class="w-100px!" v-model="item.type">
1818
<el-option
19-
v-for="types in LISTENER_MAP_TYPES"
19+
v-for="types in BPM_HTTP_REQUEST_PARAM_TYPES"
2020
:key="types.value"
2121
:label="types.label"
2222
:value="types.value"
@@ -33,7 +33,7 @@
3333
}"
3434
>
3535
<el-input
36-
v-if="item.type === ListenerParamTypeEnum.FIXED_VALUE"
36+
v-if="item.type === BpmHttpRequestParamTypeEnum.FIXED_VALUE"
3737
class="w-160px"
3838
v-model="item.value"
3939
/>
@@ -47,7 +47,7 @@
4747
}"
4848
>
4949
<el-select
50-
v-if="item.type === ListenerParamTypeEnum.FROM_FORM"
50+
v-if="item.type === BpmHttpRequestParamTypeEnum.FROM_FORM"
5151
class="w-160px!"
5252
v-model="item.value"
5353
>
@@ -86,7 +86,7 @@
8686
<div class="mr-2">
8787
<el-select class="w-100px!" v-model="item.type">
8888
<el-option
89-
v-for="types in LISTENER_MAP_TYPES"
89+
v-for="types in BPM_HTTP_REQUEST_PARAM_TYPES"
9090
:key="types.value"
9191
:label="types.label"
9292
:value="types.value"
@@ -103,7 +103,7 @@
103103
}"
104104
>
105105
<el-input
106-
v-if="item.type === ListenerParamTypeEnum.FIXED_VALUE"
106+
v-if="item.type === BpmHttpRequestParamTypeEnum.FIXED_VALUE"
107107
class="w-160px"
108108
v-model="item.value"
109109
/>
@@ -117,7 +117,7 @@
117117
}"
118118
>
119119
<el-select
120-
v-if="item.type === ListenerParamTypeEnum.FROM_FORM"
120+
v-if="item.type === BpmHttpRequestParamTypeEnum.FROM_FORM"
121121
class="w-160px!"
122122
v-model="item.value"
123123
>
@@ -141,20 +141,20 @@
141141
</el-form-item>
142142
</template>
143143
<script setup lang="ts">
144-
import { ListenerParam, LISTENER_MAP_TYPES, ListenerParamTypeEnum } from '../../consts'
144+
import { HttpRequestParam, BPM_HTTP_REQUEST_PARAM_TYPES, BpmHttpRequestParamTypeEnum } from '../../consts'
145145
import { useFormFields } from '../../node'
146146
defineOptions({
147147
name: 'HttpRequestParamSetting'
148148
})
149149
150150
const props = defineProps({
151151
header: {
152-
type: Array as () => ListenerParam[],
152+
type: Array as () => HttpRequestParam[],
153153
required: false,
154154
default: () => []
155155
},
156156
body: {
157-
type: Array as () => ListenerParam[],
157+
type: Array as () => HttpRequestParam[],
158158
required: false,
159159
default: () => []
160160
},

src/views/bpm/task/copy/index.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@
4646
<el-table v-loading="loading" :data="list">
4747
<!-- TODO 芋艿:增加摘要 -->
4848
<el-table-column align="center" label="流程名" prop="processInstanceName" min-width="180" />
49+
<el-table-column label="摘要" prop="summary" min-width="180">
50+
<template #default="scope">
51+
<div class="flex flex-col" v-if="scope.row.summary && scope.row.summary.length > 0">
52+
<div v-for="(item, index) in scope.row.summary" :key="index">
53+
<el-text type="info"> {{ item.key }} : {{ item.value }} </el-text>
54+
</div>
55+
</div>
56+
</template>
57+
</el-table-column>
4958
<el-table-column
5059
align="center"
5160
label="流程发起人"

src/views/bpm/task/done/index.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@
122122
<ContentWrap>
123123
<el-table v-loading="loading" :data="list">
124124
<el-table-column align="center" label="流程" prop="processInstance.name" width="180" />
125-
<el-table-column label="摘要" prop="summary" min-width="180">
125+
<el-table-column label="摘要" prop="processInstance.summary" min-width="180">
126126
<template #default="scope">
127-
<div class="flex flex-col" v-if="scope.row.summary && scope.row.summary.length > 0">
128-
<div v-for="(item, index) in scope.row.summary" :key="index">
127+
<div class="flex flex-col" v-if="scope.row.processInstance.summary && scope.row.processInstance.summary.length > 0">
128+
<div v-for="(item, index) in scope.row.processInstance.summary" :key="index">
129129
<el-text type="info"> {{ item.key }} : {{ item.value }} </el-text>
130130
</div>
131131
</div>

src/views/bpm/task/todo/index.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@
105105
<ContentWrap>
106106
<el-table v-loading="loading" :data="list">
107107
<el-table-column align="center" label="流程" prop="processInstance.name" width="180" />
108-
<el-table-column label="摘要" prop="summary" min-width="180">
108+
<el-table-column label="摘要" prop="processInstance.summary" min-width="180">
109109
<template #default="scope">
110-
<div class="flex flex-col" v-if="scope.row.summary && scope.row.summary.length > 0">
111-
<div v-for="(item, index) in scope.row.summary" :key="index">
110+
<div class="flex flex-col" v-if="scope.row.processInstance.summary && scope.row.processInstance.summary.length > 0">
111+
<div v-for="(item, index) in scope.row.processInstance.summary" :key="index">
112112
<el-text type="info"> {{ item.key }} : {{ item.value }} </el-text>
113113
</div>
114114
</div>

0 commit comments

Comments
 (0)