修改跳转问题

pull/42/head
pangdundun 2023-11-17 18:07:04 +08:00
parent 98dbf114ce
commit ede0dba799
4 changed files with 61 additions and 35 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>
</div>
<div class="item item_act" @click="toBackPage">
<img src="../../assets/img/nav2.png" alt="">
<img src="../../assets/img/nav5.png" alt="">
<span>控制器</span>
</div>
<div class="item item_act" v-show="false">
@ -138,7 +138,8 @@
<div :class="current == index
? 'swiper-slide swiper-slide2'
: '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 + '温室' }}
</div>
</div>
@ -174,23 +175,33 @@
<div class="i_content">
<div class="i_content_item">
<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>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 class="line1"></div>
<div class="i_content_item">
<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>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 class="line1"></div>
<div class="i_content_item" style="width:50%">
<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>
</div>
</div>
@ -662,28 +673,15 @@ export default {
}
},
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.timer_ = setTimeout(() => {
// this.$router.push({ path: '/largeScreen1' })
// }, 6000);
this.timer_ = setTimeout(() => {
this.$router.push({ path: '/largeScreen1' })
}, 8000);
this.login()
@ -694,8 +692,9 @@ export default {
this.getNowTime()
}, 1000)
},
destroyed() {
this.timer_ = null
beforeDestroy() {
clearInterval(this.timer_) && this.timer_
// this.timer_ = null
},
methods: {
// id
@ -703,6 +702,17 @@ export default {
this.api.Bigdata_getAllControl(userid).then(res => {
// console.log('id', res);
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) {
res.data.data.forEach(el => {
// this.get_weather_echart_data(el.deviceId)
@ -823,6 +833,20 @@ export default {
this.getVideoData(item.cameraSerialNumber, item.cameraChannelNumber, index)
// 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);
@ -965,7 +989,7 @@ export default {
this.$router.push({ path: '/realTime' });
},
getCurrent(index,item) {
getCurrent(index, item) {
this.current = index;
// console.log(item,'00000000000000');
this.get_readControl_getState(item.deviceId)

View File

@ -546,9 +546,9 @@ export default {
mounted() {
this.drag_boxHandler()
// this.timer1 = setTimeout(() => {
// this.$router.push({ path: '/largeScreen' })
// }, 20000);
this.timer1 = setTimeout(() => {
this.$router.push({ path: '/largeScreen' })
}, 24000);
@ -565,10 +565,12 @@ export default {
}
}, 3000)
},
destroyed() {
this.timer = null;
this.timer1 = null;
this.timer2 = null
beforeDestroy() {
clearInterval(this.timer1) && this.timer1
clearInterval(this.timer2) && this.timer2
// this.timer = null;
// this.timer1 = null;
// this.timer2 = null
},
methods: {
// id