Skip to content

Commit 7db5ac8

Browse files
committed
【代码评审】Bpm:触发器
1 parent e3db7d3 commit 7db5ac8

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
import { SimpleFlowNode, NodeType, TriggerSetting, TRIGGER_TYPES, TriggerTypeEnum } from '../consts'
7171
import { useWatchNode, useDrawer, useNodeName } from '../node'
7272
import HttpRequestParamSetting from './components/HttpRequestParamSetting.vue'
73+
7374
defineOptions({
7475
name: 'TriggerNodeConfig'
7576
})
@@ -104,7 +105,7 @@ const configForm = ref<TriggerSetting>({
104105
}
105106
})
106107
107-
// 保存配置
108+
/** 保存配置 */
108109
const saveConfig = async () => {
109110
if (!formRef) return false
110111
const valid = await formRef.value.validate()
@@ -116,7 +117,7 @@ const saveConfig = async () => {
116117
settingVisible.value = false
117118
return true
118119
}
119-
// 获取节点展示内容
120+
/** 获取节点展示内容 */
120121
const getShowText = (): string => {
121122
let showText = ''
122123
if (configForm.value.type === TriggerTypeEnum.HTTP_REQUEST) {
@@ -125,7 +126,7 @@ const getShowText = (): string => {
125126
return showText
126127
}
127128
128-
// 显示触发器节点配置, 由父组件传过来
129+
/** 显示触发器节点配置, 由父组件传过来 */
129130
const showTriggerNodeConfig = (node: SimpleFlowNode) => {
130131
nodeName.value = node.name
131132
if (node.triggerSetting) {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,14 +166,14 @@ const props = defineProps({
166166
167167
const formFieldOptions = useFormFields()
168168
169-
const addHttpRequestParam = (arr) => {
169+
const addHttpRequestParam = (arr: ListenerParam[]) => {
170170
arr.push({
171171
key: '',
172-
type: 1,
172+
type: ListenerParamTypeEnum.FIXED_VALUE,
173173
value: ''
174174
})
175175
}
176-
const deleteHttpRequestParam = (arr, index) => {
176+
const deleteHttpRequestParam = (arr: ListenerParam[], index: number) => {
177177
arr.splice(index, 1)
178178
}
179179
</script>

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

Lines changed: 2 additions & 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,8 +42,8 @@
4242
</template>
4343

4444
<script setup lang="ts">
45-
// import { LISTENER_MAP_TYPES, ListenerParamTypeEnum } from '../../consts'
4645
import HttpRequestParamSetting from './HttpRequestParamSetting.vue'
46+
4747
const props = defineProps({
4848
modelValue: {
4949
type: Object,

0 commit comments

Comments
 (0)