Compare commits

..

No commits in common. "582f57670dc4aab03e04f9cfef449306b4680042" and "e32baa9d0f1dbb3fd90868733bcf2222dfc99072" have entirely different histories.

5 changed files with 166 additions and 171 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 B

View File

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

View File

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

View File

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