From 379f583706f35a5c9cd4010df1d940ee1129fa01 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 19 Mar 2021 11:21:17 +0800
Subject: [PATCH] 实时警情弹窗Or警情核实相关修改,其他部分文件的改动
---
src/config/website.js | 6
src/lang/zh.js | 4
src/page/login/index.vue | 16 +
src/views/realTimePolice/real.vue | 334 ++++++++++++-------------
public/img/1.jpg | 0
public/index.html | 2
src/views/policeTracking/policeTracking.vue | 2
public/img/11.jpg | 0
public/oldVideo/ft.mp4 | 0
src/page/index/logo.vue | 360 ++++++++++++++-------------
10 files changed, 374 insertions(+), 350 deletions(-)
diff --git a/public/img/1.jpg b/public/img/1.jpg
index 42a7f75..3986ba4 100644
--- a/public/img/1.jpg
+++ b/public/img/1.jpg
Binary files differ
diff --git a/public/img/11.jpg b/public/img/11.jpg
new file mode 100644
index 0000000..42a7f75
--- /dev/null
+++ b/public/img/11.jpg
Binary files differ
diff --git a/public/index.html b/public/index.html
index 1223eb9..2b19ee8 100644
--- a/public/index.html
+++ b/public/index.html
@@ -17,7 +17,7 @@
<script src="<%= BASE_URL %>cdn/xlsx/FileSaver.min.js"></script>
<script src="<%= BASE_URL %>cdn/xlsx/xlsx.full.min.js"></script>
<link rel="icon" href="img/1.jpg">
- <title>物联网安防服务平台</title>
+ <title>物联网安保云服务平台</title>
<style>
html,
body,
diff --git a/public/oldVideo/ft.mp4 b/public/oldVideo/ft.mp4
new file mode 100644
index 0000000..3f1b5e7
--- /dev/null
+++ b/public/oldVideo/ft.mp4
Binary files differ
diff --git a/src/config/website.js b/src/config/website.js
index 768c8ba..9ce8fb9 100644
--- a/src/config/website.js
+++ b/src/config/website.js
@@ -2,10 +2,10 @@
* 全局配置文件
*/
export default {
- title: "物联网安防服务平台",
+ title: "物联网安保云服务平台",
logo: "S",
- key: '物联网安防服务平台',//配置主键,目前用于存储
- indexTitle: '物联网安防服务平台',
+ key: '物联网安保云服务平台',//配置主键,目前用于存储
+ indexTitle: '物联网安保云服务平台',
clientId: 'saber', // 客户端id
clientSecret: 'saber_secret', // 客户端密钥
tenantMode: true, // 是否开启租户模式
diff --git a/src/lang/zh.js b/src/lang/zh.js
index 47cee0c..049ac51 100644
--- a/src/lang/zh.js
+++ b/src/lang/zh.js
@@ -1,6 +1,6 @@
export default {
tip: '提示',
- title: '物联网安防服务平台',
+ title: '物联网安保云服务平台',
logoutTip: '退出系统, 是否继续?',
submitText: '确定',
cancelText: '取消',
@@ -67,7 +67,7 @@
},
login: {
title: '登录 ',
- info: '物联网安防服务平台',
+ info: '物联网安保云服务平台',
tenantId: '请输入租户ID',
username: '请输入账号',
password: '请输入密码',
diff --git a/src/page/index/logo.vue b/src/page/index/logo.vue
index c75cbed..00b979c 100644
--- a/src/page/index/logo.vue
+++ b/src/page/index/logo.vue
@@ -51,18 +51,27 @@
<el-row>
<el-col span="12">
<el-form-item label="负责人">
- <el-input
- disabled="true"
- v-model="form.galarmPeople"
- autocomplete="off"
- ></el-input>
+ <el-select
+ v-model="peopleName"
+ placeholder="请选择"
+ @change="peopleOrPhone"
+ style="width: 100%"
+ >
+ <el-option
+ v-for="item in peopleList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.label"
+ >
+ </el-option>
+ </el-select>
</el-form-item>
</el-col>
<el-col span="12">
<el-form-item label="负责人电话">
<el-input
disabled="true"
- v-model="form.phoneNumber"
+ v-model="peoplePhone"
autocomplete="off"
style="width: calc(100% - 110px)"
></el-input>
@@ -150,16 +159,23 @@
</el-col>
<el-col span="12">
<el-form-item label="监控视频">
- <el-button type="success" @click.stop="queryOldVideo(form)"
+ <el-button
+ type="success"
+ @click.stop="
+ (videoConversationReal = true), (oldVideoSatart = fasle)
+ "
>视频通话
</el-button>
- <el-button type="primary" @click.stop="queryOldVideo(form)"
+ <el-button
+ type="primary"
+ @click.stop="
+ (oldVideoSatart = true), (videoConversationReal = false)
+ "
>查看历史
</el-button>
</el-form-item>
</el-col>
</el-row>
-
<el-row>
<el-col span="12">
<el-form-item label="报警内容">
@@ -176,13 +192,15 @@
</el-form-item>
</el-col>
</el-row>
-
<el-row :align="center">
<el-col class="opt-btn">
<el-form-item>
- <el-button type="success" @click.stop="revoke(form)"
- >办结</el-button
- >
+ <el-button
+ type="success"
+ @click.stop="updateJtyep(form, 1, '办结')"
+ >办结
+ </el-button>
+
<img
src="/img/police-num.png"
style="
@@ -191,11 +209,14 @@
vertical-align: middle;
"
alt=""
+ @click.stop="updateJtyep(form, 2, '推送110')"
/>
- <el-button type="primary" @click.stop="generate(form)"
- >派发保安</el-button
- >
+ <el-button
+ type="primary"
+ @click.stop="updateJtyep(form, 3, '派送保安')"
+ >派送保安
+ </el-button>
</el-form-item>
</el-col>
</el-row>
@@ -206,15 +227,37 @@
class="ss-video-dialog"
:modal="false"
width="100%"
- title="历史视频"
- :visible.sync="innerVisibleVideo"
+ title="视频通话"
+ :visible.sync="videoConversationReal"
+ :close-on-press-escape="false"
+ append-to-body
+ @opened="openRealVideoBox"
+ @close="closeRealVideoBox"
+ >
+ <video
+ src=""
+ id="video_conversation"
+ style="width: 100%; height: 100%; object-fit: fill"
+ controls
+ ></video>
+ </el-dialog>
+
+ <el-dialog
+ class="ss-video-dialog"
+ :modal="false"
+ width="100%"
+ title="历史回放"
+ :visible.sync="oldVideoSatart"
:close-on-press-escape="false"
append-to-body
@opened="openOldVideoBox"
@close="closeOldVideoBox"
>
<video
- src=""
+ src="/oldVideo/ft.mp4"
+ muted="muted"
+ autoplay="autoplay"
+ loop
id="old_video"
style="width: 100%; height: 100%; object-fit: fill"
controls
@@ -234,7 +277,8 @@
data() {
return {
dialogTableVisible: false,
- innerVisibleVideo: false,
+ videoConversationReal: false,
+ oldVideoSatart: false,
deviceId: null,
form: {},
itemOption: {
@@ -288,6 +332,9 @@
},
],
},
+ peopleList: [],
+ peopleName: "",
+ peoplePhone: "",
};
},
created() {
@@ -312,17 +359,25 @@
layerRealtime() {
var that = this;
window.clearTimeout(window.realTimeQuery);
- // that.deviceId = 384; // 测试用
+ // that.deviceId = 334; // 测试用
window.realTimeQuery = setInterval(function () {
axios({
url: "/api/blade-jfpts/alarm/alarm/selecttx?id=" + that.deviceId,
method: "post",
}).then(function (response) {
- if (response.data.data.length > 0) {
+ var userId = JSON.parse(window.localStorage.getItem('物联网安保云服务平台-userInfo')).content.user_id;
+ if (response.data.data.length > 0 && response.data.data[0].waringType == "一键求助" && response.data.data[0].alarmId != userId) {
that.deviceId = response.data.data[0].id;
that.form = response.data.data[0];
+ that.peopleList = [
+ { label: that.form.oneContacts, value: that.form.onePhone },
+ { label: that.form.twoContacts, value: that.form.twoPhone },
+ { label: that.form.threeContacts, value: that.form.threePhone },
+ ];
+ that.peopleName = that.form.oneContacts;
+ that.peoplePhone = that.form.onePhone;
that.dialogTableVisible = true;
- that.innerVisibleVideo = true;
+ that.videoConversationReal = true;
that.$refs.realAudio.src = "./realVideo/audio.mp3";
that.$refs.realAudio.play();
}
@@ -333,149 +388,30 @@
//关闭窗口回调,关闭警报
this.$refs.realAudio.pause();
},
- generate(row) {
+ updateJtyep(row, jtype, t) {
var that = this;
- //关闭窗口回调,关闭警报
- that.$refs.realAudio.pause();
- axios({
- url: "/api/blade-jfpts/jingdan/jingdan/submit",
- method: "post",
- data: {
- rName: row.rname,
- galarmPeople: row.galarmPeople,
- phoneNumber: row.phoneNumber,
- place: row.place,
- alarmPeople: row.alarmPeople,
- content: row.content,
- galarmTime: row.alarmTime,
- waringType: row.waringType,
- deviceNumber: row.deviceNumber,
- type: "0",
- handleP: null,
- handleTime: null,
- handName: null,
- level: row.level,
- coordinate: null,
- jd: row.jd,
- wd: row.wd,
- district: row.district,
- city: row.city,
- province: row.province,
- czTime: row.czTime,
- jjTime: row.jjTime,
- bz: row.bz,
- },
- })
- .then(function (response) {
- that.$message({
- message: "生成警单成功",
- type: "success",
- });
- that.updateJtyep(row);
- that.dialogTableVisible = false;
- that.innerVisibleVideo = false;
- var arr = [];
- that.$store.state.tags.tagList.forEach((item) => {
- if (item.label != "警情分发处置") {
- arr.push(item);
- }
- });
- that.$store.state.tags.tagList = arr;
-
- row.type = 0;
- row.id = response.data.data;
- that.$router.push({ path: "/distribution/index", query: row });
- })
- .catch(function (error) {
- that.dialogTableVisible = false;
- that.innerVisibleVideo = false;
- });
- },
- revoke(row) {
- var that = this;
- axios({
- url: "/api/blade-jfpts/alarm/alarm/deletejj?id=" + row.id,
- method: "post",
- }).then(function () {
- that.dialogTableVisible = false;
- that.innerVisibleVideo = false;
- //关闭窗口回调,关闭警报
- that.$refs.realAudio.pause();
- });
- },
- updateJtyep(row) {
- var that = this;
- axios({
- url:
- "/api/blade-jfpts/alarm/alarm/updateJtype?id=" +
- row.id +
- "&czTime=" +
- row.czTime +
- "&bz=" +
- row.bz,
- method: "post",
- }).then(function () {});
- },
- queryOldVideo(data) {
- var newAxios = axios.create({
- baseURL: "https://web.byisf.com:18000",
- withCredentials: false,
- headers: {
- "Content-type": "application/x-www-form-urlencoded",
- },
- });
-
- var time = this.beginTimeOrEndTime(data.alarmTime);
-
- newAxios
+ axios
.post(
- "/api_control",
+ "/api/blade-jfpts/alarm/alarm/updateJtype",
{},
{
params: {
- param: JSON.stringify({ PktType: "GetAccessToken" }),
+ jid: row.id,
+ jtype: jtype,
+ rid: row.alarmId,
+ bz: row.bz,
+ snumber: row.alarmPeople,
+ sname: row.alarmId,
+ zc: t,
+ zctime: that.getDate().current,
},
}
)
- .then((res) => {
- newAxios
- .get(
- `https://web.byisf.com:18000/GetPlayUrl?deviceCode=${data.serialNumber}&chl=${data.channelNumber}`
- )
- .then((result) => {
- this.innerVisibleVideo = true;
-
- this.videoSource = result.data.data.m3u8;
- });
-
- // newAxios
- // .post(
- // "/api_control",
- // {},
- // {
- // params: {
- // param: JSON.stringify({
- // PktType: "RemotePlayback",
- // accessToken: res.data.data.accessToken,
- // deviceCode: "001231409472",
- // startTime: "20210130150000",
- // endTime: "20210130160000",
- // chl: data.serialNumber
- // })
- // }
- // }
- // )
- // .then(result => {
-
- // this.innerVisibleVideo = true;
-
- // this.videoSource = result.data.data.m3u8;
-
- // });
+ .then(function () {
+ that.onLoad(that.page, that.query);
});
},
-
beginTimeOrEndTime(time) {
var beginTime = new Date(time);
@@ -535,27 +471,83 @@
end: endY + endM + endD + endH + endm + ends,
};
},
- openOldVideoBox() {
- if (Hls.isSupported()) {
- var dom = document.getElementById("old_video");
- // if (dom.volume) dom.volume = 1.0;
+ // 视频通话打开关闭事件
+ openRealVideoBox() {
+ var newAxios = axios.create({
+ baseURL: "https://web.byisf.com:18000",
+ withCredentials: false,
+ headers: {
+ "Content-type": "application/x-www-form-urlencoded",
+ },
+ });
- this.hls = new Hls();
+ newAxios
+ .post(
+ "/api_control",
+ {},
+ {
+ params: {
+ param: JSON.stringify({ PktType: "GetAccessToken" }),
+ },
+ }
+ )
+ .then((res) => {
+ newAxios
+ .get(
+ `https://web.byisf.com:18000/GetPlayUrl?deviceCode=${this.form.serialNumber}&chl=${this.form.channelNumber}`
+ )
+ .then((result) => {
+ this.videoSource = result.data.data.m3u8;
- var m3u8Url = decodeURIComponent(this.videoSource);
+ if (Hls.isSupported()) {
+ var dom = document.getElementById("video_conversation");
- this.hls.loadSource(m3u8Url);
+ // if (dom.volume) dom.volume = 1.0;
- this.hls.attachMedia(dom);
+ this.hls = new Hls();
- this.hls.on(Hls.Events.MANIFEST_PARSED, function () {
- dom.play();
+ var m3u8Url = decodeURIComponent(this.videoSource);
+
+ this.hls.loadSource(m3u8Url);
+
+ this.hls.attachMedia(dom);
+
+ this.hls.on(Hls.Events.MANIFEST_PARSED, function () {
+ dom.play();
+ });
+ }
+ });
+
+ // newAxios
+ // .post(
+ // "/api_control",
+ // {},
+ // {
+ // params: {
+ // param: JSON.stringify({
+ // PktType: "RemotePlayback",
+ // accessToken: res.data.data.accessToken,
+ // deviceCode: "001231409472",
+ // startTime: "20210130150000",
+ // endTime: "20210130160000",
+ // chl: data.serialNumber
+ // })
+ // }
+ // }
+ // )
+ // .then(result => {
+
+ // this.videoConversationReal = true;
+
+ // this.videoSource = result.data.data.m3u8;
+
+ // });
});
- }
},
- closeOldVideoBox() {
- var dom = document.getElementById("old_video");
+
+ closeRealVideoBox() {
+ var dom = document.getElementById("video_conversation");
if (dom.getAttribute("src") != "") {
dom.pause();
@@ -564,6 +556,26 @@
this.hls.destroy();
}
+ },
+
+ // 历史视频打开关闭事件
+ openOldVideoBox() {
+ var dom = document.getElementById("old_video");
+ dom.currentTime = 0;
+ dom.play();
+ },
+
+ closeOldVideoBox() {
+ var dom = document.getElementById("old_video");
+ dom.pause();
+ },
+
+ peopleOrPhone(e) {
+ this.peopleList.forEach((item) => {
+ if (item.label == e) {
+ this.peoplePhone = item.value;
+ }
+ });
},
},
};
@@ -658,10 +670,10 @@
position: absolute !important;
top: 0px !important;
left: auto !important;
- right: 0px !important;
+ right: 5px !important;
bottom: 0 !important;
margin: auto !important;
- width: 660px !important;
+ width: 670px !important;
}
.ss-video-dialog .el-dialog {
@@ -672,10 +684,16 @@
bottom: 0 !important;
margin: auto !important;
height: 558px;
+ border-radius: 10px 10px 10px 10px;
+}
+
+.ss-video-dialog .el-dialog .el-dialog__header {
+ padding-top: 10px;
}
.ss-video-dialog .el-dialog .el-dialog__body {
- height: calc(100% - 54px);
+ padding: 10px !important;
+ height: calc(100% - 44px);
box-sizing: border-box;
}
</style>
diff --git a/src/page/login/index.vue b/src/page/login/index.vue
index 0128227..91c03cc 100644
--- a/src/page/login/index.vue
+++ b/src/page/login/index.vue
@@ -31,6 +31,11 @@
<div class="z" v-show="activeName == 'code'" >
<codeLogin></codeLogin>
</div>
+
+ <div class="company-jx">
+ 技术支持:中国移动江西公司
+ </div>
+
</div>
</template>
<script>
@@ -134,5 +139,16 @@
box-sizing: border-box;
box-shadow:6px 6px 5px #909090;
}
+ .company-jx {
+ position: fixed;
+ margin: auto;
+ top: auto;
+ left: 0px;
+ right: 0px;
+ bottom: 120px;
+ text-align: center;
+ color: #fff;
+ font-size: 15px;
+ }
@import "@/styles/login.scss";
</style>
diff --git a/src/views/policeTracking/policeTracking.vue b/src/views/policeTracking/policeTracking.vue
index e6740f7..214317e 100644
--- a/src/views/policeTracking/policeTracking.vue
+++ b/src/views/policeTracking/policeTracking.vue
@@ -490,7 +490,7 @@
},
getReceivingAlarm() {
- axios.get("/api/blade-jfpts/operation/list").then((res) => {
+ axios.get(`/api/blade-jfpts/operation/list?jid=3`).then((res) => {
this.receivingList = res.data.data.records;
});
},
diff --git a/src/views/realTimePolice/real.vue b/src/views/realTimePolice/real.vue
index b13a290..b1d0a6f 100644
--- a/src/views/realTimePolice/real.vue
+++ b/src/views/realTimePolice/real.vue
@@ -2,7 +2,7 @@
* @Author: Morpheus
* @Date: 2021-03-17 15:21:33
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-03-18 11:24:28
+ * @Last Modified time: 2021-03-19 10:58:01
*/
<template>
<basic-container>
@@ -62,7 +62,15 @@
<template slot-scope="{ row }" slot="jtype">
<el-tag
- >{{ row.jtype == "0" ? "否" : row.jtype == "1" ? "是" : "无" }}
+ >{{
+ row.jtype == "0"
+ ? "未处理"
+ : row.jtype == "1"
+ ? "办结"
+ : row.jtype == "2"
+ ? "推送110"
+ : "派发保安"
+ }}
</el-tag>
</template>
<template slot-scope="{ row }" slot="cid">
@@ -106,24 +114,48 @@
</avue-crud>
<el-dialog
+ class="real-dialog"
title="警情核实"
:visible.sync="dialogTableVisible"
- append-to-body="true"
+ :append-to-body="true"
+ :close-on-click-modal="false"
@close="innerVisibleVideo = false"
>
<el-dialog
- class="old-video-dialog"
+ class="ss-video-dialog"
:modal="false"
width="100%"
title="视频通话"
- :visible.sync="innerVisibleVideo"
+ :visible.sync="videoConversationReal"
+ :close-on-press-escape="false"
+ append-to-body
+ @opened="openRealVideoBox"
+ @close="closeRealVideoBox"
+ >
+ <video
+ src=""
+ id="video_conversation"
+ style="width: 100%; height: 100%; object-fit: fill"
+ controls
+ ></video>
+ </el-dialog>
+
+ <el-dialog
+ class="ss-video-dialog"
+ :modal="false"
+ width="100%"
+ title="历史回放"
+ :visible.sync="oldVideoSatart"
:close-on-press-escape="false"
append-to-body
@opened="openOldVideoBox"
@close="closeOldVideoBox"
>
<video
- src=""
+ src="/oldVideo/ft.mp4"
+ muted="muted"
+ autoplay="autoplay"
+ loop
id="old_video"
style="width: 100%; height: 100%; object-fit: fill"
controls
@@ -138,6 +170,7 @@
>
<el-row>
<el-col span="12">
+ <audio src="" id="real_audio"></audio>
<el-form-item label="报警人">
<el-input
disabled="true"
@@ -159,18 +192,27 @@
<el-row>
<el-col span="12">
<el-form-item label="负责人">
- <el-input
- disabled="true"
- v-model="form.galarmPeople"
- autocomplete="off"
- ></el-input>
+ <el-select
+ v-model="peopleName"
+ placeholder="请选择"
+ @change="peopleOrPhone"
+ style="width: 100%"
+ >
+ <el-option
+ v-for="item in peopleList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.label"
+ >
+ </el-option>
+ </el-select>
</el-form-item>
</el-col>
<el-col span="12">
<el-form-item label="负责人电话">
<el-input
disabled="true"
- v-model="form.phoneNumber"
+ v-model="peoplePhone"
autocomplete="off"
style="width: calc(100% - 110px)"
></el-input>
@@ -259,10 +301,21 @@
</el-col>
<el-col span="12">
<el-form-item label="监控视频">
- <el-button type="success" @click.stop="queryOldVideo(form)"
+ <el-button
+ :class="{ active: isActive }"
+ type="success"
+ @click.stop="
+ (videoConversationReal = !videoConversationReal),
+ (oldVideoSatart = fasle),
+ aKeyToCall(form)
+ "
>视频通话
</el-button>
- <el-button type="primary" @click.stop="queryOldVideo(form)"
+ <el-button
+ type="primary"
+ @click.stop="
+ (oldVideoSatart = true), (videoConversationReal = false)
+ "
>查看历史
</el-button>
</el-form-item>
@@ -295,7 +348,7 @@
@click.stop="aKeyToCall($event, form)"
>查看视频
</el-button> -->
- <el-button type="success" @click.stop="revoke(form)"
+ <el-button type="success" @click.stop="updateJtyep(form, 1, '办结')"
>办结
</el-button>
@@ -303,9 +356,10 @@
src="/img/police-num.png"
style="margin-top: -20px; height: 80px; vertical-align: middle"
alt=""
+ @click.stop="updateJtyep(form, 2, '推送110')"
/>
- <el-button type="primary" @click.stop="generate(form)"
+ <el-button type="primary" @click.stop="updateJtyep(form, 3, '派送保安')"
>派送保安
</el-button>
</el-form-item>
@@ -344,7 +398,8 @@
hls: "",
videoSource: "",
dialogTableVisible: false,
- innerVisibleVideo: false,
+ videoConversationReal: false,
+ oldVideoSatart: false,
activeClass: 3,
form: {},
query: {},
@@ -445,22 +500,30 @@
prop: "deviceNumber",
},
{
- label: "生成警单",
+ label: "警情状态",
+ searchSpan: 3,
+ width: 96,
search: true,
- searchSpan: 2,
slot: true,
- searchPlaceholder: " ",
+ searchPlaceholder: "请选择",
prop: "jtype",
type: "select",
- className: "jtypeClass",
dicData: [
{
- label: "否",
+ label: "未处理",
value: "0",
},
{
- label: "是",
+ label: "办结",
value: "1",
+ },
+ {
+ label: "推送110",
+ value: "2",
+ },
+ {
+ label: "派发保安",
+ value: "3",
},
],
},
@@ -516,25 +579,6 @@
span: 3,
labelWidth: "0",
className: "cityClass3",
- },
- {
- label: "警情状态",
- searchSpan: 3,
- prop: "cid",
- slot: true,
- hide: true,
- width: 100,
- type: "select",
- dicData: [
- {
- label: "事件发生",
- value: "1",
- },
- {
- label: "事件恢复",
- value: "3",
- },
- ],
},
{
label: "接警人",
@@ -604,6 +648,9 @@
data: [],
isActive: false,
recorder: null,
+ peopleList: [],
+ peopleName: "",
+ peoplePhone: "",
};
},
computed: {
@@ -939,116 +986,41 @@
});
},
handleManage(row) {
+ console.log(row);
this.form = row;
+ this.peopleList = [
+ { label: row.oneContacts, value: row.onePhone },
+ { label: row.twoContacts, value: row.twoPhone },
+ { label: row.threeContacts, value: row.threePhone },
+ ];
+ this.peopleName = row.oneContacts;
+ this.peoplePhone = row.onePhone;
this.dialogTableVisible = true;
},
- generate(row) {
+ updateJtyep(row, jtype, t) {
var that = this;
- if (row.czTime == "" || row.czTime == null) {
- this.$message({
- message: "请选择处置时间",
- type: "warning",
- });
- } else {
- axios({
- url: "/api/blade-jfpts/jingdan/jingdan/submit",
- method: "post",
- data: {
- rName: row.rname,
- galarmPeople: row.galarmPeople,
- phoneNumber: row.phoneNumber,
- place: row.place,
- alarmPeople: row.alarmPeople,
- content: row.content,
- galarmTime: row.alarmTime,
- waringType: row.waringType,
- deviceNumber: row.deviceNumber,
- type: "0",
- handleP: null,
- handleTime: null,
- handName: null,
- level: row.level,
- coordinate: null,
- jd: row.jd,
- wd: row.wd,
- district: row.district,
- city: row.city,
- province: row.province,
- czTime: row.czTime,
- jjTime: row.jjTime,
- bz: row.bz,
- },
- })
- .then(function (response) {
- that.$message({
- message: "生成警单成功",
- type: "success",
- });
- that.updateJtyep(row);
- that.dialogTableVisible = false;
- var arr = [];
- that.$store.state.tags.tagList.forEach((item) => {
- if (item.label != "警情分发处置") {
- arr.push(item);
- }
- });
- that.$store.state.tags.tagList = arr;
-
- row.type = 0;
- row.id = response.data.data;
- that.$router.push({ path: "/distribution/index", query: row });
- })
- .catch(function (error) {
- that.dialogTableVisible = false;
- });
- }
- },
- revoke(row) {
- var that = this;
-
axios
.post(
- "/api/blade-jfpts/operation/save",
+ "/api/blade-jfpts/alarm/alarm/updateJtype",
{},
{
params: {
- snumber: "001",
- sname: "李四",
- jid: "1",
- zc: "办结",
+ jid: row.id,
+ jtype: jtype,
+ rid: row.alarmId,
+ bz: row.bz,
+ snumber: row.alarmPeople,
+ sname: row.alarmId,
+ zc: t,
zctime: that.getDate().current,
},
}
)
- .then((res) => {
- console.log(res);
+ .then(function () {
+ that.onLoad(that.page, that.query);
});
-
- // axios({
- // url: "/api/blade-jfpts/alarm/alarm/deletejj?id=" + row.id,
- // method: "post",
- // }).then(function () {
- // that.dialogTableVisible = false;
- // that.onLoad(that.page, that.query);
- // });
},
- updateJtyep(row) {
- var that = this;
- axios({
- url:
- "/api/blade-jfpts/alarm/alarm/updateJtype?id=" +
- row.id +
- "&czTime=" +
- row.czTime +
- "&bz=" +
- row.bz,
- method: "post",
- }).then(function () {
- that.onLoad(that.page, that.query);
- });
- },
-
beginTimeOrEndTime(time) {
var beginTime = new Date(time);
@@ -1108,7 +1080,9 @@
end: endY + endM + endD + endH + endm + ends,
};
},
- queryOldVideo(data) {
+ // 视频通话打开关闭事件
+ openRealVideoBox() {
+ var that = this;
var newAxios = axios.create({
baseURL: "https://web.byisf.com:18000",
withCredentials: false,
@@ -1117,8 +1091,7 @@
},
});
- var time = this.beginTimeOrEndTime(data.alarmTime);
-
+ //this.form.serialNumber
newAxios
.post(
"/api_control",
@@ -1132,12 +1105,28 @@
.then((res) => {
newAxios
.get(
- `https://web.byisf.com:18000/GetPlayUrl?deviceCode=${data.serialNumber}&chl=${data.channelNumber}`
+ `https://web.byisf.com:18000/GetPlayUrl?deviceCode=001231663A45&chl=${this.form.channelNumber}`
)
.then((result) => {
- this.innerVisibleVideo = true;
-
this.videoSource = result.data.data.m3u8;
+
+ if (Hls.isSupported()) {
+ var dom = document.getElementById("video_conversation");
+
+ // if (dom.volume) dom.volume = 1.0;
+
+ this.hls = new Hls();
+
+ var m3u8Url = decodeURIComponent(this.videoSource);
+
+ this.hls.loadSource(m3u8Url);
+
+ this.hls.attachMedia(dom);
+
+ this.hls.on(Hls.Events.MANIFEST_PARSED, function () {
+ dom.play();
+ });
+ }
});
// newAxios
@@ -1159,34 +1148,16 @@
// )
// .then(result => {
- // this.innerVisibleVideo = true;
+ // this.videoConversationReal = true;
// this.videoSource = result.data.data.m3u8;
// });
});
},
- openOldVideoBox() {
- if (Hls.isSupported()) {
- var dom = document.getElementById("old_video");
- // if (dom.volume) dom.volume = 1.0;
-
- this.hls = new Hls();
-
- var m3u8Url = decodeURIComponent(this.videoSource);
-
- this.hls.loadSource(m3u8Url);
-
- this.hls.attachMedia(dom);
-
- this.hls.on(Hls.Events.MANIFEST_PARSED, function () {
- dom.play();
- });
- }
- },
- closeOldVideoBox() {
- var dom = document.getElementById("old_video");
+ closeRealVideoBox() {
+ var dom = document.getElementById("video_conversation");
if (dom.getAttribute("src") != "") {
dom.pause();
@@ -1196,6 +1167,19 @@
this.hls.destroy();
}
},
+
+ // 历史视频打开关闭事件
+ openOldVideoBox() {
+ var dom = document.getElementById("old_video");
+ dom.currentTime = 0;
+ dom.play();
+ },
+
+ closeOldVideoBox() {
+ var dom = document.getElementById("old_video");
+ dom.pause();
+ },
+
aKeyToCall(e, form) {
var newCallAxios = axios.create({
baseURL: "https://web.byisf.com:18000",
@@ -1207,6 +1191,7 @@
// 一键呼叫相关函数
if (this.isActive == true) {
+ alert(1);
this.isActive = false;
newCallAxios
@@ -1227,11 +1212,11 @@
var fileOfBlob = new File([newbolb], new Date().getTime() + ".pcm");
formData.append("file", fileOfBlob);
- document
- .getElementById("real_audio")
- .setAttribute("src", URL.createObjectURL(blob));
+ // var dom = document.getElementById("real_audio");
+ // console.log(dom);
+ // dom.setAttribute("src", URL.createObjectURL(blob));
- this.recorder.play();
+ // this.recorder.play();
newCallAxios
.post(`/api_control`, blob, {
@@ -1239,13 +1224,15 @@
param: {
PktType: "Talk",
accessToken: result.data.data.accessToken,
- deviceCode: form.channelNumber,
+ // deviceCode: form.channelNumber,
+ deviceCode: "001231663A45",
},
},
})
.then((result) => {});
});
} else {
+ alert(2);
this.isActive = true;
Recorder.getPermission().then(() => {
@@ -1255,15 +1242,18 @@
});
}
},
+ peopleOrPhone(e) {
+ this.peopleList.forEach((item) => {
+ if (item.label == e) {
+ this.peoplePhone = item.value;
+ }
+ });
+ },
},
};
</script>
<style>
-.el-card__body .jtypeClass {
- width: 10%;
-}
-
.el-card__body .waringTypeClass {
width: 12%;
}
--
Gitblit v1.9.3