|  |  |  | 
|---|
|  |  |  | :content="'已报工良品数' + child.doneNum + ';工序计划数' + child.planNum" placement="top"> | 
|---|
|  |  |  | <div class="scroll_item_row_item" @click="jump(child.procedureId, child.procedureName)"> | 
|---|
|  |  |  | <div class="scroll_item_row_item_x"></div> | 
|---|
|  |  |  | <span v-if="child.rate < 100">{{ Math.floor(child.rate) }}%</span> | 
|---|
|  |  |  | <span v-if="child.rate < 100">{{ child.rate.toFixed(0) }}%</span> | 
|---|
|  |  |  | <img v-else src="@/assets/img/ic_complete@2x.png" alt="" /> | 
|---|
|  |  |  | <span class="scroll_item_row_item_wz">{{ child.procedureName.substring(0, 3) }}</span> | 
|---|
|  |  |  | <span class="scroll_item_row_item_wz">{{ child.procedureName }}</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </el-tooltip> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="content_left_item1_head"> | 
|---|
|  |  |  | <span>当日员工产量TOP10</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="content_left_item1_content" @mouseenter="handleMouseEnter" @mouseleave="handleMouseLeave" ref="scrollContainer"> | 
|---|
|  |  |  | <div class="content_left_item1_content" ref="scrollContainer"> | 
|---|
|  |  |  | <div class="content_left_item1_content_row" v-for="(item, index) in data.production" :key="index"> | 
|---|
|  |  |  | <div class="content_left_item1_content_row_name"> | 
|---|
|  |  |  | <div :class="index > 2 ? 'num bg1' : 'num bg2'">{{ index + 1 }}</div> | 
|---|
|  |  |  | 
|---|
|  |  |  | <span>近7天不良品分布</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="content_right_top_nr"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div class="content_right_top_nr_top" id="lineChrat"></div> | 
|---|
|  |  |  | <div class="content_right_top_nr_bottom"> | 
|---|
|  |  |  | <div class="content_right_top_nr_bottom_yuan" v-if="data.typeDistribution.length > 0"> | 
|---|
|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div id="pieChart"></div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!-- 设备巡检记录 --> | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script setup> | 
|---|
|  |  |  | import { dateToSub } from '@/utils' | 
|---|
|  |  |  | import { reactive, ref, onMounted, onUnmounted, computed, watch, toRefs } from 'vue' | 
|---|
|  |  |  | import { getPlanData, getTop, getWorkPlansList, getProcedureProcessList, getRecordLogPage, getDeviceCheckPage, getUnqualified7DayData, getUnqualifiedCateData } from '@/utils/api.js' | 
|---|
|  |  |  | import { reactive, ref, onMounted, nextTick, onUnmounted, computed, watch, toRefs } 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' | 
|---|
|  |  |  | 
|---|
|  |  |  | typeDistribution: [], | 
|---|
|  |  |  | num: 0, | 
|---|
|  |  |  | baseNum: 0, | 
|---|
|  |  |  | firstScroll: false, | 
|---|
|  |  |  | secondScroll: false, | 
|---|
|  |  |  | thirdScroll: false, | 
|---|
|  |  |  | fourthScroll: false, | 
|---|
|  |  |  | fifthScroll: false, | 
|---|
|  |  |  | bottomAuthHeight: 284 | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | let { baseNum } = toRefs(data) | 
|---|
|  |  |  | let { baseNum, bottomAuthHeight } = toRefs(data) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | let timer = ref(null) | 
|---|
|  |  |  | let timer1 = ref(null) | 
|---|
|  |  |  | let timer2 = ref(null) | 
|---|
|  |  |  | let timer3 = ref(null) | 
|---|
|  |  |  | let timer4 = ref(null) | 
|---|
|  |  |  | let timer5 = ref(null) | 
|---|
|  |  |  | let scrollContainer = ref(null) | 
|---|
|  |  |  | let scrollContainer1 = ref(null) | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | start1() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const init = () => { | 
|---|
|  |  |  | console.log(timer.value); | 
|---|
|  |  |  | setBottomHeight(); | 
|---|
|  |  |  | // 当日员工产量TOP10 | 
|---|
|  |  |  | getTop(companyId.value, departId.value) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | if (res.length > 0) { | 
|---|
|  |  |  | data.baseNum = res[0].doneNum | 
|---|
|  |  |  | data.production = res | 
|---|
|  |  |  | data.fifthScroll = true | 
|---|
|  |  |  | start() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // 仓库实时余量统计 | 
|---|
|  |  |  | 
|---|
|  |  |  | getProcedureProcessList(companyId.value, departId.value) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | data.processProgress = res | 
|---|
|  |  |  | data.thirdScroll = true | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start2() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | // 成品计划进度 | 
|---|
|  |  |  | getWorkPlansList(companyId.value, departId.value) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | data.plannedProgress = res | 
|---|
|  |  |  | data.secondScroll = true | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start1() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 报工日志 | 
|---|
|  |  |  | getRecordLogPage(companyId.value, departId.value, { | 
|---|
|  |  |  | capacity: 20, | 
|---|
|  |  |  | 
|---|
|  |  |  | page: 1 | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | data.log = res.records | 
|---|
|  |  |  | data.fourthScroll = true | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start3() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // 设备巡检记录 | 
|---|
|  |  |  | getDeviceCheckPage(companyId.value, departId.value, { | 
|---|
|  |  |  | 
|---|
|  |  |  | page: 1 | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | data.patrolInspection = res.records | 
|---|
|  |  |  | data.fifthScroll = true | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start4() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // 近七天不良数 | 
|---|
|  |  |  | getUnqualified7DayData(companyId.value, departId.value, '') | 
|---|
|  |  |  | 
|---|
|  |  |  | num: item.unqualifiedNum | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | console.log(data.num); | 
|---|
|  |  |  | setTypeChart() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | enterprise.setNum(res) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function  setBottomHeight(){ | 
|---|
|  |  |  | const pageHeight = window.innerHeight; | 
|---|
|  |  |  | bottomAuthHeight = pageHeight - 700; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | let myChart = echarts.init(dayChartDom); | 
|---|
|  |  |  | let dateList = [] | 
|---|
|  |  |  | let numList = [] | 
|---|
|  |  |  | let num = 0 | 
|---|
|  |  |  | data.dayDistribution.forEach(item => { | 
|---|
|  |  |  | dateList.push(item.date) | 
|---|
|  |  |  | numList.push(item.num) | 
|---|
|  |  |  | num += item.num | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | let option; | 
|---|
|  |  |  | option = { | 
|---|
|  |  |  | title: { | 
|---|
|  |  |  | text: `   近七日不良品总数:${data.num}`, | 
|---|
|  |  |  | text: `近七日不良品总数:${num}`, | 
|---|
|  |  |  | textStyle: { | 
|---|
|  |  |  | color: '#fff', | 
|---|
|  |  |  | fontSize: 12 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | grid: { | 
|---|
|  |  |  | top: 40, | 
|---|
|  |  |  | bottom: 30 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | xAxis: { | 
|---|
|  |  |  | type: 'category', | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // labelLayout: { | 
|---|
|  |  |  | //   hideOverlap: true | 
|---|
|  |  |  | // }, | 
|---|
|  |  |  | endLabel: { | 
|---|
|  |  |  | show: true, | 
|---|
|  |  |  | distance: 5, | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | option && myChart.setOption(option); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | onUnmounted(() => { | 
|---|
|  |  |  | clearTimeout(timer.value) | 
|---|
|  |  |  | clearTimeout(timer1.value) | 
|---|
|  |  |  | clearTimeout(timer2.value) | 
|---|
|  |  |  | clearTimeout(timer3.value) | 
|---|
|  |  |  | clearTimeout(timer4.value) | 
|---|
|  |  |  | clearTimeout(timer5.value) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | const clickCate = (index) => { | 
|---|
|  |  |  | clearTimeout(timer1.value) | 
|---|
|  |  |  | clearTimeout(timer2.value) | 
|---|
|  |  |  | cate.value.forEach((item, i) => { | 
|---|
|  |  |  | if (i === index) { | 
|---|
|  |  |  | // 成品计划进度 | 
|---|
|  |  |  | 
|---|
|  |  |  | getWorkPlansList(companyId.value, departId.value) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | data.plannedProgress = res | 
|---|
|  |  |  | data.secondScroll = true | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start1() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | getProcedureProcessList(companyId.value, departId.value) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | data.processProgress = res | 
|---|
|  |  |  | data.thirdScroll = true | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start2() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | item.active = true | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function handleMouseEnter() { | 
|---|
|  |  |  | data.firstScroll = false | 
|---|
|  |  |  | clearTimeout(timer.value) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function handleMouseEnter1() { | 
|---|
|  |  |  | data.secondScroll = false | 
|---|
|  |  |  | clearTimeout(timer1.value) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function handleMouseEnter2() { | 
|---|
|  |  |  | data.thirdScroll = false | 
|---|
|  |  |  | clearTimeout(timer2.value) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function handleMouseEnter3() { | 
|---|
|  |  |  | data.fourthScroll = false | 
|---|
|  |  |  | clearTimeout(timer3.value) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function handleMouseEnter4() { | 
|---|
|  |  |  | data.fifthScroll = false | 
|---|
|  |  |  | clearTimeout(timer4.value) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function handleMouseLeave() { | 
|---|
|  |  |  | data.firstScroll = true | 
|---|
|  |  |  | start() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function handleMouseLeave1() { | 
|---|
|  |  |  | data.secondScroll = true | 
|---|
|  |  |  | start1() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function handleMouseLeave2() { | 
|---|
|  |  |  | data.thirdScroll = true | 
|---|
|  |  |  | start2() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function handleMouseLeave3() { | 
|---|
|  |  |  | data.fourthScroll = true | 
|---|
|  |  |  | start3() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function handleMouseLeave4() { | 
|---|
|  |  |  | data.fifthScroll = true | 
|---|
|  |  |  | start4() | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 开启定时器 | 
|---|
|  |  |  | function start() { | 
|---|
|  |  |  | clearTimeout(timer.value) | 
|---|
|  |  |  | // 定时器触发周期 | 
|---|
|  |  |  | let speed = ref(100) | 
|---|
|  |  |  | timer.value = setInterval(ListScroll, speed.value) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 开启定时器 | 
|---|
|  |  |  | function start1() { | 
|---|
|  |  |  | clearTimeout(timer1.value) | 
|---|
|  |  |  | // 定时器触发周期 | 
|---|
|  |  |  | let speed1 = ref(100) | 
|---|
|  |  |  | timer1.value = setInterval(ListScroll1, speed1.value) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 开启定时器 | 
|---|
|  |  |  | function start2() { | 
|---|
|  |  |  | clearTimeout(timer2.value) | 
|---|
|  |  |  | // 定时器触发周期 | 
|---|
|  |  |  | let speed2 = ref(100) | 
|---|
|  |  |  | timer2.value = setInterval(ListScroll2, speed2.value) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 开启定时器 | 
|---|
|  |  |  | function start3() { | 
|---|
|  |  |  | clearTimeout(timer3.value) | 
|---|
|  |  |  | // 定时器触发周期 | 
|---|
|  |  |  | let speed3 = ref(100) | 
|---|
|  |  |  | timer3.value = setInterval(ListScroll3, speed3.value) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 开启定时器 | 
|---|
|  |  |  | function start4() { | 
|---|
|  |  |  | clearTimeout(timer4.value) | 
|---|
|  |  |  | // 定时器触发周期 | 
|---|
|  |  |  | let speed4 = ref(100) | 
|---|
|  |  |  | timer4.value = setInterval(ListScroll4, speed4.value) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function ListScroll() { | 
|---|
|  |  |  | if (!data.firstScroll) return | 
|---|
|  |  |  | // console.log('ListScroll'); | 
|---|
|  |  |  | let scrollDom = scrollContainer.value | 
|---|
|  |  |  | if (!scrollDom) return | 
|---|
|  |  |  | // 判读组件是否渲染完成 | 
|---|
|  |  |  | 
|---|
|  |  |  | let maxLength = scrollDom.clientHeight/34 | 
|---|
|  |  |  | // 如果列表数量过少不进行滚动 | 
|---|
|  |  |  | if (scrollDom.children.length <= maxLength) { | 
|---|
|  |  |  | data.firstScroll = false | 
|---|
|  |  |  | clearTimeout(timer.value) | 
|---|
|  |  |  | return | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 组件进行滚动 | 
|---|
|  |  |  | scrollDom.scrollTop += 2 | 
|---|
|  |  |  | // console.log(scrollDom.scrollHeight - scrollDom.clientHeight); | 
|---|
|  |  |  | // console.log(scrollDom.scrollTop); | 
|---|
|  |  |  | // 判断是否滚动到底部 | 
|---|
|  |  |  | if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight - 2)) { | 
|---|
|  |  |  | if (Math.floor(scrollDom.scrollTop) >= (scrollDom.scrollHeight - scrollDom.clientHeight)) { | 
|---|
|  |  |  | // 获取组件第一个节点 | 
|---|
|  |  |  | let first = scrollDom.children[0] | 
|---|
|  |  |  | // 删除节点 | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function ListScroll1() { | 
|---|
|  |  |  | if (!data.secondScroll) return | 
|---|
|  |  |  | // console.log('ListScroll1'); | 
|---|
|  |  |  | let scrollDom = scrollContainer1.value | 
|---|
|  |  |  | // 判读组件是否渲染完成 | 
|---|
|  |  |  | if (!scrollDom) return | 
|---|
|  |  |  | 
|---|
|  |  |  | scrollDom = scrollContainer1.value | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | // 如果列表数量过少不进行滚动 | 
|---|
|  |  |  | if (scrollDom.children.length < 7) { | 
|---|
|  |  |  | data.secondScroll = false | 
|---|
|  |  |  | if (scrollDom.children.length < 6) { | 
|---|
|  |  |  | clearTimeout(timer1.value) | 
|---|
|  |  |  | return | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 组件进行滚动 | 
|---|
|  |  |  | scrollDom.scrollTop += 2 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 判断是否滚动到底部 | 
|---|
|  |  |  | if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight-0.5)) { | 
|---|
|  |  |  | console.log(scrollDom.scrollTop); | 
|---|
|  |  |  | console.log(scrollDom.scrollHeight, scrollDom.clientHeight); | 
|---|
|  |  |  | if (scrollDom.scrollTop+2 >= (scrollDom.scrollHeight - scrollDom.clientHeight)) { | 
|---|
|  |  |  | // 获取组件第一个节点 | 
|---|
|  |  |  | let first = scrollDom.children[0] | 
|---|
|  |  |  | // 删除节点 | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function ListScroll2() { | 
|---|
|  |  |  | if (!data.thirdScroll) return | 
|---|
|  |  |  | // console.log('ListScroll2'); | 
|---|
|  |  |  | let scrollDom = scrollContainer2.value | 
|---|
|  |  |  | if (!scrollDom) return | 
|---|
|  |  |  | // 判读组件是否渲染完成 | 
|---|
|  |  |  | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | // 如果列表数量过少不进行滚动 | 
|---|
|  |  |  | if (scrollDom.children.length < 10) { | 
|---|
|  |  |  | data.thirdScroll = false | 
|---|
|  |  |  | clearTimeout(timer2.value) | 
|---|
|  |  |  | return | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 组件进行滚动 | 
|---|
|  |  |  | scrollDom.scrollTop += 2 | 
|---|
|  |  |  | scrollDom.scrollTop += 1 | 
|---|
|  |  |  | // console.log('scrollDom.scrollTop', scrollDom.scrollTop); | 
|---|
|  |  |  | // console.log('scrollDom.scrollHeight - scrollDom.clientHeight', scrollDom.scrollHeight - scrollDom.clientHeight); | 
|---|
|  |  |  | // 判断是否滚动到底部 | 
|---|
|  |  |  | if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight - 2)) { | 
|---|
|  |  |  | if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) { | 
|---|
|  |  |  | // 获取组件第一个节点 | 
|---|
|  |  |  | let first = scrollDom.children[0] | 
|---|
|  |  |  | // 删除节点 | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function ListScroll3() { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (!data.fourthScroll) return | 
|---|
|  |  |  | // console.log('ListScroll3'); | 
|---|
|  |  |  | let scrollDom = scrollContainer3.value | 
|---|
|  |  |  | if (!scrollDom) return | 
|---|
|  |  |  | // 判读组件是否渲染完成 | 
|---|
|  |  |  | 
|---|
|  |  |  | // alert(scrollDom.children.length  +"---------------"+num) | 
|---|
|  |  |  | // 如果列表数量过少不进行滚动 | 
|---|
|  |  |  | if (scrollDom.children.length <= num) { | 
|---|
|  |  |  | data.fourthScroll = false | 
|---|
|  |  |  | clearTimeout(timer3.value) | 
|---|
|  |  |  | return | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 组件进行滚动 | 
|---|
|  |  |  | scrollDom.scrollTop = scrollDom.scrollTop+2 | 
|---|
|  |  |  | // 判断是否滚动到底部 | 
|---|
|  |  |  | if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight -2)) { | 
|---|
|  |  |  | if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) { | 
|---|
|  |  |  | // 获取组件第一个节点 | 
|---|
|  |  |  | let first = scrollDom.children[0] | 
|---|
|  |  |  | // 删除节点 | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function ListScroll4() { | 
|---|
|  |  |  | if (!data.fifthScroll) return | 
|---|
|  |  |  | // console.log('ListScroll4'); | 
|---|
|  |  |  | let scrollDom = scrollContainer4.value | 
|---|
|  |  |  | if (!scrollDom) return | 
|---|
|  |  |  | // 判读组件是否渲染完成 | 
|---|
|  |  |  | 
|---|
|  |  |  | // alert(scrollDom.children.length  +"---------------"+num) | 
|---|
|  |  |  | // 如果列表数量过少不进行滚动 | 
|---|
|  |  |  | if (scrollDom.children.length <= num) { | 
|---|
|  |  |  | data.fifthScroll = false | 
|---|
|  |  |  | clearTimeout(timer4.value) | 
|---|
|  |  |  | return | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 组件进行滚动 | 
|---|
|  |  |  | scrollDom.scrollTop += 2 | 
|---|
|  |  |  | // 判断是否滚动到底部 | 
|---|
|  |  |  | if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight - 2)) { | 
|---|
|  |  |  | if (scrollDom.scrollTop+1 >= (scrollDom.scrollHeight - scrollDom.clientHeight)) { | 
|---|
|  |  |  | // 获取组件第一个节点 | 
|---|
|  |  |  | let first = scrollDom.children[0] | 
|---|
|  |  |  | // 删除节点 | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function scrillAction() { | 
|---|
|  |  |  | ListScroll() | 
|---|
|  |  |  | ListScroll1() | 
|---|
|  |  |  | ListScroll2() | 
|---|
|  |  |  | ListScroll3() | 
|---|
|  |  |  | ListScroll4() | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // onUnmounted(() => { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | onMounted(() => { | 
|---|
|  |  |  | window.addEventListener('resize', () => { | 
|---|
|  |  |  | setTypeChart() | 
|---|
|  |  |  | setDayChart() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | if (!departId.value) return; | 
|---|
|  |  |  | init() | 
|---|
|  |  |  | timer5.value = setInterval(init, 60000) | 
|---|
|  |  |  | timer.value = setInterval(scrillAction, 100) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | onUnmounted(() => { | 
|---|
|  |  |  | console.log('停止滴答'); | 
|---|
|  |  |  | clearTimeout(timer.value) | 
|---|
|  |  |  | clearTimeout(timer5.value) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | timer5.value = setInterval(init(), 60000) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $fixed-height: 690px; | 
|---|
|  |  |  | .content1 { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | flex: 1; | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: auto; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | &:nth-child(5) { | 
|---|
|  |  |  | flex: 3; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | &:nth-child(4) { | 
|---|
|  |  |  | flex: 0.7; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | &:nth-child(6) { | 
|---|
|  |  |  | flex: 0.7; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | justify-content: center; | 
|---|
|  |  |  | color: #FFFFFF; | 
|---|
|  |  |  | font-size: 13px; | 
|---|
|  |  |  | &:nth-child(4) { | 
|---|
|  |  |  | flex: 0.7; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | &:nth-child(5) { | 
|---|
|  |  |  | flex: 3; | 
|---|
|  |  |  | justify-content: start; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | &:nth-child(6) { | 
|---|
|  |  |  | flex: 0.7; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .scroll_item_row_item { | 
|---|
|  |  |  | margin-top: -11px; | 
|---|
|  |  |  | 
|---|
|  |  |  | font-weight: 500; | 
|---|
|  |  |  | color: #01D9FE; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | &:nth-child(5) { | 
|---|
|  |  |  | flex: 0.5; | 
|---|
|  |  |  | &:nth-child(4) { | 
|---|
|  |  |  | flex: 2; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | &:nth-child(6) { | 
|---|
|  |  |  | flex: 0.5; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | &:nth-child(7) { | 
|---|
|  |  |  | flex: 0.7; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | justify-content: center; | 
|---|
|  |  |  | color: #FFFFFF; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | &:nth-child(5) { | 
|---|
|  |  |  | flex: 0.5; | 
|---|
|  |  |  | &:nth-child(4) { | 
|---|
|  |  |  | flex: 2; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | &:nth-child(6) { | 
|---|
|  |  |  | flex: 0.5; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | &:nth-child(7) { | 
|---|
|  |  |  | flex: 0.7; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | font-weight: 500; | 
|---|
|  |  |  | color: #01D9FE; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // &:first-child { | 
|---|
|  |  |  | //   flex: 2; | 
|---|
|  |  |  | // } | 
|---|
|  |  |  | &:nth-child(3) { | 
|---|
|  |  |  | flex: 0.7; | 
|---|
|  |  |  | &:first-child { | 
|---|
|  |  |  | flex: 2; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | justify-content: center; | 
|---|
|  |  |  | color: #FFFFFF; | 
|---|
|  |  |  | &:nth-child(3) { | 
|---|
|  |  |  | flex: 0.7; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | &:first-child { | 
|---|
|  |  |  | flex: 2; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // &:first-child { | 
|---|
|  |  |  | //   flex: 2; | 
|---|
|  |  |  | // } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|