修改中建四局(双碳管理页面)
This commit is contained in:
parent
a5a794855b
commit
12327ec2c1
@ -59,7 +59,7 @@ export default {
|
||||
height: 25%;
|
||||
}
|
||||
.center {
|
||||
height: 50%;
|
||||
height: 43%;
|
||||
}
|
||||
.bottom {
|
||||
height: 25%;
|
||||
|
||||
@ -3,30 +3,35 @@
|
||||
<div class="containerBox">
|
||||
<div class="dataBoardContent">
|
||||
<vue-scroll>
|
||||
<table class="greenTable" v-if="sprayDevList.length > 0">
|
||||
<table class="greenTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<th>设备状态</th>
|
||||
<th>报警类型</th>
|
||||
<th>超标值</th>
|
||||
<th>喷淋次数</th>
|
||||
<th>报警名称</th>
|
||||
<th>设备名称</th>
|
||||
<th>报警值</th>
|
||||
<th>阈值</th>
|
||||
<th>超标时间</th>
|
||||
<th>超标量</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in sprayDevList" :key="index">
|
||||
<tbody v-if="list.length > 0">
|
||||
<tr v-for="(item, index) in list" :key="index">
|
||||
<td>{{ item.type }}</td>
|
||||
<td>{{ item.alarmTypeName }}</td>
|
||||
<td>{{ item.deviceName }}</td>
|
||||
<td>离线</td>
|
||||
<td>pm2.5</td>
|
||||
<td>0.1μg/m³</td>
|
||||
<td>1次</td>
|
||||
<td>{{ item.avgData }}</td>
|
||||
<td>{{ item.alarmValue }}</td>
|
||||
<td>{{ item.tempAlarmTime }}</td>
|
||||
<td>{{ item.exceed }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<div v-else class="noDataDiv">
|
||||
<img src="@/assets/images/noData.png" alt="" />
|
||||
<p>暂无数据</p>
|
||||
</div>
|
||||
</table>
|
||||
<div v-else style="margin-top:60px; height: 70%;text-align: center">
|
||||
<img src="@/assets/images/noData.png" alt="" />
|
||||
<p>暂无数据</p>
|
||||
</div>
|
||||
|
||||
<!-- <div class="placeholderBox placeholderBox2" v-if="alarmList.length == 0">
|
||||
<img src="@/assets/images/noData3.png" alt srcset />
|
||||
<p>
|
||||
@ -41,17 +46,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
environmentDevList,
|
||||
selectNewEnvironmentAlarmListApi,
|
||||
getRealTimeDustNoiseDataApi,
|
||||
getAirQualityStatisticsApi,
|
||||
sprayDevListApi,
|
||||
selectDustNoiseDataApi,
|
||||
getWeatherDataApi,
|
||||
getCurrentDayAirQualityApi,
|
||||
sprayOperateDataApi
|
||||
} from '@/assets/js/api/environmentManage'
|
||||
import { environmentDevList, environmentAlarmList, environmentAlarmTypeList } from '@/assets/js/api/environmentManage'
|
||||
|
||||
import Card from '../components/Card.vue'
|
||||
export default {
|
||||
@ -60,66 +55,113 @@ export default {
|
||||
return {
|
||||
alarmList: [],
|
||||
sprayDevList: [],
|
||||
// alarmList: [
|
||||
// {
|
||||
// deviceName: "一号设备",
|
||||
// tempAlarmTime: "塔吊喷淋",
|
||||
// show: true
|
||||
// },
|
||||
// {
|
||||
// deviceName: "一号设备",
|
||||
// tempAlarmTime: "塔吊喷淋",
|
||||
// show: false
|
||||
// },
|
||||
// {
|
||||
// deviceName: "一号设备",
|
||||
// tempAlarmTime: "塔吊喷淋",
|
||||
// show: false
|
||||
// },
|
||||
// {
|
||||
// deviceName: "一号设备",
|
||||
// tempAlarmTime: "塔吊喷淋",
|
||||
// show: true
|
||||
// },
|
||||
// {
|
||||
// deviceName: "一号设备",
|
||||
// tempAlarmTime: "塔吊喷淋",
|
||||
// show: false
|
||||
// },
|
||||
// ],
|
||||
|
||||
value: true
|
||||
value: true,
|
||||
// list: [{
|
||||
// type:'222222',
|
||||
// alarmTypeName:'2222222',
|
||||
// deviceName:'deviceName',
|
||||
// avgData:'avgData',
|
||||
// alarmValue:'alarmValue',
|
||||
// tempAlarmTime:'tempAlarmTime',
|
||||
// exceed:'exceed'
|
||||
// }],
|
||||
list: [],
|
||||
time: [],
|
||||
alarmTypeIdArr: [],
|
||||
deviceIdArr: [],
|
||||
pagInfo: {
|
||||
pageNo: 1, //页数
|
||||
pageSize: 10, //条数
|
||||
total: 0 //总条数
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getAlarmList()
|
||||
this.getSprayDevList()
|
||||
this.sprayOperate()
|
||||
console.log('合并列表数据', dataListNew)
|
||||
mounted() {
|
||||
this.selectNowDate()
|
||||
this.getEnvironmentAlarmTypeList()
|
||||
this.getDevice()
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
sprayOperate(deviceId, operateType) {
|
||||
sprayOperateDataApi({ projectSn: this.$store.state.projectSn, operateType: operateType, deviceId: deviceId }).then(res => {
|
||||
this.sprayDevList = res.result
|
||||
})
|
||||
// 获取当前时间 返回YYYY-MM-DD HH:mm:ss
|
||||
selectNowDate() {
|
||||
var date = new Date(),
|
||||
year = date.getFullYear(),
|
||||
month = date.getMonth() + 1,
|
||||
day = date.getDate(),
|
||||
hours = date.getHours(), //获取当前小时数(0-23)
|
||||
minutes = date.getMinutes(), //获取当前分钟数(0-59)
|
||||
seconds = date.getSeconds()
|
||||
month >= 1 && month <= 9 ? (month = '0' + month) : ''
|
||||
day >= 0 && day <= 9 ? (day = '0' + day) : ''
|
||||
hours >= 0 && hours <= 9 ? (hours = '0' + hours) : ''
|
||||
minutes >= 0 && minutes <= 9 ? (minutes = '0' + minutes) : ''
|
||||
seconds >= 0 && seconds <= 9 ? (seconds = '0' + seconds) : ''
|
||||
// var timer = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes+ ':' + seconds;
|
||||
var timer = year + '-' + month + '-' + day
|
||||
this.time = [timer, timer]
|
||||
console.log(timer)
|
||||
// return timer;
|
||||
},
|
||||
getSprayDevList() {
|
||||
sprayDevListApi({ projectSn: this.$store.state.projectSn }).then(res => {
|
||||
this.sprayDevList = res.result
|
||||
})
|
||||
refresh() {
|
||||
this.queryInfo = {}
|
||||
this.time = []
|
||||
this.pagInfo.pageNo = 1 //页数
|
||||
this.pagInfo.pageSize = 10 //条数
|
||||
this.getList()
|
||||
},
|
||||
//获取报警列表
|
||||
getAlarmList() {
|
||||
let data = {
|
||||
projectSn: this.projectSn
|
||||
}
|
||||
selectNewEnvironmentAlarmListApi(data).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.alarmList = res.result
|
||||
console.log('报警列表----', this.alarmList)
|
||||
query() {
|
||||
this.queryInfo.startTime = this.time[0]
|
||||
this.queryInfo.endTime = this.time[1]
|
||||
this.pagInfo.pageNo = 1
|
||||
console.log('query', this.queryInfo)
|
||||
this.getList()
|
||||
},
|
||||
getDevice() {
|
||||
environmentDevList({ projectSn: this.$store.state.projectSn }).then(result => {
|
||||
if (result.success) {
|
||||
this.deviceIdArr = result.result
|
||||
console.log('get设备列表', this.deviceIdArr)
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
let timeObj = {
|
||||
startTime: this.time ? this.time[0] : '',
|
||||
endTime: this.time ? this.time[1] : ''
|
||||
}
|
||||
environmentAlarmList(Object.assign(this.pagInfo, { projectSn: this.$store.state.projectSn }, timeObj)).then(result => {
|
||||
if (result.success) {
|
||||
this.List = result.result.records
|
||||
this.pagInfo.total = result.result.total
|
||||
console.log('报警列表', result)
|
||||
}
|
||||
})
|
||||
},
|
||||
getEnvironmentAlarmTypeList() {
|
||||
environmentAlarmTypeList().then(result => {
|
||||
if (result.success) this.alarmTypeIdArr = result.result
|
||||
})
|
||||
},
|
||||
SizeChange(val) {
|
||||
this.pagInfo.pageSize = val
|
||||
this.getList()
|
||||
},
|
||||
CurrentChange(val) {
|
||||
this.pagInfo.pageNo = val
|
||||
this.getList()
|
||||
}
|
||||
//---------
|
||||
// sprayOperate(deviceId, operateType) {
|
||||
// sprayOperateDataApi({ projectSn: this.$store.state.projectSn, operateType: operateType, deviceId: deviceId }).then(res => {
|
||||
// this.sprayDevList = res.result
|
||||
// })
|
||||
// },
|
||||
// getSprayDevList() {
|
||||
// sprayDevListApi({ projectSn: this.$store.state.projectSn }).then(res => {
|
||||
// this.sprayDevList = res.result
|
||||
// })
|
||||
// },
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -135,6 +177,9 @@ export default {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.greenTable {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
th {
|
||||
color: #72bdc9;
|
||||
border-bottom: 1px solid rgba(31, 68, 86, 0.3);
|
||||
@ -145,6 +190,22 @@ export default {
|
||||
color: #fff;
|
||||
line-height: 35px;
|
||||
}
|
||||
margin-right: 15px;
|
||||
margin-left: -6px;
|
||||
.noDataDiv {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin-top: 100px;
|
||||
|
||||
img {
|
||||
text-align: center;
|
||||
margin-left: 180px;
|
||||
}
|
||||
p {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
.alarmType {
|
||||
position: relative;
|
||||
|
||||
@ -311,7 +311,7 @@ export default {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 35%;
|
||||
height: 37%;
|
||||
margin:15px 0px 20px 10px;
|
||||
// margin-top: 5px;
|
||||
.leftWaterDiv,
|
||||
|
||||
@ -183,7 +183,7 @@ export default {
|
||||
width: 99%;
|
||||
height: 90%;
|
||||
margin-left: 9px;
|
||||
margin-top: 4%;
|
||||
margin-top: 1.5%;
|
||||
}
|
||||
|
||||
::v-deep .el-tree-node__expand-icon {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user