|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="gesture">
|
|
|
- <Header :showClose="false" :showTool="false"></Header>
|
|
|
+ <Header :showTool="false" @confirmExit="getLogout"></Header>
|
|
|
<div class="menu">
|
|
|
<swiper v-if="projectList.length" :slides-per-view="5" :space-between="0" :initialSlide="2" :loop="true"
|
|
|
:centeredSlides="true" :modules="[Navigation]" @swiper="onSwiper">
|
|
@@ -15,6 +15,13 @@
|
|
|
</swiper>
|
|
|
</div>
|
|
|
<OptionWindow ref="optionWindowRef" :projectList="projectList" />
|
|
|
+
|
|
|
+ <div style=" width: 100%; color: #ffffff; font-size:1.5rem; text-align: center; position:fixed; bottom: 10px; ">
|
|
|
+ 模拟发送手势:
|
|
|
+ <div @click="getCmdtest(1)">1、左滑动</div>
|
|
|
+ <div @click="getCmdtest(2)">2、举左手</div>
|
|
|
+ <div @click="getCmdtest(3)">3、双手胸前交叉</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -130,6 +137,45 @@ const getHandWs = () => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+/**
|
|
|
+ * 模拟发送手势
|
|
|
+*/
|
|
|
+const getCmdtest = (data: any) => {
|
|
|
+ let params = {
|
|
|
+ hctrl_name: `handcontroller_${device_info.value.handcontroller_id}`,
|
|
|
+ cmd: data
|
|
|
+ };
|
|
|
+ proxy?.$http.common.cmdtest(params).then((res: any) => {
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+/**
|
|
|
+ * 退出
|
|
|
+*/
|
|
|
+const getLogout = () => {
|
|
|
+ proxy?.$modal.prompt("请输入密码").then((e: any) => {
|
|
|
+ // console.log("e", e)
|
|
|
+ if (e.action == 'confirm' && e.value) {
|
|
|
+ let params = {
|
|
|
+ password: e.value
|
|
|
+ };
|
|
|
+ proxy?.$http.common.checkPassword(params).then((res: any) => {
|
|
|
+ if (res.status === 200 || res.status === 1) {
|
|
|
+ proxy?.$http.common.logout({}).then((res: any) => {
|
|
|
+ });
|
|
|
+ proxy?.$modal?.closeLoading()
|
|
|
+ //清空缓存
|
|
|
+ localStorage.clear();
|
|
|
+ //跳转
|
|
|
+ router.push({ path: '/login' });
|
|
|
+ } else {
|
|
|
+ proxy?.$modal.msgError(res.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ });
|
|
|
+};
|
|
|
|
|
|
onBeforeMount(() => {
|
|
|
//加载设备WS
|