|  |  | 
 |  |  |           <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> | 
 |  |  |       <!-- 设备巡检记录 --> | 
 |  |  | 
 |  |  |     .then(res => { | 
 |  |  |       if (res.length > 0) { | 
 |  |  |         data.baseNum = res[0].doneNum | 
 |  |  |         data.production = res | 
 |  |  |         start() | 
 |  |  |       } else { | 
 |  |  |         data.baseNum = 0 | 
 |  |  |       } | 
 |  |  |       data.production = res | 
 |  |  |       data.fifthScroll = true | 
 |  |  |     }) | 
 |  |  |   // 仓库实时余量统计 | 
 |  |  |   // getStockList(companyId.value, departId.value) | 
 |  |  | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |   }) | 
 |  |  |   | 
 |  |  |    | 
 |  |  |  | 
 |  |  |  | 
 |  |  |   // 报工日志 | 
 |  |  |   getRecordLogPage(companyId.value, departId.value, { | 
 |  |  |     capacity: 20, | 
 |  |  | 
 |  |  |         fontSize: 12 | 
 |  |  |       } | 
 |  |  |     }, | 
 |  |  |     grid: { | 
 |  |  |       top: 40, | 
 |  |  |       bottom: 30, | 
 |  |  |       left: 60 | 
 |  |  |     }, | 
 |  |  |     xAxis: { | 
 |  |  |       type: 'category', | 
 |  |  |       boundaryGap: false, | 
 |  |  | 
 |  |  |         lineStyle: { | 
 |  |  |           width: 0.5, | 
 |  |  |           color: ['#fff'] | 
 |  |  |         } | 
 |  |  |       }, | 
 |  |  |       axisLine: { | 
 |  |  |         show: true, | 
 |  |  |         onZero: true, | 
 |  |  |         lineStyle: { | 
 |  |  |           width: 0.5, | 
 |  |  |           color: '#fff', | 
 |  |  |           opacity: .5 | 
 |  |  |         } | 
 |  |  |       }, | 
 |  |  |       axisLabel: { | 
 |  |  | 
 |  |  |         lineStyle: { | 
 |  |  |           width: 0.5, | 
 |  |  |           color: ['#fff'] | 
 |  |  |         } | 
 |  |  |       }, | 
 |  |  |       axisLine: { | 
 |  |  |         show: true, | 
 |  |  |         onZero: true, | 
 |  |  |         lineStyle: { | 
 |  |  |           width: 1, | 
 |  |  |           color: '#fff', | 
 |  |  |           opacity: .5 | 
 |  |  |         } | 
 |  |  |       }, | 
 |  |  |       axisLabel: { | 
 |  |  | 
 |  |  |   if (scrollDom.offsetHeight == 0) { | 
 |  |  |     scrollDom = scrollContainer4.value | 
 |  |  |   } else { | 
 |  |  |     // console.log(bottom1.value.height); | 
 |  |  |     let num = scrollContainer4.value.offsetHeight / 35; | 
 |  |  |     // alert(scrollDom.children.length  +"---------------"+num) | 
 |  |  |     // 如果列表数量过少不进行滚动 | 
 |  |  |     // console.log(scrollDom.offsetHeight); | 
 |  |  |     let num = scrollDom.offsetHeight / 35; | 
 |  |  |     num = num + (scrollDom.offsetHeight % 35  > 0 ? 1 : 0) | 
 |  |  |     // console.log('----------'); | 
 |  |  |     // console.log('scrollDom.children.length', scrollDom.children.length) | 
 |  |  |     // console.log('scrollDom.offsetHeight % 35', scrollDom.offsetHeight % 35) | 
 |  |  |     // console.log('num', num) | 
 |  |  |     // console.log('----------'); | 
 |  |  |     // // 如果列表数量过少不进行滚动 | 
 |  |  |     if (scrollDom.children.length <= num) { | 
 |  |  |       clearTimeout(timer4.value) | 
 |  |  |       return | 
 |  |  |     } | 
 |  |  |     // 组件进行滚动 | 
 |  |  |     scrollDom.scrollTop += 2 | 
 |  |  |     scrollDom.scrollTop += 1 | 
 |  |  |      | 
 |  |  |     // 判断是否滚动到底部 | 
 |  |  |     if (scrollDom.scrollTop+1 >= (scrollDom.scrollHeight - scrollDom.clientHeight)) { | 
 |  |  |     if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) { | 
 |  |  |       console.log('scrollDom.scrollTop', scrollDom.scrollTop); | 
 |  |  |       console.log('scrollDom.scrollHeight', scrollDom.scrollHeight); | 
 |  |  |       console.log('scrollDom.clientHeight', scrollDom.clientHeight ); | 
 |  |  |     // if (scrollDom.scrollTop >= 35) { | 
 |  |  |        | 
 |  |  |       // 获取组件第一个节点 | 
 |  |  |       let first = scrollDom.children[0] | 
 |  |  |       // 删除节点 | 
 |  |  | 
 |  |  | // }) | 
 |  |  |  | 
 |  |  | onMounted(() => { | 
 |  |  |   if (!departId.value) return; | 
 |  |  |   timer5.value = setInterval(init(), 60000) | 
 |  |  |   if (departId.value) { | 
 |  |  |     console.log('onMounted'); | 
 |  |  |     init() | 
 |  |  |     timer5.value = setInterval(init, 60000) | 
 |  |  |     timer.value = setInterval(scrillAction, 100) | 
 |  |  |   } | 
 |  |  |   window.addEventListener('resize', () => { | 
 |  |  |     setTypeChart() | 
 |  |  |     setDayChart() | 
 |  |  |   }) | 
 |  |  |    | 
 |  |  | }) | 
 |  |  |  | 
 |  |  | onUnmounted(() => { | 
 |  |  |   clearTimeout(timer.value) | 
 |  |  |   clearTimeout(timer5.value) | 
 |  |  |    | 
 |  |  | }) | 
 |  |  | </script> | 
 |  |  |  | 
 |  |  | 
 |  |  |  | 
 |  |  |             &:nth-child(5) { | 
 |  |  |               flex: 3; | 
 |  |  |                | 
 |  |  |  | 
 |  |  |             } | 
 |  |  |           } | 
 |  |  |         } |