chengjie 6 ay önce
ebeveyn
işleme
50427accf1
1 değiştirilmiş dosya ile 77 ekleme ve 18 silme
  1. 77 18
      public/mg/mps_school.html

+ 77 - 18
public/mg/mps_school.html

@@ -15,12 +15,11 @@
15
         .main00 {
15
         .main00 {
16
             width: 100%;
16
             width: 100%;
17
             height: 100vh;
17
             height: 100vh;
18
-            /* 使用视口高度确保全屏 */
19
             min-height: 600px;
18
             min-height: 600px;
20
-            /* 设置最小高度 */
21
             background: white;
19
             background: white;
22
             display: flex;
20
             display: flex;
23
             flex-direction: column;
21
             flex-direction: column;
22
+            overflow: hidden; /* 防止出现滚动条 */
24
         }
23
         }
25
 
24
 
26
         .ListTop {
25
         .ListTop {
@@ -29,6 +28,7 @@
29
             background: white;
28
             background: white;
30
             border-bottom: 1px solid #EEEEEE;
29
             border-bottom: 1px solid #EEEEEE;
31
             justify-content: flex-start;
30
             justify-content: flex-start;
31
+            flex-shrink: 0; /* 防止头部被压缩 */
32
         }
32
         }
33
 
33
 
34
         .ListTop3 {
34
         .ListTop3 {
@@ -68,14 +68,12 @@
68
         .main0 {
68
         .main0 {
69
             width: 100%;
69
             width: 100%;
70
             background: white;
70
             background: white;
71
-            align-items: flex-start;
72
-            height: calc(100vh - 60px);
73
-            /* 使用视口高度减去标题栏 */
74
-            min-height: 540px;
75
-            /* 600px - 60px */
71
+            flex: 1; /* 使用flex: 1代替固定高度 */
72
+            min-height: 0; /* 确保flex子项可以收缩 */
76
             overflow: hidden;
73
             overflow: hidden;
77
-            /* 防止内部滚动影响外部 */
78
             display: flex;
74
             display: flex;
75
+            position: relative;
76
+            align-items: flex-start;
79
         }
77
         }
80
 
78
 
81
         .school-list {
79
         .school-list {
@@ -84,26 +82,29 @@
84
             background: #F9F9F9;
82
             background: #F9F9F9;
85
             display: flex;
83
             display: flex;
86
             flex-direction: column;
84
             flex-direction: column;
87
-            align-items: flex-start;
88
-            height: calc(100vh - 120px);
89
-            /* 视口高度减去标题栏和搜索框 */
90
-            min-height: 480px;
91
-            /* 600px - 120px */
85
+            height: 100%;
92
             position: relative;
86
             position: relative;
93
             flex-shrink: 0;
87
             flex-shrink: 0;
94
-            /* 防止flex压缩 */
95
         }
88
         }
96
 
89
 
97
         .school-list-scrollable {
90
         .school-list-scrollable {
98
             flex: 1;
91
             flex: 1;
99
             overflow-y: auto;
92
             overflow-y: auto;
100
             width: 100%;
93
             width: 100%;
94
+            min-height: 0; /* 确保flex子项可以收缩 */
95
+            display: flex;
96
+            flex-direction: column;
97
+        }
98
+
99
+        .search-box {
100
+            flex-shrink: 0; /* 防止搜索框被压缩 */
101
         }
101
         }
102
 
102
 
103
         .school-detail {
103
         .school-detail {
104
             width: calc(100% - 400px);
104
             width: calc(100% - 400px);
105
             padding: 20px;
105
             padding: 20px;
106
             overflow-y: auto;
106
             overflow-y: auto;
107
+            margin-top: 50px;
107
         }
108
         }
108
 
109
 
109
         .search-box {
110
         .search-box {
@@ -111,12 +112,13 @@
111
             border-bottom: 1px solid #EEEEEE;
112
             border-bottom: 1px solid #EEEEEE;
112
             background: white;
113
             background: white;
113
             width: 100%;
114
             width: 100%;
115
+            justify-content: center;
114
         }
116
         }
115
 
117
 
116
         .search-input {
118
         .search-input {
117
             width: 200px;
119
             width: 200px;
118
             height: 32px;
120
             height: 32px;
119
-            padding: 0 12px;
121
+            padding: 0 32px 0 12px;
120
             border: 1px solid #DDDDDD;
122
             border: 1px solid #DDDDDD;
121
             border-radius: 4px;
123
             border-radius: 4px;
122
             font-size: 14px;
124
             font-size: 14px;
@@ -432,6 +434,51 @@
432
         .toast.info {
434
         .toast.info {
433
             background: #2196F3;
435
             background: #2196F3;
434
         }
436
         }
437
+        
438
+        /* 清空按钮样式 */
439
+        .clear-btn {
440
+            position: absolute;
441
+            right: 12px;
442
+            top: 50%;
443
+            transform: translateY(-50%);
444
+            width: 16px;
445
+            height: 16px;
446
+            background-color: #999;
447
+            border-radius: 50%;
448
+            display: flex;
449
+            align-items: center;
450
+            justify-content: center;
451
+            cursor: pointer;
452
+            transition: background-color 0.2s;
453
+        }
454
+        
455
+        .clear-btn:hover {
456
+            background-color: #666;
457
+        }
458
+        
459
+        .clear-x {
460
+            position: relative;
461
+            width: 8px;
462
+            height: 8px;
463
+        }
464
+        
465
+        .clear-x:before, .clear-x:after {
466
+            content: '';
467
+            position: absolute;
468
+            width: 8px;
469
+            height: 2px;
470
+            background-color: white;
471
+            top: 3px;
472
+            left: 0;
473
+        }
474
+        
475
+        .clear-x:before {
476
+            transform: rotate(45deg);
477
+        }
478
+        
479
+        .clear-x:after {
480
+            transform: rotate(-45deg);
481
+        }
435
     </style>
482
     </style>
436
 </head>
483
 </head>
437
 
484
 
@@ -446,8 +493,13 @@
446
             <!-- 左侧学校列表 -->
493
             <!-- 左侧学校列表 -->
447
             <div class="school-list FlexColumn">
494
             <div class="school-list FlexColumn">
448
                 <div class="search-box FlexRow">
495
                 <div class="search-box FlexRow">
449
-                    <input type="text" class="search-input" v-model="searchText" @input="debounceSearch"
450
-                        @keyup.enter="searchSchools" placeholder="输入学校名称搜索...">
496
+                    <div style="position: relative;">
497
+                        <input type="text" class="search-input" v-model="searchText" @input="debounceSearch"
498
+                            @keyup.enter="searchSchools" placeholder="输入学校名称搜索...">
499
+                        <div class="clear-btn" v-show="searchText" @click="clearSearch">
500
+                            <span class="clear-x"></span>
501
+                        </div>
502
+                    </div>
451
                     <div class="btn33 btn31 btn FlexRow" @click="searchSchools">
503
                     <div class="btn33 btn31 btn FlexRow" @click="searchSchools">
452
                         <img title="搜索" alt="搜索"
504
                         <img title="搜索" alt="搜索"
453
                             src="https://kylx365-1253256735.file.myqcloud.com/web/universalpic_search_gray_30x30.png"
505
                             src="https://kylx365-1253256735.file.myqcloud.com/web/universalpic_search_gray_30x30.png"
@@ -500,7 +552,9 @@
500
             </div>
552
             </div>
501
 
553
 
502
             <!-- 右侧学校详情 -->
554
             <!-- 右侧学校详情 -->
503
-            <div class="school-detail FlexColumn" v-if="!selectedSchool"></div>
555
+            <div class="school-detail FlexColumn" v-if="!selectedSchool">
556
+                <div style="font-size:36px;margin-top: 340px;">欢迎使用学校信息管理平台</div>
557
+            </div>
504
             <div class="school-detail FlexColumn" v-if="selectedSchool">
558
             <div class="school-detail FlexColumn" v-if="selectedSchool">
505
                 <form @submit.prevent="saveSchool">
559
                 <form @submit.prevent="saveSchool">
506
                     <!-- 基本信息 -->
560
                     <!-- 基本信息 -->
@@ -830,6 +884,11 @@
830
                     showToastFlag: false
884
                     showToastFlag: false
831
                 },
885
                 },
832
                 methods: {
886
                 methods: {
887
+                    // 清空搜索
888
+                    clearSearch() {
889
+                        this.searchText = '';
890
+                        this.loadDistricts();
891
+                    },
833
                     // 搜索学校
892
                     // 搜索学校
834
                     searchSchools() {
893
                     searchSchools() {
835
                         // 如果搜索框为空,恢复所有学校显示
894
                         // 如果搜索框为空,恢复所有学校显示