From e24f70ababdee2b4fdce71c6b80a9bc928fa0331 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 08 May 2023 14:45:08 +0800
Subject: [PATCH] 警情排行调整
---
src/components/map/components/mapPopup.vue | 272 ++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 213 insertions(+), 59 deletions(-)
diff --git a/src/components/map/components/mapPopup.vue b/src/components/map/components/mapPopup.vue
index 0e1e7d9..1464b90 100644
--- a/src/components/map/components/mapPopup.vue
+++ b/src/components/map/components/mapPopup.vue
@@ -1,8 +1,8 @@
<template>
<div>
- <div v-if="detailsPopup" class="divForms-dom" id="divFormsDomBox">
+ <div v-if="detailsPopup.showBox" class="divForms-dom" id="divFormsDomBox">
<div style="width: 100%; height: 100%; transform: translate(0, 50%);">
- <div class="divForms divForms-theme">
+ <div class="divForms divForms-theme" :class="{ 'scale-dom': scaleDomFlag }">
<div class="divForms-wrap">
<div class="area">
<div class="arrow-lt"></div>
@@ -13,51 +13,95 @@
<div class="arrow-rb"></div>
<div class="label-wrap">
<div class="title">
- 详细信息
+ 警情信息
+
<div class="close" @click="closePopup" title="关闭"></div>
</div>
- <div class="label-content">
+ <div class="change-btn" v-show="detailsPopup.showBtn">
+ <div @click="currentBtn = '接警信息'" :class="{ on: currentBtn == '接警信息' }">接警信息</div>
+ <div @click="currentBtnChange('出警信息')" :class="{ on: currentBtn == '出警信息' }">出警信息</div>
+ </div>
+
+ <div v-show="currentBtn == '接警信息'" class="label-content">
<div class="item">
- <div>警情类别:</div>
- <div>{{ dataPopup.type }}</div>
+ <div>接警单位:</div>
+ <div>{{ dataPopup.JJDWMC }}</div>
</div>
<div class="item">
- <div>接警时间:</div>
- <div>{{ dataPopup.dealTime }}</div>
+ <div>接警员:</div>
+ <div>{{ dataPopup.JJYXM }}</div>
</div>
<div class="item">
- <div>警情状态:</div>
- <div>{{ dataPopup.state }}</div>
- </div>
- <div class="item">
- <div>经办民警:</div>
- <div>{{ dataPopup.dealPolice }}</div>
+ <div>报警时间:</div>
+ <div>{{ dataPopup.BJSJ }}</div>
</div>
<div class="item">
<div>报警人:</div>
- <div>{{ dataPopup.callPeople }}</div>
+ <div>{{ dataPopup.BJRXM }}</div>
</div>
<div class="item">
- <div>报警电话:</div>
- <div>{{ dataPopup.comingPhone }}</div>
+ <div>联系电话:</div>
+ <div>{{ dataPopup.LXDH }}</div>
</div>
<div class="item">
- <div>报警人联系人:</div>
- <div>{{ dataPopup.callPhone }}</div>
+ <div>报警内容:</div>
+ <div :title="dataPopup.BJNR">{{ dataPopup.BJNR }}</div>
</div>
<div class="item">
- <div>所属派出所:</div>
- <div>{{ dataPopup.policeName }}</div>
+ <div>事发地址:</div>
+ <div :title="dataPopup.SFDZ">{{ dataPopup.SFDZ }}</div>
</div>
<div class="item">
- <div>经度:</div>
- <div>{{ dataPopup.position[0] }}</div>
+ <div>报警类型:</div>
+ <div>{{ dataPopup.BJLX }}</div>
</div>
<div class="item">
- <div>纬度:</div>
- <div>{{ dataPopup.position[1] }}</div>
+ <div>备注:</div>
+ <div>{{ dataPopup.MEMO }}</div>
</div>
</div>
+
+ <div v-show="currentBtn == '出警信息' && JSON.stringify(CJdata) != '{}'" class="label-content">
+ <div class="item">
+ <div>处警单位:</div>
+ <div>{{ CJdata.CJDWMC }}</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.CDRY }}</div>
+ </div>
+ <div class="item">
+ <div>出动车辆:</div>
+ <div>{{ CJdata.CDCL }}</div>
+ </div>
+ <div class="item">
+ <div>到达现场时间:</div>
+ <div>{{ CJdata.DDXCSJ }}</div>
+ </div>
+ <div class="item">
+ <div>处理完毕时间:</div>
+ <div>{{ CJdata.CLWBSJ }}</div>
+ </div>
+ <div class="item">
+ <div>处警类型:</div>
+ <div>{{ CJdata.CJLX }}</div>
+ </div>
+ <div class="item">
+ <div>备注:</div>
+ <div>{{ CJdata.MEMO }}</div>
+ </div>
+ </div>
+
+ <div v-show="currentBtn == '出警信息' && JSON.stringify(CJdata) == '{}'"
+ class="label-content no-data">暂无数据</div>
</div>
</div>
<div class="b-t-l"></div>
@@ -72,58 +116,102 @@
<script>
import { mapGetters } from 'vuex'
+
+import { getActAsPoliceList } from "@/api/home/index.js"
+
export default {
name: 'mapPopup',
+
+ inject: ["getWidth", 'userInfo'],
+
+ data () {
+ return {
+ currentBtn: '接警信息',
+ CJdata: {},
+ scaleDomFlag: false
+ }
+ },
+
computed: {
...mapGetters([
'detailsPopup',
'dataPopup'
])
},
+
+ watch: {
+ detailsPopup: {
+ handler (newData, oldData) {
+ if (newData.showBox == false) {
+ this.currentBtn = '接警信息'
+ }
+ }
+ }
+ },
+
+ mounted () {
+
+ if (this.getWidth() > 7000) {
+ this.scaleDomFlag = true
+ } else {
+ this.scaleDomFlag = false
+ }
+
+ },
+
methods: {
closePopup () {
- this.$store.commit('SET_DETAILSPOPUP', false)
+ this.currentBtn = '接警信息'
+ this.$store.commit('SET_DETAILSPOPUP', {
+ showBox: false,
+ showBtn: false
+ })
+ },
+
+ currentBtnChange (type) {
+ this.currentBtn = type
+
+ this.CJdata = {}
+
+ getActAsPoliceList(this.dataPopup.JJDBH, this.userInfo.dept_id).then(res => {
+ if (res.data.data.records.length > 0) {
+ this.CJdata = res.data.data.records[0]
+ }
+ })
+ },
+
+ popupDetailShow () {
+ if (this.detailsPopup.openMenu != '' && this.detailsPopup.openMenu == 'policeInfor') {
+ this.$EventBus.$emit('PoliceInforSiteClick', this.dataPopup)
+ } else {
+ this.detailsPopup.showBtn == true ?
+ this.$EventBus.$emit('policeSituationSiteClick', this.dataPopup) :
+ this.$EventBus.$emit('housingPoliceSiteClick', this.dataPopup)
+ }
}
}
}
</script>
<style lang="scss" scoped>
-// .item {
-// display: flex;
-// flex-direction: row;
-// width: calc(100% - 20px);
-// height: 30px;
-// line-height: 30px;
-// margin: 0 10px;
-// text-align: left;
-
-// &>div:first-child {
-// width: 100px;
-// text-align: justify;
-// display: inline-block;
-// text-align-last: justify;
-// margin-right: 20px;
-// }
-
-// &>div:nth-of-type(2) {
-// width: calc(100% - 120px);
-// }
-// }
-
.divForms-dom {
position: fixed;
left: 0;
z-index: 1 !important;
+
+ .scale-dom {
+ transform: scale(3);
+ transform-origin: left;
+ }
}
.divForms .arrow {
position: absolute;
bottom: 50%;
- left: -8px;
+ left: 0;
width: 45px;
height: 2px;
- transform: rotate(-45deg);
+ transform: rotate(-45deg) translate(5px, -15px);
background-color: #28bbf0;
}
@@ -142,7 +230,7 @@
.divForms .area {
position: relative;
- min-width: 420px;
+ min-width: 360px;
}
.divForms-wrap {
@@ -223,6 +311,62 @@
font-size: 16px;
white-space: nowrap;
overflow: hidden;
+
+ .change-btn {
+ margin-top: 6px;
+ display: flex;
+ align-items: center;
+ justify-content: space-around;
+
+ &>div {
+ width: 36%;
+ height: 36px;
+ line-height: 36px;
+ cursor: pointer;
+ }
+
+ &>div.on {
+ color: #3d95f3;
+ border-bottom: 2px solid #3d95f3;
+ }
+ }
+
+ .label-content {
+ padding: 10px 0;
+
+ .item {
+ display: flex;
+ flex-direction: row;
+ width: calc(100% - 20px);
+ height: 30px;
+ line-height: 30px;
+ margin: 0 10px;
+ text-align: left;
+
+ &>div:first-child {
+ width: 112px;
+ text-align: justify;
+ display: inline-block;
+ text-align-last: justify;
+ margin-right: 20px;
+ }
+
+ &>div:nth-of-type(2) {
+ width: calc(100% - 120px);
+ max-width: 190px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ }
+ }
+
+ .label-content.no-data {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ min-height: 240px;
+ }
}
.divForms .title {
@@ -232,10 +376,26 @@
height: 36px;
line-height: 36px;
+ .details-btn {
+ position: absolute;
+ top: 0;
+ right: 28px;
+ height: 100%;
+ cursor: pointer;
+
+ span {
+ font-size: 14px;
+ }
+ }
+
+ .details-btn:hover {
+ color: #3d95f3;
+ }
+
.close {
position: absolute;
right: 5px;
- top: -2px;
+ top: 0;
}
.close::before {
@@ -251,13 +411,7 @@
}
.divForms-theme .title {
- background-image: linear-gradient(135deg,
- transparent 25px,
- #1c309e9a 25px);
-}
-
-.divForms .label-content {
- padding: 4px 0;
+ background-image: linear-gradient(135deg, transparent 25px, #1c309e9a 25px);
}
.divForms-theme .arrow,
--
Gitblit v1.9.3