fix(测试跟踪): 测试计划分享报告无法跳转问题
This commit is contained in:
parent
911e49fb8e
commit
4b0ee06876
|
@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/share/test/plan/api/case")
|
||||
@RequestMapping("/share")
|
||||
public class ShareTestPlanApiReportController {
|
||||
|
||||
@Resource
|
||||
|
|
|
@ -25,7 +25,7 @@ export function apiDefinitionReportGet(id) {
|
|||
}
|
||||
|
||||
export function apiDefinitionReportGetDb(id) {
|
||||
return get(BASE_URL + `getReport/${id}`);
|
||||
return get(BASE_URL + `report/getReport/${id}`);
|
||||
}
|
||||
|
||||
export function apiDefinitionRunDebug(file, files, params) {
|
||||
|
|
|
@ -11,8 +11,30 @@ import plugins from "metersphere-frontend/src/plugins";
|
|||
import mavonEditor from "mavon-editor";
|
||||
import {createPinia, PiniaVuePlugin} from 'pinia'
|
||||
import PersistedState from "pinia-plugin-persistedstate";
|
||||
import {TokenKey} from "metersphere-frontend/src/utils/constants";
|
||||
import axios from 'axios';
|
||||
|
||||
function planReportUse(id, template) {
|
||||
// 获取gateway路由
|
||||
let user = JSON.parse(localStorage.getItem(TokenKey));
|
||||
axios({
|
||||
method: 'get',
|
||||
url: '/services',
|
||||
headers: {
|
||||
'CSRF-TOKEN': user.csrfToken,
|
||||
'X-AUTH-TOKEN': user.sessionId
|
||||
},
|
||||
}).then((res)=>{
|
||||
let modules = {}, microPorts = {};
|
||||
res.data.data.forEach(svc => {
|
||||
let name = svc.serviceId;
|
||||
modules[name] = true;
|
||||
microPorts[name] = svc.port;
|
||||
})
|
||||
sessionStorage.setItem("micro_apps", JSON.stringify(modules));
|
||||
sessionStorage.setItem("micro_ports", JSON.stringify(microPorts));
|
||||
})
|
||||
|
||||
const pinia = createPinia()
|
||||
pinia.use(PersistedState)//开启缓存,存储在localstorage
|
||||
|
||||
|
|
Loading…
Reference in New Issue