|
|
@ -5,7 +5,11 @@ |
|
|
title="预约处理" |
|
|
title="预约处理" |
|
|
left-arrow |
|
|
left-arrow |
|
|
@click-left="onBack" |
|
|
@click-left="onBack" |
|
|
/> |
|
|
> |
|
|
|
|
|
<template #right> |
|
|
|
|
|
<van-icon name="setting-o" size="20" @click="onAutoMatch" /> |
|
|
|
|
|
</template> |
|
|
|
|
|
</van-nav-bar> |
|
|
|
|
|
|
|
|
<!-- Tab 切换 --> |
|
|
<!-- Tab 切换 --> |
|
|
<van-tabs |
|
|
<van-tabs |
|
|
@ -29,6 +33,8 @@ |
|
|
|
|
|
|
|
|
<script setup name="cpReserveList"> |
|
|
<script setup name="cpReserveList"> |
|
|
import { useRouter } from 'vue-router'; |
|
|
import { useRouter } from 'vue-router'; |
|
|
|
|
|
import { showConfirmDialog, showSuccessToast, showFailToast, showLoadingToast } from 'vant'; |
|
|
|
|
|
import { autoMatchReserve } from '@/api/enforcement/plan'; |
|
|
import CpReserveManual from './cp_reserve_manual.vue'; |
|
|
import CpReserveManual from './cp_reserve_manual.vue'; |
|
|
import CpReserveSystem from './cp_reserve_system.vue'; |
|
|
import CpReserveSystem from './cp_reserve_system.vue'; |
|
|
|
|
|
|
|
|
@ -38,6 +44,25 @@ const activeTab = ref('manual'); |
|
|
const onBack = () => { |
|
|
const onBack = () => { |
|
|
router.back(); |
|
|
router.back(); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const onAutoMatch = () => { |
|
|
|
|
|
showConfirmDialog({ |
|
|
|
|
|
title: '提示', |
|
|
|
|
|
message: '确认强制执行系统自动匹配预约?', |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
const toast = showLoadingToast({ message: '匹配中...', forbidClick: true, duration: 0 }); |
|
|
|
|
|
autoMatchReserve( |
|
|
|
|
|
(res) => { |
|
|
|
|
|
toast.close(); |
|
|
|
|
|
showSuccessToast('匹配完成'); |
|
|
|
|
|
}, |
|
|
|
|
|
(err) => { |
|
|
|
|
|
toast.close(); |
|
|
|
|
|
showFailToast(err?.msg || '匹配失败'); |
|
|
|
|
|
} |
|
|
|
|
|
); |
|
|
|
|
|
}).catch(() => {}); |
|
|
|
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
<style lang="less" scoped> |
|
|
|