|
|
@@ -11,29 +11,6 @@
|
|
|
<div class="legend-label" style="font-weight: bold;">全选</div>
|
|
|
</div>
|
|
|
|
|
|
- <!-- <div class="legend-item" :class="{ 'is-inactive': !activeLegends.includes(item.name) }" :key="item.name"
|
|
|
- v-for="item in legendConfig" @click="toggleRouteVisible(item.name)">
|
|
|
- <div
|
|
|
- class="legend-dot"
|
|
|
- :style="{ backgroundColor: item.color }"
|
|
|
- :class="{ 'special-route': ['干线协调', '勤务路线'].includes(item.name) }"
|
|
|
- >
|
|
|
- <span>{{ item.name.charAt(0) }}</span>
|
|
|
- </div>
|
|
|
- <div class="legend-dot" :style="{ backgroundColor: item.color }">
|
|
|
-
|
|
|
- <span v-if="!['离线', '降级', '故障'].includes(item.name)">
|
|
|
- {{ item.name.charAt(0) }}
|
|
|
- </span>
|
|
|
-
|
|
|
- <img v-else-if="item.name === '离线'" src="@/assets/images/icon_lixian.png" class="status-icon" />
|
|
|
- <img v-else-if="item.name === '降级'" src="@/assets/images/icon_jiangji.png" class="status-icon" />
|
|
|
- <img v-else-if="item.name === '故障'" src="@/assets/images/icon_guzhang.png" class="status-icon" />
|
|
|
-
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="legend-label">{{ item.name }}</div>
|
|
|
- </div> -->
|
|
|
<div v-for="item in legendConfig" class="legend-item" @click="toggleRouteVisible(item.name)" :key="item.name"
|
|
|
:class="{ 'is-inactive': !activeLegends.includes(item.name) }">
|
|
|
|
|
|
@@ -48,7 +25,6 @@
|
|
|
<img v-else
|
|
|
:src="require(`@/assets/images/icon_${item.name === '离线' ? 'lixian' : item.name === '降级' ? 'jiangji' : 'guzhang'}.png`)"
|
|
|
class="status-icon" />
|
|
|
-
|
|
|
</div>
|
|
|
|
|
|
<div class="legend-label">{{ item.name }}</div>
|
|
|
@@ -207,17 +183,18 @@ export default {
|
|
|
points.push(path[path.length - 1]);
|
|
|
}
|
|
|
|
|
|
- // 临时逻辑,有真实接口后可以删除
|
|
|
points.forEach((pos, idx) => {
|
|
|
- if (index === 8 && idx === 0) {
|
|
|
- localStorage.setItem('pos1', pos);
|
|
|
- }
|
|
|
- if (index === 9 && idx === 0) {
|
|
|
- localStorage.setItem('pos2', pos);
|
|
|
- }
|
|
|
- if (index === 10 && idx === 0) {
|
|
|
- localStorage.setItem('pos3', pos);
|
|
|
+ // 临时逻辑,有真实接口后可以删除
|
|
|
+ const posMap = {
|
|
|
+ 8: 'pos1',
|
|
|
+ 9: 'pos2',
|
|
|
+ 10: 'pos3'
|
|
|
+ };
|
|
|
+
|
|
|
+ if (idx === 0 && posMap[index]) {
|
|
|
+ localStorage.setItem(posMap[index], pos);
|
|
|
}
|
|
|
+ // 临时逻辑,有真实接口后可以删除
|
|
|
|
|
|
markers.push(this.createTrafficLightMarker(pos, config));
|
|
|
});
|