|
@@ -1,5 +1,5 @@
|
|
<template>
|
|
<template>
|
|
- <view class="container">
|
|
|
|
|
|
+ <view style="overflow: auto; height: 100%;">
|
|
<!-- 建议放在外层 -->
|
|
<!-- 建议放在外层 -->
|
|
<u-navbar :title="name" @leftClick="backPage" :bgImage="backPic">
|
|
<u-navbar :title="name" @leftClick="backPage" :bgImage="backPic">
|
|
<view class="u-nav-slot" slot="left">
|
|
<view class="u-nav-slot" slot="left">
|
|
@@ -9,111 +9,212 @@
|
|
<view class="main">
|
|
<view class="main">
|
|
<view class="u-page container">
|
|
<view class="u-page container">
|
|
<div class="button-grid flcard" v-if="this.TabCur == 'gate'">
|
|
<div class="button-grid flcard" v-if="this.TabCur == 'gate'">
|
|
- <u-button type="primary" shape="circle" text="打开前门"></u-button>
|
|
|
|
- <u-button type="primary" shape="circle" text="关闭前门"></u-button>
|
|
|
|
- <u-button type="primary" shape="circle" text="打开后门"></u-button>
|
|
|
|
- <u-button type="primary" shape="circle" text="关闭后门"></u-button>
|
|
|
|
- <u-button type="primary" shape="circle" text="打开前后门"></u-button>
|
|
|
|
- <u-button type="primary" shape="circle" text="关闭前后门"></u-button>
|
|
|
|
- <!-- <div class="additional-div">
|
|
|
|
- <span>控制模式:</span>
|
|
|
|
- <u-checkbox-group
|
|
|
|
- v-model="checked"
|
|
|
|
- iconPlacement="left"
|
|
|
|
- placement="row"
|
|
|
|
- >
|
|
|
|
- <u-checkbox
|
|
|
|
- type="primary"
|
|
|
|
- shape="circle"
|
|
|
|
- label="就地"
|
|
|
|
- style="margin-right: 20rpx"
|
|
|
|
- ></u-checkbox>
|
|
|
|
- <u-checkbox
|
|
|
|
- type="primary"
|
|
|
|
- shape="circle"
|
|
|
|
- label="远程"
|
|
|
|
- ></u-checkbox>
|
|
|
|
- </u-checkbox-group>
|
|
|
|
- </div> -->
|
|
|
|
|
|
+ <u-button
|
|
|
|
+ type="primary"
|
|
|
|
+ shape="circle"
|
|
|
|
+ text="打开前门"
|
|
|
|
+ @click="showPasswordDialog('frontGateOpen_S')"
|
|
|
|
+ ></u-button>
|
|
|
|
+ <u-button
|
|
|
|
+ type="primary"
|
|
|
|
+ shape="circle"
|
|
|
|
+ text="关闭前门"
|
|
|
|
+ @click="showPasswordDialog('frontGateClose_S')"
|
|
|
|
+ ></u-button>
|
|
|
|
+ <u-button
|
|
|
|
+ type="primary"
|
|
|
|
+ shape="circle"
|
|
|
|
+ text="打开后门"
|
|
|
|
+ @click="showPasswordDialog('rearGateOpen_S')"
|
|
|
|
+ ></u-button>
|
|
|
|
+ <u-button
|
|
|
|
+ type="primary"
|
|
|
|
+ shape="circle"
|
|
|
|
+ text="关闭后门"
|
|
|
|
+ @click="showPasswordDialog('rearGateClose_S')"
|
|
|
|
+ ></u-button>
|
|
|
|
+ <u-button
|
|
|
|
+ type="primary"
|
|
|
|
+ shape="circle"
|
|
|
|
+ text="打开前后门"
|
|
|
|
+ @click="showPasswordDialog('sameTimeOpen')"
|
|
|
|
+ ></u-button>
|
|
|
|
+ <u-button
|
|
|
|
+ type="primary"
|
|
|
|
+ shape="circle"
|
|
|
|
+ text="关闭前后门"
|
|
|
|
+ @click="showPasswordDialog('sameTimeClose')"
|
|
|
|
+ ></u-button>
|
|
</div>
|
|
</div>
|
|
<div class="button-grid flcard" v-if="this.TabCur == 'window'">
|
|
<div class="button-grid flcard" v-if="this.TabCur == 'window'">
|
|
<u-button type="primary" shape="circle" text="设定面积"></u-button>
|
|
<u-button type="primary" shape="circle" text="设定面积"></u-button>
|
|
</div>
|
|
</div>
|
|
- <div class="flcard door-container" v-if="this.TabCur == 'gate'">
|
|
|
|
- <div class="door">
|
|
|
|
- <div class="left_door" id="leftdoor"></div>
|
|
|
|
- <div class="right_door" id="rightdoor"></div>
|
|
|
|
- <div
|
|
|
|
- style="
|
|
|
|
- position: absolute;
|
|
|
|
- top: 30%;
|
|
|
|
- left: 25%;
|
|
|
|
- transform: translate(-50%);
|
|
|
|
- z-index: 5;
|
|
|
|
- font-weight: 900px;
|
|
|
|
- color: #00ff00;
|
|
|
|
- "
|
|
|
|
- >
|
|
|
|
- <span style="font-size: 30px">前门</span>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div class="flcard" v-if="this.TabCur == 'gate' && this.ndoorcount == 2">
|
|
|
|
+ <div class="door-container">
|
|
|
|
+ <div style="">
|
|
|
|
+ <div class="door">
|
|
|
|
+ <div
|
|
|
|
+ class="left_door"
|
|
|
|
+ id="leftdoor"
|
|
|
|
+ :animation="animationData"
|
|
|
|
+ ></div>
|
|
|
|
+ <div
|
|
|
|
+ class="right_door"
|
|
|
|
+ id="rightdoor"
|
|
|
|
+ :animation="animationData"
|
|
|
|
+ ></div>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <video src="" controls></video>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
<div class="door">
|
|
<div class="door">
|
|
- <div class="left_door" id="leftdoor1"></div>
|
|
|
|
- <div class="right_door" id="rightdoor2"></div>
|
|
|
|
- <div
|
|
|
|
- style="
|
|
|
|
- position: absolute;
|
|
|
|
- top: 30%;
|
|
|
|
- right: 13%;
|
|
|
|
- transform: translate(-50%);
|
|
|
|
- z-index: 5;
|
|
|
|
- font-weight: 900px;
|
|
|
|
- color: #00ff00;
|
|
|
|
- "
|
|
|
|
- >
|
|
|
|
- <span style="font-size: 30px">后门</span>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="flcard door-container" v-if="this.TabCur == 'window'">
|
|
|
|
- <div class="autowindow_new">
|
|
|
|
- <div
|
|
|
|
- class="window_new_1"
|
|
|
|
- id="subwindowpic11"
|
|
|
|
- :style="`transform: rotateX(${frontAngle}deg)`"
|
|
|
|
- ></div>
|
|
|
|
- <div
|
|
|
|
- class="window_new_2"
|
|
|
|
- id="subwindowpic12"
|
|
|
|
- :style="`transform: rotateX(${frontAngle}deg)`"
|
|
|
|
- ></div>
|
|
|
|
- <div
|
|
|
|
- class="window_new_3"
|
|
|
|
- id="subwindowpic13"
|
|
|
|
- :style="`transform: rotateX(${frontAngle}deg)`"
|
|
|
|
- ></div>
|
|
|
|
<div
|
|
<div
|
|
- class="window_new_4"
|
|
|
|
- id="subwindowpic14"
|
|
|
|
- :style="`transform: rotateX(${frontAngle}deg)`"
|
|
|
|
|
|
+ class="left_door"
|
|
|
|
+ id="leftdoor1"
|
|
|
|
+ :animation="animationData"
|
|
></div>
|
|
></div>
|
|
<div
|
|
<div
|
|
- class="window_new_5"
|
|
|
|
- id="subwindowpic15"
|
|
|
|
- :style="`transform: rotateX(${frontAngle}deg)`"
|
|
|
|
|
|
+ class="right_door"
|
|
|
|
+ id="rightdoor1"
|
|
|
|
+ :animation="animationData"
|
|
></div>
|
|
></div>
|
|
</div>
|
|
</div>
|
|
- <div
|
|
|
|
- style="
|
|
|
|
- position: absolute;
|
|
|
|
- top: 34%;
|
|
|
|
- left: 25%;
|
|
|
|
- transform: translate(-50%);
|
|
|
|
- z-index: 5;
|
|
|
|
- color: #6a7a9b;
|
|
|
|
- "
|
|
|
|
- >
|
|
|
|
- <span style="font-size: 15px; font-weight: 50px">风窗动画</span>
|
|
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="flcard" v-if="this.TabCur == 'gate' && this.ndoorcount == 3">
|
|
|
|
+ <div class="door-container">
|
|
|
|
+ <div class="door">
|
|
|
|
+ <div
|
|
|
|
+ class="left_door"
|
|
|
|
+ id="leftdoor"
|
|
|
|
+ :animation="animationData"
|
|
|
|
+ ></div>
|
|
|
|
+ <div
|
|
|
|
+ class="right_door"
|
|
|
|
+ id="rightdoor"
|
|
|
|
+ :animation="animationData"
|
|
|
|
+ ></div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="door">
|
|
|
|
+ <div
|
|
|
|
+ class="left_door"
|
|
|
|
+ id="leftdoor1"
|
|
|
|
+ :animation="animationData"
|
|
|
|
+ ></div>
|
|
|
|
+ <div
|
|
|
|
+ class="right_door"
|
|
|
|
+ id="rightdoor1"
|
|
|
|
+ :animation="animationData"
|
|
|
|
+ ></div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="door">
|
|
|
|
+ <div
|
|
|
|
+ class="left_door"
|
|
|
|
+ id="leftdoor1"
|
|
|
|
+ :animation="animationData"
|
|
|
|
+ ></div>
|
|
|
|
+ <div
|
|
|
|
+ class="right_door"
|
|
|
|
+ id="rightdoor1"
|
|
|
|
+ :animation="animationData"
|
|
|
|
+ ></div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ class="flcard"
|
|
|
|
+ v-if="this.TabCur == 'window' && this.nwindownum == 1"
|
|
|
|
+ >
|
|
|
|
+ <div class="window-container">
|
|
|
|
+ <div class="autowindow_new">
|
|
|
|
+ <div
|
|
|
|
+ class="window_new_1"
|
|
|
|
+ id="subwindowpic11"
|
|
|
|
+
|
|
|
|
+ ></div>
|
|
|
|
+ <div
|
|
|
|
+ class="window_new_2"
|
|
|
|
+ id="subwindowpic12"
|
|
|
|
+
|
|
|
|
+ ></div>
|
|
|
|
+ <div
|
|
|
|
+ class="window_new_3"
|
|
|
|
+ id="subwindowpic13"
|
|
|
|
+
|
|
|
|
+ ></div>
|
|
|
|
+ <div
|
|
|
|
+ class="window_new_4"
|
|
|
|
+ id="subwindowpic14"
|
|
|
|
+
|
|
|
|
+ ></div>
|
|
|
|
+ <div
|
|
|
|
+ class="window_new_5"
|
|
|
|
+ id="subwindowpic15"
|
|
|
|
+
|
|
|
|
+ ></div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ class="flcard"
|
|
|
|
+ v-if="this.TabCur == 'window' && this.nwindownum == 2"
|
|
|
|
+ >
|
|
|
|
+ <div class="window-container">
|
|
|
|
+ <div class="autowindow_new">
|
|
|
|
+ <div
|
|
|
|
+ class="window_new_1"
|
|
|
|
+ id="subwindowpic11"
|
|
|
|
+
|
|
|
|
+ ></div>
|
|
|
|
+ <div
|
|
|
|
+ class="window_new_2"
|
|
|
|
+ id="subwindowpic12"
|
|
|
|
+
|
|
|
|
+ ></div>
|
|
|
|
+ <div
|
|
|
|
+ class="window_new_3"
|
|
|
|
+ id="subwindowpic13"
|
|
|
|
+
|
|
|
|
+ ></div>
|
|
|
|
+ <div
|
|
|
|
+ class="window_new_4"
|
|
|
|
+ id="subwindowpic14"
|
|
|
|
+
|
|
|
|
+ ></div>
|
|
|
|
+ <div
|
|
|
|
+ class="window_new_5"
|
|
|
|
+ id="subwindowpic15"
|
|
|
|
+
|
|
|
|
+ ></div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="autowindow_new" style="margin-top: 20px">
|
|
|
|
+ <div
|
|
|
|
+ class="window_new_1"
|
|
|
|
+ id="subwindowpic11"
|
|
|
|
+
|
|
|
|
+ ></div>
|
|
|
|
+ <div
|
|
|
|
+ class="window_new_2"
|
|
|
|
+ id="subwindowpic12"
|
|
|
|
+
|
|
|
|
+ ></div>
|
|
|
|
+ <div
|
|
|
|
+ class="window_new_3"
|
|
|
|
+ id="subwindowpic13"
|
|
|
|
+
|
|
|
|
+ ></div>
|
|
|
|
+ <div
|
|
|
|
+ class="window_new_4"
|
|
|
|
+ id="subwindowpic14"
|
|
|
|
+
|
|
|
|
+ ></div>
|
|
|
|
+ <div
|
|
|
|
+ class="window_new_5"
|
|
|
|
+ id="subwindowpic15"
|
|
|
|
+
|
|
|
|
+ ></div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="flcard">
|
|
<div class="flcard">
|
|
@@ -170,8 +271,11 @@
|
|
? 'url(\'../../../../static/model/windM3.png\')'
|
|
? 'url(\'../../../../static/model/windM3.png\')'
|
|
: item.monitorcode === 'fsectarea'
|
|
: item.monitorcode === 'fsectarea'
|
|
? 'url(\'../../../../static/model/duanArea.png\')'
|
|
? 'url(\'../../../../static/model/duanArea.png\')'
|
|
- :item.monitorcode === 'incipientWindSpeed1' || item.monitorcode === 'incipientWindSpeed2' || item.monitorcode === 'incipientWindSpeed3'|| item.monitorcode === 'va'
|
|
|
|
- ? 'url(\'../../../../static/model/fengsu.png\')'
|
|
|
|
|
|
+ : item.monitorcode === 'incipientWindSpeed1' ||
|
|
|
|
+ item.monitorcode === 'incipientWindSpeed2' ||
|
|
|
|
+ item.monitorcode === 'incipientWindSpeed3' ||
|
|
|
|
+ item.monitorcode === 'va'
|
|
|
|
+ ? 'url(\'../../../../static/model/fengsu.png\')'
|
|
: 'url(\'\')',
|
|
: 'url(\'\')',
|
|
backgroundSize: '100% 100%',
|
|
backgroundSize: '100% 100%',
|
|
}"
|
|
}"
|
|
@@ -182,6 +286,27 @@
|
|
</div>
|
|
</div>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="passwordPopup">
|
|
|
|
+ <u-popup
|
|
|
|
+ :show="show"
|
|
|
|
+ mode="bottom"
|
|
|
|
+ :round="14"
|
|
|
|
+ :safeAreaInsetBottom="false"
|
|
|
|
+ >
|
|
|
|
+ <view style="margin-top: 15px">请输入密码:</view>
|
|
|
|
+ <u-input
|
|
|
|
+ style="margin-top: 15px"
|
|
|
|
+ v-model="password"
|
|
|
|
+ type="password"
|
|
|
|
+ ></u-input>
|
|
|
|
+ <view class="btns">
|
|
|
|
+ <u-button type="primary" shape="circle" @click="confirmPassword()"
|
|
|
|
+ >确认</u-button
|
|
|
|
+ >
|
|
|
|
+ <u-button shape="circle" @click="cancelPassword()">取消</u-button>
|
|
|
|
+ </view>
|
|
|
|
+ </u-popup>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -198,6 +323,22 @@ export default {
|
|
checked: [],
|
|
checked: [],
|
|
backPic: "url(../../../../static/topnavbar.png)",
|
|
backPic: "url(../../../../static/topnavbar.png)",
|
|
frontAngle: "", //风窗打开角度
|
|
frontAngle: "", //风窗打开角度
|
|
|
|
+ nwindownum: "", //风窗道数
|
|
|
|
+ ndoorcount:'',//风门道数
|
|
|
|
+ deviceType: "", //设备类型
|
|
|
|
+ show: false, //密码弹窗是否显示
|
|
|
|
+ password: "", //控制设备密码
|
|
|
|
+ paramcode: "", //控制字段
|
|
|
|
+ popupStyle: {
|
|
|
|
+ // 弹窗样式
|
|
|
|
+ "background-color": "#fff",
|
|
|
|
+ padding: "20px",
|
|
|
|
+ "box-shadow": "0 2px 4px rgba(0, 0, 0, 0.1)",
|
|
|
|
+ },
|
|
|
|
+ frontGateStatus: "", //前门状态
|
|
|
|
+ rearGateStatus: "", //后门状态
|
|
|
|
+ animationData:{},
|
|
|
|
+ animationDuration: 500, // 动画持续时间
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onLoad(query) {
|
|
onLoad(query) {
|
|
@@ -212,11 +353,39 @@ export default {
|
|
this.getShowList();
|
|
this.getShowList();
|
|
},
|
|
},
|
|
components: {},
|
|
components: {},
|
|
- watch: {},
|
|
|
|
|
|
+ onShow() {
|
|
|
|
+ var animation = uni.createAnimation({
|
|
|
|
+ duration: 400,
|
|
|
|
+ timingFunction: "linear",
|
|
|
|
+ });
|
|
|
|
+ this.animation = animation;
|
|
|
|
+ },
|
|
created() {
|
|
created() {
|
|
this.getDeviceInfo(this.itemId);
|
|
this.getDeviceInfo(this.itemId);
|
|
},
|
|
},
|
|
|
|
+ mounted() {
|
|
|
|
+ this.startTimer();
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
|
|
+ startTimer() {
|
|
|
|
+ this.timer = setInterval(() => {
|
|
|
|
+ // 执行定时任务
|
|
|
|
+ this.getDeviceInfo(this.itemId);
|
|
|
|
+ console.log("定时任务执行中...");
|
|
|
|
+ }, 5000);
|
|
|
|
+ },
|
|
|
|
+ stopTimer() {
|
|
|
|
+ // 停止定时器
|
|
|
|
+ clearInterval(this.timer);
|
|
|
|
+ },
|
|
|
|
+ // 返回上一个页面
|
|
|
|
+ backPage() {
|
|
|
|
+ this.$destroy();
|
|
|
|
+ uni.navigateBack({
|
|
|
|
+ delta: 1,
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //获取app展示字段数据
|
|
getShowList() {
|
|
getShowList() {
|
|
const params = {
|
|
const params = {
|
|
devicekind: this.TabCur,
|
|
devicekind: this.TabCur,
|
|
@@ -230,17 +399,16 @@ export default {
|
|
.then((response) => {
|
|
.then((response) => {
|
|
if (response.data.code == 200) {
|
|
if (response.data.code == 200) {
|
|
this.typeList = response.data.result.records;
|
|
this.typeList = response.data.result.records;
|
|
- console.log(this.typeList, "返回内容");
|
|
|
|
} else {
|
|
} else {
|
|
resolve(response);
|
|
resolve(response);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
.catch((error) => {
|
|
.catch((error) => {
|
|
- console.log("catch===>response", response);
|
|
|
|
reject(error);
|
|
reject(error);
|
|
});
|
|
});
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ //获取详情数据
|
|
getDeviceInfo(ID) {
|
|
getDeviceInfo(ID) {
|
|
let IDString = String(ID); // 将 ID 转换为字符串
|
|
let IDString = String(ID); // 将 ID 转换为字符串
|
|
new Promise((resolve, reject) => {
|
|
new Promise((resolve, reject) => {
|
|
@@ -250,39 +418,114 @@ export default {
|
|
if (response.data.code == 200) {
|
|
if (response.data.code == 200) {
|
|
this.tableData =
|
|
this.tableData =
|
|
response.data.result.msgTxt[0].datalist[0].readData;
|
|
response.data.result.msgTxt[0].datalist[0].readData;
|
|
- if (this.tableData.frontGateOpen == 1) {
|
|
|
|
|
|
+ if (this.tableData.frontGateOpen == "1") {
|
|
this.tableData.frontGateOpen = "打开";
|
|
this.tableData.frontGateOpen = "打开";
|
|
} else {
|
|
} else {
|
|
this.tableData.frontGateOpen = "关闭";
|
|
this.tableData.frontGateOpen = "关闭";
|
|
}
|
|
}
|
|
- if (this.tableData.rearGateOpen == 1) {
|
|
|
|
- rearGateOpen = "打开";
|
|
|
|
|
|
+ if (this.tableData.rearGateOpen == "1") {
|
|
|
|
+ this.tableData.rearGateOpen = "打开";
|
|
} else {
|
|
} else {
|
|
this.tableData.rearGateOpen = "关闭";
|
|
this.tableData.rearGateOpen = "关闭";
|
|
}
|
|
}
|
|
- this.tableData.push(
|
|
|
|
- response.data.result.msgTxt[0].datalist[0].readTime
|
|
|
|
- );
|
|
|
|
|
|
+ this.nwindownum =
|
|
|
|
+ response.data.result.msgTxt[0].datalist[0].nwindownum;
|
|
|
|
+ this.ndoorcount =
|
|
|
|
+ response.data.result.msgTxt[0].datalist[0].ndoorcount;
|
|
|
|
+ this.deviceType =
|
|
|
|
+ response.data.result.msgTxt[0].datalist[0].deviceType;
|
|
|
|
+ // this.tableData.push(
|
|
|
|
+ // response.data.result.msgTxt[0].datalist[0].readTime
|
|
|
|
+ // );
|
|
|
|
+ this.frontGateStatus = this.tableData.frontGateOpen;
|
|
|
|
+ this.rearGateStatus = this.tableData.rearGateOpen;
|
|
} else {
|
|
} else {
|
|
resolve(response);
|
|
resolve(response);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
.catch((error) => {
|
|
.catch((error) => {
|
|
- console.log("catch===>response", response);
|
|
|
|
reject(error);
|
|
reject(error);
|
|
});
|
|
});
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- backPage() {
|
|
|
|
- uni.navigateBack({
|
|
|
|
- delta: 1,
|
|
|
|
|
|
+ //设备控制
|
|
|
|
+ ctrlDevice(pass) {
|
|
|
|
+ let IDString = String(this.itemId); // 将 ID 转换为字符串
|
|
|
|
+ const params = {
|
|
|
|
+ deviceid: IDString,
|
|
|
|
+ devicetype: this.deviceType,
|
|
|
|
+ paramcode: this.paramcode,
|
|
|
|
+ password: pass,
|
|
|
|
+ value: "",
|
|
|
|
+ };
|
|
|
|
+ new Promise((resolve, reject) => {
|
|
|
|
+ api
|
|
|
|
+ .controlDevice(params)
|
|
|
|
+ .then((response) => {
|
|
|
|
+ if (response.data.code == 200) {
|
|
|
|
+ this.getDeviceInfo(IDString);
|
|
|
|
+ // console.log("操作成功");
|
|
|
|
+ } else {
|
|
|
|
+ resolve(response);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .catch((error) => {
|
|
|
|
+ reject(error);
|
|
|
|
+ });
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ // 显示密码输入弹窗
|
|
|
|
+ showPasswordDialog(controlCode) {
|
|
|
|
+ this.paramcode = controlCode;
|
|
|
|
+ this.show = true;
|
|
|
|
+ },
|
|
|
|
+ // 取消密码输入
|
|
|
|
+ cancelPassword() {
|
|
|
|
+ this.show = false;
|
|
|
|
+ },
|
|
|
|
+ confirmPassword() {
|
|
|
|
+ this.ctrlDevice(this.password);
|
|
|
|
+ // 发起请求后关闭密码输入弹窗
|
|
|
|
+ this.show = false;
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ //风门打开
|
|
|
|
+ openDoor() {
|
|
|
|
+ if (!this.frontGateStatus) {
|
|
|
|
+ this.doorRotate()
|
|
|
|
+ }else if( !this.rearGateStatus){
|
|
|
|
+ this.doorRotate()
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ //风门关闭
|
|
|
|
+ closeDoor() {
|
|
|
|
+ if (this.frontGateStatus) {
|
|
|
|
+ this.door1Rotate()
|
|
|
|
+ }else if (this.rearGateStatus){
|
|
|
|
+ this.door1Rotate()
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ doorRotate(){
|
|
|
|
+ this.animation.rotateY(100).step()
|
|
|
|
+ this.animationData = this.animation.export()
|
|
|
|
+ },
|
|
|
|
+ door1Rotate(){
|
|
|
|
+ this.animation.rotateY(-100).step()
|
|
|
|
+ this.animationData = this.animation.export()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ destroyed() {
|
|
|
|
+ // 停止定时器
|
|
|
|
+ this.stopTimer();
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style>
|
|
<style>
|
|
|
|
+passwordPopup {
|
|
|
|
+ height: 300rpx;
|
|
|
|
+ background-color: #fff;
|
|
|
|
+}
|
|
.top-nav {
|
|
.top-nav {
|
|
background-image: url(../../../../static/topnavbar.png);
|
|
background-image: url(../../../../static/topnavbar.png);
|
|
background-size: cover; /* 背景图片大小适应 */
|
|
background-size: cover; /* 背景图片大小适应 */
|
|
@@ -297,7 +540,6 @@ export default {
|
|
.container {
|
|
.container {
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
- height: 90vh; /* 设置容器高度为视窗高度 */
|
|
|
|
}
|
|
}
|
|
.button-grid {
|
|
.button-grid {
|
|
display: grid;
|
|
display: grid;
|
|
@@ -311,20 +553,21 @@ export default {
|
|
margin-bottom: 5rpx;
|
|
margin-bottom: 5rpx;
|
|
}
|
|
}
|
|
.door-container {
|
|
.door-container {
|
|
- display: flex;
|
|
|
|
}
|
|
}
|
|
.door {
|
|
.door {
|
|
background-image: url(../../../../static/door.png);
|
|
background-image: url(../../../../static/door.png);
|
|
background-size: 100% 100%;
|
|
background-size: 100% 100%;
|
|
- display: inline-block;
|
|
|
|
|
|
+ width: 200px;
|
|
|
|
+ height: 200px;
|
|
|
|
+ /* display: inline-block; */
|
|
vertical-align: top;
|
|
vertical-align: top;
|
|
- height: 24vh;
|
|
|
|
|
|
+ /* height: 24vh; */
|
|
flex: 1;
|
|
flex: 1;
|
|
margin-right: 10px; /* 可以根据需要调整间距 */
|
|
margin-right: 10px; /* 可以根据需要调整间距 */
|
|
}
|
|
}
|
|
.left_door {
|
|
.left_door {
|
|
margin-left: 8%;
|
|
margin-left: 8%;
|
|
- margin-top: 15%;
|
|
|
|
|
|
+ margin-top: 8%;
|
|
width: 42%;
|
|
width: 42%;
|
|
height: calc(19.5vh + 3px);
|
|
height: calc(19.5vh + 3px);
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
@@ -335,7 +578,7 @@ export default {
|
|
background-size: 100% 100%;
|
|
background-size: 100% 100%;
|
|
}
|
|
}
|
|
.right_door {
|
|
.right_door {
|
|
- margin-top: 15%;
|
|
|
|
|
|
+ margin-top: 8%;
|
|
width: 42%;
|
|
width: 42%;
|
|
height: calc(19.5vh + 3px);
|
|
height: calc(19.5vh + 3px);
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
@@ -518,4 +761,8 @@ div.window_new_5 {
|
|
transition: all 2s ease;
|
|
transition: all 2s ease;
|
|
transform-origin: center center;
|
|
transform-origin: center center;
|
|
}
|
|
}
|
|
|
|
+.btns {
|
|
|
|
+ display: flex;
|
|
|
|
+ margin-top: 15px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|