Your Name 3 жил өмнө
parent
commit
cc72076a41

+ 1 - 1
public/js/common.js

@@ -1,5 +1,5 @@
 var setting = {
-    username: "huashe1",
+    username: "huashe3",
     password: "huashe123",
     ip: "10.55.134.3",
     host: "http",

BIN
src/assets/icons/detail/._dbptlx.png


+ 14 - 0
src/assets/icons/home/dbsblx.svg

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 200 200" style="enable-background:new 0 0 200 200;" xml:space="preserve">
+<style type="text/css">
+	.st0{fill:#999999;}
+	.st1{fill:#FFFFFF;}
+</style>
+<path class="st0" d="M186.9,88.2c0,47.7-86.4,110.9-86.4,110.9S14.1,135.9,14.1,88.2S52.8,1.7,100.5,1.7S186.9,40.4,186.9,88.2z"/>
+<path class="st1" d="M67.3,87.3h66.3V51H67.3V87.3z M118.9,116.3V109h-14.7V94.5h-7.4V109H82.1v7.3h14.7v14.5h7.4v-14.5H118.9
+	L118.9,116.3z M141,36.5c4.1,0,7.4,3.3,7.4,7.3v50.8c0,4-3.3,7.3-7.4,7.3V138c0,4-3.3,7.3-7.4,7.3H67.3c-4,0-7.3-3.2-7.4-7.3v-36.3
+	c-4,0-7.3-3.2-7.4-7.3V43.7c0-4,3.3-7.3,7.4-7.3v-7.3h7.4V14.7h7.4v14.5h7.4v7.3H141L141,36.5z M96.8,116.3V109h7.4v7.3H96.8z
+	 M74.7,80V58.2h51.6V80H74.7z"/>
+</svg>

+ 117 - 155
src/components/MarkerMap/index.tsx

@@ -44,6 +44,11 @@ import icon_map_dpf from '@/assets/icons/home/dpf.svg';
 /** @ts-ignore */
 import icon_map_dbsb from '@/assets/icons/home/dbsb.svg';
 
+/** @ts-ignore */
+import icon_map_dbsblx from '@/assets/icons/home/dbptlx.png';
+
+
+
 // @ts-ignore
 import icon_map_traffic from '@/assets/icons/detail/source2@2x.png';
 
@@ -248,165 +253,116 @@ export default defineComponent({
           });
         case '单兵': {
           var callback = () => {
-            // console.log(marker['deviceCode']);
-            // console.log(marker['userId']);
-            // daHuaStore.DAHUAUserObj(marker["userId"]).then(deviceUser=>{
-            //              console.log(deviceUser);
-            //              let memberObj = {
-            //                     userName:deviceUser.userName,
-            //                     userId:deviceUser.userCode,
-            //                     region:deviceUser.paasId,
-            //                     type:'single',
-            //                     // speak:'true',
-            //                     number:deviceUser.userPhone,
-            //                     deviceId:marker["deviceCode"],
-            //                     channelId:marker["channelId"],
-            //              }
-            //              let meetObj = JSON.parse(localStorage.getItem('meeting'));
-            //              let memberList = [];
-            //              memberList.push(meetObj.member==null||meetObj.member==undefined?"":meetObj.member[0]);
-            //              memberList.push(memberObj);
-            //              meetObj.member = memberList
-            //              console.log(meetObj);
-            //              daHuaStore.DAHUAMeetingMember(meetObj).then(data=>{
-            //                       //  console.log(11111111)
-            //                        daHuaStore.DAHUAMeetingUser(meetObj.meetId);
-            //                       daHuaStore.DAHUAUserInfo().then(u => {
-            //                         console.log(u,'+++++++');    
-            //                         initSocket(u.userCode,memberObj);
-            //                       })
-            //              })
-                         
-                        //  console.log(memberObj);
-                        //  meetObj.mebmber.push(memberObj);
-
-                        // mainstore.videoisshow = true;
-                       
-                        mainstore.videoisshow = true;
-                        // // try {
-                          // daHuaStore.DAHUAUserObj(marker["userId"]).then(deviceUser=>{
-                            mainstore.videotitle = marker["userName"] + "";
-                          // });
-
-                          const userid = marker['userId'];
-                          const dievicecode = marker['deviceCode']+"";
-
-                          const channelid = marker['channelId']+"";
-                          window.isdanbing = true;
-
-                          async function cremetting(){
-                            await window.metting.getLocalUserInfo();
-                            const res = await window.metting.queryUser(userid);
-            
-                            window.metting.localUserInfo.name = "danbing_Meeting";
-            
-                            await window.metting.creatMeeting();
-                            await window.metting.startInvite({
-                                userName: res.userName,
-                                userId: res.userCode,
-                                region: res.paasId,
-                                type: "single",
-                                // speak:'true',
-                                number: res.userPhone,
-                                deviceId: dievicecode,
-                                channelId: channelid,
-                            });
+               if(true){
+                mainstore.videoisshow = true;
+                // // try {
+                  // daHuaStore.DAHUAUserObj(marker["userId"]).then(deviceUser=>{
+                    mainstore.videotitle = marker["userName"] + "";
+                  // });
+
+                  const userid = marker['userId'];
+                  const dievicecode = marker['deviceCode']+"";
+
+                  const channelid = marker['channelId']+"";
+                  window.isdanbing = true;
+
+                  async function cremetting(){
+                    await window.metting.getLocalUserInfo();
+                    const res = await window.metting.queryUser(userid);
+    
+                    window.metting.localUserInfo.name = "danbing_Meeting";
+    
+                    await window.metting.creatMeeting();
+                    await window.metting.startInvite({
+                        userName: res.userName,
+                        userId: res.userCode,
+                        region: res.paasId,
+                        type: "single",
+                        // speak:'true',
+                        number: res.userPhone,
+                        deviceId: dievicecode,
+                        channelId: channelid,
+                    });
+                  }
+                  
+
+                  if(window.metting){
+                    const meeting = window.metting;
+                    meeting.settargetId("vPlayArea");
+                      meeting.playVideo({
+                        type: 'single',
+                        deviceId: marker['deviceCode'],
+                        channelId: channelid,
+                      });
+                      cremetting();
+                     
+                      setTimeout(() => {
+                        try{
+                          if(window.vPlayArea){
+                            window.vPlayArea.resize();
+                            window.vPlayArea.dragResize(0,0,0,0)
+                        }
+                        }catch(E){
+                        }
+                        
+                      }, 500);
+                      
+      
+                   }else{
+                    const meeting = new Meeting();
+                    if(window.theSocket){
+                      meeting.settargetId("vPlayArea");
+                      meeting.playVideo({
+                        type: 'single',
+                        deviceId: marker['deviceCode'],
+                        channelId: channelid,
+                      });
+                      window.metting = meeting;
+                      setTimeout(() => {
+                        try{
+                          if(window.vPlayArea){
+                            window.vPlayArea.resize();
+                            window.vPlayArea.dragResize(0,0,0,0)
+                        }
+                        }catch(E){
+                        }
+                        
+                      }, 500);
+      
+                    }else{
+                      meeting.openClient(() => {
+                      
+                        meeting.settargetId("vPlayArea");
+                        meeting.playVideo({
+                          type: 'single',
+                          deviceId: marker['deviceCode'],
+                          channelId: channelid,
+                        });
+                        window.metting = meeting;
+                        cremetting();
+      
+                        setTimeout(() => {
+                          try{
+                            if(window.vPlayArea){
+                              window.vPlayArea.resize();
+                              window.vPlayArea.dragResize(0,0,0,0)
+                          }
+                          }catch(E){
                           }
                           
+                        }, 1000);
+                        
+                     
+                      });
+      
+                    }
+      
+                    }
 
-                          if(window.metting){
-                            const meeting = window.metting;
-                            meeting.settargetId("vPlayArea");
-                              meeting.playVideo({
-                                type: 'single',
-                                deviceId: marker['deviceCode'],
-                                channelId: channelid,
-                              });
-                              cremetting();
-                             
-                              setTimeout(() => {
-                                try{
-                                  if(window.vPlayArea){
-                                    window.vPlayArea.resize();
-                                    window.vPlayArea.dragResize(0,0,0,0)
-                                }
-                                }catch(E){
-                                }
-                                
-                              }, 500);
-                              
-              
-                           }else{
-                            const meeting = new Meeting();
-                            if(window.theSocket){
-                              meeting.settargetId("vPlayArea");
-                              meeting.playVideo({
-                                type: 'single',
-                                deviceId: marker['deviceCode'],
-                                channelId: channelid,
-                              });
-                              window.metting = meeting;
-                              setTimeout(() => {
-                                try{
-                                  if(window.vPlayArea){
-                                    window.vPlayArea.resize();
-                                    window.vPlayArea.dragResize(0,0,0,0)
-                                }
-                                }catch(E){
-                                }
-                                
-                              }, 500);
-              
-                            }else{
-                              meeting.openClient(() => {
-                              
-                                meeting.settargetId("vPlayArea");
-                                meeting.playVideo({
-                                  type: 'single',
-                                  deviceId: marker['deviceCode'],
-                                  channelId: channelid,
-                                });
-                                window.metting = meeting;
-                                cremetting();
-              
-                                setTimeout(() => {
-                                  try{
-                                    if(window.vPlayArea){
-                                      window.vPlayArea.resize();
-                                      window.vPlayArea.dragResize(0,0,0,0)
-                                  }
-                                  }catch(E){
-                                  }
-                                  
-                                }, 1000);
-                                
-                             
-                              });
-              
-                            }
-              
-                            }
-
-                            
-
-                            
+               }else{
+                ElMessage.warning('设备离线,请联系大华相关人员');
+               }            
           
-                        //   mainstore.videohandle = meeting;
-            // });
-
-            // const DAHUA = document.getElementById('DAHUA') as HTMLIFrameElement;
-            // DAHUA?.contentWindow?.postMessage(
-            //   {
-            //     key: 'danbing',
-            //     value: marker['userId'],
-            //     deviceId: marker['deviceCode'],
-            //     channelId: marker['channelId'],
-            //   },
-            //   '*',
-            // );
-            // daHuaStore.dahuaUserVisible = true;
-
-            // console.log(daHuaStore.deviceUser);
           };
           return GET_SINGLE_DEVICE_DIALOG_HTML(
             marker as SingleDeviceItem,
@@ -751,6 +707,12 @@ export default defineComponent({
                nextImage1 = icon_map_spjk_offline;
             }
           }
+
+          if (type == "单兵") { 
+            if (false) { 
+               nextImage1 = icon_map_dbsblx;
+            }
+          }
           const nextImage = nextImage1; 
 
           const popup = new window.minemap.Popup({

+ 23 - 38
src/layout/BaseLayout/index.tsx

@@ -267,6 +267,28 @@ export default defineComponent({
         //     return;
         //   }
         //   //邀请用户写 memberTyp=4;邀请用户绑定的设备则对应不同值。且需要传递memberCode与memberNumber【通过用户接口查询】
+       try{
+         if(window.metting){
+          window.metting.closeClient()
+         }
+        window.metting =false; window.theSocket = false;
+
+       }catch(E){
+
+       }
+
+       console.log("---------------------------")
+
+       const meeting = new Meeting();
+       meeting.openClient(() => {
+            
+        //meeting.settargetId("vPlayArea");
+        window.metting = meeting;
+        cremetting();
+        
+     
+      });
+        
 
         async function cremetting(){
 
@@ -284,7 +306,7 @@ export default defineComponent({
           // _this.localUserInfo.masterNumber = res.userPhone;
           // _this.localUserInfo.region = res.paasId;
           const chartParams = {
-            chatName: "会商",
+            chatName: "测试会商名称",
             bOpenDirect: true,
             memberId: res.userCode, // 成员id
             memberName: res.name, // 成员名称
@@ -296,43 +318,6 @@ export default defineComponent({
           window.theSocket&&window.theSocket.createGroupChat(chartParams);
         }
 
-        if(window.metting){
-          const meeting = window.metting;
-          meeting.settargetId("vPlayArea");
-          if(window.theSocket){
-            cremetting();
-
-          }else{
-            window.meeting.openClient(() => {
-              window.meeting.settargetId("vPlayArea");
-              cremetting();
-            });
-
-          }
-            
-
-         }else{
-          const meeting = new Meeting();
-          if(window.theSocket){
-         
-            cremetting();
-
-          }else{
-            meeting.openClient(() => {
-            
-              meeting.settargetId("vPlayArea");
-              window.metting = meeting;
-              cremetting();
-              
-           
-            });
-
-          }
-
-          }
-
-        
-         
   
         })