fix: 修复点击取消关闭定时任务,switch仍然会显示被关闭 (#1640)

* feat(测试跟踪): 测试用例下载模版增加标签列

* fix(接口定义): 扩大请求头键长度

* fix: schedule表对旧数据name字段兼容的补充

* fix: 修复点击取消关闭定时任务,switch仍然会显示被关闭
This commit is contained in:
Coooder-X 2021-03-18 14:48:47 +08:00 committed by GitHub
parent f5ec3169ea
commit 1696001475
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -127,11 +127,18 @@ export default {
let param = {};
param.taskID = this.schedule.id;
param.enable = flag;
let that = this;
if(flag == false) {
this.$confirm(this.$t('api_test.home_page.running_task_list.confirm.close_title'), this.$t('commons.prompt'), {
confirmButtonText: this.$t('commons.confirm'),
cancelButtonText: this.$t('commons.cancel'),
type: 'warning'
type: 'warning',
beforeClose(action, instance, done) {
if(action == 'cancel') { // messageBox switch
that.schedule.enable = param.enable = true;
}
done(); // done messageBox
},
}).then(() => {
this.updateTask(param);
}).catch(() => {