|
@@ -6,7 +6,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-card> -->
|
|
|
- <div class="flex" v-loading="loading" v-show="userInfo.name != null && userInfo.name != undefined">
|
|
|
+ <div class="flex" v-loading="loading">
|
|
|
<el-card class="workspace-info w-full" shadow="always" style="padding-bottom: 40px;">
|
|
|
<template #header>
|
|
|
<div class="card-header" style="display: flex; align-items: center; justify-content: space-between;">
|
|
@@ -88,7 +88,7 @@
|
|
|
@success="handleSuccess"
|
|
|
/>
|
|
|
</div>
|
|
|
- <div v-show="userInfo.name != null && userInfo.name != undefined">
|
|
|
+ <div>
|
|
|
<div style="margin-top: 15px;">
|
|
|
<teacher :id="form.id" />
|
|
|
</div>
|
|
@@ -96,9 +96,7 @@
|
|
|
<student :id="form.id" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="flex" v-show="!(userInfo.name != null && userInfo.name != undefined)">
|
|
|
- 暂无工作间!
|
|
|
- </div>
|
|
|
+
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
@@ -171,14 +169,15 @@ export default defineComponent({
|
|
|
});
|
|
|
|
|
|
// 将 userInfo 定义放入 setup 中
|
|
|
- const userInfo = ref({} as DeptVO);
|
|
|
+ const userInfo = ref({} as DeptVO);
|
|
|
const fetchUserInfo = async () => {
|
|
|
try{
|
|
|
loading.value = true; // 开始加载状态
|
|
|
const users = await getUserDept();
|
|
|
console.log(users,'userDeptInfo');
|
|
|
- userInfo.value = {...users};
|
|
|
-
|
|
|
+ userInfo.value = {...users,
|
|
|
+ // name: users.user[0].nickname // 提取 nickname
|
|
|
+ };
|
|
|
}finally{
|
|
|
loading.value = false; // 关闭加载状态
|
|
|
}
|