安琪酵母(西藏)益生菌信息采集中心智能实验室
longyvfengyun
2023-08-22 0355135113176bbbf0b0dd84b7894269179a704a
视频内容提交
6个文件已修改
215 ■■■■ 已修改文件
src/components/MapPin.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/home/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/home/js/homeInfoModule.js 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainLayout/components/SlideMenu.vue 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/video/components/hkVideo.vue 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/video/components/js/hkVideo/hkModule.js 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/MapPin.vue
@@ -26,6 +26,10 @@
        type: Number,
        default: 100
    },
    placement: {
        type: String,
        default: "top"
    },
    x: {
        type: Number,
        default: 0
@@ -63,9 +67,9 @@
</script>
<template>
    <div class="map-pin" :style="posStyle">
    <div class="map-pin" :style="posStyle" v-if="visible">
        <div class="map-pin-wrapper">
            <el-tooltip placement="top" :visible="visible">
            <el-tooltip :placement="placement" :visible="visible">
                <template #content>
                    <div class="home-info name">{{name}}</div>
                    <div class="home-info">温度:{{ info.tmp }} ℃</div>
src/views/home/index.vue
@@ -65,6 +65,7 @@
            v-if="isShowMapPin"
            v-for="(item, index) in homeInfo" :key="'key'+index"
            :visible="item.pos.visible"
            :placement="item.pos.placement"
            :name="item.name"
            :c-width="cWidth" :c-height="cHeight"
            :d-width="dWidth" :d-height="dHeight"
src/views/home/js/homeInfoModule.js
@@ -16,7 +16,7 @@
        let iData = data[i];
        for(let j=0; j<homeInfo.length; j++) {
          let jData = homeInfo[j];
          if(iData.roomName === jData.name && iData.devId === 220000001) {
          if(iData.roomName === jData.name) {
            jData.info.tmp = iData.envirState.devTemp.toHold(2);
            jData.info.hum = iData.envirState.devHumid.toHold(2);
            jData.info.diff = iData.envirState.devPresss.toHold(2);
@@ -33,7 +33,8 @@
      hum: 7,
      diffPre: 1,
      pos: {
        visible: true,
        visible: false,
        placement: "top",
        x: 710,
        y: 690
      },
@@ -51,6 +52,7 @@
      diffPre: 1,
      pos: {
        visible: true,
        placement: "top",
        x: 916,
        y: 690
      },
@@ -68,6 +70,7 @@
      diffPre: 1,
      pos: {
        visible: true,
        placement: "left",
        x: 1212,
        y: 690
      },
@@ -85,6 +88,7 @@
      diffPre: 1,
      pos: {
        visible: true,
        placement: "top",
        x: 1395,
        y: 690
      },
@@ -96,12 +100,13 @@
      }
    },
    {
      name: "文库扩展",
      name: "文库扩增室",
      temp: 32,
      hum: 7,
      diffPre: 1,
      pos: {
        visible: true,
        placement: "top",
        x: 1576,
        y: 650
      },
@@ -119,6 +124,7 @@
      diffPre: 1,
      pos: {
        visible: true,
        placement: "top",
        x: 1495,
        y: 337
      },
@@ -136,6 +142,7 @@
      diffPre: 1,
      pos: {
        visible: true,
        placement: "top",
        x: 1190,
        y: 355
      },
@@ -153,6 +160,7 @@
      diffPre: 1,
      pos: {
        visible: true,
        placement: "top",
        x: 1000,
        y: 378
      },
@@ -169,7 +177,8 @@
      hum: 0,
      diffPre: 0,
      pos: {
        visible: true,
        visible: false,
        placement: "top",
        x: 550,
        y: 380
      },
@@ -186,7 +195,8 @@
      hum: 0,
      diffPre: 0,
      pos: {
        visible: true,
        visible: false,
        placement: "top",
        x: 750,
        y: 360
      },
@@ -203,7 +213,8 @@
      hum: 0,
      diffPre: 0,
      pos: {
        visible: true,
        visible: false,
        placement: "top",
        x: 420,
        y: 700
      },
@@ -220,7 +231,8 @@
      hum: 0,
      diffPre: 0,
      pos: {
        visible: true,
        visible: false,
        placement: "top",
        x: 420,
        y: 1100
      },
@@ -230,7 +242,43 @@
        hum: 0,
        diff: 0
      }
    }
    },
    {
      name: "缓冲间",
      temp: 32,
      hum: 7,
      diffPre: 1,
      pos: {
        visible: true,
        placement: "top",
        x: 820,
        y: 490
      },
      info: {
        num: 99,
        tmp: 0,
        hum: 0,
        diff: 0
      }
    },
    {
      name: "洁净走廊",
      temp: 32,
      hum: 7,
      diffPre: 1,
      pos: {
        visible: true,
        placement: "left",
        x: 1200,
        y: 490
      },
      info: {
        num: 99,
        tmp: 0,
        hum: 0,
        diff: 0
      }
    },
  ]);
  onMounted(()=>{
src/views/mainLayout/components/SlideMenu.vue
@@ -29,34 +29,34 @@
        path: "/video",
        icon: "VideoCameraFilled",
    },
    {
        title: "用户管理",
        path: "/userManagement",
        icon: "UserFilled"
    },
    {
        title: "资产管理",
        path: "/asset",
        icon: "School",
        children: [
            {
                title: "门禁资产管理",
                path: "/asset/accessControl",
            },
            {
                title: "空调资产管理",
                path: "/asset/air",
            },
            {
                title: "视频监控资产管理",
                path: "/asset/video",
            },
            {
                title: "机房采集模块管理",
                path: "/asset/homeModule",
            }
        ]
    },
    // {
    //     title: "用户管理",
    //     path: "/userManagement",
    //     icon: "UserFilled"
    // },
    // {
    //     title: "资产管理",
    //     path: "/asset",
    //     icon: "School",
    //     children: [
    //         {
    //             title: "门禁资产管理",
    //             path: "/asset/accessControl",
    //         },
    //         {
    //             title: "空调资产管理",
    //             path: "/asset/air",
    //         },
    //         {
    //             title: "视频监控资产管理",
    //             path: "/asset/video",
    //         },
    //         {
    //             title: "机房采集模块管理",
    //             path: "/asset/homeModule",
    //         }
    //     ]
    // },
];
watchEffect(()=>{
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>
src/views/video/components/js/hkVideo/hkModule.js
@@ -7,7 +7,7 @@
const hkModule = ()=>{
  const {isCollapse} = slideMenu();
  const divPlugin = ref(null);
  const iWndowType = ref(1);
  const iWndowType = ref(3);
  const gIWndIndex = ref(0);
  const videoInitPlugin = (cbComplete)=>{
    let iRet = WebVideoCtrl.I_CheckPluginInstall();
@@ -20,7 +20,7 @@
  const initPlugin = (cbComplete)=>{
    WebVideoCtrl.I_InitPlugin({
      bWndFull: false, //是否支持单窗口双击全屏
      bWndFull: true, //是否支持单窗口双击全屏
      iWndowType: iWndowType.value,
      bDebugMode:true,
      cbSelWnd: function (xmlDoc){
@@ -39,15 +39,24 @@
    });
  }
  const clickLogin = (data)=>{
    console.log(data);
  const clickLogin = (data, iWndIndex)=>{
    WebVideoCtrl.I_Login(data.ip, 1, data.port, data.username, data.password, {
      timeout: 3000,
      success: function () {
        console.log("开始预览");  //不能删除
        setTimeout(()=>{
          initPlay(data.ip, data.port);
        }, 1000);
        // 模拟通道
        WebVideoCtrl.I_GetAnalogChannelInfo(data.ip, {
          success: function (xmlDoc) {
            setTimeout(()=>{
              initPlay(data.ip, data.port, iWndIndex);
            }, 1000);
          },
          error: function (oError) {
            setTimeout(()=>{
              initPlay(data.ip, data.port, iWndIndex);
            }, 1000);
          }
        });
      },
      error: function () {
        console.log("login error");
@@ -64,24 +73,26 @@
    });
  };
  const initPlay = (ip, port)=>{
    let oWndInfo = WebVideoCtrl.I_GetWindowStatus(0);
  const initPlay = (ip, port, iWndIndex)=>{
    let oWndInfo = WebVideoCtrl.I_GetWindowStatus(iWndIndex);
    if (oWndInfo != null) {// 已经在播放了,先停止
      WebVideoCtrl.I_Stop({
        iWndIndex,
        success: function () {
          startRealPlay(ip, port);
          startRealPlay(ip, port, iWndIndex);
        }
      });
    } else {
      startRealPlay(ip, port);
      startRealPlay(ip, port, iWndIndex);
    }
  }
  const startRealPlay = (ip, port)=>{
  const startRealPlay = (ip, port, iWndIndex)=>{
    WebVideoCtrl.I_StartRealPlay(ip, {
      iStreamType: 1,
      iChannelID: 1,
      iWndIndex,
      bZeroChannel: false,
      success: function () {
        console.log("开始预览成功!");
@@ -102,10 +113,9 @@
  watch(
    isCollapse,
    (newVal)=>{
      //changeWndNum(newVal[0]);
      setTimeout(()=>{
        WebVideoCtrl.I_My_Resize();
      }, 0);
      }, 300);
    },
  );