| | |
| | | import * as echarts from 'echarts'; |
| | | export default { |
| | | components: {saveDialog}, |
| | | props: ['achievements','date','workstationInfoList'], |
| | | props: ['achievements','date','workstationInfoList','humanFeedback'], |
| | | watch: { |
| | | }, |
| | | data() { |
| | |
| | | return stauts; |
| | | }, |
| | | getCharts() { |
| | | console.log(this.workstationInfoList.length == 0,this.date == "",this.date,333) |
| | | if(this.date == "") return; |
| | | var obj = { |
| | | date: this.date, |
| | | humanFeedback: true, |
| | | humanFeedback: this.humanFeedback, |
| | | machineFeedback: true, |
| | | workstationInfoList: this.workstationInfoList |
| | | } |
| | | this.$HTTP.post(`/api/blade-mdc/status-record/status-record-by-date?current=${this.current}&size=${this.size}`,obj).then(res => { |
| | | this.$HTTP.post(`/api/mdc/status-record/status-record-by-date?current=${this.current}&size=${this.size}`,obj).then(res => { |
| | | if (res.code === 200) { |
| | | var yAxisData = []; |
| | | var newData = []; |
| | |
| | | res.data.records.reverse(); |
| | | res.data.records.forEach((item,index)=> { |
| | | yAxisData.push(item.workstationInfo.name); |
| | | if(item.statusRecordList == null) item.statusRecordList = []; |
| | | //计算开始时间,显示时间 |
| | | item.statusRecordList.forEach(item1=> { |
| | | var initstart = item1.startTime.split(" ")[0]; //根据日期计算差值 |