From 3749b5b2169e9402482999273597d9e1d4f4e685 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 24 Mar 2021 17:55:40 +0800
Subject: [PATCH] 追踪页面部分修改,及实时警情弹框修改

---
 src/styles/real.scss                        |    4 
 src/views/policeTracking/policeTracking.vue |   99 ++++
 src/page/index/logo.vue                     | 1218 ++++++++++++++++++++++++++--------------------------
 3 files changed, 699 insertions(+), 622 deletions(-)

diff --git a/src/page/index/logo.vue b/src/page/index/logo.vue
index fb0ad94..35e5fe6 100644
--- a/src/page/index/logo.vue
+++ b/src/page/index/logo.vue
@@ -168,14 +168,14 @@
                   "
                   @mousedown.native="aKeyToCall"
                   @mouseup.native="aKeyStopCall"
-                >视频通话
+                  >视频通话
                 </el-button>
                 <el-button
                   type="primary"
                   @click.stop="
                     (oldVideoSatart = true), (videoConversationReal = false)
                   "
-                >查看历史
+                  >查看历史
                 </el-button>
               </el-form-item>
             </el-col>
@@ -193,7 +193,7 @@
                 <el-button
                   type="success"
                   @click.stop="updateJtyep(form, 1, '办结')"
-                >办结
+                  >办结
                 </el-button>
 
                 <img
@@ -210,7 +210,7 @@
                 <el-button
                   type="primary"
                   @click.stop="updateJtyep(form, 1, '派送保安')"
-                >派送保安
+                  >派送保安
                 </el-button>
               </el-form-item>
             </el-col>
@@ -263,287 +263,231 @@
 </template>
 
 <script>
-  import {mapGetters} from "vuex";
-  import axios from "axios";
-  import Hls from "hls.js";
-  import Recorder from "js-audio-recorder";
+import { mapGetters } from "vuex";
+import axios from "axios";
+import Hls from "hls.js";
+import Recorder from "js-audio-recorder";
 
-  export default {
-    name: "logo",
-    data() {
-      return {
-        dialogTableVisible: false,
-        videoConversationReal: false,
-        oldVideoSatart: false,
-        deviceId: null,
-        userId: null,
-        socket: null,
-        form: {},
-        itemOption: {
-          menuBtn: false,
-          column: [
-            {
-              disabled: true,
-              row: false,
-              prop: "province",
-              type: "select",
-              placeholder: "省份",
-              props: {
-                label: "name",
-                value: "code",
-              },
-              cascaderItem: ["city", "district"],
-              dicUrl: "/api/blade-system/region/select",
-              span: 1,
-              labelWidth: "0",
-              className: "cityClassSelect",
+export default {
+  name: "logo",
+  data() {
+    return {
+      dialogTableVisible: false,
+      videoConversationReal: false,
+      oldVideoSatart: false,
+      deviceId: null,
+      userId: null,
+      socket: null,
+      form: {},
+      itemOption: {
+        menuBtn: false,
+        column: [
+          {
+            disabled: true,
+            row: false,
+            prop: "province",
+            type: "select",
+            placeholder: "省份",
+            props: {
+              label: "name",
+              value: "code",
             },
-            {
-              disabled: true,
-              row: false,
-              prop: "city",
-              type: "select",
-              placeholder: "地市",
-              props: {
-                label: "name",
-                value: "code",
-              },
-              dicUrl: "/api/blade-system/region/select?code={{key}}",
-              span: 1,
-              labelWidth: "0",
-              className: "cityClassSelect",
+            cascaderItem: ["city", "district"],
+            dicUrl: "/api/blade-system/region/select",
+            span: 1,
+            labelWidth: "0",
+            className: "cityClassSelect",
+          },
+          {
+            disabled: true,
+            row: false,
+            prop: "city",
+            type: "select",
+            placeholder: "地市",
+            props: {
+              label: "name",
+              value: "code",
             },
-            {
-              disabled: true,
-              row: false,
-              prop: "district",
-              type: "select",
-              placeholder: "区县",
-              props: {
-                label: "name",
-                value: "code",
-              },
-              dicUrl: "/api/blade-system/region/select?code={{key}}",
-              span: 1,
-              labelWidth: "0",
-              className: "cityClassSelect",
+            dicUrl: "/api/blade-system/region/select?code={{key}}",
+            span: 1,
+            labelWidth: "0",
+            className: "cityClassSelect",
+          },
+          {
+            disabled: true,
+            row: false,
+            prop: "district",
+            type: "select",
+            placeholder: "区县",
+            props: {
+              label: "name",
+              value: "code",
             },
-          ],
-        },
-        isActive: false,
-        recorder: null,
-        peopleList: [],
-        peopleName: "",
-        peoplePhone: "",
-        ofX: null,
-        ofY: null,
-      };
-    },
-    created() {
+            dicUrl: "/api/blade-system/region/select?code={{key}}",
+            span: 1,
+            labelWidth: "0",
+            className: "cityClassSelect",
+          },
+        ],
+      },
+      isActive: false,
+      recorder: null,
+      peopleList: [],
+      peopleName: "",
+      peoplePhone: "",
+      ofX: null,
+      ofY: null,
+    };
+  },
+  created() {
+    this.userId = JSON.parse(
+      window.localStorage.getItem("物联网安保云服务平台-userInfo")
+    ).content.user_id;
 
-      this.userId = JSON.parse(
-        window.localStorage.getItem("物联网安保云服务平台-userInfo")
-      ).content.user_id;
+    this.getData();
+  },
+  computed: {
+    ...mapGetters(["website", "keyCollapse"]),
+  },
+  methods: {
+    getData() {
+      var that = this;
 
+      if (!window.WebSocket) {
+        window.WebSocket = window.MozWebSocket;
+      }
 
-      this.getData();
+      if (window.WebSocket) {
+        that.socket = new WebSocket("ws://36.134.81.48:9034/websocket");
+        that.socket.onmessage = function (event) {};
 
-    },
-    mounted() {
-      this.recorder = new Recorder({
-        sampleBits: 16, // 采样位数,支持 8 或 16,默认是16
-        sampleRate: 8000, // 采样率,支持 11025、16000、22050、24000、44100、48000,根据浏览器默认值,我的chrome是48000
-        numChannels: 1, // 声道,支持 1 或 2, 默认是1
-        // compiling: false,(0.x版本中生效,1.x增加中)  // 是否边录边转换,默认是false
-      });
-      // Recorder.getPermiRecorderssion().then(() => {});
-    },
-    computed: {
-      ...mapGetters(["website", "keyCollapse"]),
-    },
-    methods: {
-      getData() {
-        var that = this;
+        that.socket.onopen = function (event) {};
 
+        that.socket.onclose = function (event) {};
+      } else {
+        console.log("您的浏览器不支持WebSocket");
+      }
+
+      setTimeout(function () {
         if (!window.WebSocket) {
-          window.WebSocket = window.MozWebSocket;
+          return;
         }
-
-        if (window.WebSocket) {
-          that.socket = new WebSocket("ws://36.134.81.48:9034/websocket");
-          that.socket.onmessage = function (event) {
-          };
-
-          that.socket.onopen = function (event) {
-          };
-
-          that.socket.onclose = function (event) {
-          };
+        if (that.socket.readyState == WebSocket.OPEN) {
+          that.socket.send(that.userId);
         } else {
-          console.log("您的浏览器不支持WebSocket");
+          console.log("WebSocket连接没有建立成功!!");
         }
+      }, 4000);
 
-        setTimeout(function () {
-          if(!window.WebSocket){
-            return;
-          }
-          if(that.socket.readyState == WebSocket.OPEN){
-            that.socket.send(that.userId);
-          }else{
-            console.log("WebSocket连接没有建立成功!!");
-          }
-        }, 4000);
-
-
+      axios({
+        url: "/api/blade-jfpts/alarm/alarm/getLimit",
+        method: "get",
+      }).then(function (response) {
+        that.deviceId = response.data.data[0].id;
+        //获得最新ID,开启实时报警循环
+        that.layerRealtime();
+      });
+    },
+    layerRealtime() {
+      var that = this;
+      window.clearTimeout(window.realTimeQuery);
+      // that.deviceId = 334; // 测试用
+      window.realTimeQuery = setInterval(function () {
         axios({
-          url: "/api/blade-jfpts/alarm/alarm/getLimit",
-          method: "get",
+          url: "/api/blade-jfpts/alarm/alarm/selecttx?id=" + that.deviceId,
+          method: "post",
         }).then(function (response) {
-          that.deviceId = response.data.data[0].id;
-          //获得最新ID,开启实时报警循环
-          that.layerRealtime();
-        });
-      },
-      layerRealtime() {
-        var that = this;
-        window.clearTimeout(window.realTimeQuery);
-        // 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) {
+            that.deviceId = response.data.data[0].id;
+            if (
+              response.data.data[0].waringType == "紧急求救" &&
+              response.data.data[0].alarmId == that.userId
+            ) {
+              response.data.data[0].waringType = "一键求助";
+              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;
+              Recorder.getPermiRecorderssion().then(() => {});
 
-            if (response.data.data.length > 0) {
-              that.deviceId = response.data.data[0].id;
-              if (
-                response.data.data[0].waringType == "紧急求救" &&
-                response.data.data[0].alarmId == that.userId
-              ) {
-                response.data.data[0].waringType = "一键求助";
-                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.ofX = null;
+              that.ofY = null;
 
-                that.ofX = null;
-                that.ofY = null;
+              window.addEventListener("mousemove", that.handleMousemove);
 
-                window.addEventListener("mousemove", that.handleMousemove);
-
-                that.$refs.realAudio.src = "./realVideo/audio.mp3";
-                that.$refs.realAudio.play();
-              }
+              that.$refs.realAudio.src = "./realVideo/audio.mp3";
+              that.$refs.realAudio.play();
             }
-          });
-        }, 5000);
-      },
-      closeDialog() {
-        //关闭窗口回调,关闭警报
-        this.videoConversationReal = false;
-        this.oldVideoSatart = false;
-      },
+          }
+        });
+      }, 5000);
+    },
+    closeDialog() {
+      //关闭窗口回调,关闭警报
+      this.videoConversationReal = false;
+      this.oldVideoSatart = false;
+    },
 
-      getDate() {
-        // 当前时间
-        var timestamp = Date.parse(new Date());
-        var serverDate = new Date(timestamp);
+    getDate() {
+      // 当前时间
+      var timestamp = Date.parse(new Date());
+      var serverDate = new Date(timestamp);
 
-        // 本周周一的时间
-        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();
+      // 本周周一的时间
+      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:
+      return {
+        day: {
+          beginTime: currentY + "-" + currentM + "-" + currentD + " 00:00:00",
+          endTime:
             currentY +
             "-" +
             currentM +
@@ -553,379 +497,419 @@
             currenH +
             ":" +
             currenM +
+            ":00",
+        },
+        week: {
+          beginTime: mondayY + "-" + mondayM + "-" + mondayD + " 00:00:00",
+          endTime:
+            currentY +
+            "-" +
+            currentM +
+            "-" +
+            currentD +
+            " " +
+            currenH +
             ":" +
-            currenS,
-        };
-      },
-      updateJtyep(row, jtype, t) {
-        var that = this;
-        axios
-          .post(
-            "/api/blade-jfpts/alarm/alarm/updateJtype",
-            {},
-            {
-              params: {
-                jid: row.id,
-                jtype: jtype,
-                rid: row.alarmId,
-                bz: row.bz,
-                snumber: row.alarmId,
-                sname: row.alarmPeople,
-                zc: t,
-                zctime: that.getDate().current,
-              },
-            }
-          )
-          .then(function () {
-            that.dialogTableVisible = false;
-
-            that.$router.push({
-              path: "/policeTracking/track",
-              query: that.form,
-            });
-          });
-      },
-      beginTimeOrEndTime(time) {
-        var beginTime = new Date(time);
-
-        var endTime = new Date(new Date(time).valueOf() - 1000 * 60 * 60 * 3);
-
-        var beginY = beginTime.getFullYear();
-
-        var beginM =
-          beginTime.getMonth() + 1 < 10
-            ? "0" + (beginTime.getMonth() + 1)
-            : beginTime.getMonth() + 1;
-
-        var beginD =
-          beginTime.getDate() < 10
-            ? "0" + beginTime.getDate()
-            : beginTime.getDate();
-
-        var beginH =
-          beginTime.getHours() < 10
-            ? "0" + beginTime.getHours()
-            : beginTime.getHours();
-
-        var beginm =
-          beginTime.getMinutes() < 10
-            ? "0" + beginTime.getMinutes()
-            : beginTime.getMinutes();
-
-        var begins =
-          beginTime.getSeconds() < 10
-            ? "0" + beginTime.getSeconds()
-            : beginTime.getSeconds();
-
-        var endY = endTime.getFullYear();
-
-        var endM =
-          endTime.getMonth() + 1 < 10
-            ? "0" + (endTime.getMonth() + 1)
-            : endTime.getMonth() + 1;
-
-        var endD =
-          endTime.getDate() < 10 ? "0" + endTime.getDate() : endTime.getDate();
-
-        var endH =
-          endTime.getHours() < 10 ? "0" + endTime.getHours() : endTime.getHours();
-
-        var endm =
-          endTime.getMinutes() < 10
-            ? "0" + endTime.getMinutes()
-            : endTime.getMinutes();
-
-        var ends =
-          endTime.getSeconds() < 10
-            ? "0" + endTime.getSeconds()
-            : endTime.getSeconds();
-        return {
-          begin: beginY + beginM + beginD + beginH + beginm + begins,
-          end: endY + endM + endD + endH + endm + ends,
-        };
-      },
-
-      // 视频通话打开关闭事件
-      openRealVideoBox() {
-        var newAxios = axios.create({
-          baseURL: "https://web.byisf.com:18000",
-          withCredentials: false,
-          headers: {
-            "Content-type": "application/x-www-form-urlencoded",
-          },
-        });
-
-        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;
-
-                if (Hls.isSupported()) {
-                  var dom = document.getElementById("video_conversation");
-
-                  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();
-                  });
-                }
-              });
-          });
-      },
-
-      closeRealVideoBox() {
-        var dom = document.getElementById("video_conversation");
-
-        if (dom.getAttribute("src") != "") {
-          dom.pause();
-
-          dom.setAttribute("src", "");
-
-          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() {
-        var that = this;
-        if (this.recorder == null) {
-          this.recorder = new Recorder({
-            sampleBits: 16, // 采样位数,支持 8 或 16,默认是16
-            sampleRate: 8000, // 采样率,支持 11025、16000、22050、24000、44100、48000,根据浏览器默认值,我的chrome是48000
-            numChannels: 1, // 声道,支持 1 或 2, 默认是1
-            // compiling: false,(0.x版本中生效,1.x增加中)  // 是否边录边转换,默认是false
-          });
-        }
-        this.isActive = true;
-
-        // 一键呼叫相关函数
-        that.recorder.start().then(
-          () => {
-            // 开始录音
-          },
-          (error) => {
-            // 出错了
-            console.log(`${error.name} : ${error.message}`);
-          }
-        );
-      },
-
-      // 序列号后期待修改
-      aKeyStopCall() {
-        var newCallAxios = axios.create({
-          baseURL: "https://web.byisf.com:18000",
-          withCredentials: false,
-          headers: {
-            "Content-Type": "application/json;",
-          },
-        });
-        var that = this;
-        that.isActive = false;
-
-        newCallAxios
-          .post(
-            `/api_control`,
-            {},
-            {
-              params: {
-                param: {PktType: "GetAccessToken"},
-              },
-            }
-          )
-          .then((result) => {
-            var formData = new FormData();
-            var blob = that.recorder.getPCMBlob(); //获取pcm格式音频数据
-            //此处获取到blob对象后需要设置fileName满足当前项目上传需求,其它项目可直接传把blob作为file塞入formData
-            var newbolb = new Blob([blob], {type: "audio/pcm"});
-            var fileOfBlob = new File([newbolb], new Date().getTime() + ".pcm");
-            formData.append("file", fileOfBlob);
-            newCallAxios
-              .post(`/api_control`, blob, {
-                params: {
-                  param: {
-                    PktType: "Talk",
-                    accessToken: result.data.data.accessToken,
-                    deviceCode: this.form.serialNumber,
-                  },
-                },
-              })
-              .then(() => {
-                that.recorder.destroy().then(function () {
-                  that.recorder = null;
-                });
-              });
-          });
-      },
-
-      peopleOrPhone(e) {
-        this.peopleList.forEach((item) => {
-          if (item.label == e) {
-            this.peoplePhone = item.value;
-          }
-        });
-      },
-
-      // 监听鼠标的移动事件
-      handleMousemove(e) {
-        if (
-          (this.ofX != null && e.offsetX != this.ofX) ||
-          (this.ofY != null && e.offsetY != this.ofY)
-        ) {
-          this.$refs.realAudio.pause();
-          window.removeEventListener("mousemove", this.handleMousemove);
-        }
-
-        this.ofX = e.offsetX;
-        this.ofY = e.offsetY;
-      },
+            currenM +
+            ":00",
+        },
+        month: {
+          beginTime: mondayY + "-" + mondayM + "-01 00:00:00",
+          endTime:
+            currentY +
+            "-" +
+            currentM +
+            "-" +
+            currentD +
+            " " +
+            currenH +
+            ":" +
+            currenM +
+            ":00",
+        },
+        current:
+          currentY +
+          "-" +
+          currentM +
+          "-" +
+          currentD +
+          " " +
+          currenH +
+          ":" +
+          currenM +
+          ":" +
+          currenS,
+      };
     },
-  };
+    updateJtyep(row, jtype, t) {
+      var that = this;
+      axios
+        .post(
+          "/api/blade-jfpts/alarm/alarm/updateJtype",
+          {},
+          {
+            params: {
+              jid: row.id,
+              jtype: jtype,
+              rid: row.alarmId,
+              bz: row.bz,
+              snumber: row.alarmId,
+              sname: row.alarmPeople,
+              zc: t,
+              zctime: that.getDate().current,
+            },
+          }
+        )
+        .then(function () {
+          that.dialogTableVisible = false;
+
+          that.$router.push({
+            path: "/policeTracking/track",
+            query: that.form,
+          });
+        });
+    },
+    beginTimeOrEndTime(time) {
+      var beginTime = new Date(time);
+
+      var endTime = new Date(new Date(time).valueOf() - 1000 * 60 * 60 * 3);
+
+      var beginY = beginTime.getFullYear();
+
+      var beginM =
+        beginTime.getMonth() + 1 < 10
+          ? "0" + (beginTime.getMonth() + 1)
+          : beginTime.getMonth() + 1;
+
+      var beginD =
+        beginTime.getDate() < 10
+          ? "0" + beginTime.getDate()
+          : beginTime.getDate();
+
+      var beginH =
+        beginTime.getHours() < 10
+          ? "0" + beginTime.getHours()
+          : beginTime.getHours();
+
+      var beginm =
+        beginTime.getMinutes() < 10
+          ? "0" + beginTime.getMinutes()
+          : beginTime.getMinutes();
+
+      var begins =
+        beginTime.getSeconds() < 10
+          ? "0" + beginTime.getSeconds()
+          : beginTime.getSeconds();
+
+      var endY = endTime.getFullYear();
+
+      var endM =
+        endTime.getMonth() + 1 < 10
+          ? "0" + (endTime.getMonth() + 1)
+          : endTime.getMonth() + 1;
+
+      var endD =
+        endTime.getDate() < 10 ? "0" + endTime.getDate() : endTime.getDate();
+
+      var endH =
+        endTime.getHours() < 10 ? "0" + endTime.getHours() : endTime.getHours();
+
+      var endm =
+        endTime.getMinutes() < 10
+          ? "0" + endTime.getMinutes()
+          : endTime.getMinutes();
+
+      var ends =
+        endTime.getSeconds() < 10
+          ? "0" + endTime.getSeconds()
+          : endTime.getSeconds();
+      return {
+        begin: beginY + beginM + beginD + beginH + beginm + begins,
+        end: endY + endM + endD + endH + endm + ends,
+      };
+    },
+
+    // 视频通话打开关闭事件
+    openRealVideoBox() {
+      var newAxios = axios.create({
+        baseURL: "https://web.byisf.com:18000",
+        withCredentials: false,
+        headers: {
+          "Content-type": "application/x-www-form-urlencoded",
+        },
+      });
+
+      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;
+
+              if (Hls.isSupported()) {
+                var dom = document.getElementById("video_conversation");
+
+                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();
+                });
+              }
+            });
+        });
+    },
+
+    closeRealVideoBox() {
+      var dom = document.getElementById("video_conversation");
+
+      if (dom.getAttribute("src") != "") {
+        dom.pause();
+
+        dom.setAttribute("src", "");
+
+        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() {
+      var that = this;
+      if (this.recorder == null) {
+        this.recorder = new Recorder({
+          sampleBits: 16, // 采样位数,支持 8 或 16,默认是16
+          sampleRate: 8000, // 采样率,支持 11025、16000、22050、24000、44100、48000,根据浏览器默认值,我的chrome是48000
+          numChannels: 1, // 声道,支持 1 或 2, 默认是1
+          // compiling: false,(0.x版本中生效,1.x增加中)  // 是否边录边转换,默认是false
+        });
+      }
+      this.isActive = true;
+
+      // 一键呼叫相关函数
+      that.recorder.start().then(
+        () => {
+          // 开始录音
+        },
+        (error) => {
+          // 出错了
+          console.log(`${error.name} : ${error.message}`);
+        }
+      );
+    },
+
+    // 序列号后期待修改
+    aKeyStopCall() {
+      var newCallAxios = axios.create({
+        baseURL: "https://web.byisf.com:18000",
+        withCredentials: false,
+        headers: {
+          "Content-Type": "application/json;",
+        },
+      });
+      var that = this;
+      that.isActive = false;
+
+      newCallAxios
+        .post(
+          `/api_control`,
+          {},
+          {
+            params: {
+              param: { PktType: "GetAccessToken" },
+            },
+          }
+        )
+        .then((result) => {
+          var formData = new FormData();
+          var blob = that.recorder.getPCMBlob(); //获取pcm格式音频数据
+          //此处获取到blob对象后需要设置fileName满足当前项目上传需求,其它项目可直接传把blob作为file塞入formData
+          var newbolb = new Blob([blob], { type: "audio/pcm" });
+          var fileOfBlob = new File([newbolb], new Date().getTime() + ".pcm");
+          formData.append("file", fileOfBlob);
+          newCallAxios
+            .post(`/api_control`, blob, {
+              params: {
+                param: {
+                  PktType: "Talk",
+                  accessToken: result.data.data.accessToken,
+                  deviceCode: this.form.serialNumber,
+                },
+              },
+            })
+            .then(() => {
+              that.recorder.destroy().then(function () {
+                that.recorder = null;
+              });
+            });
+        });
+    },
+
+    peopleOrPhone(e) {
+      this.peopleList.forEach((item) => {
+        if (item.label == e) {
+          this.peoplePhone = item.value;
+        }
+      });
+    },
+
+    // 监听鼠标的移动事件
+    handleMousemove(e) {
+      if (
+        (this.ofX != null && e.offsetX != this.ofX) ||
+        (this.ofY != null && e.offsetY != this.ofY)
+      ) {
+        this.$refs.realAudio.pause();
+        window.removeEventListener("mousemove", this.handleMousemove);
+      }
+
+      this.ofX = e.offsetX;
+      this.ofY = e.offsetY;
+    },
+  },
+};
 </script>
 
 <style lang="scss">
-  .fade-leave-active {
-    transition: opacity 0.2s;
-  }
+.fade-leave-active {
+  transition: opacity 0.2s;
+}
 
-  .fade-enter-active {
-    transition: opacity 2.5s;
-  }
+.fade-enter-active {
+  transition: opacity 2.5s;
+}
 
-  .fade-enter,
-  .fade-leave-to {
-    opacity: 0;
-  }
+.fade-enter,
+.fade-leave-to {
+  opacity: 0;
+}
 
-  .avue-logo {
-    position: fixed;
-    top: 0;
-    left: 0;
-    width: 240px;
-    height: 64px;
-    line-height: 64px;
-    background-color: #20222a;
+.avue-logo {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 240px;
+  height: 64px;
+  line-height: 64px;
+  background-color: #20222a;
+  font-size: 20px;
+  overflow: hidden;
+  box-sizing: border-box;
+  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
+  color: rgba(255, 255, 255, 0.8);
+  z-index: 1024;
+
+  &_title {
+    display: block;
+    text-align: center;
+    font-weight: 300;
     font-size: 20px;
-    overflow: hidden;
-    box-sizing: border-box;
-    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
-    color: rgba(255, 255, 255, 0.8);
-    z-index: 1024;
-
-    &_title {
-      display: block;
-      text-align: center;
-      font-weight: 300;
-      font-size: 20px;
-    }
-
-    &_subtitle {
-      display: block;
-      text-align: center;
-      font-size: 18px;
-      font-weight: bold;
-      color: #fff;
-    }
   }
 
-  .real-dialog .el-dialog::after {
-    content: "";
-    position: absolute;
-    left: -5px;
-    top: 25px;
-    right: -5px;
-    bottom: 25px;
-    background: red;
-    border-radius: 10px;
-    filter: blur(120px);
-    mix-blend-mode: overlay;
-    pointer-events: none;
-    z-index: -1;
+  &_subtitle {
+    display: block;
+    text-align: center;
+    font-size: 18px;
+    font-weight: bold;
+    color: #fff;
   }
+}
 
-  .real-dialog .el-dialog__header {
-    padding-top: 10px;
-    background: linear-gradient(45deg, #ff0000, #ff3c3c);
-    border-radius: 10px 10px 0 0;
-  }
+.real-dialog .el-dialog::after {
+  content: "";
+  position: absolute;
+  left: -5px;
+  top: 25px;
+  right: -5px;
+  bottom: 25px;
+  background: red;
+  border-radius: 10px;
+  filter: blur(120px);
+  mix-blend-mode: overlay;
+  pointer-events: none;
+  z-index: -1;
+}
 
-  .real-dialog .el-dialog__header .el-dialog__title {
-    color: white;
-  }
+.real-dialog .el-dialog__header {
+  padding-top: 10px;
+  background: linear-gradient(45deg, #ff0000, #ff3c3c);
+  border-radius: 10px 10px 0 0;
+}
 
-  .real-dialog .el-dialog__header .el-dialog__headerbtn {
-    top: 15px;
-  }
+.real-dialog .el-dialog__header .el-dialog__title {
+  color: white;
+}
 
-  .real-dialog .el-dialog {
-    margin: auto !important;
-    position: absolute !important;
-    top: 0 !important;
-    bottom: 0 !important;
-    left: 0 !important;
-    right: 400px !important;
-    height: 558px !important;
-    border-radius: 10px 10px 10px 10px;
-  }
+.real-dialog .el-dialog__header .el-dialog__headerbtn {
+  top: 15px;
+}
 
-  .ss-video-dialog {
-    position: absolute !important;
-    top: 0px !important;
-    left: auto !important;
-    right: 5px !important;
-    bottom: 0 !important;
-    margin: auto !important;
-    width: 670px !important;
-    z-index: 2200 !important;
-  }
+.real-dialog .el-dialog {
+  margin: auto !important;
+  position: absolute !important;
+  top: 0 !important;
+  bottom: 0 !important;
+  left: 0 !important;
+  right: 400px !important;
+  height: 558px !important;
+  border-radius: 10px 10px 10px 10px;
+}
 
-  .ss-video-dialog .el-dialog {
-    position: absolute !important;
-    top: 0 !important;
-    left: 0 !important;
-    right: 0 !important;
-    bottom: 0 !important;
-    margin: auto !important;
-    height: 558px;
-    border-radius: 10px 10px 10px 10px;
-  }
+.ss-video-dialog {
+  position: absolute !important;
+  top: 0px !important;
+  left: auto !important;
+  right: 5px !important;
+  bottom: 0 !important;
+  margin: auto !important;
+  width: 670px !important;
+  z-index: 2200 !important;
+}
 
-  .ss-video-dialog .el-dialog .el-dialog__header {
-    padding-top: 10px;
-  }
+.ss-video-dialog .el-dialog {
+  position: absolute !important;
+  top: 0 !important;
+  left: 0 !important;
+  right: 0 !important;
+  bottom: 0 !important;
+  margin: auto !important;
+  height: 558px;
+  border-radius: 10px 10px 10px 10px;
+}
 
-  .ss-video-dialog .el-dialog .el-dialog__body {
-    padding: 10px !important;
-    height: calc(100% - 44px);
-    box-sizing: border-box;
-  }
+.ss-video-dialog .el-dialog .el-dialog__header {
+  padding-top: 10px;
+}
+
+.ss-video-dialog .el-dialog .el-dialog__body {
+  padding: 10px !important;
+  height: calc(100% - 44px);
+  box-sizing: border-box;
+}
 </style>
diff --git a/src/styles/real.scss b/src/styles/real.scss
index 74ac371..79883a6 100644
--- a/src/styles/real.scss
+++ b/src/styles/real.scss
@@ -19,12 +19,12 @@
 }
 
 // 警情追踪图片放大中的关闭按钮的样式调整
-.el-icon-circle-close {
+.el-image .el-icon-circle-close {
     width: 40px;
     height: 40px;
     background: url(/img/big-img-close.png) no-repeat;
     background-size: 100% 100%;
 }
-.el-icon-circle-close:before {
+.el-image .el-icon-circle-close:before {
     content: '';
 }
\ No newline at end of file
diff --git a/src/views/policeTracking/policeTracking.vue b/src/views/policeTracking/policeTracking.vue
index 854477e..29b543f 100644
--- a/src/views/policeTracking/policeTracking.vue
+++ b/src/views/policeTracking/policeTracking.vue
@@ -167,6 +167,72 @@
               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
+                  type="danger"
+                  size="small"
+                  style="position: absolute; right: 0"
+                  >通 知</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 type="selection" width="55"> </el-table-column>
+
+              <el-table-column prop="ind" label="序号" width="120">
+              </el-table-column>
+              <el-table-column prop="name" label="姓名" width="120">
+              </el-table-column>
+              <el-table-column prop="phone" label="联系电话" width="120">
+              </el-table-column>
+
+              <el-table-column prop="code" label="编号" width="120">
+              </el-table-column>
+              <el-table-column
+                prop="online_status"
+                label="在线状态"
+                width="120"
+              >
+              </el-table-column>
+              <el-table-column prop="site" label="地址" width="120">
+              </el-table-column>
+              <el-table-column
+                prop="role"
+                label="所属角色"
+                width="120"
+                fixed="right"
+              >
+              </el-table-column>
+            </el-table>
+          </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-document avue-group__icon"></i>
                 <h1 class="avue-group__title">接警信息</h1>
@@ -393,7 +459,7 @@
       <iframe
         id="mapDiv"
         ref="mapDiv"
-        src="https://web.byisf.com:18001/map/index.html?openid=ClientManagement"
+        src="https://web.byisf.com/map/index.html?openid=ClientManagement"
         frameborder="0"
         width="100%"
         height="100%"
@@ -421,7 +487,6 @@
       src:
         "https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg",
       srcList: [
-        "https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg",
         "https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg",
         "https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg",
         "https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg",
@@ -478,11 +543,16 @@
           },
         ],
       },
+      tableData: [],
+      multipleSelection: [],
     };
   },
   created() {
     this.form = this.$route.query;
     this.getReceivingAlarm();
+  },
+  mounted() {
+    this.getList();
   },
   methods: {
     getDate() {
@@ -613,7 +683,7 @@
           }
         )
         .then(function (res) {
-          if ((res.msg = "修改成功")) {
+          if (res.msg == "修改成功") {
             var arr = [];
             that.$store.state.tags.tagList.forEach((item) => {
               if (item.value != that.$store.state.tags.tag.value) {
@@ -633,6 +703,29 @@
           this.receivingList = res.data.data.records;
         });
     },
+
+    getList() {
+      var that = this;
+      axios
+        .post("/api/blade-jfpts/alarm/alarm/queryBa", {}, {})
+        .then(function (res) {
+          that.tableData = [];
+          console.log(res);
+          res.data.data.forEach((item, index) => {
+            that.tableData.push({
+              ind: index + 1,
+              name: item.real_name,
+              phone: item.phone,
+              code: item.CODE,
+            });
+          });
+        });
+    },
+
+    handleSelectionChange(val) {
+      console.log(val);
+      this.multipleSelection = val;
+    },
   },
 };
 </script>

--
Gitblit v1.9.3