zhou zhou
1 天以前 3fdcf1d5e6468c735532e67bde5ff1cdf85bb0c6
rsf-design/src/views/system/role/modules/role-permission-dialog.vue
@@ -72,6 +72,8 @@
  import {
    buildRoleScopeSubmitPayload,
    getRoleScopeConfig,
    normalizeScopeKeys,
    normalizeScopeKey,
    normalizeRoleScopeTreeData
  } from '../rolePage.helpers'
  import { fetchGetRoleScopeList, fetchGetRoleScopeTree, fetchUpdateRoleScope } from '@/api/system-manage'
@@ -152,31 +154,6 @@
    }
    await loadScopeData(scopeType, { reloadSelection })
  }
  const normalizeScopeKeys = (keys = []) => {
    if (!Array.isArray(keys)) {
      return []
    }
    return Array.from(
      new Set(
        keys
          .map((key) => normalizeScopeKey(key))
          .filter((key) => key !== '')
      )
    )
  }
  const normalizeScopeKey = (value) => {
    if (value === '' || value === null || value === void 0) {
      return ''
    }
    const numeric = Number(value)
    if (Number.isNaN(numeric)) {
      return String(value)
    }
    return String(numeric)
  }
  const setTreeRef = (scopeType, el) => {