| | |
| | | |
| | | watch(() => departId.value, (val) => { |
| | | if (val) { |
| | | clearTimeout(timer.value) |
| | | clearTimeout(timer5.value) |
| | | init() |
| | | timer5.value = setInterval(init, 60000) |
| | | timer.value = setInterval(scrillAction, 100) |
| | | } |
| | | }) |
| | | |
| | | |
| | | const init = () => { |
| | | console.log(timer.value); |
| | | // 当日员工产量TOP10 |
| | | getTop(companyId.value, departId.value) |
| | | .then(res => { |
| | |
| | | num: item.unqualifiedNum |
| | | } |
| | | }) |
| | | console.log(data.num); |
| | | setTypeChart() |
| | | } |
| | | }) |
| | |
| | | } |
| | | |
| | | onMounted(() => { |
| | | if (departId.value) { |
| | | console.log('onMounted'); |
| | | init() |
| | | timer5.value = setInterval(init, 60000) |
| | | timer.value = setInterval(scrillAction, 100) |
| | | } |
| | | window.addEventListener('resize', () => { |
| | | setTypeChart() |
| | | setDayChart() |
| | | }) |
| | | if (!departId.value) return; |
| | | init() |
| | | timer5.value = setInterval(init, 60000) |
| | | timer.value = setInterval(scrillAction, 100) |
| | | |
| | | }) |
| | | |
| | | onUnmounted(() => { |