跳转链接

This commit is contained in:
q4speed 2020-05-18 14:14:23 +08:00
parent 902b3f3225
commit 78aaf1ebf3
4 changed files with 24 additions and 2 deletions

View File

@ -4,7 +4,11 @@
<span class="title">{{$t('api_report.title')}}</span>
</template>
<el-table :data="tableData" class="table-content">
<el-table-column prop="name" :label="$t('commons.name')" width="150" show-overflow-tooltip/>
<el-table-column :label="$t('commons.name')" width="150" show-overflow-tooltip>
<template v-slot:default="scope">
<el-link type="info" @click="link(scope.row)">{{ scope.row.name }}</el-link>
</template>
</el-table-column>
<el-table-column width="250" :label="$t('commons.create_time')">
<template v-slot:default="scope">
<span>{{ scope.row.createTime | timestampFormatDate }}</span>
@ -46,6 +50,11 @@
this.tableData = response.data;
});
},
link(row) {
this.$router.push({
path: '/api/report/view/' + row.id,
})
}
},
created() {

View File

@ -4,7 +4,11 @@
<span class="title">{{$t('api_test.title')}}</span>
</template>
<el-table :data="tableData" class="table-content">
<el-table-column prop="name" :label="$t('commons.name')" width="150" show-overflow-tooltip/>
<el-table-column :label="$t('commons.name')" width="150" show-overflow-tooltip>
<template v-slot:default="scope">
<el-link type="info" @click="link(scope.row)">{{ scope.row.name }}</el-link>
</template>
</el-table-column>
<el-table-column prop="projectName" :label="$t('load_test.project_name')" width="150" show-overflow-tooltip/>
<el-table-column width="250" :label="$t('commons.create_time')">
<template v-slot:default="scope">
@ -46,6 +50,11 @@
this.result = this.$get("/api/recent/5", response => {
this.tableData = response.data;
});
},
link(row) {
this.$router.push({
path: '/api/test/edit?id=' + row.id,
})
}
},

View File

@ -212,6 +212,7 @@ export default {
'download_log_file': 'Download',
},
api_test: {
title: "Test",
save_and_run: "Save and Run",
run: "Run",
running: "Running",
@ -273,6 +274,7 @@ export default {
}
},
api_report: {
title: "Report",
request: "Request",
request_body: "Body",
request_headers: "Headers",

View File

@ -212,6 +212,7 @@ export default {
'pressure_prediction_chart': '压力预估图',
},
api_test: {
title: "测试",
save_and_run: "保存并执行",
run: "执行",
running: "正在执行",
@ -273,6 +274,7 @@ export default {
}
},
api_report: {
title: "报告",
request: "请求",
request_body: "请求内容",
request_headers: "请求头",