.
This commit is contained in:
parent
bf37828c5d
commit
ac158bcdf7
@ -2,7 +2,7 @@
|
||||
<u-popup :show="open" mode="bottom" @close="close" closeable>
|
||||
<view class="lock">
|
||||
<view class="title">土壤墒情
|
||||
<view class="iconfont icon-shuaxin" @click="getList"></view>
|
||||
<view class="iconfont icon-shuaxin" @click="refreshSoilTilth"></view>
|
||||
</view>
|
||||
<view class="list-title ">
|
||||
<view class="fixed">
|
||||
@ -26,9 +26,9 @@
|
||||
<view class="list-content">
|
||||
<view class="fixed" v-for="data in item.data">
|
||||
<view>{{data.lv}}</view>
|
||||
<view>{{data.depth}}cm</view>
|
||||
<view>{{data.humidity}}%</view>
|
||||
<view>{{data.temperature}}℃</view>
|
||||
<view>{{data.depth}}</view>
|
||||
<view>{{data.humidity}}</view>
|
||||
<view>{{data.temperature}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-collapse-item>
|
||||
@ -41,7 +41,8 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
getMpDeviceList
|
||||
getMpDeviceList,
|
||||
mpRefresh
|
||||
} from "@/api/controlMpInterface.js"
|
||||
export default {
|
||||
name: "Mp",
|
||||
@ -105,6 +106,22 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
refreshSoilTilth() {
|
||||
console.error("refreshSoilTilth");
|
||||
let refresh = [];
|
||||
this.list.forEach(item => {
|
||||
if (refresh.findIndex(x => x.deviceCode == item.deviceCode) == -1) {
|
||||
let mp = {
|
||||
deviceCode: item.deviceCode,
|
||||
lv: item.floors
|
||||
};
|
||||
refresh.push(mp);
|
||||
}
|
||||
});
|
||||
mpRefresh(refresh).then((res) => {
|
||||
console.error("res:", res);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user