From 9ab566b41792fe35e49ca64b374ba2116a09f348 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Mon, 21 Nov 2022 18:20:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E6=8F=92=E4=BB=B6=E5=9B=BE=E7=89=87=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1019990 --user=陈建星 【系统设置】服务集成-jira平台-显示有问题 https://www.tapd.cn/55049933/s/1299926 --- .../frontend/src/api/platform-plugin.js | 6 +++++- .../src/business/home/ProjectPlatformConfig.vue | 6 +++++- system-setting/frontend/src/api/platform-plugin.js | 7 ++++++- .../business/workspace/integration/BugManagement.vue | 12 ++++++++---- .../workspace/project/ProjectPlatformConfig.vue | 6 +++++- 5 files changed, 29 insertions(+), 8 deletions(-) diff --git a/project-management/frontend/src/api/platform-plugin.js b/project-management/frontend/src/api/platform-plugin.js index 8f10018281..33034061e3 100644 --- a/project-management/frontend/src/api/platform-plugin.js +++ b/project-management/frontend/src/api/platform-plugin.js @@ -1,4 +1,4 @@ -import {post, get} from "metersphere-frontend/src/plugins/request"; +import {post, get, generateModuleUrl} from "metersphere-frontend/src/plugins/request"; const BASE_URL = "/platform/plugin/"; export function getPlatformProjectInfo(key) { @@ -20,3 +20,7 @@ export function getPlatformOption() { export function getThirdPartTemplateSupportPlatform() { return get(BASE_URL + 'template/support/list'); } + +export function generatePlatformResourceUrl(configId, fileName) { + return generateModuleUrl(BASE_URL + `resource/${configId}?fileName=${fileName}`); +} diff --git a/project-management/frontend/src/business/home/ProjectPlatformConfig.vue b/project-management/frontend/src/business/home/ProjectPlatformConfig.vue index 0a0a80535a..4bfb048e5a 100644 --- a/project-management/frontend/src/business/home/ProjectPlatformConfig.vue +++ b/project-management/frontend/src/business/home/ProjectPlatformConfig.vue @@ -22,7 +22,7 @@ @@ -34,6 +34,7 @@ import MsInstructionsIcon from "metersphere-frontend/src/components/MsInstructionsIcon"; import {getCurrentWorkspaceId} from "metersphere-frontend/src/utils/token"; import { + generatePlatformResourceUrl, getPlatformProjectInfo, getPlatformProjectOption, validateProjectConfig, @@ -141,6 +142,9 @@ export default { callback(); } }); + }, + getPlatformImageUrl(config, item) { + return generatePlatformResourceUrl(config.id, item.instructionsIcon); } } } diff --git a/system-setting/frontend/src/api/platform-plugin.js b/system-setting/frontend/src/api/platform-plugin.js index 243b30a895..9b6b781c06 100644 --- a/system-setting/frontend/src/api/platform-plugin.js +++ b/system-setting/frontend/src/api/platform-plugin.js @@ -1,4 +1,5 @@ -import {post, get} from "metersphere-frontend/src/plugins/request"; +import {post, get, generateModuleUrl} from "metersphere-frontend/src/plugins/request"; + const BASE_URL = "/platform/plugin/"; export function getIntegrationInfo() { @@ -27,3 +28,7 @@ export function getPlatformOption() { export function getThirdPartTemplateSupportPlatform() { return get(BASE_URL + 'template/support/list'); } + +export function generatePlatformResourceUrl(configId, fileName) { + return generateModuleUrl(BASE_URL + `resource/${configId}?fileName=${fileName}`); +} diff --git a/system-setting/frontend/src/business/workspace/integration/BugManagement.vue b/system-setting/frontend/src/business/workspace/integration/BugManagement.vue index 7cacd70d4f..9a98de0ca4 100644 --- a/system-setting/frontend/src/business/workspace/integration/BugManagement.vue +++ b/system-setting/frontend/src/business/workspace/integration/BugManagement.vue @@ -5,7 +5,7 @@ - Jira @@ -41,7 +41,7 @@ import ZentaoSetting from '@/business/workspace/integration/ZentaoSetting'; import AzuredevopsSetting from '@/business/workspace/integration/AzureDevopsSetting'; import {AZURE_DEVOPS, TAPD, ZEN_TAO} from "metersphere-frontend/src/utils/constants"; import PlatformConfig from "@/business/workspace/integration/PlatformConfig"; -import {getIntegrationInfo} from "@/api/platform-plugin"; +import {generatePlatformResourceUrl, getIntegrationInfo} from "@/api/platform-plugin"; export default { name: "BugManagement", @@ -72,9 +72,13 @@ export default { }, azuredevopsEnable() { return this.platform === AZURE_DEVOPS; - }, + } }, - methods: {} + methods: { + getPlatformImageUrl(config) { + return generatePlatformResourceUrl(config.id, config.image); + } + } } diff --git a/system-setting/frontend/src/business/workspace/project/ProjectPlatformConfig.vue b/system-setting/frontend/src/business/workspace/project/ProjectPlatformConfig.vue index b101462825..90935f964e 100644 --- a/system-setting/frontend/src/business/workspace/project/ProjectPlatformConfig.vue +++ b/system-setting/frontend/src/business/workspace/project/ProjectPlatformConfig.vue @@ -22,7 +22,7 @@ @@ -34,6 +34,7 @@ import MsInstructionsIcon from "metersphere-frontend/src/components/MsInstructionsIcon"; import {getCurrentWorkspaceId} from "metersphere-frontend/src/utils/token"; import { + generatePlatformResourceUrl, getPlatformProjectInfo, getPlatformProjectOption, validateProjectConfig, @@ -140,6 +141,9 @@ export default { callback(); } }); + }, + getPlatformImageUrl(config, item) { + return generatePlatformResourceUrl(config.id, item.instructionsIcon); } } }