From be2983cb91e06554ff939c53b37284af1e1c170a Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 07 May 2021 10:42:30 +0800
Subject: [PATCH] 地图,详情跳转,视频
---
src/store/index.js | 5 ++
src/views/policeTracking/policeTracking.vue | 7 ++-
src/store/modules/dataL.js | 19 +++++++++
src/store/getters.js | 1
src/views/dataL/dataL.vue | 48 ++++++++++++++++-------
public/map/popup/html/SupervisoryMapYdata.html | 4 +-
public/map/widgets/alertSecurity/AlertSecurity.js | 6 +-
src/views/supervisoryConsole/card.vue | 2
8 files changed, 67 insertions(+), 25 deletions(-)
diff --git a/public/map/popup/html/SupervisoryMapYdata.html b/public/map/popup/html/SupervisoryMapYdata.html
index 2a70b16..f89f123 100644
--- a/public/map/popup/html/SupervisoryMapYdata.html
+++ b/public/map/popup/html/SupervisoryMapYdata.html
@@ -154,7 +154,7 @@
.el-tabs__active-bar {
- background-color: #F35B5B;
+ background-color: #32C1A2;
}
.el-tabs__item.is-active,
@@ -169,7 +169,7 @@
<!-- 从layui传值给iframe 的占位input -->
<!-- <div class="aaa bbb">13223456745</div> -->
<input type="text" id="sidIput" ref="sidIput" style="display:none">
- <div class="flare-liu-top" style="background-image: linear-gradient(to right, #F35B5B , #F35B5B">
+ <div class="flare-liu-top" style="background-image: linear-gradient(to right, #32C1A2 , #32C1A2)">
<div class="f-l-t-heard">{{datas.tenant_name}}</div>
<div class="f-l-t-right">
<div class="f-l-t-r-number">级别:{{datas.dj}}</div>
diff --git a/public/map/widgets/alertSecurity/AlertSecurity.js b/public/map/widgets/alertSecurity/AlertSecurity.js
index 31b79e0..a3bbe57 100644
--- a/public/map/widgets/alertSecurity/AlertSecurity.js
+++ b/public/map/widgets/alertSecurity/AlertSecurity.js
@@ -201,20 +201,20 @@
var openid = that.getQueryStringByKey('id');
var lgtd = that.getQueryStringByKey('jd');
var lttd = that.getQueryStringByKey('wd');
- var deptId = that.getQueryStringByKey('deptId');
+ var deptId = that.getQueryStringByKey('deptId').slice(0,19);//报错deptId格式不对liu.2021.5.7
var oneId = that.getQueryStringByKey('oneId');
that.addPoint(that.addEntitys, lgtd, lttd, './images/jingbaored.png');
that.createEntitys(that.addEntitys, lgtd, lttd, './images/real-time-callPolice-opcity.png');
that.createTwinkleEntitys(that.addEntitys, lgtd, lttd, './images/real-time-callPolice-opcity.png');
-
+ // console.log(deptId,153454)
$.ajax({
url: "https://web.byisf.com/api/blade-user/pages?current=1&size=9999&work_status=&deptId=" + deptId,
type: 'get',
dataType: 'JSON',
success: function (res) {
- console.log(res.data.records, oneId)
+ // console.log(res.data.records, oneId)
res.data.records.forEach((item) => {
if (item.id == oneId) {
diff --git a/src/store/getters.js b/src/store/getters.js
index e6fcd6f..143bd7e 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -25,5 +25,6 @@
logsLen: state => state.logs.logsList.length || 0,
logsFlag: (state, getters) => getters.logsLen === 0,
flowRoutes: state => state.dict.flowRoutes,
+ dataLa: state => state.dataL.dataLa,
}
export default getters
diff --git a/src/store/index.js b/src/store/index.js
index 805b864..8bde75a 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -5,7 +5,9 @@
import tags from './modules/tags'
import logs from './modules/logs'
import dict from './modules/dict'
+import dataL from './modules/dataL'
import getters from './getters'
+
Vue.use(Vuex)
const store = new Vuex.Store({
@@ -14,7 +16,8 @@
common,
logs,
tags,
- dict
+ dict,
+ dataL
},
getters,
})
diff --git a/src/store/modules/dataL.js b/src/store/modules/dataL.js
new file mode 100644
index 0000000..754b774
--- /dev/null
+++ b/src/store/modules/dataL.js
@@ -0,0 +1,19 @@
+import {
+ setStore,
+ getStore,
+ removeStore
+} from '@/util/store'
+import website from '@/config/website'
+
+const dataL = {
+
+ state: {
+ dataLa: null,
+ },
+ mutations: {
+ SET_DATAL: (state, dataLa) => {
+ state.dataLa = dataLa;
+ },
+ }
+}
+export default dataL;
diff --git a/src/views/dataL/dataL.vue b/src/views/dataL/dataL.vue
index 9632beb..00e6aea 100644
--- a/src/views/dataL/dataL.vue
+++ b/src/views/dataL/dataL.vue
@@ -19,8 +19,8 @@
'l-t-s-yuan': true,
}"
></span>
-
- <span>{{' ' + state }}</span>
+
+ <span>{{ " " + state }}</span>
</div>
<div class="t-t-time">
<p>{{ ReportTime }}</p>
@@ -604,6 +604,8 @@
myChart: "",
numdatalist: [120, 132, 101, 134, 90, 230, 210, 120, 132, 0, 134, 0],
+ jingqingPdianji: null,
+
name: "",
state: "",
evaluate: "",
@@ -627,7 +629,7 @@
isRecord: true,
screens: false,
//复选框
- dataState: ["掉线", "在线", "故障", "预警"],
+ dataState: ["掉线", "正常", "故障", "预警"],
// [grey,green,red][
// onlineStatus = 0,
// onlineStatus = 1,
@@ -1030,7 +1032,7 @@
} else {
if (j != 1) {
if (o == 1) {
- states = "在线";
+ states = "正常";
} else {
states = "掉线";
}
@@ -1086,6 +1088,7 @@
var ds = res.data.data.records;
// console.log(ds)
this.setdataG(ds);
+ this.jingqingPdianji = ds;
});
},
setdataG(d) {
@@ -1125,6 +1128,7 @@
oneContacts: d[key].oneContacts,
alarmPeople: d[key].alarmPeople,
onePhone: d[key].onePhone,
+ jjTime: d[key].jjTime,
childs: [],
});
}
@@ -1197,7 +1201,15 @@
},
handleCurrentChange(val) {
//行点击事件
- // console.log(val.i);
+ var b = this.jingqingPdianji;
+ for (var key in b) {
+ if (b[key].jjTime == val.jjTime) {
+ // console.log(b[key]);
+ // this.$store.commit("SET_DATAL", this.a);
+ this.$router.push({ path: "/policeTracking/track", query: b[key] });
+ }
+ }
+ // console.log(this.$store.state)
},
//获取视频
openRealVideoBox(serialNumber, channelNumber) {
@@ -1264,10 +1276,16 @@
created() {
// let loadingInstance1 = Loading.service({ fullscreen: true });
// this.baseUrl = `/map/index.html?openid=SupervisoryMap`;
- this.a = this.$route.query;
- // console.log(this.a);
+ // this.a = this.$route.query.deviceNumber == undefined? this.$store.state.dataL.dataLa : this.$route.query;
+ if(this.$route.query.deviceNumber == undefined){
+ this.a = this.$store.state.dataL.dataLa;
+ }else{
+ this.a = this.$route.query;
+ this.$store.commit("SET_DATAL", this.a);//每次都缓存在vuex中,如果没有从正确路径进来,则使用缓存
+ }
+ console.log(this.a);
this.baseUrl = `/map/index.html?ISinit=1&openid=DetailMap&jd=${this.a.jd}&wd=${this.a.wd}`;
- this.myDeviceNumber = this.$route.query.deviceNumber;
+ this.myDeviceNumber = this.a.deviceNumber;
// console.log(this.a);
// console.log(this.myDeviceNumber);
this.getdata();
@@ -1297,13 +1315,13 @@
if (this.activeName == "third") {
this.i++;
this.openRealVideoBox(this.a.serialNumber, this.a.channelNumber);
- }else{
+ } else {
var dom = document.getElementById("real_video_conversationDataL");
if (dom.getAttribute("src") != "") {
- dom.pause();
- dom.setAttribute("src", "");
- this.hls.destroy();
- }
+ dom.pause();
+ dom.setAttribute("src", "");
+ this.hls.destroy();
+ }
}
},
},
@@ -1719,6 +1737,6 @@
width: 50%;
}
video::-webkit-media-controls-timeline {
- display: none;
- }
+ display: none;
+}
</style>
\ No newline at end of file
diff --git a/src/views/policeTracking/policeTracking.vue b/src/views/policeTracking/policeTracking.vue
index a977d5a..09de97b 100644
--- a/src/views/policeTracking/policeTracking.vue
+++ b/src/views/policeTracking/policeTracking.vue
@@ -461,7 +461,7 @@
<el-card>
<video
:src="feedbackVideo"
- style="width: 100%; height: 100%; object-fit: fill"
+ style="width: 200px; height: 200px; object-fit: fill"
controls
v-show="feedbackVideo != ''"
></video>
@@ -762,9 +762,10 @@
getList() {
var that = this;
+ var deptid = that.form.deptId.slice(0,19);//报错deptId格式不对liu.2021.5.7
axios
.get(
- `/api/blade-user/pages?current=1&size=9999&work_status=&deptId=${that.form.deptId}`
+ `/api/blade-user/pages?current=1&size=9999&work_status=&deptId=${deptid}`
)
.then(function (res) {
that.tableData = [];
@@ -936,7 +937,7 @@
},
}).then(function (res) {
that.form = res.data.data.records[0];
- that.getList();
+ that.getList();//报错deptId格式不对liu.2021.5.7
});
},
},
diff --git a/src/views/supervisoryConsole/card.vue b/src/views/supervisoryConsole/card.vue
index 7c9f4bb..7a8ae77 100644
--- a/src/views/supervisoryConsole/card.vue
+++ b/src/views/supervisoryConsole/card.vue
@@ -60,7 +60,7 @@
? "设备预警"
: item.state == ""
? item.onlineStatus == 1
- ? "设备在线"
+ ? "设备正常"
: "设备掉线"
: "设备故障"
}}
--
Gitblit v1.9.3