From 06a1b82e3656be1ef9573e1abb9977457cb4a6d8 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 20 Mar 2021 09:47:55 +0800
Subject: [PATCH] logo修改,部分字段显示调整

---
 src/views/realTimePolice/real.vue |  157 +++++++++++++++++++++++++++++-----------------------
 public/img/1.png                  |    0 
 public/img/ydlg.png               |    0 
 public/img/ydly.png               |    0 
 4 files changed, 87 insertions(+), 70 deletions(-)

diff --git a/public/img/ydlg1.png b/public/img/1.png
similarity index 100%
rename from public/img/ydlg1.png
rename to public/img/1.png
Binary files differ
diff --git a/public/img/ydlg.png b/public/img/ydlg.png
index 2462267..22bc256 100644
--- a/public/img/ydlg.png
+++ b/public/img/ydlg.png
Binary files differ
diff --git a/public/img/ydly.png b/public/img/ydly.png
new file mode 100644
index 0000000..82cf26c
--- /dev/null
+++ b/public/img/ydly.png
Binary files differ
diff --git a/src/views/realTimePolice/real.vue b/src/views/realTimePolice/real.vue
index 29b9620..a29decb 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-19 18:47:03
+ * @Last Modified time: 2021-03-20 09:46:40
  */
 <template>
   <basic-container>
@@ -63,9 +63,7 @@
       <template slot-scope="{ row }" slot="jtype">
         <el-tag
           >{{
-            row.jtype == "0"
-              ? "未处理"
-              : "已处理"
+            row.jtype == "0" ? "未处理" : row.jtype == "1" ? "处理中" : "已处理"
           }}
         </el-tag>
       </template>
@@ -101,7 +99,7 @@
           >核实
         </el-button>
         <el-button
-          v-if="row.jtype == 1 || row.jtype == 2 || row.jtype == 3"
+          v-if="row.jtype != 0 && row.jtype != ''"
           icon="el-icon-s-order"
           :size="size"
           :type="type"
@@ -483,16 +481,26 @@
               },
             ],
           },
+          // {
+          //   label: "报警内容",
+          //   prop: "content",
+          // },
           {
-            label: "报警内容",
-            prop: "content",
+            label: "主要负责人",
+            prop: "oneContacts",
+            width: 90,
+          },
+          {
+            label: "负责人电话",
+            prop: "onePhone",
+            width: 96,
           },
           {
             label: "报警人",
             prop: "galarmPeople",
           },
           {
-            label: "联系电话",
+            label: "报警人电话",
             prop: "phoneNumber",
             width: 130,
           },
@@ -523,9 +531,13 @@
                 value: "0",
               },
               {
-                label: "已处理",
+                label: "处理中",
                 value: "1",
-              }
+              },
+              {
+                label: "已处理",
+                value: "2",
+              },
             ],
           },
           {
@@ -652,6 +664,8 @@
       peopleList: [],
       peopleName: "",
       peoplePhone: "",
+      aKeyToCallFlag: false,
+      aKeyToCallTime: null,
     };
   },
   computed: {
@@ -821,10 +835,9 @@
       this.loading = true;
       getList(page.currentPage, page.pageSize, values).then((res) => {
         const data = res.data.data;
-        console.log(data.records);
-        data.records.forEach(item => {
-          item.waringType == "紧急求救" ? item.waringType = "一键求助" : '';
-        })
+        data.records.forEach((item) => {
+          item.waringType == "紧急求救" ? (item.waringType = "一键求助") : "";
+        });
         this.page.total = data.total;
 
         data.records.sort((a, b) => {
@@ -832,7 +845,7 @@
         });
 
         this.data = data.records;
-        
+
         this.loading = false;
         this.selectionClear();
       });
@@ -1187,7 +1200,6 @@
       dom.currentTime = 0;
       dom.play();
     },
-
     closeOldVideoBox() {
       var dom = document.getElementById("old_video");
       dom.pause();
@@ -1202,62 +1214,67 @@
         },
       });
       var that = this;
-
-      Recorder.getPermission().then(() => {
-        // 一键呼叫相关函数
-        setInterval(() => {
-          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, {
+      if (this.aKeyToCallFlag == false) {
+        this.aKeyToCallFlag = true;
+        Recorder.getPermission().then(() => {
+          // 一键呼叫相关函数
+          that.aKeyToCallTime = setInterval(() => {
+            that.recorder.start().then(
+              () => {
+                // 开始录音
+                setTimeout(() => {
+                  newCallAxios
+                    .post(
+                      `/api_control`,
+                      {},
+                      {
                         params: {
-                          param: {
-                            PktType: "Talk",
-                            accessToken: result.data.data.accessToken,
-                            // deviceCode: form.channelNumber,
-                            deviceCode: "001241945990",
-                          },
+                          param: { PktType: "GetAccessToken" },
                         },
-                      })
-                      .then((result) => {});
-                  });
-              }, 5000);
-            },
-            (error) => {
-              // 出错了
-              console.log(`${error.name} : ${error.message}`);
-            }
-          );
-        }, 6000);
-      });
+                      }
+                    )
+                    .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}`);
+              }
+            );
+          }, 6000);
+        });
+      } else {
+        this.aKeyToCallFlag = false;
+        window.clearInterval(that.aKeyToCallTime)
+      }
     },
 
     aKeyToCall111(e, form) {

--
Gitblit v1.9.3