| | |
| | | <template> |
| | | <div> |
| | | <div class="kb_dashboard" style="display:flex;flex-direction: column;justify-content: space-between"> |
| | | <div |
| | | class="kb_dashboard" |
| | | :style="{transform:'scale('+zoomX+','+zoomY+')',top:topDistance+'px',left:leftDistance+'px'}" |
| | | style="display:flex;flex-direction: column;justify-content: space-between" |
| | | > |
| | | |
| | | <div class="kb_backgroundCustom" /> |
| | | |
| | |
| | | name: 'Cjsc', |
| | | data() { |
| | | return { |
| | | zoomX: 1, |
| | | zoomY: 1, |
| | | topDistance: 0, |
| | | leftDistance: 0, |
| | | headTime: '', |
| | | |
| | | cjzl03_xData: [], |
| | |
| | | setInterval(() => { |
| | | this.getWorkShopProduceBottomRightData() |
| | | }, 30 * 1000) |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | }, |
| | | methods: { |
| | | // 获取页面高度 |
| | | getHeight() { |
| | | this.zoomX = window.innerWidth / 1920 |
| | | this.zoomY = window.innerHeight / 1080 |
| | | this.topDistance = (window.innerHeight - 1080) / 2 |
| | | this.leftDistance = (window.innerWidth - 1920) / 2 |
| | | }, |
| | | getWorkShopProduceTopData() { |
| | | WorkShopProduceTopData({ wkshopcode: 'CJ002' }).then(res => { |
| | | WorkShopProduceTopData({ wkshopcode: '0502' }).then(res => { |
| | | const flag = this.compareArrays(this.configTableTop.data, res.data) |
| | | if (!flag) { |
| | | this.configTableTop.data = res.data.map(i => |
| | |
| | | }) |
| | | }, |
| | | async getWorkShopProduceBottomLeftData() { |
| | | const res4 = await WorkShopProduceBottomLeftData({ wkshopcode: 'CJ002' }) |
| | | this.cjzl03_xData = res4.data['CJ002'].map(i => i.click_date) |
| | | this.cjzl03_yData = res4.data['CJ002'].map(i => i.count) |
| | | const res4 = await WorkShopProduceBottomLeftData({ wkshopcode: '0502' }) |
| | | this.cjzl03_xData = res4.data['0502'].map(i => i.click_date) |
| | | this.cjzl03_yData = res4.data['0502'].map(i => i.count) |
| | | |
| | | loadEcharts('cjzl03', cjzl03_2(this.cjzl03_xData, this.cjzl03_yData)) |
| | | }, |
| | | |
| | | async getWorkShopProduceBottomRightData() { |
| | | const res5 = await WorkShopProduceBottomRightData({ wkshopcode: 'CJ002' }) |
| | | const res5 = await WorkShopProduceBottomRightData({ wkshopcode: '0502' }) |
| | | this.RightBottom = res5.data |
| | | if (this.RightBottom.length > 0) { |
| | | loadEcharts('cjzl04', cjzl04(this.RightBottom.map(i => i.name), this.RightBottom.map(i => i.cont))) |