浏览代码

防爆扩音webRTC接入,页面功能测试;门禁弹窗页面数据接入,功能测试;激光云台弹窗页面数据接入,功能测试;底部菜单调整

fan 3 月之前
父节点
当前提交
c09aed1211

+ 1 - 0
public/index.html

@@ -10,6 +10,7 @@
   <script src="js/layers.js?"></script>
   <script src="js/layerconfig.js?"></script>
   <script src="js/buildings.js?"></script>
+  <script src="js/fbky.js"></script>
   <script src="js/station.js"></script>
   <script src="js/chart.js"></script>
   <script src="js/mapModeConfig.js"></script>

+ 28 - 15
public/js/config.js

@@ -138,20 +138,24 @@ const MQTT_CONFIG = {
     'Risk/New',
     'dashboard/risk/drawrisktime',
     'Visualization/DataComm/NewAlarm',
-    'Visualization/Number/RecentlyLevelByDate'
+    'Visualization/Number/RecentlyLevelByDate',
+    'Visualization/Number/RecentlyLevelByDateDYMZ',
+    'Visualization/Number/RecentlyLevelByDateKKQG',
+    'Visualization/Number/RecentlyLevelByDateDSSZ',
+    'Visualization/Number/RecentlyLevelByDateYWSZ'
   ],
 }
 //后台管理根路径
 const ISMSAdminWeb = {
   // path: "http://localhost:9528/#/",
-  // path: "http://11.100.46.218:8080/#/",
-  path: `http://192.168.195.134:8080/#/`,
+  path: "https://11.100.46.218:8080/#/",
+  // path: `http://192.168.195.134:8080/#/`,
   // path: `http://${window.location.hostname}:8080/#/`,
 }
 
 //都匀调度系统access_key配置
-ACCESS_KEY = ''
-SECRET_KEY = ''
+ACCESS_KEY = 'kczzol9ws3bk8gc1p0mx'
+SECRET_KEY = 'fakj8yw61ocot5uvub0o'
 //房顶配置
 const MODEL_ROOF_LIST = [{ model: 'JHFSZ', part: ['门卫室-顶', '办公区屋顶'] }]
 
@@ -623,6 +627,9 @@ const GY_STATIONS = [
     direction: 'right',
     position: [106.62632139900707, 26.650595691076745, 1.4650695463064403],
     layers: ['周界', '泄漏', '摄像头'],
+    webRTCUrl: "wss://192.168.10.39:1443/webrtc",
+    admin: "8889",
+    password: "123456",
   },
   {
     id: '657316634284793856',
@@ -643,6 +650,9 @@ const GY_STATIONS = [
     direction: 'right',
     position: [106.62631864686837, 26.650589347228493, 1.4654720522226603],
     layers: ['周界', '泄漏', '摄像头'],
+    webRTCUrl: "wss://192.168.20.31:1443/webrtc",
+    admin: "8889",
+    password: "123456",
   },
   {
     id: '657316587124039680',
@@ -653,6 +663,9 @@ const GY_STATIONS = [
     direction: 'right',
     position: [106.6263209022603, 26.650585399041464, 1.4657059185197159],
     layers: ['周界', '泄漏', '摄像头'],
+    webRTCUrl: "wss://11.100.46.233:1443/webrtc",
+    admin: "8889",
+    password: "123456",
   },
   {
     id: '',
@@ -743,8 +756,8 @@ const GY_JGYT_CONFIG = [
         buildId: '657317980832538624',
         children: [
           {
-            id: '1',
-            // id: '660856349529219072',
+            // id: '1',
+            id: '660856349529219072',
             name: '云台1',
             ndTag: 'DY_Leak_PTZ_Concn',
           },
@@ -757,14 +770,14 @@ const GY_JGYT_CONFIG = [
         buildId: '657318879332147200',
         children: [
           {
-            id: '2',
-            // id: '660856349529219074',
+            // id: '2',
+            id: '660856349529219074',
             name: '云台1',
             ndTag: 'DS_JGYT_01_DATA_ND',
           },
           {
-            id: '3',
-            // id: '660856349529219076',
+            // id: '3',
+            id: '660856349529219076',
             name: '云台2',
             ndTag: 'DS_JGYT_02_DATA_ND',
           },
@@ -777,8 +790,8 @@ const GY_JGYT_CONFIG = [
         buildId: '657318695416111104',
         children: [
           {
-            id: '4',
-            // id: '660856349529219073',
+            // id: '4',
+            id: '660856349529219073',
             name: '云台1',
             ndTag: 'KK_Leak_PTZ_Concn',
           },
@@ -791,8 +804,8 @@ const GY_JGYT_CONFIG = [
         buildId: '657319107443564544',
         children: [
           {
-            id: '5',
-            // id: '660856349529219075',
+            // id: '5',
+            id: '660856349529219075',
             name: '云台1',
             ndTag: 'YW_Leak_PTZ_Concn',
           },

+ 36 - 0
public/js/fbky.js

@@ -0,0 +1,36 @@
+const FBKYLIST = [
+  { number: "800", name: "都匀末站站控室电话", departmentId: "657316479015854080", cameraID: '654277056716087296', type: '扩音喇叭', description: '扩音喇叭' },
+  { number: "801", name: "都匀末站场站大门口", departmentId: "657316479015854080", cameraID: '654277056716087296', type: '扩音喇叭', description: '扩音喇叭' },
+  { number: "802", name: "都匀末站工艺区入口", departmentId: "657316479015854080", cameraID: '654277056716087296', type: '扩音喇叭', description: '扩音喇叭' },
+  { number: "806", name: "都匀末站车棚南侧", departmentId: "657316479015854080", cameraID: '654277056716087296', type: '扩音喇叭', description: '扩音喇叭' },
+  { number: "805", name: "都匀末站工艺区西侧", departmentId: "657316479015854080", cameraID: '654277056716087296', type: '扩音喇叭', description: '扩音喇叭' },
+  { number: "804", name: "都匀末站工艺区西北角", departmentId: "657316479015854080", cameraID: '654277056716087296', type: '扩音喇叭', description: '扩音喇叭' },
+  { number: "803", name: "都匀末站工艺区东北角", departmentId: "657316479015854080", cameraID: '654277056716087296', type: '扩音喇叭', description: '扩音喇叭' },
+  { number: "807", name: "都匀末站控制器音柱", departmentId: "657316479015854080", cameraID: '654277056716087296', type: '扩音喇叭', description: '扩音喇叭' },
+  { number: "808", name: "都匀末站站控室吸顶扬声器1", departmentId: "657316479015854080", cameraID: '654277056716087296', type: '扩音喇叭', description: '扩音喇叭' },
+  { number: "809", name: "都匀末站站控室吸顶扬声器2", departmentId: "657316479015854080", cameraID: '654277056716087296', type: '扩音喇叭', description: '扩音喇叭' },
+  { number: "11903", name: "都匀末站工艺区喊话", departmentId: "657316479015854080", cameraID: '654277056716087296', type: '广播', description: '工艺区喊话广播' },
+  { number: "21903", name: "都匀末站生活区喊话", departmentId: "657316479015854080", cameraID: '654277056716087296', type: '广播', description: '生活区喊话广播' },
+  { number: "31903", name: "都匀末站站控室喊话", departmentId: "657316479015854080", cameraID: '654277056716087296', type: '广播', description: '站控室喊话广播' },
+  { number: "99997", name: "都匀末站全喊话", departmentId: "657316479015854080", cameraID: '654277056716087296', type: '广播', description: '全喊话广播' },
+  { number: "900", name: "独山站值班室", departmentId: "657316587124039680", cameraID: '654277056716087296', type: "扩音喇叭", description: "扩音喇叭" },
+  { number: "901", name: "独山站门卫室门口", departmentId: "657316587124039680", cameraID: '654277056716087296', type: "扩音喇叭", description: "扩音喇叭" },
+  { number: "902", name: "独山站综合值班室对面", departmentId: "657316587124039680", cameraID: '654277056716087296', type: "扩音喇叭", description: "扩音喇叭" },
+  { number: "903", name: "独山站综合值班室右侧", departmentId: "657316587124039680", cameraID: '654277056716087296', type: "扩音喇叭", description: "扩音喇叭" },
+  { number: "904", name: "独山站工艺区西南角", departmentId: "657316587124039680", cameraID: '654277056716087296', type: "扩音喇叭", description: "扩音喇叭" },
+  { number: "905", name: "独山站工艺区西北角", departmentId: "657316587124039680", cameraID: '654277056716087296', type: "扩音喇叭", description: "扩音喇叭" },
+  { number: "906", name: "独山站值班室音柱", departmentId: "657316587124039680", cameraID: '654277056716087296', type: "扩音喇叭", description: "扩音喇叭" },
+  { number: "907", name: "独山站值班室吸顶音箱", departmentId: "657316587124039680", cameraID: '654277056716087296', type: "扩音喇叭", description: "扩音喇叭" },
+  { number: "1903", name: "独山站工艺区喊话", departmentId: "657316587124039680", cameraID: '654277056716087296', type: "广播", description: "工艺区喊话广播" },
+  { number: "2903", name: "独山站生活区喊话", departmentId: "657316587124039680", cameraID: '654277056716087296', type: "广播", description: "生活区喊话广播" },
+  { number: "99997", name: "独山站全喊话", departmentId: "657316587124039680", cameraID: '654277056716087296', type: "广播", description: "全喊话广播" },
+  { number: "900", name: "凯口站机柜间", departmentId: "657316533462114304", cameraID: '654277056716087296', type: "扩音喇叭", description: "扩音喇叭" },
+  { number: "901", name: "凯口站大门口", departmentId: "657316533462114304", cameraID: '654277056716087296', type: "扩音喇叭", description: "扩音喇叭" },
+  { number: "902", name: "凯口站综合楼前东", departmentId: "657316533462114304", cameraID: '654277056716087296', type: "扩音喇叭", description: "扩音喇叭" },
+  { number: "903", name: "凯口站综合楼前西", departmentId: "657316533462114304", cameraID: '654277056716087296', type: "扩音喇叭", description: "扩音喇叭" },
+  { number: "904", name: "凯口站工艺区东南角", departmentId: "657316533462114304", cameraID: '654277056716087296', type: "扩音喇叭", description: "扩音喇叭" },
+  { number: "905", name: "凯口站工艺区西南角", departmentId: "657316533462114304", cameraID: '654277056716087296', type: "扩音喇叭", description: "扩音喇叭" },
+  { number: "906", name: "凯口站机柜间音柱", departmentId: "657316533462114304", cameraID: '654277056716087296', type: "扩音喇叭", description: "扩音喇叭" },
+  { number: "907", name: "凯口站库房吸顶音箱", departmentId: "657316533462114304", cameraID: '654277056716087296', type: "扩音喇叭", description: "扩音喇叭" },
+  { number: "99997", name: "凯口站全", departmentId: "657316533462114304", cameraID: '654277056716087296', type: "广播", description: "广播" },
+]

+ 0 - 2
src/utils/webRTU.js

@@ -1,2 +0,0 @@
-import { rtcHelperWithLogging } from './plugins/tr-webrtc.min.js';
-let rtcHelper = rtcHelperWithLogging;

+ 1 - 1
src/views/basePage/mixins/LoadLayer/perimeter.js

@@ -228,7 +228,7 @@ export default {
         }
         let item = dataSource[0].entities.getById(data.segmentId)
         if (!!item) {
-          if (data.alarmType > 0) {
+          if (data.alarmType > 0 || data.alarmType < 4) {
             if (data.alarmPoint) {
               //地图元素
               let x = 1

+ 22 - 3
src/views/basePage/panels/RiskStatistics/index.vue

@@ -20,11 +20,13 @@
 import BaseTitle from "../BaseTitle.vue";
 import RiskChart from "./RiskChart.vue";
 import { random } from "lodash-es";
+import { mapGetters } from "vuex";
 export default {
   name: "RiskStatistics",
   components: { BaseTitle, RiskChart },
   data() {
     return {
+      dId: "0",
       searchType: "1",
       // levelTrendData: {
       //   name: ["11.30", "12.1", "12.2", "12.3", "12.4", "12.5", "12.6"],
@@ -42,7 +44,18 @@ export default {
       },
     };
   },
-
+  watch: {
+    departmentId(oldVal, newVal) {
+      console.log("部门id信息风险统计", oldVal, newVal, this.buildId);
+      // if (oldVal === newVal) {
+      // }
+      this.dId = newVal;
+      setTimeout(() => {}, 200);
+    },
+  },
+  computed: {
+    ...mapGetters(["departmentId", "buildId"]),
+  },
   mounted() {
     this.startMqtt();
     return;
@@ -57,7 +70,13 @@ export default {
   },
   methods: {
     startMqtt() {
-      const topics = ["Visualization/Number/RecentlyLevelByDate"];
+      const topics = [
+        "Visualization/Number/RecentlyLevelByDate",
+        "Visualization/Number/RecentlyLevelByDateDYMZ",
+        "Visualization/Number/RecentlyLevelByDateKKQG",
+        "Visualization/Number/RecentlyLevelByDateDSSZ",
+        "Visualization/Number/RecentlyLevelByDateYWSZ",
+      ];
       const _this = this;
       this.$store.dispatch("mqtt/subscribe", {
         topic: topics,
@@ -75,7 +94,7 @@ export default {
                 })
               );
             });
-            // console.log("风险统计数据", this.levelTrendData.data);
+            console.log("风险统计数据", this.levelTrendData.data);
           }
         },
       });

+ 6 - 2
src/views/components/baseFooter/FooterNavigation.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="footer-navigation-container">
+  <div class="footer-navigation-container" v-if="$route.name == 'basePage'">
     <div class="btn-box">
       <div
         class="btn"
@@ -106,6 +106,9 @@ export default {
       ],
     };
   },
+  watch: {
+    $route(to, from) {},
+  },
   mounted() {
     this.getNavigationList();
   },
@@ -157,7 +160,7 @@ export default {
           item.level = this.btnPositionList[index].level;
           this.btnList.push(btn);
         });
-        // this.initMap(); //都匀加载驾驶舱模型//托克托不需要
+        this.initMap(); //都匀加载驾驶舱模型//托克托不需要
         // console.log(this.btnList, "按钮列表");
       } catch (err) {
         console.log(err);
@@ -235,6 +238,7 @@ export default {
   border: 0px solid red;
   pointer-events: initial;
   position: absolute;
+  z-index: 1800; // loading层是2000 设置高一些,下拉菜单会盖住loading层
   left: 50%;
   bottom: 0;
   transform: translate(-50%, 0);

+ 13 - 10
src/views/components/baseHeader/left.vue

@@ -71,17 +71,20 @@
             <el-dropdown-item disabled>
               <!-- <div>{{ username }}</div> -->
             </el-dropdown-item>
-            <el-dropdown-item @click.native="test2">
+            <!-- <el-dropdown-item @click.native="test2">
               <span style="display: block">110一键报警</span>
             </el-dropdown-item>
-            <el-dropdown-item @click.native="test3">
-              <span style="display: block">防爆扩音</span>
-            </el-dropdown-item>
             <el-dropdown-item @click.native="test">
               <span style="display: block">报警声音弹窗</span>
             </el-dropdown-item>
             <el-dropdown-item @click.native="test1">
               <span style="display: block">入场动画开关</span>
+            </el-dropdown-item> -->
+            <!-- <el-dropdown-item @click.native="test3">
+              <span style="display: block">防爆扩音</span>
+            </el-dropdown-item> -->
+            <el-dropdown-item @click.native="toAdmin">
+              <span style="display: block">管理系统</span>
             </el-dropdown-item>
             <el-dropdown-item @click.native="goToLogout">
               <span style="display: block">退出登录</span>
@@ -274,12 +277,12 @@ export default {
     setShouldAnimation,
     test3() {
       console.log("防爆扩音");
-      // this.getTestList();
-      this.$store.dispatch("globalConfig/setSoundDialog", {
-        show: true,
-        dialogMsg: {},
-        type: "All",
-      });
+      this.getTestList();
+      // this.$store.dispatch("globalConfig/setSoundDialog", {
+      //   show: true,
+      //   dialogMsg: {},
+      //   type: "All",
+      // });
     },
     async getTestList() {
       try {

+ 98 - 39
src/views/components/dialog/AccessControlDialog.vue

@@ -33,8 +33,8 @@
             <div class="select_video">
               <div class="select_video_main">
                 <video-image-window
-                  :cameraData="cameraCarInfo1"
-                  :cameraId="cameraCarInfo1.id"
+                  :cameraData="cameraCarInfo1.camera"
+                  :cameraId="cameraCarInfo1.camera.id"
                 />
               </div>
             </div>
@@ -64,8 +64,8 @@
             <div class="select_video">
               <div class="select_video_main">
                 <video-image-window
-                  :cameraData="cameraCarInfo2"
-                  :cameraId="cameraCarInfo2.id"
+                  :cameraData="cameraCarInfo2.camera"
+                  :cameraId="cameraCarInfo2.camera.id"
                 />
               </div>
             </div>
@@ -95,8 +95,8 @@
             <div class="select_video">
               <div class="select_video_main">
                 <video-image-window
-                  :cameraData="cameraFaceInfo"
-                  :cameraId="cameraFaceInfo.id"
+                  :cameraData="cameraFaceInfo.camera"
+                  :cameraId="cameraFaceInfo.camera.id"
                 />
               </div>
             </div>
@@ -106,8 +106,8 @@
           <el-col :span="8">
             <div class="search-box">
               <div class="search-item">
-                <span class="search-label">场站:</span>
-                <el-select
+                <span class="search-label">出入设备列表</span>
+                <!-- <el-select
                   value-key="id"
                   v-model="department"
                   style="width: 110px"
@@ -122,7 +122,7 @@
                     :value="item"
                     :label="item.name"
                   ></el-option>
-                </el-select>
+                </el-select> -->
               </div>
               <!-- <el-cascader
                   v-model="query.departmentId"
@@ -155,7 +155,11 @@
           </el-col>
           <el-col :span="16">
             <div class="record_list">
-              <div class="record_title">出入门记录</div>
+              <div class="record_title">
+                <span>出入门记录</span>
+                <span class="more" @click="more">更多</span>
+              </div>
+
               <div class="record_info">
                 <base-table-list :tableConfig="recordTableConfig" />
               </div>
@@ -173,6 +177,8 @@ import VideoImageWindow from "@/views/components/dialog/VideoImageWindow.vue";
 import { dealAlarm } from "@/API/common";
 import { getDepartmentByPid } from "@/API/alarm";
 import { getAccessInfoList, getAccessLogList } from "@/API/accessControl";
+import { getCameraList } from "@/API/custom";
+import Dayjs from "dayjs";
 import { mapGetters } from "vuex";
 export default {
   name: "accessControlDialog",
@@ -195,7 +201,7 @@ export default {
     recordList: {
       handler(newValue, oldValue) {
         this.filterKey = "";
-        this.recrodTableConfig.tableData = newValue;
+        this.recordTableConfig.tableData = newValue;
       },
       deep: true,
     },
@@ -240,13 +246,14 @@ export default {
         needIndex: false,
         height: 130,
         header: [
-          { title: "设备名称", prop: "name", width: "80px" },
-          { title: "人员名称", prop: "personName", width: "100px" },
-          { title: "时间", prop: "eventTime", width: "" },
-          { title: "详细描述", prop: "content", width: "" },
+          { title: "设备名称", prop: "accessControlName", width: "30px" },
+          { title: "人员名称", prop: "personName", width: "30px" },
+          { title: "时间", prop: "eventTime", width: "30px" },
+          { title: "详细描述", prop: "content", width: "300px" },
         ],
         tableData: [],
       },
+      cameraList: [{ id: "1", name: "摄像头1" }],
       cameraFaceList: [{ id: "1", name: "摄像头1" }],
       cameraCarList: [{ id: "2", name: "摄像头2" }],
       cameraFaceInfo: { id: "1", name: "摄像头1" },
@@ -268,10 +275,14 @@ export default {
     ...mapGetters(["accessControlDialog"]),
   },
   mounted() {
+    this.getCameraList();
     this.initAccessControlList("");
     this.initAccessLogList();
     // this.getDepartmentByPid();
     this.departmentOptions = GY_STATIONS.filter((e) => e.id !== "");
+    setTimeout(() => {
+      this.filterInfo();
+    }, 500);
   },
   methods: {
     async initAccessControlList(buildId) {
@@ -283,25 +294,7 @@ export default {
         };
         const res = await getAccessInfoList(params);
         this.dataList = res.data.content;
-        console.log("门禁列表", this.dataList);
-        //人脸识别列表
-        this.cameraFaceList = this.dataList.filter((e) => e.faceRecognition);
-        //车辆识别列表
-        this.cameraCarList = this.dataList.filter((e) => !e.faceRecognition);
-        console.log("门禁摄像头列表", this.cameraFaceList, this.cameraCarList);
-        if (this.cameraFaceList && this.cameraCarList.length > 0) {
-          this.cameraFaceInfo = this.cameraFaceList[0];
-        }
-        if (this.cameraCarList && this.cameraCarList.length > 1) {
-          this.cameraCarInfo1 = this.cameraCarList[0];
-          this.cameraCarInfo2 = this.cameraCarList[1];
-        }
-        console.log(
-          "门禁摄像头",
-          this.cameraFaceInfo,
-          this.cameraCarInfo1,
-          this.cameraCarInfo2
-        );
+        // console.log("门禁列表", this.dataList);
       } catch (err) {
         console.log(err);
       }
@@ -311,6 +304,12 @@ export default {
         const params = {
           pageSize: 100,
           pageIndex: 1,
+          startTime: Dayjs(
+            Dayjs(new Date()).subtract(1, "day").format("YYYY-MM-DD HH:mm:ss")
+          ).format(),
+          endTime: Dayjs(
+            Dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss")
+          ).format(),
         };
         const res = await getAccessLogList(params);
         this.recordList = res.data.content;
@@ -319,6 +318,27 @@ export default {
         console.log(err);
       }
     },
+    async getCameraList() {
+      try {
+        const params = {
+          enable: true,
+        };
+        const res = await getCameraList(params);
+        this.cameraList = res.data.content;
+        // console.log("摄像头列表", this.cameraList);
+      } catch (err) {
+        console.log(err);
+      }
+    },
+    filterCamera(c) {
+      if (this.cameraList && this.cameraList.length > 0) {
+        var a = c;
+        a["camera"] = this.cameraList.filter((e) => e.id === c.cameraID)[0];
+        return a;
+      } else {
+        return null;
+      }
+    },
     closeDialog() {
       this.$store.dispatch("globalConfig/setAccessControlDialog", {
         show: false,
@@ -371,28 +391,62 @@ export default {
       this.filterInfo();
     },
     filterInfo() {
+      console.log("当前属站", this.department);
       if (this.department.positioningBuildId) {
-        this.initAccessControlList(this.department.positioningBuildId);
+        //人脸识别列表
+        this.cameraFaceList = this.dataList.filter(
+          (e) =>
+            e.faceRecognition &&
+            e.buildId === this.department.positioningBuildId
+        );
+        //车辆识别列表
+        this.cameraCarList = this.dataList.filter(
+          (e) =>
+            !e.faceRecognition &&
+            e.buildId === this.department.positioningBuildId
+        );
       } else {
-        this.initAccessControlList("");
+        //人脸识别列表
+        this.cameraFaceList = this.dataList.filter((e) => e.faceRecognition);
+        //车辆识别列表
+        this.cameraCarList = this.dataList.filter((e) => !e.faceRecognition);
       }
+      // console.log("分类门禁列表", this.cameraFaceList, this.cameraCarList);
+      if (this.cameraFaceList && this.cameraFaceList.length > 0) {
+        this.cameraFaceInfo = this.filterCamera(this.cameraFaceList[0]);
+      }
+      if (this.cameraCarList && this.cameraCarList.length > 1) {
+        this.cameraCarInfo1 = this.filterCamera(this.cameraCarList[0]);
+        this.cameraCarInfo2 = this.filterCamera(this.cameraCarList[1]);
+      }
+      console.log(
+        "门禁摄像头",
+        this.cameraFaceInfo,
+        this.cameraCarInfo1,
+        this.cameraCarInfo2
+      );
     },
     exchangeVideo(type, e) {
+      // console.log(this.cameraList, "切换摄像头", e);
       switch (type) {
         case 1:
-          // this.cameraCarInfo1 = this.cameraCarList.filter((c) => c.id === e);
+          this.cameraCarInfo1 = this.filterCamera(e);
           break;
         case 2:
-          // this.cameraCarInfo2 = this.cameraCarList.filter((c) => c.id === e);
+          this.cameraCarInfo2 = this.filterCamera(e);
           break;
         case 3:
-          // this.cameraFaceInfo = this.cameraFaceList.filter((c) => c.id === e);
+          this.cameraFaceInfo = this.filterCamera(e);
           break;
 
         default:
           break;
       }
     },
+    more(){
+      this.$router.push({path:'/Page1?path=accessControl%2FaccessControl%2Flog'});
+      this.closeDialog();
+    },
     openAll() {},
     closeAll() {},
     openBroadcast() {},
@@ -515,6 +569,11 @@ export default {
     color: #fff;
     .record_title {
       padding: 6px;
+      .more{
+        font-size: 0.073333rem /* 16/192 */;
+        color: #bdbfc9;
+        padding-left: 6px;
+      }
     }
     .record_info {
     }

+ 1065 - 0
src/views/components/dialog/SoundDialog/Fbky.vue

@@ -0,0 +1,1065 @@
+<template>
+  <div class="fbky-container">
+    <div class="websocket">
+      <div class="websocket_left">
+        <div class="set_case">
+          <div class="set_split call_left set_call">
+            <div class="set_box">
+              <div class="set_item">
+                <div class="set_group">
+                  <span class="set_name">呼出号码:</span>
+                  <input
+                    type="text"
+                    class="set_ipt ipt_number"
+                    id="destinationNumber"
+                    :v-model="ringNumber"
+                  />
+                </div>
+                <div class="set_group">
+                  <button class="btn cyan_btn" @click="dial(0)">
+                    语音呼出
+                  </button>
+                </div>
+              </div>
+            </div>
+          </div>
+          <div class="set_split call_right">
+            <div class="set_box come_box">
+              <div class="set_item">
+                <div class="set_group">
+                  <span class="set_name">当前来电:</span>
+                  <span id="call_in_now" callID=""></span>
+                </div>
+                <div class="set_group group_right">
+                  <button class="btn blue_btn margin" @click="callInAnswer(1)">
+                    视频接听
+                  </button>
+                  <button class="btn cyan_btn margin" @click="callInAnswer(0)">
+                    语音接听
+                  </button>
+                  <button class="btn white_btn" @click="callInHangup()">
+                    挂断
+                  </button>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+        <div class="set_case">
+          <div class="set_split his_left">
+            <div class="set_box">
+              <div class="set_item call_box">
+                <span class="set_name" style="color: red"
+                  >执行操作前,请选择正在通话列表(支持同时多路通话):</span
+                >
+                <div class="call_case">
+                  <ul id="call_list"></ul>
+                </div>
+              </div>
+            </div>
+          </div>
+          <div class="set_split his_right">
+            <div class="set_box">
+              <div class="set_item set_first">
+                <span class="set_name">call ID:</span>
+                <input
+                  type="text"
+                  class="set_ipt ipt_call"
+                  id="callID"
+                  readonly
+                />
+                <button class="btn blue_btn" @click="callHoldUnhold()">
+                  保持/取消保持指定通话
+                </button>
+              </div>
+              <div class="set_item">
+                <span
+                  id="mute_off_status"
+                  class="set_status off_status margin"
+                  hidden=""
+                  >己关闭</span
+                >
+                <span
+                  id="mute_on_status"
+                  class="set_status on_status margin"
+                  hidden=""
+                  >未关闭</span
+                >
+                <button class="btn blue_btn" @click="callMuteUnmute()">
+                  关闭/打开指定通话本地声音
+                </button>
+              </div>
+              <div class="set_item">
+                <span
+                  id="mute_video_off_status"
+                  class="set_status off_status margin"
+                  hidden=""
+                  >已关闭</span
+                >
+                <span
+                  id="mute_video_on_status"
+                  class="set_status on_status margin"
+                  hidden=""
+                  >未关闭</span
+                >
+                <button class="btn blue_btn" @click="callMuteUnmuteVideo()">
+                  关闭/打开指定通话本地视频
+                </button>
+              </div>
+              <div class="set_item">
+                <button class="btn blue_btn margin" @click="callHangup()">
+                  挂断指定通话
+                </button>
+              </div>
+            </div>
+          </div>
+        </div>
+        <div class="video_box">
+          <div class="video_left">
+            <div class="video_item video_item1">
+              <span class="video_name">local_video</span>
+              <video
+                class="video_tag"
+                id="local_video"
+                width="10%"
+                height="10%"
+                autoplay="true"
+              ></video>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="websocket_right">
+        <div class="set_box set_zhuce">
+          <div class="set_item">
+            <span class="set_name">登录状态:</span>
+            <span id="off_status" class="set_status off_status">未登录</span>
+            <span id="on_status" class="set_status on_status" hidden=""
+              >已登录</span
+            >
+          </div>
+          <div class="set_item">
+            <span class="set_name"><i class="must">*</i>Websocket URL:</span>
+            <input
+              type="text"
+              class="set_ipt"
+              v-model="socketUrl"
+              placeholder="wss://192.168.10.39:1443/webrtc"
+            />
+          </div>
+          <div class="set_item">
+            <span class="set_name" style="flex: none"></span>
+            <span style="color: red"
+              >配置wss后,如果连接失败,请先查看是不是https证书问题
+              可以通话访问对应的https页面,手动允许浏览器安全提示</span
+            >
+          </div>
+          <div class="set_item">
+            <span class="set_name">麦克风:</span>
+            <select class="set_slt" id="audioInputDev">
+              <option value="">请选择</option>
+            </select>
+          </div>
+          <div class="set_item">
+            <span class="set_name">摄像头:</span>
+            <select class="set_slt" id="videoInputDev">
+              <option value="">请选择</option>
+            </select>
+          </div>
+          <div class="set_item">
+            <span class="set_name">扬声器:</span>
+            <select class="set_slt" id="audioOutputDev">
+              <option value="">请选择</option>
+            </select>
+          </div>
+          <div class="set_item">
+            <span class="set_name"><i class="must">*</i>用户名:</span>
+            <input
+              type="text"
+              class="set_ipt"
+              v-model="login"
+              placeholder="8889"
+            />
+          </div>
+          <div class="set_item">
+            <span class="set_name"><i class="must">*</i>密码:</span>
+            <input
+              type="text"
+              class="set_ipt"
+              v-model="password"
+              placeholder="123456"
+            />
+          </div>
+          <div class="set_item">
+            <span class="set_name" style="flex: none"></span>
+            <span style="color: red"
+              >支持断线重连,通话中关闭网页,在重新登录后会恢复正在进行的通话</span
+            >
+          </div>
+          <div class="set_item">
+            <span class="set_name">自动登录:</span>
+            <label class="check_box">
+              <input v-model="autoReg" type="checkbox" class="check" />
+              <span>是</span>
+            </label>
+          </div>
+          <div class="set_item">
+            <span class="set_name">自动接听:</span>
+            <label class="check_box">
+              <input v-model="autoAnswer" type="checkbox" class="check" />
+              <span>是</span>
+            </label>
+          </div>
+          <div class="set_item">
+            <span class="set_name" style="flex: none"></span>
+            <span style="color: red"
+              >注意:每个通话都需要在页面中有一个独立的video标签做为载体,
+              不管是纯音频通话还是音视频通话,
+              多个通话同时使用一个video标签时,后者会覆盖前者通话的视频和音频,
+              测试多路通话时,请每次切换不同的video标签</span
+            >
+          </div>
+          <div class="set_item">
+            <span class="set_name">下次通话视频位置:</span>
+            <select class="set_slt" id="peerTag">
+              <option value="video1">video1</option>
+              <option value="video2">video2</option>
+              <option value="video3">video3</option>
+              <option value="video4">video4</option>
+              <option value="video5">video5</option>
+              <option value="video6">video6</option>
+              <option value="video7">video7</option>
+              <option value="video8">video8</option>
+            </select>
+          </div>
+          <div class="set_item">
+            <button class="btn blue_btn margin" @click="initPerimeter()">
+              载入登录
+            </button>
+            <button class="btn cyan_btn margin" @click="webRtcLogin()">
+              登录
+            </button>
+            <button class="btn white_btn margin" @click="webRtcLogout()">
+              登出
+            </button>
+            <button class="btn cyan_btn" @click="callHangupAll()">
+              挂断所有
+            </button>
+          </div>
+        </div>
+        <div class="set_box set_equipment">
+          <div class="set_item">
+            <span class="set_name">本机IP:</span>
+            <input type="text" class="set_ipt" id="localIp" v-model="localIp" />
+          </div>
+        </div>
+        <!-- <div class="set_box">
+          <div class="set_item set_his">
+            <span class="set_name">呼叫历史记录(本地缓存):</span>
+            <div class="his_case">
+              <ul id="his_list"></ul>
+            </div>
+          </div>
+        </div> -->
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { rtcHelper } from "@/plugins/tr-webrtc.min.js";
+import Dayjs from "dayjs";
+export default {
+  name: "Fbky",
+  props: {
+    curFbkyData: {
+      //分机登录参数
+      type: Object,
+      require: true,
+      default: () => ({}),
+    },
+    ringNumber: {
+      //号码参数
+      type: String,
+      require: true,
+      default: "809",
+    },
+    callDisable: {
+      //呼出或挂断控制
+      type: Boolean,
+      require: true,
+      default: false,
+    },
+  },
+  data() {
+    return {
+      login: "8889", //分机号
+      password: "123456", //分机密码
+      socketUrl: "wss://192.168.10.39:1443/webrtc", //webSocketURL
+      localIp: "11.100.46.228",
+      autoReg: false,
+      autoAnswer: false,
+      mic: "", //麦克风选择
+      cam: "", //摄像头选择
+      speak: "", //扬声器选择
+      call_in_now_d: null,
+      callback: {
+        onRinging: function (d) {
+          // 来电
+          this.onRinging(d);
+        },
+        onCalling: function (d) {
+          // 外呼
+          this.onCalling(d);
+        },
+        onAnswer: function (d) {
+          // 通话中
+          this.onAnswer(d);
+        },
+        onHangup: function (d) {
+          // 挂机
+          this.onHangup(d);
+        },
+        onLogin: function () {
+          //登录回调
+          console.log("登录状态在线回调");
+          document
+            .getElementById("off_status")
+            .setAttribute("hidden", "hidden");
+          document.getElementById("on_status").removeAttribute("hidden");
+        },
+        onLogout: function () {
+          //登出回调
+          console.log("登出状态离线回调");
+          document.getElementById("on_status").setAttribute("hidden", "hidden");
+          document.getElementById("off_status").removeAttribute("hidden");
+        },
+      },
+    };
+  },
+  watch: {
+    curFbkyData: {
+      handler(newValue) {
+        this.callHangupAll();
+        console.log("数据更新:", newValue);
+        if (newValue.url) {
+          this.login = newValue.admin;
+          this.password = newValue.password;
+          this.socketUrl = newValue.url;
+          this.localIp = newValue.localIp;
+        }
+        setTimeout(() => {
+          this.initPerimeter();
+        }, 1500);
+      },
+      deep: true,
+    },
+    ringNumber: {
+      handler(newValue) {
+        this.callHangupAll();
+        if (this.callDisable) {
+          this.dial(0);
+        }
+        console.log("拨打号码:", newValue);
+      },
+      deep: true,
+    },
+    callDisable: {
+      handler(newValue) {
+        if (newValue) {
+          this.dial(0);
+          console.log("拨号", this.ringNumber);
+        } else {
+          this.callHangupAll();
+          console.log("挂断");
+        }
+      },
+      deep: true,
+    },
+  },
+  created() {
+    this.initMediaDevices();
+    setTimeout(() => {
+      this.initPerimeter();
+    }, 500);
+  },
+  destroyed() {
+    this.callHangupAll();
+    setTimeout(() => {
+      this.webRtcLogout();
+    }, 500);
+  },
+  mounted() {},
+  methods: {
+    getVideoDiv() {
+      return document.getElementById("peerTag").value;
+    },
+    getValue(id) {
+      return document.getElementById(id).value;
+    },
+    setValue(id, value) {
+      document.getElementById(id).value = value;
+    },
+    //载入参数登录
+    initPerimeter() {
+      if (!this.login || !this.password || !this.socketUrl) {
+        alert("请填写必填参数");
+        return;
+      }
+      // 缓存配置
+      localStorage.verto_login = this.login; //分机账号
+      localStorage.verto_password = this.password; //分机密码
+      localStorage.verto_socketUrl = this.socketUrl; //webSocketURL
+      localStorage.verto_localIp = this.localIp;
+      localStorage.verto_autoReg = this.autoReg; //自动登录开关
+      localStorage.verto_autoAnswer = this.autoAnswer; //自动接听开关
+      rtcHelper.bootstrap(
+        this.login,
+        this.password,
+        this.socketUrl,
+        this.localIp,
+        this.getVideoDiv(),
+        "local_video",
+        this.callback,
+        this.mic,
+        this.speak,
+        this.cam
+      );
+      // console.log(
+      //   "配置载入参数",
+      //   this.login,
+      //   this.password,
+      //   this.socketUrl,
+      //   this.localIp,
+      //   this.getVideoDiv(),
+      //   "local_video",
+      //   this.callback,
+      //   this.mic,
+      //   this.speak,
+      //   this.cam
+      // );
+    },
+    //获取音视频设备
+    initMediaDevices() {
+      rtcHelper.getMediaDevices().then((result) => {
+        try {
+          let microphone = result.audioInputDevices; //麦克风
+          let camera = result.videoDevices; //摄像头+
+          let loudspeaker = result.audioOutputDevices; //扬声器
+          let microphoneStr = "";
+          let cameraStr = "";
+          let loudspeakerStr = "";
+          for (let i = 0; i < microphone.length; i++) {
+            microphoneStr +=
+              '<option value="' +
+              microphone[i].deviceId +
+              '">' +
+              microphone[i].label +
+              "</option>";
+          }
+          document.getElementById("audioInputDev").innerHTML = microphoneStr;
+          for (let i = 0; i < camera.length; i++) {
+            cameraStr +=
+              '<option value="' +
+              microphone[i].deviceId +
+              '">' +
+              camera[i].label +
+              "</option>";
+          }
+          document.getElementById("videoInputDev").innerHTML = cameraStr;
+          for (let i = 0; i < loudspeaker.length; i++) {
+            loudspeakerStr +=
+              '<option value="' +
+              microphone[i].deviceId +
+              '">' +
+              loudspeaker[i].label +
+              "</option>";
+          }
+          document.getElementById("audioOutputDev").innerHTML = loudspeakerStr;
+          if (microphone.length > 0) {
+            this.mic = microphone[0].deviceId;
+          }
+          if (camera.length > 0) {
+            this.cam = camera[0].deviceId;
+          }
+          if (loudspeaker.length > 0) {
+            this.speak = loudspeaker[0].deviceId;
+          }
+          console.log("音视频设备:", result, this.mic, this.cam, this.speak);
+        } catch (e) {
+          console.error(e);
+        }
+        // 自动登录
+        // if (
+        //   localStorage.verto_autoReg == "true" &&
+        //   localStorage.verto_login &&
+        //   localStorage.verto_password &&
+        //   localStorage.verto_socketUrl
+        // ) {
+        //   this.initPerimeter();
+        // }
+      });
+    },
+    //登录
+    webRtcLogin() {
+      try {
+        rtcHelper.rtcLogin();
+      } catch (e) {
+        console.error(e);
+      }
+    },
+    //登出
+    webRtcLogout() {
+      try {
+        rtcHelper.rtcLogout();
+      } catch (e) {
+        console.error(e);
+      }
+    },
+    // 拨号外呼
+    dial(type) {
+      console.log("拨号号码:", this.ringNumber);
+      let destinationNumber = this.ringNumber;
+      if (!destinationNumber) {
+        alert("没有输入被叫号码");
+        return;
+      }
+      if (type === 1) {
+        // 视频呼出
+        rtcHelper.rtcDial(destinationNumber, true);
+      } else {
+        // 语音呼出
+        rtcHelper.rtcDial(destinationNumber, false);
+      }
+    },
+    //历史记录
+    logRecords(callee, type) {
+      let log = "";
+      switch (type) {
+        case "ringing":
+          log = new Date().Format("yyyy-MM-dd HH:mm:ss") + " 呼入 " + callee;
+          break;
+        case "calling":
+          log = new Date().Format("yyyy-MM-dd HH:mm:ss") + " 呼出 " + callee;
+          break;
+        default:
+          break;
+      }
+      if (localStorage.verto_his_list) {
+        localStorage.verto_his_list += "," + log;
+      } else {
+        localStorage.verto_his_list = log;
+      }
+    },
+    // =================== 通话事件 start ====================
+    onRinging(d) {
+      let callee = d.cidString();
+      console.log("===========来电信息===========" + callee);
+      console.log("通话呼入事件", d);
+      // 判断是否自动接听
+      if (localStorage.verto_autoAnswer) {
+        console.log("自动接听");
+        if (d.params.wantVideo) {
+          // 选择是否有视频
+          let videoFlag = true;
+          rtcHelper.rtcAnswer(d, videoFlag);
+        } else {
+          rtcHelper.rtcAnswer(d, false);
+        }
+      } else {
+        document.getElementById("call_in_now").innerHTML = callee;
+        document.getElementById("call_in_now").setAttribute("callID", d.callID);
+        this.call_in_now_d = d;
+      }
+      document.getElementById("call_list").innerHTML +=
+        "<li callID='" +
+        d.callID +
+        "' @click='checkCalling(this)'>" +
+        callee +
+        " 呼入</li>";
+      // 缓存历史呼入记录
+      this.logRecords(callee, "ringing");
+    },
+    onCalling(d) {
+      let callee = d.cidString();
+      console.log("通话呼出事件", d);
+      // 呼出通话启动
+      document.getElementById("call_list").innerHTML +=
+        "<li callID='" +
+        d.callID +
+        "' @click='checkCalling(this)'>" +
+        callee +
+        " 呼出</li>";
+      // 缓存历史呼出记录
+      this.logRecords(callee, "calling");
+    },
+    onAnswer(d) {
+      // 通话中处理
+      console.log("通话中事件", d);
+    },
+    onHangup(d) {
+      // 挂机处理 -  接通列表处理
+      // console.log("通话挂机事件", d);
+      
+      
+    },
+    // =================== 通话事件 end ====================
+
+    // =================== 呼入处理 start ====================
+    // 呼入接听
+    callInAnswer(type) {
+      if (!this.call_in_now_d) {
+        alert("当前无通话呼入");
+        return;
+      }
+      if (type === 1) {
+        if (this.call_in_now_d.params.wantVideo) {
+          // 选择是否有视频
+          let videoFlag = true;
+          rtcHelper.rtcAnswer(this.call_in_now_d, videoFlag);
+        } else {
+          rtcHelper.rtcAnswer(this.call_in_now_d, false);
+        }
+      } else {
+        rtcHelper.rtcAnswer(this.call_in_now_d, false);
+      }
+      console.log("通话呼入");
+      document.getElementById("call_in_now").innerHTML = "";
+      this.call_in_now_d = null;
+    },
+
+    // 呼入挂断
+    callInHangup() {
+      if (!this.call_in_now_d) {
+        alert("当前无通话呼入");
+        return;
+      }
+      rtcHelper.rtcHangup(this.call_in_now_d.callID);
+      document.getElementById("call_in_now").innerHTML = "";
+      console.log("通话挂断");
+      this.call_in_now_d = null;
+    },
+
+    // =================== 呼入处理 end ====================
+
+    // =================== 通话功能 start ==================
+    checkCalling(e) {
+      let callID = e.getAttribute("callID");
+      console.log("设置", callID);
+      this.setValue("callID", callID);
+      this.getMuteState(callID);
+      this.getMuteVideoState(callID);
+    },
+
+    getMuteState(callID) {
+      if (rtcHelper.rtcGetMuteState(callID)) {
+        // 没有静音
+        console.log("非静音,本地声音状态打开");
+        document
+          .getElementById("mute_off_status")
+          .setAttribute("hidden", "hidden");
+        document.getElementById("mute_on_status").removeAttribute("hidden");
+      } else {
+        console.log("静音,本地声音状态关闭");
+        document.getElementById("mute_off_status").removeAttribute("hidden");
+        document
+          .getElementById("mute_on_status")
+          .setAttribute("hidden", "hidden");
+      }
+    },
+
+    getMuteVideoState(callID) {
+      if (rtcHelper.rtcGetMuteVideoState(callID)) {
+        // 没有静音
+        console.log("非静音,本地视频状态打开");
+        document
+          .getElementById("mute_video_off_status")
+          .setAttribute("hidden", "hidden");
+        document
+          .getElementById("mute_video_on_status")
+          .removeAttribute("hidden");
+      } else {
+        console.log("静音,本地视频状态关闭");
+        document
+          .getElementById("mute_video_off_status")
+          .removeAttribute("hidden");
+        document
+          .getElementById("mute_video_on_status")
+          .setAttribute("hidden", "hidden");
+      }
+    },
+
+    //保持或取消指定通话
+    callHoldUnhold(callID) {
+      if (callID) {
+        rtcHelper.rtcHoldUnhold(callID);
+      } else {
+        alert("未选择callID");
+      }
+    },
+    //关闭或打开通话本地声音
+    callMuteUnmute(callID) {
+      if (callID) {
+        rtcHelper.rtcMuteUnmute(callID);
+        this.getMuteState(callID);
+      } else {
+        alert("未选择callID");
+      }
+    },
+    //关闭或打开本地视频
+    callMuteUnmuteVideo(callID) {
+      if (callID) {
+        rtcHelper.rtcMuteUnmuteVideo(callID);
+        this.getMuteVideoState(callID);
+      } else {
+        alert("未选择callID");
+      }
+    },
+    //挂断指定callID通话
+    callHangup(callID) {
+      if (callID) {
+        rtcHelper.rtcHangup(callID);
+        alert("callID", callID);
+      } else {
+        alert("未选择callID");
+      }
+    },
+    //挂断所有通话
+    callHangupAll() {
+      rtcHelper.rtcHangupAll();
+    },
+    //向指定通话发送DTMF
+    callDtmf(callID, dtmfKey) {
+      if (callID) {
+        rtcHelper.rtcDtmf(callID, dtmfKey);
+      } else {
+        alert("未选择callID");
+      }
+    },
+    // =================== 通话功能 end ==================
+  },
+};
+</script>
+<style lang="less" scoped>
+.fbky-container {
+  width: 100%;
+  .websocket {
+    width: 100%;
+    height: 60%;
+    display: flex;
+    padding: 20px;
+    background-color: #f1f4f7;
+    .websocket_left {
+      width: 70%;
+      padding-right: 20px;
+      .set_case {
+        display: flex;
+        .set_call .set_name {
+          width: 80px;
+        }
+        .set_item {
+          margin-bottom: 15px;
+          display: flex;
+          align-items: center;
+        }
+        .call_left {
+          width: 50%;
+          display: flex;
+          padding-right: 20px;
+        }
+        .call_right {
+          width: 50%;
+          display: flex;
+        }
+      }
+      .video_box {
+        height: 200px;
+        display: flex;
+        .video_left,
+        .video_right {
+          width: 50%;
+        }
+        .video_left {
+          display: flex;
+          flex-direction: column;
+        }
+        .video_right {
+          display: flex;
+          flex-wrap: wrap;
+        }
+      }
+    }
+    .websocket_right {
+      width: 30%;
+      .set_box {
+        width: 100%;
+        background-color: #fff;
+        padding: 20px;
+        margin-bottom: 20px;
+      }
+    }
+  }
+}
+
+.set_box {
+  width: 100%;
+  background-color: #fff;
+  padding: 20px;
+  margin-bottom: 20px;
+}
+
+.set_item:last-child {
+  margin-bottom: 0;
+}
+.group_case {
+  justify-content: space-between;
+}
+
+.set_group {
+  display: flex;
+  align-items: center;
+}
+
+.set_slt,
+.set_ipt {
+  flex: auto;
+  height: 30px;
+  line-height: 30px;
+  border: 1px solid #d1d1d1;
+  outline: none;
+  border-radius: 3px;
+  padding-left: 10px;
+  background-color: #fff !important;
+}
+
+.btn {
+  padding: 6px 12px;
+  border-radius: 3px;
+  cursor: pointer;
+  outline: none !important;
+  font-size: 12px !important;
+}
+
+.btn:hover {
+  opacity: 0.8;
+}
+
+.blue_btn {
+  background-color: #1890ff;
+  border: 1px solid #1890ff;
+  color: #fff !important;
+}
+
+.cyan_btn {
+  background-color: #00bcd4;
+  border: 1px solid #00bcd4;
+  color: #fff !important;
+}
+
+.white_btn {
+  background-color: #fafafa;
+  border: 1px solid #d1d1d1;
+}
+
+.video_box {
+  display: flex;
+}
+
+.video_left,
+.video_right {
+  width: 50%;
+}
+
+.video_left {
+  display: flex;
+  flex-direction: column;
+}
+
+.video_right {
+  display: flex;
+  flex-wrap: wrap;
+}
+
+.video_item {
+  position: relative;
+  background-color: #fff;
+  border: 1px solid #d1d1d1;
+}
+
+.video_item1 {
+  width: 100%;
+  flex: auto;
+}
+
+.video_item2 {
+  width: 100%;
+}
+
+.video_item3 {
+  width: 50%;
+}
+
+.video_name {
+  position: absolute;
+  top: 5px;
+  left: 5px;
+}
+
+.video_tag {
+  width: 100%;
+  height: 100%;
+}
+
+.set_case {
+  display: flex;
+}
+
+.set_status {
+  color: #fff;
+  border-radius: 10px;
+  padding: 4px 10px;
+}
+
+.off_status {
+  background-color: #bbb;
+}
+
+.on_status {
+  background-color: #3fd672;
+}
+
+.must {
+  color: red;
+  font-size: 17px;
+  position: absolute;
+  left: -10px;
+  top: 0px;
+}
+
+.set_name {
+  position: relative;
+}
+
+.set_zhuce .set_name {
+  width: 140px;
+}
+
+.set_equipment .set_name {
+  width: 90px;
+}
+
+.margin {
+  margin-right: 20px;
+}
+
+.his_left {
+  width: 30%;
+  display: flex;
+}
+
+.his_right {
+  width: 70%;
+  display: flex;
+}
+
+.ipt_number {
+  flex: none;
+  width: 50%;
+}
+
+.call_box {
+  display: flex;
+  flex-direction: column;
+  align-items: flex-start;
+  height: 100%;
+}
+
+.call_box .set_name {
+  margin-bottom: 12px;
+}
+
+.call_case {
+  display: flex;
+  height: 135px;
+  overflow: hidden auto;
+  border: 1px solid #d1d1d1;
+  width: 100%;
+}
+
+.his_case {
+  display: flex;
+  height: 182px;
+  overflow: hidden auto;
+  border: 1px solid #d1d1d1;
+  width: 100%;
+}
+
+#call_list {
+  flex: auto;
+}
+
+#call_list > li,
+#his_list > li {
+  height: 30px;
+  line-height: 30px;
+  padding: 0 20px;
+  cursor: pointer;
+}
+
+#call_list > li:hover,
+#his_list > li:hover {
+  background-color: #eee;
+}
+
+.set_his {
+  flex-direction: column;
+  align-items: flex-start;
+}
+
+.set_his .set_name {
+  margin-bottom: 15px;
+}
+
+#his_list {
+  width: 100%;
+}
+
+.set_speed {
+  flex-direction: column;
+  align-items: flex-start;
+}
+
+#speed {
+  margin-top: 20px;
+}
+
+.ipt_call {
+  flex: none;
+  width: 30%;
+  margin-right: 15px;
+}
+
+.check_box {
+  cursor: pointer;
+  width: 20%;
+}
+
+.check {
+  position: relative;
+  top: 2px;
+}
+
+.come_box {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+}
+
+.set_first {
+  margin-top: 30px;
+}
+
+.group_right {
+  margin-left: 20px;
+}
+</style>

+ 133 - 61
src/views/components/dialog/SoundDialog.vue → src/views/components/dialog/SoundDialog/index.vue

@@ -7,21 +7,35 @@
     <div class="dialog_box">
       <!-- 内容 -->
       <div class="detail-table-box">
+        <!-- v-show="false" -->
+        <el-row v-show="false">
+          <fbky
+            :curFbkyData="webSocketParams"
+            :ringNumber="ringNumber"
+            :callDisable="callDisable"
+          />
+        </el-row>
         <el-row>
           <el-col :span="13">
             <div class="search-box">
               <div class="search-item">
                 <span class="search-label">场站:</span>
-                <el-cascader
-                  v-model="query.departmentId"
-                  :options="departmentOptions"
-                  :props="{ checkStrictly: true }"
-                  clearable
+                <el-select
+                  value-key="id"
+                  v-model="department"
+                  style="width: 110px"
                   size="mini"
+                  clearable
                   placeholder="请选择场站"
-                  style="width: 160px"
-                  @change="searchData()"
-                />
+                  @change="searchData($event)"
+                >
+                  <el-option
+                    v-for="item in departmentOptions"
+                    :key="item.id"
+                    :value="item"
+                    :label="item.name"
+                  ></el-option>
+                </el-select>
               </div>
               <div class="search-btn2" @click="openAll">
                 <el-button size="mini" type="success">全部打开</el-button>
@@ -29,17 +43,21 @@
               <div class="search-btn2" @click="closeAll">
                 <el-button size="mini" type="warning">全部关闭</el-button>
               </div>
-              <div class="search-btn2" @click="openBroadcast">
+              <!-- <div class="search-btn2" @click="openBroadcast">
                 <el-button size="mini" type="success">广播</el-button>
               </div>
               <div class="search-btn2" @click="closeBroadcast">
                 <el-button size="mini" type="danger">停止广播</el-button>
-              </div>
+              </div> -->
             </div>
           </el-col>
           <el-col :span="11">
             <div class="select">
-              <div class="select_title">已打开防爆扩音</div>
+              <div class="select_title">
+                已打开防爆扩音:<span style="margin-left: 10px">{{
+                  this.openningTile ? this.openningTile : "暂无"
+                }}</span>
+              </div>
             </div>
           </el-col>
         </el-row>
@@ -51,7 +69,7 @@
             />
           </el-col>
           <el-col class="fbky" :span="11">
-            <div class="select_list">
+            <!-- <div class="select_list">
               <el-tag
                 class="select-tag"
                 v-for="item in openningList"
@@ -63,17 +81,19 @@
               >
                 {{ item.label }}
               </el-tag>
-            </div>
+            </div> -->
             <div class="select">
               <div class="select_title">
-                防爆扩音现场监视
-                <el-select
+                防爆扩音现场监视:<span>{{
+                  this.cameraInfo.name ? this.cameraInfo.name : "暂无"
+                }}</span>
+                <!-- <el-select
                   v-model="cameraInfo"
                   style="width: 160px"
                   size="mini"
                   clearable
                   placeholder="请选择摄像头"
-                  @change="exchangeVideo()"
+                  @change="exchangeVideo($event)"
                 >
                   <el-option
                     v-for="item in cameraList"
@@ -81,10 +101,11 @@
                     :value="item"
                     :label="item.name"
                   ></el-option>
-                </el-select>
+                </el-select> -->
               </div>
             </div>
             <div class="select_video">
+              <!-- 通话视频标签 -->
               <div class="select_video_main">
                 <video-image-window
                   :cameraData="cameraInfo"
@@ -102,13 +123,15 @@
 import BaseTableList from "@/views/components/base/BaseTableList";
 import BaseDragBgDialog from "@/views/components/base/BaseDragBgDialog.vue";
 import VideoImageWindow from "@/views/components/dialog/VideoImageWindow.vue";
+import Fbky from "./Fbky.vue";
 import { dealAlarm } from "@/API/common";
 import { getDepartmentByPid } from "@/API/alarm";
 import { getElementList } from "@/API/visual";
+import { getCameraList } from "@/API/custom";
 import { mapGetters } from "vuex";
 export default {
   name: "soundDialog",
-  components: { BaseDragBgDialog, BaseTableList, VideoImageWindow },
+  components: { BaseDragBgDialog, BaseTableList, VideoImageWindow, Fbky },
   watch: {
     "soundDialog.show": {
       handler(newVal) {
@@ -120,7 +143,14 @@ export default {
     dataList: {
       handler(newValue, oldValue) {
         this.filterKey = "";
-        this.tableConfig.tableData = newValue;
+        this.filterInfo();
+      },
+      deep: true,
+    },
+    "department.id": {
+      handler(newValue, oldValue) {
+        this.filterKey = "";
+        this.filterInfo();
       },
       deep: true,
     },
@@ -134,12 +164,21 @@ export default {
           name: "",
         },
       ],
+      webSocketParams: {
+        admin: "8889",
+        password: "123456",
+        url: "wss://192.168.10.39:1443/webrtc",
+        localIp: "",
+      },
+      ringNumber: "809",
+      callDisable: false,
+      openningTile: "暂无",
       baseDialogConfig: {
         dialogId: "soundDialog",
         show: false,
         title: "防爆扩音",
-        width: 1250,
-        height: 640,
+        width: 1300,
+        height: 600,
         center: true,
         zIndex: 10,
       },
@@ -148,13 +187,14 @@ export default {
         height: 456,
         header: [
           { title: "名称", prop: "name", width: "" },
-          { title: "描述", prop: "desc", width: "" },
+          { title: "拨号", prop: "number", width: "" },
+          { title: "描述", prop: "description", width: "" },
           {
             title: "操作",
             prop: "operation",
-            width: "",
+            width: "200px",
             btns: [
-              { btnName: "打开", btnType: "open" },
+              { btnName: "呼叫", btnType: "open" },
               { btnName: "关闭", btnType: "close" },
             ],
           },
@@ -162,42 +202,45 @@ export default {
         tableData: [],
         rowClick: this.location,
       },
-      openningList: [
-        { type: "", label: "设备一" },
-        { type: "", label: "设备二" },
-        { type: "", label: "设备三" },
-        { type: "", label: "设备四" },
-        { type: "", label: "设备五" },
-        { type: "", label: "设备六" },
-        { type: "", label: "设备七" },
-        { type: "", label: "设备八" },
-        { type: "", label: "设备九" },
-        { type: "", label: "设备十" },
-      ],
+      openningList: [{ type: "", label: "设备一" }],
       cameraList: [{ id: "1", name: "摄像头1" }],
       cameraInfo: {
         id: "1",
       },
       departmentOptions: [],
-      query: {
-        departmentId: "",
+      department: {
+        id: "657316479015854080",
       },
     };
   },
   created() {
     this.initSoundList();
-    this.getDepartmentByPid();
+    this.getCameraList();
+    // this.getDepartmentByPid();
+    this.departmentOptions = GY_STATIONS.filter((e) => e.id !== "");
   },
   computed: {
     ...mapGetters(["soundDialog"]),
   },
   mounted() {},
   methods: {
+    async getCameraList() {
+      try {
+        const params = {
+          enable: true,
+        };
+        const res = await getCameraList(params);
+        this.cameraList = res.data.content;
+        // console.log("摄像头列表", this.cameraList);
+      } catch (err) {
+        console.log(err);
+      }
+    },
     async initSoundList() {
       try {
         const res = await getElementList({ id: "784748250065281024" });
-        this.dataList = res.data.content;
-        console.log("防爆扩音列表", this.dataList);
+        this.dataList = FBKYLIST;
+        // console.log("防爆扩音列表", res, this.dataList);
         // content.forEach((d) => {
         //   d.GPSPoints = this.transPosition(d.pointList);
         // });
@@ -228,23 +271,18 @@ export default {
     handleTableClick(data, btnType) {
       if (btnType === "open") {
         console.log("打开扩音", data);
+        this.openningTile = data.name;
+        this.ringNumber = data.number;
+        this.exchangeVideo(data.cameraID);
+        setTimeout(() => {
+          this.callDisable = true;
+        }, 200);
       }
       if (btnType === "close") {
         console.log("关闭扩音", data);
+        this.openningTile = "暂无";
+        this.callDisable = false;
       }
-      // const tableData = this.$parent.$parent.alarmLiveData.filter((item) => {
-      //   return item.Category == "100001" && item.ObjectID == data.id;
-      // });
-      // this.$store.dispatch("dialog/openLayerDetailDialog", {
-      //   id: data.id,
-      //   type: "rail",
-      //   name: "围栏",
-      //   detail: {
-      //     id: data.id,
-      //     name: data.name,
-      //     tableData,
-      //   },
-      // });
     },
     async getDepartmentByPid() {
       try {
@@ -266,14 +304,47 @@ export default {
         console.log(err);
       }
     },
-    searchData() {
-      this.pageConfig.pageNo = 1;
+    searchData(e) {
+      // this.pageConfig.pageNo = 1;
+      console.log(e);
+      if (e.webRTCUrl) {
+        this.webSocketParams.admin = e.admin;
+        this.webSocketParams.password = e.password;
+        this.webSocketParams.url = e.webRTCUrl;
+      }
       this.filterInfo();
     },
-    filterInfo() {},
-    exchangeVideo() {},
-    openAll() {},
-    closeAll() {},
+    filterInfo() {
+      if (this.department.id) {
+        const array = [];
+        for (let i = 0; i < this.dataList.length; i++) {
+          const e = this.dataList[i];
+          if (e.departmentId === this.department.id) {
+            array.push(e);
+          }
+        }
+        this.tableConfig.tableData = array;
+      }
+      // console.log("筛选列表", this.tableConfig.tableData);
+    },
+    exchangeVideo(id) {
+      for (let i = 0; i < this.cameraList.length; i++) {
+        const c = this.cameraList[i];
+        if (c.id === id) {
+          return (this.cameraInfo = c);
+        }
+      }
+      console.log("筛选摄像头", this.cameraInfo);
+    },
+    openAll() {
+      this.ringNumber = "99997";
+      this.callDisable = true;
+    },
+    closeAll() {
+      this.callDisable = false;
+      this.openningTile = "暂无";
+      this.cameraInfo = null;
+    },
     openBroadcast() {},
     closeBroadcast() {},
     handleClose(item) {
@@ -287,6 +358,7 @@ export default {
       }
     },
   },
+  beforeDestroy() {},
 };
 </script>
 <style lang="less" scoped>
@@ -375,7 +447,7 @@ export default {
       }
     }
     .select_list {
-      height: 66px;
+      height: 30px;
       overflow: auto;
       max-height: 66px;
       .select-tag {

+ 3 - 1
src/views/videoMonitorType/index.vue

@@ -162,7 +162,9 @@ export default {
         //   // return true
         //   return !NO_SINGLE_CAMERA.includes(c?.name)
         // })
-        this.videoList = content;
+        this.videoList = content.filter((c) => {//过滤首页轮播显示
+          return c.homeCarouselEnable > 0;
+        });
         // this.sortVideoList()
       } catch (error) {
         console.log("getCameraList error", error);

+ 4 - 4
vue.config.js

@@ -19,10 +19,10 @@ module.exports = {
       '/yapi': {
         // target: 'http://39.101.177.49:5013/', // 远程服务器-皞哥
         // target: 'http://127.0.0.1:18201/prod-api/', // 贵州现场
-        // target: 'http://11.100.46.218:8080/prod-api/', // 贵都匀现场
+        target: 'https://11.100.46.218:8080/prod-api/', // 贵都匀现场
         // target: 'http://11.100.46.220:8080/prod-api/', // 贵州现场
         // target: 'http://192.168.1.10:8080/prod-api/', // 贵州现场
-        target: 'http://192.168.18.219:22102/prod-api/', // 都匀转发
+        // target: 'http://192.168.18.219:22102/prod-api/', // 都匀转发
         // target: 'http://192.168.18.219:22100/prod-api/', // 托克托转发
         // target: 'http://192.168.195.134:8080/prod-api/', // 贵州现场
         // target: 'http://172.168.0.62:8080/prod-api/', // 托克托现场
@@ -40,12 +40,12 @@ module.exports = {
         // target: 'http://39.101.177.49:5013/model/', //模型服务器
         // target: 'http://127.0.0.1:18202/model/', //贵州现场
         // target: 'http://11.100.46.220:8081/model/', //都匀现场
-        // target: 'http://11.100.46.218:8081/model/', //都匀现场
+        target: 'https://11.100.46.218:8081/model/', //都匀现场
         // target: "http://192.168.70.11:8081/model/", // 静海现场
         // target: "http://localhost:8000/model/", // 济北综合站现场服务器
         // target: 'http://11.100.46.220:8081/model/', //贵阳模型服务器
         // target: 'http://192.168.1.10:8081/model/', //贵阳模型服务器
-        target: 'http://192.168.18.219:22101/model/', //托克托模型服务器转发
+        // target: 'http://192.168.18.219:22101/model/', //托克托模型服务器转发
         // target: 'http://192.168.18.219:22103/model/', //都匀模型服务器转发
         // target: 'http://192.168.195.134:8081/model/', //模型服务器
         // target: 'http://172.168.0.62:8081/model/', //托克托模型现场服务器