123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- <template>
- <PageWrapper contentBackground>
- <template #footer>
- <a-tabs v-model:activeKey="state" @change="changeTable">
- <a-tab-pane :key="0" tab="待处理" />
- <a-tab-pane :key="1" tab="已处理" />
- </a-tabs>
- </template>
- <div class="pt-4 m-4 desc-wrap">
- <BasicTable @register="registerTimeTable" >
- <template #action="{ record }">
- <TableAction
- stopButtonPropagation
- :actions="[
- {
- label: '发送',
- icon: 'icon-park-outline:door-handle',
- ifShow:record.state == 0,
- onClick: handleWithdraw.bind(null, record),
- },
- ]"
- />
- </template>
- </BasicTable>
- </div>
- <addMessgeModal @register="register" @update="reload" />
- </PageWrapper>
- </template>
- <script lang="ts">
- import { defineComponent, ref } from 'vue';
- import { BasicTable, useTable, TableAction, FormProps } from '/@/components/Table';
- import { PageWrapper } from '/@/components/Page';
- import { Divider, Card, Empty, Descriptions, Steps, Tabs } from 'ant-design-vue';
- import { intercomMessageList, intercomMessageHandle } from '/@/api/operate'
- import { sceneApplyList } from '/@/api/operate'
- import { useI18n } from '/@/hooks/web/useI18n';
- import addMessgeModal from './components/message/addModal.vue'
- import { useModal } from '/@/components/Modal';
- import { DMegaSchema, refundTimeTableData } from './data';
- import { useMessage } from '/@/hooks/web/useMessage';
- export default defineComponent({
- components: {
- BasicTable,
- PageWrapper,
- TableAction,
- addMessgeModal,
- [Divider.name]: Divider,
- [Card.name]: Card,
- Empty,
- [Descriptions.name]: Descriptions,
- [Descriptions.Item.name]: Descriptions.Item,
- [Steps.name]: Steps,
- [Steps.Step.name]: Steps.Step,
- [Tabs.name]: Tabs,
- [Tabs.TabPane.name]: Tabs.TabPane,
- },
- setup() {
- const { t } = useI18n();
- const { createConfirm, createMessage } = useMessage();
- const [register, { openModal }] = useModal();
- const state = ref<number>(0); //未处理,0已处理(默认1)
- const searchForm: Partial<FormProps> = {
- labelWidth: 100,
- schemas: [
- {
- field: 'payTime',
- label: '提交时间',
- component: 'RangePicker',
- componentProps: {
- maxLength: 100,
- format: 'YYYY-MM-DD HH:mm',
- showTime: true,
- },
- colProps: {
- xl: 11,
- xxl: 11,
- },
- },
- {
- field: 'companyName',
- label: '公司名称',
- component: 'Input',
- colProps: {
- xl: 6,
- xxl: 6,
- },
- },
- ],
- };
- const [registerTimeTable,{reload}] = useTable({
- api: sceneApplyList,
- // title: '',
- rowKey: 'id',
- fetchSetting: {
- pageField: 'pageNum',
- sizeField: 'pageSize',
- listField: 'list',
- totalField: 'total',
- },
- searchInfo: { handleState:state },
- columns: DMegaSchema,
- formConfig: searchForm,
- useSearchForm: true,
- dataSource: refundTimeTableData,
- showTableSetting: true,
- showIndexColumn: false,
- // pagination: { pageSize: 20 },
- // scroll: { y: 300 },
- beforeFetch:(params)=>{
- return {
- ...params,
- startTime: params.payTime && params.payTime[0],
- endTime: params.payTime && params.payTime[1],
- }
- },
- actionColumn: {
- width: 100,
- title: '操作',
- ifShow:state.value == 1,
- dataIndex: 'action',
- slots: { customRender: 'action' },
- },
- });
- function changeTable(val: string) {
- state.value = val;
- reload();
- }
- async function handleWithdraw(record: Recordable) {
- createConfirm({
- iconType: 'info',
- title: '发送邮件',
- content: `此操作将对${record.applicationName}进行删除, 是否继续?`,
- onOk: async () => {
- await buryPointDlt({ id: record.id });
- reload();
- createMessage.success(t('common.optSuccess'));
- },
- });
- // openModal(true,record)
- }
- return {
- registerTimeTable,
- handleWithdraw,
- changeTable,
- state,
- reload,
- register,
- openModal,
- };
- },
- });
- </script>
|