diff --git a/src/pages/upgrade/index.vue b/src/pages/upgrade/index.vue index 99c58706d78aac9c9009ac3afcff689754643b22..0bf59daef47bb01cd3210cd3e764c44bf637ee45 100644 --- a/src/pages/upgrade/index.vue +++ b/src/pages/upgrade/index.vue @@ -41,7 +41,16 @@ 成功 失败 + + + + + + + import dayjs from 'dayjs' import moment from 'moment' +import UpgradeInfo from './upgradeInfo/index.vue' import { nodePkgOp, nodePkgOpExport } from '@/api/upgrade' export default { + components: { + UpgradeInfo + }, data() { return { loading: false, @@ -200,6 +213,13 @@ export default { }) }, methods: { + handleUpgradeInfo(record) { + this.drawerVisible = true + this.upgardeRes = record?.opResult || '' + }, + onClose() { + this.drawerVisible = false + }, // 刷新表格 fetchTable() { this.loading = true @@ -278,20 +298,23 @@ export default { ...this.listQuery }) .then(res => { - const blob = new Blob([res]); - // 创建并配置下载链接 - const link = document.createElement('a'); - link.href = URL.createObjectURL(blob); - link.download = `升级报表_${moment().format('YYYY-MM-DD HH:mm:ss')}.xlsx`; - // 触发下载 - document.body.appendChild(link); - link.click(); - document.body.removeChild(link); - // 释放对象URL - window.URL.revokeObjectURL(link.href); - resolve(); + const blob = new Blob([res]) + + // 创建下载链接 + const link = document.createElement('a') + link.href = URL.createObjectURL(blob) + + link.setAttribute('download', `升级报表_${moment().format('YYYY-MM-DD HH:mm:ss')}.xlsx`) + + document.body.appendChild(link) + link.click() + document.body.removeChild(link) + window.URL.revokeObjectURL(link.href) + resolve() }) .catch(err => reject(err)) + .finally(() => { + }) }) }, diff --git a/src/pages/upgrade/upgradeInfo/index.vue b/src/pages/upgrade/upgradeInfo/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..bc43a5f82bbf8c855f2e4c01a43aaab93ee0270c --- /dev/null +++ b/src/pages/upgrade/upgradeInfo/index.vue @@ -0,0 +1,33 @@ + + + + +