| | |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | if (item.name !== 'DeviceStatus') { |
| | | this.tableData = res.data.records |
| | | this.tableData = res.data.records.map(v => { |
| | | return { |
| | | ...v, |
| | | } |
| | | }) |
| | | } else { |
| | | this.tableData = res.data.records.map(item => { |
| | | return { |
| | | ...item, |
| | | value: this.legend.find(v => v.code === item.value)?.name |
| | | } |
| | | }) |
| | | } |
| | | this.tableData = res.data.records.map(item => { |
| | | return { |
| | | ...item, |
| | | value: this.legend.find(v => v.code === item.value)?.name |
| | | } |
| | | }) |
| | | |
| | | this.drawer = true |
| | | } |
| | | }) |
| | |
| | | tooltip: { |
| | | position: ['50%', '50%'] |
| | | }, |
| | | legend: [ |
| | | ], |
| | | legend: {}, |
| | | title: { |
| | | text: '', |
| | | subtext: '', |
| | |
| | | tooltip: { |
| | | show: true, |
| | | trigger: 'item', |
| | | // position: 'dom', |
| | | position: 'top', |
| | | triggerOn: 'click', |
| | | formatter: (value, ticket) => { |
| | | // console.log('----------1111') |
| | |
| | | // return current.format('HH:mm') |
| | | // return value |
| | | if (i == 0 || current === 0) return '' |
| | | return `${name}:开始时间${moment(data.data[i - 1].time).format('HH:mm')}-${moment(item.time).format('HH:mm')}` |
| | | return `${name}:时段${moment(data.data[i - 1].time).format('HH:mm')}-${moment(item.time).format('HH:mm')}` |
| | | } |
| | | }, |
| | | } |
| | |
| | | // return current.format('HH:mm') |
| | | // } |
| | | }, |
| | | legend: { |
| | | selectedMode: false |
| | | }, |
| | | title: { |
| | | text: '', |
| | | subtext: '', |