Merge branch 'v1.8'

This commit is contained in:
Captain.B 2021-03-26 18:20:51 +08:00
commit 39187a0cba
27 changed files with 78 additions and 568 deletions

View File

@ -14,13 +14,11 @@ import io.metersphere.excel.domain.ExcelResponse;
import io.metersphere.service.CheckPermissionService;
import io.metersphere.service.FileService;
import io.metersphere.track.dto.TestCaseDTO;
import io.metersphere.track.dto.TestPlanCaseDTO;
import io.metersphere.track.request.testcase.EditTestCaseRequest;
import io.metersphere.track.request.testcase.QueryTestCaseRequest;
import io.metersphere.track.request.testcase.TestCaseBatchRequest;
import io.metersphere.track.request.testcase.TestCaseMinderEditRequest;
import io.metersphere.track.request.testplan.FileOperationRequest;
import io.metersphere.track.request.testplancase.QueryTestPlanCaseRequest;
import io.metersphere.track.service.TestCaseService;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresRoles;
@ -126,8 +124,8 @@ public class TestCaseController {
@PostMapping(value = "/edit", consumes = {"multipart/form-data"})
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
public void editTestCase(@RequestPart("request") EditTestCaseRequest request, @RequestPart(value = "file") List<MultipartFile> files) {
testCaseService.edit(request, files);
public String editTestCase(@RequestPart("request") EditTestCaseRequest request, @RequestPart(value = "file") List<MultipartFile> files) {
return testCaseService.edit(request, files);
}
@PostMapping("/delete/{testCaseId}")

View File

@ -165,7 +165,7 @@ public class TestCaseService {
String steps = tc.getSteps();
String remark = tc.getRemark();
if (StringUtils.equals(steps, testCase.getSteps()) && StringUtils.equals(remark, caseRemark)) {
MSException.throwException(Translator.get("test_case_already_exists"));
//MSException.throwException(Translator.get("test_case_already_exists"));
isExt = true;
}
}

View File

@ -1,2 +0,0 @@
-- api_scenario_report modify column length
ALTER TABLE api_scenario_report MODIFY COLUMN name VARCHAR(300);

View File

@ -374,7 +374,6 @@
},
methods: {
customHeader() {
getLabel(this, API_SCENARIO_LIST);
this.$refs.headerCustom.open(this.tableLabel)
},
selectByParam() {

View File

@ -264,11 +264,9 @@ export default {
this.$nextTick(() => {
this.$refs.caseTable.bodyWrapper.scrollTop = 5
})
getLabel(this, API_CASE_LIST);
},
watch: {
selectNodeIds() {
getLabel(this, API_CASE_LIST);
this.initTable();
},
currentProtocol() {
@ -294,11 +292,9 @@ export default {
},
methods: {
customHeader() {
getLabel(this, API_CASE_LIST);
this.$refs.headerCustom.open(this.tableLabel)
},
initTable() {
getLabel(this, API_CASE_LIST);
this.selectRows = new Set();
this.condition.status = "";
this.condition.moduleIds = this.selectNodeIds;

View File

@ -383,7 +383,6 @@
this.getSystemLabel(this.type)
this.initTable();
this.getMaintainerOptions();
getLabel(this, API_LIST);
},
watch: {
selectNodeIds() {
@ -413,7 +412,6 @@
})
},
customHeader() {
getLabel(this, API_LIST);
this.$refs.headerCustom.open(this.tableLabel)
},
handleBatchMove() {

View File

@ -1,21 +1,9 @@
<template>
<ms-container>
<ms-main-container>
<el-row :gutter="20">
<el-col :span="24">
<overview-compare-card ref="overviewCard"/>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<load-compare-card ref="loadCard"/>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<response-time-compare-card ref="responseTimeCard"/>
</el-col>
</el-row>
<el-card>
</el-card>
</ms-main-container>
</ms-container>
</template>
@ -24,16 +12,15 @@
import MsContainer from "@/business/components/common/components/MsContainer";
import MsMainContainer from "@/business/components/common/components/MsMainContainer";
import {checkoutTestManagerOrTestUser} from "@/common/js/utils";
import OverviewCompareCard from "@/business/components/performance/report/components/OverviewCompareCard";
import MsChart from "@/business/components/common/chart/MsChart";
import LoadCompareCard from "@/business/components/performance/report/components/LoadCompareCard";
import ResponseTimeCompareCard from "@/business/components/performance/report/components/ResponseTimeCompareCard";
export default {
name: "PerformanceReportCompare",
components: {ResponseTimeCompareCard, LoadCompareCard, MsChart, OverviewCompareCard, MsMainContainer, MsContainer},
components: {MsMainContainer, MsContainer},
mounted() {
this.init();
let reportId = this.$route.path.split('/')[4];
console.log(reportId);
let items = localStorage.getItem("compareReportIds");
console.log(JSON.parse(items));
},
computed: {
isReadOnly() {
@ -43,28 +30,11 @@ export default {
data() {
return {}
},
methods: {
init() {
this.$refs.overviewCard.initTable();
this.$refs.loadCard.initCard();
this.$refs.responseTimeCard.initCard();
}
},
watch: {
'$route'(to) {
if (to.name !== "ReportCompare") {
return;
}
methods: {}
this.init();
}
}
}
</script>
<style scoped>
.el-row {
padding-bottom: 20px;
}
</style>

View File

@ -25,9 +25,6 @@
<el-button :disabled="isReadOnly" type="info" plain size="mini" @click="handleExport(reportName)">
{{ $t('test_track.plan_view.export_report') }}
</el-button>
<el-button :disabled="isReadOnly || report.status !== 'Completed'" type="default" plain size="mini" @click="compareReports()">
{{ $t('report.compare') }}
</el-button>
<el-button :disabled="isReadOnly" type="warning" plain size="mini" @click="downloadJtl()">
{{ $t('report.downloadJtl') }}
</el-button>
@ -332,8 +329,6 @@ export default {
this.$set(this.report, "id", this.reportId);
this.$set(this.report, "status", data.status);
this.$set(this.report, "testId", data.testId);
this.$set(this.report, "name", data.name);
this.$set(this.report, "createTime", data.createTime);
this.$set(this.report, "loadConfiguration", data.loadConfiguration);
this.checkReportStatus(data.status);
if (this.status === "Completed" || this.status === "Running") {

View File

@ -71,8 +71,6 @@
<template v-slot:default="scope">
<ms-table-operator-button :tip="$t('api_report.detail')" icon="el-icon-s-data"
@exec="handleEdit(scope.row)" type="primary"/>
<ms-table-operator-button :tip="$t('load_test.report.diff')" icon="el-icon-s-operation"
@exec="handleDiff(scope.row)" type="warning"/>
<ms-table-operator-button :is-tester-permission="true" :tip="$t('api_report.delete')"
icon="el-icon-delete" @exec="handleDelete(scope.row)" type="danger"/>
</template>

View File

@ -1,182 +0,0 @@
<template>
<el-card>
<template v-slot:header>
<span class="title">Load</span>
</template>
<div v-for="(option, index) in loadList" :key="index">
<ms-chart ref="chart1" :options="option" :autoresize="true"></ms-chart>
</div>
</el-card>
</template>
<script>
import MsChart from "@/business/components/common/chart/MsChart";
export default {
name: "LoadCompareCard",
components: {MsChart},
data() {
return {
loadList: []
}
},
methods: {
initCard() {
this.loadList = [];
this.reportId = this.$route.path.split('/')[4];
this.compareReports = JSON.parse(localStorage.getItem("compareReports"));
this.compareReports.forEach(report => {
this.initOverview(report);
})
},
initOverview(report) {
this.$get("/performance/report/content/load_chart/" + report.id).then(res => {
let data = res.data.data;
let yAxisList = data.filter(m => m.yAxis2 === -1).map(m => m.yAxis);
let yAxis2List = data.filter(m => m.yAxis === -1).map(m => m.yAxis2);
let yAxisListMax = this._getChartMax(yAxisList);
let yAxis2ListMax = this._getChartMax(yAxis2List);
let yAxisIndex0List = data.filter(m => m.yAxis2 === -1).map(m => m.groupName);
yAxisIndex0List = this._unique(yAxisIndex0List);
let yAxisIndex1List = data.filter(m => m.yAxis === -1).map(m => m.groupName);
yAxisIndex1List = this._unique(yAxisIndex1List);
let loadOption = {
title: {
text: report.name + " " + this.$options.filters['timestampFormatDate'](report.createTime),
left: 'center',
top: 20,
textStyle: {
color: '#65A2FF'
},
},
tooltip: {
show: true,
trigger: 'axis',
// extraCssText: 'z-index: 999;',
confine: true,
},
legend: {},
xAxis: {},
yAxis: [{
name: 'User',
type: 'value',
min: 0,
max: yAxisListMax,
splitNumber: 5,
interval: yAxisListMax / 5
},
{
name: 'Transactions/s',
type: 'value',
splitNumber: 5,
min: 0,
max: yAxis2ListMax,
interval: yAxis2ListMax / 5
}
],
series: []
};
let setting = {
series: [
{
name: 'users',
color: '#0CA74A',
},
{
name: 'hits',
yAxisIndex: '1',
color: '#65A2FF',
},
{
name: 'errors',
yAxisIndex: '1',
color: '#E6113C',
}
]
}
yAxisIndex0List.forEach(item => {
setting["series"].splice(0, 0, {name: item, yAxisIndex: '0'})
})
yAxisIndex1List.forEach(item => {
setting["series"].splice(0, 0, {name: item, yAxisIndex: '1'})
})
this.loadList.push(this.generateOption(loadOption, data, setting));
}).catch(() => {
this.loadList = [];
})
},
generateOption(option, data, setting) {
let chartData = data;
let seriesArray = [];
for (let set in setting) {
if (set === "series") {
seriesArray = setting[set];
continue;
}
this.$set(option, set, setting[set]);
}
let legend = [], series = {}, xAxis = [], seriesData = [];
chartData.forEach(item => {
if (!xAxis.includes(item.xAxis)) {
xAxis.push(item.xAxis);
}
xAxis.sort()
let name = item.groupName
if (!legend.includes(name)) {
legend.push(name)
series[name] = []
}
if (item.yAxis === -1) {
series[name].splice(xAxis.indexOf(item.xAxis), 0, [item.xAxis, item.yAxis2.toFixed(2)]);
} else {
series[name].splice(xAxis.indexOf(item.xAxis), 0, [item.xAxis, item.yAxis.toFixed(2)]);
}
})
this.$set(option.legend, "data", legend);
this.$set(option.legend, "type", "scroll");
this.$set(option.legend, "bottom", "10px");
this.$set(option.xAxis, "data", xAxis);
for (let name in series) {
let d = series[name];
d.sort((a, b) => a[0].localeCompare(b[0]));
let items = {
name: name,
type: 'line',
data: d,
smooth: true
};
let seriesArrayNames = seriesArray.map(m => m.name);
if (seriesArrayNames.includes(name)) {
for (let j = 0; j < seriesArray.length; j++) {
let seriesObj = seriesArray[j];
if (seriesObj['name'] === name) {
Object.assign(items, seriesObj);
}
}
}
seriesData.push(items);
}
this.$set(option, "series", seriesData);
return option;
},
_getChartMax(arr) {
const max = Math.max(...arr);
return Math.ceil(max / 4.5) * 5;
},
_unique(arr) {
return Array.from(new Set(arr));
}
}
}
</script>
<style scoped>
.echarts {
width: 100%;
height: 300px;
}
</style>

View File

@ -1,67 +0,0 @@
<template>
<el-card class="table-card">
<template v-slot:header>
<span class="title">Overview</span>
</template>
<el-table border :data="overviewList" class="adjust-table test-content">
<el-table-column prop="name" :label="$t('commons.name')"/>
<el-table-column prop="createTime" :label="$t('commons.create_time')">
<template v-slot:default="scope">
<span>{{ scope.row.createTime | timestampFormatDate }}</span>
</template>
</el-table-column>
<el-table-column prop="maxUsers" label="Max Users"/>
<el-table-column prop="avgTransactions" label="Avg.Transactions"/>
<el-table-column prop="errors" label="Errors"/>
<el-table-column prop="avgResponseTime" label="Avg.Response Time"/>
<el-table-column prop="responseTime90" label="90% Response Time"/>
<el-table-column prop="avgBandwidth" label="Avg.Bandwidth"/>
</el-table>
</el-card>
</template>
<script>
export default {
name: "OverviewCompareCard",
data() {
return {
reportId: null,
compareReports: [],
overviewList: [],
};
},
methods: {
initTable() {
this.overviewList = [];
this.reportId = this.$route.path.split('/')[4];
this.compareReports = JSON.parse(localStorage.getItem("compareReports"));
this.compareReports.forEach(report => {
this.initOverview(report);
})
},
initOverview(report) {
this.$get("/performance/report/content/testoverview/" + report.id).then(res => {
let data = res.data.data;
this.overviewList.push({
name: report.name,
createTime: report.createTime,
maxUsers: data.maxUsers,
avgThroughput: data.avgThroughput,
avgTransactions: data.avgTransactions,
errors: data.errors,
avgResponseTime: data.avgResponseTime,
responseTime90: data.responseTime90,
avgBandwidth: data.avgBandwidth,
})
}).catch(() => {
})
}
}
}
</script>
<style scoped>
</style>

View File

@ -1,188 +0,0 @@
<template>
<el-card>
<template v-slot:header>
<span class="title">Response Time</span>
</template>
<div v-for="(option, index) in responseTimeList" :key="index">
<ms-chart ref="chart1" :options="option" :autoresize="true"></ms-chart>
</div>
</el-card>
</template>
<script>
import MsChart from "@/business/components/common/chart/MsChart";
export default {
name: "ResponseTimeCompareCard",
components: {MsChart},
data() {
return {
responseTimeList: []
}
},
methods: {
initCard() {
this.responseTimeList = [];
this.reportId = this.$route.path.split('/')[4];
this.compareReports = JSON.parse(localStorage.getItem("compareReports"));
this.compareReports.forEach(report => {
this.initOverview(report);
})
},
initOverview(report) {
this.$get("/performance/report/content/res_chart/" + report.id).then(res => {
let data = res.data.data;
let yAxisList = data.filter(m => m.yAxis2 === -1).map(m => m.yAxis);
let yAxis2List = data.filter(m => m.yAxis === -1).map(m => m.yAxis2);
let yAxisListMax = this._getChartMax(yAxisList);
let yAxis2ListMax = this._getChartMax(yAxis2List);
let yAxisIndex0List = data.filter(m => m.yAxis2 === -1).map(m => m.groupName);
yAxisIndex0List = this._unique(yAxisIndex0List);
let yAxisIndex1List = data.filter(m => m.yAxis === -1).map(m => m.groupName);
yAxisIndex1List = this._unique(yAxisIndex1List);
let resOption = {
title: {
text: report.name + " " + this.$options.filters['timestampFormatDate'](report.createTime),
left: 'center',
top: 20,
textStyle: {
color: '#99743C'
},
},
tooltip: {
show: true,
trigger: 'axis',
// extraCssText: 'z-index: 999;',
confine: true,
formatter: function (params, ticket, callback) {
let result = "";
let name = params[0].name;
result += name + "<br/>";
for (let i = 0; i < params.length; i++) {
let seriesName = params[i].seriesName;
if (seriesName.length > 100) {
seriesName = seriesName.substring(0, 100);
}
let value = params[i].value;
let marker = params[i].marker;
result += marker + seriesName + ": " + value[1] + "<br/>";
}
return result;
}
},
legend: {},
xAxis: {},
yAxis: [{
name: 'User',
type: 'value',
min: 0,
max: yAxisListMax,
interval: yAxisListMax / 5
},
{
name: 'Response Time',
type: 'value',
min: 0,
max: yAxis2ListMax,
interval: yAxis2ListMax / 5
}
],
series: []
}
let setting = {
series: [
{
name: 'users',
color: '#0CA74A',
}
]
}
yAxisIndex0List.forEach(item => {
setting["series"].splice(0, 0, {name: item, yAxisIndex: '0'})
})
yAxisIndex1List.forEach(item => {
setting["series"].splice(0, 0, {name: item, yAxisIndex: '1'})
})
this.responseTimeList.push(this.generateOption(resOption, data, setting));
}).catch(() => {
this.responseTimeList = [];
})
},
generateOption(option, data, setting) {
let chartData = data;
let seriesArray = [];
for (let set in setting) {
if (set === "series") {
seriesArray = setting[set];
continue;
}
this.$set(option, set, setting[set]);
}
let legend = [], series = {}, xAxis = [], seriesData = [];
chartData.forEach(item => {
if (!xAxis.includes(item.xAxis)) {
xAxis.push(item.xAxis);
}
xAxis.sort()
let name = item.groupName
if (!legend.includes(name)) {
legend.push(name)
series[name] = []
}
if (item.yAxis === -1) {
series[name].splice(xAxis.indexOf(item.xAxis), 0, [item.xAxis, item.yAxis2.toFixed(2)]);
} else {
series[name].splice(xAxis.indexOf(item.xAxis), 0, [item.xAxis, item.yAxis.toFixed(2)]);
}
})
this.$set(option.legend, "data", legend);
this.$set(option.legend, "type", "scroll");
this.$set(option.legend, "bottom", "10px");
this.$set(option.xAxis, "data", xAxis);
for (let name in series) {
let d = series[name];
d.sort((a, b) => a[0].localeCompare(b[0]));
let items = {
name: name,
type: 'line',
data: d,
smooth: true
};
let seriesArrayNames = seriesArray.map(m => m.name);
if (seriesArrayNames.includes(name)) {
for (let j = 0; j < seriesArray.length; j++) {
let seriesObj = seriesArray[j];
if (seriesObj['name'] === name) {
Object.assign(items, seriesObj);
}
}
}
seriesData.push(items);
}
this.$set(option, "series", seriesData);
return option;
},
_getChartMax(arr) {
const max = Math.max(...arr);
return Math.ceil(max / 4.5) * 5;
},
_unique(arr) {
return Array.from(new Set(arr));
}
}
}
</script>
<style scoped>
.echarts {
width: 100%;
height: 300px;
}
</style>

View File

@ -5,23 +5,20 @@
:visible.sync="loadReportVisible">
<el-table v-loading="reportLoadingResult.loading"
class="basic-config"
:data="tableData"
:data="compareReports"
@select-all="handleSelectAll"
@select="handleSelectionChange">
<el-table-column type="selection"/>
<el-table-column
prop="name"
:label="$t('commons.name')"
show-overflow-tooltip>
<template v-slot:default="scope">
<i v-if="scope.row.id === report.id" class="el-icon-star-on"></i> {{ scope.row.name }}
</template>
prop="name"
:label="$t('commons.name')"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="userName"
:label="$t('report.user_name')"
show-overflow-tooltip>
prop="userName"
:label="$t('report.user_name')"
show-overflow-tooltip>
</el-table-column>
<el-table-column prop="triggerMode"
:label="$t('test_track.report.list.trigger_mode')">
@ -30,7 +27,7 @@
</template>
</el-table-column>
<el-table-column
:label="$t('commons.create_time')">
:label="$t('commons.create_time')">
<template v-slot:default="scope">
<i class="el-icon-time"/>
<span class="last-modified">{{ scope.row.createTime | timestampFormatDate }}</span>
@ -58,56 +55,46 @@ export default {
return {
loadReportVisible: false,
reportLoadingResult: {},
tableData: [],
compareReports: [],
currentPage: 1,
pageSize: 10,
total: 0,
selectIds: new Set,
report: {},
compareReports: [],
}
},
methods: {
open(report) {
this.report = report;
this.getCompareReports(report);
this.compareReports.push(report);
this.getCompareReports(report.testId);
this.loadReportVisible = true;
},
close() {
this.loadReportVisible = false;
},
getCompareReports(report) {
getCompareReports(testId) {
let condition = {
testId: report.testId,
testId: testId,
filters: {status: ["Completed"]}
};
this.reportLoadingResult = this.$post('/performance/report/list/all/' + this.currentPage + "/" + this.pageSize, condition, res => {
let data = res.data;
this.total = data.itemCount;
this.tableData = data.listObject;
this.compareReports = data.listObject;
})
},
handleCompare() {
let reportIds = [...this.selectIds];
this.tableData
.filter(r => reportIds.indexOf(r.id) > -1 && this.report.id !== r.id)
.forEach(r => this.compareReports.push(r));
localStorage.setItem("compareReports", JSON.stringify(this.compareReports));
localStorage.setItem("compareReportIds", JSON.stringify(reportIds));
this.close();
this.$router.push({path: '/performance/report/compare/' + reportIds[0]});
},
handleSelectAll(selection) {
if (selection.length > 0) {
this.tableData.forEach(item => {
this.compareReports.forEach(item => {
this.selectIds.add(item.id);
});
} else {
this.tableData.forEach(item => {
this.compareReports.forEach(item => {
if (this.selectIds.has(item.id)) {
this.selectIds.delete(item.id);
}

View File

@ -324,11 +324,23 @@ export default {
showTestCaseDetail(testCase) {
this.testCaseReadOnly = true;
},
refresh() {
refresh(data) {
this.selectNodeIds = [];
this.selectParentNodes = [];
this.selectNode = {};
this.refreshTable();
this.setTable(data);
},
setTable(data) {
console.log(data)
for (let index in this.tabs) {
let tab = this.tabs[index];
if (tab.name === this.activeName) {
tab.label = data.name;
break;
}
}
},
refreshAll() {
this.$refs.nodeTree.list();

View File

@ -380,6 +380,7 @@ export default {
testCases: [],
index: 0,
showInputTag: true,
tableType:"",
};
},
props: {
@ -631,8 +632,11 @@ export default {
})
},
async setFormData(testCase) {
//testCase.tags = JSON.parse(testCase.tags);
testCase.selected = JSON.parse(testCase.testId);
try {
testCase.selected = JSON.parse(testCase.testId);
} catch (error) {
testCase.selected = testCase.testId
}
let tmp = {};
Object.assign(tmp, testCase);
tmp.steps = JSON.parse(testCase.steps);
@ -643,9 +647,8 @@ export default {
Object.assign(this.form, tmp);
this.form.module = testCase.nodeId;
this.getFileMetaData(testCase);
/* testCase.selected = JSON.parse(testCase.testId);
this.form.selected= testCase.selected*/
await this.loadOptions(this.sysList)
},
setTestCaseExtInfo(testCase) {
this.testCase = {};
@ -710,11 +713,6 @@ export default {
this.dialogFormVisible = false;
},
saveCase() {
/*
document.getElementById("inputDelay").focus();
*/
// input
this.$refs['caseFrom'].validate((valid) => {
if (valid) {
let param = this.buildParam();
@ -722,7 +720,10 @@ export default {
let option = this.getOption(param);
this.result = this.$request(option, (response) => {
this.$success(this.$t('commons.save_success'));
if (this.operationType == 'add' && this.isCreateContinue) {
this.operationType="edit"
this.form.id=response.id;
this.$emit("refreshTestCase",)
/*if (this.operationType == 'add' && this.isCreateContinue) {
this.form.name = '';
this.form.prerequisite = '';
this.form.steps = [{
@ -736,9 +737,11 @@ export default {
this.tableData = [];
this.$emit("refresh");
return;
}
this.dialogFormVisible = false;
this.$emit("refresh");
}*/
this.tableType='edit';
this.$emit("refresh",this.form);
console.log(response.data)
this.form.id=response.data
if (this.type === 'add' || this.type === 'copy') {
param.id = response.data;
this.$emit("caseCreate", param);
@ -777,11 +780,15 @@ export default {
return param;
},
getOption(param) {
let formData = new FormData();
let type = this.type
if (this.type === 'copy') {
let type={}
if(this.tableType==='edit'){
type='edit'
}else if(this.type === 'copy'){
type = 'add'
}else{
type=this.type
}
let formData = new FormData();
let url = '/test/case/' + type;
this.uploadList.forEach(f => {
formData.append("file", f);

View File

@ -305,7 +305,7 @@ export default {
this.$emit('setCondition', this.condition);
this.condition.filters = {reviewStatus: ["Prepare", "Pass", "UnPass"]};
this.initTableData();
getSystemLabel(this, this.type)
},
activated() {
this.condition.filters = {reviewStatus: ["Prepare", "Pass", "UnPass"]};
@ -322,7 +322,6 @@ export default {
},
methods: {
customHeader() {
getLabel(this, TEST_CASE_LIST);
this.$refs.headerCustom.open(this.tableLabel)
},
getSelectDataRange() {
@ -344,6 +343,7 @@ export default {
this.condition.nodeIds = this.selectNodeIds;
}
getLabel(this, TEST_CASE_LIST);
this.getData();
},
getData() {

View File

@ -295,7 +295,6 @@ export default {
},
methods: {
inite() {
getLabel(this, TEST_PLAN_LIST);
this.initTableData()
},
calPassRate(scope) {
@ -303,7 +302,6 @@ export default {
return Number.parseInt(passRate, 10);
},
customHeader() {
getLabel(this, TEST_PLAN_LIST);
this.$refs.headerCustom.open(this.tableLabel)
},
initTableData() {

View File

@ -304,8 +304,6 @@ export default {
},
methods: {
customHeader() {
getLabel(this, TEST_PLAN_API_CASE);
this.$refs.headerCustom.open(this.tableLabel)
},
getMaintainerOptions() {

View File

@ -201,8 +201,6 @@ export default {
},
methods: {
customHeader() {
getLabel(this, TEST_PLAN_SCENARIO_CASE);
this.$refs.headerCustom.open(this.tableLabel)
},
search() {

View File

@ -429,7 +429,6 @@ export default {
},
methods: {
customHeader() {
getLabel(this, TEST_PLAN_FUNCTION_TEST_CASE);
this.$refs.headerCustom.open(this.tableLabel)
},

View File

@ -211,7 +211,6 @@ export default {
},
methods: {
customHeader() {
getLabel(this, TEST_PLAN_LOAD_CASE);
this.$refs.headerCustom.open(this.tableLabel)
},
initTable() {

View File

@ -183,7 +183,6 @@ export default {
},
methods: {
customHeader() {
getLabel(this, TEST_CASE_REVIEW_LIST);
this.$refs.headerCustom.open(this.tableLabel)
},

View File

@ -301,7 +301,6 @@ export default {
},
methods: {
customHeader() {
getLabel(this, TEST_CASE_REVIEW_CASE_LIST);
this.$refs.headerCustom.open(this.tableLabel)
},
initTableData() {

View File

@ -114,15 +114,14 @@ export function getLabel(vueObj, type) {
vueObj.result = vueObj.$post('/system/header/info', param, response => {
if (response.data != null) {
vueObj.tableLabel = eval(response.data.props);
}
})
}
export function getSystemLabel(vueObj, type) {
let param = {}
param.type=type
vueObj.result = vueObj.$post('/system/system/header',param, response => {
if (response.data != null) {
vueObj.tableLabel = eval(response.data.props);
}else{
let param = {}
param.type=type
vueObj.result = vueObj.$post('/system/system/header',param, response => {
if (response.data != null) {
vueObj.tableLabel = eval(response.data.props);
}
})
}
})
}

View File

@ -281,7 +281,7 @@ export default {
none: 'None Organization',
select: 'Select Organization',
service_integration: 'Service integration',
defect_manage: 'Defect management platform',
defect_manage: 'Project management platform',
message_settings: 'Message settings',
message: {
jenkins_task_notification: 'Jenkins task notification',

View File

@ -282,7 +282,7 @@ export default {
select: '选择组织',
delete_warning: '删除该组织将同步删除该组织下所有相关工作空间和相关工作空间下的所有项目,以及项目中的所有用例、接口测试、性能测试等,确定要删除吗?',
service_integration: '服务集成',
defect_manage: '缺陷管理平台',
defect_manage: '项目管理平台',
message_settings: '消息设置',
message: {
jenkins_task_notification: 'Jenkins接口调用任务通知',
@ -1197,7 +1197,7 @@ export default {
batch_delete_case: '批量删除',
batch_unlink: '批量取消关联',
project_name: '所属项目',
status: '评审状态',
status: '评审结果',
status_prepare: '未评审',
status_pass: '通过',
status_un_pass: '未通过',

View File

@ -282,7 +282,7 @@ export default {
select: '選擇組織',
delete_warning: '刪除該組織將同步刪除該組織下所有相關工作空間和相關工作空間下的所有項目,以及項目中的所有用例、接口測試、性能測試等,確定要刪除嗎?',
service_integration: '服務集成',
defect_manage: '缺陷管理平臺',
defect_manage: '項目管理平臺',
message_settings: '消息設置',
message: {
jenkins_task_notification: 'Jenkins接口調用任務通知',