Skip to content

Commit d295477

Browse files
committed
feat: 更改HttpRequestParam相关命名
1 parent e3db7d3 commit d295477

File tree

4 files changed

+25
-26
lines changed

4 files changed

+25
-26
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/components/SimpleProcessDesignerV2/src/nodes-config/components/UserTaskListener.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
>
3232
<el-input v-model="configForm[`task${listener.type}ListenerPath`]" />
3333
</el-form-item>
34-
<HttpRequestParamSetting
34+
<HttpRequestParamSetting
3535
:header="configForm[`task${listener.type}Listener`].header"
3636
:body="configForm[`task${listener.type}Listener`].body"
3737
:bind="`task${listener.type}Listener`"
@@ -42,7 +42,6 @@
4242
</template>
4343

4444
<script setup lang="ts">
45-
// import { LISTENER_MAP_TYPES, ListenerParamTypeEnum } from '../../consts'
4645
import HttpRequestParamSetting from './HttpRequestParamSetting.vue'
4746
const props = defineProps({
4847
modelValue: {

0 commit comments

Comments
 (0)