|
@@ -133,7 +133,7 @@
|
|
|
style="position: absolute; right: -30px; top: -12px"
|
|
|
></el-button
|
|
|
></span>
|
|
|
- <span style="position:absolute;right: -80px; top: -9px">
|
|
|
+ <span style="position: absolute; right: -80px; top: -9px">
|
|
|
<el-button
|
|
|
v-if="node.parent.label === '我的模型'"
|
|
|
size="small"
|
|
@@ -292,6 +292,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ uploadBaseUrl: "/dms",
|
|
|
classTextToIndex: {},
|
|
|
addressInput: "",
|
|
|
legendShow: false,
|
|
@@ -364,7 +365,7 @@ export default {
|
|
|
uploadDataArr: {
|
|
|
handler(val) {
|
|
|
if (val.length > 0) {
|
|
|
- console.log(val, "uploadDataIdArr");
|
|
|
+ // console.log(val, "uploadDataIdArr");
|
|
|
}
|
|
|
},
|
|
|
immediate: true,
|
|
@@ -375,7 +376,7 @@ export default {
|
|
|
handler(val) {
|
|
|
this.$nextTick(() => {
|
|
|
if (treeIdMap.has(val)) {
|
|
|
- console.log(val, "678");
|
|
|
+ // console.log(val, "678");
|
|
|
// 设置默认勾选项
|
|
|
this.$refs.tree.setCheckedKeys([treeIdMap.get(val)]);
|
|
|
}
|
|
@@ -397,12 +398,9 @@ export default {
|
|
|
filterText(val) {
|
|
|
this.$refs.tree.filter(val);
|
|
|
},
|
|
|
- myModel(val) {
|
|
|
- // console.log(val, "监听综合分析中的我的模型");
|
|
|
- },
|
|
|
getCustomModel: {
|
|
|
handler(val) {
|
|
|
- console.log(val, "目前存在的自定义模型");
|
|
|
+ // console.log(val, "目前存在的自定义模型");
|
|
|
this.getMyModelData();
|
|
|
},
|
|
|
deep: true,
|
|
@@ -665,7 +663,7 @@ export default {
|
|
|
.then((res) => {
|
|
|
// console.log(res, "判断是否有");
|
|
|
if (res.code === 200 && res.content.data.length > 0) {
|
|
|
- console.log(res.content.data, "我的模型 - 最终数据");
|
|
|
+ // console.log(res.content.data, "我的模型 - 最终数据");
|
|
|
let children = res.content.data.map((ele) => {
|
|
|
customModelIdMap.set(ele.title, {
|
|
|
column_id: ele.column_id,
|
|
@@ -687,7 +685,7 @@ export default {
|
|
|
if (this.modelData.length > 0) {
|
|
|
this.modelData.forEach((ele) => {
|
|
|
if (ele.label == "我的模型") {
|
|
|
- console.log(ele, "我的模型");
|
|
|
+ // console.log(ele, "我的模型");
|
|
|
ele.children = children;
|
|
|
}
|
|
|
});
|
|
@@ -787,7 +785,7 @@ export default {
|
|
|
this.$bus.$emit("updateModel", node);
|
|
|
},
|
|
|
handleDelete(node) {
|
|
|
- console.log(node, "删除节点");
|
|
|
+ // console.log(node, "删除节点");
|
|
|
let deleteParams = {
|
|
|
id: customModelIdMap.get(node.data.label).id,
|
|
|
columnId: 89,
|
|
@@ -811,8 +809,9 @@ export default {
|
|
|
handleCheckChange(data, checked) {
|
|
|
if (data.mainType && data.mainType !== "我的模型") {
|
|
|
if (checked) {
|
|
|
- console.log(data, "选中的数据");
|
|
|
+ // console.log(data, "选中的数据");
|
|
|
this.showRightBox = true;
|
|
|
+ // 第一级菜单是所有图层
|
|
|
if (data.mainType === "所有图层") {
|
|
|
this.rightPanelTitle = data.label;
|
|
|
this.originalData[`${data.label}_${data.town}`] =
|
|
@@ -857,7 +856,7 @@ export default {
|
|
|
page: 0,
|
|
|
search: JSON.stringify(searchParam),
|
|
|
};
|
|
|
- console.log(params, "所有图层不显示");
|
|
|
+ // console.log(params, "所有图层不显示");
|
|
|
|
|
|
this.$Post(this.urlsCollection.selectContentList, params).then(
|
|
|
(res) => {
|
|
@@ -870,8 +869,8 @@ export default {
|
|
|
|
|
|
if (res.code === 200 && res.content.data.length > 0) {
|
|
|
layerAuthorityMap.set(data.id, "有权限");
|
|
|
- console.log("有权限");
|
|
|
- console.log(data, "有权限的图层");
|
|
|
+ // console.log("有权限");
|
|
|
+ // console.log(data, "有权限的图层");
|
|
|
this.$store.state.treeDataCollection.set(data.id, {
|
|
|
mainType: data.mainType,
|
|
|
town: data.town,
|
|
@@ -890,7 +889,7 @@ export default {
|
|
|
layerParams
|
|
|
).then((res) => {
|
|
|
if (res.code === 200 && res.content.data.length > 0) {
|
|
|
- console.log(res.content, "获取到的数据");
|
|
|
+ // console.log(res.content, "获取到的数据");
|
|
|
let uniqueId = `${data.label}_${data.town}`;
|
|
|
this.originalData[uniqueId] = res.content.data.map(
|
|
|
(ele) => {
|
|
@@ -928,7 +927,7 @@ export default {
|
|
|
}
|
|
|
);
|
|
|
}
|
|
|
-
|
|
|
+ // 第一级菜单是预设模型
|
|
|
if (data.mainType === "预设模型") {
|
|
|
layerAuthorityMap.set(data.id, "有权限");
|
|
|
this.rightPanelTitle = `${data.label}(${data.mainType})`;
|
|
@@ -943,7 +942,7 @@ export default {
|
|
|
this.$Post(this.urlsCollection.selectContentList, params).then(
|
|
|
(res) => {
|
|
|
if (res.code === 200 && res.content.data.length > 0) {
|
|
|
- console.log(res.content.data, "点击预设模型后获取到的数据");
|
|
|
+ // console.log(res.content.data, "点击预设模型后获取到的数据");
|
|
|
this.$store.state.treeDataCollection.set(data.id, {
|
|
|
mainType: data.mainType,
|
|
|
});
|
|
@@ -956,7 +955,6 @@ export default {
|
|
|
this.layerIdMap.set(data.id, `${cid}_polygon`);
|
|
|
// 激活当前展开面板
|
|
|
this.activeNames = ["myLabel", data.id];
|
|
|
- console.log(this.randomColor.get(uniqueId), "check color");
|
|
|
this.$store.state.mapMethodsCollection
|
|
|
.get("RENDER")
|
|
|
.addSinglePolygon(
|
|
@@ -983,16 +981,12 @@ export default {
|
|
|
this.layerIdMap.delete(data.id);
|
|
|
//关联自定义模型
|
|
|
this.$store.state.treeDataCollection.delete(data.id);
|
|
|
- console.log(
|
|
|
- this.$store.state.treeDataCollection,
|
|
|
- "treeDataCollection"
|
|
|
- );
|
|
|
|
|
|
// 只激活我的标记
|
|
|
this.activeNames = ["myLabel"];
|
|
|
|
|
|
for (let key in map2DViewer.polygons) {
|
|
|
- console.log(key, "现在的面数据");
|
|
|
+ // console.log(key, "现在的面数据");
|
|
|
if (key.indexOf(data.label) > -1) {
|
|
|
this.$store.state.mapMethodsCollection
|
|
|
.get("RENDER")
|
|
@@ -1004,32 +998,69 @@ export default {
|
|
|
this.legendTitle = Object.keys(this.originalData).map((v) => {
|
|
|
return { name: v, info: v };
|
|
|
});
|
|
|
- // console.log(this.legendTitle, "legendTitle");
|
|
|
this.legendIcon = this.legendTitle.map((c) => {
|
|
|
let a = this.randomColor.get(c.name);
|
|
|
- // console.log(a, "a");
|
|
|
+
|
|
|
return {
|
|
|
background: "transparent",
|
|
|
border: `1px solid ${this.randomColor.get(c.name)}`,
|
|
|
};
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ // 第一级菜单是我的模型
|
|
|
+ if (data.mainType && data.mainType === "我的模型") {
|
|
|
+ // 显示叠置分析的数据
|
|
|
+ checked ? this.displayOverlayData(data) : this.deleteOverlayData(data);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ displayOverlayData(data) {
|
|
|
+ if (data.c_dzfx_file) {
|
|
|
+ // this.uploadBaseUrl + data.c_dzfx_file
|
|
|
+ // 测试数据
|
|
|
+ this.$Get("./static/json/test.json", "").then((response) => {
|
|
|
+ if (response.features.length > 0) {
|
|
|
+ response.features.forEach((v) => {
|
|
|
+ let geojson = publicFun.standardGeojson(v.geometry.coordinates);
|
|
|
+ // console.log(geojson, "geojson")
|
|
|
+ this.readGeojson(geojson, data.id);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // if (res.features.length > 0) {
|
|
|
+ // res.features.forEach((v) => {
|
|
|
+ // let geojson = publicFun.standardGeojson(v.geometry.coordinates);
|
|
|
+ // this.readGeojson(geojson);
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ readGeojson(geojson, id) {
|
|
|
+ map2DViewer.overlay[id] = [];
|
|
|
+ let states = [];
|
|
|
+ states.push(geojson);
|
|
|
+ let geojsonData = L.geoJSON(states, {
|
|
|
+ style: function (feature) {
|
|
|
+ // console.log(feature);
|
|
|
+ },
|
|
|
+ }).addTo(map2DViewer.map);
|
|
|
+ map2DViewer.overlay[id] = geojsonData;
|
|
|
+ },
|
|
|
+ deleteOverlayData(data) {
|
|
|
+ if (map2DViewer.overlay[data.id]) {
|
|
|
+ map2DViewer.map.removeLayer(map2DViewer.overlay[data.id]);
|
|
|
+ }
|
|
|
},
|
|
|
// 右侧面板项点击事件
|
|
|
listItemClick(type, data) {
|
|
|
- console.log(type, "type");
|
|
|
this.$store.state.bottomMenuIndexs.index = -1;
|
|
|
this.$store.state.bottomMenuIndexs.subIndex = -1;
|
|
|
this.updateCasePopupShow = false;
|
|
|
this.tableData = [];
|
|
|
if (type === "default") {
|
|
|
- console.log(data, "右侧面板需要显示的详细数据");
|
|
|
- // let coord = data.geometry.coordinates[0][0][0];
|
|
|
- // this.$store.state.mapMethodsCollection.get("RENDER").setView(coord, 16);
|
|
|
this.tableType = "normal";
|
|
|
this.boxWidth = "600";
|
|
|
this.boxHeight = "200";
|
|
|
- console.log(data, "defaultTable");
|
|
|
this.tableData.push({
|
|
|
nature: data.nature,
|
|
|
area: data.area,
|
|
@@ -1097,7 +1128,7 @@ export default {
|
|
|
this.$Post(this.urlsCollection.updateConllection, params).then(
|
|
|
(res) => {
|
|
|
if (res.code === 200) {
|
|
|
- console.log("修改成功", res);
|
|
|
+ // console.log("修改成功", res);
|
|
|
this.updateCasePopupShow = false;
|
|
|
this.getUserMarkers();
|
|
|
}
|
|
@@ -1111,14 +1142,14 @@ export default {
|
|
|
},
|
|
|
// 修改标记 -- 仅支持修改类型和描述
|
|
|
updateLabel(val) {
|
|
|
- console.log("修改标记", val);
|
|
|
+ // console.log("修改标记", val);
|
|
|
this.$store.state.bottomMenuIndexs.index = -1;
|
|
|
this.$store.state.bottomMenuIndexs.subIndex = -1;
|
|
|
this.updateCasePopupShow = true;
|
|
|
this.attrTableShow = false;
|
|
|
if (this.updateCasePopupShow) {
|
|
|
this.$nextTick(() => {
|
|
|
- console.log(this.$refs.updateLabelRef, "updateLabelRef");
|
|
|
+ // console.log(this.$refs.updateLabelRef, "updateLabelRef");
|
|
|
this.$refs.updateLabelRef.selectVal = val.type;
|
|
|
this.$refs.updateLabelRef.textContent = val.des;
|
|
|
this.$refs.updateLabelRef.id = val.id;
|
|
@@ -1129,7 +1160,7 @@ export default {
|
|
|
// 删除标记
|
|
|
deleteLabel(id) {
|
|
|
if (localStorage.getItem("USER_ID")) {
|
|
|
- console.log("删除标记");
|
|
|
+ // console.log("删除标记");
|
|
|
let params = new FormData();
|
|
|
this.$store.state.mapMethodsCollection
|
|
|
.get("RENDER")
|
|
@@ -1144,7 +1175,7 @@ export default {
|
|
|
this.$Post(this.urlsCollection.deleteConllection, params).then(
|
|
|
(res) => {
|
|
|
if (res.code === 200) {
|
|
|
- console.log("疑点删除成功");
|
|
|
+ // console.log("疑点删除成功");
|
|
|
this.getUserMarkers();
|
|
|
}
|
|
|
}
|
|
@@ -1177,7 +1208,7 @@ export default {
|
|
|
}
|
|
|
} else {
|
|
|
// 未绘制几何体
|
|
|
- console.log(val, "未绘制几何体");
|
|
|
+ // console.log(val, "未绘制几何体");
|
|
|
if (val.geometryChecked) {
|
|
|
let geoType = JSON.parse(val.geojson).properties.featureType;
|
|
|
this.$store.state.mapMethodsCollection
|