|
|
@@ -518,14 +518,17 @@ import {
|
|
|
addQmResult, addCqResult, addZdResult, expotZDBCWord
|
|
|
} from "@/api/zt/ztApi.js";
|
|
|
import zdAnalyse from './zdAnalyse.js'
|
|
|
+import Popup from "../Popup.js";
|
|
|
var handlerPolygon;
|
|
|
var handleInput;
|
|
|
var polygonEntity = null;
|
|
|
+var popupBox=null;
|
|
|
export default {
|
|
|
props: ["layerid"],
|
|
|
name: "DemolitionList",
|
|
|
data() {
|
|
|
return {
|
|
|
+
|
|
|
searchName: "",
|
|
|
FileList: [],
|
|
|
localLoading: null,
|
|
|
@@ -1792,7 +1795,7 @@ export default {
|
|
|
var fieldNames = [];
|
|
|
var fieldValues = []
|
|
|
id = pick.id._id
|
|
|
- if (id.indexOf && id.indexOf(prefix) > -1) {
|
|
|
+ if (id&&id.indexOf && id.indexOf(prefix) > -1) {
|
|
|
fieldNames = pick.id.attributes.fieldNames;
|
|
|
fieldValues = pick.id.attributes.fieldValues;
|
|
|
for (var i = 0; i < fieldNames.length; i++) {
|
|
|
@@ -3507,6 +3510,11 @@ export default {
|
|
|
}
|
|
|
viewer.entities.removeById('ZDBDC_FC');
|
|
|
viewer.entities.removeById('aad')
|
|
|
+ if(popupBox){
|
|
|
+ popupBox.destroy();
|
|
|
+ popupBox=null;
|
|
|
+ }
|
|
|
+
|
|
|
var curID;
|
|
|
for (var i = 0; i < features.length; i++) {
|
|
|
fieldNames = features[i].fieldNames;
|
|
|
@@ -3525,16 +3533,63 @@ export default {
|
|
|
positions.push(geometry.points[i].x);
|
|
|
positions.push(geometry.points[i].y);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ let dom = document.createElement("div");
|
|
|
+ dom.id = "ZDBDC_FCtext";
|
|
|
+ dom.style.position = "absolute";
|
|
|
+ dom.style.width = "0";
|
|
|
+ dom.style.height = "0";
|
|
|
+ // dom.style.color = "rgba(2, 23, 44, 0.8)";
|
|
|
+ // dom.style.backgroundColor = "rgba(2, 23, 44, 0.8)";
|
|
|
+ dom.style.fontSize = "1rem";
|
|
|
+
|
|
|
+ let domContent = document.createElement("div");
|
|
|
+ domContent.style.position = "absolute";
|
|
|
+ domContent.style.borderRadius = "5px";
|
|
|
+ domContent.style.border = "1px solid rgba(7, 131, 250, 0.3)";
|
|
|
+ domContent.style.backgroundColor = "rgba(2, 23, 44, 0.7)";
|
|
|
+ domContent.style.bottom = "0px";
|
|
|
+ domContent.style.left = "0px";
|
|
|
+ domContent.style.whiteSpace = "nowrap";
|
|
|
+ domContent.style.color = "white";
|
|
|
+ // domContent.style.padding = "8px 12px";
|
|
|
+ domContent.style.transform = "translate(-50%, 0%)";
|
|
|
+
|
|
|
+ domContent.innerHTML = cqr;
|
|
|
+ dom.appendChild(domContent);
|
|
|
+
|
|
|
+ popupBox = new Popup({
|
|
|
+ viewer: viewer,
|
|
|
+ element: dom,
|
|
|
+ pixelOffset: new Cesium.Cartesian2(0, 0),
|
|
|
+ translucencyByDistance: new Cesium.NearFarScalar(
|
|
|
+ 0,
|
|
|
+ 1,
|
|
|
+ 50000,
|
|
|
+ 1
|
|
|
+ ),
|
|
|
+ distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
|
|
|
+ 0,
|
|
|
+ 51000
|
|
|
+ ),
|
|
|
+ position: Cesium.Cartesian3.fromDegrees(geometry.center.x,geometry.center.y,20),
|
|
|
+ });
|
|
|
+
|
|
|
+ popupBox.show();
|
|
|
+
|
|
|
+
|
|
|
entity = new Cesium.Entity({
|
|
|
id: "ZDBDC_FC",
|
|
|
- label: {
|
|
|
- text: cqr,
|
|
|
- heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
|
- font: "14px sans-serif",
|
|
|
- fillColor: new Cesium.Color(1, 0, 0, 1),
|
|
|
- showBackground: true,
|
|
|
- backgroundColor: new Cesium.Color(0, 0.8, 0, 0.8)
|
|
|
- },
|
|
|
+ // label: {
|
|
|
+ // text: cqr,
|
|
|
+ // heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
|
+ // font: "14px sans-serif",
|
|
|
+ // fillColor: new Cesium.Color(1, 0, 0, 1),
|
|
|
+ // showBackground: true,
|
|
|
+ // backgroundColor: new Cesium.Color(0, 0.8, 0, 0.8)
|
|
|
+ // },
|
|
|
position: Cesium.Cartesian3.fromDegrees(
|
|
|
geometry.center.x,
|
|
|
geometry.center.y,
|
|
|
@@ -4066,7 +4121,11 @@ export default {
|
|
|
this.entities = []
|
|
|
this.qsEntities = [];
|
|
|
viewer.entities.removeAll();
|
|
|
-
|
|
|
+ if(popupBox){
|
|
|
+ popupBox.destroy();
|
|
|
+ popupBox=null;
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
destroyed() { }
|
|
|
|