| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-07-19 15:26:58 |
| | | * @LastEditTime: 2024-12-20 14:52:23 |
| | | * @FilePath: \srs-police-affairs\src\views\policeInfor\index.vue |
| | | * @Description: 辖区管理 |
| | | * |
| | |
| | | --> |
| | | |
| | | <template> |
| | | <div class="police-page container"> |
| | | <div v-show="boxShow" class="container-content" ref="containerContent"> |
| | | <div class="time-select" ref="timeSelect"> |
| | | <div class="search-item-box"> |
| | | <span>警情类型:</span> |
| | | <div class="police-page container"> |
| | | <div v-show="boxShow" class="container-content" ref="containerContent"> |
| | | <div class="time-select" ref="timeSelect"> |
| | | <div class="search-item-box"> |
| | | <span>警情类型:</span> |
| | | |
| | | <el-select style="flex: 1;" size="small" v-model="policeInforValue" @change="policeTypeChange" |
| | | placeholder="请选择"> |
| | | <el-option v-for="item in policeInforOptions" :key="item.value" :label="item.label" |
| | | :value="item.value"></el-option> |
| | | </el-select> |
| | | <el-select style="flex: 1;" size="small" v-model="policeInforValue" @change="policeTypeChange" |
| | | placeholder="请选择"> |
| | | <el-option v-for="item in policeInforOptions" :key="item.value" :label="item.label" |
| | | :value="item.value"></el-option> |
| | | </el-select> |
| | | |
| | | <div style="margin-left: 8px;"> |
| | | <el-checkbox v-model="siteLayerShow" @change="siteLayerChange">点位图</el-checkbox> |
| | | </div> |
| | | <div style="margin-left: 8px;"> |
| | | <el-checkbox v-model="siteLayerShow" @change="siteLayerChange">点位图</el-checkbox> |
| | | </div> |
| | | |
| | | <div style="margin-left: 8px;"> |
| | | <el-checkbox v-model="heatMapShow" @change="heatMapChange">热力图</el-checkbox> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="search-item-box" v-show="areaChangeShow"> |
| | | <span>辖区选择:</span> |
| | | |
| | | <el-select style="flex: 1;" size="small" v-model="areaChangeValue" @change="areaValueChange" |
| | | placeholder="请选择"> |
| | | <el-option v-for="item in areaListData" :key="item.value" :label="item.label" |
| | | :value="item.value"></el-option> |
| | | </el-select> |
| | | </div> |
| | | |
| | | <div class="search-item-box"> |
| | | <el-date-picker size="mini" :clearable="false" v-model="currentTime" type="daterange" align="center" |
| | | unlink-panels range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" |
| | | @change="datePickerChange" :picker-options="pickerOptions"></el-date-picker> |
| | | </div> |
| | | <div class="search-item-box"> |
| | | <el-input size="small" placeholder="请输入报警内容…" v-model="searchBjnr" @change="bjnrSearch" |
| | | clearable></el-input><el-button icon="el-icon-search" class="bjnr-btn">搜索</el-button> |
| | | </div> |
| | | <div class="search-item-box">数量:{{ historyPoliceInforData.length }} 起</div> |
| | | </div> |
| | | |
| | | <div class="police-info"> |
| | | <el-table :data="historyPoliceInforData" style="width: 100%" :height="currentTableHeight" |
| | | :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }" |
| | | :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75', 'cursor': 'default' }" |
| | | :row-class-name="tableRowClassName" class="police-infor-table" @cell-mouse-enter="tableEnter" |
| | | @cell-mouse-leave="tabelLeave"> |
| | | <template slot="empty"> |
| | | <div>{{ historyEmptyText }}</div> |
| | | </template> |
| | | <el-table-column prop="JJDWMC" :show-overflow-tooltip="true" label="接警单位" |
| | | min-width="80%"></el-table-column> |
| | | <el-table-column prop="BJSJ" label="报警时间" min-width="50%"></el-table-column> |
| | | <el-table-column prop="jqlxName" label="报警类型"></el-table-column> |
| | | <el-table-column label="操作" align="center" min-width="32%"> |
| | | <template slot-scope="scope"> |
| | | <el-button v-if="!whetherPosition(scope.row)" @click="clickData(scope.row)" type="text" |
| | | size="small" title="定位"> |
| | | <i class="el-icon-location" :style="{ color: positionColor(scope.row) }"></i> |
| | | </el-button> |
| | | <el-buttonalign-justify @click="siteClick(scope.row)" type="text" size="small" title="详情"> |
| | | <i class="el-icon-document"></i> |
| | | </el-buttonalign-justify> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div style="margin-left: 8px;"> |
| | | <el-checkbox v-model="heatMapShow" @change="heatMapChange">热力图</el-checkbox> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-dialog title="警情信息" :visible.sync="policeSituationVisible" :modal-append-to-body="false" |
| | | :before-close="policeSituationBeforeClose" :modal="true" :close-on-click-modal="false" |
| | | class="policeSituation-details-box"> |
| | | <div class="btn-change"> |
| | | <div :class="{ on: policeInformationType == '接警信息' }" @click="alarmOrActAsPolice('接警信息')">接警信息</div> |
| | | <div :class="{ on: policeInformationType == '出警信息' }" @click="alarmOrActAsPolice('出警信息')">出警信息</div> |
| | | </div> |
| | | <div class="search-item-box" v-show="areaChangeShow"> |
| | | <span>辖区选择:</span> |
| | | |
| | | <div v-show="policeInformationType == '接警信息'" class="box"> |
| | | <div class="item"> |
| | | <div>接警单位编号:</div> |
| | | <div>{{ policeSituationDetailObj.JJDWBH }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>接警单位名称:</div> |
| | | <div>{{ policeSituationDetailObj.JJDWMC }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>接警单编号:</div> |
| | | <div>{{ policeSituationDetailObj.JJDBH }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>接警员编号:</div> |
| | | <div>{{ policeSituationDetailObj.JJYBH }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>接警员姓名:</div> |
| | | <div>{{ policeSituationDetailObj.JJYXM }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>报警时间:</div> |
| | | <div>{{ policeSituationDetailObj.BJSJ }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>报警电话:</div> |
| | | <div>{{ policeSituationDetailObj.LXDH }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>报警人姓名:</div> |
| | | <div>{{ policeSituationDetailObj.BJRXM }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>报警类别:</div> |
| | | <div>{{ policeSituationDetailObj.BJLB }}</div> |
| | | </div> |
| | | |
| | | <div class="item"> |
| | | <div>报警类型:</div> |
| | | <div>{{ policeSituationDetailObj.jqlxName }}</div> |
| | | </div> |
| | | |
| | | <div class="dialog-content"> |
| | | <div>事发地址:</div> |
| | | <div>{{ policeSituationDetailObj.SFDZ }}</div> |
| | | </div> |
| | | |
| | | <div class="dialog-content"> |
| | | <div>报警内容:</div> |
| | | <div>{{ policeSituationDetailObj.BJNR }}</div> |
| | | </div> |
| | | |
| | | <div class="dialog-content"> |
| | | <div>备注:</div> |
| | | <div>{{ policeSituationDetailObj.MEMO }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div v-show="policeInformationType == '出警信息' && JSON.stringify(CJdata) != '{}'" class="box"> |
| | | <div class="item"> |
| | | <div>处警单位编号:</div> |
| | | <div>{{ CJdata.CJDWBH }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>处警单位名称:</div> |
| | | <div>{{ CJdata.CJDWMC }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>处警单编号:</div> |
| | | <div>{{ CJdata.CJDBH }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>处警员编号:</div> |
| | | <div>{{ CJdata.CJYBH }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>处警员姓名:</div> |
| | | <div>{{ CJdata.CJYXM }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>接警时间:</div> |
| | | <div>{{ CJdata.JJSJ }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>到达现场时间:</div> |
| | | <div>{{ CJdata.DDXCSJ }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>首次反馈时间:</div> |
| | | <div>{{ CJdata.SCFKSJ }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>处理完毕时间:</div> |
| | | <div>{{ CJdata.CLWBSJ }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>出动人员:</div> |
| | | <div>{{ CJdata.CDRY }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>出动车辆:</div> |
| | | <div>{{ CJdata.CDCL }}</div> |
| | | </div> |
| | | |
| | | <div class="item"> |
| | | <div>处警类型:</div> |
| | | <div>{{ CJdata.CJLX }}</div> |
| | | </div> |
| | | |
| | | <div class="dialog-content"> |
| | | <div>备注:</div> |
| | | <div>{{ CJdata.MEMO }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div v-show="policeInformationType == '出警信息' && JSON.stringify(CJdata) == '{}'" class="box no-data">暂无警情</div> |
| | | </el-dialog> |
| | | |
| | | <div class="cur-tooltip" v-show="currentTooltip" |
| | | :style="{ top: currentPointerPosition.y + 'px', left: currentPointerPosition.x + 'px' }"> |
| | | <div class="type-name">报警内容</div> |
| | | <div class="type-content">{{ currentBJNR }}</div> |
| | | <el-select style="flex: 1;" size="small" v-model="areaChangeValue" @change="areaValueChange" |
| | | placeholder="请选择"> |
| | | <el-option v-for="item in areaListData" :key="item.value" :label="item.label" |
| | | :value="item.value"></el-option> |
| | | </el-select> |
| | | </div> |
| | | |
| | | <div class="search-item-box"> |
| | | <el-date-picker size="mini" :clearable="false" v-model="currentTime" type="daterange" align="center" |
| | | unlink-panels range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="datePickerChange" |
| | | :picker-options="pickerOptions"></el-date-picker> |
| | | </div> |
| | | <div class="search-item-box"> |
| | | <el-input size="small" placeholder="请输入报警内容…" v-model="searchBjnr" @change="bjnrSearch" |
| | | clearable></el-input><el-button icon="el-icon-search" class="bjnr-btn">搜索</el-button> |
| | | </div> |
| | | <div class="search-item-box">数量:{{ historyPoliceInforData.length }} 起</div> |
| | | </div> |
| | | |
| | | <div class="police-info"> |
| | | <el-table :data="historyPoliceInforData" style="width: 100%" :height="currentTableHeight" |
| | | :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }" |
| | | :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75', 'cursor': 'default' }" |
| | | :row-class-name="tableRowClassName" class="police-infor-table" @cell-mouse-enter="tableEnter" |
| | | @cell-mouse-leave="tabelLeave"> |
| | | <template slot="empty"> |
| | | <div>{{ historyEmptyText }}</div> |
| | | </template> |
| | | <el-table-column prop="JJDWMC" :show-overflow-tooltip="true" label="接警单位" min-width="80%"></el-table-column> |
| | | <el-table-column prop="BJSJ" label="报警时间" min-width="50%"></el-table-column> |
| | | <el-table-column prop="jqlxName" label="报警类型"></el-table-column> |
| | | <el-table-column label="操作" align="center" min-width="32%"> |
| | | <template slot-scope="scope"> |
| | | <el-button v-if="!whetherPosition(scope.row)" @click="clickData(scope.row)" type="text" size="small" |
| | | title="定位"> |
| | | <i class="el-icon-location" :style="{ color: positionColor(scope.row) }"></i> |
| | | </el-button> |
| | | <el-buttonalign-justify @click="siteClick(scope.row)" type="text" size="small" title="详情"> |
| | | <i class="el-icon-document"></i> |
| | | </el-buttonalign-justify> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="cur-tooltip" v-show="currentTooltip" |
| | | :style="{ top: currentPointerPosition.y + 'px', left: currentPointerPosition.x + 'px' }"> |
| | | <div class="type-name">报警内容</div> |
| | | <div class="type-content">{{ currentBJNR }}</div> |
| | | </div> |
| | | |
| | | <police-infor-dialog ref="policeInforDialog"></police-infor-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | let loading = null |
| | | |
| | | export default { |
| | | inject: ['userInfo'], |
| | | inject: ['userInfo'], |
| | | |
| | | data () { |
| | | return { |
| | | realPoliceInforData: [], // 实时 |
| | | historyPoliceInforData: [], |
| | | data () { |
| | | return { |
| | | realPoliceInforData: [], // 实时 |
| | | historyPoliceInforData: [], |
| | | |
| | | realEmptyText: "", |
| | | realEmptyText: "", |
| | | |
| | | historyEmptyText: "", |
| | | historyEmptyText: "", |
| | | |
| | | boxShow: false, |
| | | pages: { |
| | | total: 0, |
| | | }, |
| | | boxShow: false, |
| | | pages: { |
| | | total: 0, |
| | | }, |
| | | |
| | | currentTableHeight: 0, |
| | | currentTime: [], |
| | | currentTableHeight: 0, |
| | | currentTime: [], |
| | | |
| | | policeInformationType: '接警信息', |
| | | policeSituationDetailObj: {}, |
| | | policeSituationVisible: false, |
| | | currentPointerPosition: { |
| | | x: 0, |
| | | y: 0 |
| | | }, |
| | | |
| | | CJdata: {}, |
| | | currentTooltip: false, |
| | | currentBJNR: '', |
| | | pickerOptions: { |
| | | shortcuts: [ |
| | | { |
| | | text: '最近一周', |
| | | onClick (picker) { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 7) |
| | | picker.$emit('pick', [start, end]) |
| | | } |
| | | }, |
| | | { |
| | | text: '最近两周', |
| | | onClick (picker) { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 14) |
| | | picker.$emit('pick', [start, end]) |
| | | } |
| | | }, |
| | | { |
| | | text: '最近一个月', |
| | | onClick (picker) { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 30) |
| | | picker.$emit('pick', [start, end]) |
| | | } |
| | | }, |
| | | { |
| | | text: '最近三个月', |
| | | onClick (picker) { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 90) |
| | | picker.$emit('pick', [start, end]) |
| | | } |
| | | }] |
| | | }, |
| | | |
| | | currentPointerPosition: { |
| | | x: 0, |
| | | y: 0 |
| | | }, |
| | | |
| | | currentTooltip: false, |
| | | currentBJNR: '', |
| | | pickerOptions: { |
| | | shortcuts: [ |
| | | { |
| | | text: '最近一周', |
| | | onClick (picker) { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 7) |
| | | picker.$emit('pick', [start, end]) |
| | | } |
| | | }, |
| | | { |
| | | text: '最近两周', |
| | | onClick (picker) { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 14) |
| | | picker.$emit('pick', [start, end]) |
| | | } |
| | | }, |
| | | { |
| | | text: '最近一个月', |
| | | onClick (picker) { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 30) |
| | | picker.$emit('pick', [start, end]) |
| | | } |
| | | }, |
| | | { |
| | | text: '最近三个月', |
| | | onClick (picker) { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 90) |
| | | picker.$emit('pick', [start, end]) |
| | | } |
| | | }] |
| | | }, |
| | | |
| | | policeInforValue: '', |
| | | policeInforOptions: [ |
| | | { |
| | | value: '', |
| | | label: '全部' |
| | | }, |
| | | { |
| | | value: '盗窃', |
| | | label: '盗窃' |
| | | }, |
| | | { |
| | | value: '涉诈', |
| | | label: '涉诈' |
| | | }, |
| | | { |
| | | value: '纠纷', |
| | | label: '纠纷' |
| | | }, |
| | | { |
| | | value: '涉赌', |
| | | label: '涉赌' |
| | | }, |
| | | { |
| | | value: '涉毒', |
| | | label: '涉毒' |
| | | }, |
| | | { |
| | | value: '涉黄', |
| | | label: '涉黄' |
| | | }, |
| | | { |
| | | value: '求助', |
| | | label: '求助' |
| | | }, |
| | | { |
| | | value: '其他', |
| | | label: '其他' |
| | | } |
| | | ], |
| | | |
| | | areaChangeShow: true, |
| | | areaChangeValue: '1123598813738675201', |
| | | areaListData: [ |
| | | { |
| | | label: '信州分局', |
| | | value: '1123598813738675201' |
| | | }, |
| | | { |
| | | label: '东市派出所', |
| | | value: '1596019492522426369' |
| | | }, |
| | | { |
| | | label: '水南派出所', |
| | | value: '1596020272834936833' |
| | | }, |
| | | { |
| | | label: '西市派出所', |
| | | value: '1596020342712041474' |
| | | }, |
| | | { |
| | | label: '北门派出所', |
| | | value: '1596020390174785537' |
| | | }, |
| | | { |
| | | label: '车站派出所', |
| | | value: '1596020461461176321' |
| | | }, |
| | | { |
| | | label: '茅家岭派出所', |
| | | value: '1596020515064381442' |
| | | }, |
| | | { |
| | | label: '沙溪派出所', |
| | | value: '1596020574275371010' |
| | | }, |
| | | { |
| | | label: '朝阳派出所', |
| | | value: '1596020623172567041' |
| | | }, |
| | | { |
| | | label: '灵溪派出所', |
| | | value: '1596020683096588290' |
| | | }, |
| | | { |
| | | label: '秦峰派出所', |
| | | value: '1596020727883366401' |
| | | }, |
| | | { |
| | | label: '凤凰派出所', |
| | | value: '1596020775790706690' |
| | | }, |
| | | { |
| | | label: '石狮派出所', |
| | | value: '1614543582897971202' |
| | | }, |
| | | { |
| | | label: '大院派出所', |
| | | value: '1614543698551709698' |
| | | }, |
| | | { |
| | | label: '师院派出所', |
| | | value: '1614543791782699010' |
| | | } |
| | | ], |
| | | |
| | | heatMap: null, |
| | | |
| | | heatMapShow: false, |
| | | heatMapData: [], |
| | | |
| | | siteLayerShow: true, |
| | | searchBjnr: '' |
| | | policeInforValue: '', |
| | | policeInforOptions: [ |
| | | { |
| | | value: '', |
| | | label: '全部' |
| | | }, |
| | | { |
| | | value: '盗窃', |
| | | label: '盗窃' |
| | | }, |
| | | { |
| | | value: '涉诈', |
| | | label: '涉诈' |
| | | }, |
| | | { |
| | | value: '纠纷', |
| | | label: '纠纷' |
| | | }, |
| | | { |
| | | value: '涉赌', |
| | | label: '涉赌' |
| | | }, |
| | | { |
| | | value: '涉毒', |
| | | label: '涉毒' |
| | | }, |
| | | { |
| | | value: '涉黄', |
| | | label: '涉黄' |
| | | }, |
| | | { |
| | | value: '求助', |
| | | label: '求助' |
| | | }, |
| | | { |
| | | value: '其他', |
| | | label: '其他' |
| | | } |
| | | }, |
| | | ], |
| | | |
| | | created () { |
| | | const that = this |
| | | |
| | | this.$nextTick(() => { |
| | | initMapPosition() |
| | | }) |
| | | |
| | | this.defaultDate() |
| | | |
| | | this.$EventBus.$on('PoliceInforSiteClick', (params) => { |
| | | that.siteClick(params) |
| | | }) |
| | | |
| | | if (this.userInfo.dept_id != '1123598813738675201') { |
| | | console.log(this.userInfo.dept_id) |
| | | this.areaChangeShow = false |
| | | areaChangeShow: true, |
| | | areaChangeValue: '1123598813738675201', |
| | | areaListData: [ |
| | | { |
| | | label: '信州分局', |
| | | value: '1123598813738675201' |
| | | }, |
| | | { |
| | | label: '东市派出所', |
| | | value: '1596019492522426369' |
| | | }, |
| | | { |
| | | label: '水南派出所', |
| | | value: '1596020272834936833' |
| | | }, |
| | | { |
| | | label: '西市派出所', |
| | | value: '1596020342712041474' |
| | | }, |
| | | { |
| | | label: '北门派出所', |
| | | value: '1596020390174785537' |
| | | }, |
| | | { |
| | | label: '车站派出所', |
| | | value: '1596020461461176321' |
| | | }, |
| | | { |
| | | label: '茅家岭派出所', |
| | | value: '1596020515064381442' |
| | | }, |
| | | { |
| | | label: '沙溪派出所', |
| | | value: '1596020574275371010' |
| | | }, |
| | | { |
| | | label: '朝阳派出所', |
| | | value: '1596020623172567041' |
| | | }, |
| | | { |
| | | label: '灵溪派出所', |
| | | value: '1596020683096588290' |
| | | }, |
| | | { |
| | | label: '秦峰派出所', |
| | | value: '1596020727883366401' |
| | | }, |
| | | { |
| | | label: '凤凰派出所', |
| | | value: '1596020775790706690' |
| | | }, |
| | | { |
| | | label: '石狮派出所', |
| | | value: '1614543582897971202' |
| | | }, |
| | | { |
| | | label: '大院派出所', |
| | | value: '1614543698551709698' |
| | | }, |
| | | { |
| | | label: '师院派出所', |
| | | value: '1614543791782699010' |
| | | } |
| | | ], |
| | | |
| | | window.addEventListener("mousemove", this.tableMouse) |
| | | heatMap: null, |
| | | |
| | | heatMapShow: false, |
| | | heatMapData: [], |
| | | |
| | | siteLayerShow: true, |
| | | searchBjnr: '' |
| | | } |
| | | }, |
| | | |
| | | created () { |
| | | const that = this |
| | | |
| | | this.$nextTick(() => { |
| | | initMapPosition() |
| | | }) |
| | | |
| | | this.defaultDate() |
| | | |
| | | this.$EventBus.$on('PoliceInforSiteClick', (params) => { |
| | | that.siteClick(params) |
| | | }) |
| | | |
| | | if (this.userInfo.dept_id != '1123598813738675201') { |
| | | console.log(this.userInfo.dept_id) |
| | | this.areaChangeShow = false |
| | | } |
| | | |
| | | window.addEventListener("mousemove", this.tableMouse) |
| | | }, |
| | | |
| | | mounted () { |
| | | this.$parent.$parent.resize('400px', true) |
| | | |
| | | this.$nextTick(() => { |
| | | policeInforSiteLayer = new global.DC.PrimitiveLayer('policeInforSiteLayer') |
| | | global.viewer.addLayer(policeInforSiteLayer) |
| | | this.$EventBus.$emit('closeMxTileset') |
| | | this.navClick() |
| | | this.setTableHeight() |
| | | }) |
| | | |
| | | window.addEventListener('resize', this.setTableHeight) |
| | | }, |
| | | |
| | | computed: { |
| | | whetherPosition () { |
| | | return (row) => { |
| | | return !(row.ZDDWXZB && row.ZDDWXZB != 0 && row.ZDDWYZB && row.ZDDWYZB != 0 && row.ZDDWXZB > 73) |
| | | } |
| | | }, |
| | | |
| | | mounted () { |
| | | this.$parent.$parent.resize('400px', true) |
| | | |
| | | this.$nextTick(() => { |
| | | policeInforSiteLayer = new global.DC.PrimitiveLayer('policeInforSiteLayer') |
| | | global.viewer.addLayer(policeInforSiteLayer) |
| | | this.$EventBus.$emit('closeMxTileset') |
| | | this.navClick() |
| | | this.setTableHeight() |
| | | }) |
| | | |
| | | window.addEventListener('resize', this.setTableHeight) |
| | | }, |
| | | |
| | | computed: { |
| | | whetherPosition () { |
| | | return (row) => { |
| | | return !(row.ZDDWXZB && row.ZDDWXZB != 0 && row.ZDDWYZB && row.ZDDWYZB != 0 && row.ZDDWXZB > 73) |
| | | } |
| | | }, |
| | | |
| | | positionColor () { |
| | | return (row) => { |
| | | if (row.ZDDWXZB && row.ZDDWXZB != 0 && row.ZDDWYZB && row.ZDDWYZB != 0 && row.ZDDWXZB > 73) { |
| | | return "#1AFA29" |
| | | } else { |
| | | return "#ccc" |
| | | } |
| | | } |
| | | positionColor () { |
| | | return (row) => { |
| | | if (row.ZDDWXZB && row.ZDDWXZB != 0 && row.ZDDWYZB && row.ZDDWYZB != 0 && row.ZDDWXZB > 73) { |
| | | return "#1AFA29" |
| | | } else { |
| | | return "#ccc" |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | heatMapChange (e) { |
| | | if (e) { |
| | | this.heatMapData.length > 0 && this.addHeatmap(this.heatMapData) |
| | | } else { |
| | | if (this.heatMap != null) { |
| | | this.heatMap.show(false) |
| | | } |
| | | } |
| | | }, |
| | | |
| | | siteLayerChange (e) { |
| | | e ? policeInforSiteLayer.show = true : policeInforSiteLayer.show = false |
| | | }, |
| | | |
| | | tableMouse (e) { |
| | | this.currentPointerPosition = { |
| | | x: e.clientX, |
| | | y: e.clientY |
| | | } |
| | | }, |
| | | |
| | | tableEnter (e) { |
| | | this.currentBJNR = e.BJNR |
| | | this.currentTooltip = true |
| | | }, |
| | | |
| | | tabelLeave (e) { |
| | | console.log(e) |
| | | this.currentTooltip = false |
| | | }, |
| | | |
| | | loading () { |
| | | loading = this.$loading({ |
| | | lock: true, |
| | | text: '拼命加载中', |
| | | spinner: 'el-icon-loading', |
| | | background: 'rgba(0, 0, 0, 0.5)' |
| | | }) |
| | | }, |
| | | |
| | | // 接出警切换 |
| | | alarmOrActAsPolice (type) { |
| | | this.policeInformationType = type |
| | | |
| | | if (type == '出警信息') { |
| | | this.CJdata = {} |
| | | |
| | | getActAsPoliceList(this.policeSituationDetailObj.JJDBH, this.userInfo.dept_id).then(res => { |
| | | if (res.data.data.records.length > 0) { |
| | | this.CJdata = res.data.data.records[0] |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | policeTypeChange () { |
| | | this.navClick() |
| | | }, |
| | | |
| | | areaValueChange () { |
| | | this.navClick() |
| | | }, |
| | | |
| | | // 搜索按钮 |
| | | bjnrSearch () { |
| | | this.navClick() |
| | | }, |
| | | |
| | | // 设置默认时间 |
| | | defaultDate () { |
| | | var current = new Date() |
| | | |
| | | var seven = new Date(current.getTime() - 7 * 24 * 60 * 60 * 1000) |
| | | |
| | | this.currentTime = [seven, current] //将值设置给插件绑定的数据 |
| | | }, |
| | | |
| | | datePickerChange (e) { |
| | | |
| | | this.pages.current = 1 |
| | | |
| | | const date = e.map(item => { |
| | | return this.dateFormat(item) |
| | | }) |
| | | |
| | | this.getAlarmList({ start: date[0], end: date[1] }) |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * @description: 获取当前日期 |
| | | * @param {*} dateData |
| | | * @return {*} |
| | | */ |
| | | dateFormat (dateData) { |
| | | var date = new Date(dateData) |
| | | var y = date.getFullYear() |
| | | var m = date.getMonth() + 1 |
| | | m = m < 10 ? ('0' + m) : m |
| | | var d = date.getDate() |
| | | d = d < 10 ? ('0' + d) : d |
| | | const time = y + '-' + m + '-' + d |
| | | return time |
| | | }, |
| | | |
| | | // 获取实时接警记录 |
| | | getAnswerPolices () { |
| | | this.loading() |
| | | this.realPoliceInforData = [] |
| | | this.realEmptyText = " " |
| | | getAnswerPolices({ deptId: this.userInfo.dept_id }).then(res => { |
| | | if (res.data && res.data.length) { |
| | | this.realPoliceInforData = res.data.map((item, index) => { |
| | | |
| | | if (item.JJDWMC.indexOf('上饶市公安局') != -1) item.JJDWMC = item.JJDWMC.replace(/上饶市公安局/, '市局') |
| | | if (item.JJDWMC.indexOf('信州区分局') != -1) item.JJDWMC = item.JJDWMC.replace(/信州区分局/, '') |
| | | if (item.JJDWMC.indexOf('信州') != -1) item.JJDWMC = item.JJDWMC.replace(/信州/, '') |
| | | |
| | | return { ...item, index: index + 1, lng: item.ZDDWXZB, lat: item.ZDDWYZB } |
| | | }) |
| | | } else { |
| | | this.realPoliceInforData = [] |
| | | this.realEmptyText = "暂无实时警情信息" |
| | | } |
| | | |
| | | setTimeout(() => { |
| | | loading && loading.close() |
| | | }, 500) |
| | | }).catch(res => { |
| | | this.realEmptyText = "暂无实时警情信息" |
| | | setTimeout(() => { |
| | | loading && loading.close() |
| | | }, 500) |
| | | }) |
| | | }, |
| | | |
| | | addHeatmap (data) { |
| | | if (this.heatMap != null) { |
| | | this.heatMap.show(false) |
| | | } |
| | | |
| | | let bounds = { |
| | | west: 117.9, |
| | | south: 28.3, |
| | | east: 118.2, |
| | | north: 28.7 |
| | | } |
| | | |
| | | //初始化cesiumheatmap对象,传入相应的参数 |
| | | // eslint-disable-next-line no-undef |
| | | let heatMap = CesiumHeatmap.create( |
| | | global.viewer, // 视图层 |
| | | bounds, // 矩形坐标 |
| | | { |
| | | radius: 10, |
| | | maxOpacity: .5, |
| | | minOpacity: 0, |
| | | blur: .75 |
| | | } |
| | | ) |
| | | let valueMin = 0 |
| | | let valueMax = 100 |
| | | // add data to heatmap |
| | | //获取动态数据 |
| | | heatMap.setWGS84Data(valueMin, valueMax, data) |
| | | this.heatMap = heatMap |
| | | }, |
| | | |
| | | // 获取历史接警记录(不分页) |
| | | getAlarmList (params) { |
| | | const that = this |
| | | this.loading() |
| | | |
| | | this.clearLayer() |
| | | |
| | | this.historyPoliceInforData = [] |
| | | this.heatMapData = [] |
| | | |
| | | this.historyEmptyText = "" |
| | | |
| | | if (this.heatMap != null) { |
| | | this.heatMap.show(false) |
| | | } |
| | | |
| | | let jjdwbh = '' |
| | | if (this.userInfo.dept_id == '1123598813738675201') { |
| | | jjdwbh = this.areaChangeValue |
| | | } else { |
| | | jjdwbh = this.userInfo.dept_id |
| | | } |
| | | |
| | | that.$axios.all([ |
| | | getAlarmList({ ...params, jjdwbh, type: 3, bjlx: that.policeInforValue, bjnr: that.searchBjnr }), |
| | | getAlarmList({ ...params, jjdwbh, type: 3, bjlx: '', bjnr: that.searchBjnr }) |
| | | ]).then(that.$axios.spread(function (classifyData, allData) { |
| | | if (classifyData.data.data.length > 0) { |
| | | that.historyPoliceInforData = classifyData.data.data.map((item, index) => { |
| | | if (item.JJDWMC.indexOf('上饶市公安局') != -1) item.JJDWMC = item.JJDWMC.replace(/上饶市公安局/, '市局') |
| | | if (item.JJDWMC.indexOf('信州区分局') != -1) item.JJDWMC = item.JJDWMC.replace(/信州区分局/, '') |
| | | if (item.JJDWMC.indexOf('信州') != -1) item.JJDWMC = item.JJDWMC.replace(/信州/, '') |
| | | |
| | | return { ...item, index: index + 1, lng: item.ZDDWXZB, lat: item.ZDDWYZB } |
| | | }) |
| | | } else { |
| | | // that.pages.total = 0 |
| | | that.historyPoliceInforData = [] |
| | | that.realEmptyText = "暂无历史警情信息" |
| | | } |
| | | |
| | | if (allData.data.data.length > 0) { |
| | | allData.data.data.forEach((item, index) => { |
| | | if (item.ZDDWXZB && item.ZDDWXZB != '' && item.ZDDWXZB > 0 && item.ZDDWXZB > 73) { |
| | | that.heatMapData.push({ x: Number(item.ZDDWXZB), y: Number(item.ZDDWYZB), value: 23 }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | if (that.siteLayerShow) { |
| | | that.addPoliceInforSiteLayer(that.historyPoliceInforData) |
| | | } |
| | | |
| | | if (that.heatMapShow) { |
| | | that.heatMapData.length > 0 && that.addHeatmap(that.heatMapData) |
| | | } |
| | | |
| | | setTimeout(() => { |
| | | loading && loading.close() |
| | | }, 500) |
| | | })).catch(res => { |
| | | setTimeout(() => { |
| | | loading && loading.close() |
| | | }, 500) |
| | | }) |
| | | }, |
| | | |
| | | addPoliceInforSiteLayer (data) { |
| | | this.clearLayer() |
| | | let policeInfoPositionList = [] |
| | | this.siteLayerShow = true |
| | | |
| | | data.forEach((item, index) => { |
| | | let pointColor, pointOutlineColor |
| | | |
| | | switch (item.jqlxJointName) { |
| | | case '盗窃': |
| | | pointColor = global.DC.Namespace.Cesium.Color.fromBytes(57, 16, 133, 255) |
| | | pointOutlineColor = global.DC.Namespace.Cesium.Color.fromBytes(57, 16, 133, 125) |
| | | break |
| | | case '涉诈': |
| | | pointColor = global.DC.Namespace.Cesium.Color.fromBytes(196, 29, 127, 255) |
| | | pointOutlineColor = global.DC.Namespace.Cesium.Color.fromBytes(196, 29, 127, 125) |
| | | break |
| | | case '纠纷': |
| | | pointColor = global.DC.Namespace.Cesium.Color.fromBytes(255, 120, 117, 255) |
| | | pointOutlineColor = global.DC.Namespace.Cesium.Color.fromBytes(255, 120, 117, 125) |
| | | break |
| | | case '涉赌': |
| | | pointColor = global.DC.Namespace.Cesium.Color.fromBytes(255, 122, 69, 255) |
| | | pointOutlineColor = global.DC.Namespace.Cesium.Color.fromBytes(255, 122, 69, 125) |
| | | break |
| | | case '涉毒': |
| | | pointColor = global.DC.Namespace.Cesium.Color.fromBytes(47, 84, 235, 255) |
| | | pointOutlineColor = global.DC.Namespace.Cesium.Color.fromBytes(47, 84, 235, 125) |
| | | break |
| | | case '涉黄': |
| | | pointColor = global.DC.Namespace.Cesium.Color.fromBytes(255, 236, 61, 255) |
| | | pointOutlineColor = global.DC.Namespace.Cesium.Color.fromBytes(255, 236, 61, 125) |
| | | break |
| | | case '求助': |
| | | pointColor = global.DC.Namespace.Cesium.Color.fromBytes(82, 196, 26, 255) |
| | | pointOutlineColor = global.DC.Namespace.Cesium.Color.fromBytes(82, 196, 26, 125) |
| | | break |
| | | default: |
| | | pointColor = global.DC.Namespace.Cesium.Color.fromBytes(207, 19, 34, 255) |
| | | pointOutlineColor = global.DC.Namespace.Cesium.Color.fromBytes(207, 19, 34, 125) |
| | | break |
| | | } |
| | | |
| | | if (item.lng && item.lng != undefined && item.lng != '') { |
| | | let center = new global.DC.Position(Number(item.lng), Number(item.lat)) |
| | | let point = new global.DC.PointPrimitive(center) |
| | | policeInfoPositionList.push(center) |
| | | let num = 0 |
| | | |
| | | timer[index] = setInterval(() => { |
| | | num++ |
| | | if (num >= 10) { |
| | | num = 0 |
| | | } |
| | | |
| | | point.setStyle({ |
| | | outlineColor: pointOutlineColor,//边框颜色 |
| | | outlineWidth: num,//边框大小, |
| | | color: pointColor |
| | | }) |
| | | }, 100) |
| | | |
| | | point.attrParams = item |
| | | point.on(global.DC.MouseEventType.CLICK, this.siteClick) |
| | | policeInforSiteLayer.addOverlay(point) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | /** |
| | | * @description: 警情闪烁点的点击事件 |
| | | * @param {*} e |
| | | * @return {*} |
| | | */ |
| | | siteClick (e) { |
| | | if ('overlay' in e) { |
| | | this.$store.commit('SET_DETAILSPOPUP', { |
| | | showBox: true, |
| | | showBtn: true, |
| | | openMenu: 'policeInfor' |
| | | }) |
| | | |
| | | this.$store.commit('SET_DATAPOPUP', e.overlay.attrParams) |
| | | var popup = new global.DC.DivForms(global.viewer, { |
| | | domId: 'divFormsDomBox', |
| | | position: [ |
| | | global.DC.Transform.transformWGS84ToCartesian( |
| | | new global.DC.Position( |
| | | Number(e.overlay.attrParams.lng), |
| | | Number(e.overlay.attrParams.lat), |
| | | 0 |
| | | ) |
| | | ) |
| | | ] |
| | | }) |
| | | } else { |
| | | this.policeSituationDetailObj = e |
| | | this.policeInformationType = '接警信息' |
| | | this.policeSituationVisible = true |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * @description: 清除图层 |
| | | * @return {*} |
| | | */ |
| | | clearLayer () { |
| | | for (let i = 0; i < timer.length; i++) { |
| | | clearInterval(timer[i]) |
| | | } |
| | | if (policeInforSiteLayer && policeInforSiteLayer != null && policeInforSiteLayer != undefined) { |
| | | policeInforSiteLayer.clear() |
| | | } |
| | | }, |
| | | |
| | | setTableHeight () { |
| | | this.currentTableHeight = this.$refs.containerContent.offsetHeight - this.$refs.timeSelect.offsetHeight |
| | | }, |
| | | |
| | | /** |
| | | * @description: 实时历史警情切换 |
| | | * @return {*} |
| | | */ |
| | | async navClick () { |
| | | |
| | | const date = this.currentTime.map(item => { |
| | | return this.dateFormat(item) |
| | | }) |
| | | |
| | | this.pages.current = 1 |
| | | |
| | | await this.getAlarmList({ |
| | | start: date[0], |
| | | end: date[1] |
| | | }) |
| | | |
| | | this.$nextTick(() => { |
| | | this.setTableHeight() |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * @description: 警情列表点击事件 |
| | | * @param {*} item |
| | | * @return {*} |
| | | */ |
| | | clickData (item) { |
| | | if (item.ZDDWXZB && item.ZDDWXZB != 0 && item.ZDDWYZB && item.ZDDWYZB != 0) { |
| | | this.$EventBus.$emit('toPosition', { |
| | | siteJd: Number(item.ZDDWXZB), |
| | | siteWd: Number(item.ZDDWYZB) |
| | | }) |
| | | |
| | | this.$store.commit('SET_DETAILSPOPUP', { |
| | | showBox: true, |
| | | showBtn: true, |
| | | openMenu: 'policeInfor' |
| | | }) |
| | | |
| | | this.$store.commit('SET_DATAPOPUP', item) |
| | | |
| | | var popup = new global.DC.DivForms(global.viewer, { |
| | | domId: 'divFormsDomBox', |
| | | position: [ |
| | | global.DC.Transform.transformWGS84ToCartesian( |
| | | new global.DC.Position( |
| | | Number(item.ZDDWXZB), |
| | | Number(item.ZDDWYZB), |
| | | 0 |
| | | ) |
| | | ) |
| | | ] |
| | | }) |
| | | } else { |
| | | this.siteClick(item) |
| | | } |
| | | }, |
| | | |
| | | |
| | | // 大小重置 |
| | | boxResize (val) { |
| | | this.boxShow = val |
| | | }, |
| | | }, |
| | | |
| | | destroyed () { |
| | | loading && loading.close() |
| | | |
| | | methods: { |
| | | heatMapChange (e) { |
| | | if (e) { |
| | | this.heatMapData.length > 0 && this.addHeatmap(this.heatMapData) |
| | | } else { |
| | | if (this.heatMap != null) { |
| | | this.heatMap.show(false) |
| | | this.heatMap.show(false) |
| | | } |
| | | } |
| | | }, |
| | | |
| | | siteLayerChange (e) { |
| | | e ? policeInforSiteLayer.show = true : policeInforSiteLayer.show = false |
| | | }, |
| | | |
| | | tableMouse (e) { |
| | | this.currentPointerPosition = { |
| | | x: e.clientX, |
| | | y: e.clientY |
| | | } |
| | | }, |
| | | |
| | | tableEnter (e) { |
| | | this.currentBJNR = e.BJNR |
| | | this.currentTooltip = true |
| | | }, |
| | | |
| | | tabelLeave (e) { |
| | | console.log(e) |
| | | this.currentTooltip = false |
| | | }, |
| | | |
| | | loading () { |
| | | loading = this.$loading({ |
| | | lock: true, |
| | | text: '拼命加载中', |
| | | spinner: 'el-icon-loading', |
| | | background: 'rgba(0, 0, 0, 0.5)' |
| | | }) |
| | | }, |
| | | |
| | | policeTypeChange () { |
| | | this.navClick() |
| | | }, |
| | | |
| | | areaValueChange () { |
| | | this.navClick() |
| | | }, |
| | | |
| | | // 搜索按钮 |
| | | bjnrSearch () { |
| | | this.navClick() |
| | | }, |
| | | |
| | | // 设置默认时间 |
| | | defaultDate () { |
| | | var current = new Date() |
| | | |
| | | var seven = new Date(current.getTime() - 7 * 24 * 60 * 60 * 1000) |
| | | |
| | | this.currentTime = [seven, current] //将值设置给插件绑定的数据 |
| | | }, |
| | | |
| | | datePickerChange (e) { |
| | | |
| | | this.pages.current = 1 |
| | | |
| | | const date = e.map(item => { |
| | | return this.dateFormat(item) |
| | | }) |
| | | |
| | | this.getAlarmList({ start: date[0], end: date[1] }) |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * @description: 获取当前日期 |
| | | * @param {*} dateData |
| | | * @return {*} |
| | | */ |
| | | dateFormat (dateData) { |
| | | var date = new Date(dateData) |
| | | var y = date.getFullYear() |
| | | var m = date.getMonth() + 1 |
| | | m = m < 10 ? ('0' + m) : m |
| | | var d = date.getDate() |
| | | d = d < 10 ? ('0' + d) : d |
| | | const time = y + '-' + m + '-' + d |
| | | return time |
| | | }, |
| | | |
| | | // 获取实时接警记录 |
| | | getAnswerPolices () { |
| | | this.loading() |
| | | this.realPoliceInforData = [] |
| | | this.realEmptyText = " " |
| | | getAnswerPolices({ deptId: this.userInfo.dept_id }).then(res => { |
| | | if (res.data && res.data.length) { |
| | | this.realPoliceInforData = res.data.map((item, index) => { |
| | | |
| | | if (item.JJDWMC.indexOf('上饶市公安局') != -1) item.JJDWMC = item.JJDWMC.replace(/上饶市公安局/, '市局') |
| | | if (item.JJDWMC.indexOf('信州区分局') != -1) item.JJDWMC = item.JJDWMC.replace(/信州区分局/, '') |
| | | if (item.JJDWMC.indexOf('信州') != -1) item.JJDWMC = item.JJDWMC.replace(/信州/, '') |
| | | |
| | | return { ...item, index: index + 1, lng: item.ZDDWXZB, lat: item.ZDDWYZB } |
| | | }) |
| | | } else { |
| | | this.realPoliceInforData = [] |
| | | this.realEmptyText = "暂无实时警情信息" |
| | | } |
| | | |
| | | setTimeout(() => { |
| | | loading && loading.close() |
| | | }, 500) |
| | | }).catch(res => { |
| | | this.realEmptyText = "暂无实时警情信息" |
| | | setTimeout(() => { |
| | | loading && loading.close() |
| | | }, 500) |
| | | }) |
| | | }, |
| | | |
| | | window.removeEventListener('resize', this.setTableHeight) |
| | | addHeatmap (data) { |
| | | if (this.heatMap != null) { |
| | | this.heatMap.show(false) |
| | | } |
| | | |
| | | policeInforSiteLayer != null && policeInforSiteLayer.remove() |
| | | let bounds = { |
| | | west: 117.9, |
| | | south: 28.3, |
| | | east: 118.2, |
| | | north: 28.7 |
| | | } |
| | | |
| | | //初始化cesiumheatmap对象,传入相应的参数 |
| | | // eslint-disable-next-line no-undef |
| | | let heatMap = CesiumHeatmap.create( |
| | | global.viewer, // 视图层 |
| | | bounds, // 矩形坐标 |
| | | { |
| | | radius: 10, |
| | | maxOpacity: .5, |
| | | minOpacity: 0, |
| | | blur: .75 |
| | | } |
| | | ) |
| | | let valueMin = 0 |
| | | let valueMax = 100 |
| | | // add data to heatmap |
| | | //获取动态数据 |
| | | heatMap.setWGS84Data(valueMin, valueMax, data) |
| | | this.heatMap = heatMap |
| | | }, |
| | | |
| | | // 获取历史接警记录(不分页) |
| | | getAlarmList (params) { |
| | | const that = this |
| | | this.loading() |
| | | |
| | | this.clearLayer() |
| | | |
| | | this.historyPoliceInforData = [] |
| | | this.heatMapData = [] |
| | | |
| | | this.historyEmptyText = "" |
| | | |
| | | if (this.heatMap != null) { |
| | | this.heatMap.show(false) |
| | | } |
| | | |
| | | let jjdwbh = '' |
| | | if (this.userInfo.dept_id == '1123598813738675201') { |
| | | jjdwbh = this.areaChangeValue |
| | | } else { |
| | | jjdwbh = this.userInfo.dept_id |
| | | } |
| | | |
| | | that.$axios.all([ |
| | | getAlarmList({ ...params, jjdwbh, type: 3, bjlx: that.policeInforValue, bjnr: that.searchBjnr }), |
| | | getAlarmList({ ...params, jjdwbh, type: 3, bjlx: '', bjnr: that.searchBjnr }) |
| | | ]).then(that.$axios.spread(function (classifyData, allData) { |
| | | if (classifyData.data.data.length > 0) { |
| | | that.historyPoliceInforData = classifyData.data.data.map((item, index) => { |
| | | if (item.JJDWMC.indexOf('上饶市公安局') != -1) item.JJDWMC = item.JJDWMC.replace(/上饶市公安局/, '市局') |
| | | if (item.JJDWMC.indexOf('信州区分局') != -1) item.JJDWMC = item.JJDWMC.replace(/信州区分局/, '') |
| | | if (item.JJDWMC.indexOf('信州') != -1) item.JJDWMC = item.JJDWMC.replace(/信州/, '') |
| | | |
| | | return { ...item, index: index + 1, lng: item.ZDDWXZB, lat: item.ZDDWYZB } |
| | | }) |
| | | } else { |
| | | // that.pages.total = 0 |
| | | that.historyPoliceInforData = [] |
| | | that.realEmptyText = "暂无历史警情信息" |
| | | } |
| | | |
| | | if (allData.data.data.length > 0) { |
| | | allData.data.data.forEach((item, index) => { |
| | | if (item.ZDDWXZB && item.ZDDWXZB != '' && item.ZDDWXZB > 0 && item.ZDDWXZB > 73) { |
| | | that.heatMapData.push({ x: Number(item.ZDDWXZB), y: Number(item.ZDDWYZB), value: 23 }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | if (that.siteLayerShow) { |
| | | that.addPoliceInforSiteLayer(that.historyPoliceInforData) |
| | | } |
| | | |
| | | if (that.heatMapShow) { |
| | | that.heatMapData.length > 0 && that.addHeatmap(that.heatMapData) |
| | | } |
| | | |
| | | setTimeout(() => { |
| | | loading && loading.close() |
| | | }, 500) |
| | | })).catch(res => { |
| | | setTimeout(() => { |
| | | loading && loading.close() |
| | | }, 500) |
| | | }) |
| | | }, |
| | | |
| | | addPoliceInforSiteLayer (data) { |
| | | this.clearLayer() |
| | | let policeInfoPositionList = [] |
| | | this.siteLayerShow = true |
| | | |
| | | data.forEach((item, index) => { |
| | | let pointColor, pointOutlineColor |
| | | |
| | | switch (item.jqlxJointName) { |
| | | case '盗窃': |
| | | pointColor = global.DC.Namespace.Cesium.Color.fromBytes(57, 16, 133, 255) |
| | | pointOutlineColor = global.DC.Namespace.Cesium.Color.fromBytes(57, 16, 133, 125) |
| | | break |
| | | case '涉诈': |
| | | pointColor = global.DC.Namespace.Cesium.Color.fromBytes(196, 29, 127, 255) |
| | | pointOutlineColor = global.DC.Namespace.Cesium.Color.fromBytes(196, 29, 127, 125) |
| | | break |
| | | case '纠纷': |
| | | pointColor = global.DC.Namespace.Cesium.Color.fromBytes(255, 120, 117, 255) |
| | | pointOutlineColor = global.DC.Namespace.Cesium.Color.fromBytes(255, 120, 117, 125) |
| | | break |
| | | case '涉赌': |
| | | pointColor = global.DC.Namespace.Cesium.Color.fromBytes(255, 122, 69, 255) |
| | | pointOutlineColor = global.DC.Namespace.Cesium.Color.fromBytes(255, 122, 69, 125) |
| | | break |
| | | case '涉毒': |
| | | pointColor = global.DC.Namespace.Cesium.Color.fromBytes(47, 84, 235, 255) |
| | | pointOutlineColor = global.DC.Namespace.Cesium.Color.fromBytes(47, 84, 235, 125) |
| | | break |
| | | case '涉黄': |
| | | pointColor = global.DC.Namespace.Cesium.Color.fromBytes(255, 236, 61, 255) |
| | | pointOutlineColor = global.DC.Namespace.Cesium.Color.fromBytes(255, 236, 61, 125) |
| | | break |
| | | case '求助': |
| | | pointColor = global.DC.Namespace.Cesium.Color.fromBytes(82, 196, 26, 255) |
| | | pointOutlineColor = global.DC.Namespace.Cesium.Color.fromBytes(82, 196, 26, 125) |
| | | break |
| | | default: |
| | | pointColor = global.DC.Namespace.Cesium.Color.fromBytes(207, 19, 34, 255) |
| | | pointOutlineColor = global.DC.Namespace.Cesium.Color.fromBytes(207, 19, 34, 125) |
| | | break |
| | | } |
| | | |
| | | if (item.lng && item.lng != undefined && item.lng != '') { |
| | | let center = new global.DC.Position(Number(item.lng), Number(item.lat)) |
| | | let point = new global.DC.PointPrimitive(center) |
| | | policeInfoPositionList.push(center) |
| | | let num = 0 |
| | | |
| | | timer[index] = setInterval(() => { |
| | | num++ |
| | | if (num >= 10) { |
| | | num = 0 |
| | | } |
| | | |
| | | point.setStyle({ |
| | | outlineColor: pointOutlineColor,//边框颜色 |
| | | outlineWidth: num,//边框大小, |
| | | color: pointColor |
| | | }) |
| | | }, 100) |
| | | |
| | | point.attrParams = item |
| | | point.on(global.DC.MouseEventType.CLICK, this.siteClick) |
| | | policeInforSiteLayer.addOverlay(point) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | /** |
| | | * @description: 警情闪烁点的点击事件 |
| | | * @param {*} e |
| | | * @return {*} |
| | | */ |
| | | siteClick (e) { |
| | | if ('overlay' in e) { |
| | | this.$store.commit('SET_DETAILSPOPUP', { |
| | | showBox: true, |
| | | showBtn: true, |
| | | openMenu: 'policeInfor' |
| | | }) |
| | | |
| | | this.$store.commit('SET_DATAPOPUP', e.overlay.attrParams) |
| | | var popup = new global.DC.DivForms(global.viewer, { |
| | | domId: 'divFormsDomBox', |
| | | position: [ |
| | | global.DC.Transform.transformWGS84ToCartesian( |
| | | new global.DC.Position( |
| | | Number(e.overlay.attrParams.lng), |
| | | Number(e.overlay.attrParams.lat), |
| | | 0 |
| | | ) |
| | | ) |
| | | ] |
| | | }) |
| | | } else { |
| | | this.$refs.policeInforDialog.initOpen(e) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * @description: 清除图层 |
| | | * @return {*} |
| | | */ |
| | | clearLayer () { |
| | | for (let i = 0; i < timer.length; i++) { |
| | | clearInterval(timer[i]) |
| | | } |
| | | if (policeInforSiteLayer && policeInforSiteLayer != null && policeInforSiteLayer != undefined) { |
| | | policeInforSiteLayer.clear() |
| | | } |
| | | }, |
| | | |
| | | setTableHeight () { |
| | | this.currentTableHeight = this.$refs.containerContent.offsetHeight - this.$refs.timeSelect.offsetHeight |
| | | }, |
| | | |
| | | /** |
| | | * @description: 实时历史警情切换 |
| | | * @return {*} |
| | | */ |
| | | async navClick () { |
| | | |
| | | const date = this.currentTime.map(item => { |
| | | return this.dateFormat(item) |
| | | }) |
| | | |
| | | this.pages.current = 1 |
| | | |
| | | await this.getAlarmList({ |
| | | start: date[0], |
| | | end: date[1] |
| | | }) |
| | | |
| | | this.$nextTick(() => { |
| | | this.setTableHeight() |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * @description: 警情列表点击事件 |
| | | * @param {*} item |
| | | * @return {*} |
| | | */ |
| | | clickData (item) { |
| | | if (item.ZDDWXZB && item.ZDDWXZB != 0 && item.ZDDWYZB && item.ZDDWYZB != 0) { |
| | | this.$EventBus.$emit('toPosition', { |
| | | siteJd: Number(item.ZDDWXZB), |
| | | siteWd: Number(item.ZDDWYZB) |
| | | }) |
| | | |
| | | this.$store.commit('SET_DETAILSPOPUP', { |
| | | showBox: false, |
| | | showBtn: false, |
| | | openMenu: '' |
| | | showBox: true, |
| | | showBtn: true, |
| | | openMenu: 'policeInfor' |
| | | }) |
| | | |
| | | for (let i = 0; i < timer.length; i++) { |
| | | clearInterval(timer[i]) |
| | | } |
| | | this.$store.commit('SET_DATAPOPUP', item) |
| | | |
| | | this.$parent.$parent.resize('0px') |
| | | var popup = new global.DC.DivForms(global.viewer, { |
| | | domId: 'divFormsDomBox', |
| | | position: [ |
| | | global.DC.Transform.transformWGS84ToCartesian( |
| | | new global.DC.Position( |
| | | Number(item.ZDDWXZB), |
| | | Number(item.ZDDWYZB), |
| | | 0 |
| | | ) |
| | | ) |
| | | ] |
| | | }) |
| | | } else { |
| | | this.siteClick(item) |
| | | } |
| | | }, |
| | | |
| | | this.$EventBus.$off('PoliceInforSiteClick') |
| | | |
| | | // 大小重置 |
| | | boxResize (val) { |
| | | this.boxShow = val |
| | | }, |
| | | }, |
| | | |
| | | destroyed () { |
| | | loading && loading.close() |
| | | |
| | | if (this.heatMap != null) { |
| | | this.heatMap.show(false) |
| | | } |
| | | |
| | | |
| | | window.removeEventListener('resize', this.setTableHeight) |
| | | |
| | | policeInforSiteLayer != null && policeInforSiteLayer.remove() |
| | | |
| | | this.$store.commit('SET_DETAILSPOPUP', { |
| | | showBox: false, |
| | | showBtn: false, |
| | | openMenu: '' |
| | | }) |
| | | |
| | | for (let i = 0; i < timer.length; i++) { |
| | | clearInterval(timer[i]) |
| | | } |
| | | |
| | | this.$parent.$parent.resize('0px') |
| | | |
| | | this.$EventBus.$off('PoliceInforSiteClick') |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .container { |
| | | position: relative; |
| | | position: relative; |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | &-content { |
| | | display: flex; |
| | | flex-direction: column; |
| | | width: 100%; |
| | | height: 100%; |
| | | color: #fff; |
| | | background: $bg-color; |
| | | } |
| | | |
| | | &-content { |
| | | display: flex; |
| | | flex-direction: column; |
| | | width: 100%; |
| | | height: 100%; |
| | | color: #fff; |
| | | background: $bg-color; |
| | | } |
| | | .cur-tooltip { |
| | | padding: 10px; |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | |
| | | .cur-tooltip { |
| | | padding: 10px; |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | max-width: 320px; |
| | | |
| | | max-width: 320px; |
| | | transform: translate(2%, -50%); |
| | | z-index: 9999; |
| | | |
| | | transform: translate(2%, -50%); |
| | | z-index: 9999; |
| | | |
| | | color: #fff; |
| | | background: rgba(35, 50, 167, 0.7); |
| | | border-radius: 10px; |
| | | } |
| | | color: #fff; |
| | | background: rgba(35, 50, 167, 0.7); |
| | | border-radius: 10px; |
| | | } |
| | | } |
| | | </style> |