style: 改个名称
This commit is contained in:
@@ -148,6 +148,62 @@ function fnTableSize({ key }: MenuInfo) {
|
|||||||
tableState.size = key as SizeType;
|
tableState.size = key as SizeType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**信息文件下发 */
|
||||||
|
function fnSendFile(row: Record<string, any>) {
|
||||||
|
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<string, any>) {
|
||||||
|
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<string, any>) {
|
function fnDownloadFile(row: Record<string, any>) {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
@@ -284,7 +340,6 @@ function fnModalOk() {
|
|||||||
.then(e => {
|
.then(e => {
|
||||||
modalState.confirmLoading = true;
|
modalState.confirmLoading = true;
|
||||||
const from = toRaw(modalState.from);
|
const from = toRaw(modalState.from);
|
||||||
console.log(from);
|
|
||||||
let formData = new FormData();
|
let formData = new FormData();
|
||||||
formData.append('nf', from.neType);
|
formData.append('nf', from.neType);
|
||||||
formData.append('version', from.version);
|
formData.append('version', from.version);
|
||||||
@@ -488,7 +543,7 @@ onMounted(() => {
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template #title>{{ t('common.sizeText') }}</template>
|
<template #title>{{ t('common.sizeText') }}</template>
|
||||||
<a-dropdown trigger="click">
|
<a-dropdown trigger="click" placement="bottomRight">
|
||||||
<a-button type="text">
|
<a-button type="text">
|
||||||
<template #icon><ColumnHeightOutlined /></template>
|
<template #icon><ColumnHeightOutlined /></template>
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -497,15 +552,15 @@ onMounted(() => {
|
|||||||
:selected-keys="[tableState.size as string]"
|
:selected-keys="[tableState.size as string]"
|
||||||
@click="fnTableSize"
|
@click="fnTableSize"
|
||||||
>
|
>
|
||||||
<a-menu-item key="default">{{
|
<a-menu-item key="default">
|
||||||
t('common.size.default')
|
{{ t('common.size.default') }}
|
||||||
}}</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item key="middle">{{
|
<a-menu-item key="middle">
|
||||||
t('common.size.middle')
|
{{ t('common.size.middle') }}
|
||||||
}}</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item key="small">{{
|
<a-menu-item key="small">
|
||||||
t('common.size.small')
|
{{ t('common.size.small') }}
|
||||||
}}</a-menu-item>
|
</a-menu-item>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
</template>
|
</template>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
@@ -531,7 +586,7 @@ onMounted(() => {
|
|||||||
<template #title>{{
|
<template #title>{{
|
||||||
t('views.configManage.softwareManage.downBtn')
|
t('views.configManage.softwareManage.downBtn')
|
||||||
}}</template>
|
}}</template>
|
||||||
<a-button type="link" @click.prevent="fnDownloadFile(record)">
|
<a-button type="link" @click.prevent="fnSendFile(record)">
|
||||||
<template #icon><SendOutlined /></template>
|
<template #icon><SendOutlined /></template>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
@@ -539,7 +594,7 @@ onMounted(() => {
|
|||||||
<template #title>{{
|
<template #title>{{
|
||||||
t('views.configManage.softwareManage.actBtn')
|
t('views.configManage.softwareManage.actBtn')
|
||||||
}}</template>
|
}}</template>
|
||||||
<a-button type="link" @click.prevent="fnDownloadFile(record)">
|
<a-button type="link" @click.prevent="fnRunFile(record)">
|
||||||
<template #icon><ThunderboltOutlined /></template>
|
<template #icon><ThunderboltOutlined /></template>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
|
|||||||
Reference in New Issue
Block a user