田源
2025-01-13 299968bd321e12d5363f0bdd6f46c37287f9e139
Source/plt-web/plt-web-ui/src/store/modules/user.js
@@ -16,7 +16,7 @@
  const propsDefault = {
    label: propsConfig.label || 'name',
    path: propsConfig.path || 'path',
    icon: propsConfig.icon || 'icon',
    icon: propsConfig.icon || 'source',
    children: propsConfig.children || 'children',
  }
  const icon = ele[propsDefault.icon];
@@ -36,7 +36,7 @@
function updateCode(items) {
  items.forEach(item => {
    item.pathValue = item.path;
    item.path = '/' + item.code;
    item.path = '/' + item.id;
    item.query = {}; // 初始化 item.query
    if (item.pathValue.indexOf('?') != -1) {
      item.query = queryStringToObject(item.pathValue)
@@ -244,7 +244,6 @@
      return new Promise((resolve) => {
        getButtons().then(res => {
          const data = res.data.data;
          console.log('getButton',data)
          commit('SET_PERMISSION', data);
          resolve();
        })
@@ -303,7 +302,14 @@
        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);