|
@@ -308,6 +308,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 存储图斑颜色
|
|
|
+ collectColorMap: new Map(),
|
|
|
targetLayerPage: {},
|
|
|
targetLayerTotal: {},
|
|
|
currentTotal: 0,
|
|
@@ -317,6 +319,7 @@ export default {
|
|
|
myModelIdMap: new Map(),
|
|
|
// 第一层数据集合
|
|
|
firstLevelIdMap: new Map(),
|
|
|
+ problemIdMap: new Map(),
|
|
|
// 下拉框镇集合
|
|
|
townSelectTreeMap: new Map(),
|
|
|
// 所有图层 -- 根据镇域划分的数据集合
|
|
@@ -360,7 +363,6 @@ export default {
|
|
|
// 存放对应图层的坐标
|
|
|
treeCoordMap: new Map(),
|
|
|
layerIdMap: new Map(),
|
|
|
- randomColor: new Map(),
|
|
|
isLeftLock: true,
|
|
|
isRightLock: true,
|
|
|
currentPage: 1,
|
|
@@ -498,12 +500,14 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
// 从疑点筛查进入综合分析页面默认勾选
|
|
|
if (defaultModelNameMap.has(val)) {
|
|
|
- this.expandedKeys.push(defaultModelNameMap.get(val));
|
|
|
- // 设置默认勾选项
|
|
|
- this.$refs.tree.setCheckedKeys([defaultModelNameMap.get(val)]);
|
|
|
- this.$refs.tree.setCurrentKey(defaultModelNameMap.get(val));
|
|
|
- let nodeData = this.$refs.tree.getCurrentNode();
|
|
|
- this.handleCheckChange(nodeData, true);
|
|
|
+ setTimeout(() => {
|
|
|
+ this.expandedKeys.push(defaultModelNameMap.get(val));
|
|
|
+ // 设置默认勾选项
|
|
|
+ this.$refs.tree.setCheckedKeys([defaultModelNameMap.get(val)]);
|
|
|
+ this.$refs.tree.setCurrentKey(defaultModelNameMap.get(val));
|
|
|
+ let nodeData = this.$refs.tree.getCurrentNode();
|
|
|
+ this.handleCheckChange(nodeData, true);
|
|
|
+ }, 1000);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -629,9 +633,24 @@ export default {
|
|
|
// 全流程详细页面,用户点击整改中的某个数据时:
|
|
|
this.$bus.$off("openMyView");
|
|
|
this.$bus.$on("openMyView", (data) => {
|
|
|
- console.log(
|
|
|
- `监听到用户点击全流程详细页面,用户点击整改中的某个数据时:!任务类型Code:${data[0]},所属街道Code:${data[1]}!`
|
|
|
- );
|
|
|
+ if (this.problemIdMap.has("疑点问题")) {
|
|
|
+ console.log(
|
|
|
+ this.problemIdMap.get("疑点问题"),
|
|
|
+ "疑点问题 -- 老港全流程管理"
|
|
|
+ );
|
|
|
+ setTimeout(() => {
|
|
|
+ console.log(
|
|
|
+ `监听到用户点击全流程详细页面,用户点击整改中的某个数据时:!任务类型Code:${data[0]},所属街道Code:${data[1]}!`
|
|
|
+ );
|
|
|
+ this.expandedKeys.push(this.problemIdMap.get("疑点问题").id);
|
|
|
+ this.$refs.tree.setCheckedKeys([
|
|
|
+ this.problemIdMap.get("疑点问题").id,
|
|
|
+ ]);
|
|
|
+ this.$refs.tree.setCurrentKey(this.problemIdMap.get("疑点问题").id);
|
|
|
+ let nodeData = this.$refs.tree.getCurrentNode();
|
|
|
+ this.handleCheckChange(nodeData, true);
|
|
|
+ }, 1000);
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
destroy() {
|
|
@@ -660,10 +679,7 @@ export default {
|
|
|
mainType: "所有图层",
|
|
|
sourceType: item1.title,
|
|
|
});
|
|
|
- this.randomColor.set(
|
|
|
- `${item2.title}_${item2.id}`,
|
|
|
- publicFun.getRGBColor()
|
|
|
- );
|
|
|
+
|
|
|
return {
|
|
|
id: `${item2.title}_${item2.id}`,
|
|
|
label: item2.title,
|
|
@@ -828,7 +844,7 @@ export default {
|
|
|
.addSinglePolygon(
|
|
|
geometry,
|
|
|
cid,
|
|
|
- this.randomColor.get(uniqueId),
|
|
|
+ this.collectColorMap.get(this.collectColorMap.size - 1),
|
|
|
uniqueId,
|
|
|
mainType,
|
|
|
sourceType
|
|
@@ -934,15 +950,27 @@ export default {
|
|
|
|
|
|
// 图层未初始化
|
|
|
if (!map2DViewer.analysisGroups[uniqueId]) {
|
|
|
+ // 生成图例时设置初始图层颜色
|
|
|
+ if (!this.collectColorMap.has(this.collectColorMap.size)) {
|
|
|
+ let num = this.collectColorMap.size;
|
|
|
+ this.collectColorMap.set(
|
|
|
+ this.collectColorMap.size,
|
|
|
+ `rgb(${targetColor[num][0]},${targetColor[num][1]},${targetColor[num][2]})`
|
|
|
+ );
|
|
|
+ console.log(this.collectColorMap, "图斑颜色设置");
|
|
|
+ }
|
|
|
// 图例
|
|
|
this.legendTitle.push({
|
|
|
name: uniqueId,
|
|
|
info: uniqueId,
|
|
|
});
|
|
|
+ console.log(this.collectColorMap.get(this.collectColorMap.size - 1));
|
|
|
this.legendIcon.push({
|
|
|
name: uniqueId,
|
|
|
background: "transparent",
|
|
|
- border: `1px solid ${this.randomColor.get(uniqueId)}`,
|
|
|
+ border: `1px solid ${this.collectColorMap.get(
|
|
|
+ this.collectColorMap.size - 1
|
|
|
+ )}`,
|
|
|
});
|
|
|
map2DViewer.analysisGroups[uniqueId] = L.featureGroup();
|
|
|
map2DViewer.analysisGroups[uniqueId].addTo(map2DViewer.map);
|
|
@@ -1085,10 +1113,7 @@ export default {
|
|
|
sourceType: item2.title,
|
|
|
}
|
|
|
);
|
|
|
- this.randomColor.set(
|
|
|
- `${item3.title}_${item3.id}`,
|
|
|
- publicFun.getRGBColor()
|
|
|
- );
|
|
|
+
|
|
|
defaultModelNameMap.set(
|
|
|
item3.title,
|
|
|
`${item3.title}_${item3.id}`
|
|
@@ -1135,10 +1160,11 @@ export default {
|
|
|
!item1.columnList || item1.columnList.length === 0
|
|
|
? []
|
|
|
: item1.columnList.map((item2) => {
|
|
|
- this.randomColor.set(
|
|
|
- `${item2.title}_${item2.id}`,
|
|
|
- publicFun.getRGBColor()
|
|
|
- );
|
|
|
+ // 疑点问题
|
|
|
+ this.problemIdMap.set(item1.title, {
|
|
|
+ id: `${item2.title}_${item2.id}`,
|
|
|
+ label: item2.title,
|
|
|
+ });
|
|
|
return {
|
|
|
id: `${item2.title}_${item2.id}`,
|
|
|
label: item2.title,
|
|
@@ -1530,6 +1556,7 @@ export default {
|
|
|
|
|
|
// 移除图例
|
|
|
if (this.legendTitle.length > 0) {
|
|
|
+ this.collectColorMap.delete(this.collectColorMap.size - 1);
|
|
|
this.legendTitle = this.legendTitle.filter((v) => {
|
|
|
return v.name !== data.id;
|
|
|
});
|