Selaa lähdekoodia

滚动列表没有建模的按钮灰质

mifei 1 viikko sitten
vanhempi
commit
22a2444b14
3 muutettua tiedostoa jossa 18 lisäystä ja 30 poistoa
  1. 5 1
      src/assets/css/left.scss
  2. 1 0
      src/components/home.vue
  3. 12 29
      src/components/left.vue

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

@@ -488,7 +488,7 @@
488 488
                         border-radius: 2px;
489 489
                         background: #0082D3;
490 490
                         cursor: pointer;
491
-
491
+                        
492 492
 
493 493
 
494 494
 
@@ -501,6 +501,10 @@
501 501
                         font-weight: 400;
502 502
                         line-height: normal;
503 503
                     }
504
+                    .disable-btn{
505
+                        background: #888;
506
+                        cursor: not-allowed; 
507
+                    }
504 508
                 }
505 509
 
506 510
                 .item-content {

+ 1 - 0
src/components/home.vue

@@ -1,6 +1,7 @@
1 1
 <template>
2 2
   <!-- <div class="container" > -->
3 3
   <Header />
4
+  <!-- <div @click="isShowLeftAndRight =!isShowLeftAndRight" style="position:fixed;top:10px;left:10px;width:50px;height:50px;background-color:red;z-index:99999"></div> -->
4 5
   <img class="bg-shadow" :src="bgShadow" alt="" srcset="">
5 6
   <div v-show="isShowLeftAndRight">
6 7
     <Left ref="childRef" @childMethod="childMethod" :isShow="isShowLeftAndRight"></Left>

+ 12 - 29
src/components/left.vue

@@ -235,7 +235,7 @@
235 235
 								paddingTop: '10px',
236 236
 							}"
237 237
 							v-if="classRoomList.length > 0 && isShhow && isShow">
238
-							<vue-auto-scroll :steep="0.5" scrollDirection="top" :isRoller="true" :rollerScrollDistance="50">
238
+							<vue-auto-scroll :steep="0.5" scrollDirection="top" :isRoller="true" :data="classRoomList" :rollerScrollDistance="50">
239 239
 								<div class="li" v-for="(item, index) in classRoomList" :key="index">
240 240
 									<div class="list-item">
241 241
 										<div class="class-status-btn-container">
@@ -245,9 +245,10 @@
245 245
 												</div>
246 246
 												<Tag :text="item.status_code"></Tag>
247 247
 											</div>
248
-											<div class="right-btn" @click.prevent="handleRoom(item)">查看</div>
249
-										</div>
248
+											<div class="right-btn" :class="{'disable-btn':(item.building_name !='1号教学楼')}"  @click.prevent="handleRoom(item)">查看</div>
249
+										</div> 
250 250
 
251
+										
251 252
 										<div class="item-content">
252 253
 											<div class="item-content-left">
253 254
 												<div class="position" :title="item.location">位置:{{ item.location }}</div>
@@ -603,27 +604,9 @@ export default {
603 604
 		let classInfo = ref({});
604 605
 		const handleRoom = function (item) {
605 606
 			//查看前隐藏
606
-			// let a1 = document.getElementById("popoverRef");
607
-			// a1.style.display = "none";
608
-
609
-			// emit("childMethod");
610
-
611
-			// console.log("kankanitem", item);
612
-			// setTimeout(() => {
613
-			//   roomVisible.value = true;
614
-			//   classInfo.value = item;
615
-
616
-			//   classInfo.value.online =
617
-			//     classInfo.value.status == "在用" ? true : false;
618
-			// }, 2400);
619
-
620
-			// mousemoveHandler(1000, 60);
621
-
622
-			// let meg = item;
623
-
624
-			// // let a2 =`roomName=${item.class}`
625
-
626
-			// console.log("meg是多少", meg);
607
+			if(item.building_name !='1号教学楼'){
608
+				return
609
+			}
627 610
 			//发消息给UE
628 611
 			let data = {
629 612
 				MainServiceName: "JiaoShiShiNei",
@@ -790,7 +773,7 @@ export default {
790 773
 		};
791 774
 		let classRoomList = ref([]);
792 775
 		const getClassRoomList = async () => {
793
-			isShhow.value = false;
776
+			// isShhow.value = false;
794 777
 			let res = await queryClassroom({
795 778
 				classRoomName: searchData.value,
796 779
 				category: category.value,
@@ -798,12 +781,12 @@ export default {
798 781
 				statusCode: statusCode.value,
799 782
 				gisLeaf: gisLeaf.value,
800 783
 			});
801
-			// classRoomList.value = [];
802
-			// setTimeout(() => {
784
+			classRoomList.value = [];
785
+			setTimeout(() => {
803 786
 			classRoomList.value = res.data;
804
-			isShhow.value = true;
787
+			// isShhow.value = true;
805 788
 			// scrollRef.value.reset()
806
-			// }, 0);
789
+			}, 0);
807 790
 		};
808 791
 		let deviceDialog = ref(true);
809 792
 		const showDeviceDialog = () => {