安琪酵母(西藏)益生菌信息采集中心智能实验室
longyvfengyun
2023-08-22 0355135113176bbbf0b0dd84b7894269179a704a
src/views/video/components/hkVideo.vue
@@ -5,12 +5,32 @@
   companyVideoData: {
      type: Object,
      default() {
         return {
            ip: "192.168.10.10",
            port: 80,
            username: "admin",
            password: "a123456789"
         };
         return [
            {
               ip: "192.168.10.5",
               port: 80,
               username: "admin",
               password: "a123456789"
            },
            {
               ip: "192.168.10.6",
               port: 80,
               username: "admin",
               password: "a123456789"
            },
            {
               ip: "192.168.10.4",
               port: 80,
               username: "admin",
               password: "a123456789"
            },
            {
               ip: "192.168.10.3",
               port: 80,
               username: "admin",
               password: "a123456789"
            }
         ];
      },
   },
});
@@ -22,13 +42,25 @@
} = hkModule();
onMounted(()=>{
   for(let i=0; i<props.companyVideoData.length; i++) {
      let item = props.companyVideoData[i];
      WebVideoCtrl.I_Logout(item.ip+"_"+item.port);
   }
   videoInitPlugin(()=>{
      clickLogin(props.companyVideoData);
      for(let i=0; i<props.companyVideoData.length; i++) {
         let item = props.companyVideoData[i];
         setTimeout(()=>{
            clickLogin(item, i);
         }, 1000);
      }
   });
});
onUnmounted(()=>{
   WebVideoCtrl.I_Logout(props.companyVideoData.ip);
   for(let i=0; i<props.companyVideoData.length; i++) {
      let item = props.companyVideoData[i];
      WebVideoCtrl.I_Logout(item.ip+"_"+item.port);
   }
   WebVideoCtrl.I_GetPluginOBJECT().JS_DestroyPlugin();
});
</script>