zhou zhou
5 天以前 aaf8a50511d77dbc209ca93bbba308c21179a8bc
rsf-design/src/views/system/user/index.vue
@@ -47,6 +47,7 @@
<script setup>
  import request from '@/utils/http'
  import { guardRequestWithMessage } from '@/utils/sys/requestGuard'
  import {
    fetchDeleteUser,
    fetchGetDeptTree,
@@ -247,7 +248,19 @@
  const loadLookups = async () => {
    try {
      const [roles, depts] = await Promise.all([fetchGetRoleOptions({}), fetchGetDeptTree({})])
      const lookupPayload = await guardRequestWithMessage(
        Promise.all([fetchGetRoleOptions({}), fetchGetDeptTree({})]),
        null,
        {
          timeoutMessage: '用户页字典加载超时,已停止等待'
        }
      )
      if (!lookupPayload) {
        roleOptions.value = []
        deptTreeOptions.value = []
        return
      }
      const [roles, depts] = lookupPayload
      roleOptions.value = normalizeRoleOptions(roles)
      deptTreeOptions.value = normalizeDeptTreeOptions(depts)
    } catch (error) {