任务下发拖拽,人员距离时间,人员图标

yishuixian
zzq 2024-11-05 16:52:54 +08:00
parent 22c31f165e
commit eccd014f34
6 changed files with 86 additions and 39 deletions

View File

@ -7,11 +7,11 @@ NODE_ENV = development
#VUE_APP_BASE_API =http://60.217.22.153:9001/api
#VUE_APP_BASE_IMG_URL =http://60.217.22.153:9001
# VUE_APP_BASE_API =http://60.217.22.153:9001/api
# VUE_APP_BASE_IMG_URL =http://60.217.22.153:9001
VUE_APP_BASE_API =http://60.217.22.153:9001/api
VUE_APP_BASE_IMG_URL =http://60.217.22.153:9001
VUE_APP_BASE_API =http://192.168.10.121:83/api
VUE_APP_BASE_IMG_URL =http://192.168.10.121:83
# VUE_APP_BASE_API =http://192.168.10.121:83/api
# VUE_APP_BASE_IMG_URL =http://192.168.10.121:83

BIN
dist.rar Normal file

Binary file not shown.

View File

@ -81,7 +81,7 @@ export default {
if (item.children && item.children.length > 0) {
item.children.forEach((it, idx) => {
console.log("abc000",JSON.parse(it.attribute));
let attribute = JSON.parse(it.attribute);
attribute.pid = group.id;
delete attribute.highlight;
@ -114,8 +114,6 @@ export default {
attribute.zIndex = 10000000000;
}
console.log("abc123",attribute)
let ipinfo = this.matchHttpIpPort(attribute.url);
if(ipinfo){ //

View File

@ -243,7 +243,7 @@
</div>
<!-- 数据图层 -->
<div
class="layercontainer flex column jc-c ai-c"
class="flex layercontainer column jc-c ai-c"
id="layercontainer"
v-if="false"
>
@ -251,7 +251,7 @@
<layerPlugInUnit></layerPlugInUnit>
</div>
<div
class="layerControlBtn flex ai-c jc-c cursor"
class="flex layerControlBtn ai-c jc-c cursor"
@click="layerPlugVisible = !layerPlugVisible"
>
<img style="width: 18px; height: 18px" src="/img/layercontrol.png" />
@ -338,16 +338,18 @@
</div>
<!-- 任务下发 -->
<VueDragResize :isActive="true" :w="540" :h="480" @resizing="resize" @dragging="resize" v-if="taskDeliveryShow && finishLoadMap" v-drag>
<div class="task" >
<taskDelivery
@closeTask="closeTask"
:lng="tasklng"
:lat="tasklat"
></taskDelivery>
</div>
</VueDragResize>
<div class="tasxcontainers" v-if="taskDeliveryShow && finishLoadMap">
<VueDragResize :isActive="true" @clicked="clickHandle" :w="540" :h="480" :minw="540" :minh="480" @resizing="resize" @dragging="resize" v-if="taskDeliveryShow && finishLoadMap" v-drag>
<div class="task" >
<taskDelivery
@closeTask="closeTask"
:lng="tasklng"
:lat="tasklat"
:dragHeight="dragResize"
></taskDelivery>
</div>
</VueDragResize>
</div>
<!-- 脚部 -->
<div class="footer" id="footer">
<div class="base-layer-change-button" @click="addTileLayer('vec_d')">
@ -562,7 +564,8 @@ export default {
oneButtonCallShow: false,
finishLoadMap: false, //
firePopupClosed: false,
leftBoxShow:true
leftBoxShow:true,
dragResize: 0
};
},
@ -579,11 +582,20 @@ export default {
leftBoxShow: {
handler(newVal, oldVal) {
if (newVal) {
document.getElementsByClassName("mars3d-compass")[0].style.left = "500px";
document.getElementsByClassName("map-querybar")[0].style.left = "575px";
if(document.getElementsByClassName("mars3d-compass")[0]){
document.getElementsByClassName("mars3d-compass")[0].style.left = "500px";
}
if(document.getElementsByClassName("map-querybar")[0]){
document.getElementsByClassName("map-querybar")[0].style.left = "575px";
}
}else{
document.getElementsByClassName("mars3d-compass")[0].style.left = "25px";
document.getElementsByClassName("map-querybar")[0].style.left = "105px";
if(document.getElementsByClassName("mars3d-compass")[0]){
document.getElementsByClassName("mars3d-compass")[0].style.left = "25px";
}
if(document.getElementsByClassName("map-querybar")[0]){
document.getElementsByClassName("map-querybar")[0].style.left = "105px";
}
}
},
immediate: true
@ -631,7 +643,12 @@ export default {
},
methods: {
resize(newRect) {
console.log("newRect",newRect);
this.dragResize = newRect
},
clickHandle(e){
if (e.target.nodeName === 'INPUT' || e.target.nodeName === 'TEXTAREA') {
e.target.focus()
}
},
drawLable(val){
this.setDatas = {
@ -1093,6 +1110,7 @@ export default {
text: "人员",
callback: (e) => {
const mpt = mars3d.LngLatPoint.fromCartesian(e.cartesian);
console.log("aaa", mpt);
this.currentInfo = {
lng: mpt._lng,
@ -1571,7 +1589,15 @@ export default {
top: 130px;
left: 25px;
}
.tasxcontainers{
width: 540px;
height: 480px;
position: fixed;
left: 50%;
top: 50%;
margin-left: -270px;
margin-top: -240px;
}
.task {
width:100%;
height:100%;
@ -1926,4 +1952,12 @@ export default {
transform: translate(-50%, -50%);
z-index: 100;
}
.vdr.active:before {
display: none;
}
.vdr.active .vdr-stick {
background: none !important;
border: none !important;
}
</style>

View File

@ -94,6 +94,7 @@
<script>
import { postMethodCommon } from '@/api/common.js';
import appConfig from '../../../../public/config/app.json'
import { gcj02towgs84, wgs84togcj02 } from 'coordtransform'
import axios from "axios";
export default {
name: 'monitorbox',
@ -119,7 +120,10 @@ export default {
watch: {
fireData: {
handler(newVal, oldVal) {
this.fireLngLat = [newVal.lng, newVal.lat]
let gcj02StartLngLat = wgs84togcj02(newVal.lng, newVal.lat);
this.fireLngLat = gcj02StartLngLat
// this.fireLngLat = [newVal.lng, newVal.lat]
this.getListData();
},
immediate: true,
@ -442,13 +446,6 @@ export default {
}
postMethodCommon("/FireCodePC/GetForestRangers?areaname=" + this.areaName + "&lng=" + this.fireData.lng + "&lat=" + this.fireData.lat, this.checkList).then(res => {
let rel = res.data
// let rel = []
// res.data.forEach((item,index) =>{
// if(index == 1){
// rel.push(item)
// }
// })
this.handleData(rel).then(dl => {
if(dl){
@ -515,7 +512,7 @@ export default {
if (res.data.route && res.data.route.paths && res.data.route.paths[0]) {
let obj = res.data.route.paths[0]
data[hasLngLatItems[idx]].distance = (obj.distance / 1000).toFixed(2)
data[hasLngLatItems[idx]].duration = Math.round(obj.duration / 60)
data[hasLngLatItems[idx]].duration = Math.round(obj.duration / 60) || 1
}
})
resolve(data);

View File

@ -72,8 +72,8 @@
:data="list"
tooltip-effect="dark"
:reserve-selection="true"
height="120px"
style="height:100%;width: 100%;margin-top:12px;border-radius: 5px;background:none;border:1px solid #00fff0"
:height="tabHeight"
style="height:160px;width: 100%;margin-top:12px;border-radius: 5px;background:none;border:1px solid #00fff0"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
@ -109,7 +109,7 @@ import { getMethodCommon, postMethodCommon } from '../../../api/common';
let BASE_URL = process.env.VUE_APP_BASE_API;
export default {
name: 'taskDelivery',
props: ['globalmap', 'lng', 'lat'],
props: ['globalmap', 'lng', 'lat', 'dragHeight'],
data() {
return {
location: '',
@ -125,10 +125,25 @@ export default {
checkedUsers:[],
loading:false,
onlineUserList:[],
tabHeight: '160px'
}
},
watch: {
dragHeight: {
handler(newVal, oldVal) {
if(newVal.height>600){
this.tabHeight = newVal.height/2 + 'px'
}else if(newVal.height<600 && newVal.height>520){
this.tabHeight = newVal.height/2 - 50 + 'px'
}else{
this.tabHeight = newVal.height/2 - 80 + 'px'
}
},
immediate: true,
// deep
deep: true
},
},
created() {
@ -242,6 +257,9 @@ export default {
} else {
this.$message.error(res.data.msg);
}
if(!res){
this.$message.error(res);
}
})
}
}