|
|
@@ -1,13 +1,10 @@
|
|
|
<template>
|
|
|
<div class="door-content-r">
|
|
|
<div class="content-r-btn">
|
|
|
- <a-button type="primary" @click="handlerOpenOrClose('open')">
|
|
|
- 同步开启
|
|
|
- </a-button>
|
|
|
- <!-- <a-button type="primary" @click="handlerOpenOrClose('open')">
|
|
|
+ <a-button type="primary" @click="handlerOpenOrClose('open')">
|
|
|
<SvgIcon class="icon-style" size="14" color="#30b3fc" name="open-door" />
|
|
|
同步开启
|
|
|
- </a-button> -->
|
|
|
+ </a-button>
|
|
|
<a-button type="primary" style="margin: 0px 10px" @click="handlerOpenOrClose('close')">
|
|
|
<SvgIcon class="icon-style" size="14" color="#30b3fc" name="close-door" />
|
|
|
同步关闭
|
|
|
@@ -16,7 +13,7 @@
|
|
|
<SvgIcon class="icon-style" size="14" color="#30b3fc" name="time-setting-door" />
|
|
|
定时设置
|
|
|
</a-button>
|
|
|
- <a-button style="margin: 0px 10px" type="primary">操作日志</a-button>
|
|
|
+ <a-button style="margin: 0px 10px" type="primary" @click="handlerOperation">操作日志</a-button>
|
|
|
</div>
|
|
|
<div class="content-r-container">
|
|
|
<div class="content-r-box" v-for="(item, index) in infoDatas" :key="index">
|
|
|
@@ -26,9 +23,10 @@
|
|
|
</div>
|
|
|
<div class="box-content">
|
|
|
<!-- 二三维信息 -->
|
|
|
- <!-- <gateDualSVG :ref="`modelRef${index}`" :indexCode="index"></gateDualSVG> -->
|
|
|
- <component :ref="`modelRef${index}`" :indexCode="index"
|
|
|
- :is="getModelComponent(globalConfig.is2DModel, item.deviceType)" />
|
|
|
+ <gateDualSVG v-if="item.deviceType == 'gate_qd'" :ref="`modelRef${index}`" :indexCode="index"></gateDualSVG>
|
|
|
+ <gateSVG v-if="item.deviceType == 'gate_ss'" :ref="`modelRef${index}`" :indexCode="index"></gateSVG>
|
|
|
+ <!-- <component :ref="`modelRef${index}`" :indexCode="index"
|
|
|
+ :is="getModelComponent(globalConfig.is2DModel, item.deviceType)" /> -->
|
|
|
</div>
|
|
|
<img src="@/assets/images/camera.png" alt="" @click="handlerCamera(item, index)" />
|
|
|
</div>
|
|
|
@@ -44,6 +42,9 @@
|
|
|
<Modal :visible="modalVisible" :centered="true" :destroyOnClose="true" @cancel="handleCancelCamera">
|
|
|
<CameraModal :cameraData="cameraData"></CameraModal>
|
|
|
</Modal>
|
|
|
+ <!-- 操作日志 -->
|
|
|
+ <operationModal :visible="visibleOperation" @handleCancel="handleCancelOperation" >
|
|
|
+ </operationModal>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -54,10 +55,12 @@ import timeSetModal from './timeSetModal.vue';
|
|
|
import CameraModal from './cameraModal.vue';
|
|
|
import Modal from './Modal.vue';
|
|
|
import tipModal from './tipModal.vue'
|
|
|
-// import gateDualSVG from './gateDualSVG.vue'
|
|
|
+import gateDualSVG from './gateDualSVG.vue'
|
|
|
+import gateSVG from './gateSVG.vue'
|
|
|
+import operationModal from './operationModal.vue'
|
|
|
import { useRouter } from 'vue-router';
|
|
|
import { devicecontrol, insertSyncRule, GetSyncRule } from '../airdoor.api'
|
|
|
-import { getModelComponent } from '../airdoor.data'
|
|
|
+// import { getModelComponent } from '../airdoor.data'
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
import { SvgIcon } from '/@/components/Icon';
|
|
|
|
|
|
@@ -93,12 +96,13 @@ const modelRef5 = ref(null);
|
|
|
const modelRef6 = ref(null);
|
|
|
const modelRef7 = ref(null);
|
|
|
const modelRef8 = ref(null);
|
|
|
-// const modelComponent = shallowRef(getModelComponent(globalConfig.is2DModel));
|
|
|
+//操作日志弹窗显示/关闭
|
|
|
+let visibleOperation = ref(false)
|
|
|
+
|
|
|
|
|
|
|
|
|
//同步开启/关闭--弹窗
|
|
|
function handlerOpenOrClose(data) {
|
|
|
- console.log('111kaiqi')
|
|
|
visible.value = true;
|
|
|
visibleStatus.value = data
|
|
|
}
|
|
|
@@ -131,7 +135,7 @@ async function handleOkTime(param) {
|
|
|
let start_time = `${param.formState.hourS}:${param.formState.minuteS}:${param.formState.secondS}`
|
|
|
let end_time = `${param.formState.hourE}:${param.formState.minuteE}:${param.formState.secondE}`
|
|
|
let enabled = param.formState.checked ? '1' : '0'
|
|
|
- let res = await insertSyncRule({ startTime: start_time, endTime: end_time, enabled: enabled, id: Ids.value, password: param.formState.passWord || globalConfig?.simulatedPassword })
|
|
|
+ let res = await insertSyncRule({ startTime: start_time, endTime: end_time, enabled: enabled, id: Ids.value, password: param.formState.passWord })
|
|
|
console.log(res, '设置定时---')
|
|
|
if (res) {
|
|
|
visibleTime.value = param.visib
|
|
|
@@ -150,52 +154,58 @@ function handlerDetail(id) {
|
|
|
}
|
|
|
//摄像头切换
|
|
|
function handlerCamera(item, index) {
|
|
|
- console.log(item,'cemarea')
|
|
|
modalVisible.value = true;
|
|
|
cameraData = Object.assign({}, item)
|
|
|
}
|
|
|
+//摄像头弹窗关闭
|
|
|
function handleCancelCamera(param) {
|
|
|
- console.log(param,'990099')
|
|
|
modalVisible.value = param;
|
|
|
}
|
|
|
+//操作日志弹窗-打开
|
|
|
+function handlerOperation(){
|
|
|
+ visibleOperation.value = true
|
|
|
+}
|
|
|
|
|
|
-
|
|
|
+//操作日志弹窗-关闭
|
|
|
+function handleCancelOperation(param) {
|
|
|
+ visibleOperation.value = param
|
|
|
+}
|
|
|
+//模型动画
|
|
|
function monitorAnimation(selectData, index) {
|
|
|
if (index == 0) {
|
|
|
modelRef0.value[0]?.animate?.(selectData.frontGateOpen == '1', selectData.midGateOpen == '1', selectData.rearGateOpen == '1');
|
|
|
+ }else if (index == 1) {
|
|
|
+ modelRef1.value[0]?.animate?.(selectData.frontGateOpen == '1', selectData.midGateOpen == '1', selectData.rearGateOpen == '1');
|
|
|
+ } else if (index == 2) {
|
|
|
+ modelRef2.value[0]?.animate?.(selectData.frontGateOpen == '1', selectData.midGateOpen == '1', selectData.rearGateOpen == '1');
|
|
|
+ } else if (index == 3) {
|
|
|
+ modelRef3.value[0]?.animate?.(selectData.frontGateOpen == '1', selectData.midGateOpen == '1', selectData.rearGateOpen == '1');
|
|
|
+ } else if (index == 4) {
|
|
|
+ modelRef4.value[0]?.animate?.(selectData.frontGateOpen == '1', selectData.midGateOpen == '1', selectData.rearGateOpen == '1');
|
|
|
+ } else if (index == 5) {
|
|
|
+ modelRef5.value[0]?.animate?.(selectData.frontGateOpen == '1', selectData.midGateOpen == '1', selectData.rearGateOpen == '1');
|
|
|
+ } else if (index == 6) {
|
|
|
+ modelRef6.value[0]?.animate?.(selectData.frontGateOpen == '1', selectData.midGateOpen == '1', selectData.rearGateOpen == '1');
|
|
|
+ } else if (index == 7) {
|
|
|
+ modelRef7.value[0]?.animate?.(selectData.frontGateOpen == '1', selectData.midGateOpen == '1', selectData.rearGateOpen == '1');
|
|
|
+ } else if (index == 8) {
|
|
|
+ modelRef8.value[0]?.animate?.(selectData.frontGateOpen == '1', selectData.midGateOpen == '1', selectData.rearGateOpen == '1');
|
|
|
}
|
|
|
- // else if (index == 1) {
|
|
|
- // modelRef1.value[0]?.animate?.(selectData.frontGateOpen == '1', selectData.midGateOpen == '1', selectData.rearGateOpen == '1');
|
|
|
- // } else if (index == 2) {
|
|
|
- // modelRef2.value[0]?.animate?.(selectData.frontGateOpen == '1', selectData.midGateOpen == '1', selectData.rearGateOpen == '1');
|
|
|
- // } else if (index == 3) {
|
|
|
- // modelRef3.value[0]?.animate?.(selectData.frontGateOpen == '1', selectData.midGateOpen == '1', selectData.rearGateOpen == '1');
|
|
|
- // } else if (index == 4) {
|
|
|
- // modelRef4.value[0]?.animate?.(selectData.frontGateOpen == '1', selectData.midGateOpen == '1', selectData.rearGateOpen == '1');
|
|
|
- // } else if (index == 5) {
|
|
|
- // modelRef5.value[0]?.animate?.(selectData.frontGateOpen == '1', selectData.midGateOpen == '1', selectData.rearGateOpen == '1');
|
|
|
- // } else if (index == 6) {
|
|
|
- // modelRef6.value[0]?.animate?.(selectData.frontGateOpen == '1', selectData.midGateOpen == '1', selectData.rearGateOpen == '1');
|
|
|
- // } else if (index == 7) {
|
|
|
- // modelRef7.value[0]?.animate?.(selectData.frontGateOpen == '1', selectData.midGateOpen == '1', selectData.rearGateOpen == '1');
|
|
|
- // } else if (index == 8) {
|
|
|
- // modelRef8.value[0]?.animate?.(selectData.frontGateOpen == '1', selectData.midGateOpen == '1', selectData.rearGateOpen == '1');
|
|
|
- // }
|
|
|
}
|
|
|
|
|
|
|
|
|
watch(() => props.infoData, (newV, oldV) => {
|
|
|
console.log(newV, 'new---')
|
|
|
infoDatas.value = newV
|
|
|
- // if (newV.length) {
|
|
|
- // setTimeout(() => {
|
|
|
- // newV.forEach((el: any, index: number) => {
|
|
|
- // el = Object.assign(el, el.readData)
|
|
|
- // monitorAnimation(el, index);
|
|
|
- // })
|
|
|
- // }, 1000)
|
|
|
+ if (newV.length) {
|
|
|
+ setTimeout(() => {
|
|
|
+ newV.forEach((el: any, index: number) => {
|
|
|
+ el = Object.assign(el, el.readData)
|
|
|
+ monitorAnimation(el, index);
|
|
|
+ })
|
|
|
+ }, 1000)
|
|
|
|
|
|
- // }
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
|