style: 改个名称
This commit is contained in:
@@ -148,6 +148,62 @@ function fnTableSize({ key }: MenuInfo) {
|
||||
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>) {
|
||||
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(() => {
|
||||
</a-tooltip>
|
||||
<a-tooltip>
|
||||
<template #title>{{ t('common.sizeText') }}</template>
|
||||
<a-dropdown trigger="click">
|
||||
<a-dropdown trigger="click" placement="bottomRight">
|
||||
<a-button type="text">
|
||||
<template #icon><ColumnHeightOutlined /></template>
|
||||
</a-button>
|
||||
@@ -497,15 +552,15 @@ onMounted(() => {
|
||||
:selected-keys="[tableState.size as string]"
|
||||
@click="fnTableSize"
|
||||
>
|
||||
<a-menu-item key="default">{{
|
||||
t('common.size.default')
|
||||
}}</a-menu-item>
|
||||
<a-menu-item key="middle">{{
|
||||
t('common.size.middle')
|
||||
}}</a-menu-item>
|
||||
<a-menu-item key="small">{{
|
||||
t('common.size.small')
|
||||
}}</a-menu-item>
|
||||
<a-menu-item key="default">
|
||||
{{ t('common.size.default') }}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="middle">
|
||||
{{ t('common.size.middle') }}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="small">
|
||||
{{ t('common.size.small') }}
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
@@ -531,7 +586,7 @@ onMounted(() => {
|
||||
<template #title>{{
|
||||
t('views.configManage.softwareManage.downBtn')
|
||||
}}</template>
|
||||
<a-button type="link" @click.prevent="fnDownloadFile(record)">
|
||||
<a-button type="link" @click.prevent="fnSendFile(record)">
|
||||
<template #icon><SendOutlined /></template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
@@ -539,7 +594,7 @@ onMounted(() => {
|
||||
<template #title>{{
|
||||
t('views.configManage.softwareManage.actBtn')
|
||||
}}</template>
|
||||
<a-button type="link" @click.prevent="fnDownloadFile(record)">
|
||||
<a-button type="link" @click.prevent="fnRunFile(record)">
|
||||
<template #icon><ThunderboltOutlined /></template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
|
||||
Reference in New Issue
Block a user