Skip to content

Commit 4feae4e

Browse files
fix: Tool workflow form
1 parent 99d7a20 commit 4feae4e

File tree

3 files changed

+31
-5
lines changed

3 files changed

+31
-5
lines changed

ui/src/views/tool/WorkflowFormDialog.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,20 @@
8080
</el-button>
8181
</span>
8282
</template>
83-
<EditAvatarDialog ref="EditAvatarDialogRef" @refresh="refreshTool" iconType="WORKFLOW"/>
83+
<EditAvatarDialog ref="EditAvatarDialogRef" @refresh="refreshTool" iconType="WORKFLOW" />
8484
</el-dialog>
8585
</template>
8686
<script setup lang="ts">
8787
import { ref, watch, reactive, computed } from 'vue'
88-
import { useRoute } from 'vue-router'
88+
import { useRouter, useRoute } from 'vue-router'
8989
import EditAvatarDialog from '@/views/tool/component/EditAvatarDialog.vue'
9090
import { isAppIcon } from '@/utils/common'
9191
import { MsgSuccess } from '@/utils/message'
9292
import { t } from '@/locales'
9393
import useStore from '@/stores'
9494
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
95+
96+
const router = useRouter()
9597
const { user, folder } = useStore()
9698
const emit = defineEmits(['refresh'])
9799
@@ -194,6 +196,10 @@ const submitHandle = async () => {
194196
MsgSuccess(t('common.createSuccess'))
195197
emit('refresh', res.data)
196198
return user.profile().then(() => {
199+
router.push({
200+
name: 'ToolWorkflow',
201+
params: { id: res.data.id, folderId: res.data.folder_id },
202+
})
197203
dialogVisible.value = false
198204
})
199205
})

ui/src/workflow/nodes/tool-base-node/component/input/InputFieldFormDialog.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
@blur="form.field = form.field.trim()"
2424
/>
2525
</el-form-item>
26-
<el-form-item :label="$t('dynamicsForm.paramForm.name.label')">
26+
<el-form-item :label="$t('dynamicsForm.paramForm.name.label')" prop="label">
2727
<el-input
2828
v-model="form.label"
2929
:placeholder="$t('dynamicsForm.paramForm.name.placeholder')"
@@ -87,6 +87,13 @@ const rules = reactive({
8787
trigger: 'blur',
8888
},
8989
],
90+
label: [
91+
{
92+
required: true,
93+
message: t('dynamicsForm.paramForm.name.placeholder'),
94+
trigger: 'blur',
95+
},
96+
],
9097
})
9198
9299
const dialogVisible = ref<boolean>(false)

ui/src/workflow/nodes/tool-base-node/component/input/InputFieldTable.vue

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,20 @@
1717
</div>
1818

1919
<el-table ref="inputFieldTableRef" :data="inputFieldList" class="mb-16">
20-
<el-table-column prop="field" :label="$t('views.tool.form.paramName.label')" />
20+
<el-table-column prop="field" :label="$t('views.tool.form.paramName.label')">
21+
<template #default="{ row }">
22+
<span class="ellipsis-1" :title="row.field">
23+
{{ row.field }}
24+
</span>
25+
</template>
26+
</el-table-column>
27+
<el-table-column prop="label" :label="$t('dynamicsForm.paramForm.name.label')">
28+
<template #default="{ row }">
29+
<span class="ellipsis-1" :title="row.label">
30+
{{ row.label }}
31+
</span>
32+
</template>
33+
</el-table-column>
2134
<el-table-column :label="$t('views.tool.form.dataType.label')">
2235
<template #default="{ row }">
2336
<el-tag type="info" class="info-tag">{{ row.type }}</el-tag>
@@ -26,7 +39,7 @@
2639
<el-table-column :label="$t('common.required')">
2740
<template #default="{ row }">
2841
<div @click.stop>
29-
<el-switch size="small" v-model="row.is_required" />
42+
<el-switch disabled size="small" v-model="row.is_required" />
3043
</div>
3144
</template>
3245
</el-table-column>

0 commit comments

Comments
 (0)