| | |
| | | <template> |
| | | <div> |
| | | <PanelHeader title="不合格产品排名" /> |
| | | <PanelHeader title="合格产品排名" /> |
| | | <div class="main-panel panel-item-customers"> |
| | | <div class="main-panel-container"> |
| | | <div style="color: white" class="main-panel-box" v-for="(item, index) in panelList" :key="index"> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, onMounted } from 'vue' |
| | | import { ref } from 'vue' |
| | | import { unqualifiedProductRanking } from '@/api/viewIndex.js' |
| | | import PanelHeader from './PanelHeader.vue' |
| | | import { usePolling } from '@/hooks/usePolling.js' |
| | | |
| | | const panelList = ref([]) |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | onMounted(() => { |
| | | fetchData() |
| | | }) |
| | | // 启动轮询,每分钟刷新一次数据 |
| | | usePolling(fetchData) |
| | | </script> |
| | | |
| | | <style scoped> |