|
|
@@ -359,6 +359,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+ <div style="position: absolute;top:10vh;left:30vw;z-index: 2000;" v-if="showVideo">
|
|
|
+ <el-icon color="black" @click="showVideo = false">
|
|
|
+ <Close />
|
|
|
+ </el-icon>
|
|
|
+ <videoDiv ref="videoPlayer" height="400" style="width: 30vw;">
|
|
|
+ </videoDiv>
|
|
|
+ </div>
|
|
|
+
|
|
|
<el-dialog v-model="dialogVisible" title="添加设备" width="500">
|
|
|
<el-form :model="formdata" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
|
|
<el-form-item label="名称">
|
|
|
@@ -392,7 +400,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup name="CarInfo" lang="ts">
|
|
|
- import { listCountry, getCountry, delCountry, addCountry, updateCountry } from '@/api/country';
|
|
|
+ import { listCountry, getCountry, delCountry, addCountry, updateCountry } from '@/api/country';
|
|
|
import { TreeNode } from "element-plus";
|
|
|
import { useRoute, useRouter } from "vue-router";
|
|
|
import EZUIKit from 'ezuikit-js';
|
|
|
@@ -402,6 +410,7 @@
|
|
|
import { updateData, listData } from "@/api/system/dict/data";
|
|
|
import imgulock from "@/assets/images/unlock@2x.png";
|
|
|
import { getBoxInfo, getLock, openall } from "@/api/data"
|
|
|
+ import videoDiv from "@/components/Public/videoDiv.vue"
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
|
@@ -415,6 +424,10 @@
|
|
|
const boxCode = ref(null)
|
|
|
const showKdg = ref(false)
|
|
|
|
|
|
+ const videoData = ref(null)
|
|
|
+
|
|
|
+ const showVideo = ref(false)
|
|
|
+
|
|
|
|
|
|
const formdata = ref({
|
|
|
name: "",
|
|
|
@@ -482,12 +495,18 @@
|
|
|
}
|
|
|
|
|
|
const clickCabinet = (value, lockCode) => {
|
|
|
- for (var index in boxData.value) {
|
|
|
- if (boxData.value[index].box_name == value) {
|
|
|
- // console.log(boxData.value[index].box_lock_address)
|
|
|
- openBox(value, boxData.value[index].box_lock_address);
|
|
|
- }
|
|
|
+ if (videoData.value.length > 0) {
|
|
|
+ showVideo.value = true;
|
|
|
+ setTimeout(() => {
|
|
|
+ proxy.$refs.videoPlayer.initVideo(videoData.value[0].code)
|
|
|
+ }, 100);
|
|
|
}
|
|
|
+ // for (var index in boxData.value) {
|
|
|
+ // if (boxData.value[index].box_name == value) {
|
|
|
+ // // console.log(boxData.value[index].box_lock_address)
|
|
|
+ // openBox(value, boxData.value[index].box_lock_address);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
// ElMessage.success(value + "号柜远程开启成功");
|
|
|
}
|
|
|
|
|
|
@@ -632,6 +651,8 @@
|
|
|
tableData.value = JSON.parse((currentdata.value.remark == '' ? "[]" : currentdata.value.remark) ?? "[]")
|
|
|
if (currentdata.value) {
|
|
|
var cabinets = tableData.value.filter(i => i.type == 'cabinet');
|
|
|
+ videoData.value = tableData.value.filter(i => i.type == 'camera');
|
|
|
+ console.log(videoData.value)
|
|
|
if (cabinets.length > 0) {
|
|
|
boxCode.value = cabinets[0].code
|
|
|
getBoxInfoData(cabinets[0].code)
|