Selaa lähdekoodia

添加看板显示隐藏

mifei 1 kuukausi sitten
vanhempi
commit
858b2b1d14
4 muutettua tiedostoa jossa 95 lisäystä ja 66 poistoa
  1. 9 1
      src/assets/css/left.scss
  2. 19 13
      src/components/home.vue
  3. 59 51
      src/components/left.vue
  4. 8 1
      src/components/right.vue

+ 9 - 1
src/assets/css/left.scss

@@ -148,6 +148,8 @@
148 148
         overflow: hidden;
149 149
         box-sizing: border-box;
150 150
         width: 392px;
151
+        display: flex;
152
+        flex-direction: column;
151 153
         //  height: 219px;
152 154
         //  border: 2px solid #5F7BDC;
153 155
 
@@ -157,11 +159,14 @@
157 159
             padding-top: 0;
158 160
             height: 100%;
159 161
             overflow: hidden;
162
+            flex: 1;
160 163
         }
161 164
 
162 165
         .table {
163 166
             width: 100%;
164
-
167
+            height: 100%;
168
+            display: flex;
169
+            flex-direction: column;
165 170
             .th {
166 171
                 font-weight: 700;
167 172
                 display: flex;
@@ -330,6 +335,9 @@
330 335
                 }
331 336
 
332 337
             }
338
+            .scroll-container{
339
+                flex: 1;
340
+            }
333 341
 
334 342
             .vue3-seamless-scroll {
335 343
                 overflow: scroll;

+ 19 - 13
src/components/home.vue

@@ -1,9 +1,9 @@
1 1
 <template>
2 2
   <!-- <div class="container" > -->
3 3
   <Header />
4
-  <!-- <el-container> -->
5
-  <Left ref="childRef" @childMethod="childMethod"></Left>
6
-  <right></right>
4
+
5
+  <Left v-if="isShowLeft" ref="childRef" @childMethod="childMethod"></Left>
6
+  <right v-if="isShowRight"></right>
7 7
   <div
8 8
     ref="linedomRef"
9 9
     style="
@@ -93,8 +93,7 @@
93 93
     width="40%"
94 94
     align="left"
95 95
     top="30vh"
96
-  
97
-    style="z-index: 2015;background: rgba(0, 0, 0, 0) ;padding:0px;"
96
+    style="z-index: 2015; background: rgba(0, 0, 0, 0); padding: 0px"
98 97
   >
99 98
     <el-table
100 99
       :data="deviceDetailsList"
@@ -139,7 +138,7 @@
139 138
       width="15%"
140 139
       align="left"
141 140
       top="40vh"
142
-      style="z-index: 2019; background: rgba(0, 0, 0, 0);padding:0px"
141
+      style="z-index: 2019; background: rgba(0, 0, 0, 0); padding: 0px"
143 142
       :modal="false"
144 143
     >
145 144
       <div class="details-container">
@@ -207,6 +206,8 @@ export default {
207 206
   setup() {
208 207
     const titleDialog = ref("");
209 208
     const orientation = ref("");
209
+    const isShowLeft = ref(true);
210
+    const isShowRight = ref(true);
210 211
     // 视频数据
211 212
     const videoData = reactive({
212 213
       width: "100%", //播放器高度
@@ -332,7 +333,6 @@ export default {
332 333
         name: "多媒体设备",
333 334
         status: "异常",
334 335
       },
335
-      
336 336
     ]);
337 337
     let deviceDetails = ref({});
338 338
 
@@ -485,6 +485,10 @@ export default {
485 485
           deviceDetailsList.value = res.data;
486 486
         });
487 487
       }
488
+      if (JSON.parse(data).MainServiceName == "KanBanShouQi") {
489
+        isShowLeft.value = JSON.parse(data).PutAwayState;
490
+        isShowRight.value = JSON.parse(data).PutAwayState;
491
+      }
488 492
     };
489 493
     const windowSize = function () {
490 494
       // console.log("监听一下窗口是不是改了--click", lineContainer);
@@ -528,7 +532,9 @@ export default {
528 532
       lookDetails,
529 533
       deviceDetailsList,
530 534
       deviceDialog,
531
-      deviceDetails
535
+      deviceDetails,
536
+      isShowLeft,
537
+      isShowRight,
532 538
     };
533 539
   },
534 540
 };
@@ -538,10 +544,10 @@ export default {
538 544
 @import "../assets/css/home.scss";
539 545
 
540 546
 :deep(.el-dialog__header) {
541
-    height: 49px;
542
-    line-height: 49px;
543
-    padding: 0;
544
-    background-color: #1b67d9;
545
-    margin-right: 0;
547
+  height: 49px;
548
+  line-height: 49px;
549
+  padding: 0;
550
+  background-color: #1b67d9;
551
+  margin-right: 0;
546 552
 }
547 553
 </style>

+ 59 - 51
src/components/left.vue

@@ -206,65 +206,65 @@
206 206
             class="scroll"
207 207
           > -->
208 208
           <!-- <div v-if="classRoomList.length > 0" style="width: 100%; height: 100%"> -->
209
-          <div
210
-            style="height: 342px; overflow: hidden; padding-top: 10px"
211
-            v-if="classRoomList.length > 0"
212
-          >
213
-            <scroll
214
-             
215
-              :content="classRoomList"
216
-              class="vue3-seamless-scroll"
217
-              :hover="true"
218
-              :wheel="true"
219
-              direction="top"
220
-              ref="scrollRef"
221
-              :mask="false"
222
-            
209
+          <div class="scroll-container" ref="scrollContainerRef">
210
+            <div
211
+              
212
+              :style="{height:scrollContainerHeight+'px',overflow: 'hidden',paddingTop: '10px'}"
213
+              v-if="classRoomList.length > 0"
223 214
             >
224
-              <template #default="{item}" >
225
-                <div  class="list-item" >
226
-                  <div class="class-status-btn-container">
227
-                    <div class="left-class-status">
228
-                      <div style="margin-right: 16px">
229
-                        {{ item.classroom_name }}
215
+              <scroll
216
+                :content="classRoomList"
217
+                class="vue3-seamless-scroll"
218
+                :hover="true"
219
+                :wheel="true"
220
+                direction="top"
221
+                ref="scrollRef"
222
+                :mask="false"
223
+              >
224
+                <template #default="{ item }">
225
+                  <div class="list-item">
226
+                    <div class="class-status-btn-container">
227
+                      <div class="left-class-status">
228
+                        <div style="margin-right: 16px">
229
+                          {{ item.classroom_name }}
230
+                        </div>
231
+                        <Tag :text="item.status_code"></Tag>
230 232
                       </div>
231
-                      <Tag :text="item.status_code"></Tag>
232
-                    </div>
233
-                    <div class="right-btn" @click.prevent="handleRoom(item)">
234
-                      查看
235
-                    </div>
236
-                  </div>
237
-
238
-                  <div class="item-content">
239
-                    <div class="item-content-left">
240
-                      <div class="position">位置:{{ item.location }}</div>
241
-                      <div class="course" v-if="item.course_name">
242
-                        课程:{{ item.course_name }}
233
+                      <div class="right-btn" @click.prevent="handleRoom(item)">
234
+                        查看
243 235
                       </div>
244 236
                     </div>
245
-                    <div class="item-content-right">
246
-                      <div>类型:{{ item.category }}</div>
247
-                      <div class="person-rate-container">
248
-                        <div v-if="item.actual != null">
249
-                          实到/应到:{{ item.actual }}/{{ item.expected }}
237
+
238
+                    <div class="item-content">
239
+                      <div class="item-content-left">
240
+                        <div class="position">位置:{{ item.location }}</div>
241
+                        <div class="course" v-if="item.course_name">
242
+                          课程:{{ item.course_name }}
250 243
                         </div>
251
-                        <div
252
-                          style="margin-left: 8px"
253
-                          v-if="item.actual != null"
254
-                        >
255
-                          到课率:{{
256
-                            (item.actual / item.expected).toFixed(2) * 100 || 0
257
-                          }}%
244
+                      </div>
245
+                      <div class="item-content-right">
246
+                        <div>类型:{{ item.category }}</div>
247
+                        <div class="person-rate-container">
248
+                          <div v-if="item.actual != null">
249
+                            实到/应到:{{ item.actual }}/{{ item.expected }}
250
+                          </div>
251
+                          <div
252
+                            style="margin-left: 8px"
253
+                            v-if="item.actual != null"
254
+                          >
255
+                            到课率:{{
256
+                              (item.actual / item.expected).toFixed(2) * 100 ||
257
+                              0
258
+                            }}%
259
+                          </div>
258 260
                         </div>
259 261
                       </div>
260 262
                     </div>
261 263
                   </div>
262
-                </div>
263
-              </template>
264
-            </scroll>
264
+                </template>
265
+              </scroll>
266
+            </div>
265 267
           </div>
266
-
267
-          
268 268
         </div>
269 269
         <!-- </div> -->
270 270
       </div>
@@ -373,7 +373,7 @@ export default {
373 373
     Tag,
374 374
     Vue3SeamlessScroll,
375 375
     VerticalScroll,
376
-    Scroll
376
+    Scroll,
377 377
   },
378 378
   setup(_, { emit }) {
379 379
     // 教室分类统计
@@ -658,6 +658,8 @@ export default {
658 658
 
659 659
     let timer = ref(null);
660 660
     let testMain = ref(null);
661
+    let scrollContainerRef =ref(null)
662
+    let scrollContainerHeight = ref(null)
661 663
     onMounted(() => {
662 664
       getClassData();
663 665
       start();
@@ -665,6 +667,11 @@ export default {
665 667
       getClassSelections();
666 668
       //获取教室列表数据
667 669
       getClassRoomList();
670
+      scrollContainerHeight.value =scrollContainerRef.value.clientHeight
671
+      window.addEventListener("resize", function () {
672
+        scrollContainerHeight.value =scrollContainerRef.value.clientHeight
673
+      });
674
+
668 675
     });
669 676
 
670 677
     onBeforeUnmount(() => {
@@ -802,7 +809,6 @@ export default {
802 809
     let scrollRef = ref(null);
803 810
     const offset = () => {
804 811
       console.log("滚动完成一次");
805
-      
806 812
     };
807 813
     const searchHandel = async () => {
808 814
       getClassRoomList();
@@ -874,6 +880,8 @@ export default {
874 880
       cureetStatus,
875 881
       scrollRef,
876 882
       offset,
883
+      scrollContainerHeight,
884
+      scrollContainerRef
877 885
     };
878 886
   },
879 887
 };

+ 8 - 1
src/components/right.vue

@@ -44,7 +44,7 @@
44 44
           <countTo
45 45
             :startVal="0"
46 46
             :endVal="item.number"
47
-            :decimals="2"
47
+            :decimals="0"
48 48
             :duration="3000"
49 49
           ></countTo>
50 50
           <img :src="deviceImg + item.icon + '.png'" alt="" />
@@ -618,4 +618,11 @@ export default {
618 618
 .d-player-video{
619 619
   display: flex;
620 620
 }
621
+
622
+
623
+.el-drawer{
624
+  background-color: transparent !important;
625
+  padding: 0px !important;
626
+  box-shadow:none !important;
627
+}
621 628
 </style>