gongchunyi
6 天以前 f0c8e8aaf9f41a7ab0f02a23cd7c5de1bffb9e71
src/views/reportAnalysis/qualityAnalysis/components/left-top.vue
@@ -51,6 +51,7 @@
import PanelHeader from './PanelHeader.vue'
import DateTypeSwitch from './DateTypeSwitch.vue'
import { rawMaterialDetection, processDetection, factoryDetection } from '@/api/viewIndex.js'
import { usePolling } from '@/hooks/usePolling.js'
const QUALIFIED_COLOR = '#4EE4FF'
const UNQUALIFIED_COLOR = '#3378FF'
@@ -218,9 +219,16 @@
    fetchSectionData(section)
  })
})
// 启动轮询,每分钟刷新一次数据
usePolling(() => {
  sections.forEach((section) => {
    fetchSectionData(section)
  })
})
</script>
<style scoped>
<style scoped lang="scss">
.main-panel {
  display: flex;
  flex-direction: column;
@@ -304,7 +312,7 @@
  border: 1px solid #1a58b0;
  padding: 14px 18px;
  width: 100%;
  height: 960px;
  height: 958px;
  box-sizing: border-box;
}