| | |
| | | import * as echarts from 'echarts'; |
| | | export default { |
| | | components: {saveDialog}, |
| | | props: ['collectionstatus','date','workstationInfoList'], |
| | | props: ['achievements','date','workstationInfoList'], |
| | | watch: { |
| | | date(val) { |
| | | this.current = "1"; |
| | |
| | | }, |
| | | getColor(name) { |
| | | var color = ''; |
| | | this.collectionstatus.forEach(item=> { |
| | | if(item.name == name) { |
| | | console.log(this.achievements,name); |
| | | this.achievements.forEach(item=> { |
| | | if(item.code == name) { |
| | | color = item.color; |
| | | } |
| | | }) |
| | |
| | | var startTime = moment(item1.startTime).diff(moment(initstart + " 00:00:00"), 'minutes'); |
| | | var endTime = moment(item1.endTime).diff(moment(initstart + " 00:00:00"), 'minutes'); |
| | | var diff = moment(item1.endTime).diff(moment(item1.startTime), 'minutes') //开始了多久 |
| | | var color = this.getColor(item1.wcsDesc); |
| | | var color = this.getColor(item1.wcs); |
| | | console.log(color,222) |
| | | item1.value = [index,startTime,endTime,diff]; |
| | | item1.itemStyle = {"normal": {"color": color}}; |
| | | item1.code = item.workstationInfo.code; |
| | |
| | | }) |
| | | this.total = res.data.total; |
| | | //渲染图表 |
| | | console.log(yAxisData,newData,111) |
| | | this.setCharts(yAxisData,newData); |
| | | // 检查是否存在id为'parentNodeDom'的DOM元素,有就先删除 |
| | | var parentNodeDom = document.getElementById('parentNodeDom'); |