Browse Source

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

mifei 1 week ago
parent
commit
22a2444b14
3 changed files with 18 additions and 30 deletions
  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
                         border-radius: 2px;
488
                         border-radius: 2px;
489
                         background: #0082D3;
489
                         background: #0082D3;
490
                         cursor: pointer;
490
                         cursor: pointer;
491
-
491
+                        
492
 
492
 
493
 
493
 
494
 
494
 
@@ -501,6 +501,10 @@
501
                         font-weight: 400;
501
                         font-weight: 400;
502
                         line-height: normal;
502
                         line-height: normal;
503
                     }
503
                     }
504
+                    .disable-btn{
505
+                        background: #888;
506
+                        cursor: not-allowed; 
507
+                    }
504
                 }
508
                 }
505
 
509
 
506
                 .item-content {
510
                 .item-content {

+ 1 - 0
src/components/home.vue

@@ -1,6 +1,7 @@
1
 <template>
1
 <template>
2
   <!-- <div class="container" > -->
2
   <!-- <div class="container" > -->
3
   <Header />
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
   <img class="bg-shadow" :src="bgShadow" alt="" srcset="">
5
   <img class="bg-shadow" :src="bgShadow" alt="" srcset="">
5
   <div v-show="isShowLeftAndRight">
6
   <div v-show="isShowLeftAndRight">
6
     <Left ref="childRef" @childMethod="childMethod" :isShow="isShowLeftAndRight"></Left>
7
     <Left ref="childRef" @childMethod="childMethod" :isShow="isShowLeftAndRight"></Left>

+ 12 - 29
src/components/left.vue

@@ -235,7 +235,7 @@
235
 								paddingTop: '10px',
235
 								paddingTop: '10px',
236
 							}"
236
 							}"
237
 							v-if="classRoomList.length > 0 && isShhow && isShow">
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
 								<div class="li" v-for="(item, index) in classRoomList" :key="index">
239
 								<div class="li" v-for="(item, index) in classRoomList" :key="index">
240
 									<div class="list-item">
240
 									<div class="list-item">
241
 										<div class="class-status-btn-container">
241
 										<div class="class-status-btn-container">
@@ -245,9 +245,10 @@
245
 												</div>
245
 												</div>
246
 												<Tag :text="item.status_code"></Tag>
246
 												<Tag :text="item.status_code"></Tag>
247
 											</div>
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
 										<div class="item-content">
252
 										<div class="item-content">
252
 											<div class="item-content-left">
253
 											<div class="item-content-left">
253
 												<div class="position" :title="item.location">位置:{{ item.location }}</div>
254
 												<div class="position" :title="item.location">位置:{{ item.location }}</div>
@@ -603,27 +604,9 @@ export default {
603
 		let classInfo = ref({});
604
 		let classInfo = ref({});
604
 		const handleRoom = function (item) {
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
 			//发消息给UE
610
 			//发消息给UE
628
 			let data = {
611
 			let data = {
629
 				MainServiceName: "JiaoShiShiNei",
612
 				MainServiceName: "JiaoShiShiNei",
@@ -790,7 +773,7 @@ export default {
790
 		};
773
 		};
791
 		let classRoomList = ref([]);
774
 		let classRoomList = ref([]);
792
 		const getClassRoomList = async () => {
775
 		const getClassRoomList = async () => {
793
-			isShhow.value = false;
776
+			// isShhow.value = false;
794
 			let res = await queryClassroom({
777
 			let res = await queryClassroom({
795
 				classRoomName: searchData.value,
778
 				classRoomName: searchData.value,
796
 				category: category.value,
779
 				category: category.value,
@@ -798,12 +781,12 @@ export default {
798
 				statusCode: statusCode.value,
781
 				statusCode: statusCode.value,
799
 				gisLeaf: gisLeaf.value,
782
 				gisLeaf: gisLeaf.value,
800
 			});
783
 			});
801
-			// classRoomList.value = [];
802
-			// setTimeout(() => {
784
+			classRoomList.value = [];
785
+			setTimeout(() => {
803
 			classRoomList.value = res.data;
786
 			classRoomList.value = res.data;
804
-			isShhow.value = true;
787
+			// isShhow.value = true;
805
 			// scrollRef.value.reset()
788
 			// scrollRef.value.reset()
806
-			// }, 0);
789
+			}, 0);
807
 		};
790
 		};
808
 		let deviceDialog = ref(true);
791
 		let deviceDialog = ref(true);
809
 		const showDeviceDialog = () => {
792
 		const showDeviceDialog = () => {