修改中建四局(监控大屏)

This commit is contained in:
yjl 2022-11-03 18:49:51 +08:00
parent 16bcf9bcaf
commit 2bb13aee48
2 changed files with 23 additions and 35 deletions

View File

@ -5,15 +5,18 @@
<span @click="change(1)" :class="number == 1 ? 'newStyle' : 'btn_anniu'">零碳展厅</span> <span @click="change(1)" :class="number == 1 ? 'newStyle' : 'btn_anniu'">零碳展厅</span>
</div> </div>
<div class="right3"> <div class="right3">
<div class="dropDown" v-show="0 === number"> <div class="dropDown" v-show="0 === number">
<el-select v-model="Equipment" > <el-select v-model="Equipment" >
<el-option <el-option
v-for="item in options" v-for="(item,index) in devList"
:key="item.value" :key="index"
@click="realTimeMonitor(item)"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div v-show="0 === number" ref="centerChart" class="centerChart" id="right2"></div> <div v-show="0 === number" ref="centerChart" class="centerChart" id="right2"></div>
<div class="right4" v-show="1 === number"> <div class="right4" v-show="1 === number">
@ -80,6 +83,8 @@ export default {
}, },
mounted() { mounted() {
this.createCenterChart() this.createCenterChart()
this.getRealTimeDustNoiseData()
this.realTimeMonitor()
// this.$nextTick(() => { // this.$nextTick(() => {
// this.getDevList(); // this.getDevList();
// }); // });
@ -145,7 +150,7 @@ export default {
console.log(data) console.log(data)
getRealTimeDustNoiseDataApi(data).then(res => { getRealTimeDustNoiseDataApi(data).then(res => {
if (res.code == 200) { if (res.code == 200) {
console.log(res.result) console.log('获取环境设备详情数据',res.result)
if (res.result != null) { if (res.result != null) {
this.plantCap = res.result this.plantCap = res.result
} else { } else {
@ -501,6 +506,17 @@ export default {
color: #fff; color: #fff;
} }
} }
.devList {
li {
cursor: pointer;
text-align: center;
line-height: 22px;
&.active,
&:hover {
color: rgba(6, 248, 179, 0.8);
}
}
}
} }
} }
</style> </style>

View File

@ -94,12 +94,7 @@ export default {
current: -1, current: -1,
threeIndex: -1, threeIndex: -1,
currentTwo: -1, currentTwo: -1,
dataList: [ dataList: [],
{ videoName: "设备1", list: [] },
{ videoName: "设备2", list: [] },
{ videoName: "设备3", list: [] },
{ videoName: "设备4", list: [] },
],
defaultProps: { defaultProps: {
children: "list", children: "list",
label: "videoName", label: "videoName",
@ -125,31 +120,8 @@ export default {
selectProjectVideoListApi({ selectProjectVideoListApi({
projectSn: this.$store.state.projectSn, projectSn: this.$store.state.projectSn,
}).then((res) => { }).then((res) => {
var DATA = res.result.videoList; this.dataList=res.result.videoList
console.log("视频的列表", res);
let dataList1 = [];
let dataList2 = [];
let dataList3 = [];
let dataList4 = [];
for (let index = 0; index < DATA.length; index++) {
const element = DATA[index];
if (element.videoName.includes("宜州天地")) {
dataList1.push(element);
} else if (element.videoName.includes("中银金融中心")) {
dataList2.push(element);
} else if (element.videoName.includes("桂林印刷厂")) {
dataList3.push(element);
} else {
dataList4.push(element);
}
}
this.dataList[0].list = dataList1;
this.dataList[1].list = dataList2;
this.dataList[2].list = dataList3;
this.dataList[3].list = dataList4;
console.log("视频的列表", this.dataList);
this.dataType = res.result.type; this.dataType = res.result.type;
}); });
}, },