|
@@ -355,14 +355,16 @@ export default {
|
|
|
let panelId = this.enteredPanelId;
|
|
|
let mainType = this.enteredMainType;
|
|
|
let sourceType = this.enteredSourceType;
|
|
|
- this.changeSingleLayer(
|
|
|
- val,
|
|
|
- currentPageSize,
|
|
|
- columnId,
|
|
|
- panelId,
|
|
|
- mainType,
|
|
|
- sourceType
|
|
|
- );
|
|
|
+ if (mainType === "所有图层") {
|
|
|
+ this.changeSingleLayer(
|
|
|
+ val,
|
|
|
+ currentPageSize,
|
|
|
+ columnId,
|
|
|
+ panelId,
|
|
|
+ mainType,
|
|
|
+ sourceType
|
|
|
+ );
|
|
|
+ }
|
|
|
},
|
|
|
handleSizeChange: (val) => {
|
|
|
this.handleSizeChange(val);
|
|
@@ -670,14 +672,16 @@ export default {
|
|
|
handleSizeChange(val) {
|
|
|
console.log(`每页 ${val} 条`);
|
|
|
this.currentPageSize = val;
|
|
|
- this.changeSingleLayer(
|
|
|
- this.currentPage,
|
|
|
- this.currentPageSize,
|
|
|
- this.enteredColumnId,
|
|
|
- this.enteredPanelId,
|
|
|
- this.enteredMainType,
|
|
|
- this.enteredColumnId
|
|
|
- );
|
|
|
+ if (this.enteredMainType === "所有图层") {
|
|
|
+ this.changeSingleLayer(
|
|
|
+ this.currentPage,
|
|
|
+ this.currentPageSize,
|
|
|
+ this.enteredColumnId,
|
|
|
+ this.enteredPanelId,
|
|
|
+ this.enteredMainType,
|
|
|
+ this.enteredColumnId
|
|
|
+ );
|
|
|
+ }
|
|
|
},
|
|
|
getTableData() {},
|
|
|
/**
|
|
@@ -744,51 +748,96 @@ export default {
|
|
|
// 存储请求到的疑点数据
|
|
|
this.originalDataMap.set(uniqueId, res.content.data);
|
|
|
|
|
|
- // if (mainType === "所有图层") {
|
|
|
- // // 激活当前展开面板
|
|
|
+ if (mainType === "所有图层") {
|
|
|
+ // 激活当前展开面板
|
|
|
+ this.activeNames = ["myLabel", uniqueId];
|
|
|
+ this.originalData[uniqueId] = res.content.data.map((ele) => {
|
|
|
+ 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
|
|
|
+ );
|
|
|
|
|
|
- this.activeNames = ["myLabel", uniqueId];
|
|
|
+ return {
|
|
|
+ id: ele.id,
|
|
|
+ // "垃圾堆放点"
|
|
|
+ column_name: ele.column_name,
|
|
|
+ // 是否疑点
|
|
|
+ c_boolean: ele.c_boolean ? "是" : "否",
|
|
|
+ // 行政区划
|
|
|
+ c_xzqh: ele.c_xzqh,
|
|
|
+ // 空间信息
|
|
|
+ c_content: ele.c_content,
|
|
|
+ // 疑点修改时间
|
|
|
+ c_date_time: ele.c_date_time,
|
|
|
+ // 修改人员名称
|
|
|
+ // c_editor_name: ele.c_editor_name,
|
|
|
+ // 标题
|
|
|
+ title: ele.title,
|
|
|
+ column_id: ele.column_id,
|
|
|
+ content: ele.content,
|
|
|
+ secret_level: ele.secret_level,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ // 进行分页列表展示
|
|
|
+ this.changeSingleLayer(
|
|
|
+ 1,
|
|
|
+ this.currentPageSize,
|
|
|
+ columnId,
|
|
|
+ id,
|
|
|
+ mainType,
|
|
|
+ sourceType
|
|
|
+ );
|
|
|
+ }
|
|
|
|
|
|
- this.originalData[uniqueId] = res.content.data.map((ele) => {
|
|
|
- let cid = ele.id;
|
|
|
- let geometry = ele.c_content;
|
|
|
+ if (mainType === "预设模型") {
|
|
|
+ this.originalDataMap.get(uniqueId).map((ele) => {
|
|
|
+ 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
|
|
|
- );
|
|
|
+ this.$store.state.mapMethodsCollection
|
|
|
+ .get("RENDER")
|
|
|
+ .addSinglePolygon(
|
|
|
+ geometry,
|
|
|
+ cid,
|
|
|
+ this.randomColor.get(uniqueId),
|
|
|
+ uniqueId,
|
|
|
+ mainType,
|
|
|
+ sourceType
|
|
|
+ );
|
|
|
|
|
|
- return {
|
|
|
- id: ele.id,
|
|
|
- // "垃圾堆放点"
|
|
|
- column_name: ele.column_name,
|
|
|
- // 是否疑点
|
|
|
- c_boolean: ele.c_boolean ? "是" : "否",
|
|
|
- // 行政区划
|
|
|
- c_xzqh: ele.c_xzqh,
|
|
|
- // 空间信息
|
|
|
- c_content: ele.c_content,
|
|
|
- // 疑点修改时间
|
|
|
- c_date_time: ele.c_date_time,
|
|
|
- // 修改人员名称
|
|
|
- // c_editor_name: ele.c_editor_name,
|
|
|
- // 标题
|
|
|
- title: ele.title,
|
|
|
- column_id: ele.column_id,
|
|
|
- content: ele.content,
|
|
|
- secret_level: ele.secret_level,
|
|
|
- };
|
|
|
- });
|
|
|
+ return {
|
|
|
+ id: ele.id,
|
|
|
+ // "垃圾堆放点"
|
|
|
+ column_name: ele.column_name,
|
|
|
+ // 是否疑点
|
|
|
+ c_boolean: ele.c_boolean ? "是" : "否",
|
|
|
+ // 行政区划
|
|
|
+ c_xzqh: ele.c_xzqh,
|
|
|
+ // 空间信息
|
|
|
+ c_content: ele.c_content,
|
|
|
+ // 疑点修改时间
|
|
|
+ c_date_time: ele.c_date_time,
|
|
|
+ // 修改人员名称
|
|
|
+ // c_editor_name: ele.c_editor_name,
|
|
|
+ // 标题
|
|
|
+ title: ele.title,
|
|
|
+ column_id: ele.column_id,
|
|
|
+ content: ele.content,
|
|
|
+ secret_level: ele.secret_level,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- this.currentTotal += this.originalData[uniqueId].length;
|
|
|
+ this.currentTotal += this.originalDataMap.get(uniqueId).length;
|
|
|
console.log(
|
|
|
"target",
|
|
|
this.currentPageSize,
|
|
@@ -797,15 +846,6 @@ export default {
|
|
|
mainType,
|
|
|
sourceType
|
|
|
);
|
|
|
- // 进行分页列表展示
|
|
|
- this.changeSingleLayer(
|
|
|
- 1,
|
|
|
- this.currentPageSize,
|
|
|
- columnId,
|
|
|
- id,
|
|
|
- mainType,
|
|
|
- sourceType
|
|
|
- );
|
|
|
}
|
|
|
},
|
|
|
(error) => {
|
|
@@ -818,35 +858,38 @@ export default {
|
|
|
// 图层已初始化
|
|
|
if (map2DViewer.analysisGroups[uniqueId]) {
|
|
|
map2DViewer.map.addLayer(map2DViewer.analysisGroups[uniqueId]);
|
|
|
- this.originalData[uniqueId] = [];
|
|
|
- // 激活当前展开面板
|
|
|
- this.activeNames = ["myLabel", uniqueId];
|
|
|
- // 已经请求过接口无需二次请求
|
|
|
- this.originalData[uniqueId] = this.originalDataMap
|
|
|
- .get(uniqueId)
|
|
|
- .map((ele) => {
|
|
|
- return {
|
|
|
- id: ele.id,
|
|
|
- column_name: ele.column_name,
|
|
|
- // 是否疑点
|
|
|
- c_boolean: ele.c_boolean ? "是" : "否",
|
|
|
- // 行政区划
|
|
|
- c_xzqh: ele.c_xzqh,
|
|
|
- // 空间信息
|
|
|
- c_content: ele.c_content,
|
|
|
- // 疑点修改时间
|
|
|
- c_date_time: ele.c_date_time,
|
|
|
- // 修改人员名称
|
|
|
- // c_editor_name: ele.c_editor_name,
|
|
|
- // 标题
|
|
|
- title: ele.title,
|
|
|
- column_id: ele.column_id,
|
|
|
- content: ele.content,
|
|
|
- secret_level: ele.secret_level,
|
|
|
- };
|
|
|
- });
|
|
|
|
|
|
- this.currentTotal += this.originalData[uniqueId].length;
|
|
|
+ if (mainType === "所有图层") {
|
|
|
+ this.originalData[uniqueId] = [];
|
|
|
+ // 激活当前展开面板
|
|
|
+ this.activeNames = ["myLabel", uniqueId];
|
|
|
+ // 已经请求过接口无需二次请求
|
|
|
+ this.originalData[uniqueId] = this.originalDataMap
|
|
|
+ .get(uniqueId)
|
|
|
+ .map((ele) => {
|
|
|
+ return {
|
|
|
+ id: ele.id,
|
|
|
+ column_name: ele.column_name,
|
|
|
+ // 是否疑点
|
|
|
+ c_boolean: ele.c_boolean ? "是" : "否",
|
|
|
+ // 行政区划
|
|
|
+ c_xzqh: ele.c_xzqh,
|
|
|
+ // 空间信息
|
|
|
+ c_content: ele.c_content,
|
|
|
+ // 疑点修改时间
|
|
|
+ c_date_time: ele.c_date_time,
|
|
|
+ // 修改人员名称
|
|
|
+ // c_editor_name: ele.c_editor_name,
|
|
|
+ // 标题
|
|
|
+ title: ele.title,
|
|
|
+ column_id: ele.column_id,
|
|
|
+ content: ele.content,
|
|
|
+ secret_level: ele.secret_level,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ this.currentTotal += this.originalDataMap.get(uniqueId).length;
|
|
|
}
|
|
|
},
|
|
|
/**
|
|
@@ -1319,10 +1362,24 @@ export default {
|
|
|
data.id
|
|
|
];
|
|
|
}
|
|
|
- if (this.originalData && this.originalData[data.id]) {
|
|
|
- this.currentTotal -= this.originalData[data.id].length;
|
|
|
- delete this.originalData[data.id];
|
|
|
+ // if (this.originalData && this.originalData[data.id]) {
|
|
|
+ // this.currentTotal -= this.originalDataMap[data.id].length;
|
|
|
+ // delete this.originalData[data.id];
|
|
|
+ // }
|
|
|
+
|
|
|
+ // 取消勾选当前图层勾选,图斑数改变, 如果是所有图层数据移除折叠面板
|
|
|
+ if (this.originalDataMap && this.originalDataMap.has(data.id)) {
|
|
|
+ this.currentTotal -= this.originalDataMap.get(data.id).length;
|
|
|
+
|
|
|
+ if (
|
|
|
+ data.mainType === "所有图层" &&
|
|
|
+ this.originalData &&
|
|
|
+ this.originalData[data.id]
|
|
|
+ ) {
|
|
|
+ delete this.originalData[data.id];
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
map2DViewer.map.closePopup();
|
|
|
|
|
|
// 移除图例
|