diff --git a/src/assets/img/map5.png b/src/assets/img/map5.png new file mode 100644 index 0000000..a99c051 Binary files /dev/null and b/src/assets/img/map5.png differ diff --git a/src/views/index.vue b/src/views/index.vue index d64f411..3b28778 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -32,7 +32,7 @@
@@ -475,7 +475,8 @@ export default { // item.id == 2 东北; // item.id == 1 丽水; // item.id == 5 石门; - const foundObject = this.limitUserId.find(item => item.id == 2 || item.id == 1 || item.id == 5|| item.id == 7|| item.id == 8); + // 进入大屏的权限目前是写死的 等于几能进 反之显示没权限 + const foundObject = this.limitUserId.find(item => item.id == 2 || item.id == 1 || item.id == 5|| item.id == 7|| item.id == 8|| item.id == 9); if (!foundObject) { this.$message('您当前没有权限查看!') return diff --git a/src/views/page/largeScreen.vue b/src/views/page/largeScreen.vue index 22d448a..2407785 100644 --- a/src/views/page/largeScreen.vue +++ b/src/views/page/largeScreen.vue @@ -3,7 +3,7 @@
{{ other_show ? '后退' : '园区简介' }}
-
温室智慧云数据统计
+
{{limitUserId == 9 ?'甘井设施农业大数据云平台':'温室智慧云数据统计'}}
+
+ + + + + + + + + + +
+
@@ -953,7 +968,7 @@ export default { this.get_environmentData(2023120613270120); this.get_readControl_getState(2023120613270120); this.getWeatherData(2023120613270120); - } else if (limitUserId == 8) { + } else if (limitUserId == 8||limitUserId == 9) { // 获取控制器第一个Id const list = [] this.$store.state.equipmentList.forEach((el, index) => { @@ -1226,7 +1241,7 @@ export default { // id == 1 丽水; // id == 5 石门; // id == 5 大冶鑫; - this.limitUserId = (res.data.data.filter(el => el.id == 2 || el.id == 1 || el.id == 5 || el.id == 7|| el.id == 8))[0].id; + this.limitUserId = (res.data.data.filter(el => el.id == 2 || el.id == 1 || el.id == 5 || el.id == 7|| el.id == 8|| el.id == 9))[0].id; if (this.limitUserId == 1) { this.drag_boxHandler(); this.dataInit(userId, this.limitUserId); @@ -1242,6 +1257,9 @@ export default { } else if (this.limitUserId == 8) { this.drag_boxHandler8(); this.dataInit(userId, this.limitUserId); + } else if (this.limitUserId == 9) { + this.drag_boxHandler9(); + this.dataInit(userId, this.limitUserId); } } }); @@ -1478,6 +1496,63 @@ export default { // console.log(scale); } }; + }, + 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; + + 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; @@ -2298,6 +2373,121 @@ export default { z-index: 99; cursor: pointer; } + } + .drag_box9 { + width: 100%; + height: auto; + position: absolute; + // top: 0.3rem; + // left: 0.5rem; + z-index: 10; + top: -64px; + -webkit-mask-image: linear-gradient(90deg, + transparent 0%, + blue 2%, + blue 97%, + transparent 99%); + + .drag_img { + width: 100%; + height: auto; + -webkit-mask-image: linear-gradient(transparent 0%, + blue 2%, + blue 95%, + transparent 97%); + } + + .axis_shimen { + width: 0.3rem; + height: auto; + position: absolute; + top: 24%; + left: 11%; + z-index: 99; + cursor: pointer; + } + .axis_shimen1 { + width: 0.3rem; + height: auto; + position: absolute; + top: 76%; + left: 13%; + z-index: 99; + cursor: pointer; + } + .axis_shimen2 { + width: 0.3rem; + height: auto; + position: absolute; + top: 36%; + left: 56%; + z-index: 99; + cursor: pointer; + } + .axis_shimen3 { + width: 0.3rem; + height: auto; + position: absolute; + top: 38%; + left: 57%; + z-index: 99; + cursor: pointer; + } + .axis_shimen4 { + width: 0.3rem; + height: auto; + position: absolute; + top: 25%; + left: 66%; + z-index: 99; + cursor: pointer; + } + .axis_shimen5 { + width: 0.3rem; + height: auto; + position: absolute; + top: 28%; + left: 67%; + z-index: 99; + cursor: pointer; + } + .axis_shimen6 { + width: 0.3rem; + height: auto; + position: absolute; + top: 21%; + left: 70%; + z-index: 99; + cursor: pointer; + } + .axis_shimen7 { + width: 0.3rem; + height: auto; + position: absolute; + top: 24%; + left: 71%; + z-index: 99; + cursor: pointer; + } + .axis_shimen8 { + width: 0.3rem; + height: auto; + position: absolute; + top: 18.5%; + left: 74%; + z-index: 99; + cursor: pointer; + } + + .axis_shimen9 { + width: 0.3rem; + height: auto; + position: absolute; + top: 21.5%; + left: 75%; + z-index: 99; + cursor: pointer; + } } .drag_box8 { width: 100%; @@ -2394,6 +2584,7 @@ export default { z-index: 99; cursor: pointer; } + } .drag_box { width: 100%; diff --git a/src/views/page/largeScreen1.vue b/src/views/page/largeScreen1.vue index 2a5a6b6..a687064 100644 --- a/src/views/page/largeScreen1.vue +++ b/src/views/page/largeScreen1.vue @@ -1,7 +1,7 @@