From 482ca73ca0a57defc73dc7f61e03328c2bb8e49b Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 26 Mar 2021 11:07:22 +0800
Subject: [PATCH] 视频对讲权限更改,地图保安图标更改

---
 src/views/realTimePolice/real.vue                 |   16 ++++++----------
 src/views/policeTracking/policeTracking.vue       |    4 ++--
 public/map/widgets/alertSecurity/AlertSecurity.js |   33 +++++++++++++++++++--------------
 src/page/index/logo.vue                           |    2 +-
 4 files changed, 28 insertions(+), 27 deletions(-)

diff --git a/public/map/widgets/alertSecurity/AlertSecurity.js b/public/map/widgets/alertSecurity/AlertSecurity.js
index 4d56e2a..8844276 100644
--- a/public/map/widgets/alertSecurity/AlertSecurity.js
+++ b/public/map/widgets/alertSecurity/AlertSecurity.js
@@ -201,25 +201,30 @@
       var openid = that.getQueryStringByKey('id');
       var lgtd = that.getQueryStringByKey('jd');
       var lttd = that.getQueryStringByKey('wd');
-
-      console.log(openid, lgtd, lttd, 123465)
+      var deptId = that.getQueryStringByKey('deptId');
+      var oneId = that.getQueryStringByKey('oneId');
 
       that.addPoint(that.addEntitys, lgtd, lttd, './images/jingbaored.png');
      
-
       $.ajax({
-        url: "https://web.byisf.com/api/blade-jfpts/position/position/selectfj",
-        type: 'POST',
+        url: "https://web.byisf.com/api/blade-user/pages?current=1&size=9999&work_status=&deptId=" + deptId,
+        type: 'get',
         dataType: 'JSON',
-        data: {
-          jd: lgtd,
-          wd: lttd
-        },
-        success: function (data) {
-          console.log(data)
-          data.data.forEach(item => {
-            that.addPoints(that.addEntitys, item.jd, item.wd, './images/security.png')
-          })
+        success: function (res) {
+
+          console.log(res.data.records, oneId)
+
+          res.data.records.forEach((item) => {
+            if (item.id == oneId) {
+              that.addPoints(that.addEntitys, item.jd, item.wd, './images/security.png')
+            }
+          });
+
+          res.data.records.forEach((item) => {
+            if (item.roleName == "处警员" && item.id != oneId) {
+              that.addPoints(that.addEntitys, item.jd, item.wd, './images/security.png')
+            }
+          });
         }
       })
 
diff --git a/src/page/index/logo.vue b/src/page/index/logo.vue
index 23e56f3..b734244 100644
--- a/src/page/index/logo.vue
+++ b/src/page/index/logo.vue
@@ -427,7 +427,7 @@
               that.peopleName = that.form.oneContacts;
               that.peoplePhone = that.form.onePhone;
               that.dialogTableVisible = true;
-              // Recorder.getPermiRecorderssion().then(() => {});
+              Recorder.getPermiRecorderssion().then(() => {});
 
               that.ofX = null;
               that.ofY = null;
diff --git a/src/views/policeTracking/policeTracking.vue b/src/views/policeTracking/policeTracking.vue
index d4c0cc3..3372671 100644
--- a/src/views/policeTracking/policeTracking.vue
+++ b/src/views/policeTracking/policeTracking.vue
@@ -614,7 +614,7 @@
     this.form = this.$route.query;
     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}`;
+    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.getList();
@@ -790,7 +790,7 @@
     getList() {
       var that = this;
       axios
-        .get(`/api/blade-user/page?current=1&size=9999&work_status=&deptId=`)
+        .get(`/api/blade-user/pages?current=1&size=9999&work_status=&deptId=${that.form.deptId}`)
         .then(function (res) {
           that.tableData = [];
           var i = 0;
diff --git a/src/views/realTimePolice/real.vue b/src/views/realTimePolice/real.vue
index c6c4a29..e35a742 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-25 14:59:09
+ * @Last Modified time: 2021-03-26 11:05:55
  */
 <template>
   <basic-container>
@@ -129,7 +129,7 @@
       :visible.sync="dialogTableVisible"
       :append-to-body="true"
       :close-on-click-modal="false"
-      @opened="videoConversationReal = true"
+      @opened="realOpenVideoDialog"
       @close="(videoConversationReal = false), (oldVideoSatart = false)"
     >
       <el-dialog
@@ -691,14 +691,6 @@
   },
   created() {
     this.dateTime = this.getDate();
-    Recorder.getPermission().then(() => {});
-
-    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
-    });
   },
   methods: {
     rowSave(row, done, loading) {
@@ -1341,6 +1333,10 @@
       //警情追踪
       this.$router.push({ path: "/policeTracking/track", query: row });
     },
+    realOpenVideoDialog() {
+      Recorder.getPermission().then(() => {});
+      this.videoConversationReal = true;
+    },
   },
 };
 </script>

--
Gitblit v1.9.3