| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- <template>
- <ele-page flex-table>
- <page-search @search="reload" />
- <common-table
- ref="pageRef"
- :pageConfig="pageConfig"
- :columns="columns"
- :tools="false"
- >
- <template #toolbar>
- <el-button
- type="danger"
- plain
- :icon="DeleteOutlined"
- v-permission="'optimization:fallback:batchDelete'"
- @click="handleBatchDelete()"
- >
- 批量删除
- </el-button>
- <el-button
- type="success"
- plain
- v-permission="'optimization:fallback:export'"
- @click="handleExportExcel"
- :icon="DownloadOutlined"
- >
- 导出EXCEL
- </el-button>
- </template>
- <template #action="{ row }">
- <div>
- <el-button
- type="primary"
- link
- v-permission="'optimization:fallback:detail'"
- @click="handleUpdate(row, 'detail')"
- >
- [详情]
- </el-button>
- <el-button
- type="primary"
- link
- v-permission="'optimization:fallback:deal'"
- @click="handleUpdate(row)"
- >
- 去处理
- </el-button>
- </div>
- </template>
- </common-table>
- <deal-fallback ref="dealFallbackRef" @done="reload()" />
- </ele-page>
- </template>
- <script setup>
- import { ref, reactive } from 'vue';
- import CommonTable from '@/components/CommonPage/CommonTable.vue';
- import dealFallback from '@/views/optimization/fallback/components/deal-fallback.vue';
- import pageSearch from '@/views/optimization/fallback/components/page-search.vue';
- import { useDictData } from '@/utils/use-dict-data';
- defineOptions({ name: 'fallbackList' });
- const [useStatusDicts] = useDictData(['sys_normal_disable']);
- /** 表格列配置 */
- const columns = ref([
- {
- type: 'selection',
- columnKey: 'selection',
- width: 50,
- align: 'center',
- fixed: 'left'
- },
- { type: 'index', label: '序号', width: 60, align: 'center' },
- {
- label: '状态',
- prop: 'useStatus',
- align: 'center',
- formatter: (row) =>
- useStatusDicts.value.find((d) => d.dictValue == row.useStatus)
- ?.dictLabel
- },
- { label: '用户UID', prop: 'uid', align: 'center' },
- { label: '联系方式', prop: 'mobile', align: 'center' },
- { label: '意见类型', prop: 'type', align: 'center' },
- { label: '反馈时间', prop: 'createTime', align: 'center', width: 180 },
- {
- label: '意见描述',
- prop: 'paymentCode',
- align: 'center',
- minWidth: 200
- },
- {
- columnKey: 'action',
- label: '操作',
- width: 160,
- align: 'center',
- slot: 'action'
- }
- ]);
- /** 页面组件实例 */
- const pageRef = ref(null);
- const pageConfig = reactive({
- pageUrl: '/baseinfo/godown/pagelist',
- exportUrl: '/baseinfo/godown/export',
- fileName: '意见反馈',
- cacheKey: 'fallbackTable'
- });
- //刷新表格
- function reload(where) {
- pageRef.value?.reload(where);
- }
- //批量删除
- function handleBatchDelete(row) {
- let selections = row ? [row] : pageRef.value?.getSelections();
- let ids = selections.map((item) => item.id).join(',');
- let url = `/baseinfo/schoolInfo/removeById/${ids}`;
- pageRef.value?.operatBatch({
- title: '确认删除?',
- method: 'post',
- url,
- row
- });
- }
- //导出excel
- function handleExportExcel() {
- pageRef.value?.exportData('意见反馈');
- }
- //去处理
- const dealFallbackRef = ref(null);
- function handleUpdate(row, type) {
- dealFallbackRef.value?.handleOpen(row, type);
- }
- </script>
|