Merge branch 'master' of https://github.com/metersphere/metersphere
This commit is contained in:
commit
c94aab0219
|
@ -3,7 +3,7 @@ name: BUG 提交
|
|||
about: 提交产品缺陷帮助我们更好的改进
|
||||
title: "[BUG]"
|
||||
labels: bug
|
||||
assignees: AgAngle
|
||||
assignees: xulinde
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -168,20 +168,35 @@ public class TestPlanService {
|
|||
|
||||
public int editTestPlan(TestPlanDTO testPlan) {
|
||||
editTestPlanProject(testPlan);
|
||||
testPlan.setUpdateTime(System.currentTimeMillis());
|
||||
checkTestPlanExist(testPlan);
|
||||
//进行中状态,写入实际开始时间
|
||||
if (TestPlanStatus.Underway.name().equals(testPlan.getStatus())) {
|
||||
testPlan.setActualStartTime(System.currentTimeMillis());
|
||||
} else if (TestPlanStatus.Completed.name().equals(testPlan.getStatus())) {
|
||||
//已完成,写入实际完成时间
|
||||
testPlan.setActualEndTime(System.currentTimeMillis());
|
||||
|
||||
TestPlan res = testPlanMapper.selectByPrimaryKey(testPlan.getId()); // 先查一次库
|
||||
if (!res.getStatus().equals(testPlan.getStatus())) { // 若有改变才更新时间
|
||||
res.setUpdateTime(System.currentTimeMillis());
|
||||
if (TestPlanStatus.Underway.name().equals(testPlan.getStatus())) {
|
||||
if (res.getStatus().equals(TestPlanStatus.Prepare.name())) {
|
||||
res.setActualStartTime(System.currentTimeMillis());
|
||||
} // 未开始->进行中,写入实际开始时间
|
||||
else if (res.getStatus().equals(TestPlanStatus.Completed.name())) {
|
||||
res.setActualEndTime(null);
|
||||
} // 已完成->进行中,结束时间置空
|
||||
}
|
||||
else if (!res.getStatus().equals(TestPlanStatus.Prepare.name()) &&
|
||||
testPlan.getStatus().equals(TestPlanStatus.Prepare.name())) {
|
||||
res.setActualStartTime(null);
|
||||
res.setActualEndTime(null);
|
||||
} // 非未开始->未开始,时间都置空
|
||||
else if (TestPlanStatus.Completed.name().equals(testPlan.getStatus()) &&
|
||||
!TestPlanStatus.Completed.name().equals(res.getStatus())) {
|
||||
//已完成,写入实际完成时间
|
||||
res.setActualEndTime(System.currentTimeMillis());
|
||||
}
|
||||
res.setStatus(testPlan.getStatus());
|
||||
}
|
||||
|
||||
List<String> userIds = new ArrayList<>();
|
||||
userIds.add(testPlan.getPrincipal());
|
||||
AddTestPlanRequest testPlans = new AddTestPlanRequest();
|
||||
int i = testPlanMapper.updateByPrimaryKeySelective(testPlan);
|
||||
int i = testPlanMapper.updateByPrimaryKey(res); // 更新
|
||||
if (!StringUtils.isBlank(testPlan.getStatus())) {
|
||||
BeanUtils.copyBean(testPlans, getTestPlan(testPlan.getId()));
|
||||
String context = getTestPlanContext(testPlans, NoticeConstants.Event.UPDATE);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<!--操作按钮-->
|
||||
<div class="ms-opt-btn">
|
||||
<el-button type="primary" size="small" @click="editScenario" title="ctrl + s">{{$t('commons.save')}}</el-button>
|
||||
<el-button id="inputDelay" type="primary" size="small" @click="editScenario" title="ctrl + s">{{$t('commons.save')}}</el-button>
|
||||
</div>
|
||||
|
||||
<div class="tip">{{$t('test_track.plan_view.base_info')}}</div>
|
||||
|
@ -834,6 +834,7 @@
|
|||
return bodyUploadFiles;
|
||||
},
|
||||
editScenario() {
|
||||
document.getElementById("inputDelay").focus(); // 保存前在input框自动失焦,以免保存失败
|
||||
this.$refs['currentScenario'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.setParameter();
|
||||
|
|
|
@ -270,22 +270,6 @@
|
|||
openEnvironmentConfig(project) {
|
||||
this.$refs.environmentConfig.open(project.id);
|
||||
},
|
||||
handleEvent(event) {
|
||||
let enter = event.keyCode;
|
||||
let ctrl = event.ctrlKey;
|
||||
let shift = event.shiftKey;
|
||||
let alt = event.altKey;
|
||||
if(enter === 13 && ctrl && !shift && !alt) {
|
||||
//ctrl + enter
|
||||
this.form.description += '\n';
|
||||
}
|
||||
if(enter === 13 && !ctrl && shift && !alt) {
|
||||
//shift + enter
|
||||
}
|
||||
if(enter === 13 && !ctrl && !shift && !alt) {
|
||||
this.submit('form')
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
document.addEventListener('keydown', this.handleEvent)
|
||||
|
|
|
@ -257,7 +257,17 @@ export default {
|
|||
statusChange(param) {
|
||||
this.$post('/test/plan/edit', param, () => {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (this.tableData[i].id == param.id) {
|
||||
if (this.tableData[i].id == param.id) { // 手动修改当前状态后,前端结束时间先用当前时间,等刷新后变成后台数据(相等)
|
||||
if (this.tableData[i].status !== "Completed" && param.status === "Completed") {
|
||||
this.tableData[i].actualEndTime = new Date();
|
||||
} // 非完成->已完成,结束时间=null
|
||||
else if (this.tableData[i].status !== "Underway" && param.status === "Underway") {
|
||||
this.tableData[i].actualStartTime = new Date();
|
||||
this.tableData[i].actualEndTime = "";
|
||||
} // 非进行中->进行中,结束时间=null
|
||||
else if (this.tableData[i].status !== "Prepare" && param.status === "Prepare") {
|
||||
this.tableData[i].actualStartTime = this.tableData[i].actualEndTime = "";
|
||||
} // 非未开始->未开始,结束时间=null
|
||||
this.tableData[i].status = param.status;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -18,20 +18,12 @@
|
|||
@click="dialogFormVisible=true">
|
||||
{{ $t('report.test_stop_now') }}
|
||||
</el-button>
|
||||
<!-- <el-button :disabled="isReadOnly || report.status !== 'Completed'" type="success" plain size="mini"-->
|
||||
<!-- @click="rerun(testId)">-->
|
||||
<!-- {{ $t('report.test_execute_again') }}-->
|
||||
<!-- </el-button>-->
|
||||
<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" type="warning" plain size="mini" @click="downloadJtl()">
|
||||
{{ $t('report.downloadJtl') }}
|
||||
</el-button>
|
||||
|
||||
<!--<el-button :disabled="isReadOnly" type="warning" plain size="mini">-->
|
||||
<!--{{$t('report.compare')}}-->
|
||||
<!--</el-button>-->
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
@ -159,7 +151,6 @@ export default {
|
|||
this.testName = data.testName;
|
||||
this.projectId = data.projectId;
|
||||
this.projectName = data.projectName;
|
||||
//
|
||||
if (callback) callback(res);
|
||||
} else {
|
||||
this.$error(this.$t('report.not_exist'));
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
ref="nodeTree"/>
|
||||
</template>
|
||||
|
||||
<!-- <ms-table-header :condition.sync="condition" @search="search" title="" :show-create="false"/>-->
|
||||
|
||||
<el-table
|
||||
v-loading="result.loading"
|
||||
|
@ -30,11 +29,6 @@
|
|||
:label="$t('commons.name')"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="userName"-->
|
||||
<!-- :label="$t('load_test.user_name')"-->
|
||||
<!-- show-overflow-tooltip>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column
|
||||
prop="status"
|
||||
column-key="status"
|
||||
|
|
|
@ -48,14 +48,6 @@
|
|||
<span>{{ scope.row.createTime | timestampFormatDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column-->
|
||||
<!-- sortable-->
|
||||
<!-- prop="updateTime"-->
|
||||
<!-- :label="$t('commons.update_time')">-->
|
||||
<!-- <template v-slot:default="scope">-->
|
||||
<!-- <span>{{ scope.row.updateTime | timestampFormatDate }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column
|
||||
prop="status"
|
||||
column-key="status"
|
||||
|
@ -143,9 +135,6 @@ export default {
|
|||
status: 'default',
|
||||
screenHeight: document.documentElement.clientHeight - 330,//屏幕高度
|
||||
buttons: [
|
||||
// {
|
||||
// name: "批量编辑用例", handleClick: this.handleBatchEdit
|
||||
// },
|
||||
{
|
||||
name: this.$t('test_track.plan.load_case.unlink_in_bulk'), handleClick: this.handleDeleteBatch
|
||||
},
|
||||
|
@ -238,9 +227,6 @@ export default {
|
|||
this.selectRows.add(row);
|
||||
}
|
||||
},
|
||||
// handleBatchEdit() {
|
||||
//
|
||||
// },
|
||||
handleDeleteBatch() {
|
||||
this.$alert(this.$t('test_track.plan_view.confirm_cancel_relevance') + "?", '', {
|
||||
confirmButtonText: this.$t('commons.confirm'),
|
||||
|
@ -325,7 +311,6 @@ export default {
|
|||
this.$refs.loadCaseReport.drawer = true;
|
||||
} else {
|
||||
this.$warning(this.$t('test_track.plan.load_case.report_not_found'));
|
||||
// this.initTable();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
:show-create="false"
|
||||
:tip="$t('commons.search_by_name_or_id')">
|
||||
<template v-slot:title>
|
||||
性能用例
|
||||
{{ $t('test_track.plan.load_case.case') }}
|
||||
</template>
|
||||
<template v-slot:button>
|
||||
<ms-table-button :is-tester-permission="true" icon="el-icon-connection"
|
||||
|
|
|
@ -1 +1 @@
|
|||
export const PHONE_REGEX = '^1(3|4|5|6|7|8|9)\\d{9}$';
|
||||
export const PHONE_REGEX = '^1(3|4|5|6|7|8|9)\\d{9}$';
|
||||
|
|
|
@ -1131,6 +1131,7 @@ export default {
|
|||
plan_delete_tip: "The test plan is under way, please confirm and delete it!",
|
||||
plan_delete: "Delete test plan",
|
||||
load_case: {
|
||||
case: "Load Case",
|
||||
execution_status: "Execution status",
|
||||
report: "report",
|
||||
view_report: "View report",
|
||||
|
|
|
@ -1135,6 +1135,7 @@ export default {
|
|||
plan_delete_tip: "该测试计划正在进行中,请确认再删除!",
|
||||
plan_delete: "删除计划",
|
||||
load_case: {
|
||||
case: "性能用例",
|
||||
execution_status: "执行状态",
|
||||
report: "报告",
|
||||
view_report: "查看报告",
|
||||
|
|
|
@ -1133,6 +1133,7 @@ export default {
|
|||
plan_delete_tip: "該測試計劃正在進行中,請確認再刪除!",
|
||||
plan_delete: "刪除計劃",
|
||||
load_case: {
|
||||
case: "性能用例",
|
||||
execution_status: "執行狀態",
|
||||
report: "報告",
|
||||
view_report: "查看報告",
|
||||
|
|
Loading…
Reference in New Issue