| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { reactive, ref, onBeforeUnmount, onUnmounted, nextTick, computed, watch, onActivated } from 'vue' |
| | | import { getTop, getStockList, getWorkPlansList, getProcedureProcessList, getRecordLogPage, getDeviceCheckPage, getUnqualified7DayData, getUnqualifiedCateData } from '@/utils/api.js' |
| | | import { reactive, ref, onMounted, nextTick, onUnmounted, computed, watch, onActivated } from 'vue' |
| | | import { getPlanData, getTop, getStockList, getWorkPlansList, getProcedureProcessList, getRecordLogPage, getDeviceCheckPage, getUnqualified7DayData, getUnqualifiedCateData } from '@/utils/api.js' |
| | | import { useCounterStore } from '@/stores/counter.js' |
| | | import * as echarts from 'echarts' |
| | | import { useRouter } from 'vue-router' |
| | |
| | | init() |
| | | } |
| | | }) |
| | | |
| | | onActivated(() => { |
| | | console.log('departId', departId.value) |
| | | if (!departId.value) return |
| | | init() |
| | | console.log('onActivated') |
| | | }) |
| | | // router.afterEach((to) => { |
| | | // if (to.fullPath === '/') { |
| | | // if (!departId.value) return |
| | | // // data.production = [] |
| | | // // data.marginStatistics = [] |
| | | // // data.plannedProgress = [] |
| | | // // data.processProgress = [] |
| | | // // data.log = [] |
| | | // // init() |
| | | // } else { |
| | | // clearTimeout(timer.value) |
| | | // clearTimeout(timer1.value) |
| | | // clearTimeout(timer2.value) |
| | | // clearTimeout(timer3.value) |
| | | // clearTimeout(timer4.value) |
| | | // } |
| | | // }) |
| | | // router.beforeEach((to) => { |
| | | // console.log(to); |
| | | // if (to.fullPath === '/') { |
| | | // if (!departId.value) return |
| | | // init() |
| | | // } else { |
| | | // clearTimeout(timer.value) |
| | | // clearTimeout(timer1.value) |
| | | // clearTimeout(timer2.value) |
| | | // clearTimeout(timer3.value) |
| | | // clearTimeout(timer4.value) |
| | | // } |
| | | // }) |
| | | |
| | | start1() |
| | | |
| | |
| | | }) |
| | | setTypeChart() |
| | | } |
| | | }) |
| | | // getPlanData |
| | | getPlanData(companyId.value, departId.value) |
| | | .then(res => { |
| | | enterprise.setNum(res) |
| | | }) |
| | | } |
| | | |
| | |
| | | option && myChart.setOption(option); |
| | | } |
| | | |
| | | onBeforeUnmount(()=>{ |
| | | clearTimeout(timer.value) |
| | | clearTimeout(timer1.value) |
| | | clearTimeout(timer2.value) |
| | | clearTimeout(timer3.value) |
| | | clearTimeout(timer4.value) |
| | | }) |
| | | // onBeforeUnmount(()=>{ |
| | | // clearTimeout(timer.value) |
| | | // clearTimeout(timer1.value) |
| | | // clearTimeout(timer2.value) |
| | | // clearTimeout(timer3.value) |
| | | // clearTimeout(timer4.value) |
| | | // }) |
| | | onUnmounted(()=>{ |
| | | clearTimeout(timer.value) |
| | | clearTimeout(timer1.value) |
| | |
| | | function start() { |
| | | clearTimeout(timer.value) |
| | | // 定时器触发周期 |
| | | let speed = ref(25) |
| | | let speed = ref(100) |
| | | timer.value = setInterval(ListScroll, speed.value) |
| | | } |
| | | // 开启定时器 |
| | | function start1() { |
| | | clearTimeout(timer1.value) |
| | | // 定时器触发周期 |
| | | let speed1 = ref(25) |
| | | let speed1 = ref(100) |
| | | timer1.value = setInterval(ListScroll1, speed1.value) |
| | | } |
| | | // 开启定时器 |
| | | function start2() { |
| | | clearTimeout(timer2.value) |
| | | // 定时器触发周期 |
| | | let speed2 = ref(25) |
| | | let speed2 = ref(100) |
| | | timer2.value = setInterval(ListScroll2, speed2.value) |
| | | } |
| | | // 开启定时器 |
| | | function start3() { |
| | | clearTimeout(timer3.value) |
| | | // 定时器触发周期 |
| | | let speed3 = ref(25) |
| | | let speed3 = ref(100) |
| | | timer3.value = setInterval(ListScroll3, speed3.value) |
| | | } |
| | | // 开启定时器 |
| | | function start4() { |
| | | clearTimeout(timer4.value) |
| | | // 定时器触发周期 |
| | | let speed4 = ref(25) |
| | | let speed4 = ref(100) |
| | | timer4.value = setInterval(ListScroll4, speed4.value) |
| | | } |
| | | function ListScroll() { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | // onUnmounted(() => { |
| | | |
| | | // }) |
| | | |
| | | onMounted(() => { |
| | | console.log('11111') |
| | | init() |
| | | }) |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | } |
| | | .content_left_item1_content_row_name { |
| | | flex-shrink: 0; |
| | | width: 100px; |
| | | display: flex; |
| | | align-items: center; |
| | | span { |
| | |
| | | } |
| | | .content_left_item1_content_row_num { |
| | | font-size: 13px; |
| | | width: 60px; |
| | | font-family: SourceHanSansSC-Regular, SourceHanSansSC; |
| | | font-weight: 400; |
| | | color: #D2E0FF; |
| | |
| | | align-items: center; |
| | | .scroll_item_row { |
| | | flex: 1; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | position: relative; |
| | | .content_right_top_nr_bottom_yuan { |
| | | position: absolute; |
| | | top: 63%; |
| | | left: 37%; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, 53%); |
| | | z-index: 999; |
| | | width: 114px; |
| | | height: 114px; |