This commit is contained in:
parent
ce1dd0e22e
commit
7123f37c05
|
|
@ -62,10 +62,23 @@
|
||||||
},
|
},
|
||||||
"basemaps": [
|
"basemaps": [
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": 2021,
|
||||||
|
"pid": 10,
|
||||||
"name": "天地图影像",
|
"name": "天地图影像",
|
||||||
"type": "xyz",
|
"icon": "https://data.mars3d.cn/img/thumbnail/basemap/tdt_img.png",
|
||||||
"url": "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
|
"type": "group",
|
||||||
|
"layers": [
|
||||||
|
{
|
||||||
|
"name": "底图",
|
||||||
|
"type": "tdt",
|
||||||
|
"layer": "img_d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "注记",
|
||||||
|
"type": "tdt",
|
||||||
|
"layer": "img_z"
|
||||||
|
}
|
||||||
|
],
|
||||||
"show": true
|
"show": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,9 @@
|
||||||
>
|
>
|
||||||
<div class="drawPolygonIcon"></div>
|
<div class="drawPolygonIcon"></div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="drawPolygon" @click="lineClick('circle')">
|
<div class="drawPolygon" @click="lineClick('circle')">
|
||||||
<div class="drawCircularIcon"></div>
|
<div class="drawCircularIcon"></div>
|
||||||
</div> -->
|
</div>
|
||||||
<!-- <div class="drawPolygon">
|
<!-- <div class="drawPolygon">
|
||||||
<el-upload
|
<el-upload
|
||||||
action=""
|
action=""
|
||||||
|
|
@ -211,9 +211,8 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
lineClick(val) {
|
lineClick(val) {
|
||||||
console.log(val, this.graphicLayer._graphicList._hash[val], "val");
|
console.log(val, this.graphicLayer, "val");
|
||||||
// if()
|
if (this.graphicLayer._graphicList._array.length < 1) {
|
||||||
if (this.graphicLayer._graphicList._hash[val] === undefined) {
|
|
||||||
this.attrType = val;
|
this.attrType = val;
|
||||||
let style = {};
|
let style = {};
|
||||||
if (val === "polygon") {
|
if (val === "polygon") {
|
||||||
|
|
@ -244,7 +243,7 @@ export default {
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
materialType: mars3d.MaterialType.PolyGradient,
|
materialType: mars3d.MaterialType.PolyGradient,
|
||||||
materialOptions: {
|
materialOptions: {
|
||||||
color: "#ffff00",
|
color: "#3388cc",
|
||||||
opacity: 0.7,
|
opacity: 0.7,
|
||||||
alphaPower: 1.3
|
alphaPower: 1.3
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,17 @@
|
||||||
@click="handleMenuClick(item)"
|
@click="handleMenuClick(item)"
|
||||||
>
|
>
|
||||||
<div class="itemIcon">
|
<div class="itemIcon">
|
||||||
|
<el-tooltip
|
||||||
|
class="item"
|
||||||
|
effect="dark"
|
||||||
|
:content="item.name"
|
||||||
|
placement="bottom"
|
||||||
|
>
|
||||||
<img
|
<img
|
||||||
:src="activeId === item.id ? item.iconActive : item.icon"
|
:src="activeId === item.id ? item.iconActive : item.icon"
|
||||||
:alt="item.name"
|
:alt="item.name"
|
||||||
/>
|
/>
|
||||||
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -32,7 +39,14 @@
|
||||||
@click="handlefdClick(item)"
|
@click="handlefdClick(item)"
|
||||||
>
|
>
|
||||||
<div class="itemIcon">
|
<div class="itemIcon">
|
||||||
|
<el-tooltip
|
||||||
|
class="item"
|
||||||
|
effect="dark"
|
||||||
|
:content="item.name"
|
||||||
|
placement="bottom"
|
||||||
|
>
|
||||||
<img :src="item.icon" :alt="item.name" />
|
<img :src="item.icon" :alt="item.name" />
|
||||||
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import route from "@/router/index";
|
||||||
export function allPositions(options, show) {
|
export function allPositions(options, show) {
|
||||||
options.forEach((item, index) => {
|
options.forEach((item, index) => {
|
||||||
let graphic = window.marsMap.getLayerById(
|
let graphic = window.marsMap.getLayerById(
|
||||||
|
|
@ -220,12 +221,20 @@ function bindLayerPopup(graphicLayer, graphic) {
|
||||||
});
|
});
|
||||||
} else if (graphic.name === "飞手") {
|
} else if (graphic.name === "飞手") {
|
||||||
} else {
|
} else {
|
||||||
|
let wPath = window.document.location.href;
|
||||||
|
let pathName = route.path;
|
||||||
|
let pos = wPath.indexOf(pathName);
|
||||||
|
let localhostPath = wPath.substring(0, pos);
|
||||||
|
let uploadUrl =
|
||||||
|
process.env.VUE_APP_API_URL === "/"
|
||||||
|
? localhostPath
|
||||||
|
: process.env.VUE_APP_API_URL;
|
||||||
graphic.bindPopup(
|
graphic.bindPopup(
|
||||||
` <div class="mians">
|
` <div class="mians">
|
||||||
<div class="title">${attr.name}</div>
|
<div class="title">${attr.name}</div>
|
||||||
<div class="imgs"><img src="${
|
<div class="imgs"><img src="${
|
||||||
attr.img !== null
|
attr.img !== null
|
||||||
? process.env.VUE_APP_API_URL + attr.img
|
? uploadUrl + attr.img
|
||||||
: require("@/assets/img/nopic.png")
|
: require("@/assets/img/nopic.png")
|
||||||
}" /></div>
|
}" /></div>
|
||||||
<div class="device-type">
|
<div class="device-type">
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ export default {
|
||||||
let params = {};
|
let params = {};
|
||||||
if (type === "add") {
|
if (type === "add") {
|
||||||
this.isType = "add";
|
this.isType = "add";
|
||||||
this.title = "新增防区";
|
this.title = "新增人员";
|
||||||
this.fromItem = {};
|
this.fromItem = {};
|
||||||
this.formDrawerList[0].disabled = false;
|
this.formDrawerList[0].disabled = false;
|
||||||
this.formDrawerList[1].disabled = false;
|
this.formDrawerList[1].disabled = false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue