-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{item.greenhouseName}}
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ item.greenhouseName }}
+
+
+
+
+
品种:{{ item.greenhouseVariety }}
+
+
+
+
数量:{{ item.greenhouseNums }}株
+
+
+
+
+
生长阶段:
+
{{ item.growthStageName }}
+
+
+
+
+
+
+
+
+
+
@@ -1168,6 +1267,52 @@ export default {
}else if(id == 7){
return 'top:0%;left:48%;transform: translate(54%,0%);'
}
+ },
+ getTopOrLeft9(id){
+ if(id == 1){
+ return 'top:20.5%;left:10%;z-index:10;'
+ }else if(id == 2){
+ return 'top:72%;left:12%;z-index:9;'
+ }else if(id == 3){
+ return 'top:32%;left:56%;z-index:8;'
+ }else if(id == 4){
+ return 'top:34%;left:57%;z-index:7;'
+ }else if(id == 5){
+ return 'top:20.5%;left:66.5%;z-index:6;'
+ }else if(id == 6){
+ return 'top:22.5%;left:68%;z-index:5;'
+ }else if(id == 7){
+ return 'top:17%;left:70.6%;z-index:4;'
+ }else if(id == 8){
+ return 'top:19.5%;left:71.5%;z-index:3;'
+ }else if(id == 9){
+ return 'top:14%;left:75%;z-index:2;'
+ }else if(id == 10){
+ return 'top:16.5%;left:75.5%;z-index:1;'
+ }
+ },
+ getTopOrLeft9_9(id){
+ if(id == 1){
+ return 'top:20.5%;left:10%;transform: translate(54%,0);'
+ }else if(id == 2){
+ return 'top:72%;left:12%;transform: translate(54%,0);'
+ }else if(id == 3){
+ return 'top:32%;left:56%;transform: translate(54%,0);'
+ }else if(id == 4){
+ return 'top:16%;left:57%;transform: translate(54%,0%);'
+ }else if(id == 5){
+ return 'top:20.5%;left:66.5%;transform: translate(54%,0%);'
+ }else if(id == 6){
+ return 'top:22.5%;left:68%;transform: translate(54%,0%);'
+ }else if(id == 7){
+ return 'top:17%;left:70.6%;transform: translate(54%,0%);'
+ }else if(id == 8){
+ return 'top:19.5%;left:71.5%;transform: translate(54%,0);'
+ }else if(id == 9){
+ return 'top:14%;left:75%;transform: translate(54%,0);'
+ }else if(id == 10){
+ return 'top:16.5%;left:75.5%;transform: translate(54%,0);'
+ }
},
getNamePosition(id) {
if (id == 1) {
@@ -1288,7 +1433,7 @@ export default {
get_user_getjurisdiction(userId) {
this.api.user_getjurisdiction(userId).then((res) => {
if (res.data.code == 200) {
- this.limitUserId = (res.data.data.filter(el=>el.id == 1 || el.id == 2 || el.id == 5|| el.id == 7|| el.id == 8))[0].id;
+ this.limitUserId = (res.data.data.filter(el=>el.id == 1 || el.id == 2 || el.id == 5|| el.id == 7|| el.id == 8|| el.id == 9))[0].id;
if (this.limitUserId == 1) {
this.drag_boxHandler();
} else if (this.limitUserId == 2) {
@@ -1299,6 +1444,8 @@ export default {
this.drag_boxHandler7();
} else if (this.limitUserId == 8) {
this.drag_boxHandler8();
+ } else if (this.limitUserId == 9) {
+ this.drag_boxHandler9();
}
}
});
@@ -1480,6 +1627,73 @@ export default {
}
};
},
+ drag_boxHandler9() {
+ let demo = this.$refs.drag_box9;
+ demo = document.querySelector(".drag_box9"); //待拖拽元素
+ let canMove = false; //拖拽状态
+ let x = 0,
+ y = 0; //鼠标位置
+ //监听按下鼠标事件
+ demo.onmousedown = function (e) {
+ x = e.pageX - demo.offsetLeft;
+ y = e.pageY - demo.offsetTop;
+ canMove = true; //激活拖拽状态
+ };
+ //监听右击鼠标事件
+ demo.oncontextmenu = function (e) {
+ e.preventDefault(); //阻止默认行为
+ };
+ //监听鼠标抬起事件
+ window.onmouseup = function () {
+ canMove = false; //关闭拖拽状态
+ };
+
+ window.onblur = function () {
+ //窗口失去焦点事件
+ canMove = false; //关闭拖拽状态
+ };
+
+ //监听鼠标移动事件
+ window.onmousemove = function (e) {
+ e.preventDefault(); //阻止默认行为(字不能拖走)
+ if (canMove) {
+ //对范围判断
+ let left = e.pageX - x;
+ let top = e.pageY - y;
+
+ //if (left > 0) left = 0 //当距离左边小于0时 让它为0
+ //if (top > 0) top = 0 //当距离上边小于0时 让它为0
+ // //右边距离为 标签距离左边最大距离(页面宽度减去div宽度得到)
+ // let maxLeft = window.innerWidth - demo.offsetWidth
+ // //下边距离为 标签距离上边最大距离(页面高度减去div高度度得到)
+ // let maxTop = window.innerHeight - demo.offsetHeight
+
+ // if (left > maxLeft) left = maxLeft
+ // if (top > maxTop) top = maxTop
+
+ demo.style.left = left + "px";
+ demo.style.top = top + "px";
+ }
+ };
+ let scale = 1;
+ demo.onwheel = function (e) {
+ if (e.wheelDelta > 0) {
+ scale += 0.05;
+ if (scale > 4) {
+ scale = 4;
+ }
+ demo.style.transform = `scale(${scale})`;
+ // console.log(scale);
+ } else {
+ scale -= 0.05;
+ if (scale < 1) {
+ scale = 1;
+ }
+ demo.style.transform = `scale(${scale})`;
+ // console.log(scale);
+ }
+ };
+ },
drag_boxHandler8() {
let demo = this.$refs.drag_box8;
demo = document.querySelector(".drag_box8"); //待拖拽元素
@@ -2350,7 +2564,7 @@ export default {
}
}
- .drag_box7,.drag_box8{
+ .drag_box7,.drag_box8,.drag_box9{
width: 100%;
height: auto;
position: absolute;