pc-master #44

Merged
xiaomeng merged 5 commits from pc-master into portal 2023-11-20 02:49:25 +00:00
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,122 +21,126 @@
<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_item1" @click="handlerPop(2)"> <div class="pole_item pole_item_4">
<div class="p_title"> <div class="p_title">
<img src="../../assets/img/wenshi.png" alt="" /> <img src="../../assets/img/wenshi.png" alt="" />
<span>2#温室</span> <span>控制中心</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="pole_item pole_item2" @click="handlerPop(3)"> <div class="popBox" v-for="(item, index) in popContentList" :key="index">
<div class="p_title"> <template>
<img src="../../assets/img/wenshi.png" alt="" /> <div class="pole_item" :class="'pole_item' + (index+1)" @click="handlerPop(item.id)">
<span>1#温室</span> <div class="p_title">
</div> <img src="../../assets/img/wenshi.png" alt="" />
<img class="pole1" src="../../assets/img/pole1.png" alt="" /> <span>{{ item.greenhouseName }}#温室</span>
</div> </div>
<div class="pole_item pole_item3" @click="handlerPop(4)"> <img class="pole1" src="../../assets/img/pole1.png" alt="" />
<div class="p_title"> </div>
<img src="../../assets/img/wenshi1.png" alt="" /> <!-- <div class="pole_item pole_item2" @click="handlerPop(3)">
<span>3#温室</span> <div class="p_title">
</div> <img src="../../assets/img/wenshi.png" alt="" />
<img class="pole1" src="../../assets/img/pole.png" alt="" /> <span>1#温室</span>
</div> </div>
<div class="pole_item pole_item4"> <img class="pole1" src="../../assets/img/pole1.png" alt="" />
<div class="p_title"> </div>
<img src="../../assets/img/wenshi.png" alt="" /> <div class="pole_item pole_item3" @click="handlerPop(4)">
<span>控制中心</span> <div class="p_title">
</div> <img src="../../assets/img/wenshi1.png" alt="" />
<img class="pole1" src="../../assets/img/pole1.png" alt="" /> <span>3#温室</span>
</div> </div>
<div class="pole_item pole_item5" @click="handlerPop(5)"> <img class="pole1" src="../../assets/img/pole.png" alt="" />
<div class="p_title"> </div> -->
<img src="../../assets/img/wenshi.png" alt="" />
<span>4#温室</span>
</div>
<img class="pole1" src="../../assets/img/pole1.png" alt="" />
</div>
<div class="pole_item pole_item6" @click="handlerPop(6)">
<div class="p_title">
<img src="../../assets/img/wenshi.png" alt="" />
<span>5#温室</span>
</div>
<img class="pole1" src="../../assets/img/pole1.png" alt="" />
</div>
<div class="pole_item pole_item7" @click="handlerPop(7)">
<div class="p_title">
<img src="../../assets/img/wenshi.png" alt="" />
<span>6#温室</span>
</div>
<img class="pole1" src="../../assets/img/pole1.png" alt="" />
</div>
<!-- 弹框 --> <!-- <div class="pole_item pole_item5" @click="handlerPop(5)">
<template v-for="(item, index) in popContentList"> <div class="p_title">
<!-- <div class="pop_content" :style="getTopOrLeft(item.greenhouseName)" :key="index" <img src="../../assets/img/wenshi.png" alt="" />
v-if="popContentCurrent == index ? true : false"> --> <span>4#温室</span>
<div
class="pop_content"
:style="getTopOrLeft(item.greenhouseName)"
:key="index"
v-if="popContentCurrent == item.id ? true : false"
>
<img
class="close_img"
src="../../assets/img/close.png"
alt=""
@click="cancelHandler"
/>
<div class="p_video">
<img :src="item.greenhouseImage" alt="" />
</div>
<div class="text">温室{{ item.greenhouseName }}#</div>
<div class="line"></div>
<div class="detail">
<!-- <div class="d_item">
<img src="../../assets/img/detail_img.png" alt="" />
<span>面积{{ item.greenhouseArea }}</span>
</div> -->
<div class="d_item">
<img src="../../assets/img/detail_img.png" alt="" />
<span>品种{{ item.greenhouseVariety }}</span>
</div> </div>
<div class="d_item"> <img class="pole1" src="../../assets/img/pole1.png" alt="" />
<img src="../../assets/img/detail_img.png" alt="" /> </div>
<span>数量{{ item.greenhouseNums }}</span> <div class="pole_item pole_item6" @click="handlerPop(6)">
<div class="p_title">
<img src="../../assets/img/wenshi.png" alt="" />
<span>5#温室</span>
</div> </div>
<img class="pole1" src="../../assets/img/pole1.png" alt="" />
</div> </div>
<div class="grow"> <div class="pole_item pole_item7" @click="handlerPop(7)">
<img src="../../assets/img/grow_img.png" alt="" /> <div class="p_title">
<span>生长阶段</span> <img src="../../assets/img/wenshi.png" alt="" />
<span>{{ item.growthStageName }}</span> <span>6#温室</span>
</div> </div>
<div class="line" style="margin-top: 0.2rem"></div> <img class="pole1" src="../../assets/img/pole1.png" alt="" />
<div class="icon_item scroll"> </div> -->
<div </template>
class="icon_item_child"
v-for="(item1, index1) in item.childList" <!-- 弹框 -->
:key="index1" <template>
> <!-- <div class="pop_content" :style="getTopOrLeft(item.greenhouseName)" :key="index"
<!-- <img :src="item.formula" alt=""> --> v-if="popContentCurrent == index ? true : false"> -->
<img <div
:src=" class="pop_content"
require('../../assets/image/real-time-' + :style="getTopOrLeft()"
item1.formula + v-show="popContentCurrent == item.id ? true : false"
'.png') >
" <img
alt="" class="close_img"
/> src="../../assets/img/close.png"
<div> alt=""
<span>{{ item1.environmentDataId }}</span> @click="cancelHandler"
<span>{{ />
item1.environmentData + getTypeList(item1.formula) <div class="p_video">
}}</span> <img :src="item.greenhouseImage" alt="" />
</div>
<div class="text">温室{{ item.greenhouseName }}#</div>
<div class="line"></div>
<div class="detail">
<!-- <div class="d_item">
<img src="../../assets/img/detail_img.png" alt="" />
<span>面积{{ item.greenhouseArea }}</span>
</div> -->
<div class="d_item">
<img src="../../assets/img/detail_img.png" alt="" />
<span>品种{{ item.greenhouseVariety }}</span>
</div>
<div class="d_item">
<img src="../../assets/img/detail_img.png" alt="" />
<span>数量{{ item.greenhouseNums }}</span>
</div>
</div>
<div class="grow">
<img src="../../assets/img/grow_img.png" alt="" />
<span>生长阶段</span>
<span>{{ item.growthStageName }}</span>
</div>
<div class="line" style="margin-top: 0.2rem"></div>
<div class="icon_item scroll">
<div
class="icon_item_child"
v-for="(item1, index1) in item.childList"
:key="index1"
>
<!-- <img :src="item.formula" alt=""> -->
<img
:src="
require('../../assets/image/real-time-' +
item1.formula +
'.png')
"
alt=""
/>
<div>
<span>{{ item1.environmentDataId }}</span>
<span>{{
item1.environmentData + getTypeList(item1.formula)
}}</span>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </template>
</template> </div>
</div> </div>
</div> </div>
</div> </div>
@ -229,7 +233,7 @@ export default {
left_: 2, left_: 2,
popContentList: [], popContentList: [],
popContentCurrent: -1, popContentCurrent: 0,
// //
autoPlay: false, //false true autoPlay: false, //false true
@ -611,7 +615,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 {
@ -632,26 +636,27 @@ export default {
}); });
}, },
getTopOrLeft(name) { getTopOrLeft() {
if (name == "二号") { return "top:50%;left:50%;transform: translate(-50%,-50%);";
// return "top:1rem;left:6.2rem"; // if (name == "") {
return "top:50%;left:50%;transform: translate(-50%,-50%);"; // // return "top:1rem;left:6.2rem";
} else if (name == "一号") { // return "top:50%;left:50%;transform: translate(-50%,-50%);";
// return "top:3.5rem;left:3.8rem"; // } else if (name == "") {
return "top:50%;left:50%;transform: translate(-50%,-50%);"; // // return "top:3.5rem;left:3.8rem";
} else if (name == "3号") { // return "top:50%;left:50%;transform: translate(-50%,-50%);";
// return "top:2rem;left:9rem"; // } else if (name == "3") {
return "top:50%;left:50%;transform: translate(-50%,-50%);"; // // return "top:2rem;left:9rem";
} else if (name == "4号") { // return "top:50%;left:50%;transform: translate(-50%,-50%);";
// return "top:2rem;left:9.3rem"; // } else if (name == "4") {
return "top:50%;left:50%;transform: translate(-50%,-50%);"; // // return "top:2rem;left:9.3rem";
} else if (name == "5") { // return "top:50%;left:50%;transform: translate(-50%,-50%);";
// return "top:3.5rem;left:6.5rem"; // } else if (name == "5") {
return "top:50%;left:50%;transform: translate(-50%,-50%);"; // // return "top:3.5rem;left:6.5rem";
} else if (name == "6") { // return "top:50%;left:50%;transform: translate(-50%,-50%);";
// return "top:0.8rem;left:7.2rem"; // } else if (name == "6") {
return "top:50%;left:50%;transform: translate(-50%,-50%);"; // // 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; 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" });
@ -728,6 +734,7 @@ export default {
// }, // },
handlerPop(id) { handlerPop(id) {
console.log(id);
this.popContentCurrent = id; this.popContentCurrent = id;
}, },
@ -964,6 +971,12 @@ 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;
@ -1024,24 +1037,18 @@ 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_item6 { .pole_item5 {
position: absolute; position: absolute;
top: 61%; top: 61%;
left: 62%; left: 62%;
} }
.pole_item7 { .pole_item6 {
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">传感器类型</div> <div class="title">传感器类型 <span v-if="active>39">4-20ma</span></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,7 +328,6 @@ 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
} }
}) })
@ -502,23 +501,22 @@ 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