|
|
@@ -80,7 +80,7 @@
|
|
|
<template #default="{ node, data }">
|
|
|
<span class="custom-tree-node">
|
|
|
<span>{{ node.label }}</span>
|
|
|
- <span v-if="data.type === 'college' || data.type === 'class'" class="bed-count">
|
|
|
+ <span v-if="data.type === 'college' || data.type === 'major' || data.type === 'class'" class="bed-count">
|
|
|
<template v-if="selectedBuilding?.buildingType === '2'">
|
|
|
<el-tag size="small" class="female-tag ml-2">女:{{ data.femaleAssigned }}/{{ data.femaleTotal }}</el-tag>
|
|
|
<el-tag size="small" type="primary" class="ml-2">男:{{ data.maleAssigned }}/{{ data.maleTotal }}</el-tag>
|
|
|
@@ -168,7 +168,7 @@
|
|
|
@selection-change="handleSelectionChange"
|
|
|
>
|
|
|
<el-table-column type="selection" width="55" :selectable="checkSelectable" />
|
|
|
- <el-table-column prop="roomName" label="房间/宿舍名称" min-width="180">
|
|
|
+ <el-table-column prop="roomName" label="房间/宿舍名称" min-width="120">
|
|
|
<template #default="scope">
|
|
|
<span v-if="!scope.row.isBed">{{ scope.row.roomName }} (房间)</span>
|
|
|
<span v-else>{{ scope.row.bedName }} (床位)</span>
|
|
|
@@ -207,12 +207,57 @@
|
|
|
</template>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <!-- 新增学院信息列 -->
|
|
|
+ <el-table-column label="学院" width="120" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <span v-if="scope.row.isBed && scope.row.collegeName">{{ scope.row.collegeName }}</span>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- 新增专业信息列 -->
|
|
|
+ <el-table-column label="专业" width="120" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <span v-if="scope.row.isBed && scope.row.majorName">{{ scope.row.majorName }}</span>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- 新增班级信息列 -->
|
|
|
+ <el-table-column label="班级" width="120" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <span v-if="scope.row.isBed && scope.row.className">{{ scope.row.className }}</span>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- 新增学号信息列 -->
|
|
|
+ <el-table-column label="学号" width="120" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <span v-if="scope.row.isBed && scope.row.studentNo">{{ scope.row.studentNo }}</span>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- 新增学生姓名列 -->
|
|
|
+ <el-table-column label="学生姓名" width="100" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <span v-if="scope.row.isBed && scope.row.studentName">{{ scope.row.studentName }}</span>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- 新增性别列 -->
|
|
|
+ <el-table-column label="性别" width="60" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <span v-if="scope.row.isBed && scope.row.studentGender !== undefined">
|
|
|
+ <el-tag v-if="scope.row.studentGender === '0'" type="primary" size="small">男</el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.studentGender === '1'" class="female-tag" size="small">女</el-tag>
|
|
|
+ </span>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="remark" label="备注" min-width="150" :show-overflow-tooltip="true">
|
|
|
<template #default="scope">
|
|
|
- {{ scope.row.remark }}
|
|
|
+ {{ scope.row.remark || scope.row.bedRemark }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" width="180" align="center">
|
|
|
+ <el-table-column label="操作" width="180" align="center" fixed="right">
|
|
|
<template #default="scope">
|
|
|
<template v-if="!scope.row.isBed">
|
|
|
<!-- <el-button type="primary" link icon="Plus" @click="handleAddBed(scope.row)" /> -->
|
|
|
@@ -258,15 +303,20 @@ import { ref, computed, reactive, onMounted, nextTick, watch, getCurrentInstance
|
|
|
import { InfoFilled } from '@element-plus/icons-vue';
|
|
|
import type { DormTreeNode, BedInfo } from '@/api/xg/xgss/xsssfjgl/types';
|
|
|
import type { DormRoomVO } from '@/api/xg/xgss/dormRoom/types';
|
|
|
+import type { DormBedDetailVO } from '@/api/xg/xgss/dormBed/types';
|
|
|
+import type { XgStudentTreeVO } from '@/api/xg/xsjcxx/studentMsg/types';
|
|
|
import { getDormTree } from '@/api/xg/xgss/xsssfjgl';
|
|
|
-import { listDormBed, delDormBed, getDormBed } from '@/api/xg/xgss/dormBed';
|
|
|
+import { getBedDetailsByRoomId, delDormBed, getDormBed } from '@/api/xg/xgss/dormBed';
|
|
|
import { listDormRoom, delDormRoom } from '@/api/xg/xgss/dormRoom';
|
|
|
+import { getStudentTree } from '@/api/xg/xsjcxx/studentMsg';
|
|
|
+import ElMessage from 'element-plus/es/components/message/index';
|
|
|
+import ElMessageBox from 'element-plus/es/components/message-box/index';
|
|
|
|
|
|
// 引入子组件
|
|
|
import RoomDialog from './components/RoomDialog.vue';
|
|
|
import BedDialog from './components/BedDialog.vue';
|
|
|
|
|
|
-const { proxy } = getCurrentInstance();
|
|
|
+// const { proxy } = getCurrentInstance();
|
|
|
|
|
|
// 组件状态
|
|
|
const dormTreeRef = ref();
|
|
|
@@ -329,181 +379,7 @@ const bedDialog = reactive({
|
|
|
// 学生树相关数据
|
|
|
const studentTreeRef = ref();
|
|
|
const studentSearchKey = ref('');
|
|
|
-const studentTreeData = ref<any[]>([
|
|
|
- {
|
|
|
- id: 'grade-2025',
|
|
|
- label: '2025级',
|
|
|
- type: 'grade',
|
|
|
- children: [
|
|
|
- {
|
|
|
- id: 'college-cs-2025',
|
|
|
- label: '计算机学院',
|
|
|
- type: 'college',
|
|
|
- maleAssigned: 45,
|
|
|
- maleTotal: 120,
|
|
|
- femaleAssigned: 25,
|
|
|
- femaleTotal: 60,
|
|
|
- children: [
|
|
|
- {
|
|
|
- id: 'class-cs-1-2025',
|
|
|
- label: '计算机科学与技术1班',
|
|
|
- type: 'class',
|
|
|
- maleAssigned: 20,
|
|
|
- maleTotal: 40,
|
|
|
- femaleAssigned: 10,
|
|
|
- femaleTotal: 15
|
|
|
- },
|
|
|
- {
|
|
|
- id: 'class-cs-2-2025',
|
|
|
- label: '计算机科学与技术2班',
|
|
|
- type: 'class',
|
|
|
- maleAssigned: 25,
|
|
|
- maleTotal: 40,
|
|
|
- femaleAssigned: 15,
|
|
|
- femaleTotal: 20
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- id: 'college-ee-2025',
|
|
|
- label: '电子工程学院',
|
|
|
- type: 'college',
|
|
|
- maleAssigned: 55,
|
|
|
- maleTotal: 100,
|
|
|
- femaleAssigned: 35,
|
|
|
- femaleTotal: 50,
|
|
|
- children: [
|
|
|
- {
|
|
|
- id: 'class-ee-1-2025',
|
|
|
- label: '电子信息工程1班',
|
|
|
- type: 'class',
|
|
|
- maleAssigned: 30,
|
|
|
- maleTotal: 50,
|
|
|
- femaleAssigned: 20,
|
|
|
- femaleTotal: 25
|
|
|
- },
|
|
|
- {
|
|
|
- id: 'class-ee-2-2025',
|
|
|
- label: '电子信息工程2班',
|
|
|
- type: 'class',
|
|
|
- maleAssigned: 25,
|
|
|
- maleTotal: 50,
|
|
|
- femaleAssigned: 15,
|
|
|
- femaleTotal: 25
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- id: 'grade-2024',
|
|
|
- label: '2024级',
|
|
|
- type: 'grade',
|
|
|
- children: [
|
|
|
- {
|
|
|
- id: 'college-cs-2024',
|
|
|
- label: '计算机学院',
|
|
|
- type: 'college',
|
|
|
- maleAssigned: 110,
|
|
|
- maleTotal: 120,
|
|
|
- femaleAssigned: 58,
|
|
|
- femaleTotal: 60,
|
|
|
- children: [
|
|
|
- {
|
|
|
- id: 'class-cs-1-2024',
|
|
|
- label: '计算机科学与技术1班',
|
|
|
- type: 'class',
|
|
|
- maleAssigned: 38,
|
|
|
- maleTotal: 40,
|
|
|
- femaleAssigned: 14,
|
|
|
- femaleTotal: 15
|
|
|
- },
|
|
|
- {
|
|
|
- id: 'class-cs-2-2024',
|
|
|
- label: '计算机科学与技术2班',
|
|
|
- type: 'class',
|
|
|
- maleAssigned: 37,
|
|
|
- maleTotal: 40,
|
|
|
- femaleAssigned: 18,
|
|
|
- femaleTotal: 20
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- id: 'grade-2024',
|
|
|
- label: '2024级',
|
|
|
- type: 'grade',
|
|
|
- children: [
|
|
|
- {
|
|
|
- id: 'college-cs-2024',
|
|
|
- label: '计算机学院',
|
|
|
- type: 'college',
|
|
|
- maleAssigned: 110,
|
|
|
- maleTotal: 120,
|
|
|
- femaleAssigned: 58,
|
|
|
- femaleTotal: 60,
|
|
|
- children: [
|
|
|
- {
|
|
|
- id: 'class-cs-1-2024',
|
|
|
- label: '计算机科学与技术1班',
|
|
|
- type: 'class',
|
|
|
- maleAssigned: 38,
|
|
|
- maleTotal: 40,
|
|
|
- femaleAssigned: 14,
|
|
|
- femaleTotal: 15
|
|
|
- },
|
|
|
- {
|
|
|
- id: 'class-cs-2-2024',
|
|
|
- label: '计算机科学与技术2班',
|
|
|
- type: 'class',
|
|
|
- maleAssigned: 37,
|
|
|
- maleTotal: 40,
|
|
|
- femaleAssigned: 18,
|
|
|
- femaleTotal: 20
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- id: 'grade-2024',
|
|
|
- label: '2024级',
|
|
|
- type: 'grade',
|
|
|
- children: [
|
|
|
- {
|
|
|
- id: 'college-cs-2024',
|
|
|
- label: '计算机学院',
|
|
|
- type: 'college',
|
|
|
- maleAssigned: 110,
|
|
|
- maleTotal: 120,
|
|
|
- femaleAssigned: 58,
|
|
|
- femaleTotal: 60,
|
|
|
- children: [
|
|
|
- {
|
|
|
- id: 'class-cs-1-2024',
|
|
|
- label: '计算机科学与技术1班',
|
|
|
- type: 'class',
|
|
|
- maleAssigned: 38,
|
|
|
- maleTotal: 40,
|
|
|
- femaleAssigned: 14,
|
|
|
- femaleTotal: 15
|
|
|
- },
|
|
|
- {
|
|
|
- id: 'class-cs-2-2024',
|
|
|
- label: '计算机科学与技术2班',
|
|
|
- type: 'class',
|
|
|
- maleAssigned: 37,
|
|
|
- maleTotal: 40,
|
|
|
- femaleAssigned: 18,
|
|
|
- femaleTotal: 20
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
-]);
|
|
|
+const studentTreeData = ref<XgStudentTreeVO[]>([]);
|
|
|
|
|
|
/** 通过条件过滤节点 */
|
|
|
const filterNode = (value: string, data: DormTreeNode) => {
|
|
|
@@ -546,9 +422,9 @@ const getDormTreeData = async () => {
|
|
|
}
|
|
|
|
|
|
// 如果是宿舍楼但没有性别信息,添加宿舍楼性别类型
|
|
|
- if (node.type === 'building' && !node.buildingType) {
|
|
|
+ if (node.type === 'building' && !(node as any).buildingType) {
|
|
|
// 实际项目中应该从后端获取,这里先用随机分配,后续可以修改为从后端获取
|
|
|
- node.buildingType = Math.random() > 0.5 ? '1' : '2';
|
|
|
+ (node as any).buildingType = Math.random() > 0.5 ? '1' : '2';
|
|
|
}
|
|
|
|
|
|
// 递归处理子节点
|
|
|
@@ -565,20 +441,6 @@ const getDormTreeData = async () => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-/** 处理节点单击事件 */
|
|
|
-// const handleNodeClick = (data: DormTreeNode) => {
|
|
|
-// if (data.type !== 'building') {
|
|
|
-// // 如果不是宿舍楼,不进行操作
|
|
|
-// return;
|
|
|
-// }
|
|
|
-
|
|
|
-// // 设置选中的宿舍楼
|
|
|
-// selectedBuilding.value = data;
|
|
|
-// // 更新查询参数
|
|
|
-// queryParams.buildingId = data.id;
|
|
|
-// // 加载房间数据
|
|
|
-// handleQuery();
|
|
|
-// };
|
|
|
/** 处理节点单击事件 - 增加请求取消机制 */
|
|
|
const handleNodeClick = (data: DormTreeNode) => {
|
|
|
if (data.type !== 'building') {
|
|
|
@@ -613,11 +475,6 @@ const handleStudentNodeClick = (data: any) => {
|
|
|
// 这里可以实现学生节点点击后的相关功能
|
|
|
};
|
|
|
|
|
|
-/** 查询房间数据 */
|
|
|
-// const handleQuery = () => {
|
|
|
-// loadRoomData();
|
|
|
-// };
|
|
|
-
|
|
|
/** 重置查询条件 */
|
|
|
const resetQuery = () => {
|
|
|
queryFormRef.value?.resetFields();
|
|
|
@@ -627,62 +484,7 @@ const resetQuery = () => {
|
|
|
handleQuery();
|
|
|
};
|
|
|
|
|
|
-/** 加载房间数据 */
|
|
|
-// const loadRoomData = async () => {
|
|
|
-// if (!queryParams.buildingId) return;
|
|
|
-
|
|
|
-// loading.value = true;
|
|
|
-// try {
|
|
|
-// // 获取房间列表
|
|
|
-// const res = await listDormRoom(queryParams);
|
|
|
-// const rooms = res.rows || [];
|
|
|
-
|
|
|
-// // 存储临时结果
|
|
|
-// const tempList: any[] = [];
|
|
|
-
|
|
|
-// // 处理每个房间
|
|
|
-// for (const room of rooms) {
|
|
|
-// // 添加房间记录
|
|
|
-// const roomRecord = {
|
|
|
-// ...room,
|
|
|
-// isBed: false,
|
|
|
-// children: []
|
|
|
-// };
|
|
|
-
|
|
|
-// // 获取房间的床位信息
|
|
|
-// try {
|
|
|
-// const bedRes = await listDormBed({ roomId: room.id });
|
|
|
-// const beds = bedRes.rows || [];
|
|
|
-
|
|
|
-// // 将床位信息添加为房间的子项
|
|
|
-// if (beds.length > 0) {
|
|
|
-// roomRecord.children = beds.map((bed: any) => ({
|
|
|
-// ...bed,
|
|
|
-// isBed: true,
|
|
|
-// roomName: room.roomName // 保留房间名称,方便展示
|
|
|
-// }));
|
|
|
-// }
|
|
|
-// } catch (error) {
|
|
|
-// console.error(`获取房间 ${room.id} 的床位信息失败`, error);
|
|
|
-// }
|
|
|
-
|
|
|
-// tempList.push(roomRecord);
|
|
|
-// }
|
|
|
-
|
|
|
-// roomList.value = tempList;
|
|
|
-
|
|
|
-// // 重置选择状态
|
|
|
-// selectedRows.value = [];
|
|
|
-// selectedRoomCount.value = 0;
|
|
|
-// selectedBedCount.value = 0;
|
|
|
-// } catch (error) {
|
|
|
-// console.error('加载房间数据失败', error);
|
|
|
-// } finally {
|
|
|
-// loading.value = false;
|
|
|
-// }
|
|
|
-// };
|
|
|
-
|
|
|
-/** 加载房间数据 - 使用并行请求 */
|
|
|
+/** 加载房间数据 - 使用新的床位详细信息API */
|
|
|
const loadRoomData = async () => {
|
|
|
if (!queryParams.buildingId) return;
|
|
|
|
|
|
@@ -692,14 +494,13 @@ const loadRoomData = async () => {
|
|
|
try {
|
|
|
// 获取房间列表
|
|
|
const res = await listDormRoom({
|
|
|
- ...queryParams,
|
|
|
- signal: controller?.signal
|
|
|
+ ...queryParams
|
|
|
});
|
|
|
const rooms = res.rows || [];
|
|
|
|
|
|
if (controller?.signal?.aborted) return;
|
|
|
|
|
|
- // 并行获取所有房间的床位信息
|
|
|
+ // 并行获取所有房间的床位详细信息
|
|
|
const roomPromises = rooms.map(async (room) => {
|
|
|
// 创建房间记录
|
|
|
const roomRecord = {
|
|
|
@@ -709,26 +510,23 @@ const loadRoomData = async () => {
|
|
|
};
|
|
|
|
|
|
try {
|
|
|
- const bedRes = await listDormBed({
|
|
|
- roomId: room.id,
|
|
|
- signal: controller?.signal
|
|
|
- });
|
|
|
+ const bedDetailRes = await getBedDetailsByRoomId(room.id);
|
|
|
|
|
|
// 如果请求已被取消,不继续处理
|
|
|
if (controller?.signal?.aborted) return roomRecord;
|
|
|
|
|
|
- // 将床位信息添加为房间的子项
|
|
|
- if (bedRes.rows?.length > 0) {
|
|
|
- roomRecord.children = bedRes.rows.map((bed: any) => ({
|
|
|
- ...bed,
|
|
|
+ // 将床位详细信息添加为房间的子项
|
|
|
+ if (bedDetailRes.data?.length > 0) {
|
|
|
+ roomRecord.children = bedDetailRes.data.map((bedDetail: DormBedDetailVO) => ({
|
|
|
+ ...bedDetail,
|
|
|
isBed: true,
|
|
|
roomName: room.roomName // 保留房间名称,方便展示
|
|
|
}));
|
|
|
}
|
|
|
- } catch (error) {
|
|
|
+ } catch (error: any) {
|
|
|
// 忽略请求被取消的错误
|
|
|
if (error.name !== 'AbortError') {
|
|
|
- console.error(`获取房间 ${room.id} 的床位信息失败`, error);
|
|
|
+ console.error(`获取房间 ${room.id} 的床位详细信息失败`, error);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -747,7 +545,7 @@ const loadRoomData = async () => {
|
|
|
selectedRows.value = [];
|
|
|
selectedRoomCount.value = 0;
|
|
|
selectedBedCount.value = 0;
|
|
|
- } catch (error) {
|
|
|
+ } catch (error: any) {
|
|
|
// 忽略请求被取消的错误
|
|
|
if (error.name !== 'AbortError') {
|
|
|
console.error('加载房间数据失败', error);
|
|
|
@@ -764,7 +562,7 @@ const loadRoomData = async () => {
|
|
|
const handleAddRoom = () => {
|
|
|
if (!selectedBuilding.value) {
|
|
|
// 使用全局自动导入的 ElMessage
|
|
|
- proxy.$modal.msgWarning('请先选择宿舍楼');
|
|
|
+ ElMessage.warning('请先选择宿舍楼');
|
|
|
return;
|
|
|
}
|
|
|
roomDialog.title = '添加房间';
|
|
|
@@ -787,16 +585,15 @@ const handleEditRoom = (row: any) => {
|
|
|
|
|
|
/** 删除房间 */
|
|
|
const handleDeleteRoom = (row: any) => {
|
|
|
- proxy.$modal
|
|
|
- .confirm(`确定删除房间 ${row.roomName} 吗?`, '警告', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
+ ElMessageBox.confirm(`确定删除房间 ${row.roomName} 吗?`, '警告', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
.then(async () => {
|
|
|
try {
|
|
|
await delDormRoom(row.id);
|
|
|
- proxy.$modal.msgSuccess('删除成功');
|
|
|
+ ElMessage.success('删除成功');
|
|
|
loadRoomData(); // 刷新数据
|
|
|
} catch (error) {
|
|
|
console.error('删除房间失败', error);
|
|
|
@@ -828,16 +625,15 @@ const handleEditBed = (row: any) => {
|
|
|
|
|
|
/** 删除床位 */
|
|
|
const handleDeleteBed = (row: any) => {
|
|
|
- proxy.$modal
|
|
|
- .confirm(`确定删除床位 ${row.bedName} 吗?`, '警告', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
+ ElMessageBox.confirm(`确定删除床位 ${row.bedName} 吗?`, '警告', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
.then(async () => {
|
|
|
try {
|
|
|
await delDormBed(row.id);
|
|
|
- proxy.$modal.msgSuccess('删除成功');
|
|
|
+ ElMessage.success('删除成功');
|
|
|
loadRoomData(); // 刷新数据
|
|
|
} catch (error) {
|
|
|
console.error('删除床位失败', error);
|
|
|
@@ -930,9 +726,25 @@ watch(
|
|
|
{ deep: true }
|
|
|
);
|
|
|
|
|
|
-// 组件挂载时获取宿舍树数据
|
|
|
+// 获取学生信息树数据
|
|
|
+const getStudentTreeData = async () => {
|
|
|
+ try {
|
|
|
+ const res = await getStudentTree(101); // 默认使用二级学院ID 101
|
|
|
+ if (res.code === 200) {
|
|
|
+ studentTreeData.value = res.data || [];
|
|
|
+ } else {
|
|
|
+ ElMessage.error(res.msg || '获取学生信息树失败');
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('获取学生信息树失败:', error);
|
|
|
+ ElMessage.error('获取学生信息树失败');
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+// 组件挂载时获取宿舍树数据和学生树数据
|
|
|
onMounted(() => {
|
|
|
getDormTreeData();
|
|
|
+ getStudentTreeData();
|
|
|
if (currentController) {
|
|
|
currentController.abort();
|
|
|
currentController = null;
|
|
|
@@ -980,17 +792,22 @@ onMounted(() => {
|
|
|
height: 100%;
|
|
|
}
|
|
|
|
|
|
-/* 添加表格横向滚动样式 */
|
|
|
+/* 修复表格横向滚动样式 - 移除头部滚动条 */
|
|
|
.el-card :deep(.el-table) {
|
|
|
width: 100%;
|
|
|
overflow-x: auto;
|
|
|
}
|
|
|
|
|
|
-.el-card :deep(.el-table__body-wrapper),
|
|
|
-.el-card :deep(.el-table__header-wrapper) {
|
|
|
+.el-card :deep(.el-table__body-wrapper) {
|
|
|
overflow-x: auto !important;
|
|
|
}
|
|
|
|
|
|
+/* 移除头部横向滚动,只保留纵向滚动 */
|
|
|
+.el-card :deep(.el-table__header-wrapper) {
|
|
|
+ overflow-x: visible !important;
|
|
|
+ overflow-y: visible !important;
|
|
|
+}
|
|
|
+
|
|
|
.el-card :deep(.el-table__body),
|
|
|
.el-card :deep(.el-table__header) {
|
|
|
min-width: 100%;
|