初始化
This commit is contained in:
129
pages/basics/MakingRoundsAbnormal/MakingRoundsAbnormal.js
Normal file
129
pages/basics/MakingRoundsAbnormal/MakingRoundsAbnormal.js
Normal file
@@ -0,0 +1,129 @@
|
||||
const app = getApp()
|
||||
import {
|
||||
GetHostsInfo,
|
||||
GetMAC,
|
||||
GetFaceSN,
|
||||
ErrorInfo,
|
||||
CheckFaceSN,
|
||||
OpenDoorTest,
|
||||
GetRoomType,
|
||||
GetRoomTypeAndModalsListLog,
|
||||
WebChatUpgrade,
|
||||
QueryUpdateHostStatus,
|
||||
ForwardQueryUpdateHostProgressBar,
|
||||
GetRoomTypeNode,
|
||||
SetRCULight,
|
||||
SetRCUAir,
|
||||
SetRCUCurtain,
|
||||
} from '../../../lib/RequestingCenter.js'
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
RoomIndex:0,
|
||||
//权限信息
|
||||
autho: null,
|
||||
//酒店信息
|
||||
HostsDataFilters:[],
|
||||
toView:"",
|
||||
RoomNumber:"",
|
||||
HotelId:"",
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad:async function(options) {
|
||||
if (!options.HotelId || app.globalData.autho == null) {
|
||||
app.toast(2, "无酒店信息~")
|
||||
return;
|
||||
}
|
||||
if (!options.RoomNumber) {
|
||||
this.setData({
|
||||
autho: app.globalData.autho,
|
||||
HotelId: options.HotelId
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
autho: app.globalData.autho,
|
||||
HotelId: options.HotelId,
|
||||
RoomNumber:options.RoomNumber
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
this.data.autho.forEach((element, index) => {
|
||||
element.Hotels.forEach((elements, indexs) => {
|
||||
if (elements.HotelId == options.HotelId) {
|
||||
this.setData({
|
||||
Hotelinfo: elements
|
||||
})
|
||||
throw new Error();
|
||||
}
|
||||
})
|
||||
});
|
||||
} catch (error) {
|
||||
console.log("已经找到,无需循环~")
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
inputSearchForHotels(e){
|
||||
this.setData({
|
||||
RoomNumber: e.detail.value
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
|
||||
}
|
||||
}
|
||||
53
pages/basics/MakingRoundsAbnormal/MakingRoundsAbnormal.wxml
Normal file
53
pages/basics/MakingRoundsAbnormal/MakingRoundsAbnormal.wxml
Normal file
@@ -0,0 +1,53 @@
|
||||
<cu-custom bgColor="bg-gradual-blue"
|
||||
isBack="true">
|
||||
<block bindtap="back" slot="backText" >返回</block>
|
||||
<view slot="content">{{Hotelinfo.HotelName}}({{Hotelinfo.Code}})</view>
|
||||
</cu-custom>
|
||||
|
||||
<view class=" solids bg-white" style="height:70px ;width: 100%;font-weight: bold; ">
|
||||
<view class="flex text-xl " style=" height:45% ;width: 100%;">
|
||||
<view class="flex solids " wx:if="{{RoomIndex>=0}}" style="height:100% ;width: 60%;">
|
||||
<view class="text-black ">房间号:{{}}</view>
|
||||
</view>
|
||||
<view class="solids " wx:if="{{RoomIndex>=0}}" style="height:100% ;width: 40%;">
|
||||
<text class="text-black">异常记录:</text>
|
||||
<!-- <text class="text-blue">{{onlineNumber}}/</text> -->
|
||||
<text class="text-black">{{HostsDataFilters.length}} </text>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="cu-bar1 bg-white " style="height:50% ;width: 100%;" >
|
||||
<view class="solids" style="width: 60%;">
|
||||
<input class="solids cu-btn1" focus="true" bindinput="inputSearchForHotels" confirm-type="search" style="width: 100%;" value="{{RoomNumber}}"/>
|
||||
</view>
|
||||
|
||||
<view class="flex"style="width: 40%;">
|
||||
<button class="cu-btn1 line-green margin-left " style="width: 100%; margin:5rpx;" bindtap="inputSearchForHotels">搜索</button>
|
||||
<button class="cu-btn1 line-green margin-left " style="width: 100%; margin:5rpx;" bindtap="RefreshTheRoom">维修记录</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y scroll-into-view="{{toView}}" >
|
||||
<view class="cu-list menu margin-top-xs margin-bottom-sm shadow-lg" >
|
||||
<view class="cu-itemz " wx:for="{{20}}" wx:key="index">
|
||||
<view class="flex" style="width: 80%">
|
||||
<view class="flex text-black"style="width: 50%">
|
||||
<view>房号:</view>
|
||||
<view class="nav-name">{{"床卫生间传"}}</view>
|
||||
|
||||
</view>
|
||||
<view class=" nav-name " style="width: 50%;left: 30rpx;">
|
||||
<view >床卫生间传感器测试</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="flex"style="width: 18%;">
|
||||
<button class="cu-btn1 line-green margin-left " style="width: 100%; margin:5rpx;white-space: pre-line;" bindtap="RefreshTheRoom">确认维\n修完成</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
101
pages/basics/MakingRoundsAbnormal/MakingRoundsAbnormal.wxss
Normal file
101
pages/basics/MakingRoundsAbnormal/MakingRoundsAbnormal.wxss
Normal file
@@ -0,0 +1,101 @@
|
||||
.aside{
|
||||
width:8rem;
|
||||
border-right: 1px solid #ddd;
|
||||
font-size: .85rem;
|
||||
}
|
||||
.type-nav{
|
||||
width:8rem;
|
||||
position: relative;
|
||||
padding:.7rem .3rem;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #ddd;
|
||||
z-index: 10;
|
||||
}
|
||||
.flex-wrap{
|
||||
display: flex;
|
||||
}
|
||||
.type-nav.selected{
|
||||
margin-right: -1px;
|
||||
padding-left:0,-1px;
|
||||
color: #333;
|
||||
background-color: #fff;
|
||||
}
|
||||
/* .content{
|
||||
background-color: #fff;
|
||||
} */
|
||||
|
||||
.dish{
|
||||
margin-left: 1rem;
|
||||
padding: 1rem;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
.dish .title{
|
||||
display: block;
|
||||
font-size: 1rem;
|
||||
}
|
||||
.dish p{
|
||||
color: orange;
|
||||
font-size: .75rem;
|
||||
}
|
||||
.dish .add-btn{
|
||||
width: 8rem;
|
||||
text-align: right;
|
||||
}
|
||||
.cu-bar1 {
|
||||
display: flex;
|
||||
|
||||
align-items: center;
|
||||
|
||||
justify-content: space-between;
|
||||
}
|
||||
.cart{
|
||||
display: block;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 1rem;
|
||||
background: #ddd;
|
||||
}
|
||||
.container {
|
||||
height: 50%;
|
||||
box-sizing: border-box;
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
.cu1-btn {
|
||||
position: relative;
|
||||
border: 0rpx;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
padding: 5rpx 5rpx;
|
||||
font-size: 26rpx;
|
||||
height: 70rpx;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
overflow: visible;
|
||||
margin-left: initial;
|
||||
transform: translate(0rpx, 0rpx);
|
||||
margin-right: initial;
|
||||
}
|
||||
|
||||
.cu-btn1 {
|
||||
position: relative;
|
||||
border: 0rpx;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
padding: 0 5rpx;
|
||||
font-size: 26rpx;
|
||||
height: 64rpx;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
overflow: visible;
|
||||
margin-left: initial;
|
||||
transform: translate(0rpx, 0rpx);
|
||||
margin-right: initial;
|
||||
}
|
||||
Reference in New Issue
Block a user