修改跳转问题

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> <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,15 @@ 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.timer_ = setTimeout(() => {
// this.$router.push({ path: '/largeScreen1' }) this.$router.push({ path: '/largeScreen1' })
// }, 6000); }, 8000);
this.login() this.login()
@ -694,8 +692,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 +702,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 +833,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);

View File

@ -546,9 +546,9 @@ export default {
mounted() { mounted() {
this.drag_boxHandler() this.drag_boxHandler()
// this.timer1 = setTimeout(() => { this.timer1 = setTimeout(() => {
// this.$router.push({ path: '/largeScreen' }) this.$router.push({ path: '/largeScreen' })
// }, 20000); }, 24000);
@ -565,10 +565,12 @@ export default {
} }
}, 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