Browse Source

Merge branch 'dev-bug-temp2'

feature/account
dai 3 years ago
parent
commit
fb4a5e17bc
  1. 6
      src/router/index.js
  2. 1
      src/views/modules/visual/command/cpts/map.vue

6
src/router/index.js

@ -112,20 +112,20 @@ function cookApiDataItem(item) {
function n2one(v) { function n2one(v) {
let ret = []; let ret = [];
for (let i = 0; i < v.length; i++) { for (let i = 0; i < v.length; i++) {
console.log("xxxxx", v[i]); // console.log("xxxxx", v[i]);
ret.push(v[i]); ret.push(v[i]);
if (Array.isArray(v[i].children) && v[i].children.length > 0) { if (Array.isArray(v[i].children) && v[i].children.length > 0) {
ret.push(...n2one(v[i].children)); ret.push(...n2one(v[i].children));
} }
} }
console.log("aaaa", ret); // console.log("aaaa", ret);
return ret; return ret;
} }
let allChildrenUrl = n2one(item.children) let allChildrenUrl = n2one(item.children)
.filter((i) => i.url != "" && i.showFlag == 1) .filter((i) => i.url != "" && i.showFlag == 1)
.map((i) => i.url); .map((i) => i.url);
console.log("))))))))))))", allChildrenUrl); // console.log("))))))))))))", allChildrenUrl);
if (item.children.length > 0) { if (item.children.length > 0) {
if (item.url == "" || !allChildrenUrl.find((i) => i.url == item.url)) { if (item.url == "" || !allChildrenUrl.find((i) => i.url == item.url)) {

1
src/views/modules/visual/command/cpts/map.vue

@ -516,6 +516,7 @@ export default {
iniMapDot(scene) { iniMapDot(scene) {
const { darkStyle, lightStyle, dotIcoList, dotData } = this; const { darkStyle, lightStyle, dotIcoList, dotData } = this;
console.log('--------------------------图标', dotIcoList)
Object.keys(dotIcoList).forEach((k) => { Object.keys(dotIcoList).forEach((k) => {
scene.addImage(k, dotIcoList[k]); scene.addImage(k, dotIcoList[k]);
}); });

Loading…
Cancel
Save