提交学生信息管理界面的代码
This commit is contained in:
1 parent
dcecdbd6aa
commit
a1901ac611
11 files changed
+2159
-183
No files matched your search
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<el-row :gutter="20">
|
||||
<div style="display: flex; gap: 16px">
|
||||
<!-- 部门树 -->
|
||||
<el-col :lg="4" :xs="24" style="">
|
||||
<div style="width: 300px">
|
||||
<el-card shadow="hover">
|
||||
<el-input v-model="deptName" placeholder="请输入部门名称" prefix-icon="Search" clearable />
|
||||
<el-tree
|
||||
ref="deptTreeRef"
|
||||
class="mt-2"
|
||||
class="mt-2 dept-tree"
|
||||
node-key="id"
|
||||
:data="deptOptions"
|
||||
:props="{ label: 'label', children: 'children' } as any"
|
||||
@@ -18,8 +18,8 @@
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="20" :xs="24">
|
||||
</div>
|
||||
<div style="flex: 1; min-width: 0; /* 防止内容撑开容器 */">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
@@ -138,8 +138,8 @@
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog ref="formDialogRef" v-model="dialog.visible" :title="dialog.title" width="600px" append-to-body @close="closeDialog">
|
||||
@@ -664,3 +664,53 @@ async function handleDeptChange(value: number | string) {
|
||||
form.value.postIds = [];
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 部门树组件样式 */
|
||||
.dept-tree {
|
||||
height: 600px;
|
||||
overflow-y: auto;
|
||||
overflow-x: auto;
|
||||
width: 270px; /* 固定宽度,超出时显示滚动条 */
|
||||
min-width: 270px;
|
||||
}
|
||||
|
||||
/* 强制覆盖el-tree的默认样式 */
|
||||
.dept-tree :deep(.el-tree-node) {
|
||||
white-space: nowrap !important;
|
||||
width: max-content !important;
|
||||
min-width: max-content !important;
|
||||
}
|
||||
|
||||
.dept-tree :deep(.el-tree-node__content) {
|
||||
white-space: nowrap !important;
|
||||
min-width: max-content !important;
|
||||
width: max-content !important;
|
||||
overflow: visible !important;
|
||||
text-overflow: unset !important; /* 移除省略号 */
|
||||
max-width: none !important;
|
||||
}
|
||||
|
||||
.dept-tree :deep(.el-tree-node__label) {
|
||||
white-space: nowrap !important;
|
||||
display: inline-block !important;
|
||||
flex-shrink: 0 !important;
|
||||
max-width: none !important;
|
||||
overflow: visible !important;
|
||||
text-overflow: unset !important; /* 移除省略号效果 */
|
||||
width: max-content !important;
|
||||
}
|
||||
|
||||
.dept-tree :deep(.el-tree-node__expand-icon) {
|
||||
flex-shrink: 0 !important;
|
||||
}
|
||||
|
||||
/* 确保树容器内部元素都不被截断 */
|
||||
.dept-tree :deep(.el-tree-node__children) {
|
||||
width: max-content !important;
|
||||
}
|
||||
|
||||
.dept-tree :deep(.el-tree-node > .el-tree-node__children) {
|
||||
width: max-content !important;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user