Merge pull request 'pc-master' (#42) from pc-master into portal

Reviewed-on: #42
pull/69/head^2
xiaomeng 2023-11-18 05:26:03 +00:00
commit 1c1f98f467
4 changed files with 68 additions and 44 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -23,7 +23,7 @@
<span>大数据平台</span> <span>大数据平台</span>
</div> </div>
<div class="item item_act" @click="toBackPage"> <div class="item item_act" @click="toBackPage">
<img src="../../assets/img/nav2.png" alt=""> <img src="../../assets/img/nav5.png" alt="">
<span>控制器</span> <span>控制器</span>
</div> </div>
<div class="item item_act" v-show="false"> <div class="item item_act" v-show="false">
@ -138,7 +138,8 @@
<div :class="current == index <div :class="current == index
? 'swiper-slide swiper-slide2' ? 'swiper-slide swiper-slide2'
: 'swiper-slide swiper-slide1' : 'swiper-slide swiper-slide1'
" v-for="(item, index) in dataList" :key="index" :style="styleItem" @click="getCurrent(index,item)"> " v-for="(item, index) in dataList" :key="index" :style="styleItem"
@click="getCurrent(index, item)">
{{ item.greenhouseName + '温室' }} {{ item.greenhouseName + '温室' }}
</div> </div>
</div> </div>
@ -174,23 +175,33 @@
<div class="i_content"> <div class="i_content">
<div class="i_content_item"> <div class="i_content_item">
<span>1#风机</span> <span>1#风机</span>
<span :style="fanStatus.status[0] == 1 ? '':'color:#86C2FF;'">{{ fanStatus.status[0] == 1 ? '打开' : '关闭' }}</span> <span :style="fanStatus.status[0] == 1 ? '' : 'color:#86C2FF;'">{{ fanStatus.status[0] == 1 ? '打开' :
'关闭'
}}</span>
<span class="line"></span> <span class="line"></span>
<span>2#风机</span> <span>2#风机</span>
<span :style="fanStatus.status[1] == 1 ? '':'color:#86C2FF;'">{{ fanStatus.status[1] == 1 ? '打开' : '关闭' }}</span> <span :style="fanStatus.status[1] == 1 ? '' : 'color:#86C2FF;'">{{ fanStatus.status[1] == 1 ? '打开' :
'关闭'
}}</span>
</div> </div>
<div class="line1"></div> <div class="line1"></div>
<div class="i_content_item"> <div class="i_content_item">
<span>3#风机</span> <span>3#风机</span>
<span :style="fanStatus.status[2] == 1 ? '':'color:#86C2FF;'">{{ fanStatus.status[2] == 1 ? '打开' : '关闭' }}</span> <span :style="fanStatus.status[2] == 1 ? '' : 'color:#86C2FF;'">{{ fanStatus.status[2] == 1 ? '打开' :
'关闭'
}}</span>
<span class="line"></span> <span class="line"></span>
<span>4#风机</span> <span>4#风机</span>
<span :style="fanStatus.status[3] == 1 ? '':'color:#86C2FF;'">{{ fanStatus.status[3] == 1 ? '打开' : '关闭' }}</span> <span :style="fanStatus.status[3] == 1 ? '' : 'color:#86C2FF;'">{{ fanStatus.status[3] == 1 ? '打开' :
'关闭'
}}</span>
</div> </div>
<div class="line1"></div> <div class="line1"></div>
<div class="i_content_item" style="width:50%"> <div class="i_content_item" style="width:50%">
<span>5#风机</span> <span>5#风机</span>
<span :style="fanStatus.status[4] == 1 ? '':'color:#86C2FF;'">{{ fanStatus.status[4] == 1 ? '打开' : '关闭' }}</span> <span :style="fanStatus.status[4] == 1 ? '' : 'color:#86C2FF;'">{{ fanStatus.status[4] == 1 ? '打开' :
'关闭'
}}</span>
<span class="line"></span> <span class="line"></span>
</div> </div>
</div> </div>
@ -662,28 +673,13 @@ export default {
} }
}, },
mounted() { mounted() {
new Swiper(".middle_disasterWarningAnalysis", {
slidesPerView: 4,
spaceBetween: 10,
navigation: {
nextEl: ".right_button",
prevEl: ".left_button",
},
});
new Swiper(".mySwiper_video", {
loop: true,
navigation: {
nextEl: ".swiper-button-next_video",
prevEl: ".swiper-button-prev_video",
},
});
this.drag_boxHandler() this.drag_boxHandler()
// this.timer_ = setTimeout(() => {
// this.$router.push({ path: '/largeScreen1' })
// }, 6000);
this.login() this.login()
@ -694,8 +690,9 @@ export default {
this.getNowTime() this.getNowTime()
}, 1000) }, 1000)
}, },
destroyed() { beforeDestroy() {
this.timer_ = null clearInterval(this.timer_) && this.timer_
// this.timer_ = null
}, },
methods: { methods: {
// id // id
@ -703,6 +700,17 @@ export default {
this.api.Bigdata_getAllControl(userid).then(res => { this.api.Bigdata_getAllControl(userid).then(res => {
// console.log('id', res); // console.log('id', res);
this.dataList = res.data.data this.dataList = res.data.data
setTimeout(() => {
new Swiper(".middle_disasterWarningAnalysis", {
slidesPerView: 4,
spaceBetween: 10,
navigation: {
nextEl: ".right_button",
prevEl: ".left_button",
},
});
}, 100);
if (res.status === 200) { if (res.status === 200) {
res.data.data.forEach(el => { res.data.data.forEach(el => {
// this.get_weather_echart_data(el.deviceId) // this.get_weather_echart_data(el.deviceId)
@ -823,6 +831,20 @@ export default {
this.getVideoData(item.cameraSerialNumber, item.cameraChannelNumber, index) this.getVideoData(item.cameraSerialNumber, item.cameraChannelNumber, index)
// this.getVideoData("L18357958", "5") // this.getVideoData("L18357958", "5")
setTimeout(() => {
new Swiper(".mySwiper_video", {
// loop: true,
autoplay: true,
autoplay: {
disableOnInteraction: false,
delay: 3000
},
navigation: {
nextEl: ".swiper-button-next_video",
prevEl: ".swiper-button-prev_video",
},
});
}, 100);
} }
}) })
// console.log(this.get_sel_eqbyid_list); // console.log(this.get_sel_eqbyid_list);
@ -914,6 +936,10 @@ export default {
let userInfo = JSON.parse(localStorage.getItem('userInfo')); let userInfo = JSON.parse(localStorage.getItem('userInfo'));
this.dataInit(userInfo.userid) this.dataInit(userInfo.userid)
this.get_sel_eqbyid(userInfo.userid) this.get_sel_eqbyid(userInfo.userid)
this.timer_ = setTimeout(() => {
this.$router.push({ path: '/largeScreen1' })
}, 30000);
}, },
createVideoNew(accessToken, url, index) { createVideoNew(accessToken, url, index) {
@ -965,7 +991,7 @@ export default {
this.$router.push({ path: '/realTime' }); this.$router.push({ path: '/realTime' });
}, },
getCurrent(index,item) { getCurrent(index, item) {
this.current = index; this.current = index;
// console.log(item,'00000000000000'); // console.log(item,'00000000000000');
this.get_readControl_getState(item.deviceId) this.get_readControl_getState(item.deviceId)

View File

@ -185,7 +185,7 @@ export default {
left_: 2, left_: 2,
popContentList: [], popContentList: [],
popContentCurrent: 5, popContentCurrent: 0,
typeList: [{ typeList: [{
label: '无意义的传感器', label: '无意义的传感器',
@ -546,11 +546,6 @@ export default {
mounted() { mounted() {
this.drag_boxHandler() this.drag_boxHandler()
// this.timer1 = setTimeout(() => {
// this.$router.push({ path: '/largeScreen' })
// }, 20000);
// this.timer = setInterval(() => { // this.timer = setInterval(() => {
// this.dialogVisible = !this.dialogVisible // this.dialogVisible = !this.dialogVisible
@ -562,13 +557,16 @@ export default {
this.popContentCurrent++ this.popContentCurrent++
if (this.popContentCurrent > 5) { if (this.popContentCurrent > 5) {
this.popContentCurrent = 0 this.popContentCurrent = 0
this.$router.push({ path: '/largeScreen' })
} }
}, 3000) }, 3000)
}, },
destroyed() { beforeDestroy() {
this.timer = null; // clearInterval(this.timer1) && this.timer1
this.timer1 = null; clearInterval(this.timer2) && this.timer2
this.timer2 = null // this.timer = null;
// this.timer1 = null;
// this.timer2 = null
}, },
methods: { methods: {
// id // id
@ -603,27 +601,27 @@ export default {
if (name == '二号') { if (name == '二号') {
// this.top_ = 1; // this.top_ = 1;
// this.left_ = 6.2 // this.left_ = 6.2
return 'top:1rem;left:8rem' return 'top:1rem;left:6.2rem'
} else if (name == '一号') { } else if (name == '一号') {
// this.top_ = 3.5; // this.top_ = 3.5;
// this.left_ = 3.8 // this.left_ = 3.8
return 'top:3.5rem;left:4.8rem' return 'top:3.5rem;left:3.8rem'
} else if (name == '3号') { } else if (name == '3号') {
// this.top_ = 2; // this.top_ = 2;
// this.left_ = 9 // this.left_ = 9
return 'top:2rem;left:11.5rem' return 'top:2rem;left:9rem'
} else if (name == '4号') { } else if (name == '4号') {
// this.top_ = 2; // this.top_ = 2;
// this.left_ = 9.3 // this.left_ = 9.3
return 'top:2rem;left:14rem' return 'top:2rem;left:9.3rem'
} else if (name == '5') { } else if (name == '5') {
// this.top_ = 3.5; // this.top_ = 3.5;
// this.left_ = 6.5 // this.left_ = 6.5
return 'top:6.5rem;left:10.5rem' return 'top:3.5rem;left:6.5rem'
} else if (name == '6') { } else if (name == '6') {
// this.top_ = 0.8; // this.top_ = 0.8;
// this.left_ = 7.2 // this.left_ = 7.2
return 'top:0.8rem;left:11rem' return 'top:0.8rem;left:7.2rem'
} }
}, },