Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
wenyann 2020-05-25 19:14:30 +08:00
commit 66b12adc03
6 changed files with 20 additions and 5 deletions

View File

@ -66,6 +66,9 @@ public class TestPlanService {
ExtProjectMapper extProjectMapper;
public void addTestPlan(TestPlan testPlan) {
if (getTestPlanByName(testPlan.getName()).size() > 0) {
MSException.throwException(Translator.get("plan_name_already_exists"));
};
testPlan.setId(UUID.randomUUID().toString());
testPlan.setStatus(TestPlanStatus.Prepare.name());
testPlan.setCreateTime(System.currentTimeMillis());
@ -73,6 +76,13 @@ public class TestPlanService {
testPlanMapper.insert(testPlan);
}
public List<TestPlan> getTestPlanByName(String name) {
TestPlanExample example = new TestPlanExample();
example.createCriteria().andWorkspaceIdEqualTo(SessionUtils.getCurrentWorkspaceId())
.andNameEqualTo(name);
return testPlanMapper.selectByExample(example);
}
public TestPlan getTestPlan(String testPlanId) {
return testPlanMapper.selectByPrimaryKey(testPlanId);
}

View File

@ -5,6 +5,7 @@ cannot_be_null=\tCannot be empty
number=Number
row=row
error=error
connection_failed=Connection failed
#user related
user_email_already_exists=User email already exists
user_name_is_null=User name cannot be null
@ -87,5 +88,5 @@ do_not_modify_header_order=Do not modify the header order
module_created_automatically=If there is no such module, will be created automatically
options=options
please_input_workspace_member=Please input workspace merber
test_case_report_template_repeat=The workspace has the same name template
connection_failed=Connection failed
test_case_report_template_repeat=The workspace has the same name template
plan_name_already_exists=Test plan name already exists

View File

@ -13,6 +13,7 @@ password_is_null=密码不能为空
user_id_already_exists=用户id已存在
password_modification_failed=密码修改失败
cannot_delete_current_user=无法删除当前登录用户
connection_failed=连接失败
#load test
edit_load_test_not_found=无法编辑测试,未找到测试:
run_load_test_not_found=无法运行测试,未找到测试:
@ -88,4 +89,4 @@ module_created_automatically=若无该模块将自动创建
options=选项
please_input_workspace_member=请填写该工作空间相关人员
test_case_report_template_repeat=同一工作空间下不能存在同名模版
connection_failed=连接失败
plan_name_already_exists=测试计划名称已存在

View File

@ -5,6 +5,7 @@ cannot_be_null=不能為空
number=
row=
error=出錯
connection_failed=連接失敗
#user related
user_email_already_exists=用戶郵箱已存在
user_name_is_null=用戶名不能為空
@ -87,4 +88,5 @@ do_not_modify_header_order=請勿修改表頭順序
module_created_automatically=若無該模塊將自動創建
options=選項
please_input_workspace_member=請填寫該工作空間相關人員
test_case_report_template_repeat=同壹工作空間下不能存在同名模版
test_case_report_template_repeat=同壹工作空間下不能存在同名模版
plan_name_already_exists=測試計劃名稱已存在

View File

@ -169,7 +169,7 @@
this.fileList.splice(index, 1);
this.tableData.splice(index, 1);
//
let i = this.uploadList.indexOf(file);
let i = this.uploadList.findIndex(upLoadFile => upLoadFile.name === file.name);
if (i > -1) {
this.uploadList.splice(i, 1);
}

View File

@ -22,6 +22,7 @@
<el-col :span="11" :offset="2">
<el-form-item :label="$t('test_track.plan.plan_project')" :label-width="formLabelWidth" prop="projectId">
<el-select
:disabled="(form.status == null) ? false : true"
v-model="form.projectId"
:placeholder="$t('test_track.plan.input_plan_project')"
filterable>