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); } } }