From 297cd870fae64ca4a0f3bd7245261d22de22b4fc Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Thu, 28 Sep 2023 17:06:10 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E6=94=B9=E4=B8=AA=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configManage/softwareManage/index.vue | 81 ++++++++++++++++--- 1 file changed, 68 insertions(+), 13 deletions(-) diff --git a/src/views/configManage/softwareManage/index.vue b/src/views/configManage/softwareManage/index.vue index 861cf6c1..e951d04e 100644 --- a/src/views/configManage/softwareManage/index.vue +++ b/src/views/configManage/softwareManage/index.vue @@ -148,6 +148,62 @@ function fnTableSize({ key }: MenuInfo) { tableState.size = key as SizeType; } +/**信息文件下发 */ +function fnSendFile(row: Record) { + Modal.confirm({ + title: '提示', + content: `确认下发编号为 【${row.id}】 的数据项文件?`, + onOk() { + const key = 'downloadNeSoftware'; + message.loading({ content: t('common.loading'), key }); + downloadNeSoftware(toRaw(row)).then(res => { + if (res.code === RESULT_CODE_SUCCESS) { + message.success({ + content: `已完成下载`, + key, + duration: 2, + }); + saveAs(res.data, `user_${Date.now()}.xlsx`); + } else { + message.error({ + content: `${res.msg}`, + key, + duration: 2, + }); + } + }); + }, + }); +} + +/**信息文件下发 */ +function fnRunFile(row: Record) { + Modal.confirm({ + title: '提示', + content: `确认激活 【${row.id}】 的数据项文件?`, + onOk() { + const key = 'downloadNeSoftware'; + message.loading({ content: t('common.loading'), key }); + downloadNeSoftware(toRaw(row)).then(res => { + if (res.code === RESULT_CODE_SUCCESS) { + message.success({ + content: `已完成下载`, + key, + duration: 2, + }); + saveAs(res.data, `user_${Date.now()}.xlsx`); + } else { + message.error({ + content: `${res.msg}`, + key, + duration: 2, + }); + } + }); + }, + }); +} + /**信息文件下载 */ function fnDownloadFile(row: Record) { Modal.confirm({ @@ -284,7 +340,6 @@ function fnModalOk() { .then(e => { modalState.confirmLoading = true; const from = toRaw(modalState.from); - console.log(from); let formData = new FormData(); formData.append('nf', from.neType); formData.append('version', from.version); @@ -488,7 +543,7 @@ onMounted(() => { - + @@ -497,15 +552,15 @@ onMounted(() => { :selected-keys="[tableState.size as string]" @click="fnTableSize" > - {{ - t('common.size.default') - }} - {{ - t('common.size.middle') - }} - {{ - t('common.size.small') - }} + + {{ t('common.size.default') }} + + + {{ t('common.size.middle') }} + + + {{ t('common.size.small') }} + @@ -531,7 +586,7 @@ onMounted(() => { - + @@ -539,7 +594,7 @@ onMounted(() => { - +