shuishen
2024-05-07 20a8596be7f9da45cd640e434460b42e83b4b1ad
矛盾纠纷分页异常修复
1 files modified
72 ■■■■ changed files
src/views/contradictionEventShow/index.vue 72 ●●●● patch | view | raw | blame | history
src/views/contradictionEventShow/index.vue
@@ -71,7 +71,7 @@
<script>
import { initMapPosition } from '@/utils/mapPositionInit'
import {
    getDisputeRecordList,getStatistic
    getDisputeRecordList, getStatistic
} from "@/api/contradictionEventShow/index.js"
import { getDictionaryListByCode } from "@/api/rentalInfo/index.js"
@@ -84,12 +84,12 @@
    components: { detailDialog },
    data() {
    data () {
        return {
            handleResult:null,
            yhj:0,
            whj:0,
            ysehjb:0,
            handleResult: null,
            yhj: 0,
            whj: 0,
            ysehjb: 0,
            typeValue: '',
            typeOptions: [],
            searchKey: '',
@@ -97,7 +97,7 @@
            tableData: [],
            boxShow: false,
            pages: {
                current: 1,
                currentPage: 1,
                total: 0,
                pageSize: 22,
                count: 0,
@@ -107,7 +107,7 @@
        }
    },
    created() {
    created () {
        const that = this
        that.$nextTick(() => {
@@ -118,7 +118,7 @@
        })
    },
    mounted() {
    mounted () {
        this.$parent.$parent.resize('400px', true)
        this.$nextTick(() => {
@@ -131,7 +131,7 @@
    },
    computed: {
        positionColor() {
        positionColor () {
            return (row) => {
                if (row.X && row.X != 0 || row.lng && row.lng != 0 || row.longitude && row.longitude != 0 || row.x && row.x != 0) {
                    return "#1AFA29"
@@ -141,7 +141,7 @@
            }
        },
        positionDisabled() {
        positionDisabled () {
            return (row) => {
                if (row.X && row.X != 0 || row.lng && row.lng != 0 || row.longitude && row.longitude != 0 || row.x && row.x != 0) {
                    return false
@@ -154,19 +154,19 @@
    methods: {
        // 统计
        getStatistic(){
            var that = this;
        getStatistic () {
            var that = this
            getStatistic({
                disputeType: this.typeValue,
                searchKey: this.searchKey
            }).then(res=>{
            }).then(res => {
                that.yhj = res.data.data.yhj
                that.whj = res.data.data.whj
                that.ysehjb = res.data.data.ysehjb
            })
        },
        // 获取字典列表
        getDictionaryListByCode() {
        getDictionaryListByCode () {
            getDictionaryListByCode('disputeType').then(res => {
                this.disputeTypeList = res.data.data
            })
@@ -180,7 +180,7 @@
        },
        // 点击定位
        rowClick(row) {
        rowClick (row) {
            this.$EventBus.$emit('toPosition', {
                siteJd: row.lng,
                siteWd: row.lat,
@@ -204,7 +204,7 @@
        },
        // 点击详情
        goDetail(row) {
        goDetail (row) {
            let detailList = []
            let title = '矛盾纠纷事件详情'
@@ -290,27 +290,27 @@
            this.$refs.detailDialog.initOpen(detailList, title, [], [])
        },
        // 切换登记类型
        typeChange() {
            this.pages.current = 1
        typeChange () {
            this.pages.currentPage = 1
            this.getList()
            this.getStatistic()
        },
        // 获取列表
        getList() {
        getList () {
            this.loading()
            let params = {
                handleResult:this.handleResult,
                handleResult: this.handleResult,
                disputeType: this.typeValue,
                searchKey: this.searchKey,
                size: this.pages.pageSize,
                current: this.pages.current
                current: this.pages.currentPage
            }
            this.getDisputeRecordList(params)
        },
        // 矛盾纠纷列表
        getDisputeRecordList(params) {
        getDisputeRecordList (params) {
            getDisputeRecordList(params).then(res => {
                this.tableData = res.data.data.records
                this.pages.total = res.data.data.total
@@ -325,18 +325,18 @@
        },
        // 搜索按钮
        searchBtn() {
            this.pages.current = 1
        searchBtn () {
            this.pages.currentPage = 1
            this.getList()
            this.getStatistic()
        },
        // 清空按钮
        resetBtn() {
        resetBtn () {
            this.searchKey = ''
            this.typeValue = null;
            this.handleResult = null;
            this.pages.current = 1
            this.typeValue = null
            this.handleResult = null
            this.pages.currentPage = 1
            this.getList()
            this.getStatistic()
            this.$EventBus.$emit('mapClearLayer', {
@@ -344,20 +344,20 @@
                type: 'VectorLayer'
            })
        },
        filterBtn(handleResult){
        filterBtn (handleResult) {
            this.handleResult = handleResult
            this.getList()
        },
        // 分页处理
        handleCurrentChange(currentPage) {
            this.pages.current = currentPage
        handleCurrentChange (currentPage) {
            this.pages.currentPage = currentPage
            this.getList()
            this.getStatistic()
        },
        // 加载动画
        loading() {
        loading () {
            loading = this.$loading({
                lock: true,
                text: '拼命加载中',
@@ -367,17 +367,17 @@
        },
        // 表格高度
        setTableHeight() {
        setTableHeight () {
            this.currentTableHeight = this.$refs.containerContent.offsetHeight - this.$refs.timeSelect.offsetHeight
        },
        // 大小重置
        boxResize(val) {
        boxResize (val) {
            this.boxShow = val
        },
    },
    destroyed() {
    destroyed () {
        loading && loading.close()
        window.removeEventListener('resize', this.setTableHeight)