From 2359db7aa1a60c7a15aa9572080daecef9a9c33d Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Mon, 31 Oct 2022 18:27:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8A=A5=E5=91=8A=E7=BB=9F=E8=AE=A1):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=B3=E9=97=AD=E5=AE=9A=E6=97=B6=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=8F=90=E7=A4=BA=E6=A1=86=E6=8F=90=E7=A4=BA=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1018953 --user=宋天阳 【报表统计】项目报告-关闭定时任务弹框提示信息错误 https://www.tapd.cn/55049933/s/1284059 --- .../components/list/ProjectReportList.vue | 48 ++++++++----------- 1 file changed, 20 insertions(+), 28 deletions(-) diff --git a/report-stat/frontend/src/business/enterprisereport/components/list/ProjectReportList.vue b/report-stat/frontend/src/business/enterprisereport/components/list/ProjectReportList.vue index b3a25e1880..22a2cefffe 100644 --- a/report-stat/frontend/src/business/enterprisereport/components/list/ProjectReportList.vue +++ b/report-stat/frontend/src/business/enterprisereport/components/list/ProjectReportList.vue @@ -197,8 +197,8 @@ export default { }, scheduleChange(row) { let titles = this.$t('api_test.home_page.running_task_list.confirm.open_title'); - if (row.scheduleIsOpen) { - this.$t('api_test.home_page.running_task_list.confirm.close_title'); + if (!row.scheduleIsOpen) { + titles = this.$t('api_test.home_page.running_task_list.confirm.close_title'); } let param = {id: row.scheduleId, enable: row.scheduleIsOpen}; row.scheduleIsOpen = !row.scheduleIsOpen; @@ -262,36 +262,28 @@ export default { }); }, deleteReport(row) { - this.$alert(this.$t('commons.confirm') + this.$t('commons.delete') + row.name + "?", '', { - confirmButtonText: this.$t('commons.confirm'), - callback: (action) => { - if (action === 'confirm') { - let param = {id: row.id, projectId: getCurrentProjectID()}; - deleteEnterpriseReport(param).then(() => { - this.$success(this.$t('commons.delete_success')); - this.initTableData(); - }); - } - } + let alertMsg = this.$t('commons.confirm') + this.$t('commons.delete') + row.name + "?"; + operationConfirm(this, alertMsg, () => { + let param = {id: row.id, projectId: getCurrentProjectID()}; + deleteEnterpriseReport(param).then(() => { + this.$success(this.$t('commons.delete_success')); + this.initTableData(); + }); }); }, handleBatchDelete() { - this.$alert(this.$t('api_report.delete_batch_confirm') + "?", '', { - confirmButtonText: this.$t('commons.confirm'), - callback: (action) => { - if (action === 'confirm') { - if (!this.condition.selectAll) { - let selectRows = this.$refs.msTable.selectRows; - let ids = Array.from(selectRows).map(row => row.id); - this.condition.ids = ids; - } - deleteEnterpriseReport(this.condition).then(() => { - this.condition.ids = []; - this.$success(this.$t('commons.delete_success')); - this.initTableData(); - }); - } + let alertMsg = this.$t('api_report.delete_batch_confirm') + "?"; + operationConfirm(this, alertMsg, () => { + if (!this.condition.selectAll) { + let selectRows = this.$refs.msTable.selectRows; + let ids = Array.from(selectRows).map(row => row.id); + this.condition.ids = ids; } + deleteEnterpriseReport(this.condition).then(() => { + this.condition.ids = []; + this.$success(this.$t('commons.delete_success')); + this.initTableData(); + }); }); }, copyProjectReport(row) {