| | |
| | | <template> |
| | | <div style="width: 100%;height:100%"> |
| | | <div style="width: 100%; height: 100%"> |
| | | <div class="topSelect"> |
| | | <!-- <el-cascader v-model="newMac" :options="options" clearable change-on-select :props="{ checkStrictly: true }" placeholder="选择设备" /> --> |
| | | <el-cascader |
| | |
| | | // 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等) |
| | | // 例如:import《组件名称》from'《组件路径》'; |
| | | |
| | | import LineChart from '@/components/Echarts/LineChart' |
| | | import LineChart from '@/components/Echarts/LineChart2' |
| | | import DatePicker from '@/components/Form/DatePicker' |
| | | import MouthPicker from '@/components/Form/MouthPicker' |
| | | import HourPicker from '@/components/Form/HourPicker' |
| | |
| | | let lockLength = 0 |
| | | for (let i = 0; i < data.length; i++) { |
| | | for (let j = 0; j < data[i].deviceData.length; j++) { |
| | | if(res.data[0].deviceData.length==1){ |
| | | if (lockLength < data[i].deviceData.length) { |
| | | newLineChartData.series.push({ |
| | | data: [], |
| | | name: '', |
| | | type: 'line', |
| | | label: { |
| | | show: true, |
| | | position: 'top', |
| | | }, |
| | | }) |
| | | } |
| | | } |
| | | else if (lockLength < data[i].deviceData.length) { |
| | | console.log(data[i].deviceData); |
| | | if (res.data[0].deviceData.length == 1) { |
| | | if (lockLength < data[i].deviceData.length) { |
| | | newLineChartData.series.push({ |
| | | data: [], |
| | | name: '', |
| | | type: 'line', |
| | | label: { |
| | | show: true, |
| | | position: 'top', |
| | | }, |
| | | }) |
| | | } |
| | | } else if (lockLength < data[i].deviceData.length) { |
| | | newLineChartData.series.push({ |
| | | data: [], |
| | | name: '', |
| | |
| | | position: 'top', |
| | | }, |
| | | }) |
| | | newLineChartData.series[j].name = data[i].deviceData[j].name |
| | | newLineChartData.title.push(data[i].deviceData[j].name) |
| | | } |
| | | newLineChartData.series[j].name = data[i].deviceData[j].name |
| | | newLineChartData.title.push(data[i].deviceData[j].name) |
| | | lockLength++ |
| | | newLineChartData.series[j].data.push( |
| | | data[i].deviceData[j].sensorValue |
| | | ) |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | newLineChartData.xAxis.push(data[i].time) |
| | | } |
| | | // newLineChartData.title = this.value |