|
@@ -2,9 +2,9 @@
|
|
|
<div>
|
|
|
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
|
|
<template #tableTitle>
|
|
|
- <a-button preIcon="ant-design:plus-outlined" type="primary" @click="handleAdd">新建</a-button>
|
|
|
-<!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>-->
|
|
|
-<!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>-->
|
|
|
+ <a-button preIcon="ant-design:plus-outlined" type="primary" @click="handleAdd">新建 </a-button>
|
|
|
+ <!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>-->
|
|
|
+ <!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>-->
|
|
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
|
|
<template #overlay>
|
|
|
<a-menu>
|
|
@@ -35,11 +35,14 @@
|
|
|
import NoticeModal from './NoticeModal.vue';
|
|
|
import DetailModal from './DetailModal.vue';
|
|
|
import { useMethods } from '/@/hooks/system/useMethods';
|
|
|
+ import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
import { useGlobSetting } from '/@/hooks/setting';
|
|
|
import { getToken } from '/@/utils/auth';
|
|
|
import { columns, searchFormSchema } from './notice.data';
|
|
|
import { getList, deleteNotice, batchDeleteNotice, getExportUrl, getImportUrl, doReleaseData, doReovkeData } from './notice.api';
|
|
|
import { useListPage } from '/@/hooks/system/useListPage';
|
|
|
+ import { errLog } from 'vxe-pc-ui';
|
|
|
+
|
|
|
const glob = useGlobSetting();
|
|
|
const [registerModal, { openModal }] = useModal();
|
|
|
const [register, { openModal: openDetail }] = useModal();
|
|
@@ -99,13 +102,23 @@
|
|
|
async function batchHandleDelete() {
|
|
|
doRequest(() => batchDeleteNotice({ ids: selectedRowKeys.value }));
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 发布
|
|
|
*/
|
|
|
async function handleRelease(id) {
|
|
|
- await doReleaseData({ id });
|
|
|
- reload();
|
|
|
+ const { createMessage } = useMessage();
|
|
|
+ const hideLoading = createMessage.loading('发布中...', 0);
|
|
|
+ try {
|
|
|
+ await doReleaseData({ id });
|
|
|
+ reload();
|
|
|
+ } catch (error) {
|
|
|
+ console.error(error);
|
|
|
+ } finally {
|
|
|
+ hideLoading();
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 撤销
|
|
|
*/
|
|
@@ -113,6 +126,7 @@
|
|
|
await doReovkeData({ id });
|
|
|
reload();
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 查看
|
|
|
*/
|
|
@@ -120,6 +134,7 @@
|
|
|
iframeUrl.value = `${glob.uploadUrl}/sys/annountCement/show/${record.id}?token=${getToken()}`;
|
|
|
openDetail(true);
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 操作列定义
|
|
|
* @param record
|
|
@@ -133,6 +148,7 @@
|
|
|
},
|
|
|
];
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 下拉操作栏
|
|
|
*/
|