Browse Source

feat:fix bugs

master
zhaobing’ 11 months ago
parent
commit
f13f8d4231
  1. 2
      weapp/package/AIOTOverview/AIOTOverview.js
  2. 3
      weapp/package/AIOTOverview/electricityMonitoring/electricityMonitoring.js
  3. 4
      weapp/package/AIOTOverview/electricityMonitoring/electricityMonitoring.wxml
  4. 7
      weapp/package/AIOTOverview/flowMonitoring/flowMonitoring.js

2
weapp/package/AIOTOverview/AIOTOverview.js

@ -86,7 +86,7 @@ Page({
controlId=res.map(item=>{
return {
...item,
xjId:rslt.rows.find(q=>q.axyProjectId==item.thingId)?.id
xjId:rslt.rows.find(q=>q.axyProjectId==item.thingId)?.structureId
}
})
}

3
weapp/package/AIOTOverview/electricityMonitoring/electricityMonitoring.js

@ -70,7 +70,7 @@ Page({
if(res.rows.length&&rslt.rows.length){
const data=res.rows.map(item=>{
return {
value: rslt.rows.find(q => item.id === q.structureId)?.structureId,
value: item.id,
text:item.name
}
})
@ -85,7 +85,6 @@ Page({
})
}
data.unshift({text: '全部', value: 'all' })
// console.log('listt',listt)
this.setData({
structList:data,
list:listt,

4
weapp/package/AIOTOverview/electricityMonitoring/electricityMonitoring.wxml

@ -27,13 +27,13 @@
<view class="content-left">运行状态</view>
<view class="content-right" wx:if="{{!item.data.data}}">{{'离线'}}</view>
<view class="content-right" wx:if="{{item.data.data&&item.data.data.info.includles('离线')}}">{{'离线'}}</view>
<view class="content-right" wx:if="{{item.data.data&&item.data.data.info.includles('在线')}}">{{'正常'}}</view>
<view class="content-right" wx:if="{{item.data.data&&item.data.data.info.includles('1-在线')}}">{{'正常'}}</view>
</view>
<view class="row flex flex-between detail">
<view class="content-left">电源状态</view>
<view class="content-right" wx:if="{{!item.data.data}}">{{'离线'}}</view>
<view class="content-right" wx:if="{{item.data.data&&item.data.data.info.includles('离线')}}">{{'离线'}}</view>
<view class="content-right" wx:if="{{item.data.data&&item.data.data.info.includles('在线')}}">{{'正常'}}</view>
<view class="content-right" wx:if="{{item.data.data&&item.data.data.info.includles('1-在线')}}">{{'正常'}}</view>
</view>
</view>
</view>

7
weapp/package/AIOTOverview/flowMonitoring/flowMonitoring.js

@ -41,10 +41,11 @@ Page({
const res = await Request.get(getProjectList())
const rslt = await Request.get(getRelationList())
if (res.rows.length && rslt.rows.length) {
const data = res.rows.map(item => {
const data=res.rows.map(item=>{
return {
value: rslt.rows.find(q => item.id === q.structureId)?.id,
text: item.name
value: item.id,
text:item.name
}
})
data.unshift({ text: '全部', value: 'all' })

Loading…
Cancel
Save