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

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_API =http://60.217.22.153:9001/api
#VUE_APP_BASE_IMG_URL =http://60.217.22.153:9001 #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_API =http://60.217.22.153:9001/api
# VUE_APP_BASE_IMG_URL =http://60.217.22.153:9001 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_API =http://192.168.10.121:83/api
VUE_APP_BASE_IMG_URL =http://192.168.10.121:83 # 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) { if (item.children && item.children.length > 0) {
item.children.forEach((it, idx) => { item.children.forEach((it, idx) => {
console.log("abc000",JSON.parse(it.attribute));
let attribute = JSON.parse(it.attribute); let attribute = JSON.parse(it.attribute);
attribute.pid = group.id; attribute.pid = group.id;
delete attribute.highlight; delete attribute.highlight;
@ -114,8 +114,6 @@ export default {
attribute.zIndex = 10000000000; attribute.zIndex = 10000000000;
} }
console.log("abc123",attribute)
let ipinfo = this.matchHttpIpPort(attribute.url); let ipinfo = this.matchHttpIpPort(attribute.url);
if(ipinfo){ // if(ipinfo){ //

View File

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

View File

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

View File

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