|
@@ -329,7 +329,7 @@ export default {
|
|
|
},
|
|
|
// 查询网点列表
|
|
|
getListStation () {
|
|
|
- stationListName({ "deviceType":"BOX"}).then(res => {
|
|
|
+ stationListName({ 'deviceType': 'BOX' }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.stationList = res.data || []
|
|
|
console.log(this.stationList, '------------网点')
|
|
@@ -470,6 +470,7 @@ export default {
|
|
|
for (const key in data) {
|
|
|
this.XdaysData1.push(key)
|
|
|
}
|
|
|
+ this.XdaysData1.sort()
|
|
|
this.hswTypeBarData = this.formAtGroupDateAndRubbishType(data, this.hswTypeBarData)
|
|
|
this.hswTypeLineData = this.formAtGroupDateAndRubbishType(data, this.hswTypeLineData)
|
|
|
this.isNoData1 = false
|
|
@@ -480,10 +481,11 @@ export default {
|
|
|
},
|
|
|
// 格式化数据
|
|
|
formAtGroupDateAndRubbishType (data, obj) {
|
|
|
+ const keyArr = this.XdaysData1
|
|
|
obj.map(item => {
|
|
|
const ret = []
|
|
|
- for (const key in data) {
|
|
|
- const leve2 = data[key]
|
|
|
+ for (let i = 0; i < keyArr.length; i++) {
|
|
|
+ const leve2 = data[keyArr[i]]
|
|
|
const row = leve2[item.code]
|
|
|
const val = row ? Number(row.cleanWeight / 1000).toFixed(3) : 0
|
|
|
ret.push(val)
|