<template>
|
<!-- 重点人员 -->
|
<el-dialog :title="keyPersonTitle" :visible.sync="keyPersonVisible" :before-close="personInfoClose" :modal="true"
|
:modal-append-to-body="false" :close-on-click-modal="false" class="keyPerson-details-box">
|
<div class="header" v-show="userInfo.dept_id != '1596020515064381442'">
|
<div>
|
人员名称:
|
<input type="text" v-model="peoplePoliceName" placeholder="请输入人员名称" />
|
</div>
|
<div>
|
联系电话:
|
<input type="text" v-model="peopleCallPhone" placeholder="请输入联系电话" />
|
</div>
|
<el-button type="primary" icon="el-icon-search" @click="searchPeopleDetail">搜索</el-button>
|
<el-button type="primary" icon="el-icon-delete" @click="clearPeopleDetailSearchValue">清空</el-button>
|
</div>
|
|
<div v-loading="curLoading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
|
element-loading-background="rgba(0, 0, 0, 0.5)" class="body">
|
<el-table :data="keyPersonDetailArr" style="width: 100%"
|
:header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
|
:cell-style="{ 'text-align': 'center', 'borderColor': '#324e75', 'cursor': 'default' }">
|
<template slot="empty">
|
<div>{{ keyPersonEmptyText }}</div>
|
</template>
|
<el-table-column label="序号" type="index" align="center">
|
<template slot-scope="scope">
|
<span>{{ (peoplePage.currentPage - 1) * peoplePage.pageSize + scope.$index + 1 }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column :show-overflow-tooltip="true" prop="realName" label="姓名"></el-table-column>
|
<el-table-column :show-overflow-tooltip="true" prop="address" label="地址" min-width="240%"></el-table-column>
|
<el-table-column :show-overflow-tooltip="true" prop="phone" label="联系电话"></el-table-column>
|
<el-table-column :show-overflow-tooltip="true" prop="zdryzry" label="责任人"></el-table-column>
|
<el-table-column :show-overflow-tooltip="true" prop="zdrtjdld" label="街道责任领导"></el-table-column>
|
<el-table-column :show-overflow-tooltip="true" prop="zdryxl" label="重点人员类型"></el-table-column>
|
<!-- <el-table-column :show-overflow-tooltip="true" prop="policeStationName" label="所属派出所"></el-table-column> -->
|
<!-- <el-table-column :show-overflow-tooltip="true" prop="areaName" label="所属责任区"></el-table-column> -->
|
<el-table-column label="操作" align="center">
|
<template slot-scope="scope">
|
<el-button :disabled="positionDisabled(scope.row)" @click="rowClick(scope.row)" type="text" size="small"
|
title="定位">
|
<i class="el-icon-location" :style="{ color: positionColor(scope.row) }"></i>
|
</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
|
<div class="pages all-pagination-sty" ref="tablePagination" v-show="userInfo.dept_id != '1596020515064381442'">
|
<el-pagination background layout="prev, pager, next, total" :page-size="peoplePage.pageSize"
|
:total="peoplePage.total" :current-page="peoplePage.currentPage"
|
@current-change="handlePersonPageChange"></el-pagination>
|
</div>
|
</div>
|
</el-dialog>
|
</template>
|
|
<script>
|
|
import { keypeopleJSON } from '../../homeleft/keyPeople'
|
import { getPersonInfoPage } from '@/api/dept/index.js'
|
|
export default {
|
inject: ['userInfo'],
|
|
props: ['policeStaionID'],
|
|
data () {
|
return {
|
curLoading: false,
|
keyPersonEmptyText: "",
|
|
peoplePoliceName: '',
|
|
|
keyPersonTitle: '',
|
keyPersonVisible: false,
|
keyPersonDetailArr: [],
|
|
peoplePage: {
|
total: 0,
|
pageSize: 15,
|
currentPage: 1
|
},
|
}
|
},
|
|
computed: {
|
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"
|
} else {
|
return "#ccc"
|
}
|
}
|
},
|
|
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
|
} else {
|
return true
|
}
|
}
|
},
|
},
|
|
methods: {
|
showkeypersondetail (name) {
|
this.curLoading = true
|
this.keyPersonEmptyText = ""
|
this.keyPersonDetailArr = []
|
|
this.keyPersonVisible = true
|
this.keyPersonTitle = name
|
|
if (this.userInfo.dept_id == '1596020515064381442') {
|
if (name == '征地拆迁群体') {
|
this.keyPersonDetailArr = keypeopleJSON.filter(item => {
|
return item.zdryxl == '征地拆迁群体'
|
})
|
} else if (name == '非涉法涉诉重点个访人员') {
|
this.keyPersonDetailArr = keypeopleJSON.filter(item => {
|
return item.zdryxl == '非涉法涉诉重点个访人员'
|
})
|
} else if (name == '涉法涉诉重点个访人员') {
|
this.keyPersonDetailArr = keypeopleJSON.filter(item => {
|
return item.zdryxl == '涉法涉诉重点个访人员'
|
})
|
} else if (name == '楼盘业主维权群体') {
|
this.keyPersonDetailArr = keypeopleJSON.filter(item => {
|
return item.zdryxl == '楼盘业主维权群体'
|
})
|
}
|
|
setTimeout(() => {
|
this.curLoading = false
|
}, 500)
|
} else {
|
this.getPersonInfoPage(2)
|
}
|
},
|
|
rowClick (row) {
|
this.$EventBus.$emit('toPosition', {
|
siteJd: row.x,
|
siteWd: row.y,
|
siteGd: 200
|
})
|
|
this.$store.commit('SET_ARCHITECTUREPOPUP', true)
|
|
this.$store.commit('SET_ARCHITECTUREDATAPOPUP', { ...row, curDataTitle: '重点人员', curDataType: '茅家岭派出所' })
|
|
// eslint-disable-next-line no-redeclare
|
var popup = new global.DC.DivForms(global.viewer, {
|
domId: 'architectureDivElementDom',
|
position: [
|
global.DC.Transform.transformWGS84ToCartesian(
|
new global.DC.Position(
|
Number(row.x),
|
Number(row.y),
|
0
|
)
|
)
|
]
|
})
|
|
this.keyPersonVisible = false
|
},
|
|
/**
|
* @description: 现有人员和重点人员列表弹窗关闭的事件
|
* @return {*}
|
*/
|
personInfoClose () {
|
this.peoplePoliceName = ''
|
this.peopleCallPhone = ''
|
this.peoplePage.currentPage = 1
|
|
this.keyPersonDetailArr = []
|
|
|
this.keyPersonVisible = false
|
},
|
|
/**
|
* @description: 列表弹框中的搜索
|
* @return {*}
|
*/
|
searchPeopleDetail () {
|
this.curLoading = true
|
this.keyPersonDetailArr = []
|
this.keyPersonEmptyText = ""
|
this.peoplePage.currentPage = 1
|
this.getPersonInfoPage(2)
|
},
|
|
/**
|
* @description: 列表弹框中的清除
|
* @return {*}
|
*/
|
clearPeopleDetailSearchValue () {
|
this.curLoading = true
|
this.keyPersonDetailArr = []
|
this.keyPersonEmptyText = ""
|
this.peoplePoliceName = ''
|
this.peopleCallPhone = ''
|
this.peoplePage.currentPage = 1
|
|
this.getPersonInfoPage(2)
|
},
|
|
/**
|
* @description: 重点人员列表分页切换
|
* @param {*} current 当前页
|
* @return {*}
|
*/
|
handlePersonPageChange (current) {
|
this.curLoading = true
|
this.keyPersonDetailArr = []
|
this.keyPersonEmptyText = ""
|
this.peoplePage.currentPage = current
|
|
this.getPersonInfoPage(2)
|
},
|
|
/**
|
* @description: 获取重点人员列表信息
|
* @return {*}
|
*/
|
getPersonInfoPage (status) {
|
getPersonInfoPage({
|
status,
|
depaId: this.userInfo.dept_id,
|
zdryxl: this.keyPersonTitle,
|
realName: this.peoplePoliceName,
|
phone: this.peopleCallPhone,
|
current: this.peoplePage.currentPage,
|
size: this.peoplePage.pageSize
|
}).then(res => {
|
this.keyPersonDetailArr = []
|
this.peoplePage.total = 0
|
|
if (res.data.data.records.length > 0) {
|
this.keyPersonEmptyText = ""
|
this.peoplePage.total = res.data.data.total
|
this.keyPersonDetailArr = res.data.data.records
|
} else {
|
this.keyPersonEmptyText = "暂无重点人员数据"
|
this.keyPersonDetailArr = []
|
this.peoplePage.total = 0
|
}
|
setTimeout(() => {
|
this.curLoading = false
|
}, 500)
|
})
|
},
|
},
|
|
destroyed () {
|
this.$store.commit('SET_ARCHITECTUREPOPUP', false)
|
},
|
}
|
</script>
|
|
<style lang="scss" scoped></style>
|