wenhongquan 3 gadi atpakaļ
vecāks
revīzija
efb83d5f70

BIN
src/assets/icons/detail/btn_yjld@2x.png


+ 10 - 0
src/layout/BaseLayout/index.scss

@@ -62,5 +62,15 @@
             padding: px2rem(9px * 2) px2rem(15px * 5);
             font-size: px2rem(12px * 4);
         }
+        .yjld_btn {
+            background: url("../../assets/icons/detail/btn_yjld@2x.png");
+            width: px2rem(83px * 2);
+            height: px2rem(88px * 2);
+            z-index: 22;
+            position: absolute;
+            background-size: 100% 100%;
+            bottom: px2rem(24px * 2);
+            right: px2rem(45px * 2);
+        }
     }
 }

+ 19 - 2
src/layout/BaseLayout/index.tsx

@@ -128,6 +128,13 @@ export default defineComponent({
 
     const store = useIncidentStore();
     const daHuaStore = useDaHuaStore();
+
+
+    const handleDaHuaSystem = () => {
+      daHuaStore.dahuaUserVisible = true;
+      const DAHUA = document.getElementById('DAHUA') as HTMLIFrameElement;
+      DAHUA?.contentWindow?.postMessage('creatMeeting', '*');
+    };
     // console.log(daHuaStore.dhuser);
 
     // const list = computed(() => [
@@ -182,7 +189,13 @@ export default defineComponent({
         if (e.data === 'closeIframe') {
           daHuaStore.dahuaUserVisible = false;
         }
-      }, false)
+      }, false);
+
+      (yjzh_btn.value)?.addEventListener("click", () => { 
+
+       handleDaHuaSystem();
+
+      })
 
     });
     const timetext = ref("-");
@@ -195,7 +208,9 @@ export default defineComponent({
       weektext.value = moment().format('dddd');
       timetext.value = moment().format('HH:mm:ss');
 
-    },1000)
+    }, 1000)
+    
+    const yjzh_btn = ref(null);
 
     return () => (
       <section class="base-layout-container">
@@ -223,6 +238,8 @@ export default defineComponent({
             readonly={route.path.includes('incidentDetail')}
             // marker={store.incidentDetail}
           />
+
+          <div class="yjld_btn" ref={ yjzh_btn }></div>
         </main>
       </section>
     );