|
@@ -306,7 +306,7 @@
|
|
|
>
|
|
|
<template slot="title">
|
|
|
<div class="status-select" @mouseenter="panelMouseEnter(key)">
|
|
|
- <div class="title">{{ key }}</div>
|
|
|
+ <el-tooltip effect="light" :content="key" placement="bottom-start"><div class="title">{{ key }}</div></el-tooltip>
|
|
|
<NewSelect
|
|
|
v-if="isSortCaseObj[key] === '预设模型'"
|
|
|
style="width: 100px"
|
|
@@ -324,7 +324,7 @@
|
|
|
:key="v.id"
|
|
|
@dblclick="locateCase(v)"
|
|
|
>
|
|
|
- <div>
|
|
|
+ <div class="title-section">
|
|
|
{{
|
|
|
v.title +
|
|
|
"_" +
|
|
@@ -392,7 +392,7 @@
|
|
|
v-for="(item, index) in rightLabelData"
|
|
|
:key="item.id"
|
|
|
>
|
|
|
- <div @click="listItemClick('new', item)">
|
|
|
+ <div class="title-section" @click="listItemClick('new', item)">
|
|
|
{{ item.name ? item.name : `疑点${index}` }}
|
|
|
</div>
|
|
|
<span class="operation-icon"
|
|
@@ -433,6 +433,7 @@ import publicFun from "@/utils/publicFunction.js";
|
|
|
import AttributePopup from "@/components/popup/AttributePopup.vue";
|
|
|
import LabelCasePopup from "@/components/popup/LabelCasePopup.vue";
|
|
|
import LawPopup from "@/components/popup/LawPopup.vue";
|
|
|
+import coordinate from "@/utils/coordinate";
|
|
|
export default {
|
|
|
name: "ComprehensiveAnalysis",
|
|
|
components: {
|
|
@@ -446,6 +447,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ uploadNodeChildren: [],
|
|
|
// 判断是否显示疑点筛选弹窗
|
|
|
isSortCaseObj: {},
|
|
|
// 存储图层构成信息
|
|
@@ -560,14 +562,7 @@ export default {
|
|
|
let panelId = this.enteredPanelId;
|
|
|
let mainType = this.enteredMainType;
|
|
|
let sourceType = this.enteredSourceType;
|
|
|
- this.changeSingleLayer(
|
|
|
- val,
|
|
|
- currentPageSize,
|
|
|
- columnId,
|
|
|
- panelId,
|
|
|
- mainType,
|
|
|
- sourceType
|
|
|
- );
|
|
|
+ this.changeSingleLayer(val, currentPageSize, panelId);
|
|
|
},
|
|
|
handleSizeChange: (val) => {
|
|
|
this.handleSizeChange(val);
|
|
@@ -831,23 +826,31 @@ export default {
|
|
|
this.$bus.$off("addUploadLayerEvent");
|
|
|
this.$bus.$on("addUploadLayerEvent", (data) => {
|
|
|
if (this.$refs.tree) {
|
|
|
- let children = [
|
|
|
- {
|
|
|
+ if (this.uploadNodeChildren.length > 0) {
|
|
|
+ this.uploadNodeChildren.forEach((v) => {
|
|
|
+ this.handleCheckChange(v, false);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ let obj = {
|
|
|
id: data.id,
|
|
|
label: data.label,
|
|
|
mainType: "我的图层",
|
|
|
+ data: data.data,
|
|
|
children: [],
|
|
|
- },
|
|
|
- ];
|
|
|
- this.$refs.tree.updateKeyChildren(
|
|
|
- this.firstLevelIdMap.get("我的图层").id,
|
|
|
- children
|
|
|
- );
|
|
|
- this.expandedKeys.push(this.firstLevelIdMap.get("我的图层").id);
|
|
|
- this.$refs.tree.setCheckedKeys([data.id]);
|
|
|
- this.$refs.tree.setCurrentKey(data.id);
|
|
|
- let nodeData = this.$refs.tree.getCurrentNode();
|
|
|
- this.handleCheckChange(nodeData, true);
|
|
|
+ };
|
|
|
+ this.uploadNodeChildren.push(obj);
|
|
|
+ this.$refs.tree.updateKeyChildren(
|
|
|
+ this.firstLevelIdMap.get("我的图层").id,
|
|
|
+ this.uploadNodeChildren
|
|
|
+ );
|
|
|
+ this.expandedKeys.push(this.firstLevelIdMap.get("我的图层").id);
|
|
|
+ this.$refs.tree.setCheckedKeys([data.id]);
|
|
|
+ this.$refs.tree.setCurrentKey(data.id);
|
|
|
+ // let nodeData = this.$refs.tree.getCurrentNode();
|
|
|
+ this.handleCheckChange(obj, true);
|
|
|
+ }, 1000);
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -909,6 +912,7 @@ export default {
|
|
|
this.$bus.$off("openMyTask");
|
|
|
this.$bus.$off("openMyView");
|
|
|
this.$bus.$off("caseAuditEvent2");
|
|
|
+ this.$bus.$off("addUploadLayerEvent");
|
|
|
},
|
|
|
methods: {
|
|
|
/**
|
|
@@ -943,6 +947,46 @@ export default {
|
|
|
return JSON.stringify(targetGeometry);
|
|
|
}
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 上海2000高斯投影坐标转上海2000经纬度坐标
|
|
|
+ */
|
|
|
+ latLngsTransform(latlngsAry) {
|
|
|
+ // 深拷贝
|
|
|
+ let tempLatlngsAry = JSON.parse(JSON.stringify(latlngsAry));
|
|
|
+ if (typeof tempLatlngsAry[0] === "number") {
|
|
|
+ if (tempLatlngsAry.length < 3 && tempLatlngsAry.length > 0) {
|
|
|
+ tempLatlngsAry = coordinate.shcj_to_wgs84(
|
|
|
+ tempLatlngsAry[0],
|
|
|
+ tempLatlngsAry[1]
|
|
|
+ );
|
|
|
+ tempLatlngsAry = [
|
|
|
+ tempLatlngsAry[0] - 0.19195,
|
|
|
+ tempLatlngsAry[1] + 0.00011,
|
|
|
+ ];
|
|
|
+
|
|
|
+ return tempLatlngsAry;
|
|
|
+ }
|
|
|
+ if (tempLatlngsAry.length === 3) {
|
|
|
+ tempLatlngsAry = coordinate.shcj_to_wgs84(
|
|
|
+ tempLatlngsAry[0],
|
|
|
+ tempLatlngsAry[1]
|
|
|
+ );
|
|
|
+ tempLatlngsAry = [
|
|
|
+ tempLatlngsAry[0] - 0.19195,
|
|
|
+ tempLatlngsAry[1] + 0.00011,
|
|
|
+ ];
|
|
|
+ return tempLatlngsAry;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (var i = 0, l = tempLatlngsAry.length; i < l; i++) {
|
|
|
+ tempLatlngsAry[i] = this.latLngsTransform(tempLatlngsAry[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return tempLatlngsAry;
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 叠置分析数据标准化
|
|
|
+ */
|
|
|
overlayStandardGeojson(data) {
|
|
|
if (data) {
|
|
|
let geojson = {
|
|
@@ -1058,14 +1102,7 @@ export default {
|
|
|
]);
|
|
|
break;
|
|
|
}
|
|
|
- this.changeSingleLayer(
|
|
|
- 1,
|
|
|
- this.currentPageSize,
|
|
|
- this.enteredColumnId,
|
|
|
- this.enteredPanelId,
|
|
|
- this.enteredMainType,
|
|
|
- this.enteredSourceType
|
|
|
- );
|
|
|
+ this.changeSingleLayer(1, this.currentPageSize, this.enteredPanelId);
|
|
|
}
|
|
|
},
|
|
|
// 得到底部菜单疑点审计开启状态
|
|
@@ -1211,12 +1248,86 @@ export default {
|
|
|
this.changeSingleLayer(
|
|
|
this.currentPage,
|
|
|
this.currentPageSize,
|
|
|
- this.enteredColumnId,
|
|
|
- this.enteredPanelId,
|
|
|
- this.enteredMainType,
|
|
|
- this.enteredColumnId
|
|
|
+ this.enteredPanelId
|
|
|
);
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 渲染上传的疑点数据
|
|
|
+ * 1. 根据unique更新我的图层节点;
|
|
|
+ * 2. 默认打开该图层;
|
|
|
+ * 3. 显示疑点数目,属性数据,分页数据等信息
|
|
|
+ */
|
|
|
+ renderUploadedData(data) {
|
|
|
+ let uniqueId = data.id;
|
|
|
+ this.layerIdMap.set(uniqueId, uniqueId);
|
|
|
+ // 图层未初始化
|
|
|
+ if (!map2DViewer.analysisGroups[uniqueId]) {
|
|
|
+ // 生成图例时设置初始图层颜色
|
|
|
+ this.setLayerLegend(uniqueId, uniqueId);
|
|
|
+ map2DViewer.analysisGroups[uniqueId] = L.featureGroup();
|
|
|
+ map2DViewer.analysisGroups[uniqueId].addTo(map2DViewer.map);
|
|
|
+ if (!this.$store.state.selectSelectDataMap["singlePolygon"]) {
|
|
|
+ this.$store.state.selectSelectDataMap["singlePolygon"] = [];
|
|
|
+ }
|
|
|
+
|
|
|
+ let caseArr = JSON.parse(data.data).map((ele) => {
|
|
|
+ // 坐标转换
|
|
|
+ let coordinates = ele.geometry.coordinates;
|
|
|
+ if (coordinates.length > 0) {
|
|
|
+ ele.geometry.coordinates = this.latLngsTransform(coordinates);
|
|
|
+
|
|
|
+ return {
|
|
|
+ id: publicFun.buildGuid(uniqueId),
|
|
|
+ c_boolean: "未标记",
|
|
|
+ title: data.label,
|
|
|
+ mainType: "我的图层",
|
|
|
+ c_content: JSON.stringify(ele),
|
|
|
+ };
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ if (!this.originalDataMap.has(uniqueId)) {
|
|
|
+ this.originalDataMap.set(uniqueId, caseArr);
|
|
|
+ }
|
|
|
+ // 该图层疑点总数
|
|
|
+ this.targetLayerTotal[uniqueId] = caseArr.length;
|
|
|
+ // 分页组件total
|
|
|
+ this.paginationData.total = caseArr.length;
|
|
|
+ this.currentTotal += caseArr.length;
|
|
|
+ console.log(caseArr, "即将渲染的上传图层数据");
|
|
|
+ caseArr.forEach((ele) => {
|
|
|
+ let cid = ele.id;
|
|
|
+ let geometry = this.addLayerDataSource(
|
|
|
+ ele.c_content,
|
|
|
+ ele.mainType,
|
|
|
+ data.label
|
|
|
+ );
|
|
|
+ let defaultStatus = ele.c_boolean;
|
|
|
+ let color = this.collectColorMap.get(this.collectColorMapIndex);
|
|
|
+ this.$store.state.mapMethodsCollection
|
|
|
+ .get("RENDER")
|
|
|
+ .addSinglePolygon(
|
|
|
+ geometry,
|
|
|
+ cid,
|
|
|
+ color,
|
|
|
+ uniqueId,
|
|
|
+ data.mainType,
|
|
|
+ "",
|
|
|
+ defaultStatus,
|
|
|
+ "",
|
|
|
+ ""
|
|
|
+ );
|
|
|
+ });
|
|
|
+
|
|
|
+ // 激活当前展开面板
|
|
|
+ this.activeNames = ["myLabel", uniqueId];
|
|
|
+ // 用于分页数据
|
|
|
+ this.originalData[uniqueId] = this.originalDataMap.get(uniqueId);
|
|
|
+ this.isSortCaseObj[uniqueId] = data.mainType;
|
|
|
+ // 进行分页列表展示
|
|
|
+ this.changeSingleLayer(1, this.currentPageSize, uniqueId);
|
|
|
+ }
|
|
|
+ },
|
|
|
getMapData(uniqueId, columnId, mainType, sourceType, layerName) {
|
|
|
let layerParams = new FormData();
|
|
|
layerParams = {
|
|
@@ -1348,8 +1459,6 @@ export default {
|
|
|
);
|
|
|
});
|
|
|
|
|
|
- // 所有数据均需要进行分页展示
|
|
|
-
|
|
|
// 激活当前展开面板
|
|
|
this.activeNames = ["myLabel", uniqueId];
|
|
|
// 用于分页数据
|
|
@@ -1357,14 +1466,7 @@ export default {
|
|
|
this.isSortCaseObj[uniqueId] = mainType;
|
|
|
|
|
|
// 进行分页列表展示
|
|
|
- this.changeSingleLayer(
|
|
|
- 1,
|
|
|
- this.currentPageSize,
|
|
|
- columnId,
|
|
|
- uniqueId,
|
|
|
- mainType,
|
|
|
- sourceType
|
|
|
- );
|
|
|
+ this.changeSingleLayer(1, this.currentPageSize, uniqueId);
|
|
|
|
|
|
// 当前图斑数小于数据库中的图斑总数时,递归请求图斑
|
|
|
if (
|
|
@@ -1414,12 +1516,11 @@ export default {
|
|
|
* 切换页时改变图层数据
|
|
|
* @val 当前页
|
|
|
* @currentPageSize 当前面板pageSize
|
|
|
- * @columnId
|
|
|
* @id label_columnId
|
|
|
* @mainType 所有图层/预设模型
|
|
|
* @sourceType 土地资源,水资源,林地资源,全部
|
|
|
*/
|
|
|
- changeSingleLayer(val, currentPageSize, columnId, id) {
|
|
|
+ changeSingleLayer(val, currentPageSize, id) {
|
|
|
let uniqueId = id;
|
|
|
if (map2DViewer.analysisGroups[uniqueId]) {
|
|
|
this.paginationData.currentPage = val;
|
|
@@ -1431,7 +1532,7 @@ export default {
|
|
|
);
|
|
|
|
|
|
// 激活当前展开面板
|
|
|
- this.activeNames = ["myLabel", uniqueId];
|
|
|
+ // this.activeNames = ["myLabel", uniqueId];
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -1799,7 +1900,6 @@ export default {
|
|
|
this.$bus.$emit("updateModel", node);
|
|
|
},
|
|
|
handleDelete(node) {
|
|
|
- // console.log(node, "删除节点");
|
|
|
let deleteParams = {
|
|
|
id: customModelIdMap.get(node.data.label).modelId,
|
|
|
columnId: 49,
|
|
@@ -1926,6 +2026,13 @@ export default {
|
|
|
data.label
|
|
|
);
|
|
|
}
|
|
|
+
|
|
|
+ // 第一级菜单是我的图层 -- 不请求接口
|
|
|
+ if (data.mainType === "我的图层") {
|
|
|
+ layerAuthorityMap.set(data.id, "有权限");
|
|
|
+ this.rightPanelTitle = data.label;
|
|
|
+ this.renderUploadedData(data);
|
|
|
+ }
|
|
|
} else {
|
|
|
if (
|
|
|
this.$store.state.selectSelectDataMap["singlePolygon"] &&
|
|
@@ -2182,12 +2289,7 @@ export default {
|
|
|
this.originalDataMap.get(uniqueId);
|
|
|
this.isSortCaseObj[uniqueId] = data.mainType;
|
|
|
// 进行分页列表展示
|
|
|
- this.changeSingleLayer(
|
|
|
- 1,
|
|
|
- this.currentPageSize,
|
|
|
- data.columnId,
|
|
|
- uniqueId
|
|
|
- );
|
|
|
+ this.changeSingleLayer(1, this.currentPageSize, uniqueId);
|
|
|
}
|
|
|
}
|
|
|
);
|
|
@@ -2205,7 +2307,6 @@ export default {
|
|
|
},
|
|
|
// 我的模型图层取消勾选
|
|
|
deleteMyModelData(data) {
|
|
|
- console.log(data.id);
|
|
|
// 直接删除图层组中的数据
|
|
|
if (map2DViewer.analysisGroups[data.id]) {
|
|
|
map2DViewer.map.removeLayer(map2DViewer.analysisGroups[data.id]);
|
|
@@ -2264,6 +2365,7 @@ export default {
|
|
|
delete map2DViewer.analysisGroups[data.id];
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
//显示详细信息
|
|
|
viewDetailsPopup(data) {
|
|
|
this.$store.state.bottomMenuIndexs.index = -1;
|
|
@@ -2289,7 +2391,7 @@ export default {
|
|
|
this.boxHeight = "600";
|
|
|
if (data.c_content) {
|
|
|
let obj = JSON.parse(data.c_content).properties;
|
|
|
-
|
|
|
+
|
|
|
this.tableData.push(obj);
|
|
|
}
|
|
|
}
|
|
@@ -2366,7 +2468,6 @@ export default {
|
|
|
this.$Post(this.urlsCollection.updateConllection, params).then(
|
|
|
(res) => {
|
|
|
if (res.code === 200) {
|
|
|
-
|
|
|
this.updateCasePopupShow = false;
|
|
|
this.getUserMarkers();
|
|
|
this.$message.success("修改成功!");
|
|
@@ -2382,7 +2483,6 @@ export default {
|
|
|
},
|
|
|
// 修改标记 -- 仅支持修改类型和描述
|
|
|
updateLabel(val) {
|
|
|
- // console.log("修改标记", val);
|
|
|
this.$store.state.bottomMenuIndexs.index = -1;
|
|
|
this.$store.state.bottomMenuIndexs.subIndex = -1;
|
|
|
this.updateCasePopupShow = true;
|
|
@@ -2401,7 +2501,6 @@ export default {
|
|
|
// 删除标记
|
|
|
deleteLabel(id) {
|
|
|
if (localStorage.getItem("USER_ID")) {
|
|
|
- // console.log("删除标记");
|
|
|
let params = new FormData();
|
|
|
this.$store.state.mapMethodsCollection
|
|
|
.get("RENDER")
|
|
@@ -3005,6 +3104,13 @@ export default {
|
|
|
border-right: 1px solid rgba(207, 222, 255, 0.2);
|
|
|
border-bottom: 1px solid rgba(207, 222, 255, 0.2);
|
|
|
cursor: pointer;
|
|
|
+ .title-section{
|
|
|
+ max-width: 160px;
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ font-size:14px;
|
|
|
+ }
|
|
|
.normal-icon {
|
|
|
position: absolute;
|
|
|
right: 20px;
|