| | |
| | | <script setup lang="ts"> |
| | | import { dateFormatter } from '@/utils/formatTime' |
| | | import download from '@/utils/download' |
| | | import { queueApi, queueVO } from '@/api/ecg/queue' |
| | | import queueForm from './queueForm.vue' |
| | | import { QueueApi, QueueVO } from '@/api/ecg/queue' |
| | | import queueForm from './QueueForm.vue' |
| | | import {DICT_TYPE, getIntDictOptions} from '@/utils/dict' |
| | | |
| | | /** 排队 列表 */ |
| | |
| | | const { t } = useI18n() // 国际化 |
| | | |
| | | const loading = ref(true) // 列表的加载中 |
| | | const list = ref<queueVO[]>([]) // 列表的数据 |
| | | const list = ref<QueueVO[]>([]) // 列表的数据 |
| | | const total = ref(0) // 列表的总页数 |
| | | const queryParams = reactive({ |
| | | pageNo: 1, |
| | |
| | | const getList = async () => { |
| | | loading.value = true |
| | | try { |
| | | const data = await queueApi.getqueuePage(queryParams) |
| | | const data = await QueueApi.getqueuePage(queryParams) |
| | | list.value = data.list |
| | | total.value = data.total |
| | | } finally { |
| | |
| | | // 删除的二次确认 |
| | | await message.delConfirm() |
| | | // 发起删除 |
| | | await queueApi.deletequeue(id) |
| | | await QueueApi.deletequeue(id) |
| | | message.success(t('common.delSuccess')) |
| | | // 刷新列表 |
| | | await getList() |
| | |
| | | } |
| | | |
| | | /** 插队按钮操作 */ |
| | | const handleJump = async (item: queueVO ) => { |
| | | const handleJump = async (item: QueueVO ) => { |
| | | try { |
| | | if (item.jumpFlag === 0) |
| | | item.jumpFlag = 1 |
| | | else |
| | | item.jumpFlag = 0 |
| | | |
| | | const data = await queueApi.jumpQueue(item) |
| | | const data = await QueueApi.jumpQueue(item) |
| | | message.success(data) |
| | | // 刷新列表 |
| | | await getList() |
| | |
| | | await message.exportConfirm() |
| | | // 发起导出 |
| | | exportLoading.value = true |
| | | const data = await queueApi.exportqueue(queryParams) |
| | | const data = await QueueApi.exportqueue(queryParams) |
| | | download.excel(data, '排队.xls') |
| | | } catch { |
| | | } finally { |