|
|
@@ -6,9 +6,14 @@
|
|
|
<div class="scene-box">
|
|
|
<div class="top-box">
|
|
|
<div class="top-center row">
|
|
|
- <div v-if="hasPermission('btn:control')" class="button-box" @click="setControl('frontGateOpen_S', '打开')">打开防火门</div>
|
|
|
- <div v-if="hasPermission('btn:control')" class="button-box" @click="setControl('frontGateClose_S', '关闭')">关闭防火门</div>
|
|
|
- <div v-if="hasPermission('btn:stopControl')" class="button-box" @click="setControl('frontGateStop_S', '停止')">关闭防火门</div>
|
|
|
+ <template v-if="selectData.modelType == 'fireDoorSsl'">
|
|
|
+ <div v-if="hasPermission('btn:control')" class="button-box" @click="() => modalContext1.openModal()"> 防火门控制 </div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div v-if="hasPermission('btn:control')" class="button-box" @click="setControl('frontGateOpen_S', '打开')">打开防火门</div>
|
|
|
+ <div v-if="hasPermission('btn:control')" class="button-box" @click="setControl('frontGateClose_S', '关闭')">关闭防火门</div>
|
|
|
+ <div v-if="hasPermission('btn:stopControl')" class="button-box" @click="setControl('frontGateStop_S', '停止')">停止</div>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
<!-- 控制模式 -->
|
|
|
<div class="top-right row">
|
|
|
@@ -181,6 +186,28 @@
|
|
|
@handle-cancel="handleCancel"
|
|
|
/>
|
|
|
<DeviceBaseInfo @register="registerModal" :device-type="selectData['deviceType']" />
|
|
|
+ <BasicModal @register="registerModal1">
|
|
|
+ <div class="flex justify-around mt-20px mb-20px">
|
|
|
+ <div>防火门打开</div>
|
|
|
+ <div>防火门关闭</div>
|
|
|
+ <div>停止</div>
|
|
|
+ </div>
|
|
|
+ <div class="flex justify-around mt-20px mb-20px">
|
|
|
+ <Button type="primary" class="w-120px" @click="setControl('frontGateOpen_S', true)">卷帘门开启</Button>
|
|
|
+ <Button type="primary" class="w-120px" @click="setControl('frontGateClose_S', true)">卷帘门关闭</Button>
|
|
|
+ <Button type="primary" class="w-120px" @click="setControl('frontGateStop_S', true)">卷帘门停止</Button>
|
|
|
+ </div>
|
|
|
+ <div class="flex justify-around mt-20px mb-20px">
|
|
|
+ <Button type="primary" class="w-120px" @click="setControl('MBOpen_S', true)">皮带密闭开启</Button>
|
|
|
+ <Button type="primary" class="w-120px" @click="setControl('MBClose_S', true)">皮带密闭关闭</Button>
|
|
|
+ <Button type="primary" class="w-120px" @click="setControl('MBStop_S', true)">皮带密闭停止</Button>
|
|
|
+ </div>
|
|
|
+ <div class="flex justify-around mt-20px mb-20px">
|
|
|
+ <Button type="primary" class="w-120px" @click="setControl('AllOpen_S', true)">同时开启</Button>
|
|
|
+ <Button type="primary" class="w-120px" @click="setControl('AllClose_S', true)">同时关闭</Button>
|
|
|
+ <Button type="primary" class="w-120px" @click="setControl('AllStop_S', true)">同时停止</Button>
|
|
|
+ </div>
|
|
|
+ </BasicModal>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
@@ -193,13 +220,13 @@
|
|
|
import DeviceBaseInfo from '../comment/components/DeviceBaseInfo.vue';
|
|
|
import { mountedThree, play, destroy, setModelType } from './fireDoor.threejs';
|
|
|
import { deviceControlApi } from '/@/api/vent/index';
|
|
|
- import { message } from 'ant-design-vue';
|
|
|
+ import { message, Button } from 'ant-design-vue';
|
|
|
import { list, getTableList } from './fireDoor.api';
|
|
|
import lodash from 'lodash';
|
|
|
import { setDivHeight } from '/@/utils/event';
|
|
|
import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
|
|
|
import { useRouter } from 'vue-router';
|
|
|
- import { useModal } from '/@/components/Modal';
|
|
|
+ import { useModal, BasicModal } from '/@/components/Modal';
|
|
|
import { useCamera } from '/@/hooks/system/useCamera';
|
|
|
import { usePermission } from '/@/hooks/web/usePermission';
|
|
|
import { getDictItems } from '/@/api/common/api';
|
|
|
@@ -232,6 +259,7 @@
|
|
|
|
|
|
const deviceBaseList = ref([]); // 设备基本信息
|
|
|
const [registerModal, { openModal, closeModal }] = useModal();
|
|
|
+ const [registerModal1, modalContext1] = useModal();
|
|
|
|
|
|
const { getCamera, removeCamera } = useCamera();
|
|
|
|
|
|
@@ -391,12 +419,12 @@
|
|
|
let isOpenRunning = false; //开关门动作是否在进行
|
|
|
/** 开关门动画调用 */
|
|
|
let isdoorOpenRunning = false; //开关门动作是否在进行
|
|
|
- // let isMidCloseRunning = false; //中间门动作是否在进行
|
|
|
+ let isMBRunning = false; //密闭门动作是否在进行
|
|
|
// 0 关闭 1 正在打开 2 打开 3正在关闭
|
|
|
let doorDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
|
|
|
function monitorAnimation(selectData) {
|
|
|
const timeScale = 0.005;
|
|
|
- // 打开
|
|
|
+ // 打开(普通门或卷帘门)
|
|
|
if (selectData.frontGateOpen == '1' && !isdoorOpenRunning) {
|
|
|
isdoorOpenRunning = true;
|
|
|
if (doorDeviceState != 1) {
|
|
|
@@ -406,7 +434,7 @@
|
|
|
doorIsOpen.value = true;
|
|
|
}
|
|
|
}
|
|
|
- // 关闭
|
|
|
+ // 关闭(普通门或卷帘门)
|
|
|
if (selectData.frontGateOpen == '0' && isdoorOpenRunning) {
|
|
|
isdoorOpenRunning = false;
|
|
|
if (doorDeviceState != 0) {
|
|
|
@@ -416,6 +444,16 @@
|
|
|
doorIsOpen.value = false;
|
|
|
}
|
|
|
}
|
|
|
+ // 皮带密闭开
|
|
|
+ if (selectData.MBOpen == '1' && !isMBRunning) {
|
|
|
+ isMBRunning = true;
|
|
|
+ play(3, timeScale);
|
|
|
+ }
|
|
|
+ // 皮带密闭关
|
|
|
+ if (selectData.MBOpen == '0' && isMBRunning) {
|
|
|
+ isMBRunning = false;
|
|
|
+ play(4, timeScale);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function handleCancel() {
|
|
|
@@ -449,7 +487,7 @@
|
|
|
destroy();
|
|
|
});
|
|
|
</script>
|
|
|
-,
|
|
|
+
|
|
|
<style lang="less" scoped>
|
|
|
@import '/@/design/vent/modal.less';
|
|
|
.scene-box {
|