木星 1 month ago
parent
commit
0870064e5e
6 changed files with 1187 additions and 1162 deletions
  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
         "vue3-video-play": "^1.3.1-beta.6"
26
         "vue3-video-play": "^1.3.1-beta.6"
27
       },
27
       },
28
       "devDependencies": {
28
       "devDependencies": {
29
+        "@fcli/vue-auto-scroll": "^0.0.2",
29
         "@vitejs/plugin-vue": "^2.3.3",
30
         "@vitejs/plugin-vue": "^2.3.3",
30
         "sass": "^1.64.2",
31
         "sass": "^1.64.2",
31
         "skeleton-loader": "^2.0.0",
32
         "skeleton-loader": "^2.0.0",
@@ -112,6 +113,12 @@
112
         "vue": "^3.2.0"
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
     "node_modules/@floating-ui/core": {
122
     "node_modules/@floating-ui/core": {
116
       "version": "1.4.1",
123
       "version": "1.4.1",
117
       "resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.4.1.tgz",
124
       "resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.4.1.tgz",

+ 1 - 0
package.json

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

+ 1 - 1
public/config.js

@@ -16,5 +16,5 @@ window.g = {
16
     // UE_IP: "http://192.168.4.159"
16
     // UE_IP: "http://192.168.4.159"
17
     // UE_IP: "http://127.0.0.1:80"
17
     // UE_IP: "http://127.0.0.1:80"
18
     // UE_IP: "ws://192.168.4.152:81"
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
               <template #dropdown>
127
               <template #dropdown>
128
                 <el-dropdown-menu>
128
                 <el-dropdown-menu>
129
                   <el-dropdown-item :command="item.leaf" v-for="(item, index) in leafs" :key="index">{{ item.leaf_name
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
                 </el-dropdown-menu>
131
                 </el-dropdown-menu>
132
               </template>
132
               </template>
133
             </el-dropdown>
133
             </el-dropdown>
@@ -157,10 +157,10 @@
157
               height: scrollContainerHeight + 'px',
157
               height: scrollContainerHeight + 'px',
158
               overflow: 'hidden',
158
               overflow: 'hidden',
159
               paddingTop: '10px',
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
                   <div class="list-item">
164
                   <div class="list-item">
165
                     <div class="class-status-btn-container">
165
                     <div class="class-status-btn-container">
166
                       <div class="left-class-status">
166
                       <div class="left-class-status">
@@ -197,8 +197,11 @@
197
                       </div>
197
                       </div>
198
                     </div>
198
                     </div>
199
                   </div>
199
                   </div>
200
-                </template>
201
-              </scroll>
200
+                </div>
201
+
202
+
203
+
204
+              </vue-auto-scroll>
202
             </div>
205
             </div>
203
 
206
 
204
             <div v-else class="empty-container">
207
             <div v-else class="empty-container">
@@ -285,6 +288,7 @@ import Scroll from "./ScrollView.vue";
285
 // import { callUIInteraction } from "../webrtcVideo";
288
 // import { callUIInteraction } from "../webrtcVideo";
286
 import Tag from "./Tag.vue";
289
 import Tag from "./Tag.vue";
287
 
290
 
291
+
288
 export default {
292
 export default {
289
   name: "Histogram",
293
   name: "Histogram",
290
   components: {
294
   components: {
@@ -295,6 +299,7 @@ export default {
295
     ElCarouselItem,
299
     ElCarouselItem,
296
     CircleProgress,
300
     CircleProgress,
297
     Tag,
301
     Tag,
302
+
298
     Vue3SeamlessScroll,
303
     Vue3SeamlessScroll,
299
     VerticalScroll,
304
     VerticalScroll,
300
     Scroll,
305
     Scroll,
@@ -303,6 +308,8 @@ export default {
303
   setup(_, { emit }) {
308
   setup(_, { emit }) {
304
     // 教室分类统计
309
     // 教室分类统计
305
     const classRoomCount = ref([]);
310
     const classRoomCount = ref([]);
311
+
312
+    const isShhow = ref(true)
306
     const generateData = (totalNum, bigvalue, smallvalue, color) => {
313
     const generateData = (totalNum, bigvalue, smallvalue, color) => {
307
       let dataArr = [];
314
       let dataArr = [];
308
       for (var i = 0; i < totalNum; i++) {
315
       for (var i = 0; i < totalNum; i++) {
@@ -752,6 +759,7 @@ export default {
752
     };
759
     };
753
     let classRoomList = ref([]);
760
     let classRoomList = ref([]);
754
     const getClassRoomList = async () => {
761
     const getClassRoomList = async () => {
762
+      isShhow.value = false;
755
       let res = await queryClassroom({
763
       let res = await queryClassroom({
756
         classRoomName: searchData.value,
764
         classRoomName: searchData.value,
757
         category: category.value,
765
         category: category.value,
@@ -762,6 +770,7 @@ export default {
762
       classRoomList.value = [];
770
       classRoomList.value = [];
763
       // setTimeout(() => {
771
       // setTimeout(() => {
764
       classRoomList.value = res.data;
772
       classRoomList.value = res.data;
773
+      isShhow.value = true;
765
       // scrollRef.value.reset()
774
       // scrollRef.value.reset()
766
       // }, 0);
775
       // }, 0);
767
     };
776
     };
@@ -820,7 +829,8 @@ export default {
820
       offset,
829
       offset,
821
       scrollContainerHeight,
830
       scrollContainerHeight,
822
       scrollContainerRef,
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
 import App from './App.vue'
2
 import App from './App.vue'
3
 import router from './router'
3
 import router from './router'
4
 import 'amfe-flexible'
4
 import 'amfe-flexible'
5
+import VueAutoScroll from '@fcli/vue-auto-scroll';
5
 // 全局引入弹出框
6
 // 全局引入弹出框
6
 // import { ElMessage } from 'element-plus'
7
 // import { ElMessage } from 'element-plus'
7
 import 'element-plus/dist/index.css'
8
 import 'element-plus/dist/index.css'
@@ -19,6 +20,7 @@ const app = createApp(App)
19
 console.log("全局的app", app)
20
 console.log("全局的app", app)
20
 app.use(router)
21
 app.use(router)
21
 app.use(vue3videoPlay)
22
 app.use(vue3videoPlay)
23
+app.use(VueAutoScroll);
22
 // app.config.globalProperties.$message = ElMessage;
24
 // app.config.globalProperties.$message = ElMessage;
23
 // app.use(ElMessage)
25
 // app.use(ElMessage)
24
 app.mount("#app")
26
 app.mount("#app")

File diff suppressed because it is too large
+ 1158 - 1153
yarn.lock