|
@@ -62,7 +62,7 @@ |
|
@@ -62,7 +62,7 @@ |
|
62
|
@close="calendarClose"></u-calendar>
|
62
|
@close="calendarClose"></u-calendar>
|
|
63
|
<u-picker :show="showTimeGap" :columns="columns" keyName="label" closeOnClickOverlay @confirm="confirmTimeGap"
|
63
|
<u-picker :show="showTimeGap" :columns="columns" keyName="label" closeOnClickOverlay @confirm="confirmTimeGap"
|
|
64
|
@cancel="cancelTimeGap" @close="cancelTimeGap" :defaultIndex="[3]"></u-picker>
|
64
|
@cancel="cancelTimeGap" @close="cancelTimeGap" :defaultIndex="[3]"></u-picker>
|
|
65
|
- <u-picker :show="showSelectType" :columns="keys" closeOnClickOverlay @confirm="confirmTypeGap"
|
65
|
+ <u-picker :show="showSelectType" :columns="[keys.map(item=>({label:item.name,value:item.identifier}))]" keyName="label" closeOnClickOverlay @confirm="confirmTypeGap"
|
|
66
|
@cancel="cancelTypeGap" @close="cancelTypeGap"></u-picker>
|
66
|
@cancel="cancelTypeGap" @close="cancelTypeGap"></u-picker>
|
|
67
|
<u-picker :show="showSelectAvg" :columns="avgColumns" keyName="label" closeOnClickOverlay
|
67
|
<u-picker :show="showSelectAvg" :columns="avgColumns" keyName="label" closeOnClickOverlay
|
|
68
|
@confirm="confirmAvgGap" @cancel="showSelectAvg=false" @close="showSelectAvg=false"></u-picker>
|
68
|
@confirm="confirmAvgGap" @cancel="showSelectAvg=false" @close="showSelectAvg=false"></u-picker>
|
|
@@ -163,7 +163,7 @@ |
|
@@ -163,7 +163,7 @@ |
|
163
|
chartData: {
|
163
|
chartData: {
|
|
164
|
categories: this.historyData.length && this.historyData.map(item => item.ts),
|
164
|
categories: this.historyData.length && this.historyData.map(item => item.ts),
|
|
165
|
series: [{
|
165
|
series: [{
|
|
166
|
- name: this.keys[0][0],
|
166
|
+ name: this.keys[0].identifier,
|
|
167
|
data: this.historyData.length && this.historyData.map(item => Number(item.value))
|
167
|
data: this.historyData.length && this.historyData.map(item => Number(item.value))
|
|
168
|
}]
|
168
|
}]
|
|
169
|
},
|
169
|
},
|
|
@@ -199,7 +199,7 @@ |
|
@@ -199,7 +199,7 @@ |
|
199
|
timeData: {
|
199
|
timeData: {
|
|
200
|
selectTime: this.yesterday + ' 至 ' + this.today,
|
200
|
selectTime: this.yesterday + ' 至 ' + this.today,
|
|
201
|
getTimeGap: this.timeDiff,
|
201
|
getTimeGap: this.timeDiff,
|
|
202
|
- getType: this.keys[0][0],
|
202
|
+ getType: this.keys[0].name,
|
|
203
|
limit: 7,
|
203
|
limit: 7,
|
|
204
|
agg: 'NONE'
|
204
|
agg: 'NONE'
|
|
205
|
},
|
205
|
},
|
|
@@ -214,7 +214,7 @@ |
|
@@ -214,7 +214,7 @@ |
|
214
|
} else {
|
214
|
} else {
|
|
215
|
this.chartData.categories = newValue.map(item => item.ts);
|
215
|
this.chartData.categories = newValue.map(item => item.ts);
|
|
216
|
this.chartData.series = [{
|
216
|
this.chartData.series = [{
|
|
217
|
- name: this.keys[0][0],
|
217
|
+ name: this.keys[0].name,
|
|
218
|
data: newValue.map(item => Number(item.value))
|
218
|
data: newValue.map(item => Number(item.value))
|
|
219
|
}];
|
219
|
}];
|
|
220
|
}
|
220
|
}
|
|
@@ -363,18 +363,18 @@ |
|
@@ -363,18 +363,18 @@ |
|
363
|
},
|
363
|
},
|
|
364
|
async confirmTypeGap(time) {
|
364
|
async confirmTypeGap(time) {
|
|
365
|
this.showSelectType = false;
|
365
|
this.showSelectType = false;
|
|
366
|
- this.timeData.getType = time.value[0];
|
366
|
+ this.timeData.getType = time.value[0].label;
|
|
367
|
const interval = this.columns[0].find(item => item.label === this.timeData.getTimeGap);
|
367
|
const interval = this.columns[0].find(item => item.label === this.timeData.getTimeGap);
|
|
368
|
const data = await getHistoryData({
|
368
|
const data = await getHistoryData({
|
|
369
|
startTs: this.startTs,
|
369
|
startTs: this.startTs,
|
|
370
|
endTs: this.endTs,
|
370
|
endTs: this.endTs,
|
|
371
|
- keys: this.timeData.getType,
|
371
|
+ keys:time.value[0].value,
|
|
372
|
interval: this.limitFlag ? null : interval.value,
|
372
|
interval: this.limitFlag ? null : interval.value,
|
|
373
|
entityId: this.entityId,
|
373
|
entityId: this.entityId,
|
|
374
|
limit: this.timeData.limit,
|
374
|
limit: this.timeData.limit,
|
|
375
|
agg: this.timeData.agg
|
375
|
agg: this.timeData.agg
|
|
376
|
});
|
376
|
});
|
|
377
|
- this.$emit('update', data[this.timeData.getType]);
|
377
|
+ this.$emit('update', data[time.value[0].value]);
|
|
378
|
},
|
378
|
},
|
|
379
|
cancelTypeGap() {
|
379
|
cancelTypeGap() {
|
|
380
|
this.showSelectType = false;
|
380
|
this.showSelectType = false;
|