From 6fa2d1a078152bc3db89a287adf9a61b55166d12 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 20 Mar 2021 11:40:02 +0800
Subject: [PATCH] 弹框部分做更改,地图图标更改

---
 src/views/realTimePolice/real.vue       |  109 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
 public/map/images/police-situation1.png |    0 
 public/map/images/jingbaored1.png       |    0 
 public/map/images/police-situation.png  |    0 
 public/map/images/jingbaored.png        |    0 
 src/page/index/logo.vue                 |    1 
 6 files changed, 106 insertions(+), 4 deletions(-)

diff --git a/public/map/images/jingbaored.png b/public/map/images/jingbaored.png
index 460d39b..eef9d7c 100644
--- a/public/map/images/jingbaored.png
+++ b/public/map/images/jingbaored.png
Binary files differ
diff --git a/public/map/images/jingbaored1.png b/public/map/images/jingbaored1.png
new file mode 100644
index 0000000..460d39b
--- /dev/null
+++ b/public/map/images/jingbaored1.png
Binary files differ
diff --git a/public/map/images/police-situation.png b/public/map/images/police-situation.png
index 0632092..eef9d7c 100644
--- a/public/map/images/police-situation.png
+++ b/public/map/images/police-situation.png
Binary files differ
diff --git a/public/map/images/police-situation1.png b/public/map/images/police-situation1.png
new file mode 100644
index 0000000..0632092
--- /dev/null
+++ b/public/map/images/police-situation1.png
Binary files differ
diff --git a/src/page/index/logo.vue b/src/page/index/logo.vue
index 4b421eb..ffeda76 100644
--- a/src/page/index/logo.vue
+++ b/src/page/index/logo.vue
@@ -686,6 +686,7 @@
   bottom: 0 !important;
   margin: auto !important;
   width: 670px !important;
+  z-index: 2200 !important;
 }
 
 .ss-video-dialog .el-dialog {
diff --git a/src/views/realTimePolice/real.vue b/src/views/realTimePolice/real.vue
index a29decb..ddc1371 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-20 09:46:40
+ * @Last Modified time: 2021-03-20 11:38:56
  */
 <template>
   <basic-container>
@@ -40,6 +40,12 @@
       </template>
 
       <template slot="menuLeft">
+        <el-button
+          v-bind:class="activeClass == 0 ? 'btn-color' : ''"
+          size="small"
+          @click="getBRdata(0)"
+          >本日
+        </el-button>
         <el-button
           v-bind:class="activeClass == 1 ? 'btn-color' : ''"
           size="small"
@@ -122,7 +128,7 @@
       :visible.sync="dialogTableVisible"
       :append-to-body="true"
       :close-on-click-modal="false"
-      @close="innerVisibleVideo = false"
+      @close="(videoConversationReal = false), (oldVideoSatart = false)"
     >
       <el-dialog
         class="ss-video-dialog"
@@ -309,7 +315,7 @@
                 type="success"
                 @click.stop="
                   (videoConversationReal = !videoConversationReal),
-                    (oldVideoSatart = fasle),
+                    (oldVideoSatart = false),
                     aKeyToCall(form)
                 "
                 >视频通话
@@ -902,6 +908,20 @@
           : 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:
@@ -943,6 +963,16 @@
           ":" +
           currenS,
       };
+    },
+    getBRdata(e) {
+      this.activeClass = e;
+      var params = {
+        beginTime: this.dateTime.day.beginTime,
+        endTime: this.dateTime.day.endTime,
+      };
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
     },
     getBZdata(e) {
       this.activeClass = e;
@@ -1023,6 +1053,7 @@
       this.peopleName = row.oneContacts;
       this.peoplePhone = row.onePhone;
       this.dialogTableVisible = true;
+      this.videoConversationReal = true;
     },
     updateJtyep(row, jtype, t) {
       var that = this;
@@ -1046,6 +1077,8 @@
         )
         .then(function () {
           that.onLoad(that.page, that.query);
+          that.videoConversationReal = false;
+          that.oldVideoSatart = false;
         });
     },
     beginTimeOrEndTime(time) {
@@ -1214,8 +1247,19 @@
         },
       });
       var that = this;
+
+      if (that.recorder == null) {
+        that.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
+        });
+      }
+
       if (this.aKeyToCallFlag == false) {
         this.aKeyToCallFlag = true;
+        videoPhone();
         Recorder.getPermission().then(() => {
           // 一键呼叫相关函数
           that.aKeyToCallTime = setInterval(() => {
@@ -1273,7 +1317,64 @@
         });
       } else {
         this.aKeyToCallFlag = false;
-        window.clearInterval(that.aKeyToCallTime)
+
+        that.recorder.destroy().then(function () {
+          that.recorder = null;
+        });
+        window.clearInterval(that.aKeyToCallTime);
+      }
+
+      function videoPhone() {
+        that.recorder.start().then(
+          () => {
+            // 开始录音
+            setTimeout(() => {
+              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);
+
+                  // var dom = document.getElementById("real_audio");
+                  // dom.setAttribute("src", URL.createObjectURL(blob));
+
+                  // this.recorder.play();
+
+                  newCallAxios
+                    .post(`/api_control`, blob, {
+                      params: {
+                        param: {
+                          PktType: "Talk",
+                          accessToken: result.data.data.accessToken,
+                          // deviceCode: form.channelNumber,
+                          deviceCode: "001241945990",
+                        },
+                      },
+                    })
+                    .then((result) => {});
+                });
+            }, 5000);
+          },
+          (error) => {
+            // 出错了
+            console.log(`${error.name} : ${error.message}`);
+          }
+        );
       }
     },
 

--
Gitblit v1.9.3