guanqb
2022-10-24 0a004d96cf6cca24974a4598c7ad6f907f05738f
Merge branch 'master' of http://192.168.0.105:10010/r/srs-police-affairs
1 files modified
48 ■■■■ changed files
src/views/home/index.vue 48 ●●●● patch | view | raw | blame | history
src/views/home/index.vue
@@ -2,7 +2,7 @@
 * @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: 小区-栋-层-房屋
 * 
@@ -841,6 +841,8 @@
            document.querySelector('.screen-full-btn').classList.add('homebottom')
            this.setDomStyle()
            this.tableScroll()
        })
        // axios.get('/user/getUserList').then((res) => {
@@ -1780,8 +1782,25 @@
            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 () {
@@ -1834,7 +1853,7 @@
        position: fixed;
        top: 80px;
        left: 0;
        width: 400px;
        width: 21%;
        height: calc(100% - 80px);
        background: $bg-color;
@@ -1879,12 +1898,16 @@
        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,
@@ -2088,13 +2111,13 @@
    .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;
@@ -2151,10 +2174,15 @@
        }
        .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;
        }
    }