fix(测试计划): 测试计划修改所属项目时的提示问题
This commit is contained in:
parent
da23e9cc46
commit
95b722e86c
|
@ -1 +1 @@
|
|||
Subproject commit d5b4969642fd8d10cc2f949d7377e0a0e5217a3a
|
||||
Subproject commit 321c869938357e8c2253e5bd86c963828664ae23
|
|
@ -131,6 +131,7 @@ export default {
|
|||
stage: '',
|
||||
description: ''
|
||||
},
|
||||
dbProjectIds: [],
|
||||
rules: {
|
||||
name: [
|
||||
{required: true, message: this.$t('test_track.plan.input_plan_name'), trigger: 'blur'},
|
||||
|
@ -159,6 +160,7 @@ export default {
|
|||
let tmp = {};
|
||||
Object.assign(tmp, testPlan);
|
||||
Object.assign(this.form, tmp);
|
||||
this.dbProjectIds = JSON.parse(JSON.stringify(this.form.projectIds));
|
||||
}
|
||||
listenGoBack(this.close);
|
||||
this.dialogFormVisible = true;
|
||||
|
@ -176,6 +178,11 @@ export default {
|
|||
param.workspaceId = localStorage.getItem(WORKSPACE_ID);
|
||||
|
||||
if (this.operationType === 'edit') {
|
||||
const nowIds = param.projectIds;
|
||||
let sign = true;
|
||||
this.dbProjectIds.forEach(dbId => {
|
||||
if (nowIds.indexOf(dbId) === -1 && sign) {
|
||||
sign = false;
|
||||
this.$confirm('取消项目关联会同时取消该项目下已关联的测试用例', '提示', {
|
||||
confirmButtonText: this.$t('commons.confirm'),
|
||||
cancelButtonText: this.$t('commons.cancel'),
|
||||
|
@ -185,6 +192,11 @@ export default {
|
|||
}).catch(() => {
|
||||
this.$info(this.$t('commons.cancel'))
|
||||
});
|
||||
}
|
||||
});
|
||||
if (sign) {
|
||||
this.editTestPlan(param);
|
||||
}
|
||||
} else {
|
||||
this.editTestPlan(param);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 0a375848d034d20eaf05caf11769e1c75c39235c
|
||||
Subproject commit f2d5a342c82e629f510550d5778d752bb73bf5e7
|
Loading…
Reference in New Issue