<template>
  <div class="bg-el-color" v-loading="loading">
    <UserInfo :userInfo="userInfo"/>
  </div>
</template>

<script setup>
// 审批详情组件
import UserInfo from "@/components/UserInfo";
import { getUser } from "@/api/system/user";


const route = useRoute();
const userInfo = ref({});
const loading = ref(true);


function getData(userId) {
  loading.value = true;
  getUser(userId).then((response) => {
    userInfo.value = response.data;
    loading.value = false;
  });
}

let userId = route.query.userId;
getData(userId);

console.log(route);
console.log(route.query);
</script>
