eight
2024-08-28 0c45345e728ce224297ea224063d2e7a83b34516
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,
@@ -280,6 +289,21 @@
  } 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 {}
}
/** 导出按钮操作 */
const handleExport = async () => {
  try {