Commit 303d4ad6 by zhangzhen

细节优化

parent 1bcfc2e2
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<view class="flex-between"> <view class="flex-between">
<view class="flex-row-center"> <view class="flex-row-center">
<image class="icon" src="../../static/big-data/line_icon.png" mode="widthFix"></image> <image class="icon" src="../../static/big-data/line_icon.png" mode="widthFix"></image>
<text class="text-title text-lg text-bold">{{item.deviceName}}</text> <text class="text-title text-lg text-bold">{{item.deviceName}}-{{item.deviceModel}}</text>
</view> </view>
<view class="flex-row-center"> <view class="flex-row-center">
<image v-if="['1','2','3','4'].includes(item.status)" class="icon" src="../../static/d_s_1.png" mode="widthFix"></image> <image v-if="['1','2','3','4'].includes(item.status)" class="icon" src="../../static/d_s_1.png" mode="widthFix"></image>
...@@ -165,7 +165,8 @@ ...@@ -165,7 +165,8 @@
4:"复位", 4:"复位",
5:"一级报警", 5:"一级报警",
6:"二级报警" 6:"二级报警"
} },
mockDataList: []
}; };
}, },
onLoad() { onLoad() {
...@@ -212,8 +213,135 @@ ...@@ -212,8 +213,135 @@
companyCode: this.factoryList[this.factoryIndex].companyCode, companyCode: this.factoryList[this.factoryIndex].companyCode,
date: moment(this.date).format("YYYYMMDD") date: moment(this.date).format("YYYYMMDD")
}).then(res => { }).then(res => {
if (res.data.__sys__.status === 0) { if (res.data.__sys__.status === 0 && res.data.result) {
this.dataChatList = res.data.result.map(item => {
let list = res.data.result
this.mockDataList =[
{
deviceCode:'SB000098',
deviceModel:'G8098F',
deviceName:'切割机_98',
errerTime:[
{
[moment(this.date).subtract(6, 'd').format("MMDD")]:212
},
{
[moment(this.date).subtract(5, 'd').format("MMDD")]:300,
},
{
[moment(this.date).subtract(4, 'd').format("MMDD")]:146,
},
{
[moment(this.date).subtract(3, 'd').format("MMDD")]:245,
},
{
[moment(this.date).subtract(2, 'd').format("MMDD")]:242,
},
{
[moment(this.date).subtract(1, 'd').format("MMDD")]:106,
},
{
[moment(this.date).format("MMDD")]:123
}
],
runTime:[
{
[moment(this.date).subtract(6, 'd').format("MMDD")]:12
},
{
[moment(this.date).subtract(5, 'd').format("MMDD")]:34
},
{
[moment(this.date).subtract(4, 'd').format("MMDD")]:24
},
{
[moment(this.date).subtract(3, 'd').format("MMDD")]:45
},
{
[moment(this.date).subtract(2, 'd').format("MMDD")]:61
},
{
[moment(this.date).subtract(1, 'd').format("MMDD")]:68
},
{
[moment(this.date).format("MMDD")]:31
}
],
status:'1'
},
{
deviceCode:'SB000099',
deviceModel:'G8099F',
deviceName:'切割机_99',
errerTime:[
{
[moment(this.date).subtract(6, 'd').format("MMDD")]:232
},
{
[moment(this.date).subtract(5, 'd').format("MMDD")]:240,
},
{
[moment(this.date).subtract(4, 'd').format("MMDD")]:186,
},
{
[moment(this.date).subtract(3, 'd').format("MMDD")]:145,
},
{
[moment(this.date).subtract(2, 'd').format("MMDD")]:222,
},
{
[moment(this.date).subtract(1, 'd').format("MMDD")]:116,
},
{
[moment(this.date).format("MMDD")]:223
}
],
runTime:[
{
[moment(this.date).subtract(6, 'd').format("MMDD")]:24
},
{
[moment(this.date).subtract(5, 'd').format("MMDD")]:24
},
{
[moment(this.date).subtract(4, 'd').format("MMDD")]:14
},
{
[moment(this.date).subtract(3, 'd').format("MMDD")]:25
},
{
[moment(this.date).subtract(2, 'd').format("MMDD")]:41
},
{
[moment(this.date).subtract(1, 'd').format("MMDD")]:48
},
{
[moment(this.date).format("MMDD")]:21
}
],
status:'1'
}
]
list.push(...this.mockDataList)
this.dataChatList = list.map(item => {
return { return {
...item, ...item,
echartShow: false, echartShow: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment