| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2022-10-24 11:43:39 |
| | | * @LastEditTime: 2022-10-24 14:49:43 |
| | | * @FilePath: \srs-police-affairs\src\views\home\index.vue |
| | | * @Description: 小区-栋-层-房屋 |
| | | * |
| | |
| | | document.querySelector('.screen-full-btn').classList.add('homebottom') |
| | | |
| | | this.setDomStyle() |
| | | |
| | | this.tableScroll() |
| | | }) |
| | | |
| | | // axios.get('/user/getUserList').then((res) => { |
| | |
| | | this.$refs.RegionSelect.style.left = (bodyWidth - domWidth) / 2 + 'px' |
| | | |
| | | this.currentTableHeight = this.$refs.tableBox.offsetHeight |
| | | }, |
| | | |
| | | tableScroll () { |
| | | // 拿到表格挂载后的真实DOM |
| | | const divData = this.$refs.tableBox.querySelector('.el-table__body-wrapper') |
| | | // 拿到元素后,对元素进行定时增加距离顶部距离,实现滚动效果(此配置为每100毫秒移动1像素) |
| | | setInterval(() => { |
| | | console.log(divData.scrollTop) |
| | | // 元素自增距离顶部1像素 |
| | | divData.scrollTop += 1 |
| | | // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) |
| | | if (divData.clientHeight + divData.scrollTop + 1 > divData.scrollHeight) { |
| | | // 重置table距离顶部距离 |
| | | divData.scrollTop = 0 |
| | | } |
| | | }, 100) |
| | | } |
| | | }, |
| | | |
| | | watch: {}, |
| | | |
| | | destroyed () { |
| | |
| | | position: fixed; |
| | | top: 80px; |
| | | left: 0; |
| | | width: 400px; |
| | | width: 21%; |
| | | height: calc(100% - 80px); |
| | | background: $bg-color; |
| | | |
| | |
| | | position: fixed; |
| | | top: 80px; |
| | | right: 0; |
| | | width: 400px; |
| | | width: 21%; |
| | | height: calc(100% - 80px); |
| | | background: $bg-color; |
| | | |
| | | .case-box { |
| | | height: 30%; |
| | | } |
| | | |
| | | .alert-box :deep(.el-table__body-wrapper) { |
| | | overflow-x: hidden !important; |
| | | } |
| | | |
| | | .alert-box, |
| | |
| | | |
| | | .bottom-container { |
| | | position: fixed; |
| | | left: 50%; |
| | | left: 21%; |
| | | bottom: 0px; |
| | | height: 300px; |
| | | width: calc(100% - 800px); |
| | | width: 58%; |
| | | background-color: $bg-color; |
| | | transform: translate(-50%, 0); |
| | | box-sizing: border-box; |
| | | |
| | | .header { |
| | | width: 100%; |
| | | height: 36px; |
| | |
| | | } |
| | | |
| | | .body { |
| | | height: calc(100% - 40px); |
| | | width: calc(100% - 40px); |
| | | margin: 10px 0 0 20px; |
| | | overflow: scroll; |
| | | margin: 10px; |
| | | width: calc(100% - 20px); |
| | | height: calc(100% - 56px); |
| | | |
| | | /* 解决自定义滚动条 x 轴显示问题 */ |
| | | } |
| | | |
| | | :deep(.el-table__body-wrapper) { |
| | | overflow-x: hidden !important; |
| | | } |
| | | } |
| | | |