refactor(场景自动化): 场景报告跳转到场景列表打开新的tab页
--bug=1016908 --user=陈建星 [接口测试] github#17993测试跟踪,报告,接口用例统计分析,点击报告名称链接会直接跳转到接口用例或者场景用例详情页,需要改成点击链接后新打开一个新tab页 https://www.tapd.cn/55049933/s/1246072
This commit is contained in:
parent
577a214b3a
commit
63eebaa758
|
@ -6,10 +6,9 @@
|
|||
<el-input v-if="nameIsEdit" size="mini" @blur="handleSave(report.name)" @keyup.enter.native="handleSaveKeyUp"
|
||||
style="width: 200px" v-model="report.name" maxlength="60" show-word-limit/>
|
||||
<span v-else>
|
||||
<router-link v-if="isSingleScenario"
|
||||
:to="{name: isUi ? 'uiAutomation' : 'ApiAutomation', params: { dataSelectRange: 'edit:' + scenarioId }}">
|
||||
<el-link v-if="isSingleScenario" @click="redirect">
|
||||
{{ report.name }}
|
||||
</router-link>
|
||||
</el-link>
|
||||
<span v-else>
|
||||
{{ report.name }}
|
||||
</span>
|
||||
|
@ -78,7 +77,7 @@
|
|||
<script>
|
||||
|
||||
import {generateShareInfoWithExpired} from "@/network/share";
|
||||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import {getCurrentProjectID, getCurrentWorkspaceId, getUUID} from "@/common/js/utils";
|
||||
import MsTag from "@/business/components/common/components/MsTag";
|
||||
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
|
||||
const UiDownloadScreenshot = requireComponent.keys().length > 0 ? requireComponent("./ui/automation/report/UiDownloadScreenshot.vue") : {};
|
||||
|
@ -152,6 +151,19 @@ export default {
|
|||
handleSaveKeyUp($event) {
|
||||
$event.target.blur();
|
||||
},
|
||||
redirect() {
|
||||
let data = this.$router.resolve({
|
||||
name: this.isUi ? 'uiAutomation' : 'ApiAutomation',
|
||||
params: {
|
||||
redirectID: getUUID(),
|
||||
dataType: "scenario",
|
||||
dataSelectRange: 'edit:' + this.scenarioId,
|
||||
projectId: getCurrentProjectID(),
|
||||
workspaceId: getCurrentWorkspaceId(),
|
||||
}
|
||||
});
|
||||
window.open(data.href, '_blank');
|
||||
},
|
||||
rerun() {
|
||||
let type = this.report.reportType;
|
||||
let rerunObj = {type: type, reportId: this.report.id}
|
||||
|
|
Loading…
Reference in New Issue