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(() => { - +