fix(报告统计): 修复关闭定时任务提示框提示错误的问题

--bug=1018953 --user=宋天阳 【报表统计】项目报告-关闭定时任务弹框提示信息错误
https://www.tapd.cn/55049933/s/1284059
This commit is contained in:
song-tianyang 2022-10-31 18:27:01 +08:00 committed by 建国
parent 112e06cf27
commit 2359db7aa1
1 changed files with 20 additions and 28 deletions

View File

@ -197,8 +197,8 @@ export default {
}, },
scheduleChange(row) { scheduleChange(row) {
let titles = this.$t('api_test.home_page.running_task_list.confirm.open_title'); let titles = this.$t('api_test.home_page.running_task_list.confirm.open_title');
if (row.scheduleIsOpen) { if (!row.scheduleIsOpen) {
this.$t('api_test.home_page.running_task_list.confirm.close_title'); titles = this.$t('api_test.home_page.running_task_list.confirm.close_title');
} }
let param = {id: row.scheduleId, enable: row.scheduleIsOpen}; let param = {id: row.scheduleId, enable: row.scheduleIsOpen};
row.scheduleIsOpen = !row.scheduleIsOpen; row.scheduleIsOpen = !row.scheduleIsOpen;
@ -262,24 +262,18 @@ export default {
}); });
}, },
deleteReport(row) { deleteReport(row) {
this.$alert(this.$t('commons.confirm') + this.$t('commons.delete') + row.name + "", '', { let alertMsg = this.$t('commons.confirm') + this.$t('commons.delete') + row.name + "";
confirmButtonText: this.$t('commons.confirm'), operationConfirm(this, alertMsg, () => {
callback: (action) => {
if (action === 'confirm') {
let param = {id: row.id, projectId: getCurrentProjectID()}; let param = {id: row.id, projectId: getCurrentProjectID()};
deleteEnterpriseReport(param).then(() => { deleteEnterpriseReport(param).then(() => {
this.$success(this.$t('commons.delete_success')); this.$success(this.$t('commons.delete_success'));
this.initTableData(); this.initTableData();
}); });
}
}
}); });
}, },
handleBatchDelete() { handleBatchDelete() {
this.$alert(this.$t('api_report.delete_batch_confirm') + "", '', { let alertMsg = this.$t('api_report.delete_batch_confirm') + "?";
confirmButtonText: this.$t('commons.confirm'), operationConfirm(this, alertMsg, () => {
callback: (action) => {
if (action === 'confirm') {
if (!this.condition.selectAll) { if (!this.condition.selectAll) {
let selectRows = this.$refs.msTable.selectRows; let selectRows = this.$refs.msTable.selectRows;
let ids = Array.from(selectRows).map(row => row.id); let ids = Array.from(selectRows).map(row => row.id);
@ -290,8 +284,6 @@ export default {
this.$success(this.$t('commons.delete_success')); this.$success(this.$t('commons.delete_success'));
this.initTableData(); this.initTableData();
}); });
}
}
}); });
}, },
copyProjectReport(row) { copyProjectReport(row) {