|
@@ -22,11 +22,15 @@
|
|
|
<!-- 数据表 -->
|
|
|
<h2>订单温湿度列表</h2>
|
|
|
<el-table :data="tableData2" stripe border style="width: 97%">
|
|
|
- <el-table-column prop="measuringPointName" label="车牌号或保温箱" align="center" min-width="200" />
|
|
|
- <el-table-column prop="measuringPointAddr" label="探头" align="center" min-width="100" />
|
|
|
- <el-table-column prop="temperature" label="温度" align="center" min-width="100" />
|
|
|
- <el-table-column prop="hisDate" label="时间点" align="center" min-width="300" />
|
|
|
- <el-table-column prop="address" label="地址" min-width="400" />
|
|
|
+ <el-table-column prop="measuringPointName" label="车牌号或保温箱" align="center" min-width="150" />
|
|
|
+ <el-table-column prop="measuringPointAddr" label="探头" align="center" min-width="90" />
|
|
|
+ <el-table-column prop="temperature" label="温度" align="center" min-width="80" />
|
|
|
+ <el-table-column prop="hisDate" label="时间点" align="center" min-width="200" />
|
|
|
+ <el-table-column prop="measuringPointName1" label="车牌号或保温箱" align="center" min-width="150" />
|
|
|
+ <el-table-column prop="measuringPointAddr1" label="探头" align="center" min-width="90" />
|
|
|
+ <el-table-column prop="temperature1" label="温度" align="center" min-width="80" />
|
|
|
+ <el-table-column prop="hisDate1" label="时间点" align="center" min-width="200" />
|
|
|
+ <!-- <el-table-column prop="address" label="地址" width="400" /> -->
|
|
|
</el-table>
|
|
|
</el-timeline>
|
|
|
</div>
|
|
@@ -222,44 +226,44 @@
|
|
|
}
|
|
|
},
|
|
|
markArea: {
|
|
|
- itemStyle: {
|
|
|
- color: 'rgba(255, 173, 177, 0.4)'
|
|
|
- },
|
|
|
- data: [
|
|
|
- [{
|
|
|
- name: '冷藏温度警戒线',
|
|
|
- yAxis: '8'
|
|
|
- },
|
|
|
- {
|
|
|
- yAxis: '8.1'
|
|
|
- }
|
|
|
- ],
|
|
|
- [{
|
|
|
- name: '冷藏温度警戒线',
|
|
|
- yAxis: '2'
|
|
|
- },
|
|
|
- {
|
|
|
- yAxis: '1.9'
|
|
|
- }
|
|
|
- ],
|
|
|
- [{
|
|
|
- name: '冷冻温度警戒线',
|
|
|
- yAxis: '-15'
|
|
|
- },
|
|
|
- {
|
|
|
- yAxis: '-14.9'
|
|
|
- }
|
|
|
- ],
|
|
|
- [{
|
|
|
- name: '冷冻温度警戒线',
|
|
|
- yAxis: '-25'
|
|
|
- },
|
|
|
- {
|
|
|
- yAxis: '-25.1'
|
|
|
- }
|
|
|
- ]
|
|
|
+ itemStyle: {
|
|
|
+ color: 'rgba(255, 173, 177, 0.4)'
|
|
|
+ },
|
|
|
+ data: [
|
|
|
+ [{
|
|
|
+ name: '冷藏温度警戒线',
|
|
|
+ yAxis: '8'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ yAxis: '8.1'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ [{
|
|
|
+ name: '冷藏温度警戒线',
|
|
|
+ yAxis: '2'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ yAxis: '1.9'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ [{
|
|
|
+ name: '冷冻温度警戒线',
|
|
|
+ yAxis: '-15'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ yAxis: '-14.9'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ [{
|
|
|
+ name: '冷冻温度警戒线',
|
|
|
+ yAxis: '-25'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ yAxis: '-25.1'
|
|
|
+ }
|
|
|
]
|
|
|
- }
|
|
|
+ ]
|
|
|
+ }
|
|
|
}
|
|
|
// count = 0;
|
|
|
for (let j = 0; j < latitudeLongitude.length; j++) {
|
|
@@ -545,7 +549,49 @@
|
|
|
this.modelData1[0].startTime = array[0].hisDate;
|
|
|
this.modelData1[0].endTime = array[array.length - 1].hisDate;
|
|
|
this.tableData1 = this.modelData1;
|
|
|
- this.tableData2 = array;
|
|
|
+ let median = (array.length / 2).toFixed(0);
|
|
|
+ console.log(median, 'median');
|
|
|
+ let table = []
|
|
|
+ for (let i = 0; i < median; i++) {
|
|
|
+ table[i] = {
|
|
|
+ measuringPointName: '',
|
|
|
+ measuringPointAddr: '',
|
|
|
+ temperature: '',
|
|
|
+ hisDate: '',
|
|
|
+ measuringPointName1: '',
|
|
|
+ measuringPointAddr1: '',
|
|
|
+ temperature1: '',
|
|
|
+ hisDate1: ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(table, 'table');
|
|
|
+ if (array.length % 2 == 0) {
|
|
|
+ for (let i = 0, j = median; i < median; i++, j++) {
|
|
|
+ table[i].measuringPointName = array[i].measuringPointName;
|
|
|
+ table[i].measuringPointAddr = array[i].measuringPointAddr;
|
|
|
+ table[i].temperature = array[i].temperature;
|
|
|
+ table[i].hisDate = array[i].hisDate;
|
|
|
+ table[i].measuringPointName1 = array[j].measuringPointName;
|
|
|
+ table[i].measuringPointAddr1 = array[j].measuringPointAddr;
|
|
|
+ table[i].temperature1 = array[j].temperature;
|
|
|
+ table[i].hisDate1 = array[j].hisDate;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (let i = 0, j = median; i < median; i++, j++) {
|
|
|
+ table[i].measuringPointName = array[i].measuringPointName;
|
|
|
+ table[i].measuringPointAddr = array[i].measuringPointAddr;
|
|
|
+ table[i].temperature = array[i].temperature;
|
|
|
+ table[i].hisDate = array[i].hisDate;
|
|
|
+ if (i != median - 1) {
|
|
|
+ table[i].measuringPointName1 = array[j].measuringPointName;
|
|
|
+ table[i].measuringPointAddr1 = array[j].measuringPointAddr;
|
|
|
+ table[i].temperature1 = array[j].temperature;
|
|
|
+ table[i].hisDate1 = array[j].hisDate;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(table, 'table');
|
|
|
+ this.tableData2 = table;
|
|
|
},
|
|
|
//获取当前时间
|
|
|
getCurrentTime() {
|