|
@@ -29,7 +29,6 @@
|
|
|
</div>
|
|
|
<!-- 属性弹窗 -->
|
|
|
<AttributePopup
|
|
|
- v-drag
|
|
|
class="comprehensive-analysis-popup"
|
|
|
v-if="attrTableShow"
|
|
|
:boxWidth="boxWidth"
|
|
@@ -282,6 +281,8 @@ export default {
|
|
|
townOptions: [],
|
|
|
enteredPanelId: "",
|
|
|
enteredColumnId: "",
|
|
|
+ enteredMainType: "",
|
|
|
+ enteredSourceType: "",
|
|
|
uploadBaseUrl: "/dms",
|
|
|
classTextToIndex: {},
|
|
|
addressInput: "",
|
|
@@ -327,7 +328,9 @@ export default {
|
|
|
currentChange: (val) => {
|
|
|
let columnId = this.enteredColumnId;
|
|
|
let panelId = this.enteredPanelId;
|
|
|
- this.changeSingleLayer(columnId, panelId, val);
|
|
|
+ let mainType = this.enteredMainType;
|
|
|
+ let sourceType = this.enteredSourceType;
|
|
|
+ this.changeSingleLayer(val, columnId, panelId, mainType, sourceType);
|
|
|
},
|
|
|
handleSizeChange: (val) => {
|
|
|
this.handleSizeChange(val);
|
|
@@ -369,6 +372,52 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
watch: {
|
|
|
+ // 控制全选的显示或隐藏
|
|
|
+ labelAllVisibleChecked(val) {
|
|
|
+ if (this.rightLabelData.length > 0) {
|
|
|
+ this.rightLabelData.forEach((item) => {
|
|
|
+ this.controlLabel(item);
|
|
|
+ });
|
|
|
+ if (val) {
|
|
|
+ this.labelAllLocate();
|
|
|
+ }
|
|
|
+
|
|
|
+ // if (map2DViewer.groups["我的标记图层组"]) {
|
|
|
+ // map2DViewer.map.fitBounds(
|
|
|
+ // map2DViewer.groups["我的标记图层组"].getBounds()
|
|
|
+ // );
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "$store.state.navSelect": {
|
|
|
+ handler(val) {
|
|
|
+ if (val.index === "1" || val.index === "2") {
|
|
|
+ this.clearAllData();
|
|
|
+ this.labelAllVisibleChecked = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (val.index === "3") {
|
|
|
+ // 如果没有初始化设置
|
|
|
+ if (!map2DViewer.groups["我的标记图层组"]) {
|
|
|
+ this.getUserMarkers();
|
|
|
+ }
|
|
|
+ this.labelAllVisibleChecked = true;
|
|
|
+ // 进入该页面后监听地图移动事件
|
|
|
+ map2DViewer.map.on("move", (e) => {
|
|
|
+ if (!this.isLeftLock) {
|
|
|
+ this.showLeftBox = false;
|
|
|
+ this.leftBoxBtn = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!this.isRightLock) {
|
|
|
+ this.showRightBox = false;
|
|
|
+ this.rightBoxBtn = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ },
|
|
|
uploadDataArr: {
|
|
|
handler(val) {
|
|
|
if (val.length > 0) {
|
|
@@ -487,53 +536,56 @@ export default {
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
- //获取我的标记数据
|
|
|
- this.getUserMarkers();
|
|
|
- map2DViewer.map.on("move", (e) => {
|
|
|
- if (!this.isLeftLock) {
|
|
|
- this.showLeftBox = false;
|
|
|
- this.leftBoxBtn = true;
|
|
|
- }
|
|
|
+ // 获取我的标记数据
|
|
|
+ if (this.$store.state.navSelect.index === "3") {
|
|
|
+ this.getUserMarkers();
|
|
|
+ map2DViewer.map.on("move", (e) => {
|
|
|
+ if (!this.isLeftLock) {
|
|
|
+ this.showLeftBox = false;
|
|
|
+ this.leftBoxBtn = true;
|
|
|
+ }
|
|
|
|
|
|
- if (!this.isRightLock) {
|
|
|
- this.showRightBox = false;
|
|
|
- this.rightBoxBtn = true;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- beforeDestroy() {
|
|
|
- this.clearAllData();
|
|
|
+ if (!this.isRightLock) {
|
|
|
+ this.showRightBox = false;
|
|
|
+ this.rightBoxBtn = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ this.$bus.$off("viewDetailsPopup");
|
|
|
+ this.$bus.$on("viewDetailsPopup", (data) => {
|
|
|
+ this.viewDetailsPopup(data);
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
+ // beforeDestroy() {
|
|
|
+ // this.clearAllData();
|
|
|
+ // },
|
|
|
methods: {
|
|
|
// 清除页面所有数据
|
|
|
clearAllData() {
|
|
|
- treeIdMap.clear();
|
|
|
- uploadDataIdArr = [];
|
|
|
- this.treeCoordMap.clear();
|
|
|
+ // treeIdMap.clear();
|
|
|
+ // uploadDataIdArr = [];
|
|
|
+ // this.treeCoordMap.clear();
|
|
|
map2DViewer.map.off("move");
|
|
|
+ // 所有图层或预设模型全部删除
|
|
|
if (Object.getOwnPropertyNames(map2DViewer.analysisGroups).length > 0) {
|
|
|
for (let group in map2DViewer.analysisGroups) {
|
|
|
+ // 仅从地图上删除对应图层组
|
|
|
this.$store.state.mapMethodsCollection
|
|
|
.get("RENDER")
|
|
|
.deleteGroupFromMap(group);
|
|
|
map2DViewer.analysisGroups[group].remove();
|
|
|
}
|
|
|
+ this.$refs.tree.setCheckedKeys([]);
|
|
|
}
|
|
|
|
|
|
- if (Object.getOwnPropertyNames(map2DViewer.myLabels).length > 0) {
|
|
|
- for (let label in map2DViewer.myLabels) {
|
|
|
- this.$store.state.mapMethodsCollection
|
|
|
- .get("RENDER")
|
|
|
- .deleteGeometry(map2DViewer.myLabels[label]);
|
|
|
- }
|
|
|
- }
|
|
|
map2DViewer.analysisGroups = {};
|
|
|
map2DViewer.polygons = {};
|
|
|
- map2DViewer.myLabels = {};
|
|
|
this.attrTableShow = false;
|
|
|
this.updateCasePopupShow = false;
|
|
|
map2DViewer.map.closePopup();
|
|
|
},
|
|
|
+
|
|
|
labelAllLocate() {
|
|
|
if (map2DViewer.groups["我的标记图层组"]) {
|
|
|
map2DViewer.map.fitBounds(
|
|
@@ -543,41 +595,36 @@ export default {
|
|
|
},
|
|
|
labelAllVisible() {
|
|
|
this.labelAllVisibleChecked = !this.labelAllVisibleChecked;
|
|
|
- console.log("labelAllVisible");
|
|
|
- if (this.rightLabelData.length > 0) {
|
|
|
- this.rightLabelData.forEach((item) => {
|
|
|
- this.controlLabel(item);
|
|
|
- });
|
|
|
- if (map2DViewer.groups["我的标记图层组"]) {
|
|
|
- map2DViewer.map.fitBounds(
|
|
|
- map2DViewer.groups["我的标记图层组"].getBounds()
|
|
|
- );
|
|
|
- }
|
|
|
- }
|
|
|
},
|
|
|
mouseenter(val) {
|
|
|
if (this.rightPanelDataMap.has(val)) {
|
|
|
// 方便获取
|
|
|
this.enteredPanelId = val;
|
|
|
- this.enteredColumnId = this.rightPanelDataMap.get(val);
|
|
|
- // console.log("当前的columnId", this.enteredColumnId);
|
|
|
+ this.enteredColumnId = this.rightPanelDataMap.get(val).id;
|
|
|
+ this.enteredMainType = this.rightPanelDataMap.get(val).mainType;
|
|
|
+ this.enteredSourceType = this.rightPanelDataMap.get(val).sourceType;
|
|
|
}
|
|
|
},
|
|
|
handleSizeChange(val) {
|
|
|
console.log(`每页 ${val} 条`);
|
|
|
this.currentPageSize = val;
|
|
|
this.changeSingleLayer(
|
|
|
+ this.currentPage,
|
|
|
this.enteredColumnId,
|
|
|
this.enteredPanelId,
|
|
|
- this.currentPage
|
|
|
+ this.enteredMainType,
|
|
|
+ this.enteredColumnId
|
|
|
);
|
|
|
- // this.getTableData(this.currentPage);
|
|
|
},
|
|
|
getTableData() {},
|
|
|
/**
|
|
|
* 获取图层信息 -- 所有模型和预设模型
|
|
|
+ * @columnId
|
|
|
+ * @id label_columnId
|
|
|
+ * @mainType 所有图层/预设模型
|
|
|
+ * @sourceType 土地资源/林地资源/生态资源/水资源/全部
|
|
|
*/
|
|
|
- displaySingleLayer(columnId, id) {
|
|
|
+ displaySingleLayer(columnId, id, mainType, sourceType) {
|
|
|
if (id !== "永久基本农田_50") {
|
|
|
// console.log(columnId, "columnId");
|
|
|
let layerParams = new FormData();
|
|
@@ -610,11 +657,11 @@ export default {
|
|
|
if (!this.$store.state.selectSelectDataMap["singlePolygon"]) {
|
|
|
this.$store.state.selectSelectDataMap["singlePolygon"] = [];
|
|
|
}
|
|
|
-
|
|
|
+ this.layerIdMap.set(uniqueId, uniqueId);
|
|
|
this.originalData[uniqueId] = res.content.data.map((ele) => {
|
|
|
let cid = ele.id;
|
|
|
let geometry = ele.c_content;
|
|
|
- this.layerIdMap.set(uniqueId, uniqueId);
|
|
|
+
|
|
|
// 激活当前展开面板
|
|
|
this.activeNames = ["myLabel", uniqueId];
|
|
|
this.$store.state.mapMethodsCollection
|
|
@@ -623,7 +670,9 @@ export default {
|
|
|
geometry,
|
|
|
cid,
|
|
|
this.randomColor.get(uniqueId),
|
|
|
- uniqueId
|
|
|
+ uniqueId,
|
|
|
+ mainType,
|
|
|
+ sourceType
|
|
|
);
|
|
|
|
|
|
return {
|
|
@@ -654,8 +703,13 @@ export default {
|
|
|
},
|
|
|
/**
|
|
|
* 切换页时改变图层数据
|
|
|
+ * @val 当前页
|
|
|
+ * @columnId
|
|
|
+ * @id label_columnId
|
|
|
+ * @mainType 所有图层/预设模型
|
|
|
+ * @sourceType 土地资源,水资源,林地资源,全部
|
|
|
*/
|
|
|
- changeSingleLayer(columnId, id, val) {
|
|
|
+ changeSingleLayer(val, columnId, id, mainType, sourceType) {
|
|
|
let layerParams = new FormData();
|
|
|
layerParams = {
|
|
|
columnId: columnId,
|
|
@@ -671,13 +725,12 @@ export default {
|
|
|
this.paginationData.total = res.content.count;
|
|
|
let uniqueId = id;
|
|
|
if (map2DViewer.analysisGroups[uniqueId]) {
|
|
|
- // console.log("当前的analysisGroups有数据");
|
|
|
- // map2DViewer.analysisGroups[uniqueId].remove()
|
|
|
+ this.layerIdMap.set(uniqueId, uniqueId);
|
|
|
map2DViewer.analysisGroups[uniqueId].clearLayers();
|
|
|
this.originalData[uniqueId] = res.content.data.map((ele) => {
|
|
|
let cid = ele.id;
|
|
|
let geometry = ele.c_content;
|
|
|
- this.layerIdMap.set(uniqueId, uniqueId);
|
|
|
+
|
|
|
this.activeNames = ["myLabel", uniqueId];
|
|
|
this.$store.state.mapMethodsCollection
|
|
|
.get("RENDER")
|
|
@@ -685,7 +738,9 @@ export default {
|
|
|
geometry,
|
|
|
cid,
|
|
|
this.randomColor.get(uniqueId),
|
|
|
- uniqueId
|
|
|
+ uniqueId,
|
|
|
+ mainType,
|
|
|
+ sourceType
|
|
|
);
|
|
|
return {
|
|
|
id: ele.id,
|
|
@@ -789,7 +844,12 @@ export default {
|
|
|
);
|
|
|
this.rightPanelDataMap.set(
|
|
|
`${item4.title}_${item4.id}`,
|
|
|
- item4.id
|
|
|
+
|
|
|
+ {
|
|
|
+ id: item4.id,
|
|
|
+ mainType: item1.title,
|
|
|
+ sourceType: item3.title,
|
|
|
+ }
|
|
|
);
|
|
|
|
|
|
this.randomColor.set(
|
|
@@ -805,7 +865,7 @@ export default {
|
|
|
modelName: item4.modelName,
|
|
|
modelId: item4.modelId,
|
|
|
tag: item4.tag,
|
|
|
- type: item3.title,
|
|
|
+ sourceType: item3.title,
|
|
|
town: item2.title,
|
|
|
mainType: item1.title,
|
|
|
color: publicFun.getRandomColor(),
|
|
@@ -847,7 +907,11 @@ export default {
|
|
|
);
|
|
|
this.rightPanelDataMap.set(
|
|
|
`${item3.title}_${item3.id}`,
|
|
|
- item3.id
|
|
|
+ {
|
|
|
+ id: item3.id,
|
|
|
+ mainType: item1.title,
|
|
|
+ sourceType: item2.title,
|
|
|
+ }
|
|
|
);
|
|
|
this.randomColor.set(
|
|
|
`${item3.title}_${item3.id}`,
|
|
@@ -857,6 +921,7 @@ export default {
|
|
|
id: `${item3.title}_${item3.id}`,
|
|
|
label: item3.title,
|
|
|
children: [],
|
|
|
+ sourceType: item2.title,
|
|
|
mainType: item1.title,
|
|
|
columnId: item3.id,
|
|
|
};
|
|
@@ -896,23 +961,6 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
getMyModelData() {
|
|
|
- // 我的模型栏目信息
|
|
|
- // {
|
|
|
- // "level": 0,
|
|
|
- // "modelId": 94,
|
|
|
- // "updateTime": 1671432804228,
|
|
|
- // "authorId": 4,
|
|
|
- // "title": "我的模型",
|
|
|
- // "type": 1,
|
|
|
- // "content": "浦东审计-我的模型",
|
|
|
- // "parentId": -1,
|
|
|
- // "modelName": "pdsj_wdmx_m_ysmx_wdmx",
|
|
|
- // "createTime": 1671432804228,
|
|
|
- // "authorName": "user001",
|
|
|
- // "id": 89,
|
|
|
- // "state": 0,
|
|
|
- // "tag": "pdsj_wdmx"
|
|
|
- // },
|
|
|
let params = new FormData();
|
|
|
params = {
|
|
|
columnId: 49,
|
|
@@ -925,7 +973,6 @@ export default {
|
|
|
.then((res) => {
|
|
|
// console.log(res, "判断是否有");
|
|
|
if (res.code === 200 && res.content.data.length > 0) {
|
|
|
- // console.log(res.content.data, "我的模型 - 最终数据");
|
|
|
let children = res.content.data.map((ele) => {
|
|
|
customModelIdMap.set(ele.title, {
|
|
|
column_id: ele.column_id,
|
|
@@ -947,7 +994,6 @@ export default {
|
|
|
if (this.modelData.length > 0) {
|
|
|
this.modelData.forEach((ele) => {
|
|
|
if (ele.label == "我的模型") {
|
|
|
- // console.log(ele, "我的模型");
|
|
|
ele.children = children;
|
|
|
}
|
|
|
});
|
|
@@ -1091,7 +1137,9 @@ export default {
|
|
|
data.town
|
|
|
);
|
|
|
|
|
|
- let targetType = this.classTextToIndex["任务类型"].get(data.type);
|
|
|
+ let targetType = this.classTextToIndex["任务类型"].get(
|
|
|
+ data.sourceType
|
|
|
+ );
|
|
|
|
|
|
let paramUser = {
|
|
|
field: "c_user_id",
|
|
@@ -1139,7 +1187,12 @@ export default {
|
|
|
this.$store.state.treeDataCollection.set(data.id, {
|
|
|
mainType: data.mainType,
|
|
|
});
|
|
|
- this.displaySingleLayer(data.columnId, data.id);
|
|
|
+ this.displaySingleLayer(
|
|
|
+ data.columnId,
|
|
|
+ data.id,
|
|
|
+ data.mainType,
|
|
|
+ data.sourceType
|
|
|
+ );
|
|
|
}
|
|
|
}
|
|
|
);
|
|
@@ -1153,7 +1206,12 @@ export default {
|
|
|
// town: data.town,
|
|
|
// type: data.type,
|
|
|
});
|
|
|
- this.displaySingleLayer(data.columnId, data.id);
|
|
|
+ this.displaySingleLayer(
|
|
|
+ data.columnId,
|
|
|
+ data.id,
|
|
|
+ data.mainType,
|
|
|
+ data.sourceType
|
|
|
+ );
|
|
|
}
|
|
|
} else {
|
|
|
if (this.$store.state.selectSelectDataMap["singlePolygon"][data.id]) {
|
|
@@ -1189,11 +1247,13 @@ export default {
|
|
|
// 第一级菜单是我的模型
|
|
|
if (data.mainType && data.mainType === "我的模型") {
|
|
|
// 显示叠置分析的数据
|
|
|
- checked ? this.displayOverlayData(data) : this.deleteOverlayData(data);
|
|
|
+ checked ? this.displayMyModelData(data) : this.deleteMyModelData(data);
|
|
|
}
|
|
|
},
|
|
|
- displayOverlayData(data) {
|
|
|
+ displayMyModelData(data) {
|
|
|
+ // 如果有叠置分析文件 -- 呈现叠置分析内容
|
|
|
if (data.c_dzfx_file) {
|
|
|
+ debugger;
|
|
|
this.$Get(this.uploadBaseUrl + data.c_dzfx_file, "").then(
|
|
|
(response) => {
|
|
|
if (response.features.length > 0) {
|
|
@@ -1205,6 +1265,44 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
);
|
|
|
+ } else {
|
|
|
+ let params = new FormData();
|
|
|
+ params = {
|
|
|
+ modelId: data.id,
|
|
|
+ userId: localStorage.getItem("USER_ID"),
|
|
|
+ };
|
|
|
+ // 调用我的模型查看接口读取所有图层数据
|
|
|
+ this.$Post(this.urlsCollection.getModelCoverAgeInfo, params).then(
|
|
|
+ (res) => {
|
|
|
+ if (res.code === 200 && res.content.length > 0) {
|
|
|
+ debugger;
|
|
|
+ console.log(res.content, "查看我的模型图层数据");
|
|
|
+ let uniqueId = `${data.label}_${data.id}`;
|
|
|
+ map2DViewer.analysisGroups[uniqueId] = L.featureGroup();
|
|
|
+ map2DViewer.analysisGroups[uniqueId].addTo(map2DViewer.map);
|
|
|
+ this.layerIdMap.set(uniqueId, uniqueId);
|
|
|
+ // 判断能用的数据
|
|
|
+ // 根据column_name或 column_id判断有几个图层
|
|
|
+ res.content.forEach((ele, index) => {
|
|
|
+ let cid = ele.id;
|
|
|
+ let geometry = ele.c_content;
|
|
|
+ // this.$store.state.mapMethodsCollection
|
|
|
+ // .get("RENDER")
|
|
|
+ // .addSinglePolygon(
|
|
|
+ // geometry,
|
|
|
+ // cid,
|
|
|
+ // // this.randomColor.get(uniqueId),
|
|
|
+ // uniqueId,
|
|
|
+ // mainType,
|
|
|
+ // sourceType
|
|
|
+ // );
|
|
|
+ // let legendTitle = this.legendTitle.push({});
|
|
|
+ // map2DViewer.analysisGroups[uniqueId] = L.featureGroup();
|
|
|
+ // map2DViewer.analysisGroups[uniqueId].addTo(map2DViewer.map);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
},
|
|
|
readGeojson(geojson, id) {
|
|
@@ -1218,11 +1316,29 @@ export default {
|
|
|
}).addTo(map2DViewer.map);
|
|
|
map2DViewer.overlay[id] = geojsonData;
|
|
|
},
|
|
|
- deleteOverlayData(data) {
|
|
|
- if (map2DViewer.overlay[data.id]) {
|
|
|
- map2DViewer.map.removeLayer(map2DViewer.overlay[data.id]);
|
|
|
+ deleteMyModelData(data) {
|
|
|
+ // 如果有叠置分析文件,删除叠置分析图层
|
|
|
+ if (data.c_dzfx_file) {
|
|
|
+ if (map2DViewer.overlay[data.id]) {
|
|
|
+ map2DViewer.map.removeLayer(map2DViewer.overlay[data.id]);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 删除绘制的图层数据
|
|
|
}
|
|
|
},
|
|
|
+ //显示详细信息
|
|
|
+ viewDetailsPopup(data) {
|
|
|
+ this.$store.state.bottomMenuIndexs.index = -1;
|
|
|
+ this.$store.state.bottomMenuIndexs.subIndex = -1;
|
|
|
+ this.updateCasePopupShow = false;
|
|
|
+ this.tableType = "normal";
|
|
|
+ this.boxWidth = "600";
|
|
|
+ this.boxHeight = "600";
|
|
|
+ this.tableData = [];
|
|
|
+ let obj = JSON.parse(data).properties;
|
|
|
+ this.tableData.push(obj);
|
|
|
+ this.attrTableShow = true;
|
|
|
+ },
|
|
|
// 右侧面板项点击事件
|
|
|
listItemClick(type, data) {
|
|
|
this.$store.state.bottomMenuIndexs.index = -1;
|
|
@@ -1266,9 +1382,9 @@ export default {
|
|
|
this.boxWidth = "300";
|
|
|
this.boxHeight = "300";
|
|
|
this.tableData.push({
|
|
|
- name: data.name,
|
|
|
- type: data.type,
|
|
|
- des: data.des,
|
|
|
+ 名称: data.name,
|
|
|
+ 类别: data.type,
|
|
|
+ 描述: data.des,
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -1285,36 +1401,45 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
let selectType = this.$refs.updateLabelRef.selectVal;
|
|
|
let desContent = this.$refs.updateLabelRef.textContent;
|
|
|
- let nameInput = this.$refs.updateLabelRef.nameInput;
|
|
|
- let id = this.$refs.updateLabelRef.id;
|
|
|
- let params = new FormData();
|
|
|
+ let currentNameInput = this.$refs.updateLabelRef.nameInput;
|
|
|
let geojson = JSON.parse(this.$refs.updateLabelRef.geojson);
|
|
|
let geometryType = geojson.properties.featureTypeIndex;
|
|
|
- // 修改标题和描述
|
|
|
- geojson.properties.title = selectType;
|
|
|
- geojson.properties.desc = desContent;
|
|
|
- geojson.properties.name = nameInput;
|
|
|
- console.log(geojson, "修改后的geojson数据");
|
|
|
- params = {
|
|
|
- userId: Number(localStorage.getItem("USER_ID")),
|
|
|
- sourceId: 0,
|
|
|
- type: geometryType,
|
|
|
- geojson: JSON.stringify(geojson),
|
|
|
- id: id,
|
|
|
- };
|
|
|
- this.$Post(this.urlsCollection.updateConllection, params).then(
|
|
|
- (res) => {
|
|
|
- if (res.code === 200) {
|
|
|
- // console.log("修改成功", res);
|
|
|
- this.updateCasePopupShow = false;
|
|
|
- this.getUserMarkers();
|
|
|
+ if (
|
|
|
+ myLabelNameMap.has(currentNameInput) &&
|
|
|
+ currentNameInput !== geojson.properties.name
|
|
|
+ ) {
|
|
|
+ this.$message.info("该名称已存在,请重新输入!");
|
|
|
+ } else {
|
|
|
+ let id = this.$refs.updateLabelRef.id;
|
|
|
+ let params = new FormData();
|
|
|
+ let nameInput = this.$refs.updateLabelRef.nameInput;
|
|
|
+ // 修改标题和描述
|
|
|
+ geojson.properties.title = selectType;
|
|
|
+ geojson.properties.desc = desContent;
|
|
|
+ geojson.properties.name = nameInput;
|
|
|
+ console.log(geojson, "修改后的geojson数据");
|
|
|
+ params = {
|
|
|
+ userId: Number(localStorage.getItem("USER_ID")),
|
|
|
+ sourceId: 0,
|
|
|
+ type: geometryType,
|
|
|
+ geojson: JSON.stringify(geojson),
|
|
|
+ id: id,
|
|
|
+ };
|
|
|
+ this.$Post(this.urlsCollection.updateConllection, params).then(
|
|
|
+ (res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ // console.log("修改成功", res);
|
|
|
+ this.updateCasePopupShow = false;
|
|
|
+ this.getUserMarkers();
|
|
|
+ this.$message.success("修改成功!");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ (error) => {
|
|
|
+ this.$message.error("保存失败");
|
|
|
+ console.log(error);
|
|
|
}
|
|
|
- },
|
|
|
- (error) => {
|
|
|
- this.$message.error("保存失败");
|
|
|
- console.log(error);
|
|
|
- }
|
|
|
- );
|
|
|
+ );
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
// 修改标记 -- 仅支持修改类型和描述
|
|
@@ -1326,7 +1451,8 @@ export default {
|
|
|
this.attrTableShow = false;
|
|
|
if (this.updateCasePopupShow) {
|
|
|
this.$nextTick(() => {
|
|
|
- // console.log(this.$refs.updateLabelRef, "updateLabelRef");
|
|
|
+ this.$refs.updateLabelRef.menuData.title = "修改标记";
|
|
|
+ this.$refs.updateLabelRef.nameInput = val.name;
|
|
|
this.$refs.updateLabelRef.selectVal = val.type;
|
|
|
this.$refs.updateLabelRef.textContent = val.des;
|
|
|
this.$refs.updateLabelRef.id = val.id;
|
|
@@ -1401,9 +1527,10 @@ export default {
|
|
|
@commonBorderColor: rgb(0, 170, 255);
|
|
|
.comprehensive-analysis {
|
|
|
&-law-popup {
|
|
|
- position: absolute;
|
|
|
- top: 15%;
|
|
|
- left: 33%;
|
|
|
+ position: fixed;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ margin: 100px auto;
|
|
|
pointer-events: auto;
|
|
|
z-index: 99;
|
|
|
}
|
|
@@ -1510,10 +1637,10 @@ export default {
|
|
|
}
|
|
|
/* 弹窗 */
|
|
|
&-popup {
|
|
|
- // background: red;
|
|
|
- position: absolute;
|
|
|
- top: 10%;
|
|
|
- left: 35%;
|
|
|
+ position: fixed;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ margin: 100px auto;
|
|
|
pointer-events: auto;
|
|
|
z-index: 99;
|
|
|
}
|
|
@@ -1781,12 +1908,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- // /deep/.el-icon-arrow-right:before {
|
|
|
- // content: "";
|
|
|
- // }
|
|
|
- // /deep/.el-icon-arrow-right:after {
|
|
|
- // content: "";
|
|
|
- // }
|
|
|
+
|
|
|
.panel-list-item {
|
|
|
position: relative;
|
|
|
margin: 0 auto;
|