木星 1 mēnesi atpakaļ
vecāks
revīzija
0870064e5e
6 mainītis faili ar 1187 papildinājumiem un 1162 dzēšanām
  1. 7 0
      package-lock.json
  2. 1 0
      package.json
  3. 1 1
      public/config.js
  4. 18 8
      src/components/left.vue
  5. 2 0
      src/main.js
  6. 1158 1153
      yarn.lock

+ 7 - 0
package-lock.json

@@ -26,6 +26,7 @@
26 26
         "vue3-video-play": "^1.3.1-beta.6"
27 27
       },
28 28
       "devDependencies": {
29
+        "@fcli/vue-auto-scroll": "^0.0.2",
29 30
         "@vitejs/plugin-vue": "^2.3.3",
30 31
         "sass": "^1.64.2",
31 32
         "skeleton-loader": "^2.0.0",
@@ -112,6 +113,12 @@
112 113
         "vue": "^3.2.0"
113 114
       }
114 115
     },
116
+    "node_modules/@fcli/vue-auto-scroll": {
117
+      "version": "0.0.2",
118
+      "resolved": "https://registry.npmmirror.com/@fcli/vue-auto-scroll/-/vue-auto-scroll-0.0.2.tgz",
119
+      "integrity": "sha512-qRxCH40ZVWh4NgUBfkL8LoIjo5JhOGeO8uVrCqdcPS1VQh/h/zzSUJRb8mDthY08V3b7bRayPGdzEPT5//HG+Q==",
120
+      "dev": true
121
+    },
115 122
     "node_modules/@floating-ui/core": {
116 123
       "version": "1.4.1",
117 124
       "resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.4.1.tgz",

+ 1 - 0
package.json

@@ -26,6 +26,7 @@
26 26
     "vue3-video-play": "^1.3.1-beta.6"
27 27
   },
28 28
   "devDependencies": {
29
+    "@fcli/vue-auto-scroll": "^0.0.2",
29 30
     "@vitejs/plugin-vue": "^2.3.3",
30 31
     "sass": "^1.64.2",
31 32
     "skeleton-loader": "^2.0.0",

+ 1 - 1
public/config.js

@@ -16,5 +16,5 @@ window.g = {
16 16
     // UE_IP: "http://192.168.4.159"
17 17
     // UE_IP: "http://127.0.0.1:80"
18 18
     // UE_IP: "ws://192.168.4.152:81"
19
-    UE_IP: "ws://192.168.4.148:88"
19
+    UE_IP: "http://192.168.4.101:81/"
20 20
 };

+ 18 - 8
src/components/left.vue

@@ -127,7 +127,7 @@
127 127
               <template #dropdown>
128 128
                 <el-dropdown-menu>
129 129
                   <el-dropdown-item :command="item.leaf" v-for="(item, index) in leafs" :key="index">{{ item.leaf_name
130
-                    }}</el-dropdown-item>
130
+                  }}</el-dropdown-item>
131 131
                 </el-dropdown-menu>
132 132
               </template>
133 133
             </el-dropdown>
@@ -157,10 +157,10 @@
157 157
               height: scrollContainerHeight + 'px',
158 158
               overflow: 'hidden',
159 159
               paddingTop: '10px',
160
-            }" v-if="classRoomList.length > 0">
161
-              <scroll :content="classRoomList" class="vue3-seamless-scroll" :hover="true" :wheel="true" direction="top"
162
-                ref="scrollRef" :mask="false">
163
-                <template #default="{ item }">
160
+            }" v-if="classRoomList.length > 0 && isShhow">
161
+              <vue-auto-scroll :data="classRoomList" :steep="0.5" scrollDirection="top" :isRoller="true"
162
+                :rollerScrollDistance="50">
163
+                <div class="li" v-for="(item, index) in classRoomList" :key="index">
164 164
                   <div class="list-item">
165 165
                     <div class="class-status-btn-container">
166 166
                       <div class="left-class-status">
@@ -197,8 +197,11 @@
197 197
                       </div>
198 198
                     </div>
199 199
                   </div>
200
-                </template>
201
-              </scroll>
200
+                </div>
201
+
202
+
203
+
204
+              </vue-auto-scroll>
202 205
             </div>
203 206
 
204 207
             <div v-else class="empty-container">
@@ -285,6 +288,7 @@ import Scroll from "./ScrollView.vue";
285 288
 // import { callUIInteraction } from "../webrtcVideo";
286 289
 import Tag from "./Tag.vue";
287 290
 
291
+
288 292
 export default {
289 293
   name: "Histogram",
290 294
   components: {
@@ -295,6 +299,7 @@ export default {
295 299
     ElCarouselItem,
296 300
     CircleProgress,
297 301
     Tag,
302
+
298 303
     Vue3SeamlessScroll,
299 304
     VerticalScroll,
300 305
     Scroll,
@@ -303,6 +308,8 @@ export default {
303 308
   setup(_, { emit }) {
304 309
     // 教室分类统计
305 310
     const classRoomCount = ref([]);
311
+
312
+    const isShhow = ref(true)
306 313
     const generateData = (totalNum, bigvalue, smallvalue, color) => {
307 314
       let dataArr = [];
308 315
       for (var i = 0; i < totalNum; i++) {
@@ -752,6 +759,7 @@ export default {
752 759
     };
753 760
     let classRoomList = ref([]);
754 761
     const getClassRoomList = async () => {
762
+      isShhow.value = false;
755 763
       let res = await queryClassroom({
756 764
         classRoomName: searchData.value,
757 765
         category: category.value,
@@ -762,6 +770,7 @@ export default {
762 770
       classRoomList.value = [];
763 771
       // setTimeout(() => {
764 772
       classRoomList.value = res.data;
773
+      isShhow.value = true;
765 774
       // scrollRef.value.reset()
766 775
       // }, 0);
767 776
     };
@@ -820,7 +829,8 @@ export default {
820 829
       offset,
821 830
       scrollContainerHeight,
822 831
       scrollContainerRef,
823
-      noData
832
+      noData,
833
+      isShhow
824 834
     };
825 835
   },
826 836
 };

+ 2 - 0
src/main.js

@@ -2,6 +2,7 @@ import { createApp } from 'vue'
2 2
 import App from './App.vue'
3 3
 import router from './router'
4 4
 import 'amfe-flexible'
5
+import VueAutoScroll from '@fcli/vue-auto-scroll';
5 6
 // 全局引入弹出框
6 7
 // import { ElMessage } from 'element-plus'
7 8
 import 'element-plus/dist/index.css'
@@ -19,6 +20,7 @@ const app = createApp(App)
19 20
 console.log("全局的app", app)
20 21
 app.use(router)
21 22
 app.use(vue3videoPlay)
23
+app.use(VueAutoScroll);
22 24
 // app.config.globalProperties.$message = ElMessage;
23 25
 // app.use(ElMessage)
24 26
 app.mount("#app")

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1158 - 1153
yarn.lock