| | |
| | | <el-button @click="searchBtn" icon="el-icon-search" class="bjnr-btn">搜索</el-button> |
| | | <el-button @click="clearRow" 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 }">有隐患场所({{ yhcsNum ? yhcsNum : |
| | | '0' |
| | | }})隐患总数({{ yhNum ? yhNum : |
| | | '0' }})</el-button> |
| | | </div> |
| | | <div class="search-item-box" style="overflow-wrap: break-word;"> |
| | | <el-button @click="filterBtn(2)" class="bjnr-btn" |
| | | :class="{ isOneClick: criminalRecordFlag == 1 }">已整改场所({{ yzgcsNum ? yzgcsNum : |
| | | '0' |
| | | }})已整改隐患({{ yzgyhNum ? yzgyhNum : |
| | | '0' }})</el-button> |
| | | </div> |
| | | <div class="search-item-box" style="overflow-wrap: break-word;"> |
| | | <el-button @click="filterBtn(3)" class="bjnr-btn" |
| | | :class="{ isOneClick: criminalRecordFlag == 1 }">未整改场所({{ wzgcsNum ? wzgcsNum : |
| | | '0' |
| | | }})未整改隐患({{ wzgyhNum ? wzgyhNum : |
| | | '0' }})</el-button> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="list police-info" ref="tableBox"> |
| | |
| | | |
| | | <script> |
| | | import { initMapPosition } from '@/utils/mapPositionInit' |
| | | import { getNineTypeTree, getNinePage } from "@/api/site/index.js" |
| | | import { getNineTypeTree, getNinePage, getNineStatisticsNum } from "@/api/site/index.js" |
| | | |
| | | let loading = null |
| | | |
| | | export default { |
| | | inject: ['userInfo'], |
| | | |
| | | data () { |
| | | data() { |
| | | return { |
| | | boxShow: false, |
| | | |
| | | isDanger:null, |
| | | placeName: '', |
| | | typeValue: '', |
| | | typeOptions: [], |
| | | |
| | | tableData: [], |
| | | |
| | | yhcsNum: 0, |
| | | yhNum: 0, |
| | | yzgcsNum: 0, |
| | | yzgyhNum: 0, |
| | | wzgcsNum: 0, |
| | | wzgyhNum: 0, |
| | | pages: { |
| | | current: 1, |
| | | size: 22, |
| | |
| | | } |
| | | }, |
| | | |
| | | created () { |
| | | created() { |
| | | // 获取九小场所隐患数量统计 |
| | | this.getNineStatisticsNum() |
| | | this.getNineTypeTree() |
| | | this.getNinePage() |
| | | const that = this |
| | |
| | | }) |
| | | }, |
| | | |
| | | 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: { |
| | | getNineTypeTree () { |
| | | // 是否有隐患 |
| | | filterBtn(isDanger){ |
| | | this.isDanger = isDanger; |
| | | this.getNinePage() |
| | | }, |
| | | // 获取九小场所隐患数量统计 |
| | | getNineStatisticsNum() { |
| | | var that = this; |
| | | getNineStatisticsNum({ |
| | | nineType: this.typeValue, |
| | | placeName: this.placeName |
| | | }).then(res => { |
| | | const data = res.data.data; |
| | | that.yhcsNum = data[0].total; |
| | | that.yhNum = data[0].patrolNum; |
| | | that.yzgcsNum = data[1].total; |
| | | that.yzgyhNum = data[1].patrolNum; |
| | | that.wzgcsNum = data[2].total; |
| | | that.wzgyhNum = data[2].patrolNum; |
| | | }) |
| | | }, |
| | | getNineTypeTree() { |
| | | getNineTypeTree().then(res => { |
| | | this.typeOptions = res.data.data |
| | | }) |
| | | }, |
| | | |
| | | // 切换登记类型 |
| | | typeChange () { |
| | | typeChange() { |
| | | this.pages.current = 1 |
| | | this.getNinePage() |
| | | this.getNineStatisticsNum() |
| | | }, |
| | | |
| | | searchChange () { |
| | | searchChange() { |
| | | if (this.placeName.trim() == '') { |
| | | this.pages.current = 1 |
| | | this.getNinePage() |
| | | this.getNineStatisticsNum() |
| | | } |
| | | }, |
| | | |
| | | searchBtn () { |
| | | searchBtn() { |
| | | this.pages.current = 1 |
| | | this.getNinePage() |
| | | this.getNineStatisticsNum() |
| | | }, |
| | | |
| | | // 分页处理 |
| | | handleCurrentChange (current) { |
| | | handleCurrentChange(current) { |
| | | this.pages.current = current |
| | | this.getNinePage() |
| | | this.getNineStatisticsNum() |
| | | }, |
| | | |
| | | // 加载动画 |
| | | loading () { |
| | | loading() { |
| | | loading = this.$loading({ |
| | | lock: true, |
| | | text: '拼命加载中', |
| | |
| | | }) |
| | | }, |
| | | |
| | | getNinePage () { |
| | | getNinePage() { |
| | | this.loading() |
| | | |
| | | getNinePage({ |
| | | current: this.pages.current, |
| | | size: this.pages.size, |
| | | nineType: this.typeValue, |
| | | placeName: this.placeName |
| | | placeName: this.placeName, |
| | | isDanger:this.isDanger |
| | | }).then(res => { |
| | | const data = res.data.data |
| | | |
| | |
| | | }, |
| | | |
| | | // 点击定位 |
| | | rowClick (row) { |
| | | rowClick(row) { |
| | | let lng = global.DC.CoordTransform.GCJ02ToWGS84(row.lng, row.lat)[0] |
| | | let lat = global.DC.CoordTransform.GCJ02ToWGS84(row.lng, row.lat)[1] |
| | | |
| | |
| | | }, |
| | | |
| | | // 查看详情 |
| | | goDetail (row) { |
| | | goDetail(row) { |
| | | this.$refs.SiteDialogPopup.initOpen(row) |
| | | }, |
| | | |
| | | siteClick (e) { |
| | | siteClick(e) { |
| | | this.$refs.SiteDialogPopup.initOpen(e.overlay.attrParams) |
| | | }, |
| | | |
| | | // 清空按钮-清除图标图层 |
| | | clearRow () { |
| | | clearRow() { |
| | | this.isDanger = null |
| | | this.placeName = null |
| | | this.typeValue = null |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'scanLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | this.$store.commit('SET_DIALOGDETAILPOPUP', false) |
| | | this.pages.current = 1 |
| | | this.getNinePage() |
| | | this.getNineStatisticsNum() |
| | | }, |
| | | |
| | | // 大小重置 |
| | | boxResize (val) { |
| | | boxResize(val) { |
| | | this.boxShow = val |
| | | }, |
| | | }, |
| | | |
| | | destroyed () { |
| | | destroyed() { |
| | | loading && loading.close() |
| | | |
| | | this.$parent.$parent.resize('0px') |