|
@@ -4,7 +4,7 @@
|
|
<div class="top" @tap="placeShow = true;">
|
|
<div class="top" @tap="placeShow = true;">
|
|
<div class="left">
|
|
<div class="left">
|
|
<image :src="imgBase+'inspection/record_location.png'"></image>
|
|
<image :src="imgBase+'inspection/record_location.png'"></image>
|
|
- <text>{{'电商园四期B座'}}</text>
|
|
|
|
|
|
+ <text>{{location}}</text>
|
|
</div>
|
|
</div>
|
|
<div class="right">
|
|
<div class="right">
|
|
<u-icon name="arrow-right" color="#FFFFFF" size="32"></u-icon>
|
|
<u-icon name="arrow-right" color="#FFFFFF" size="32"></u-icon>
|
|
@@ -13,18 +13,18 @@
|
|
<div class="title">共有<span>{{list.length}}</span>条记录</div>
|
|
<div class="title">共有<span>{{list.length}}</span>条记录</div>
|
|
<div class="boxs" v-if="list.length">
|
|
<div class="boxs" v-if="list.length">
|
|
<div class="box" v-for="(item,index) in list" :key="index">
|
|
<div class="box" v-for="(item,index) in list" :key="index">
|
|
- <div class="place">{{item.place}}</div>
|
|
|
|
- <div class="pre">安装位置<span>{{item.time}}</span></div>
|
|
|
|
- <div class="pre">设备编号<span>{{item.deviceno}}</span></div>
|
|
|
|
- <div class="pre">告警原因<span class="red">{{item.reason}}</span></div>
|
|
|
|
- <div class="pre">告警内容<span>{{item.content}}</span></div>
|
|
|
|
- <div class="pre">巡检时间<span>{{item.time}}</span></div>
|
|
|
|
|
|
+ <div class="place">{{item.deviceName||''}}</div>
|
|
|
|
+ <!-- <div class="pre">安装位置<span>{{item.time}}</span></div> -->
|
|
|
|
+ <div class="pre">设备编号<span>{{item.deviceId||''}}</span></div>
|
|
|
|
+ <div class="pre">告警原因<span class="red">{{item.alertConfigName||''}}</span></div>
|
|
|
|
+ <div class="pre">告警内容<span>{{item.content||''}}</span></div>
|
|
|
|
+ <div class="pre">告警时间<span>{{item.alertTime||''}}</span></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<template v-else>
|
|
<template v-else>
|
|
- <page-empty :height="'calc(100vh - '+(mt+105)+'px)'" marginTop="105px"></page-empty>
|
|
|
|
|
|
+ <page-empty :height="'calc(100vh - 110px)'"></page-empty>
|
|
</template>
|
|
</template>
|
|
- <u-picker :show="placeShow" :columns="placeColumns" @cancel="placeShow=false" @change="changeHandler" @confirm="e=>paramsConfirm(e,'')" ref="uPicker"></u-picker>
|
|
|
|
|
|
+ <u-picker :show="placeShow" :columns="placeColumns" keyName="orgName" @cancel="placeShow=false" @change="changeHandler" @confirm="placeConfirm" ref="uPicker"></u-picker>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -36,36 +36,46 @@
|
|
},
|
|
},
|
|
data(){
|
|
data(){
|
|
return {
|
|
return {
|
|
|
|
+ location:'',
|
|
placeShow:false,
|
|
placeShow:false,
|
|
- placeColumns:[
|
|
|
|
- ['A栋','B栋'],
|
|
|
|
- ['A101', 'A102', 'A103', 'A201']
|
|
|
|
- ],
|
|
|
|
- placeColumnData: [
|
|
|
|
- ['A101', 'A102', 'A103', 'A201'],
|
|
|
|
- ['B201', 'B203', 'B303', 'B404']
|
|
|
|
- ],
|
|
|
|
- list:[
|
|
|
|
- {
|
|
|
|
- place:'B座13楼1301',
|
|
|
|
- position:'电商园四期B座-13层',
|
|
|
|
- deviceno:'A32486',
|
|
|
|
- reason:'温度 ≥ 40℃',
|
|
|
|
- content:'实时温度52℃',
|
|
|
|
- time:'2024-12-28 10:34:22'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- place:'B座13楼1302',
|
|
|
|
- position:'电商园四期B座-13层',
|
|
|
|
- deviceno:'A32486',
|
|
|
|
- reason:'温度 ≥ 40℃',
|
|
|
|
- content:'实时温度52℃',
|
|
|
|
- time:'2024-12-28 10:34:22'
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
|
|
+ placeColumns:[],
|
|
|
|
+ placeColumnData: [],
|
|
|
|
+ isOver:false,
|
|
|
|
+ params:{
|
|
|
|
+ buildingId:'',
|
|
|
|
+ storeyId:''
|
|
|
|
+ },
|
|
|
|
+ list:[],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- methods:{
|
|
|
|
|
|
+ async onLoad() {
|
|
|
|
+ this.getFloorInfo();
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
+ methods:{
|
|
|
|
+ getFloorInfo(){
|
|
|
|
+ this.$api.get('/control/getOrgStructureTree/').then(res=>{
|
|
|
|
+ if(res.data.code===0){
|
|
|
|
+ this.location = res.data.data[0].orgName;
|
|
|
|
+ this.placeColumns = [
|
|
|
|
+ res.data.data[0].childrenList,
|
|
|
|
+ res.data.data[0].childrenList[0].childrenList
|
|
|
|
+ ]
|
|
|
|
+ let allfloor = [];
|
|
|
|
+ for (let i = 0; i < res.data.data[0].childrenList.length; i++) {
|
|
|
|
+ allfloor.push(res.data.data[0].childrenList[i].childrenList)
|
|
|
|
+ }
|
|
|
|
+ this.placeColumnData = allfloor;
|
|
|
|
+ }else this.$showToast(res.data.msg)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getList(){
|
|
|
|
+ this.$api.get('/home/actualAlertList',this.params).then(res=>{
|
|
|
|
+ if(res.data.code===0){
|
|
|
|
+ this.list = res.data.data;
|
|
|
|
+ }else this.$showModal(res.data.msg)
|
|
|
|
+ });
|
|
|
|
+ },
|
|
changeHandler(e) {
|
|
changeHandler(e) {
|
|
const {
|
|
const {
|
|
columnIndex,
|
|
columnIndex,
|
|
@@ -81,8 +91,17 @@
|
|
picker.setColumnValues(1, this.placeColumnData[index])
|
|
picker.setColumnValues(1, this.placeColumnData[index])
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- paramsConfirm(e,type){
|
|
|
|
|
|
+ placeConfirm(e){
|
|
|
|
+ this.params.buildingId = e.value[0].orgId;
|
|
|
|
+ this.params.storeyId = e.value[1].orgId;
|
|
this.placeShow = false;
|
|
this.placeShow = false;
|
|
|
|
+ this.init()
|
|
|
|
+ },
|
|
|
|
+ init(){
|
|
|
|
+ this.params.page = 1;
|
|
|
|
+ this.isOver = false;
|
|
|
|
+ this.list = [];
|
|
|
|
+ this.getList();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|