From 21f29a04fce80903e6380c7c5376465f6803b604 Mon Sep 17 00:00:00 2001 From: Odboy Date: Mon, 9 Mar 2026 19:38:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(devops):=20=E6=89=A9=E5=B1=95=E6=B5=81?= =?UTF-8?q?=E6=B0=B4=E7=BA=BF=E4=BB=BB=E5=8A=A1=E6=9E=84=E5=BB=BA=E5=99=A8?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=B9=B6=E4=BC=98=E5=8C=96=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将Pipeline和PipeTask组件宽度从240px调整为260px - 为PipeTask组件的startTimeMillis和durationMillis属性添加默认值 - 在PipeTaskBuilder中移除预设的节点选项表单并改为动态配置 - 为节点按钮添加触发条件选择功能,支持按状态显示不同按钮 - 优化节点参数配置界面,支持动态添加参数选项输入框 - 新增节点配置预览功能,实时显示JSON格式的配置信息 - 为输入框添加占位符提示文本提升用户体验 - 重构数据绑定逻辑,通过watch监听器实现配置同步 --- .../components/devops/pipeline/PipeTask.vue | 15 +- .../devops/pipeline/PipeTaskBuilder.vue | 373 ++++++++++++++---- .../components/devops/pipeline/Pipeline.vue | 4 +- 3 files changed, 318 insertions(+), 74 deletions(-) diff --git a/cutejava-front/src/views/components/devops/pipeline/PipeTask.vue b/cutejava-front/src/views/components/devops/pipeline/PipeTask.vue index 6ffa8f12..61c1bff0 100644 --- a/cutejava-front/src/views/components/devops/pipeline/PipeTask.vue +++ b/cutejava-front/src/views/components/devops/pipeline/PipeTask.vue @@ -44,8 +44,7 @@ :key="index" v-prevent-re-click type="text" - :style="`width: ${item.text && item.text.length >= 4 ? '74px': '26px' - };color: ${item.color ? item.color : statusColorMap.running};display: ${item.condition === + :style="`color: ${item.color ? item.color : statusColorMap.running};display: ${item.condition === 'all' ? 'inline-block': (item.condition === status ? 'inline-block': 'none')};overflow: hidden;text-overflow: ellipsis;`" @@ -101,14 +100,18 @@ export default { */ startTimeMillis: { type: Number, - required: true + required: false, + default: function() { + return new Date().getTime() + } }, /** * 持续时间。单位:秒 */ durationMillis: { type: Number, - required: true + required: false, + default: 0 }, /** * 状态 @@ -200,8 +203,8 @@ export default { taskWindowStyle() { const colorHex = this.getColorHexByStatus(this.status) return { - width: '240px', - maxWidth: '240px', + width: '260px', + maxWidth: '260px', height: '100px', maxHeight: '100px', border: `1px solid ${colorHex}`, diff --git a/cutejava-front/src/views/components/devops/pipeline/PipeTaskBuilder.vue b/cutejava-front/src/views/components/devops/pipeline/PipeTaskBuilder.vue index 6e384c57..e45e95df 100644 --- a/cutejava-front/src/views/components/devops/pipeline/PipeTaskBuilder.vue +++ b/cutejava-front/src/views/components/devops/pipeline/PipeTaskBuilder.vue @@ -54,35 +54,14 @@ /> - - 节点选项(预览) - - - - - - - - - - 节点参数设置 - + - + @@ -109,7 +88,22 @@ + + + @@ -126,7 +120,7 @@