|
@@ -3,9 +3,24 @@
|
|
<ClassTree class="w-1/3 xl:w-1/4" @select="handleSelect" />
|
|
<ClassTree class="w-1/3 xl:w-1/4" @select="handleSelect" />
|
|
<BasicTable @register="registerTable" class="w-2/3 xl:w-3/4" :searchInfo="searchInfo">
|
|
<BasicTable @register="registerTable" class="w-2/3 xl:w-3/4" :searchInfo="searchInfo">
|
|
<template #toolbar>
|
|
<template #toolbar>
|
|
- <Upload :showUploadList="false" :before-upload="beforeUpload" accept=".xlsx,.xls">
|
|
|
|
- <a-button block type="primary"> 导入 </a-button>
|
|
|
|
- </Upload>
|
|
|
|
|
|
+ <Dropdown.Button>
|
|
|
|
+ 数据导入
|
|
|
|
+ <template #icon>
|
|
|
|
+ <Icon icon="carbon:document-import" :size="16" />
|
|
|
|
+ </template>
|
|
|
|
+ <template #overlay>
|
|
|
|
+ <Menu>
|
|
|
|
+ <Menu.Item>
|
|
|
|
+ <a-button block type="link" @click="handelDownloadTemplate"> 下载模板 </a-button>
|
|
|
|
+ </Menu.Item>
|
|
|
|
+ <Menu.Item>
|
|
|
|
+ <Upload :showUploadList="false" :before-upload="beforeUpload" accept=".xlsx,.xls">
|
|
|
|
+ <a-button block type="link"> 导入 </a-button>
|
|
|
|
+ </Upload>
|
|
|
|
+ </Menu.Item>
|
|
|
|
+ </Menu>
|
|
|
|
+ </template>
|
|
|
|
+ </Dropdown.Button>
|
|
</template>
|
|
</template>
|
|
<template #action="{ record }">
|
|
<template #action="{ record }">
|
|
<TableAction
|
|
<TableAction
|
|
@@ -23,11 +38,12 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
import { reactive } from 'vue';
|
|
import { reactive } from 'vue';
|
|
- import { Upload } from 'ant-design-vue';
|
|
|
|
|
|
+ import { Upload, Dropdown, Menu } from 'ant-design-vue';
|
|
import { getDataOption } from '/@/api/system/dic';
|
|
import { getDataOption } from '/@/api/system/dic';
|
|
import { PageWrapper } from '/@/components/Page';
|
|
import { PageWrapper } from '/@/components/Page';
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
|
import ClassTree from '/@/views/educational/class/components/ClassTree.vue';
|
|
import ClassTree from '/@/views/educational/class/components/ClassTree.vue';
|
|
|
|
+ import Icon from '/@/components/Icon/index';
|
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
|
|
|
@@ -37,6 +53,7 @@
|
|
getWhitelistManagementPage,
|
|
getWhitelistManagementPage,
|
|
postWhitelistManagementImport,
|
|
postWhitelistManagementImport,
|
|
} from '/@/services/apis/WhitelistManagementController';
|
|
} from '/@/services/apis/WhitelistManagementController';
|
|
|
|
+ import { downloadByUrl } from '/@/utils/file/download';
|
|
|
|
|
|
const { createConfirm, createMessage } = useMessage();
|
|
const { createConfirm, createMessage } = useMessage();
|
|
|
|
|
|
@@ -177,6 +194,13 @@
|
|
cancelText: '取消',
|
|
cancelText: '取消',
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+ function handelDownloadTemplate() {
|
|
|
|
+ downloadByUrl({
|
|
|
|
+ url: 'https://zhxy.cqtlzjzx.com/minio/static/resources/%E7%99%BD%E5%90%8D%E5%8D%95%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx',
|
|
|
|
+ fileName: '白名单模板',
|
|
|
|
+ });
|
|
|
|
+ }
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="less"></style>
|
|
<style scoped lang="less"></style>
|