|
|
@@ -21,7 +21,6 @@
|
|
|
<a-button type="primary" @click="toggleRowShow">{{ btn_text }}</a-button>
|
|
|
<a-button type="primary" @click="addGroupFn"> 添加 </a-button>
|
|
|
<a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
|
|
|
- <a-button @click="openModal"> 导出 </a-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #action="{ record, column }">
|
|
|
@@ -40,7 +39,6 @@
|
|
|
import { columns } from './data';
|
|
|
import { useUserStore } from '/@/store/modules/user';
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
- import { jsonToSheetXlsx, ExpExcelModel, ExportModalResult } from '/@/components/Excel';
|
|
|
import { Modal } from 'ant-design-vue';
|
|
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
|
|
import {
|
|
|
@@ -78,7 +76,7 @@
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'Group',
|
|
|
- components: { CollapseContainer, BasicTable, TableAction, Popup, ExpExcelModel },
|
|
|
+ components: { CollapseContainer, BasicTable, TableAction, Popup },
|
|
|
setup() {
|
|
|
const userStore = useUserStore();
|
|
|
const groups = userStore.getUserInfo.groups as Group[];
|
|
|
@@ -126,7 +124,6 @@
|
|
|
showIndexColumn: false,
|
|
|
bordered: true,
|
|
|
});
|
|
|
- const [register, { openModal }] = useModal();
|
|
|
const [addRegister, { openModal: openPopup }] = useModal();
|
|
|
|
|
|
function beforeFetch(params) {
|
|
|
@@ -281,18 +278,6 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // 导出
|
|
|
- function defaultHeader({ filename, bookType }: ExportModalResult) {
|
|
|
- // 默认Object.keys(data[0])作为header
|
|
|
- jsonToSheetXlsx({
|
|
|
- data: getTableAction().getDataSource(),
|
|
|
- filename,
|
|
|
- write2excelOpts: {
|
|
|
- bookType,
|
|
|
- },
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
function createActions(record: EditRecordRow): ActionItem[] {
|
|
|
if (record.pid === 0 || group_ids.includes(record.id)) {
|
|
|
return [
|
|
|
@@ -336,9 +321,6 @@
|
|
|
addRegister,
|
|
|
saveData,
|
|
|
ExpandAllRows,
|
|
|
- defaultHeader,
|
|
|
- openModal,
|
|
|
- register,
|
|
|
...toRefs(btn),
|
|
|
};
|
|
|
},
|