fix(测试跟踪): 测试计划点击ui用例ID跳转

--story=1008184 --user=陈建星 测试计划优化 https://www.tapd.cn/55049933/s/1203732
This commit is contained in:
chenjianxing 2022-07-18 20:50:33 +08:00 committed by f2c-ci-robot[bot]
parent 84cfabc267
commit 027d672457
1 changed files with 29 additions and 8 deletions

View File

@ -29,13 +29,21 @@
@filter="filterSearch" @filter="filterSearch"
ref="table"> ref="table">
<span v-for="(item) in fields" :key="item.key"> <span v-for="(item) in fields" :key="item.key">
<ms-table-column <ms-table-column
v-if="item.id == 'num'" v-if="item.id == 'num'"
:fields-width="fieldsWidth" :fields-width="fieldsWidth"
sortable sortable
prop="customNum" prop="customNum"
min-width="80px" min-width="80px"
label="ID"/> label="ID">
<template v-slot:default="scope">
<el-link @click="openById(scope.row)">
<span>
{{ scope.row.customNum }}
</span>
</el-link>
</template>
</ms-table-column>
<ms-table-column :field="item" <ms-table-column :field="item"
:fields-width="fieldsWidth" :fields-width="fieldsWidth"
@ -197,7 +205,7 @@
import MsTableHeader from "@/business/components/common/components/MsTableHeader"; import MsTableHeader from "@/business/components/common/components/MsTableHeader";
import MsTablePagination from "@/business/components/common/pagination/TablePagination"; import MsTablePagination from "@/business/components/common/pagination/TablePagination";
import MsTag from "../../../../../common/components/MsTag"; import MsTag from "../../../../../common/components/MsTag";
import {getCurrentProjectID, getUUID, hasLicense, strMapToObj} from "@/common/js/utils"; import {getCurrentProjectID, getCurrentWorkspaceId, getUUID, hasLicense, strMapToObj} from "@/common/js/utils";
import MsApiReportDetail from "../../../../../api/automation/report/ApiReportDetail"; import MsApiReportDetail from "../../../../../api/automation/report/ApiReportDetail";
import MsTableMoreBtn from "../../../../../api/automation/scenario/TableMoreBtn"; import MsTableMoreBtn from "../../../../../api/automation/scenario/TableMoreBtn";
import MsScenarioExtendButtons from "@/business/components/api/automation/scenario/ScenarioExtendBtns"; import MsScenarioExtendButtons from "@/business/components/api/automation/scenario/ScenarioExtendBtns";
@ -529,6 +537,19 @@ export default {
} }
return; return;
}, },
openById(item) {
let automationData = this.$router.resolve({
name: 'uiAutomation',
params: {
redirectID: getUUID(),
dataType: "scenario",
dataSelectRange: 'edit:' + item.caseId,
projectId: item.projectId,
workspaceId: getCurrentWorkspaceId()
}
});
window.open(automationData.href, '_blank');
},
handleDeleteBatch() { handleDeleteBatch() {
this.$alert(this.$t('test_track.plan_view.confirm_cancel_relevance') + "", '', { this.$alert(this.$t('test_track.plan_view.confirm_cancel_relevance') + "", '', {
confirmButtonText: this.$t('commons.confirm'), confirmButtonText: this.$t('commons.confirm'),