Compare commits

...

3 Commits

Author SHA1 Message Date
xiaomeng 3615ef17a5 Merge pull request 'pc-master' (#201) from pc-master into portal
Reviewed-on: #201
2024-12-04 01:01:19 +00:00
sunmeng 8797618e0f 1 2024-12-03 18:02:13 +08:00
sunmeng c0faa69180 1 2024-12-03 17:47:22 +08:00
4 changed files with 423 additions and 69 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@ -476,7 +476,7 @@ export default {
// item.id == 1 ; // item.id == 1 ;
// item.id == 5 ; // item.id == 5 ;
// //
const foundObject = this.limitUserId.find(item => item.id == 2 || item.id == 1 || item.id == 5|| item.id == 7|| item.id == 8|| item.id == 9); const foundObject = this.limitUserId.find(item => item.id == 2 || item.id == 1 || item.id == 5|| item.id == 7|| item.id == 8|| item.id == 9|| item.id == 10);
if (!foundObject) { if (!foundObject) {
this.$message('您当前没有权限查看!') this.$message('您当前没有权限查看!')
return return

View File

@ -3,7 +3,7 @@
<div class="park" v-if="limitUserId == 2" @click="handlerOther">{{ other_show ? '退' : '' }}</div> <div class="park" v-if="limitUserId == 2" @click="handlerOther">{{ other_show ? '退' : '' }}</div>
<div class="other" v-show="other_show"></div> <div class="other" v-show="other_show"></div>
<div class="kuang"> <div class="kuang">
<div class="title"> {{limitUserId == 9 ?'甘井设施农业大数据云平台':'温室智慧云数据统计'}}</div> <div class="title"> {{ limitUserId == 9 ? '甘井设施农业大数据云平台' : '温室智慧云数据统计' }}</div>
<!-- <div class="auto_play"> <!-- <div class="auto_play">
<span :class="autoPlay ? '' : 'act'" @click="autoPlay1"></span> <span :class="autoPlay ? '' : 'act'" @click="autoPlay1"></span>
<span :class="autoPlay ? 'act' : ''" @click="autoPlay2"></span> <span :class="autoPlay ? 'act' : ''" @click="autoPlay2"></span>
@ -155,8 +155,8 @@
<img class="axis_shimen4" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" /> <img class="axis_shimen4" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" />
<img class="axis_shimen5" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" /> <img class="axis_shimen5" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" />
</div> </div>
<!-- 大冶鑫 --> <!-- 大冶鑫 -->
<div class="drag_box8" ref="drag_box8" v-show="limitUserId == 8"> <div class="drag_box8" ref="drag_box8" v-show="limitUserId == 8">
<img class="drag_img" src="../../assets/img/map4.jpg" alt="" /> <img class="drag_img" src="../../assets/img/map4.jpg" alt="" />
<img class="axis_shimen" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" /> <img class="axis_shimen" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" />
<img class="axis_shimen1" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" /> <img class="axis_shimen1" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" />
@ -166,9 +166,9 @@
<img class="axis_shimen5" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" /> <img class="axis_shimen5" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" />
<img class="axis_shimen6" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" /> <img class="axis_shimen6" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" />
<img class="axis_shimen7" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" /> <img class="axis_shimen7" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" />
</div> </div>
<!-- 甘井设施农业 --> <!-- 甘井设施农业 -->
<div class="drag_box9" ref="drag_box9" v-show="limitUserId == 9"> <div class="drag_box9" ref="drag_box9" v-show="limitUserId == 9">
<img class="drag_img" src="../../assets/img/map5.png" alt="" /> <img class="drag_img" src="../../assets/img/map5.png" alt="" />
<img class="axis_shimen" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" /> <img class="axis_shimen" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" />
<img class="axis_shimen1" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" /> <img class="axis_shimen1" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" />
@ -181,7 +181,16 @@
<img class="axis_shimen8" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" /> <img class="axis_shimen8" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" />
<img class="axis_shimen9" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" /> <img class="axis_shimen9" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" />
</div> </div>
<!-- 丽水凤鸣共富葡萄 -->
<div class="drag_box10" ref="drag_box10" v-show="limitUserId == 10">
<img class="drag_img" src="../../assets/img/map6.jpg" alt="" />
<img class="axis_shimen" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" />
<img class="axis_shimen1" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" />
<img class="axis_shimen2" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" />
<img class="axis_shimen3" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" />
<img class="axis_shimen4" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" />
<img class="axis_shimen5" src="../../assets/img/axis1.png" alt="" @click="handlerAxis_5" />
</div>
</div> </div>
</div> </div>
</div> </div>
@ -215,8 +224,8 @@
<div class="swiper-container middle_disasterWarningAnalysis" :style="styleContainer"> <div class="swiper-container middle_disasterWarningAnalysis" :style="styleContainer">
<div class="swiper-wrapper"> <div class="swiper-wrapper">
<div :class="(limitUserId == 1 ? current : current1) == index <div :class="(limitUserId == 1 ? current : current1) == index
? 'swiper-slide swiper-slide2' ? 'swiper-slide swiper-slide2'
: 'swiper-slide swiper-slide1' : 'swiper-slide swiper-slide1'
" v-for="(item, index) in dataList" :key="index" :style="styleItem" " v-for="(item, index) in dataList" :key="index" :style="styleItem"
@click="getCurrent(index, item)"> @click="getCurrent(index, item)">
{{ {{
@ -354,7 +363,7 @@
</div> </div>
</div> </div>
<!-- 大冶鑫 --> <!-- 大冶鑫 -->
<div class="content_item" v-if="limitUserId == 7|| limitUserId == 9"> <div class="content_item" v-if="limitUserId == 7 || limitUserId == 9|| limitUserId == 10">
<div v-for="(item, index) in fiveControlList" :key="index" style="margin-bottom: 0.15rem"> <div v-for="(item, index) in fiveControlList" :key="index" style="margin-bottom: 0.15rem">
<div class="i_title" v-if="item.controlState != 0"> <div class="i_title" v-if="item.controlState != 0">
<img src="../../assets/img/i_title_img.png" alt="" /> <img src="../../assets/img/i_title_img.png" alt="" />
@ -968,7 +977,7 @@ export default {
this.get_environmentData(2023120613270120); this.get_environmentData(2023120613270120);
this.get_readControl_getState(2023120613270120); this.get_readControl_getState(2023120613270120);
this.getWeatherData(2023120613270120); this.getWeatherData(2023120613270120);
} else if (limitUserId == 8) { } else if (limitUserId == 8||limitUserId == 10) {
// Id // Id
const list = [] const list = []
this.$store.state.equipmentList.forEach((el, index) => { this.$store.state.equipmentList.forEach((el, index) => {
@ -977,7 +986,7 @@ export default {
} }
}) })
list.sort(this.compare('equipmentStatu')) list.sort(this.compare('equipmentStatu'))
// //
this.get_weather_echart_data(list[0].deviceId); this.get_weather_echart_data(list[0].deviceId);
this.get_thisWeekTemperature_echart_data(list[0].deviceId); this.get_thisWeekTemperature_echart_data(list[0].deviceId);
@ -985,7 +994,7 @@ export default {
this.get_readControl_getState(list[0].deviceId); this.get_readControl_getState(list[0].deviceId);
this.getWeatherData(list[0].deviceId); this.getWeatherData(list[0].deviceId);
} else if (limitUserId == 9) { } else if (limitUserId == 9) {
// charts // charts
this.get_weather_echart_data(2023120613270131); this.get_weather_echart_data(2023120613270131);
this.get_thisWeekTemperature_echart_data(2023120613270131); this.get_thisWeekTemperature_echart_data(2023120613270131);
@ -1096,12 +1105,14 @@ export default {
get_sel_eqbyid(userId) { get_sel_eqbyid(userId) {
this.api.sel_eqbyid(userId).then((res) => { this.api.sel_eqbyid(userId).then((res) => {
// console.log("id Copy", res); // console.log("id Copy", res);
res.data.data.forEach((item, index) => { res.data.data.forEach((item, index) => {
if ( if (
item.cameraSerialNumber != null && item.cameraSerialNumber != null &&
(item.deviceId == 2023042214250027 || (item.deviceId == 2023042214250027 ||
item.deviceId == 2023120613270115|| item.deviceId == 2023120613270115 ||
item.deviceId == 2024070113400048) item.deviceId == 2024070113400048||
item.deviceId==2023042214250017)
) { ) {
this.get_sel_eqbyid_list.push({ ...item, number: index }); this.get_sel_eqbyid_list.push({ ...item, number: index });
@ -1251,7 +1262,7 @@ export default {
// id == 1 ; // id == 1 ;
// id == 5 ; // id == 5 ;
// 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|| el.id == 9))[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|| el.id == 10))[0].id;
if (this.limitUserId == 1) { if (this.limitUserId == 1) {
this.drag_boxHandler(); this.drag_boxHandler();
this.dataInit(userId, this.limitUserId); this.dataInit(userId, this.limitUserId);
@ -1270,7 +1281,11 @@ export default {
} else if (this.limitUserId == 9) { } else if (this.limitUserId == 9) {
this.drag_boxHandler9(); this.drag_boxHandler9();
this.dataInit(userId, this.limitUserId); this.dataInit(userId, this.limitUserId);
}else if (this.limitUserId == 10) {
this.drag_boxHandler10();
this.dataInit(userId, this.limitUserId);
} }
} }
}); });
}, },
@ -1349,14 +1364,14 @@ export default {
this.current1 = index; this.current1 = index;
// console.log(item,'00000000000000'); // console.log(item,'00000000000000');
// this.get_readControl_getState(item.deviceId); // this.get_readControl_getState(item.deviceId);
// Id // Id
const list = [] const list = []
this.$store.state.equipmentList.forEach((el, index) => { this.$store.state.equipmentList.forEach((el, index) => {
if (el.deviceName == 10) { if (el.deviceName == 10) {
list.push(el) list.push(el)
} }
}) })
list.sort(this.compare('equipmentStatu')) list.sort(this.compare('equipmentStatu'))
if (this.limitUserId == 1) { if (this.limitUserId == 1) {
this.get_readControl_getState(list[0].deviceId); this.get_readControl_getState(list[0].deviceId);
@ -1366,9 +1381,7 @@ export default {
this.get_readControl_getState(2023042214250070); this.get_readControl_getState(2023042214250070);
} else if (this.limitUserId == 7) { } else if (this.limitUserId == 7) {
this.get_readControl_getState(2023120613270120); this.get_readControl_getState(2023120613270120);
}else if (this.limitUserId == 8) { } else if (this.limitUserId == 8||this.limitUserId == 9||this.limitUserId == 10) {
this.get_readControl_getState(list[0].deviceId);
}else if (this.limitUserId == 9) {
this.get_readControl_getState(list[0].deviceId); this.get_readControl_getState(list[0].deviceId);
} }
@ -1509,7 +1522,64 @@ export default {
} }
}; };
}, },
drag_boxHandler9() { drag_boxHandler10() {
let demo = this.$refs.drag_box10;
demo = document.querySelector(".drag_box10"); //
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_boxHandler9() {
let demo = this.$refs.drag_box9; let demo = this.$refs.drag_box9;
demo = document.querySelector(".drag_box9"); // demo = document.querySelector(".drag_box9"); //
let canMove = false; // let canMove = false; //
@ -2386,7 +2456,7 @@ export default {
cursor: pointer; cursor: pointer;
} }
} }
.drag_box9 { .drag_box10 {
width: 100%; width: 100%;
height: auto; height: auto;
position: absolute; position: absolute;
@ -2413,94 +2483,187 @@ export default {
width: 0.3rem; width: 0.3rem;
height: auto; height: auto;
position: absolute; position: absolute;
top: 24%; top: 19%;
left: 11%; left: 46%;
z-index: 99; z-index: 99;
cursor: pointer; cursor: pointer;
} }
.axis_shimen1 { .axis_shimen1 {
width: 0.3rem; width: 0.3rem;
height: auto; height: auto;
position: absolute; position: absolute;
top: 76%; top: 19%;
left: 13%; left: 55%;
z-index: 99; z-index: 99;
cursor: pointer; cursor: pointer;
} }
.axis_shimen2 { .axis_shimen2 {
width: 0.3rem; width: 0.3rem;
height: auto; height: auto;
position: absolute; position: absolute;
top: 36%; top: 48%;
left: 56%; left: 46%;
z-index: 99; z-index: 99;
cursor: pointer; cursor: pointer;
} }
.axis_shimen3 { .axis_shimen3 {
width: 0.3rem; width: 0.3rem;
height: auto; height: auto;
position: absolute; position: absolute;
top: 38%; top: 48%;
left: 57%; left: 56%;
z-index: 99; z-index: 99;
cursor: pointer; cursor: pointer;
} }
.axis_shimen4 { .axis_shimen4 {
width: 0.3rem; width: 0.3rem;
height: auto; height: auto;
position: absolute; position: absolute;
top: 25%; top: 73%;
left: 66%; left: 46%;
z-index: 99; z-index: 99;
cursor: pointer; cursor: pointer;
} }
.axis_shimen5 { .axis_shimen5 {
width: 0.3rem; width: 0.3rem;
height: auto; height: auto;
position: absolute; position: absolute;
top: 28%; top: 73%;
left: 67%; left: 57%;
z-index: 99; z-index: 99;
cursor: pointer; cursor: pointer;
} }
.axis_shimen6 { }
width: 0.3rem; .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; height: auto;
position: absolute; -webkit-mask-image: linear-gradient(transparent 0%,
top: 21%; blue 2%,
left: 70%; blue 95%,
z-index: 99; transparent 97%);
cursor: pointer;
} }
.axis_shimen7 {
width: 0.3rem; .axis_shimen {
width: 0.3rem;
height: auto; height: auto;
position: absolute; position: absolute;
top: 24%; top: 24%;
left: 71%; left: 11%;
z-index: 99; z-index: 99;
cursor: pointer; cursor: pointer;
} }
.axis_shimen8 {
width: 0.3rem; .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; height: auto;
position: absolute; position: absolute;
top: 18.5%; top: 18.5%;
left: 74%; left: 74%;
z-index: 99; z-index: 99;
cursor: pointer; cursor: pointer;
} }
.axis_shimen9 { .axis_shimen9 {
width: 0.3rem; width: 0.3rem;
height: auto; height: auto;
position: absolute; position: absolute;
top: 21.5%; top: 21.5%;
left: 75%; left: 75%;
z-index: 99; z-index: 99;
cursor: pointer; cursor: pointer;
} }
} }
.drag_box8 { .drag_box8 {
width: 100%; width: 100%;
height: auto; height: auto;
@ -2533,6 +2696,7 @@ export default {
z-index: 99; z-index: 99;
cursor: pointer; cursor: pointer;
} }
.axis_shimen1 { .axis_shimen1 {
width: 0.4rem; width: 0.4rem;
height: auto; height: auto;
@ -2542,6 +2706,7 @@ export default {
z-index: 99; z-index: 99;
cursor: pointer; cursor: pointer;
} }
.axis_shimen2 { .axis_shimen2 {
width: 0.4rem; width: 0.4rem;
height: auto; height: auto;
@ -2551,15 +2716,17 @@ export default {
z-index: 99; z-index: 99;
cursor: pointer; cursor: pointer;
} }
.axis_shimen3 { .axis_shimen3 {
width: 0.4rem; width: 0.4rem;
height: auto; height: auto;
position: absolute; position: absolute;
top: 28%; top: 28%;
left: 61%; left: 61%;
z-index: 99; z-index: 99;
cursor: pointer; cursor: pointer;
} }
.axis_shimen4 { .axis_shimen4 {
width: 0.4rem; width: 0.4rem;
height: auto; height: auto;
@ -2569,6 +2736,7 @@ export default {
z-index: 99; z-index: 99;
cursor: pointer; cursor: pointer;
} }
.axis_shimen5 { .axis_shimen5 {
width: 0.4rem; width: 0.4rem;
height: auto; height: auto;
@ -2578,26 +2746,29 @@ export default {
z-index: 99; z-index: 99;
cursor: pointer; cursor: pointer;
} }
.axis_shimen6 { .axis_shimen6 {
width: 0.4rem; width: 0.4rem;
height: auto; height: auto;
position: absolute; position: absolute;
top: 5%; top: 5%;
left: 54%; left: 54%;
z-index: 99; z-index: 99;
cursor: pointer; cursor: pointer;
} }
.axis_shimen7 { .axis_shimen7 {
width: 0.4rem; width: 0.4rem;
height: auto; height: auto;
position: absolute; position: absolute;
top: 0%; top: 0%;
left: 50%; left: 50%;
z-index: 99; z-index: 99;
cursor: pointer; cursor: pointer;
} }
} }
.drag_box { .drag_box {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -2806,7 +2977,7 @@ export default {
} }
::v-deep .swiper-slide { ::v-deep .swiper-slide {
width: 0.84rem !important; width: 0.90rem !important;
} }
.swiper-slide1 {} .swiper-slide1 {}

View File

@ -682,6 +682,90 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 甘井设施农业 -->
<div class="content" v-show="limitUserId == 10">
<div class="map">
<div class="map1">
<div class="drag_box10" ref="drag_box10">
<img class="drag_img" src="../../assets/img/map6.jpg" alt="" />
<div class="popBox" v-for="(item, index) in popContentList" :key="index">
<template>
<div class="pole_item" :style="getTopOrLeft10(item.id)" @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>
</template>
<!-- 弹框 -->
<template>
<div
class="pop_content1"
v-show="popContentCurrent == item.id ? true : false"
:style="getTopOrLeft10_10(item.id)"
>
<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.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.06rem"></div>
<div class="icon_item scroll">
<div
class="icon_item_child"
v-for="(item1, index1) in item.childList"
:key="index1"
>
<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>
</template>
</div>
</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -1327,6 +1411,36 @@ export default {
return 'top:16.5%;left:75.5%;transform: translate(54%,0);' return 'top:16.5%;left:75.5%;transform: translate(54%,0);'
} }
}, },
getTopOrLeft10(id){
if(id == 1){
return 'top:12.5%;left:43%;z-index:10;'
}else if(id == 2){
return 'top:12.5%;left:53%;z-index:9;'
}else if(id == 3){
return 'top:45%;left:43%;z-index:8;'
}else if(id == 4){
return 'top:45%;left:54%;z-index:7;'
}else if(id == 5){
return 'top:68%;left:43%;z-index:6;'
}else if(id == 6){
return 'top:68%;left:54%;z-index:5;'
}
},
getTopOrLeft10_10(id){
if(id == 1){
return 'top:12.5%;left:43%;transform: translate(54%,0);'
}else if(id == 2){
return 'top:12.5%;left:53%;transform: translate(54%,0);'
}else if(id == 3){
return 'top:45%;left:43%;transform: translate(54%,0);'
}else if(id == 4){
return 'top:45%;left:54%;transform: translate(54%,0%);'
}else if(id == 5){
return 'top:68%;left:43%;transform: translate(54%,0%);'
}else if(id == 6){
return 'top:68%;left:54%;transform: translate(54%,0%);'
}
},
getNamePosition(id) { getNamePosition(id) {
if (id == 1) { if (id == 1) {
return "position: absolute;top: 41%;left: 13%;"; return "position: absolute;top: 41%;left: 13%;";
@ -1446,7 +1560,7 @@ export default {
get_user_getjurisdiction(userId) { get_user_getjurisdiction(userId) {
this.api.user_getjurisdiction(userId).then((res) => { this.api.user_getjurisdiction(userId).then((res) => {
if (res.data.code == 200) { 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|| el.id == 9))[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|| el.id == 10))[0].id;
if (this.limitUserId == 1) { if (this.limitUserId == 1) {
this.drag_boxHandler(); this.drag_boxHandler();
} else if (this.limitUserId == 2) { } else if (this.limitUserId == 2) {
@ -1459,6 +1573,8 @@ export default {
this.drag_boxHandler8(); this.drag_boxHandler8();
} else if (this.limitUserId == 9) { } else if (this.limitUserId == 9) {
this.drag_boxHandler9(); this.drag_boxHandler9();
} else if (this.limitUserId == 10) {
this.drag_boxHandler10();
} }
} }
}); });
@ -1642,6 +1758,73 @@ toHttp(){
} }
}; };
}, },
drag_boxHandler10() {
let demo = this.$refs.drag_box10;
demo = document.querySelector(".drag_box10"); //
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_boxHandler9() { drag_boxHandler9() {
let demo = this.$refs.drag_box9; let demo = this.$refs.drag_box9;
demo = document.querySelector(".drag_box9"); // demo = document.querySelector(".drag_box9"); //
@ -2579,7 +2762,7 @@ toHttp(){
} }
} }
.drag_box7,.drag_box8,.drag_box9{ .drag_box7,.drag_box8,.drag_box9,.drag_box10{
width: 100%; width: 100%;
height: auto; height: auto;
position: absolute; position: absolute;