fix: 修复点击取消关闭定时任务,switch仍然会显示被关闭 (#1640)
* feat(测试跟踪): 测试用例下载模版增加标签列 * fix(接口定义): 扩大请求头键长度 * fix: schedule表对旧数据name字段兼容的补充 * fix: 修复点击取消关闭定时任务,switch仍然会显示被关闭
This commit is contained in:
parent
f5ec3169ea
commit
1696001475
|
@ -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(() => {
|
||||
|
|
Loading…
Reference in New Issue