فهرست منبع

dataV滚动组件修改

gcz 2 سال پیش
والد
کامیت
c30d132a70
2فایلهای تغییر یافته به همراه14 افزوده شده و 7 حذف شده
  1. 4 0
      README.md
  2. 10 7
      src/views/index.vue

+ 4 - 0
README.md

@@ -24,3 +24,7 @@ npm run build --report
 ```
 
 For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
+
+### dataV滚动组件修改
+'node_modules\_@jiaminghi_data-view@2.10.0@@jiaminghi\data-view\lib\components\scrollBoard\src\main.vue'
+在25行给'row-item'添加id':id="row.ceils[4]"

+ 10 - 7
src/views/index.vue

@@ -2,9 +2,9 @@
  * @Description: 
  * @Author: wangcc
  * @Date: 2022-07-06 15:56:45
- * @LastEditors: wangcc
- * @LastEditTime: 2022-11-01 17:33:36
- * @FilePath: \castgroup_bigscreen\src\views\index.vue
+ * @LastEditors: gcz
+ * @LastEditTime: 2022-11-02 11:30:32
+ * @FilePath: \ntbigscreen\src\views\index.vue
  * @Copyright: Copyright (c) 2016~2022 by wangcc, All Rights Reserved. 
 -->
 <template>
@@ -353,7 +353,7 @@ export default {
     this.getRightScrollData();
     setInterval(() => {
       this.getPageData();
-    }, 60000);
+    }, 1160000);
     window.onresize = () => {
       //图表resize
       if (this.$store.state.addr.page == 'forest') {
@@ -601,7 +601,7 @@ export default {
             ]);
           });
           this.scrollBoardKey = Date.now();
-          this.$refs.scrollBoard.updateRows(this.scrollBoardConfig.data);
+          this.$refs.scrollBoard&&this.$refs.scrollBoard.updateRows(this.scrollBoardConfig.data);
 
           // console.log('this.scrollBoardConfig.data', this.scrollBoardConfig.data);
           // this.scrollBoardConfig = res.data;
@@ -1217,10 +1217,11 @@ export default {
       // let nodeList = document.getElementsByClassName('row-item');
       //删除这些标签对应的class
       Array.prototype.forEach.call(nodeList, (el) => {
-        el.classList.remove(className);
+        el&&el.classList.remove(className);
       });
     },
     scrollProjectClick(e) {
+      console.log('scrollProjectClick',e);
       // 点击添加class
       // let removeAllClass = (className)=>{
       //       //找到所有包含className的结点
@@ -1235,9 +1236,11 @@ export default {
       let proClass = document.getElementsByClassName('row-item');
       // proClass[e.rowIndex].style.background = 'rgb(4, 145, 110)';
       this.removeAllClass('active');
-      proClass[e.rowIndex].classList.add('active');
+      // console.log('proClass',proClass);
+      // proClass[e.rowIndex]&&proClass[e.rowIndex].classList.add('active');
 
       let rowId = e.row[4];
+      document.getElementById(rowId).classList.add('active');
       let param = {
         courseId: rowId
         // pageNum: 1,