Commit 720164b1 by liuyong

修改左侧菜单加载

1 parent 89a756b8
Showing with 19 additions and 17 deletions
...@@ -231,7 +231,7 @@ App = function(editor, container, lightbox) ...@@ -231,7 +231,7 @@ App = function(editor, container, lightbox)
if(dicys.length > 0) { if(dicys.length > 0) {
dicys.forEach(item2 => { dicys.forEach(item2 => {
console.log(item2.fieldName) console.log(item2.fieldName)
console.log(item2.chineseName) // console.log(item2.chineseName)
// svgTag.setAttribute(encodeURIComponent(item2.fieldName), encodeURIComponent(item2.chineseName)); // svgTag.setAttribute(encodeURIComponent(item2.fieldName), encodeURIComponent(item2.chineseName));
// svgTag.setAttribute('attr'+item2.fieldName, 'attr'+item2.chineseName); // svgTag.setAttribute('attr'+item2.fieldName, 'attr'+item2.chineseName);
...@@ -255,23 +255,25 @@ App = function(editor, container, lightbox) ...@@ -255,23 +255,25 @@ App = function(editor, container, lightbox)
contentType: "application/json", contentType: "application/json",
success: result => { success: result => {
result.data.forEach(item => { result.data.forEach(item => {
if(item.eleDtos.length > 0) { if(item.eleDtos) {
const libraryName = item.arciBelongName; if(item.eleDtos.length > 0) {
let images = []; const libraryName = item.arciBelongName;
item.eleDtos.forEach(item2 => { let images = [];
if(item2.icon) { item.eleDtos.forEach(item2 => {
if(item2.icon.includes('data')) { if(item2.icon) {
images.push({ if(item2.icon.includes('data')) {
aspect: "fixed", images.push({
data: setIcon(item2.icon, item2.dicys, item2.color), aspect: "fixed",
h: 256, data: setIcon(item2.icon, item2.dicys, item2.color),
title: item2.eleName, h: 256,
w: 256 title: item2.eleName,
}) w: 256
})
}
} }
} })
}) this.saveLibrary(libraryName, images, null, 'ajax', undefined, undefined, undefined);
this.saveLibrary(libraryName, images, null, 'ajax', undefined, undefined, undefined); }
} }
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!