|
@@ -3,7 +3,7 @@
|
|
* @Author: wangcc
|
|
* @Author: wangcc
|
|
* @Date: 2022-07-06 15:56:45
|
|
* @Date: 2022-07-06 15:56:45
|
|
* @LastEditors: wangcc
|
|
* @LastEditors: wangcc
|
|
- * @LastEditTime: 2022-12-08 16:31:08
|
|
|
|
|
|
+ * @LastEditTime: 2023-03-10 17:53:02
|
|
* @FilePath: \castgroup_bigscreen\src\views\index.vue
|
|
* @FilePath: \castgroup_bigscreen\src\views\index.vue
|
|
* @Copyright: Copyright (c) 2016~2022 by wangcc, All Rights Reserved.
|
|
* @Copyright: Copyright (c) 2016~2022 by wangcc, All Rights Reserved.
|
|
-->
|
|
-->
|
|
@@ -179,7 +179,42 @@
|
|
@click="scrollBaseListClick"
|
|
@click="scrollBaseListClick"
|
|
@mouseout="baseListClick"
|
|
@mouseout="baseListClick"
|
|
/>
|
|
/>
|
|
- <dv-scroll-board
|
|
|
|
|
|
+ <div class="scroll-board-table-box" v-show="showxiaoban && cur == 1">
|
|
|
|
+ <el-table
|
|
|
|
+ height="580"
|
|
|
|
+ ref="tableFrom"
|
|
|
|
+ highlight-current-row
|
|
|
|
+ size="small"
|
|
|
|
+ :data="tableData"
|
|
|
|
+ @mouseenter.native="stopScroll"
|
|
|
|
+ @mouseleave.native="startScroll"
|
|
|
|
+ @cell-click="scrollBoardClick"
|
|
|
|
+ stripe
|
|
|
|
+ >
|
|
|
|
+ <el-table-column prop="smallNumber" label="小班号" align="center"></el-table-column>
|
|
|
|
+ <el-table-column prop="treeComp" label="树种组成" align="center"></el-table-column>
|
|
|
|
+ <el-table-column prop="perAcreStock" label="每亩蓄积" align="center">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <span>{{row.perAcreStock}}m³</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="landArea" label="小班面积" align="center">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <span>{{row.landArea}}亩</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <div class="pagination-box" v-if="total > 0">
|
|
|
|
+ <pagination
|
|
|
|
+ :total="total"
|
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
|
+ :layout="'prev, pager, next'"
|
|
|
|
+ @pagination="getRightScrollData"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- <dv-scroll-board
|
|
v-if="showxiaoban && cur == 1"
|
|
v-if="showxiaoban && cur == 1"
|
|
:key="scrollBoardKey"
|
|
:key="scrollBoardKey"
|
|
class="scroll-board-01"
|
|
class="scroll-board-01"
|
|
@@ -187,7 +222,7 @@
|
|
ref="scrollBoard"
|
|
ref="scrollBoard"
|
|
@click="scrollBoardClick"
|
|
@click="scrollBoardClick"
|
|
:style="scrollBoardStyle"
|
|
:style="scrollBoardStyle"
|
|
- />
|
|
|
|
|
|
+ />-->
|
|
<dv-scroll-board
|
|
<dv-scroll-board
|
|
v-if="showxiaoban && cur == 0"
|
|
v-if="showxiaoban && cur == 0"
|
|
:key="scrollBoardKey"
|
|
:key="scrollBoardKey"
|
|
@@ -199,7 +234,11 @@
|
|
@mouseout="scrollOutPro"
|
|
@mouseout="scrollOutPro"
|
|
:style="scrollBoardStyle"
|
|
:style="scrollBoardStyle"
|
|
/>
|
|
/>
|
|
- <div class="scroll-board-tool" @click="toggleShowScrollBoard">
|
|
|
|
|
|
+ <div
|
|
|
|
+ class="scroll-board-tool"
|
|
|
|
+ v-if="showxiaoban && cur == 0"
|
|
|
|
+ @click="toggleShowScrollBoard"
|
|
|
|
+ >
|
|
<div class="inner">
|
|
<div class="inner">
|
|
<img src="../assets/img/jiantou.png" alt />
|
|
<img src="../assets/img/jiantou.png" alt />
|
|
</div>
|
|
</div>
|
|
@@ -293,8 +332,15 @@ export default {
|
|
name: '小班查询'
|
|
name: '小班查询'
|
|
}
|
|
}
|
|
],
|
|
],
|
|
|
|
+ timer: null,
|
|
|
|
+ tableData: [],
|
|
rowList: [],
|
|
rowList: [],
|
|
cur: 0,
|
|
cur: 0,
|
|
|
|
+ total: 0,
|
|
|
|
+ queryParams: {
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 300
|
|
|
|
+ },
|
|
showxiaoban: true,
|
|
showxiaoban: true,
|
|
showbase: false,
|
|
showbase: false,
|
|
showScrollBoard: false,
|
|
showScrollBoard: false,
|
|
@@ -586,8 +632,8 @@ export default {
|
|
countyId: this.$store.state.addr.selectDistrict.areaId,
|
|
countyId: this.$store.state.addr.selectDistrict.areaId,
|
|
townId: this.$store.state.addr.selectStreet.areaId,
|
|
townId: this.$store.state.addr.selectStreet.areaId,
|
|
courseId: this.$store.state.addr.selectProject.ProjectID,
|
|
courseId: this.$store.state.addr.selectProject.ProjectID,
|
|
- pageNum: 1,
|
|
|
|
- pageSize: 50
|
|
|
|
|
|
+ pageNum: this.queryParams.pageNum,
|
|
|
|
+ pageSize: this.queryParams.pageSize
|
|
};
|
|
};
|
|
rightScrollData(param)
|
|
rightScrollData(param)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
@@ -599,20 +645,21 @@ export default {
|
|
// this.scrollBoardConfig.rowNum = 5;
|
|
// this.scrollBoardConfig.rowNum = 5;
|
|
// this.scrollBoardStyle.height = '25vh'
|
|
// this.scrollBoardStyle.height = '25vh'
|
|
// }
|
|
// }
|
|
-
|
|
|
|
- this.scrollBoardConfig.data = [];
|
|
|
|
- res.rows.forEach((element) => {
|
|
|
|
- this.scrollBoardConfig.data.push([
|
|
|
|
- element.smallNumber,
|
|
|
|
- element.treeComp,
|
|
|
|
- element.perAcreStock + 'm³',
|
|
|
|
- element.landArea + '亩',
|
|
|
|
- element.id
|
|
|
|
- ]);
|
|
|
|
- });
|
|
|
|
- this.scrollBoardKey = Date.now();
|
|
|
|
- this.$refs.scrollBoard &&
|
|
|
|
- this.$refs.scrollBoard.updateRows(this.scrollBoardConfig.data);
|
|
|
|
|
|
+ this.tableData = res.rows;
|
|
|
|
+ this.total = res.total;
|
|
|
|
+ // this.scrollBoardConfig.data = [];
|
|
|
|
+ // res.rows.forEach((element) => {
|
|
|
|
+ // this.scrollBoardConfig.data.push([
|
|
|
|
+ // element.smallNumber,
|
|
|
|
+ // element.treeComp,
|
|
|
|
+ // element.perAcreStock + 'm³',
|
|
|
|
+ // element.landArea + '亩',
|
|
|
|
+ // element.id
|
|
|
|
+ // ]);
|
|
|
|
+ // });
|
|
|
|
+ // this.scrollBoardKey = Date.now();
|
|
|
|
+ // this.$refs.scrollBoard &&
|
|
|
|
+ // this.$refs.scrollBoard.updateRows(this.scrollBoardConfig.data);
|
|
|
|
|
|
// console.log('this.scrollBoardConfig.data', this.scrollBoardConfig.data);
|
|
// console.log('this.scrollBoardConfig.data', this.scrollBoardConfig.data);
|
|
// this.scrollBoardConfig = res.data;
|
|
// this.scrollBoardConfig = res.data;
|
|
@@ -1220,9 +1267,10 @@ export default {
|
|
this.getBaseList();
|
|
this.getBaseList();
|
|
this.getPageData();
|
|
this.getPageData();
|
|
},
|
|
},
|
|
- scrollBoardClick(e) {
|
|
|
|
|
|
+ scrollBoardClick(row) {
|
|
|
|
+ console.log(row);
|
|
let param = {
|
|
let param = {
|
|
- id: e.row[4]
|
|
|
|
|
|
+ id: row.id
|
|
};
|
|
};
|
|
smallClassDetail(param).then((res) => {
|
|
smallClassDetail(param).then((res) => {
|
|
this.changeSearchSmallClass(res.data);
|
|
this.changeSearchSmallClass(res.data);
|
|
@@ -1277,12 +1325,13 @@ export default {
|
|
// proClass[e.rowIndex]&&proClass[e.rowIndex].classList.add('active');
|
|
// proClass[e.rowIndex]&&proClass[e.rowIndex].classList.add('active');
|
|
|
|
|
|
let rowId = e.row[4];
|
|
let rowId = e.row[4];
|
|
|
|
+ console.log(rowId);
|
|
this.changeSelectProject({ ProjectID: rowId, ProjectName: e.row[0] });
|
|
this.changeSelectProject({ ProjectID: rowId, ProjectName: e.row[0] });
|
|
document.getElementById(rowId).classList.add('active');
|
|
document.getElementById(rowId).classList.add('active');
|
|
let param = {
|
|
let param = {
|
|
courseId: rowId
|
|
courseId: rowId
|
|
// pageNum: 1,
|
|
// pageNum: 1,
|
|
- // pageSize: 20
|
|
|
|
|
|
+ // pageSize: 50
|
|
};
|
|
};
|
|
projectSmallClass(param).then((res) => {
|
|
projectSmallClass(param).then((res) => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
@@ -1346,12 +1395,42 @@ export default {
|
|
this.cur = e;
|
|
this.cur = e;
|
|
if (this.cur == '1') {
|
|
if (this.cur == '1') {
|
|
this.removeAllClass('active');
|
|
this.removeAllClass('active');
|
|
|
|
+ this.tableScroll(false);
|
|
|
|
+ } else {
|
|
|
|
+ clearInterval(this.timer);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
classFunc(index) {
|
|
classFunc(index) {
|
|
if (this.cur == index) {
|
|
if (this.cur == index) {
|
|
return `active active${index}`;
|
|
return `active active${index}`;
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ startScroll() {
|
|
|
|
+ this.tableScroll(false);
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ stopScroll() {
|
|
|
|
+ this.tableScroll(true);
|
|
|
|
+ },
|
|
|
|
+ //滚动方法
|
|
|
|
+ tableScroll(stop) {
|
|
|
|
+ if (stop) {
|
|
|
|
+ clearInterval(this.timer);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ const table = this.$refs.tableFrom;
|
|
|
|
+ const divData = table.bodyWrapper;
|
|
|
|
+ this.timer = setInterval(() => {
|
|
|
|
+ divData.scrollTop += 1;
|
|
|
|
+ if (
|
|
|
|
+ divData.clientHeight + divData.scrollTop + 1 >
|
|
|
|
+ divData.scrollHeight
|
|
|
|
+ ) {
|
|
|
|
+ if (table.tableData.length > 5) {
|
|
|
|
+ divData.scrollTop = 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }, 80);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -1439,9 +1518,75 @@ export default {
|
|
border: 1px solid rgba(0, 250, 253, 1);
|
|
border: 1px solid rgba(0, 250, 253, 1);
|
|
background: #04916e;
|
|
background: #04916e;
|
|
}
|
|
}
|
|
-.selectBox{
|
|
|
|
|
|
+.selectBox {
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
}
|
|
}
|
|
|
|
+/deep/ .el-table thead {
|
|
|
|
+ color: #fff;
|
|
|
|
+}
|
|
|
|
+/deep/ .el-table tr {
|
|
|
|
+ background-color: transparent;
|
|
|
|
+}
|
|
|
|
+/deep/ .el-table th.el-table__cell {
|
|
|
|
+ background-color: rgba(8, 238, 255, 0.3);
|
|
|
|
+}
|
|
|
|
+/deep/ .el-table {
|
|
|
|
+ background-color: transparent;
|
|
|
|
+ color: #08eeff;
|
|
|
|
+}
|
|
|
|
+/deep/ .el-table td.el-table__cell,
|
|
|
|
+.el-table th.el-table__cell.is-leaf {
|
|
|
|
+ border-bottom: unset;
|
|
|
|
+}
|
|
|
|
+/deep/ .el-table th.el-table__cell.is-leaf {
|
|
|
|
+ border-bottom: unset;
|
|
|
|
+}
|
|
|
|
+/deep/
|
|
|
|
+ .el-table--striped
|
|
|
|
+ .el-table__body
|
|
|
|
+ tr.el-table__row--striped
|
|
|
|
+ td.el-table__cell {
|
|
|
|
+ background-color: rgba(0, 175, 169, 0.15);
|
|
|
|
+}
|
|
|
|
+/deep/ .el-table::before {
|
|
|
|
+ background-color: transparent;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/deep/ .el-table__body .el-table__row.hover-row td {
|
|
|
|
+ background-color: rgba(255, 170, 0, 0.20) !important;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+}
|
|
|
|
+/deep/ .el-table tbody tr:hover > td {
|
|
|
|
+ background-color: rgba(255, 170, 0, 0.20) !important;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+}
|
|
|
|
+.el-table {
|
|
|
|
+ /deep/ .el-table__body-wrapper::-webkit-scrollbar {
|
|
|
|
+ width: 6px; /*滚动条宽度*/
|
|
|
|
+ height: 10px; /*滚动条高度*/
|
|
|
|
+ }
|
|
|
|
+ /*定义滚动条轨道 内阴影+圆角*/
|
|
|
|
+ /deep/ .el-table__body-wrapper::-webkit-scrollbar-track {
|
|
|
|
+ box-shadow: 0px 1px 3px rgba(255, 255, 255, 0.1) inset; /*滚动条的背景区域的内阴影*/
|
|
|
|
+ border-radius: 10px; /*滚动条的背景区域的圆角*/
|
|
|
|
+ background-color: rgba(255, 255, 255, 0.1); /*滚动条的背景颜色*/
|
|
|
|
+ }
|
|
|
|
+ /*定义滑块 内阴影+圆角*/
|
|
|
|
+ /deep/ .el-table__body-wrapper::-webkit-scrollbar-thumb {
|
|
|
|
+ box-shadow: 0px 1px 3px rgba(8, 238, 255, 0.3) inset; /*滚动条的内阴影*/
|
|
|
|
+ border-radius: 10px; /*滚动条的圆角*/
|
|
|
|
+ background-color: rgba(8, 238, 255, 0.3); /*滚动条的背景颜色*/
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+/deep/ .el-table__body tr.current-row > td.el-table__cell {
|
|
|
|
+ background-color: transparent;
|
|
|
|
+}
|
|
|
|
+.scroll-board-table-box {
|
|
|
|
+ height: calc(100vh - var(--header-height) - 200px);
|
|
|
|
+ -webkit-box-sizing: border-box;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ padding: 0 15px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|