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

Reviewed-on: #44
pull/69/head^2
xiaomeng 2023-11-20 02:49:24 +00:00
commit 582f57670d
5 changed files with 166 additions and 161 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

View File

@ -21,14 +21,23 @@
<div class="map1">
<div class="drag_box" ref="drag_box">
<img class="drag_img" src="../../assets/img/map.png" alt="" />
<div class="pole_item pole_item1" @click="handlerPop(2)">
<div class="pole_item pole_item_4">
<div class="p_title">
<img src="../../assets/img/wenshi.png" alt="" />
<span>2#温室</span>
<span>控制中心</span>
</div>
<img class="pole1" src="../../assets/img/pole1.png" alt="" />
</div>
<div class="pole_item pole_item2" @click="handlerPop(3)">
<div class="popBox" v-for="(item, index) in popContentList" :key="index">
<template>
<div class="pole_item" :class="'pole_item' + (index+1)" @click="handlerPop(item.id)">
<div class="p_title">
<img src="../../assets/img/wenshi.png" alt="" />
<span>{{ item.greenhouseName }}#温室</span>
</div>
<img class="pole1" src="../../assets/img/pole1.png" alt="" />
</div>
<!-- <div class="pole_item pole_item2" @click="handlerPop(3)">
<div class="p_title">
<img src="../../assets/img/wenshi.png" alt="" />
<span>1#温室</span>
@ -41,15 +50,9 @@
<span>3#温室</span>
</div>
<img class="pole1" src="../../assets/img/pole.png" alt="" />
</div>
<div class="pole_item pole_item4">
<div class="p_title">
<img src="../../assets/img/wenshi.png" alt="" />
<span>控制中心</span>
</div>
<img class="pole1" src="../../assets/img/pole1.png" alt="" />
</div>
<div class="pole_item pole_item5" @click="handlerPop(5)">
</div> -->
<!-- <div class="pole_item pole_item5" @click="handlerPop(5)">
<div class="p_title">
<img src="../../assets/img/wenshi.png" alt="" />
<span>4#温室</span>
@ -69,17 +72,17 @@
<span>6#温室</span>
</div>
<img class="pole1" src="../../assets/img/pole1.png" alt="" />
</div>
</div> -->
</template>
<!-- 弹框 -->
<template v-for="(item, index) in popContentList">
<template>
<!-- <div class="pop_content" :style="getTopOrLeft(item.greenhouseName)" :key="index"
v-if="popContentCurrent == index ? true : false"> -->
<div
class="pop_content"
:style="getTopOrLeft(item.greenhouseName)"
:key="index"
v-if="popContentCurrent == item.id ? true : false"
:style="getTopOrLeft()"
v-show="popContentCurrent == item.id ? true : false"
>
<img
class="close_img"
@ -141,6 +144,7 @@
</div>
</div>
</div>
</div>
<!-- <el-dialog title="" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
<div class="pop_content">
<div class="p_video">
@ -229,7 +233,7 @@ export default {
left_: 2,
popContentList: [],
popContentCurrent: -1,
popContentCurrent: 0,
//
autoPlay: false, //false true
@ -611,7 +615,7 @@ export default {
// id
dataInit(userid) {
this.api.Bigdata_getAllControl(userid).then((res) => {
// console.log("id", res);
console.log("根据用户id查询对应的设备大数据信息", res);
this.popContentList = res.data.data;
this.popContentList = this.popContentList.map((item) => {
return {
@ -632,26 +636,27 @@ export default {
});
},
getTopOrLeft(name) {
if (name == "二号") {
// return "top:1rem;left:6.2rem";
getTopOrLeft() {
return "top:50%;left:50%;transform: translate(-50%,-50%);";
} else if (name == "一号") {
// return "top:3.5rem;left:3.8rem";
return "top:50%;left:50%;transform: translate(-50%,-50%);";
} else if (name == "3号") {
// return "top:2rem;left:9rem";
return "top:50%;left:50%;transform: translate(-50%,-50%);";
} else if (name == "4号") {
// return "top:2rem;left:9.3rem";
return "top:50%;left:50%;transform: translate(-50%,-50%);";
} else if (name == "5") {
// return "top:3.5rem;left:6.5rem";
return "top:50%;left:50%;transform: translate(-50%,-50%);";
} else if (name == "6") {
// return "top:0.8rem;left:7.2rem";
return "top:50%;left:50%;transform: translate(-50%,-50%);";
}
// if (name == "") {
// // return "top:1rem;left:6.2rem";
// return "top:50%;left:50%;transform: translate(-50%,-50%);";
// } else if (name == "") {
// // return "top:3.5rem;left:3.8rem";
// return "top:50%;left:50%;transform: translate(-50%,-50%);";
// } else if (name == "3") {
// // return "top:2rem;left:9rem";
// return "top:50%;left:50%;transform: translate(-50%,-50%);";
// } else if (name == "4") {
// // return "top:2rem;left:9.3rem";
// return "top:50%;left:50%;transform: translate(-50%,-50%);";
// } else if (name == "5") {
// // return "top:3.5rem;left:6.5rem";
// return "top:50%;left:50%;transform: translate(-50%,-50%);";
// } else if (name == "6") {
// // return "top:0.8rem;left:7.2rem";
// return "top:50%;left:50%;transform: translate(-50%,-50%);";
// }
},
//
@ -685,12 +690,13 @@ export default {
let that = this;
this.autoPlay = JSON.parse(localStorage.getItem("autoPlay"));
this.popContentCurrent = 0;
// this.popContentCurrent = 0;
if (this.autoPlay == false) {
clearInterval(that.timer2) && this.timer2;
} else {
this.timer2 = setInterval(() => {
this.popContentCurrent++;
console.log('this.popContentCurrent',this.popContentCurrent);
if (this.popContentCurrent > 7) {
this.popContentCurrent = 0;
this.$router.push({ path: "/largeScreen" });
@ -728,6 +734,7 @@ export default {
// },
handlerPop(id) {
console.log(id);
this.popContentCurrent = id;
},
@ -964,6 +971,12 @@ export default {
);
}
.pole_item_4 {
position: absolute;
top: 43%;
left: 42%;
}
.pole_item {
width: 1.45rem;
height: 1.8rem;
@ -1024,24 +1037,18 @@ export default {
}
.pole_item4 {
position: absolute;
top: 43%;
left: 42%;
}
.pole_item5 {
position: absolute;
top: 29%;
left: 76%;
}
.pole_item6 {
.pole_item5 {
position: absolute;
top: 61%;
left: 62%;
}
.pole_item7 {
.pole_item6 {
position: absolute;
top: 1%;
left: 62%;

View File

@ -21,7 +21,7 @@
有效性
</div>
<div class="sensor-type">
<!-- <div class="sensor-type">
<template v-for="item, index in openTypeList" >
<div class="sensor-type-div" v-if="active==index" >
<div class="sensor-sel">
@ -38,10 +38,10 @@
</div>
</div>
</template>
</div>
</div> -->
</div>
<div class="input-sel">
<div class="title">传感器类型</div>
<div class="title">传感器类型 <span v-if="active>39">4-20ma</span></div>
<el-dropdown @command="handleCommand">
<div class="el-dropdown-link">
<input v-model="sensorType" type="text" class="input-input" placeholder="选择传感器类型">

View File

@ -35,8 +35,8 @@
</div>
</div>
<div class="left-btn">
<div :class="left1Act == 1 && left1Act == 3 ? 'active' : ''">进水泵</div>
<div :class="left1Act == 2 && left1Act == 3 ? 'active' : ''">配肥泵</div>
<div :class="left1Act == 1 || left1Act == 3 ? 'active' : ''">进水泵</div>
<div :class="left1Act == 2 || left1Act == 3 ? 'active' : ''">配肥泵</div>
</div>
</div>
@ -328,7 +328,6 @@ export default {
typeList.forEach((el, index) => {
if (el.value == this.inputData1[typeCode]) {
console.log(this.inputData1[typeCode], 111, el.countType);
countType = el.countType
}
})
@ -502,23 +501,22 @@ export default {
}
}
}
console.log(this.right2Index, 123);
},
//
getData30() {
// var number = this.padString(this.inputData['30'].toString(2), 2)
// if (Number(number[0])) {
// this.left1Act = 1
// }
// if (Number(number[1])) {
// this.left1Act = 0
// }
// if (Number(number[0])&&Number(number[1])) {
// this.left1Act = 3
// }
// else {
// this.left1Act = -1
// }
var number = this.padString(this.inputData['30'].toString(2), 2)
if (Number(number[0])) {
this.left1Act = 1
}
if (Number(number[1])) {
this.left1Act = 0
}
if (Number(number[0])&&Number(number[1])) {
this.left1Act = 3
}
else {
this.left1Act = -1
}
},
dataInit() {
const that = this