fix(测试跟踪): 报告跨项目接口用例跳转无权限问题

--bug=1032232 --user=宋昌昌 【测试跟踪】报告-接口用例-操作人无跨项目权限-点击ID跳转到跨项目case编辑页面 https://www.tapd.cn/55049933/s/1429062
This commit is contained in:
song-cc-rock 2023-10-20 16:24:31 +08:00 committed by jianxing
parent 8851d099a6
commit d054d8156d
2 changed files with 11 additions and 11 deletions

View File

@ -261,9 +261,9 @@
</div> </div>
</template> </template>
<script> <script>
import { createDefinitionEnv, getDefinitionById, getDefinitionEnv } from '@/api/definition'; import {createDefinitionEnv, getDefinitionById, getDefinitionEnv} from '@/api/definition';
import { getProjectConfig } from '@/api/project'; import {getProjectConfig} from '@/api/project';
import { getApiModuleByProjectIdAndProtocol, trashCount } from '@/api/definition-module'; import {getApiModuleByProjectIdAndProtocol, trashCount} from '@/api/definition-module';
import MsApiList from './components/list/ApiList'; import MsApiList from './components/list/ApiList';
import MsContainer from 'metersphere-frontend/src/components/MsContainer'; import MsContainer from 'metersphere-frontend/src/components/MsContainer';
import MsMainContainer from 'metersphere-frontend/src/components/MsMainContainer'; import MsMainContainer from 'metersphere-frontend/src/components/MsMainContainer';
@ -277,9 +277,9 @@ import MsRunTestHttpPage from './components/runtest/RunTestHTTPPage';
import MsRunTestTcpPage from './components/runtest/RunTestTCPPage'; import MsRunTestTcpPage from './components/runtest/RunTestTCPPage';
import MsRunTestSqlPage from './components/runtest/RunTestSQLPage'; import MsRunTestSqlPage from './components/runtest/RunTestSQLPage';
import MsRunTestDubboPage from './components/runtest/RunTestDubboPage'; import MsRunTestDubboPage from './components/runtest/RunTestDubboPage';
import { getCurrentProjectID, getCurrentUser, getCurrentUserId } from 'metersphere-frontend/src/utils/token'; import {getCurrentProjectID, getCurrentUser, getCurrentUserId} from 'metersphere-frontend/src/utils/token';
import { hasPermission } from 'metersphere-frontend/src/utils/permission'; import {hasPermission} from 'metersphere-frontend/src/utils/permission';
import { getUUID } from 'metersphere-frontend/src/utils'; import {getUUID} from 'metersphere-frontend/src/utils';
import MsApiModule from './components/module/ApiModule'; import MsApiModule from './components/module/ApiModule';
import ApiCaseSimpleList from './components/list/ApiCaseSimpleList'; import ApiCaseSimpleList from './components/list/ApiCaseSimpleList';
import ApiDocumentsPage from '@/business/definition/components/list/ApiDocumentsPage'; import ApiDocumentsPage from '@/business/definition/components/list/ApiDocumentsPage';
@ -288,10 +288,10 @@ import MsTabButton from '@/business/commons/MsTabs';
import ApiSchedule from '@/business/definition/components/import/ApiSchedule'; import ApiSchedule from '@/business/definition/components/import/ApiSchedule';
import MsEditCompleteContainer from './components/EditCompleteContainer'; import MsEditCompleteContainer from './components/EditCompleteContainer';
import MsEnvironmentSelect from './components/case/MsEnvironmentSelect'; import MsEnvironmentSelect from './components/case/MsEnvironmentSelect';
import { PROJECT_ID, WORKSPACE_ID } from 'metersphere-frontend/src/utils/constants'; import {PROJECT_ID, WORKSPACE_ID} from 'metersphere-frontend/src/utils/constants';
import { useApiStore } from '@/store'; import {useApiStore} from '@/store';
import { buildTree } from 'metersphere-frontend/src/model/NodeTree'; import {buildTree} from 'metersphere-frontend/src/model/NodeTree';
import { createMockConfig, getMockApiParams, mockExpectConfig } from '@/api/api-mock'; import {createMockConfig, getMockApiParams, mockExpectConfig} from '@/api/api-mock';
import MockEditDrawer from '@/business/definition/components/mock/MockEditDrawer'; import MockEditDrawer from '@/business/definition/components/mock/MockEditDrawer';
import {getUserDefaultApiType} from "metersphere-frontend/src/api/environment"; import {getUserDefaultApiType} from "metersphere-frontend/src/api/environment";

View File

@ -157,7 +157,7 @@ export default {
}, },
methods: { methods: {
redirectApiCaseEditPage(row) { redirectApiCaseEditPage(row) {
window.open("/#/api/definition?caseId=" + row.caseId); window.open("/#/api/definition?caseId=" + row.caseId + "&projectId=" + row.projectId);
}, },
getScenarioApiCase() { getScenarioApiCase() {
if (this.isTemplate || this.isDb) { if (this.isTemplate || this.isDb) {