|
@@ -20,7 +20,11 @@
|
|
|
</el-input>
|
|
|
</el-col>
|
|
|
<el-col :span="5" :offset="6">
|
|
|
- <el-button size="mini" type="primary" plain @click="openaddProjectInfo"
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ @click="openaddProjectInfo()"
|
|
|
>新增项目</el-button
|
|
|
>
|
|
|
<!-- <el-button size="mini" type="primary" plain>导入项目</el-button> -->
|
|
@@ -143,7 +147,11 @@
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
- {{ itemModel.creationtime }}
|
|
|
+ {{
|
|
|
+ itemModel.creationtime
|
|
|
+ ? itemModel.creationtime.substring(0, 10)
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
@@ -391,7 +399,11 @@
|
|
|
<div>
|
|
|
<el-row :gutter="10">
|
|
|
<el-col :span="24">
|
|
|
- <el-button size="mini" type="primary" plain
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ @click="ModelComparison(item)"
|
|
|
>模型对比</el-button
|
|
|
>
|
|
|
<!-- <el-button
|
|
@@ -438,7 +450,11 @@
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
- {{ itemModel.creationtime }}
|
|
|
+ {{
|
|
|
+ itemModel.creationtime
|
|
|
+ ? itemModel.creationtime.substring(0, 10)
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
@@ -491,7 +507,7 @@
|
|
|
>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
- <!-- <el-col :span="6">
|
|
|
+ <el-col :span="6">
|
|
|
<div
|
|
|
class="con-col hover_style"
|
|
|
style="cursor: pointer"
|
|
@@ -506,7 +522,7 @@
|
|
|
></i>
|
|
|
<a>删除</a>
|
|
|
</div>
|
|
|
- </el-col> -->
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
<el-row
|
|
|
:ref="itemModel.id + 'AnalyzeList'"
|
|
@@ -517,7 +533,7 @@
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
size="mini"
|
|
|
- @click.stop="normAnalysis(itemModel)"
|
|
|
+ @click.stop="normAnalysis(item, itemModel)"
|
|
|
>指标分析
|
|
|
</el-button>
|
|
|
</el-col>
|
|
@@ -720,6 +736,7 @@ import parkResult from "@/views/ConstructionApplication3D/parkCheck/parkResult.v
|
|
|
import clipboxByEditor from "@/views/ConstructionApplication3D/clipboxByEditor/clipboxByEditor.vue";
|
|
|
import ghqk from "./ghqk.js";
|
|
|
import CheckParkAnalyse from "./CheckParkAnalyse.js";
|
|
|
+import Popup from "../Popup.js";
|
|
|
import {
|
|
|
listProjectinformation,
|
|
|
delConstructionmodel,
|
|
@@ -727,6 +744,7 @@ import {
|
|
|
updateProjectinformation,
|
|
|
delProjectinformation,
|
|
|
} from "@/api/zt/ztApi.js";
|
|
|
+var popupBoxs = [];
|
|
|
export default {
|
|
|
name: "constructionApplication3D",
|
|
|
data() {
|
|
@@ -909,10 +927,22 @@ export default {
|
|
|
//分析列表显隐
|
|
|
async openAnalyzeList(itemModel) {
|
|
|
this.SelectConstructionModelHendle(itemModel);
|
|
|
+ debugger;
|
|
|
+ for (let key in this.$refs) {
|
|
|
+ if (key.includes("AnalyzeList")) {
|
|
|
+ if (key == itemModel.id + "AnalyzeList") {
|
|
|
+ var classList = this.$refs[key][0].$el.classList;
|
|
|
+ classList.toggle("none");
|
|
|
+ } else {
|
|
|
+ var classList = this.$refs[key][0].$el.classList;
|
|
|
+ classList.add("none");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- const classList =
|
|
|
- this.$refs[itemModel.id + "AnalyzeList"][0].$el.classList;
|
|
|
- classList.toggle("none");
|
|
|
+ // const classList =
|
|
|
+ // this.$refs[itemModel.id + "AnalyzeList"][0].$el.classList;
|
|
|
+ // classList.toggle("none");
|
|
|
},
|
|
|
|
|
|
//切换项目
|
|
@@ -960,28 +990,32 @@ export default {
|
|
|
this.removeModel();
|
|
|
this.WaitingSelectionModel = null;
|
|
|
this.removeAll();
|
|
|
- // 清除其他选定样式
|
|
|
- for (let key in this.$refs) {
|
|
|
- if (key.indexOf("Model") !== -1) {
|
|
|
- let item = this.$refs[key][0];
|
|
|
- item.childNodes.forEach((Citem) => {
|
|
|
- if (
|
|
|
- Citem.className &&
|
|
|
- Citem.className.indexOf("status ce") !== -1
|
|
|
- ) {
|
|
|
- Citem.style.display = "none";
|
|
|
- }
|
|
|
- });
|
|
|
+ debugger;
|
|
|
+
|
|
|
+ var wshData = this.wsh.find((c) => c.id == Minfo.projectinformationid);
|
|
|
+ if (wshData && wshData.meetingprogress != "1") {
|
|
|
+ // 清除其他选定样式
|
|
|
+ for (let key in this.$refs) {
|
|
|
+ if (key.indexOf("Model") !== -1) {
|
|
|
+ let item = this.$refs[key][0];
|
|
|
+ item.childNodes.forEach((Citem) => {
|
|
|
+ if (
|
|
|
+ Citem.className &&
|
|
|
+ Citem.className.indexOf("status ce") !== -1
|
|
|
+ ) {
|
|
|
+ Citem.style.display = "none";
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
+ // 添加当前选定样式及待选模型
|
|
|
+ this.$refs["Model" + Minfo.id][0].childNodes.forEach((item) => {
|
|
|
+ if (item.className && item.className.indexOf("status ce") !== -1) {
|
|
|
+ item.style.display = "block";
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
- // 添加当前选定样式及待选模型
|
|
|
- this.$refs["Model" + Minfo.id][0].childNodes.forEach((item) => {
|
|
|
- if (item.className && item.className.indexOf("status ce") !== -1) {
|
|
|
- item.style.display = "block";
|
|
|
- this.WaitingSelectionModel = Minfo;
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
+ this.WaitingSelectionModel = Minfo;
|
|
|
//添加模型
|
|
|
this.addModel(Minfo);
|
|
|
}
|
|
@@ -1024,7 +1058,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
area: ["30rem", "38rem"], //宽 高
|
|
|
- title: "添加项目详情",
|
|
|
+ title: item != null ? "修改项目详情" : "添加项目详情",
|
|
|
maxmin: false,
|
|
|
shade: false, //是否显示遮罩
|
|
|
shadeClose: false, //点击遮罩是否关闭
|
|
@@ -1126,15 +1160,13 @@ export default {
|
|
|
},
|
|
|
//打开夜景分析弹窗
|
|
|
openNightscapeAnalysis(info) {
|
|
|
- if (this.NightscapeAnalysislayerid) {
|
|
|
- this.$layer.close(this.NightscapeAnalysislayerid);
|
|
|
- }
|
|
|
let w = document.body.offsetWidth;
|
|
|
//左上角(left=弹窗宽/2;top=弹窗高/2+header高)
|
|
|
//右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
|
|
|
let left = w - 430 + 430 / 2;
|
|
|
let top = 550 / 2 + 60;
|
|
|
- this.NightscapeAnalysislayerid = this.$layer.iframe({
|
|
|
+ this.$layer.iframe({
|
|
|
+ id: "BJTC",
|
|
|
content: {
|
|
|
content: NightscapeAnalysis, //传递的组件对象
|
|
|
parent: this, //当前的vue对象
|
|
@@ -1154,15 +1186,13 @@ export default {
|
|
|
},
|
|
|
//打开天际线分析弹窗
|
|
|
openskylineAnalysis(info) {
|
|
|
- if (this.skylineAnalysislayerid) {
|
|
|
- this.$layer.close(this.skylineAnalysislayerid);
|
|
|
- }
|
|
|
let w = document.body.offsetWidth;
|
|
|
//左上角(left=弹窗宽/2;top=弹窗高/2+header高)
|
|
|
//右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
|
|
|
let left = w - 430 + 430 / 2;
|
|
|
let top = 550 / 2 + 60;
|
|
|
- this.skylineAnalysislayerid = this.$layer.iframe({
|
|
|
+ this.$layer.iframe({
|
|
|
+ id: "BJTC",
|
|
|
content: {
|
|
|
content: skylineAnalysis, //传递的组件对象
|
|
|
parent: this, //当前的vue对象
|
|
@@ -1182,15 +1212,13 @@ export default {
|
|
|
},
|
|
|
//打开日照分析弹窗
|
|
|
openSunlightAnalysis(info) {
|
|
|
- if (this.SunlightAnalysislayerid) {
|
|
|
- this.$layer.close(this.SunlightAnalysislayerid);
|
|
|
- }
|
|
|
let w = document.body.offsetWidth;
|
|
|
//左上角(left=弹窗宽/2;top=弹窗高/2+header高)
|
|
|
//右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
|
|
|
let left = w - 430 + 430 / 2;
|
|
|
let top = 550 / 2 + 60;
|
|
|
- this.SunlightAnalysislayerid = this.$layer.iframe({
|
|
|
+ this.$layer.iframe({
|
|
|
+ id: "BJTC",
|
|
|
content: {
|
|
|
content: SunlightAnalysis, //传递的组件对象
|
|
|
parent: this, //当前的vue对象
|
|
@@ -1217,6 +1245,7 @@ export default {
|
|
|
that.layerDataList = [];
|
|
|
Cesium.when(modelLayer, async function (layers) {
|
|
|
layers.forEach((layer) => {
|
|
|
+ viewer.flyTo(layer);
|
|
|
layer.shadowType = 2;
|
|
|
that.layerList.push(layer.name);
|
|
|
});
|
|
@@ -1269,36 +1298,82 @@ export default {
|
|
|
BUILDNO = layerData.data.find((c) => c.label == "BUILDNO").value;
|
|
|
}
|
|
|
|
|
|
- if (viewer.entities.getById("MXLH-" + SMID)) {
|
|
|
- viewer.entities.removeById("MXLH-" + SMID);
|
|
|
+ var BoxIndex = popupBoxs.findIndex(
|
|
|
+ (c) => c.element.id == "MXLH-" + SMID
|
|
|
+ );
|
|
|
+ if (BoxIndex > -1) {
|
|
|
+ popupBoxs[BoxIndex].destroy();
|
|
|
+ popupBoxs.splice(BoxIndex, 1);
|
|
|
}
|
|
|
- let label = viewer.entities.add({
|
|
|
- id: "MXLH-" + SMID,
|
|
|
- // name: "MXLH-" + SMID,
|
|
|
- //点
|
|
|
+
|
|
|
+ let dom = document.createElement("div");
|
|
|
+ dom.id = "MXLH-" + SMID;
|
|
|
+ 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 = "1.4rem";
|
|
|
+ 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 = "rgba(83, 249, 255,1)";
|
|
|
+ // domContent.style.padding = "8px 12px";
|
|
|
+ domContent.style.transform = "translate(-50%, 0%)";
|
|
|
+
|
|
|
+ domContent.innerHTML = BUILDNO;
|
|
|
+ dom.appendChild(domContent);
|
|
|
+
|
|
|
+ var 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(x, y, z),
|
|
|
- label: {
|
|
|
- text: BUILDNO, //描述内容
|
|
|
- font: "20px Sans-Serif", //字体大小 类型
|
|
|
- fillColor: new Cesium.Color(83 / 255, 249 / 255, 255 / 255, 1), //颜色
|
|
|
- outlineColor: Cesium.Color.GOLD,
|
|
|
- style: Cesium.LabelStyle.CENTER_LABEL,
|
|
|
- // 垂直位置
|
|
|
- verticalOrigin: Cesium.VerticalOrigin.BUTTON,
|
|
|
- // 中心位置
|
|
|
- pixelOffset: new Cesium.Cartesian2(0, -10),
|
|
|
- //设置背景颜色透明
|
|
|
- backgroundColor: new Cesium.Color(
|
|
|
- 35 / 255,
|
|
|
- 55 / 255,
|
|
|
- 75 / 255,
|
|
|
- 0
|
|
|
- ),
|
|
|
- //打开背景 打开背景 (不会被线段覆盖)
|
|
|
- showBackground: true,
|
|
|
- heightReference: Cesium.HeightReference.NONE,
|
|
|
- },
|
|
|
});
|
|
|
+
|
|
|
+ popupBox.show();
|
|
|
+ popupBoxs.push(popupBox);
|
|
|
+
|
|
|
+ // if (viewer.entities.getById("MXLH-" + SMID)) {
|
|
|
+ // viewer.entities.removeById("MXLH-" + SMID);
|
|
|
+ // }
|
|
|
+ // let label = viewer.entities.add({
|
|
|
+ // id: "MXLH-" + SMID,
|
|
|
+ // // name: "MXLH-" + SMID,
|
|
|
+ // //点
|
|
|
+ // position: Cesium.Cartesian3.fromDegrees(x, y, z),
|
|
|
+ // label: {
|
|
|
+ // text: BUILDNO, //描述内容
|
|
|
+ // font: "20px Sans-Serif", //字体大小 类型
|
|
|
+ // fillColor: new Cesium.Color(83 / 255, 249 / 255, 255 / 255, 1), //颜色
|
|
|
+ // outlineColor: Cesium.Color.GOLD,
|
|
|
+ // style: Cesium.LabelStyle.CENTER_LABEL,
|
|
|
+ // // 垂直位置
|
|
|
+ // verticalOrigin: Cesium.VerticalOrigin.BUTTON,
|
|
|
+ // // 中心位置
|
|
|
+ // pixelOffset: new Cesium.Cartesian2(0, -10),
|
|
|
+ // //设置背景颜色透明
|
|
|
+ // backgroundColor: new Cesium.Color(
|
|
|
+ // 35 / 255,
|
|
|
+ // 55 / 255,
|
|
|
+ // 75 / 255,
|
|
|
+ // 0
|
|
|
+ // ),
|
|
|
+ // //打开背景 打开背景 (不会被线段覆盖)
|
|
|
+ // showBackground: true,
|
|
|
+ // heightReference: Cesium.HeightReference.NONE,
|
|
|
+ // },
|
|
|
+ // });
|
|
|
});
|
|
|
});
|
|
|
},
|
|
@@ -1479,10 +1554,18 @@ export default {
|
|
|
scene.layers.remove(element);
|
|
|
});
|
|
|
this.layerList = [];
|
|
|
- this.layerDataList.forEach((element) => {
|
|
|
- let SMID = element.data.find((c) => c.label == "SMID").value;
|
|
|
- viewer.entities.removeById("MXLH-" + SMID);
|
|
|
- });
|
|
|
+
|
|
|
+ for (let index = popupBoxs.length - 1; index >= 0; index--) {
|
|
|
+ const popupBox = popupBoxs[index];
|
|
|
+ if (popupBox.element.id.includes("MXLH-")) {
|
|
|
+ popupBox.destroy();
|
|
|
+ popupBoxs.splice(index, 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // this.layerDataList.forEach((element) => {
|
|
|
+ // let SMID = element.data.find((c) => c.label == "SMID").value;
|
|
|
+ // viewer.entities.removeById("MXLH-" + SMID);
|
|
|
+ // });
|
|
|
this.layerDataList = [];
|
|
|
|
|
|
//清除多模型图层,数据
|
|
@@ -1500,9 +1583,11 @@ export default {
|
|
|
},
|
|
|
//定位模型
|
|
|
async positionModel(Minfo) {
|
|
|
- if (this.layerList.length > 0) {
|
|
|
- let layer = scene.layers.find(this.layerList[0]);
|
|
|
- viewer.flyTo(layer);
|
|
|
+ if (this.WaitingSelectionModel == Minfo && this.layerList.length > 0) {
|
|
|
+ this.layerList.forEach((element, i) => {
|
|
|
+ let layer = scene.layers.find(element);
|
|
|
+ viewer.flyTo(layer);
|
|
|
+ });
|
|
|
} else {
|
|
|
this.SelectConstructionModelHendle(Minfo);
|
|
|
}
|
|
@@ -1785,27 +1870,68 @@ export default {
|
|
|
clampToGround: true,
|
|
|
},
|
|
|
});
|
|
|
- let label = viewer.entities.add({
|
|
|
- id: "JZXGD-A",
|
|
|
- //点
|
|
|
+ debugger;
|
|
|
+
|
|
|
+ let dom = document.createElement("div");
|
|
|
+ dom.id = "JZXGD-A";
|
|
|
+ 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 = "red";
|
|
|
+ // domContent.style.padding = "8px 12px";
|
|
|
+ domContent.style.transform = "translate(-50%, 0%)";
|
|
|
+
|
|
|
+ domContent.innerHTML = "限高上限:" + JZXGD + "米";
|
|
|
+ dom.appendChild(domContent);
|
|
|
+
|
|
|
+ var 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(ps[0], ps[1], JZXGD + jcgd),
|
|
|
- label: {
|
|
|
- text: "限高上限:" + JZXGD + "米", //描述内容
|
|
|
- font: "20px Sans-Serif", //字体大小 类型
|
|
|
- fillColor: Cesium.Color.RED, //颜色
|
|
|
- outlineColor: Cesium.Color.GOLD,
|
|
|
- style: Cesium.LabelStyle.CENTER_LABEL,
|
|
|
- // 垂直位置
|
|
|
- verticalOrigin: Cesium.VerticalOrigin.BUTTON,
|
|
|
- // 中心位置
|
|
|
- pixelOffset: new Cesium.Cartesian2(0, -10),
|
|
|
- //设置背景颜色透明
|
|
|
- backgroundColor: new Cesium.Color(0.0, 0.0, 0.0, 0.0),
|
|
|
- //打开背景 打开背景 (不会被线段覆盖)
|
|
|
- showBackground: true,
|
|
|
- heightReference: Cesium.HeightReference.NONE,
|
|
|
- },
|
|
|
});
|
|
|
+
|
|
|
+ popupBox.show();
|
|
|
+ popupBoxs.push(popupBox);
|
|
|
+
|
|
|
+ // let label = viewer.entities.add({
|
|
|
+ // id: "JZXGD-A",
|
|
|
+ // //点
|
|
|
+ // position: Cesium.Cartesian3.fromDegrees(ps[0], ps[1], JZXGD + jcgd),
|
|
|
+ // label: {
|
|
|
+ // text: "限高上限:" + JZXGD + "米", //描述内容
|
|
|
+ // // font: "20px Sans-Serif", //字体大小 类型
|
|
|
+ // fillColor: Cesium.Color.RED, //颜色
|
|
|
+ // // outlineColor: Cesium.Color.GOLD,
|
|
|
+ // // style: Cesium.LabelStyle.CENTER_LABEL,
|
|
|
+ // // // 垂直位置
|
|
|
+ // // verticalOrigin: Cesium.VerticalOrigin.BUTTON,
|
|
|
+ // // // 中心位置
|
|
|
+ // // pixelOffset: new Cesium.Cartesian2(0, -10),
|
|
|
+ // // //设置背景颜色透明
|
|
|
+ // // backgroundColor: new Cesium.Color(0.0, 0.0, 0.0, 0.0),
|
|
|
+ // // //打开背景 打开背景 (不会被线段覆盖)
|
|
|
+ // // showBackground: true,
|
|
|
+ // heightReference: Cesium.HeightReference.NONE,
|
|
|
+ // },
|
|
|
+ // });
|
|
|
// that.layerList.forEach((layer) => {
|
|
|
// debugger;
|
|
|
// var hyp = new Cesium.HypsometricSetting();
|
|
@@ -1849,42 +1975,98 @@ export default {
|
|
|
let y = layerData.geometry.center.y;
|
|
|
let z = Number(Height);
|
|
|
|
|
|
- if (viewer.entities.getById("JZXG-" + SMID)) {
|
|
|
- viewer.entities.removeById("JZXG-" + SMID);
|
|
|
+ // if (viewer.entities.getById("JZXG-" + SMID)) {
|
|
|
+ // viewer.entities.removeById("JZXG-" + SMID);
|
|
|
+ // }
|
|
|
+ debugger;
|
|
|
+
|
|
|
+ var BoxIndex = popupBoxs.findIndex(
|
|
|
+ (c) => c.element.id == "JZXG-" + SMID
|
|
|
+ );
|
|
|
+ if (BoxIndex > -1) {
|
|
|
+ popupBoxs[BoxIndex].destroy();
|
|
|
+ popupBoxs.splice(BoxIndex, 1);
|
|
|
}
|
|
|
+
|
|
|
let cg = this.calculateHighLimit(Height, JZXGD);
|
|
|
if (cg > 0) {
|
|
|
- let label = viewer.entities.add({
|
|
|
- id: "JZXG-" + SMID,
|
|
|
- //点
|
|
|
- position: Cesium.Cartesian3.fromDegrees(x, y, z + jcgd + 6),
|
|
|
- label: {
|
|
|
- text: "超高:" + cg + "米", //描述内容
|
|
|
- font: "14px", //字体大小 类型
|
|
|
- fillColor: new Cesium.Color(
|
|
|
- 255 / 255,
|
|
|
- 255 / 255,
|
|
|
- 255 / 255,
|
|
|
- 1
|
|
|
- ), //颜色
|
|
|
- outlineColor: Cesium.Color.GOLD,
|
|
|
- // style: Cesium.LabelStyle.CENTER_LABEL,
|
|
|
- // 垂直位置
|
|
|
- verticalOrigin: Cesium.VerticalOrigin.BUTTON,
|
|
|
- // 中心位置
|
|
|
- pixelOffset: new Cesium.Cartesian2(0, -10),
|
|
|
- //设置背景颜色透明
|
|
|
- backgroundColor: new Cesium.Color(
|
|
|
- 0 / 255,
|
|
|
- 0 / 255,
|
|
|
- 0 / 255,
|
|
|
- 0.6
|
|
|
- ),
|
|
|
- //打开背景 打开背景 (不会被线段覆盖)
|
|
|
- showBackground: true,
|
|
|
- heightReference: Cesium.HeightReference.NONE,
|
|
|
- },
|
|
|
+ debugger;
|
|
|
+
|
|
|
+ let dom = document.createElement("div");
|
|
|
+ dom.id = "JZXG-" + SMID;
|
|
|
+ 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 = "超高:" + cg + "米";
|
|
|
+ dom.appendChild(domContent);
|
|
|
+
|
|
|
+ var 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(x, y, z + jcgd + 3),
|
|
|
});
|
|
|
+
|
|
|
+ popupBox.show();
|
|
|
+ popupBoxs.push(popupBox);
|
|
|
+
|
|
|
+ // let label = viewer.entities.add({
|
|
|
+ // id: "JZXG-" + SMID,
|
|
|
+ // //点
|
|
|
+ // position: Cesium.Cartesian3.fromDegrees(x, y, z + jcgd + 6),
|
|
|
+ // label: {
|
|
|
+ // text: "超高:" + cg + "米", //描述内容
|
|
|
+ // font: "14px", //字体大小 类型
|
|
|
+ // fillColor: new Cesium.Color(
|
|
|
+ // 255 / 255,
|
|
|
+ // 255 / 255,
|
|
|
+ // 255 / 255,
|
|
|
+ // 1
|
|
|
+ // ), //颜色
|
|
|
+ // // outlineColor: Cesium.Color.GOLD,
|
|
|
+ // // // style: Cesium.LabelStyle.CENTER_LABEL,
|
|
|
+ // // // 垂直位置
|
|
|
+ // // verticalOrigin: Cesium.VerticalOrigin.BUTTON,
|
|
|
+ // // // 中心位置
|
|
|
+ // // pixelOffset: new Cesium.Cartesian2(0, -10),
|
|
|
+ // //设置背景颜色透明
|
|
|
+ // backgroundColor: new Cesium.Color(
|
|
|
+ // 0 / 255,
|
|
|
+ // 0 / 255,
|
|
|
+ // 0 / 255,
|
|
|
+ // 0.6
|
|
|
+ // ),
|
|
|
+ // //打开背景 打开背景 (不会被线段覆盖)
|
|
|
+ // // showBackground: true,
|
|
|
+ // heightReference: Cesium.HeightReference.NONE,
|
|
|
+ // },
|
|
|
+ // });
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -2175,7 +2357,8 @@ export default {
|
|
|
//右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
|
|
|
let left = w - 340 + 340 / 2;
|
|
|
let top = 340 / 2 + 60;
|
|
|
- this.XGFXInfolayerid = this.$layer.iframe({
|
|
|
+ this.$layer.iframe({
|
|
|
+ id: "BJTC",
|
|
|
content: {
|
|
|
content: clipboxByEditor, //传递的组件对象
|
|
|
parent: this, //当前的vue对象
|
|
@@ -2754,9 +2937,9 @@ export default {
|
|
|
Minfo,
|
|
|
isJSPark
|
|
|
);
|
|
|
- if (that.skylineAnalysislayerid) {
|
|
|
- that.$layer.close(that.skylineAnalysislayerid);
|
|
|
- }
|
|
|
+ // if (that.skylineAnalysislayerid) {
|
|
|
+ // that.$layer.close(that.skylineAnalysislayerid);
|
|
|
+ // }
|
|
|
let w = document.body.offsetWidth;
|
|
|
//左上角(left=弹窗宽/2;top=弹窗高/2+header高)
|
|
|
//右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
|
|
@@ -2765,7 +2948,9 @@ export default {
|
|
|
else fontSize = parseInt(fontSize.replace("px", ""));
|
|
|
let left = w - 400;
|
|
|
let top = 550 / 2 + 60;
|
|
|
- that.skylineAnalysislayerid = that.$layer.iframe({
|
|
|
+ // that.skylineAnalysislayerid =
|
|
|
+ that.$layer.iframe({
|
|
|
+ id: "BJTC",
|
|
|
content: {
|
|
|
content: parkResult, //传递的组件对象
|
|
|
parent: that, //当前的vue对象
|
|
@@ -2819,7 +3004,7 @@ export default {
|
|
|
let left = w - 430 + 430 / 2;
|
|
|
let top = 430 / 2 + 60;
|
|
|
that.$layer.iframe({
|
|
|
- id: "LTLS",
|
|
|
+ id: "BJTC",
|
|
|
content: {
|
|
|
content: BuildingStretchingAnalysis, //传递的组件对象
|
|
|
parent: that, //当前的vue对象
|
|
@@ -2842,7 +3027,12 @@ export default {
|
|
|
// 删除限高
|
|
|
removeHighLimit() {
|
|
|
viewer.entities.removeById("polygonA");
|
|
|
- viewer.entities.removeById("JZXGD-A");
|
|
|
+ // viewer.entities.removeById("JZXGD-A");
|
|
|
+ var BoxIndex = popupBoxs.findIndex((c) => c.element.id == "JZXGD-A");
|
|
|
+ if (BoxIndex > -1) {
|
|
|
+ popupBoxs[BoxIndex].destroy();
|
|
|
+ popupBoxs.splice(BoxIndex, 1);
|
|
|
+ }
|
|
|
|
|
|
this.layerList.forEach((layerName) => {
|
|
|
var hyp = new Cesium.HypsometricSetting();
|
|
@@ -2854,10 +3044,14 @@ export default {
|
|
|
Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL,
|
|
|
};
|
|
|
});
|
|
|
- this.layerDataList.forEach((element) => {
|
|
|
- let SMID = element.data.find((c) => c.label == "SMID").value;
|
|
|
- viewer.entities.removeById("JZXG-" + SMID);
|
|
|
- });
|
|
|
+
|
|
|
+ for (let index = popupBoxs.length - 1; index >= 0; index--) {
|
|
|
+ const popupBox = popupBoxs[index];
|
|
|
+ if (popupBox.element.id.includes("JZXG-")) {
|
|
|
+ popupBox.destroy();
|
|
|
+ popupBoxs.splice(index, 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
//取消左键事件
|
|
|
removeEventHandler() {
|
|
@@ -2987,9 +3181,6 @@ export default {
|
|
|
* @param DKBM [] 要分析的地块编码
|
|
|
*/
|
|
|
openXGFXInfo(layerDataList, JZXGD, DKBM) {
|
|
|
- if (this.XGFXInfolayerid) {
|
|
|
- this.$layer.close(this.XGFXInfolayerid);
|
|
|
- }
|
|
|
let that = this;
|
|
|
let w = document.body.offsetWidth;
|
|
|
let h = document.body.offsetHeight;
|
|
@@ -2997,7 +3188,8 @@ export default {
|
|
|
//右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
|
|
|
let left = w - 430 + 430 / 2;
|
|
|
let top = 430 / 2 + 60;
|
|
|
- this.XGFXInfolayerid = this.$layer.iframe({
|
|
|
+ this.$layer.iframe({
|
|
|
+ id: "BJTC",
|
|
|
content: {
|
|
|
content: HighLimitAnalysis, //传递的组件对象
|
|
|
parent: this, //当前的vue对象
|
|
@@ -3023,9 +3215,6 @@ export default {
|
|
|
* @param DKBM 地块编码
|
|
|
*/
|
|
|
openJZXGInfo(layerDataList, JZTXlayerDataList, Minfo, DKBM) {
|
|
|
- if (this.JZXGInfolayerid) {
|
|
|
- this.$layer.close(this.JZXGInfolayerid);
|
|
|
- }
|
|
|
let that = this;
|
|
|
let w = document.body.offsetWidth;
|
|
|
let h = document.body.offsetHeight;
|
|
@@ -3033,7 +3222,8 @@ export default {
|
|
|
//右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
|
|
|
let left = w - 430 + 430 / 2;
|
|
|
let top = 430 / 2 + 60;
|
|
|
- this.JZXGInfolayerid = this.$layer.iframe({
|
|
|
+ this.$layer.iframe({
|
|
|
+ id: "BJTC",
|
|
|
content: {
|
|
|
content: backLineAnalysisinfo, //传递的组件对象
|
|
|
parent: this, //当前的vue对象
|
|
@@ -3062,9 +3252,6 @@ export default {
|
|
|
* @param DLTBlayerDataList 地类图斑信息
|
|
|
*/
|
|
|
openDLTBInfo(LandPlanningList, DLTBlayerDataList, Minfo) {
|
|
|
- if (this.DLTBInfolayerid) {
|
|
|
- this.$layer.close(this.DLTBInfolayerid);
|
|
|
- }
|
|
|
let that = this;
|
|
|
let w = document.body.offsetWidth;
|
|
|
let h = document.body.offsetHeight;
|
|
@@ -3072,7 +3259,8 @@ export default {
|
|
|
//右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
|
|
|
let left = w - 430 + 430 / 2;
|
|
|
let top = 430 / 2 + 60;
|
|
|
- this.DLTBInfolayerid = this.$layer.iframe({
|
|
|
+ this.$layer.iframe({
|
|
|
+ id: "BJTC",
|
|
|
content: {
|
|
|
content: ZYAnalysisinfo, //传递的组件对象
|
|
|
parent: this, //当前的vue对象
|
|
@@ -3111,7 +3299,7 @@ export default {
|
|
|
let left = w - wpx + wpx / 2;
|
|
|
let top = hpx / 2 + 60;
|
|
|
this.$layer.iframe({
|
|
|
- id: "ZBFXJGiframe",
|
|
|
+ id: "BJTC",
|
|
|
content: {
|
|
|
content: ZBFXAnalysisinfo, //传递的组件对象
|
|
|
parent: this, //当前的vue对象
|
|
@@ -3191,7 +3379,7 @@ export default {
|
|
|
let left = w - 430 + 430 / 2;
|
|
|
let top = 430 / 2 + 60;
|
|
|
this.$layer.iframe({
|
|
|
- id: "JZFM",
|
|
|
+ id: "BJTC",
|
|
|
content: {
|
|
|
content: ArchitecturaAnalysis, //传递的组件对象
|
|
|
parent: this, //当前的vue对象
|
|
@@ -3218,7 +3406,7 @@ export default {
|
|
|
let left = w - 430 + 430 / 2;
|
|
|
let top = 100 / 2 + 300;
|
|
|
this.$layer.iframe({
|
|
|
- id: "RSFX",
|
|
|
+ id: "BJTC",
|
|
|
content: {
|
|
|
content: RSAnalysis, //传递的组件对象
|
|
|
parent: this, //当前的vue对象
|
|
@@ -3286,6 +3474,7 @@ export default {
|
|
|
this.removeJZTXlayerDatas();
|
|
|
this.removeDLTBlayerDatas();
|
|
|
ghqk.removeAll();
|
|
|
+ this.$layer.close("BJTC");
|
|
|
},
|
|
|
DestroyAll() {
|
|
|
scene.multiViewportMode = Cesium.MultiViewportMode.NONE;
|