refactor: 测试计划用例添加保存按钮
This commit is contained in:
parent
1f9eb6d616
commit
272a85c4cb
|
@ -137,6 +137,9 @@ export default {
|
||||||
updateRemark(text) {
|
updateRemark(text) {
|
||||||
this.form.remark = text;
|
this.form.remark = text;
|
||||||
},
|
},
|
||||||
|
reset() {
|
||||||
|
this.tabActiveName = "remark";
|
||||||
|
},
|
||||||
fileValidator(file) {
|
fileValidator(file) {
|
||||||
/// todo: 是否需要对文件内容和大小做限制
|
/// todo: 是否需要对文件内容和大小做限制
|
||||||
return file.size > 0;
|
return file.size > 0;
|
||||||
|
|
|
@ -27,7 +27,10 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col class="head-right" :span="20">
|
<el-col class="head-right" :span="20">
|
||||||
<ms-previous-next-button :index="index" @pre="handlePre" @next="saveCase(true)" :list="testCases"/>
|
<ms-previous-next-button :index="index" @pre="handlePre" @next="saveCase(true, true)" :list="testCases"/>
|
||||||
|
<el-button class="save-btn" type="primary" size="mini" :disabled="isReadOnly" @click="saveCase(true)">
|
||||||
|
{{$t('test_track.save')}} & 下一条
|
||||||
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -186,7 +189,7 @@ export default {
|
||||||
formLabelWidth: "100px",
|
formLabelWidth: "100px",
|
||||||
isCustomFiledActive: false,
|
isCustomFiledActive: false,
|
||||||
otherInfoActive: true,
|
otherInfoActive: true,
|
||||||
isReadOnly: false
|
isReadOnly: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
@ -266,7 +269,7 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
saveCase(next) {
|
saveCase(next, noTip) {
|
||||||
let param = {};
|
let param = {};
|
||||||
param.id = this.testCase.id;
|
param.id = this.testCase.id;
|
||||||
param.status = this.testCase.status;
|
param.status = this.testCase.status;
|
||||||
|
@ -292,7 +295,9 @@ export default {
|
||||||
this.$request(option, (response) => {
|
this.$request(option, (response) => {
|
||||||
|
|
||||||
});
|
});
|
||||||
this.$success(this.$t('commons.save_success'));
|
if (!noTip) {
|
||||||
|
this.$success(this.$t('commons.save_success') + ' -> ' + this.$t('test_track.plan_view.next_case'));
|
||||||
|
}
|
||||||
this.updateTestCases(param);
|
this.updateTestCases(param);
|
||||||
this.setPlanStatus(this.testCase.planId);
|
this.setPlanStatus(this.testCase.planId);
|
||||||
if (next && this.index < this.testCases.length - 1) {
|
if (next && this.index < this.testCases.length - 1) {
|
||||||
|
@ -389,6 +394,9 @@ export default {
|
||||||
this.testCaseTemplate = template;
|
this.testCaseTemplate = template;
|
||||||
initFuc(testCase);
|
initFuc(testCase);
|
||||||
});
|
});
|
||||||
|
if (this.$refs.otherInfo) {
|
||||||
|
this.$refs.otherInfo.reset();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
testRun(reportId) {
|
testRun(reportId) {
|
||||||
this.testCase.reportId = reportId;
|
this.testCase.reportId = reportId;
|
||||||
|
@ -531,4 +539,8 @@ p {
|
||||||
height: 550px;
|
height: 550px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.save-btn {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue