From 580ef24d63b9e86d9a90956678c4a2dc72c51208 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Fri, 4 Nov 2022 18:30:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=BB=E5=8A=A1=E4=B8=AD=E5=BF=83):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8Dui=E6=B5=8B=E8=AF=95=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=88=86=E9=A1=B5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1019395 --user=赵勇 【任务中心】UI测试任务问题汇总 https://www.tapd.cn/55049933/s/1289899 --- .../src/components/task/TaskCenter.vue | 53 ++++------- .../src/components/task/TaskCenterItem.vue | 93 ++++--------------- .../base/mapper/ext/BaseTaskMapper.java | 2 +- .../base/mapper/ext/BaseTaskMapper.xml | 6 +- .../metersphere/task/service/TaskService.java | 2 +- .../websocket/TaskCenterWebSocket.java | 1 + 6 files changed, 42 insertions(+), 115 deletions(-) diff --git a/framework/sdk-parent/frontend/src/components/task/TaskCenter.vue b/framework/sdk-parent/frontend/src/components/task/TaskCenter.vue index 65e66e24c8..d6747f021e 100644 --- a/framework/sdk-parent/frontend/src/components/task/TaskCenter.vue +++ b/framework/sdk-parent/frontend/src/components/task/TaskCenter.vue @@ -22,7 +22,8 @@ :title="$t('commons.task_center')" :size="size.toString()" custom-class="ms-drawer-task"> - +
{{ $t('commons.task_close') }}
0) { this.setActiveName(); } this.runningTotal = this.runningData.total; - if (this.runningTotal > 0) { - this.init(false); - } + this.init(false); + }, onClose(e) { }, + listenScreenChange() { + this.size = document.body.clientWidth; + }, showTaskCenter() { this.getTaskRunning(); this.getMaintainerOptions(); - this.init(true); + window.addEventListener("resize", this.listenScreenChange, false); this.taskVisible = true; }, close() { this.visible = false; this.size = 600; + window.removeEventListener("resize", this.listenScreenChange); this.showType = ""; if (this.websocket && this.websocket.close instanceof Function) { this.websocket.close(); @@ -417,6 +422,7 @@ export default { }) }, openHistory(id) { + window.addEventListener("resize", this.listenScreenChange, false); this.activeName = 'API'; this.initCaseHistory(id); this.taskVisible = true; @@ -425,6 +431,7 @@ export default { this.showType = "CASE"; }, openScenarioHistory(id) { + window.addEventListener("resize", this.listenScreenChange, false); this.activeName = 'SCENARIO'; getScenarioData(id) .then(response => { @@ -462,11 +469,6 @@ export default { diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseTaskMapper.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseTaskMapper.java index b47c981d05..ef5b2e20f5 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseTaskMapper.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseTaskMapper.java @@ -12,7 +12,7 @@ public interface BaseTaskMapper { List getApiTasks(@Param("request") TaskCenterRequest request); List getScenarioTasks(@Param("request") TaskCenterRequest request); List getPerfTasks(@Param("request") TaskCenterRequest request); - List getUiTasks(@Param("request") TaskCenterRequest request, @Param("uiPermission") Boolean uiPermission); + List getUiTasks(@Param("request") TaskCenterRequest request); TaskStatisticsDTO getRunningTasks(@Param("request") TaskCenterRequest request); diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseTaskMapper.xml b/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseTaskMapper.xml index 01abf67853..9f05be074b 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseTaskMapper.xml +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseTaskMapper.xml @@ -92,7 +92,6 @@