| | |
| | | <script> |
| | | import { initMapPosition } from '@/utils/mapPositionInit' |
| | | import { |
| | | getDisputeRecordList,getStatistic |
| | | getDisputeRecordList, getStatistic |
| | | } from "@/api/contradictionEventShow/index.js" |
| | | import { getDictionaryListByCode } from "@/api/rentalInfo/index.js" |
| | | |
| | |
| | | |
| | | components: { detailDialog }, |
| | | |
| | | data() { |
| | | data () { |
| | | return { |
| | | handleResult:null, |
| | | yhj:0, |
| | | whj:0, |
| | | ysehjb:0, |
| | | handleResult: null, |
| | | yhj: 0, |
| | | whj: 0, |
| | | ysehjb: 0, |
| | | typeValue: '', |
| | | typeOptions: [], |
| | | searchKey: '', |
| | |
| | | tableData: [], |
| | | boxShow: false, |
| | | pages: { |
| | | current: 1, |
| | | currentPage: 1, |
| | | total: 0, |
| | | pageSize: 22, |
| | | count: 0, |
| | |
| | | } |
| | | }, |
| | | |
| | | created() { |
| | | created () { |
| | | const that = this |
| | | |
| | | that.$nextTick(() => { |
| | |
| | | }) |
| | | }, |
| | | |
| | | mounted() { |
| | | mounted () { |
| | | this.$parent.$parent.resize('400px', true) |
| | | |
| | | this.$nextTick(() => { |
| | |
| | | }, |
| | | |
| | | 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" |
| | |
| | | } |
| | | }, |
| | | |
| | | 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 |
| | |
| | | |
| | | 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 |
| | | }) |
| | |
| | | }, |
| | | |
| | | // 点击定位 |
| | | rowClick(row) { |
| | | rowClick (row) { |
| | | this.$EventBus.$emit('toPosition', { |
| | | siteJd: row.lng, |
| | | siteWd: row.lat, |
| | |
| | | }, |
| | | |
| | | // 点击详情 |
| | | goDetail(row) { |
| | | goDetail (row) { |
| | | let detailList = [] |
| | | let title = '矛盾纠纷事件详情' |
| | | |
| | |
| | | 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 |
| | |
| | | }, |
| | | |
| | | // 搜索按钮 |
| | | 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', { |
| | |
| | | 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: '拼命加载中', |
| | |
| | | }, |
| | | |
| | | // 表格高度 |
| | | 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) |