| | |
| | | return new Promise((resolve) => { |
| | | getButtons().then(res => { |
| | | const data = res.data.data; |
| | | console.log('getButton',data) |
| | | console.log('getButton', data) |
| | | commit('SET_PERMISSION', data); |
| | | resolve(); |
| | | }) |
| | |
| | | let children = {}; |
| | | if (item.children && item.children.length > 0) { |
| | | item.children.forEach(child => { |
| | | Vue.set(children, child.code, true); |
| | | // const childObject = { |
| | | // [child.code]: true, |
| | | // source: child.source |
| | | // }; |
| | | // Object.assign(children, childObject); |
| | | children[child.code] = { |
| | | source: child.source |
| | | } |
| | | }); |
| | | } |
| | | Vue.set(permission_new, item.id, children); |