Compare commits

..

No commits in common. "773ced60cdce56212cb875377d776f4c5e9ff0f7" and "62481ff1987a65560fb9d7bd52e1d2c187c6feca" have entirely different histories.

3 changed files with 49 additions and 155 deletions

View File

@ -178,7 +178,7 @@ export default {
value: this.openIndex, value: this.openIndex,
}, },
}; };
this.changeBtn('21600', dataNum); this.changeBtn(21600 + ((this.indexs - 1) * 11), dataNum);
}, },
// x/10 // x/10
blurChange10(code, el) { blurChange10(code, el) {

View File

@ -52,28 +52,19 @@
<div class="environmentData"> <div class="environmentData">
<div class="e_title">温室环境数据</div> <div class="e_title">温室环境数据</div>
<div class="detail"> <div class="detail scroll">
<!-- <div class="title_child">一号温室</div> --> <div class="title_child">一号温室</div>
<vue-seamless class="e_content" :data="list" :class-option="defaultOption"> <div class="e_content">
<div class="item" v-for="(el, index) in list" :key="index"> <div class="item" v-for="(el, index) in list" :key="index">
<!-- <img :src="el.formula" alt=""> --> <!-- <img :src="el.formula" alt=""> -->
<img :src="el.img" alt=""> <img :src="require('../../assets/image/real-time-'+el.formula+'.png')" alt="">
<div class="item_child"> <div class="item_child">
<span>{{ el.name }}</span> <span>{{ el.environmentDataId }}</span>
<span>{{ el.num }}</span> <span>{{ el.environmentData }}</span>
</div> </div>
</div> </div>
</vue-seamless>
<!-- <div class="e_content">
<div class="item" v-for="(el, index) in list" :key="index">
<img :src="el.img" alt="">
<div class="item_child">
<span>{{ el.name }}</span>
<span>{{ el.num }}</span>
</div> </div>
</div> </div>
</div> -->
</div>
</div> </div>
<div class="thisWeekTemperature"> <div class="thisWeekTemperature">
@ -150,48 +141,41 @@
</div> </div>
<div class="device_content scroll"> <div class="device_content scroll">
<div class="content_item"> <div class="content_item" v-for="(content_item, index) in 6" :key="index">
<div class="i_title"> <div class="i_title">
<img src="../../assets/img/i_title_img.png" alt=""> <img src="../../assets/img/i_title_img.png" alt="">
<span>风机</span> <span>卷膜天窗</span>
<span class="line"></span> <span class="line"></span>
<span>{{ fanStatus.open == 1 ? '自动控制' : '手动控制' }}</span> <span>打开</span>
<span class="line"></span> <span class="line"></span>
<span>位置50%</span> <span>位置50%</span>
<span></span> <span @click="i_contentHandler(index)"></span>
</div> </div>
<div class="i_content"> <div class="i_content" v-if="menu_current == true && content_item_current == index">
<div class="i_content_item"> <div class="i_content_item">
<span>1#风机</span> <span>1#风机</span>
<span>{{ fanStatus.status[0] == 1 ? '打开' : '关闭' }}</span> <span>开启</span>
<span class="line"></span> <span class="line"></span>
<span>2#风机</span> <span>2#风机</span>
<span>{{ fanStatus.status[1] == 1 ? '打开' : '关闭' }}</span> <span>开启</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>{{ fanStatus.status[2] == 1 ? '打开' : '关闭' }}</span> <span>开启</span>
<span class="line"></span> <span class="line"></span>
<span>4#风机</span> <span>4#风机</span>
<span>{{ fanStatus.status[3] == 1 ? '打开' : '关闭' }}</span> <span>开启</span>
</div> </div>
<div class="line1"></div> <div class="line1"></div>
<div class="i_content_item"> <div class="i_content_item">
<span>5#风机</span> <span>5#风机</span>
<span>{{ fanStatus.status[4] == 1 ? '打开' : '关闭' }}</span> <span>开启</span>
<span class="line"></span> <span class="line"></span>
<span>6#风机</span>
<span>开启</span>
</div> </div>
</div> </div>
<div class="i_title" style="margin-top: 0.2rem;" v-for="(item, index) in statusList" :key="index">
<img src="../../assets/img/i_title_img.png" alt="">
<span>{{ item.name }}</span>
<span class="line"></span>
<span>{{ item.open == 1 ? '自动控制' : '手动控制' }}</span>
<span class="line"></span>
<span>位置{{ item.progress }}%</span>
<span>菜单</span>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -208,24 +192,9 @@ import { weather_echart, thisWeekTemperature_echart } from '@/assets/js/echarts'
import EZUIKit from 'ezuikit-js'; import EZUIKit from 'ezuikit-js';
import videojs from 'video.js'; import videojs from 'video.js';
import video_zhCN from 'video.js/dist/lang/zh-CN.json' import video_zhCN from 'video.js/dist/lang/zh-CN.json'
import vueSeamless from 'vue-seamless-scroll'
export default { export default {
name: 'largeScreen', name: 'largeScreen',
components: { vueSeamless },
computed: {
defaultOption() {
return {
step: 0.3, //
limitMoveNum: 8, // this.dataList.length
hoverStop: true, // stop
direction: 1, // 0 1 2 3
openWatch: true, // dom
singleHeight: 0, // (0) direction => 0/1
singleWidth: 0, // (0) direction => 2/3
waitTime: 1000 // (1000ms)
}
},
},
data() { data() {
return { return {
list: [], list: [],
@ -269,12 +238,7 @@ export default {
// Copy // Copy
getVideoDataList: [], getVideoDataList: [],
url: '', url:''
fanStatus: {
name: '风机', open: 0, status: []
},
statusList: [],
} }
}, },
mounted() { mounted() {
@ -297,9 +261,9 @@ export default {
this.drag_boxHandler() this.drag_boxHandler()
this.timer_ = setTimeout(() => { // this.timer_ = setTimeout(() => {
this.$router.push({ path: '/largeScreen1' }) // this.$router.push({ path: '/largeScreen1' })
}, 6000); // }, 6000);
this.login() this.login()
@ -365,40 +329,7 @@ export default {
this.api.getcontrol_rtdata(equipmentId).then(res => { this.api.getcontrol_rtdata(equipmentId).then(res => {
// console.log('',res); // console.log('',res);
if (res.data.code == 200) { if (res.data.code == 200) {
this.list = [] this.list = res.data.data
var store = this.$store.state
var list = store.typeList
res.data.data.forEach((el, index) => {
list.forEach((el1, index1) => {
if (el.formula == el1.value) {
var num = 0
var name = ''
num = el.environmentData + el1.unit
if (el.equipmentNumber == 0) {
if (el.targetValue == 1) {
name = '目标' + el.environmentDataId
} else {
name = '1#平均' + el.environmentDataId
}
} else if (el.equipmentNumber == 15) {
if (el.targetValue == 1) {
name = '目标' + el.environmentDataId
} else {
name = '2#平均' + el.environmentDataId
}
} else {
name = el.equipmentNumber + '#' + el.environmentDataId
}
this.list.push({
...el,
name: name,
num: num,
img: require(`../../assets/image/real-time-${el.formula}.png`)
})
}
})
})
} }
}) })
}, },
@ -432,30 +363,10 @@ export default {
}) })
}, },
padString(str, length) {
return str.padStart(length, '0');
},
// Copy // Copy
get_readControl_getState(deviceId) { get_readControl_getState(deviceId) {
this.api.readControl_getState(deviceId).then(res => { this.api.readControl_getState(deviceId).then(res => {
console.log('控制器状态值获取 Copy', res); console.log('控制器状态值获取 Copy', res);
if (res.data.code == 200) {
this.fanStatus.open = res.data.data['1023']
this.fanStatus.status = []
var num = res.data.data['1024']
var num1 = this.padString(num.toString(2), 5)
var openListNew = []
openListNew = num1.split("")
this.fanStatus.status = openListNew.reverse()
this.statusList = []
for (var i = 0; i < 4; i++) {
var statusData = { name: `顶卷膜${i + 1}`, open: res.data.data[(1025 + (i * 3))], progress: res.data.data[(1027 + (i * 3))], index: res.data.data[(1026 + (i * 3))] }
this.statusList.push(statusData)
}
console.log(this.statusList);
}
}) })
}, },
@ -607,22 +518,7 @@ export default {
} }
} }
</script> </script>
<style lang="scss">
.environmentData {
.e_content {
>div {
width: 100% !important;
>div {
width: 100% !important;
display: flex;
flex-wrap: wrap;
}
}
}
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.home { .home {
width: 100%; width: 100%;
@ -855,7 +751,7 @@ export default {
.detail { .detail {
width: 3.98rem; width: 3.98rem;
height: 3.08rem; height: 3.08rem;
overflow: hidden; overflow: auto;
.title_child { .title_child {
width: 100%; width: 100%;
@ -874,8 +770,6 @@ export default {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.item { .item {
width: 50%; width: 50%;
display: flex; display: flex;

View File

@ -191,15 +191,15 @@ 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); // }, 20000);
this.timer = setInterval(() => { // this.timer = setInterval(() => {
this.dialogVisible = !this.dialogVisible // this.dialogVisible = !this.dialogVisible
}, 3000); // }, 3000);
this.login() this.login()