| | |
| | | <script setup> |
| | | import FlexBox from "@/components/FlexBox.vue"; |
| | | import doorInfoModule from "@/views/accessControl/js/doorInfoModule"; |
| | | import HdwLight from "@/components/HdwLight.vue"; |
| | | const {doorInfos} = doorInfoModule(); |
| | | |
| | | </script> |
| | |
| | | <el-row> |
| | | <el-col :span="4" v-for="item in doorInfos" :key="item"> |
| | | <div class="access-control-item"> |
| | | <div class="access-control-tool"> |
| | | <div class="access-control-tool-item" v-if="item.status === 0"> |
| | | <el-button type="primary" size="large">开门</el-button> |
| | | </div> |
| | | <div class="access-control-tool-item" v-else-if="item.status === 1"> |
| | | <el-button type="warning" size="large">关门</el-button> |
| | | </div> |
| | | <div class="access-control-tool-item" v-else> |
| | | <hdw-light :type="1"></hdw-light> |
| | | </div> |
| | | </div> |
| | | <flex-box> |
| | | <div class="access-control-img"> |
| | | <img src="./images/menJin.png" alt=""> |
| | |
| | | <!-- <div class="access-control-text update-time">--> |
| | | <!-- 2023-06-29 00:00:00--> |
| | | <!-- </div>--> |
| | | <div class="access-control-text home-number">{{ item.ip }}</div> |
| | | <div class="access-control-text state">门锁状态:{{ item.status }}</div> |
| | | <div class="access-control-text home-number">{{ item.name }}</div> |
| | | <div class="access-control-text state">门锁状态:{{ item.statusText }}</div> |
| | | </flex-box> |
| | | </div> |
| | | </el-col> |
| | |
| | | overflow-y: auto; |
| | | } |
| | | .access-control-item { |
| | | position: relative; |
| | | margin-left: 16px; |
| | | margin-bottom: 16px; |
| | | text-align: center; |
| | | .access-control-tool { |
| | | position: absolute; |
| | | top: 8px; |
| | | right: 8px; |
| | | z-index: 7; |
| | | .access-control-tool-item { |
| | | margin-bottom: 8px; |
| | | } |
| | | } |
| | | } |
| | | .access-control-img { |
| | | display: inline-block; |
| | |
| | | |
| | | const doorInfos = reactive([ |
| | | { |
| | | ip: "192.168.0.19", |
| | | passWord: "a1234567.", |
| | | port: 8000, |
| | | userName: "admin", |
| | | status: "未知" |
| | | }, |
| | | { |
| | | ip: "192.168.0.18", |
| | | passWord: "a1234567.", |
| | | port: 8000, |
| | | userName: "admin", |
| | | status: "未知" |
| | | status: 0, |
| | | name: "智能实验室", |
| | | statusText: "未知" |
| | | }, |
| | | { |
| | | ip: "192.168.0.19", |
| | | passWord: "a1234567.", |
| | | port: 8000, |
| | | userName: "admin", |
| | | status: 0, |
| | | name: "PCR实验室", |
| | | statusText: "未知" |
| | | }, |
| | | { |
| | | ip: "192.168.0.44", |
| | | passWord: "a1234567.", |
| | | port: 8000, |
| | | userName: "admin", |
| | | status: "未知" |
| | | status: 0, |
| | | name: "西藏安琪", |
| | | statusText: "未知" |
| | | }, |
| | | ]); |
| | | |
| | |
| | | let data = rs.data; |
| | | doorInfos.map(item=>{ |
| | | let doorInfo = data[item.ip]; |
| | | console.log(doorInfo); |
| | | item.status = getLabelByKey(doorInfo.data2.lockStatus, lockStatusList, "未知"); |
| | | item.status = doorInfo.data2.lockStatus; |
| | | //item.status = 2; |
| | | item.statusText = getLabelByKey(doorInfo.data2.lockStatus, lockStatusList, "未知"); |
| | | }); |
| | | } |
| | | |
| | |
| | | .earth-wrapper { |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 600px; |
| | | width: 800px; |
| | | } |
| | | .earth-light-circle img, |
| | | .earth-light img, |
| | |
| | | WebVideoCtrl.I_Stop({ |
| | | iWndIndex, |
| | | success: function () { |
| | | startRealPlay(ip, port, iWndIndex); |
| | | setTimeout(()=>{ |
| | | startRealPlay(ip, port, iWndIndex); |
| | | }, 2000); |
| | | }, |
| | | error: function() { |
| | | startRealPlay(ip, port, iWndIndex); |
| | | setTimeout(()=>{ |
| | | startRealPlay(ip, port, iWndIndex); |
| | | }, 2000); |
| | | } |
| | | }); |
| | | } else { |