| | |
| | | type: Number, |
| | | default: 100 |
| | | }, |
| | | placement: { |
| | | type: String, |
| | | default: "top" |
| | | }, |
| | | x: { |
| | | type: Number, |
| | | default: 0 |
| | |
| | | </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> |
| | |
| | | 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" |
| | |
| | | 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); |
| | |
| | | hum: 7, |
| | | diffPre: 1, |
| | | pos: { |
| | | visible: true, |
| | | visible: false, |
| | | placement: "top", |
| | | x: 710, |
| | | y: 690 |
| | | }, |
| | |
| | | diffPre: 1, |
| | | pos: { |
| | | visible: true, |
| | | placement: "top", |
| | | x: 916, |
| | | y: 690 |
| | | }, |
| | |
| | | diffPre: 1, |
| | | pos: { |
| | | visible: true, |
| | | placement: "left", |
| | | x: 1212, |
| | | y: 690 |
| | | }, |
| | |
| | | diffPre: 1, |
| | | pos: { |
| | | visible: true, |
| | | placement: "top", |
| | | x: 1395, |
| | | y: 690 |
| | | }, |
| | |
| | | } |
| | | }, |
| | | { |
| | | name: "文库扩展", |
| | | name: "文库扩增室", |
| | | temp: 32, |
| | | hum: 7, |
| | | diffPre: 1, |
| | | pos: { |
| | | visible: true, |
| | | placement: "top", |
| | | x: 1576, |
| | | y: 650 |
| | | }, |
| | |
| | | diffPre: 1, |
| | | pos: { |
| | | visible: true, |
| | | placement: "top", |
| | | x: 1495, |
| | | y: 337 |
| | | }, |
| | |
| | | diffPre: 1, |
| | | pos: { |
| | | visible: true, |
| | | placement: "top", |
| | | x: 1190, |
| | | y: 355 |
| | | }, |
| | |
| | | diffPre: 1, |
| | | pos: { |
| | | visible: true, |
| | | placement: "top", |
| | | x: 1000, |
| | | y: 378 |
| | | }, |
| | |
| | | hum: 0, |
| | | diffPre: 0, |
| | | pos: { |
| | | visible: true, |
| | | visible: false, |
| | | placement: "top", |
| | | x: 550, |
| | | y: 380 |
| | | }, |
| | |
| | | hum: 0, |
| | | diffPre: 0, |
| | | pos: { |
| | | visible: true, |
| | | visible: false, |
| | | placement: "top", |
| | | x: 750, |
| | | y: 360 |
| | | }, |
| | |
| | | hum: 0, |
| | | diffPre: 0, |
| | | pos: { |
| | | visible: true, |
| | | visible: false, |
| | | placement: "top", |
| | | x: 420, |
| | | y: 700 |
| | | }, |
| | |
| | | hum: 0, |
| | | diffPre: 0, |
| | | pos: { |
| | | visible: true, |
| | | visible: false, |
| | | placement: "top", |
| | | x: 420, |
| | | y: 1100 |
| | | }, |
| | |
| | | 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(()=>{ |
| | |
| | | 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(()=>{ |
| | |
| | | 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" |
| | | } |
| | | ]; |
| | | }, |
| | | }, |
| | | }); |
| | |
| | | } = 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> |
| | |
| | | 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(); |
| | |
| | | |
| | | const initPlugin = (cbComplete)=>{ |
| | | WebVideoCtrl.I_InitPlugin({ |
| | | bWndFull: false, //是否支持单窗口双击全屏 |
| | | bWndFull: true, //是否支持单窗口双击全屏 |
| | | iWndowType: iWndowType.value, |
| | | bDebugMode:true, |
| | | cbSelWnd: function (xmlDoc){ |
| | |
| | | }); |
| | | } |
| | | |
| | | 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"); |
| | |
| | | }); |
| | | }; |
| | | |
| | | 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("开始预览成功!"); |
| | |
| | | watch( |
| | | isCollapse, |
| | | (newVal)=>{ |
| | | //changeWndNum(newVal[0]); |
| | | setTimeout(()=>{ |
| | | WebVideoCtrl.I_My_Resize(); |
| | | }, 0); |
| | | }, 300); |
| | | |
| | | }, |
| | | ); |