eight
2024-08-29 e456f20e2d54f542800580c489f36c0b5eaf734f
src/views/ecg/queue/index.vue
@@ -186,6 +186,15 @@
          >
            删除
          </el-button>
          <el-button
            link
            type="danger"
            @click="handleJump(scope.row)"
            v-if="scope.row.status === 10"
            v-hasPermi="['ecg:queue:jump']"
          >
            {{scope.row.jumpFlag === 0? "插队" : "取消插队"}}
          </el-button>
        </template>
      </el-table-column>
    </el-table>
@@ -205,8 +214,8 @@
<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'
/** 排队 列表 */
@@ -216,7 +225,7 @@
const { t } = useI18n() // 国际化
const loading = ref(true) // 列表的加载中
const list = ref<queueVO[]>([]) // 列表的数据
const list = ref<QueueVO[]>([]) // 列表的数据
const total = ref(0) // 列表的总页数
const queryParams = reactive({
  pageNo: 1,
@@ -241,7 +250,7 @@
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 {
@@ -273,8 +282,23 @@
    // 删除的二次确认
    await message.delConfirm()
    // 发起删除
    await queueApi.deletequeue(id)
    await QueueApi.deletequeue(id)
    message.success(t('common.delSuccess'))
    // 刷新列表
    await getList()
  } catch {}
}
/** 插队按钮操作 */
const handleJump = async (item: QueueVO ) => {
  try {
    if (item.jumpFlag === 0)
      item.jumpFlag = 1
    else
      item.jumpFlag = 0
    const data = await QueueApi.jumpQueue(item)
    message.success(data)
    // 刷新列表
    await getList()
  } catch {}
@@ -287,7 +311,7 @@
    await message.exportConfirm()
    // 发起导出
    exportLoading.value = true
    const data = await queueApi.exportqueue(queryParams)
    const data = await QueueApi.exportqueue(queryParams)
    download.excel(data, '排队.xls')
  } catch {
  } finally {