From 1932115cd2a69a76ae20ddf56ebfa96df49dbfc8 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 07 Jan 2023 11:17:22 +0800
Subject: [PATCH] 首页内容显示,弹窗内容显示及相关逻辑
---
src/views/home/components/bottomContainer.vue | 44 +++++++++++++++++++++++++++-----------------
1 files changed, 27 insertions(+), 17 deletions(-)
diff --git a/src/views/home/components/bottomContainer.vue b/src/views/home/components/bottomContainer.vue
index 9034000..01c8d0e 100644
--- a/src/views/home/components/bottomContainer.vue
+++ b/src/views/home/components/bottomContainer.vue
@@ -26,7 +26,6 @@
<span class="beforetime" :class="{ choosed: historytype == 1 }"
@click="historyTabClick(1)">历史</span>
</div>
-
</div>
<div class="body" ref="tableBox" @click="handleSelectClick($event)">
@@ -53,11 +52,12 @@
<span class="num" v-text="index + 1"></span>
<span class="receiving-alarm-unit" v-text="item.JJDWMC"></span>
<span class="receiving-alarm-people" v-text="item.JJYXM"></span>
- <span class="receiving-alarm-time" v-text="item.JJSJ"></span>
+ <span class="receiving-alarm-time" :title="item.JJSJ"
+ v-text="item.JJSJ.substring(0, 10)"></span>
<span class="call-people" v-text="item.BJRXM"></span>
<span class="call-phone" v-text="item.LXDH"></span>
<span class="call-police-content" :title="item.BJNR" v-text="item.BJNR"></span>
- <span class="incident-site" v-text="item.SFDZ"></span>
+ <span class="incident-site" :title="item.SFDZ" v-text="item.SFDZ"></span>
<span class="call-police-type" v-text="item.BJLX"></span>
<span class="alarm-bz" v-text="item.MEMO"></span>
</li>
@@ -195,7 +195,9 @@
// 获取实时接警记录
getAnswerPolices () {
// getAnswerPolices().then(res => {
- // this.policeSituationRealtimeArr = res.data.result
+ // this.policeSituationRealtimeArr = res.data.result.map((item, index) => {
+ // return { ...item, lng: item.ZDDWXZB, lat: item.ZDDWYZB }
+ // })
// })
this.policeSituationRealtimeArr = [{
@@ -261,8 +263,8 @@
JJSJ: '2022-12-12 12:12:12',
BJRXM: '西门庆祝',
LXDH: 17335843642,
- BJNR: '今日在某小区查获私人赌博场所',
- SFDZ: '上饶市信州区万达华府小区',
+ BJNR: '今日在某小区查获私人赌博场所今日在某小区查获私人赌博场所今日在某小区查获私人赌博场所今日在某小区查获私人赌博场所今日在某小区查获私人赌博场所今日在某小区查获私人赌博场所今日在某小区查获私人赌博场所今日在某小区查获私人赌博场所今日在某小区查获私人赌博场所今日在某小区查获私人赌博场所今日在某小区查获私人赌博场所今日在某小区查获私人赌博场所今日在某小区查获私人赌博场所今日在某小区查获私人赌博场所今日在某小区查获私人赌博场所今日在某小区查获私人赌博场所今日在某小区查获私人赌博场所今日在某小区查获私人赌博场所',
+ SFDZ: '上饶市信州区万达华府小区上饶市信州区万达华府小区',
BJLX: '聚众赌博',
MEMO: '人群聚集赌博'
},
@@ -277,12 +279,18 @@
BJLX: '聚众赌博',
MEMO: '人群聚集赌博'
}]
+
+ this.policeSituationRealtimeArr = this.policeSituationRealtimeArr.map((item, index) => {
+ return { ...item, lng: item.ZDDWXZB, lat: item.ZDDWYZB }
+ })
},
// 获取历史接警记录
getAlarmList (type, time) {
getAlarmList(type, time).then(res => {
- this.policeSituationHistoryArr = res.data.data.records
+ this.policeSituationHistoryArr = res.data.data.records.map((item, index) => {
+ return { ...item, lng: item.ZDDWXZB, lat: item.ZDDWYZB }
+ })
})
},
@@ -298,7 +306,6 @@
this.getAlarmList(type, this.dateFormat(this.currentMonthTime))
}
- this.$emit('changePoliceSituationTimeType', type)
this.$emit('policeSituationChange')
},
@@ -306,23 +313,25 @@
historyTabClick (type) {
this.historytype = type
+ this.timetype = 0
+
this.currentWeekTime = new Date()
if (type == 0) {
this.getAnswerPolices()
} else {
- this.getAlarmList(type, this.dateFormat(this.currentWeekTime))
+ this.getAlarmList(this.timetype, this.dateFormat(this.currentWeekTime))
}
this.$emit('changePoliceSituationHistoryType', type)
this.$emit('policeSituationChange')
},
- chooseWeekTimeDate () {
- return this.policeSituationHistoryArr
+ chooseRealData () {
+ return this.policeSituationRealtimeArr
},
- chooseMouthTimeDate () {
+ chooseTimeDate () {
return this.policeSituationHistoryArr
},
@@ -507,6 +516,7 @@
cursor: pointer;
span {
+ padding: 0 4px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -517,23 +527,23 @@
}
.receiving-alarm-unit {
- width: 12%;
+ width: 12.6%;
}
.receiving-alarm-people {
- width: 8%;
+ width: 7.6%;
}
.receiving-alarm-time {
- width: 10%;
+ width: 9.6%;
}
.call-people {
- width: 8%;
+ width: 7.6%;
}
.call-phone {
- width: 8%;
+ width: 10%;
}
.call-police-content {
--
Gitblit v1.9.3