|
@@ -124,11 +124,11 @@
|
|
|
<text>3</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="airCantInfo" v-if="environmentJudge">
|
|
|
+ <!-- <view class="airCantInfo" v-if="environmentJudge">
|
|
|
<text>暂未配置环境数据...</text>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<view class="airbody">
|
|
|
- <view class="airTitle">环境配置</view>
|
|
|
+ <view class="airTitle">参数配置</view>
|
|
|
<view class="wifItem" style="margin-top: 30rpx">
|
|
|
<text>X轴范围(cm)</text>
|
|
|
<view class="inputBox">
|
|
@@ -202,6 +202,64 @@
|
|
|
</picker>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="wifItem" style="margin-top: 30rpx">
|
|
|
+ <text>坐摔检测</text>
|
|
|
+ <view class="inputBox">
|
|
|
+ <switch
|
|
|
+ :checked="enabled == 1"
|
|
|
+ @change="onChange"
|
|
|
+ :active-value="1"
|
|
|
+ :inactive-value="0"
|
|
|
+ size="24px"
|
|
|
+ active-color="#07c160"
|
|
|
+ inactive-color="#eeeff1"
|
|
|
+ style="transform: scale(0.8); margin-left: auto"
|
|
|
+ />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <template v-if="enabled == 1">
|
|
|
+ <view class="wifItem" style="margin-top: 30rpx">
|
|
|
+ <text>坐摔最低高度(m)</text>
|
|
|
+ <view class="inputBox">
|
|
|
+ <input
|
|
|
+ type="number"
|
|
|
+ v-model="lowZMax"
|
|
|
+ placeholder="请输入坐摔最低高度"
|
|
|
+ />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="wifItem" style="margin-top: 30rpx">
|
|
|
+ <text>坐摔门限</text>
|
|
|
+ <view class="inputBox">
|
|
|
+ <input
|
|
|
+ type="number"
|
|
|
+ v-model="humanPredThreshold"
|
|
|
+ placeholder="请输入坐摔门限"
|
|
|
+ />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="wifItem" style="margin-top: 30rpx">
|
|
|
+ <text>最小连续坐摔判断</text>
|
|
|
+ <view class="inputBox">
|
|
|
+ <input
|
|
|
+ type="number"
|
|
|
+ v-model="minEventsForDetection"
|
|
|
+ placeholder="请输入最小连续坐摔判断"
|
|
|
+ />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="wifItem" style="margin-top: 30rpx">
|
|
|
+ <text>最小连续坐摔次数</text>
|
|
|
+ <view class="inputBox">
|
|
|
+ <input
|
|
|
+ type="number"
|
|
|
+ v-model="minHumanEventsForDetection"
|
|
|
+ placeholder="请输入最小连续坐摔次数"
|
|
|
+ />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+
|
|
|
<!-- <view class="wifItem" style="margin-top: 30rpx">
|
|
|
<text>安装方式</text>
|
|
|
<view class="inputBox">
|
|
@@ -242,7 +300,7 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
-const airkiss = requirePlugin("airkiss");
|
|
|
+// const airkiss = requirePlugin("airkiss");
|
|
|
export default {
|
|
|
name: "my",
|
|
|
data() {
|
|
@@ -278,6 +336,12 @@ export default {
|
|
|
// statusLight: 1,
|
|
|
showDeviceInfo: false,
|
|
|
devInfo: "",
|
|
|
+ // 坐摔参数
|
|
|
+ enabled: 0,
|
|
|
+ lowZMax: 0.5,
|
|
|
+ humanPredThreshold: 0.78,
|
|
|
+ minEventsForDetection: 3,
|
|
|
+ minHumanEventsForDetection: 2,
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -328,13 +392,9 @@ export default {
|
|
|
this.mountPlain = "Ceiling";
|
|
|
}
|
|
|
},
|
|
|
- // onChange({ detail }) {
|
|
|
- // this.statusLight = detail;
|
|
|
- // if(detail){
|
|
|
-
|
|
|
- // }
|
|
|
- // console.log(this.statusLight, 9999);
|
|
|
- // },
|
|
|
+ onChange({ detail }) {
|
|
|
+ this.enabled = detail.value == true ? 1 : 0;
|
|
|
+ },
|
|
|
goNextTip() {
|
|
|
if (!this.devName.length > 10) {
|
|
|
uni.showModal({
|
|
@@ -460,37 +520,39 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
- } else {
|
|
|
- this.$http
|
|
|
- .post("wap/device/deviceBinding", deviceBandingParams, {
|
|
|
- header: {
|
|
|
- "Content-Type": "application/json;charset=UTF-8",
|
|
|
- },
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- uni.showToast({
|
|
|
- title: "绑定成功",
|
|
|
- icon: "success",
|
|
|
- duration: 1500,
|
|
|
- });
|
|
|
- uni.setStorageSync("devId", res.data.data.devId);
|
|
|
- uni.reLaunch({
|
|
|
- url:
|
|
|
- "/pagesA/roomSetting/roomSetting?devId=" +
|
|
|
- res.data.data.devId +
|
|
|
- "&clientId=" +
|
|
|
- res.data.data.clientId,
|
|
|
- });
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- title: res.data.message,
|
|
|
- icon: "none",
|
|
|
- duration: 1500,
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
}
|
|
|
+
|
|
|
+ // else {
|
|
|
+ // this.$http
|
|
|
+ // .post("wap/device/deviceBinding", deviceBandingParams, {
|
|
|
+ // header: {
|
|
|
+ // "Content-Type": "application/json;charset=UTF-8",
|
|
|
+ // },
|
|
|
+ // })
|
|
|
+ // .then((res) => {
|
|
|
+ // if (res.data.code == 200) {
|
|
|
+ // uni.showToast({
|
|
|
+ // title: "绑定成功",
|
|
|
+ // icon: "success",
|
|
|
+ // duration: 1500,
|
|
|
+ // });
|
|
|
+ // uni.setStorageSync("devId", res.data.data.devId);
|
|
|
+ // uni.reLaunch({
|
|
|
+ // url:
|
|
|
+ // "/pagesA/roomSetting/roomSetting?devId=" +
|
|
|
+ // res.data.data.devId +
|
|
|
+ // "&clientId=" +
|
|
|
+ // res.data.data.clientId,
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // uni.showToast({
|
|
|
+ // title: res.data.message,
|
|
|
+ // icon: "none",
|
|
|
+ // duration: 1500,
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
},
|
|
|
refreshWifi() {
|
|
|
const that = this;
|
|
@@ -626,7 +688,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
onUnload(options) {
|
|
|
- airkiss.stopAirkiss();
|
|
|
+ // airkiss.stopAirkiss();
|
|
|
},
|
|
|
onShow() {},
|
|
|
};
|
|
@@ -878,26 +940,26 @@ export default {
|
|
|
background-color: #e4c5b9;
|
|
|
}
|
|
|
}
|
|
|
- .airCantInfo {
|
|
|
- margin: 40rpx auto 0 auto;
|
|
|
- opacity: 20%;
|
|
|
- width: 300rpx;
|
|
|
- height: 300rpx;
|
|
|
- border: 18rpx solid;
|
|
|
- border-color: #333333;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- text {
|
|
|
- color: #999999;
|
|
|
- font-size: 38rpx;
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
- }
|
|
|
+ // .airCantInfo {
|
|
|
+ // margin: 40rpx auto 0 auto;
|
|
|
+ // opacity: 20%;
|
|
|
+ // width: 300rpx;
|
|
|
+ // height: 300rpx;
|
|
|
+ // border: 18rpx solid;
|
|
|
+ // border-color: #333333;
|
|
|
+ // display: flex;
|
|
|
+ // align-items: center;
|
|
|
+ // justify-content: center;
|
|
|
+ // text {
|
|
|
+ // color: #999999;
|
|
|
+ // font-size: 38rpx;
|
|
|
+ // text-align: center;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
.airbody {
|
|
|
margin: 110rpx auto 0 auto;
|
|
|
width: 700rpx;
|
|
|
- height: 650rpx;
|
|
|
+ max-height: 1000rpx;
|
|
|
background: #ffffff;
|
|
|
border-radius: 38rpx;
|
|
|
padding: 38rpx 38rpx;
|