| | |
| | | <div v-show="boxShow" class="container-content" ref="containerContent"> |
| | | <div class="time-select" ref="timeSelect"> |
| | | <div class="search-item-box"> |
| | | <el-input size="small" placeholder="请输入(地址、内容)" v-model="searchKey" clearable></el-input> |
| | | <span>矛盾纠纷类型:</span> |
| | | |
| | | <el-select clearable style="flex: 1;" size="small" v-model="typeValue" @change="typeChange" |
| | | placeholder="请选择矛盾纠纷类型"> |
| | | <el-option v-for="item in typeOptions" :key="item.dictKey" :label="item.dictValue" |
| | | :value="item.dictKey"></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="search-item-box"> |
| | | <el-input size="small" placeholder="请输入(地址、纠纷内容)" v-model="searchKey" clearable></el-input> |
| | | <el-button @click="searchBtn" icon="el-icon-search" class="bjnr-btn">搜索</el-button> |
| | | <el-button @click="resetBtn" icon="el-icon-delete" class="bjnr-btn">清除</el-button> |
| | | </div> |
| | | <div class="search-item-box" style="overflow-wrap: break-word;"> |
| | | <el-button @click="filterBtn(1)" class="bjnr-btn" |
| | | :class="{ isOneClick: criminalRecordFlag == 1 }">已化解({{ yhj ? yhj : |
| | | '0' |
| | | }})</el-button> |
| | | <el-button @click="filterBtn(2)" class="bjnr-btn" |
| | | :class="{ isOneClick: criminalRecordFlag == 1 }">未化解({{ whj ? whj : |
| | | '0' |
| | | }})</el-button> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <script> |
| | | import { initMapPosition } from '@/utils/mapPositionInit' |
| | | import { |
| | | getDisputeRecordList |
| | | 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, |
| | | typeValue: '', |
| | | typeOptions: [], |
| | | searchKey: '', |
| | | currentTableHeight: 0, |
| | | tableData: [], |
| | | boxShow: false, |
| | | pages: { |
| | | current: 1, |
| | | total: 0, |
| | | pageSize: 22, |
| | | count: 0, |
| | | currentPage: 1 |
| | | }, |
| | | disputeTypeList: [], |
| | | disputeSourceList: [] |
| | | } |
| | | }, |
| | | |
| | | created () { |
| | | created() { |
| | | const that = this |
| | | |
| | | that.$nextTick(() => { |
| | | initMapPosition() |
| | | that.getDictionaryListByCode() |
| | | that.getStatistic() |
| | | that.getList() |
| | | }) |
| | | }, |
| | | |
| | | 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({ |
| | | disputeType: this.typeValue, |
| | | searchKey: this.searchKey |
| | | }).then(res=>{ |
| | | that.yhj = res.data.data.yhj |
| | | that.whj = res.data.data.whj |
| | | }) |
| | | }, |
| | | // 获取字典列表 |
| | | getDictionaryListByCode () { |
| | | getDictionaryListByCode() { |
| | | getDictionaryListByCode('disputeType').then(res => { |
| | | this.disputeTypeList = res.data.data |
| | | }) |
| | | getDictionaryListByCode('disputeSource').then(res => { |
| | | this.disputeSourceList = res.data.data |
| | | }) |
| | | // 矛盾纠纷类型获取 |
| | | getDictionaryListByCode('disputeType').then(res => { |
| | | this.typeOptions = 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 |
| | | this.getList() |
| | | this.getStatistic() |
| | | }, |
| | | // 获取列表 |
| | | getList () { |
| | | getList() { |
| | | this.loading() |
| | | let params = { |
| | | handleResult:this.handleResult, |
| | | disputeType: this.typeValue, |
| | | searchKey: this.searchKey, |
| | | size: this.pages.pageSize, |
| | | current: this.pages.currentPage |
| | | current: this.pages.current |
| | | } |
| | | |
| | | 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.currentPage = 1 |
| | | searchBtn() { |
| | | this.pages.current = 1 |
| | | this.getList() |
| | | this.getStatistic() |
| | | }, |
| | | |
| | | // 清空按钮 |
| | | resetBtn () { |
| | | resetBtn() { |
| | | this.searchKey = '' |
| | | this.pages.currentPage = 1 |
| | | this.typeValue = null; |
| | | this.handleResult = null; |
| | | this.pages.current = 1 |
| | | this.getList() |
| | | this.getStatistic() |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'searchAILayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | }, |
| | | |
| | | // 分页处理 |
| | | handleCurrentChange (currentPage) { |
| | | this.pages.currentPage = currentPage |
| | | filterBtn(handleResult){ |
| | | this.handleResult = handleResult |
| | | this.getList() |
| | | }, |
| | | |
| | | // 分页处理 |
| | | handleCurrentChange(currentPage) { |
| | | this.pages.current = 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) |