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: '',
|
stage: '',
|
||||||
description: ''
|
description: ''
|
||||||
},
|
},
|
||||||
|
dbProjectIds: [],
|
||||||
rules: {
|
rules: {
|
||||||
name: [
|
name: [
|
||||||
{required: true, message: this.$t('test_track.plan.input_plan_name'), trigger: 'blur'},
|
{required: true, message: this.$t('test_track.plan.input_plan_name'), trigger: 'blur'},
|
||||||
|
@ -159,6 +160,7 @@ export default {
|
||||||
let tmp = {};
|
let tmp = {};
|
||||||
Object.assign(tmp, testPlan);
|
Object.assign(tmp, testPlan);
|
||||||
Object.assign(this.form, tmp);
|
Object.assign(this.form, tmp);
|
||||||
|
this.dbProjectIds = JSON.parse(JSON.stringify(this.form.projectIds));
|
||||||
}
|
}
|
||||||
listenGoBack(this.close);
|
listenGoBack(this.close);
|
||||||
this.dialogFormVisible = true;
|
this.dialogFormVisible = true;
|
||||||
|
@ -176,15 +178,25 @@ export default {
|
||||||
param.workspaceId = localStorage.getItem(WORKSPACE_ID);
|
param.workspaceId = localStorage.getItem(WORKSPACE_ID);
|
||||||
|
|
||||||
if (this.operationType === 'edit') {
|
if (this.operationType === 'edit') {
|
||||||
this.$confirm('取消项目关联会同时取消该项目下已关联的测试用例', '提示', {
|
const nowIds = param.projectIds;
|
||||||
confirmButtonText: this.$t('commons.confirm'),
|
let sign = true;
|
||||||
cancelButtonText: this.$t('commons.cancel'),
|
this.dbProjectIds.forEach(dbId => {
|
||||||
type: 'warning'
|
if (nowIds.indexOf(dbId) === -1 && sign) {
|
||||||
}).then(() => {
|
sign = false;
|
||||||
this.editTestPlan(param);
|
this.$confirm('取消项目关联会同时取消该项目下已关联的测试用例', '提示', {
|
||||||
}).catch(() => {
|
confirmButtonText: this.$t('commons.confirm'),
|
||||||
this.$info(this.$t('commons.cancel'))
|
cancelButtonText: this.$t('commons.cancel'),
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.editTestPlan(param);
|
||||||
|
}).catch(() => {
|
||||||
|
this.$info(this.$t('commons.cancel'))
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
if (sign) {
|
||||||
|
this.editTestPlan(param);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.editTestPlan(param);
|
this.editTestPlan(param);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 0a375848d034d20eaf05caf11769e1c75c39235c
|
Subproject commit f2d5a342c82e629f510550d5778d752bb73bf5e7
|
Loading…
Reference in New Issue