From 724cb0a6a14d822875d0cfbeebda317d34867933 Mon Sep 17 00:00:00 2001
From: caiZhou <67539158+ywywZhou@users.noreply.github.com>
Date: Thu, 2 Jan 2025 10:28:27 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=B1=E4=BA=AB=E5=88=B0=E5=95=86?=
=?UTF-8?q?=E5=BA=97=E4=BE=A7=E6=A0=8F=E5=9C=BA=E6=99=AF=E5=88=86=E7=B1=BB?=
=?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A1=86=E4=BA=A4=E4=BA=92=E4=BC=98=E5=8C=96?=
=?UTF-8?q?=20--story=3D121000017=20(#7661)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix: 共享到商店侧栏场景分类下拉框交互优化 --story=121000017
# Reviewed, transaction id: 28175
* fix: 任务执行页面被嵌入时如果任务执行成功则向父页面发送事件 --story=121000017
# Reviewed, transaction id: 28187
---
.../PeriodicList/ModifyPeriodicDialog.vue | 8 +-
.../pages/task/TaskExecute/TaskOperation.vue | 7 +
.../SharedTemplate/SharedCategorySelect.vue | 145 ++++++++++++++++++
.../SharedTemplate/SharedTplSlider.vue | 69 +--------
4 files changed, 163 insertions(+), 66 deletions(-)
create mode 100644 frontend/desktop/src/pages/template/TemplateList/SharedTemplate/SharedCategorySelect.vue
diff --git a/frontend/desktop/src/pages/task/PeriodicList/ModifyPeriodicDialog.vue b/frontend/desktop/src/pages/task/PeriodicList/ModifyPeriodicDialog.vue
index 1afa57db5..fbdbe7efd 100644
--- a/frontend/desktop/src/pages/task/PeriodicList/ModifyPeriodicDialog.vue
+++ b/frontend/desktop/src/pages/task/PeriodicList/ModifyPeriodicDialog.vue
@@ -477,7 +477,9 @@
pipeline_template__name__icontains: this.flowName || undefined,
common: this.isCommon
}
- const templateListData = await this.loadTemplateList(params)
+ const templateListData = this.isCommon
+ ? await this.loadCommonTemplateList(params)
+ : await this.loadTemplateList(params)
if (add) {
this.templateList.push(...templateListData.results)
} else { // 搜索
@@ -540,9 +542,7 @@
try {
this.templateDataLoading = true
const params = { templateId: id, common: this.isCommon }
- const templateData = this.isCommon
- ? await this.loadCommonTemplateList(params)
- : await this.loadTemplateData(params)
+ const templateData = await this.loadTemplateData(params)
// 获取流程模板的通知配置
const { notify_receivers, notify_type } = templateData
this.notifyType = [notify_type.success.slice(0), notify_type.fail.slice(0)]
diff --git a/frontend/desktop/src/pages/task/TaskExecute/TaskOperation.vue b/frontend/desktop/src/pages/task/TaskExecute/TaskOperation.vue
index 5a7545f41..5eae00216 100644
--- a/frontend/desktop/src/pages/task/TaskExecute/TaskOperation.vue
+++ b/frontend/desktop/src/pages/task/TaskExecute/TaskOperation.vue
@@ -403,6 +403,7 @@
},
computed: {
...mapState({
+ hideHeader: state => state.hideHeader,
platformInfo: state => state.platformInfo,
view_mode: state => state.view_mode,
hasAdminPerm: state => state.hasAdminPerm,
@@ -589,6 +590,12 @@
this.state = instanceStatus.data.state
this.instanceStatus = instanceStatus.data
this.pollErrorTimes = 0
+
+ // 页面被嵌入时如果任务执行成功则向父页面发送事件
+ if (this.state === 'FINISHED' && this.hideHeader) {
+ window.parent.postMessage({ eventName: 'executeEvent' }, '*')
+ }
+
if (this.isTopTask) {
this.rootState = this.state
}
diff --git a/frontend/desktop/src/pages/template/TemplateList/SharedTemplate/SharedCategorySelect.vue b/frontend/desktop/src/pages/template/TemplateList/SharedTemplate/SharedCategorySelect.vue
new file mode 100644
index 000000000..a2e13b0d9
--- /dev/null
+++ b/frontend/desktop/src/pages/template/TemplateList/SharedTemplate/SharedCategorySelect.vue
@@ -0,0 +1,145 @@
+
+ {{ $t('搜索结果为空') }}