修改看板

IOT
夜笙歌 1 month ago
parent d6bf8217c1
commit 6afee7051f

@ -11,7 +11,7 @@
<div class="items"> <div class="items">
<div class="item" v-for="(ii,kk) in i.children" @click="getInfo(ii)"> <div class="item" v-for="(ii,kk) in i.children" @click="getInfo(ii)">
<div class="name">{{ ii.label }}</div> <div class="name">{{ ii.label }}</div>
<div class="tem">{{ ii.tempreture?`温度:${ii.tempreture}`:'' }}</div> <div class="tem">{{ ii.tempreture ? `温度:${ii.tempreture}` : '' }}</div>
</div> </div>
</div> </div>
</div> </div>
@ -37,30 +37,27 @@
<script> <script>
import {baseMonitorInfoList, boardTWTempertureDataList, monitorInfoTree} from "@/api/board/index1"; import {monitorInfoTree} from "@/api/board/index1";
import {handleTree} from "@/utils/ruoyi";
export default { export default {
data() { data() {
return { return {
list: [], list: [],
list1:[], list1: [],
title: '', title: '',
dialogVisible: false, dialogVisible: false,
} }
}, },
mounted() { mounted() {
this.getData() this.getData()
setInterval(() => {
this.getData()
}, 1000 * 60 * 5)
}, },
methods: { methods: {
getData() { getData() {
monitorInfoTree({monitorType: 1}).then(e => { monitorInfoTree({monitorType: 1}).then(e => {
console.log(e) this.list = e.data
this.list =e.data
})
baseMonitorInfoList({monitorType: 1}).then(e => {
// console.log(handleTree(e.data, 'objId'))
this.list = handleTree(e.data, 'objId')
}) })
}, },
getInfo(e) { getInfo(e) {

Loading…
Cancel
Save