From 14e02654e0545ee69456d64aef2f35c7c219d708 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 07 May 2021 11:26:49 +0800
Subject: [PATCH] 地图模式设备状态修改
---
src/views/policeTracking/policeTracking.vue | 1142 +++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 798 insertions(+), 344 deletions(-)
diff --git a/src/views/policeTracking/policeTracking.vue b/src/views/policeTracking/policeTracking.vue
index 65d2faf..09de97b 100644
--- a/src/views/policeTracking/policeTracking.vue
+++ b/src/views/policeTracking/policeTracking.vue
@@ -2,7 +2,7 @@
<el-row>
<el-col :span="12">
<div style="background: #fff; height: 100%">
- <el-card class="trackClass">
+ <el-card class="trackClass" style="overflow-y: auto">
<div
style="margin-top: 20px"
role="tab"
@@ -22,138 +22,243 @@
</div>
</div>
- <el-form
- :model="form"
- label-position="right"
- size="mini"
- class="policeForm"
- label-width="100px"
- style="
- background: #fff;
- margin-top: 20px;
- margin-left: 10px;
- margin-right: 10px;
- height: calc(100% - 40px);
- width: calc(100% - 20px);
- "
+ <el-card>
+ <el-form
+ :model="form"
+ label-position="right"
+ size="mini"
+ class="policeForm"
+ label-width="100px"
+ style="
+ background: #fff;
+ margin-top: 20px;
+ margin-left: 10px;
+ margin-right: 10px;
+ height: calc(100% - 40px);
+ width: calc(100% - 20px);
+ "
+ >
+ <el-row>
+ <el-col span="12">
+ <el-form-item label="报警人">
+ <el-input
+ disabled="true"
+ v-model="form.galarmPeople"
+ autocomplete="off"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col span="12">
+ <el-form-item label="报警人电话">
+ <el-input
+ disabled="true"
+ v-model="form.phoneNumber"
+ autocomplete="off"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col span="12">
+ <el-form-item label="负责人">
+ <el-input
+ disabled="true"
+ v-model="form.oneContacts"
+ autocomplete="off"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col span="12">
+ <el-form-item label="负责人电话">
+ <el-input
+ disabled="true"
+ v-model="form.onePhone"
+ autocomplete="off"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col span="12">
+ <el-form-item label="省份" class="cityClassParams">
+ <avue-form :option="itemOption" v-model="form"></avue-form>
+ </el-form-item>
+ </el-col>
+ <el-col span="12">
+ <el-form-item label="事发地址">
+ <el-input
+ disabled="true"
+ v-model="form.place"
+ autocomplete="off"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col span="12">
+ <el-form-item label="警情类型">
+ <el-input
+ disabled="true"
+ v-model="form.waringType"
+ autocomplete="off"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col span="12">
+ <el-form-item label="设备编号">
+ <el-input
+ disabled="true"
+ v-model="form.deviceNumber"
+ autocomplete="off"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col span="12">
+ <el-form-item label="接警人">
+ <el-input
+ disabled="true"
+ v-model="form.alarmPeople"
+ autocomplete="off"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col span="12">
+ <el-form-item label="报警内容">
+ <el-input
+ disabled="true"
+ v-model="form.content"
+ autocomplete="off"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col span="12">
+ <el-form-item label="报警时间">
+ <el-input
+ disabled="true"
+ v-model="form.alarmTime"
+ autocomplete="off"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col span="12">
+ <el-form-item label="历史视频">
+ <el-button type="primary" @click.stop="oldOpenVideo"
+ >视频播放
+ </el-button>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col span="12">
+ <el-form-item label="备注">
+ <el-input
+ :disabled="form.securityArr.length > 0"
+ v-model="form.bz"
+ autocomplete="off"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ </el-card>
+
+ <div
+ style="margin-top: 20px"
+ role="tab"
+ aria-expanded="true"
+ aria-controls="el-collapse-content-823"
+ aria-describedby="el-collapse-content-823"
>
- <el-row>
- <el-col span="12">
- <el-form-item label="报警人">
- <el-input
- disabled="true"
- v-model="form.galarmPeople"
- autocomplete="off"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col span="12">
- <el-form-item label="报警人电话">
- <el-input
- disabled="true"
- v-model="form.phoneNumber"
- autocomplete="off"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col span="12">
- <el-form-item label="负责人">
- <el-input
- disabled="true"
- v-model="form.oneContacts"
- autocomplete="off"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col span="12">
- <el-form-item label="负责人电话">
- <el-input
- disabled="true"
- v-model="form.onePhone"
- autocomplete="off"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col span="12">
- <el-form-item label="省份" class="cityClassParams">
- <avue-form :option="itemOption" v-model="form"></avue-form>
- </el-form-item>
- </el-col>
- <el-col span="12">
- <el-form-item label="事发地址">
- <el-input
- disabled="true"
- v-model="form.place"
- autocomplete="off"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col span="12">
- <el-form-item label="警情类型">
- <el-input
- disabled="true"
- v-model="form.waringType"
- autocomplete="off"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col span="12">
- <el-form-item label="设备编号">
- <el-input
- disabled="true"
- v-model="form.deviceNumber"
- autocomplete="off"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col span="12">
- <el-form-item label="接警人">
- <el-input
- disabled="true"
- v-model="form.alarmPeople"
- autocomplete="off"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col span="12">
- <el-form-item label="报警内容">
- <el-input
- disabled="true"
- v-model="form.content"
- autocomplete="off"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col span="12">
- <el-form-item label="报警时间">
- <el-input
- disabled="true"
- v-model="form.alarmTime"
- autocomplete="off"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col span="12">
- <el-form-item label="备注">
- <el-input
- disabled="true"
- v-model="form.bz"
- autocomplete="off"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
+ <div
+ role="button"
+ tabindex="0"
+ class="el-collapse-item__header focusing is-active"
+ >
+ <div
+ class="avue-group__header avue-group"
+ style="position: relative"
+ >
+ <i class="el-icon-document avue-group__icon"></i>
+ <h1 class="avue-group__title">人员信息</h1>
+ <el-button
+ @click="
+ onSubmit('通知' + ensureNames, ensureId), (flag = false)
+ "
+ size="small"
+ style="position: absolute; right: 0"
+ :disabled="form.securityArr.length > 0"
+ :type="form.securityArr.length > 0 ? 'info' : 'danger'"
+ >通 知</el-button
+ >
+ </div>
+ </div>
+ </div>
+
+ <el-card>
+ <el-table
+ ref="multipleTable"
+ :data="tableData"
+ tooltip-effect="dark"
+ style="width: 100%"
+ @selection-change="handleSelectionChange"
+ max-height="240"
+ >
+ <el-table-column
+ v-if="!(form.securityArr.length > 0)"
+ type="selection"
+ width="55"
+ align="center"
+ >
+ </el-table-column>
+
+ <el-table-column
+ prop="ind"
+ label="序号"
+ width="60"
+ align="center"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="name"
+ label="姓名"
+ width="100"
+ align="center"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="phone"
+ label="联系电话"
+ width="120"
+ align="center"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="online_status"
+ label="在线状态"
+ width="80"
+ align="center"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="tenantName"
+ label="所属部门"
+ align="center"
+ >
+ </el-table-column>
+
+ <el-table-column
+ prop="status"
+ label="通知状态"
+ width="120"
+ align="center"
+ >
+ </el-table-column>
+ </el-table>
+ </el-card>
<div
style="margin-top: 20px"
@@ -193,190 +298,175 @@
class="el-collapse-item__header focusing is-active"
>
<div class="avue-group__header avue-group">
+ <i class="el-icon-phone avue-group__icon"></i>
+ <h1 class="avue-group__title">对讲信息</h1>
+ </div>
+ </div>
+ </div>
+
+ <el-card class="audios-box">
+ <m-audio
+ :block="false"
+ v-for="(item, index) in audios"
+ :key="index"
+ :src="item.address"
+ ></m-audio>
+ </el-card>
+
+ <div
+ style="margin-top: 20px"
+ role="tab"
+ aria-expanded="true"
+ aria-controls="el-collapse-content-823"
+ aria-describedby="el-collapse-content-823"
+ >
+ <div
+ role="button"
+ tabindex="0"
+ class="el-collapse-item__header focusing is-active"
+ >
+ <div class="avue-group__header avue-group">
<i class="el-icon-s-custom avue-group__icon"></i>
<h1 class="avue-group__title">保安信息</h1>
</div>
</div>
</div>
- <el-form
- :model="security"
- label-position="right"
- size="mini"
- label-width="100px"
- style="
- background: #fff;
- margin-top: 20px;
- margin-left: 10px;
- margin-right: 10px;
- height: calc(100% - 40px);
- width: calc(100% - 20px);
- "
- >
- <el-row>
- <el-col span="12">
- <el-form-item label="人员编号">
- <el-input
- disabled="true"
- v-model="security.snumber"
- autocomplete="off"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col span="12">
- <el-form-item label="人员名称">
- <el-input
- disabled="true"
- v-model="security.sname"
- autocomplete="off"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col span="12">
- <el-form-item label="性别">
- <el-input
- disabled="true"
- v-model="security.sex"
- autocomplete="off"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col span="12">
- <el-form-item label="年龄">
- <el-input
- disabled="true"
- v-model="security.age"
- autocomplete="off"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col span="12">
- <el-form-item label="联系电话">
- <el-input
- disabled="true"
- v-model="security.phone"
- autocomplete="off"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col span="12">
- <el-form-item label="家庭住址">
- <el-input
- disabled="true"
- v-model="security.address"
- autocomplete="off"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
-
- <el-row :gutter="20">
- <el-col :span="16">
- <div class="grid-content bg-purple"></div>
- </el-col>
- <el-col :span="8">
- <div class="grid-content bg-purple"></div>
- </el-col>
- </el-row>
-
- <div class="demo-image__placeholder">
- <div
- role="tab"
- aria-expanded="true"
- aria-controls="el-collapse-content-823"
- aria-describedby="el-collapse-content-823"
+ <el-card>
+ <el-form
+ :model="form"
+ label-position="right"
+ size="mini"
+ label-width="100px"
+ style="
+ background: #fff;
+ margin-top: 20px;
+ margin-left: 10px;
+ margin-right: 10px;
+ height: calc(100% - 40px);
+ width: calc(100% - 20px);
+ "
>
- <div
- role="button"
- tabindex="0"
- class="el-collapse-item__header focusing is-active"
- >
- <div class="avue-group__header avue-group">
- <i class="el-icon-s-order avue-group__icon"></i>
- <h1 class="avue-group__title">警情反馈</h1>
- </div>
- </div>
- </div>
- <el-input
- disabled="true"
- type="textarea"
- v-model="security.snumber"
- autocomplete="off"
- ></el-input>
+ <el-row>
+ <el-col span="12">
+ <el-form-item label="人员编号">
+ <el-input
+ disabled="true"
+ v-model="form.baname"
+ autocomplete="off"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col span="12">
+ <el-form-item label="人员名称">
+ <el-input
+ disabled="true"
+ v-model="form.baid"
+ autocomplete="off"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col span="12">
+ <el-form-item label="联系电话">
+ <el-input
+ disabled="true"
+ v-model="form.baphone"
+ autocomplete="off"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ </el-card>
- <div class="block">
- <div
- style="margin-top: 20px"
- role="tab"
- aria-expanded="true"
- aria-controls="el-collapse-content-823"
- aria-describedby="el-collapse-content-823"
- >
- <div
- role="button"
- tabindex="0"
- class="el-collapse-item__header focusing is-active"
- >
- <div class="avue-group__header avue-group">
- <i class="el-icon-camera-solid avue-group__icon"></i>
- <h1 class="avue-group__title">现场图片</h1>
- </div>
- </div>
- </div>
- <div>
- <el-image
- :src="src"
- style="width: 150px; margin-left: 5px"
- ></el-image>
- <el-image
- :src="src"
- style="width: 150px; margin-left: 5px"
- ></el-image>
- <el-image
- :src="src"
- style="width: 150px; margin-left: 5px"
- ></el-image>
- </div>
- </div>
- <div class="block">
- <div
- style="margin-top: 20px"
- role="tab"
- aria-expanded="true"
- aria-controls="el-collapse-content-823"
- aria-describedby="el-collapse-content-823"
- >
- <div
- role="button"
- tabindex="0"
- class="el-collapse-item__header focusing is-active"
- >
- <div class="avue-group__header avue-group">
- <i class="el-icon-video-camera-solid avue-group__icon"></i>
- <h1 class="avue-group__title">现场视频</h1>
- </div>
- </div>
- </div>
- <div>
- <el-image :src="src" style="width: 150px; margin-left: 5px">
- <div slot="placeholder" class="image-slot">
- 加载中<span class="dot">...</span>
- </div>
- </el-image>
+ <div
+ style="margin-top: 20px"
+ role="tab"
+ aria-expanded="true"
+ aria-controls="el-collapse-content-823"
+ aria-describedby="el-collapse-content-823"
+ >
+ <div
+ role="button"
+ tabindex="0"
+ class="el-collapse-item__header focusing is-active"
+ >
+ <div class="avue-group__header avue-group">
+ <i class="el-icon-s-order avue-group__icon"></i>
+ <h1 class="avue-group__title">警情反馈</h1>
</div>
</div>
</div>
- <el-row :align="center" style="margin-top: 40px">
- <el-col :offset="10">
- <el-button @click="onSubmit" type="danger">处理完成</el-button>
- </el-col>
- </el-row>
+ <el-card>
+ <el-input
+ disabled="true"
+ type="textarea"
+ v-model="security.result"
+ autocomplete="off"
+ ></el-input>
+ </el-card>
+
+ <div
+ style="margin-top: 20px"
+ role="tab"
+ aria-expanded="true"
+ aria-controls="el-collapse-content-823"
+ aria-describedby="el-collapse-content-823"
+ >
+ <div
+ role="button"
+ tabindex="0"
+ class="el-collapse-item__header focusing is-active"
+ >
+ <div class="avue-group__header avue-group">
+ <i class="el-icon-camera-solid avue-group__icon"></i>
+ <h1 class="avue-group__title">现场图片</h1>
+ </div>
+ </div>
+ </div>
+
+ <el-card class="scene-image-box">
+ <el-image
+ v-for="(item, index) in imgSrc"
+ :key="index"
+ :src="item"
+ :preview-src-list="srcList"
+ v-show="imgSrc.length > 0"
+ ></el-image>
+ <span v-show="imgSrc.length == 0">暂无现场图片</span>
+ </el-card>
+
+ <div
+ style="margin-top: 20px"
+ role="tab"
+ aria-expanded="true"
+ aria-controls="el-collapse-content-823"
+ aria-describedby="el-collapse-content-823"
+ >
+ <div
+ role="button"
+ tabindex="0"
+ class="el-collapse-item__header focusing is-active"
+ >
+ <div class="avue-group__header avue-group">
+ <i class="el-icon-video-camera-solid avue-group__icon"></i>
+ <h1 class="avue-group__title">现场视频</h1>
+ </div>
+ </div>
+ </div>
+
+ <el-card>
+ <video
+ :src="feedbackVideo"
+ style="width: 200px; height: 200px; object-fit: fill"
+ controls
+ v-show="feedbackVideo != ''"
+ ></video>
+ <span v-show="feedbackVideo == ''">暂无现场视频</span>
+ </el-card>
</el-card>
</div>
</el-col>
@@ -385,33 +475,51 @@
<iframe
id="mapDiv"
ref="mapDiv"
- src="https://web.byisf.com:18001/map/index.html?openid=ClientManagement"
+ :src="baseUrl"
frameborder="0"
width="100%"
height="100%"
></iframe>
+
+ <el-dialog
+ class="old-video-dialog-box"
+ width="100%"
+ title="历史回放"
+ :visible.sync="oldVideoSatart"
+ :close-on-press-escape="false"
+ :close-on-click-modal="false"
+ @close="vaddress = ''"
+ append-to-body
+ >
+ <video
+ :src="vaddress"
+ muted="muted"
+ loop
+ autoplay="autoplay"
+ id="old_video"
+ style="width: 100%; height: 100%; object-fit: fill"
+ controls
+ v-show="vaddress != ''"
+ ></video>
+ <span v-show="vaddress == ''">暂无历史视频</span>
+ </el-dialog>
</el-col>
</el-row>
</template>
<script>
import axios from "axios";
-
+import { getList, getclient } from "@/api/real/real";
export default {
+ inject: ["reload"],
data() {
return {
+ flag: true,
selectOptions: [],
receivingList: [],
- security: {
- snumber: 20018,
- sname: "金同涛",
- sex: "男",
- age: 23,
- phone: 1387975426,
- address: "江西省南昌市西湖区",
- },
- src:
- "https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg",
+ security: {},
+ imgSrc: [],
+ srcList: [],
form: {},
itemOption: {
menuBtn: false,
@@ -464,45 +572,183 @@
},
],
},
+ tableData: [],
+ multipleSelection: [],
+ ensureNames: "",
+ ensureId: "",
+ baseUrl: "",
+ oldVideoSatart: false,
+ vaddress: null,
+ audios: [],
+ feedbackVideo: "",
};
},
created() {
this.form = this.$route.query;
+ this.updatedPageData();
+ this.vaddress = this.form.vaddress;
this.getReceivingAlarm();
+ this.baseUrl = `/map/index.html?ISinit=1&openid=AlertSecurity&id=${this.form.id}&jd=${this.form.jd}&wd=${this.form.wd}&pid=${this.form.deptId}&deptId=${this.form.deptId}&oneId=${this.form.oneId}`;
+ },
+ mounted() {
+ this.getAudios();
+ this.getImgAndVideo();
+ this.$refs.mapDiv.onload = () => {
+ window.frames[0].init("AlertSecurity", {
+ x: this.form.jd,
+ y: this.form.wd,
+ });
+ };
+ },
+ updated() {
+ var arr = [];
+ this.tableData.forEach((item) => {
+ if (item.id == this.form.oneId) {
+ arr.push(item);
+ }
+ });
+
+ if (this.form.jtype != 2) {
+ this.toggleSelection(arr);
+ }
},
methods: {
- onSubmit() {
- var newAxios = axios.create({
- baseURL: "https://web.byisf.com:18001",
- withCredentials: false,
- headers: {},
- });
+ getDate() {
+ // 当前时间
+ var timestamp = Date.parse(new Date());
+ var serverDate = new Date(timestamp);
- newAxios
+ // 本周周一的时间
+ var mondayTime =
+ timestamp - (serverDate.getDay() - 1) * 24 * 60 * 60 * 1000;
+ var mondayData = new Date(mondayTime);
+ //年
+ var mondayY = mondayData.getFullYear();
+ //月
+ var mondayM =
+ mondayData.getMonth() + 1 < 10
+ ? "0" + (mondayData.getMonth() + 1)
+ : mondayData.getMonth() + 1;
+ //日
+ var mondayD =
+ mondayData.getDate() < 10
+ ? "0" + mondayData.getDate()
+ : mondayData.getDate();
+ // 当前时间
+ var currentData = new Date(timestamp);
+ //年
+ var currentY = currentData.getFullYear();
+ //月
+ var currentM =
+ currentData.getMonth() + 1 < 10
+ ? "0" + (currentData.getMonth() + 1)
+ : currentData.getMonth() + 1;
+ //日
+ var currentD =
+ currentData.getDate() < 10
+ ? "0" + currentData.getDate()
+ : currentData.getDate();
+ //时
+ var currenH =
+ currentData.getHours() < 10
+ ? "0" + currentData.getHours()
+ : currentData.getHours();
+ //分
+ var currenM =
+ currentData.getMinutes() < 10
+ ? "0" + currentData.getMinutes()
+ : currentData.getMinutes();
+ //秒
+ var currenS =
+ currentData.getSeconds() < 10
+ ? "0" + currentData.getSeconds()
+ : currentData.getSeconds();
+
+ return {
+ day: {
+ beginTime: currentY + "-" + currentM + "-" + currentD + " 00:00:00",
+ endTime:
+ currentY +
+ "-" +
+ currentM +
+ "-" +
+ currentD +
+ " " +
+ currenH +
+ ":" +
+ currenM +
+ ":00",
+ },
+ week: {
+ beginTime: mondayY + "-" + mondayM + "-" + mondayD + " 00:00:00",
+ endTime:
+ currentY +
+ "-" +
+ currentM +
+ "-" +
+ currentD +
+ " " +
+ currenH +
+ ":" +
+ currenM +
+ ":00",
+ },
+ month: {
+ beginTime: mondayY + "-" + mondayM + "-01 00:00:00",
+ endTime:
+ currentY +
+ "-" +
+ currentM +
+ "-" +
+ currentD +
+ " " +
+ currenH +
+ ":" +
+ currenM +
+ ":00",
+ },
+ current:
+ currentY +
+ "-" +
+ currentM +
+ "-" +
+ currentD +
+ " " +
+ currenH +
+ ":" +
+ currenM +
+ ":" +
+ currenS,
+ };
+ },
+ onSubmit(zc, ensureId) {
+ var that = this;
+ var subData = {
+ jid: this.form.id,
+ jtype: 1,
+ rid: this.form.alarmId,
+ bz: this.form.bz,
+ snumber: this.form.alarmId,
+ sname: this.form.alarmPeople,
+ deviceNumber:this.form.deviceNumber,
+ zc: zc,
+ zctime: this.getDate().current,
+ };
+ if (ensureId && ensureId != "") {
+ subData.securityArr = ensureId;
+ }
+ axios
.post(
- "/api/blade-jfpts/jingdan/jingdan/updateInfo",
+ "/api/blade-jfpts/alarm/alarm/updateJtype",
{},
{
- params: {
- id: this.form.id,
- handleP: this.form.handleP,
- handName: this.form.handName,
- handletype: this.form.handletype,
- type: "2",
- },
+ params: subData,
}
)
- .then((res) => {
- if (res.data.msg == "修改成功") {
- var arr = [];
- this.$store.state.tags.tagList.forEach((item) => {
- if (item.value != this.$store.state.tags.tag.value) {
- arr.push(item);
- }
- });
- this.$store.state.tags.tagList = arr;
- this.$router.go(-1);
- }
+ .then(function (res) {
+ that.getReceivingAlarm();
+
+ that.updatedPageData();
});
},
@@ -513,13 +759,194 @@
this.receivingList = res.data.data.records;
});
},
+
+ 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=${deptid}`
+ )
+ .then(function (res) {
+ that.tableData = [];
+ var i = 0;
+
+ if (that.form.securityArr.length > 0) {
+ res.data.data.records.forEach((item) => {
+ if (item.id == that.form.securityId) {
+ that.tableData.push({
+ id: item.id,
+ ind: (i += 1),
+ name: item.name,
+ phone: item.phone,
+ online_status: item.online_status == 1 ? "在线" : "掉线",
+ status: "已接警",
+ tenantName: item.tenantName,
+ });
+ }
+ });
+
+ res.data.data.records.forEach((item) => {
+ if (
+ item.roleName == "处警员" &&
+ that.form.securityArr.indexOf(item.id) != -1 &&
+ item.id != that.form.securityId
+ ) {
+ that.tableData.push({
+ id: item.id,
+ ind: (i += 1),
+ name: item.name,
+ phone: item.phone,
+ online_status: item.online_status == 1 ? "在线" : "掉线",
+ status: "已通知",
+ tenantName: item.tenantName,
+ });
+ } else if (
+ item.roleName == "处警员" &&
+ that.form.securityArr.indexOf(item.id) == -1 &&
+ item.id != that.form.securityId
+ ) {
+ that.tableData.push({
+ id: item.id,
+ ind: (i += 1),
+ name: item.name,
+ phone: item.phone,
+ online_status: item.online_status == 1 ? "在线" : "掉线",
+ status: "未通知",
+ tenantName: item.tenantName,
+ });
+ }
+ });
+
+ that.tableData.forEach((item) => {
+ if (item.id == that.form.oneId) {
+ item.status += "(负责人)";
+ }
+ });
+ } else {
+ res.data.data.records.forEach((item) => {
+ if (item.id == that.form.oneId) {
+ that.tableData.push({
+ id: item.id,
+ ind: (i += 1),
+ name: item.name,
+ phone: item.phone,
+ online_status: item.online_status == 1 ? "在线" : "掉线",
+ status: "未通知(负责人)",
+ tenantName: item.tenantName,
+ });
+ }
+ });
+
+ res.data.data.records.forEach((item) => {
+ if (item.roleName == "处警员" && item.id != that.form.oneId) {
+ that.tableData.push({
+ id: item.id,
+ ind: (i += 1),
+ name: item.name,
+ phone: item.phone,
+ online_status: item.online_status == 1 ? "在线" : "掉线",
+ status: "未通知",
+ tenantName: item.tenantName,
+ });
+ }
+ });
+ }
+ });
+ },
+
+ handleSelectionChange(val) {
+ this.ensureNames = "";
+ this.ensureId = "";
+ val.forEach((item, index) => {
+ this.ensureId += item.id;
+ this.ensureId += ",";
+ if (index == val.length - 1) {
+ this.ensureNames += item.name;
+ this.ensureNames += "。";
+ } else {
+ this.ensureNames += item.name;
+ this.ensureNames += "、";
+ }
+ });
+
+ this.multipleSelection = val;
+ },
+
+ toggleSelection(rows) {
+ if (rows) {
+ rows.forEach((row) => {
+ this.$refs.multipleTable.toggleRowSelection(row);
+ });
+ } else {
+ this.$refs.multipleTable.clearSelection();
+ }
+ },
+
+ getAudios() {
+ axios({
+ method: "get",
+ url: "/api/blade-jfpts/avideo/list",
+ params: {
+ jid: this.form.id,
+ },
+ }).then((resdata) => {
+ if (resdata.data.data.records.length > 0)
+ this.audios = resdata.data.data.records;
+ });
+ },
+
+ getImgAndVideo() {
+ axios({
+ method: "post",
+ url: "/api/blade-jfpts/feedback/feedback/selectFeedEdit",
+ params: {
+ jid: this.form.id,
+ },
+ }).then((resdata) => {
+ if (resdata.data.data.length > 0) {
+ if (resdata.data.data[0].List.length > 0)
+ this.security = resdata.data.data[0].List[0];
+ if (resdata.data.data[0].tp.length > 0) {
+ this.imgSrc = resdata.data.data[0].tp;
+ this.srcList = resdata.data.data[0].tp;
+ }
+ if (resdata.data.data[0].sp.length > 0) {
+ this.feedbackVideo = resdata.data.data[0].sp[0];
+ }
+ }
+ });
+ },
+
+ oldOpenVideo() {
+ getclient(this.form.id).then((res) => {
+ if (res.data.data.vaddress != "") {
+ this.vaddress = res.data.data.vaddress;
+ }
+ this.oldVideoSatart = true;
+ });
+ },
+
+ updatedPageData() {
+ var that = this;
+ axios({
+ method: "get",
+ url: "/api/blade-jfpts/alarm/alarm/page",
+ params: {
+ id: that.form.id,
+ },
+ }).then(function (res) {
+ that.form = res.data.data.records[0];
+ that.getList();//报错deptId格式不对liu.2021.5.7
+ });
+ },
},
};
</script>
-<style lang="scss">
+<style scoped lang="scss">
.el-col {
- height: 95%;
+ height: calc(100% - 5px);
}
.trackClass {
@@ -536,4 +963,31 @@
padding: 0 10px !important;
}
}
+
+.audios-box,
+.scene-image-box {
+ line-height: 32px !important;
+ height: auto;
+ max-height: 200px;
+ overflow-y: auto;
+ .el-card__body {
+ display: flex;
+ padding: 0 10px !important;
+ flex-wrap: wrap;
+ justify-content: center;
+ align-items: center;
+ .x-audio-wrap.inline {
+ margin: 10px;
+ }
+ .el-image {
+ margin: 10px;
+ width: 160px;
+ height: 80px;
+ }
+ }
+}
+
+#old_video::-webkit-media-controls-timeline {
+ display: block;
+}
</style>
--
Gitblit v1.9.3