|
|
@@ -1,5 +1,5 @@
|
|
|
<template >
|
|
|
- <el-card class="box-card" v-show="cardShow">
|
|
|
+ <el-card class="box-card">
|
|
|
<div slot="header" class="clearfix">
|
|
|
<div class="header-left">
|
|
|
<span class="title">房态管理 </span>
|
|
|
@@ -31,6 +31,7 @@
|
|
|
:visible.sync="dialogVisible"
|
|
|
width="692px"
|
|
|
append-to-body
|
|
|
+ custom-class="dialongAllRoom"
|
|
|
>
|
|
|
<div class="tree">
|
|
|
<div class="tree-left">
|
|
|
@@ -85,7 +86,11 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="home-body">
|
|
|
- <div class="room-floor wrapper">
|
|
|
+ <div
|
|
|
+ class="room-floor wrapper"
|
|
|
+ v-loading="cardShow"
|
|
|
+ element-loading-text="获取房间信息中"
|
|
|
+ >
|
|
|
<div class="scrollBlock" ref="scrollBlock">
|
|
|
<div class="floor" v-for="(items, i) in Data" :key="i">
|
|
|
<div class="header-title">
|
|
|
@@ -157,6 +162,7 @@
|
|
|
</el-popover>
|
|
|
<div class="tuifang" @click.stop="roomLock(item)">
|
|
|
<IconSvg :W="21" :H="21" name="tuifang" />
|
|
|
+
|
|
|
<el-dialog
|
|
|
title="门锁管理"
|
|
|
custom-class="lock"
|
|
|
@@ -164,6 +170,7 @@
|
|
|
:visible.sync="doorLock"
|
|
|
width="30%"
|
|
|
:before-close="lockClose"
|
|
|
+ :destroy-on-close="true"
|
|
|
>
|
|
|
<div class="roomID" style="margin-top: 13px">
|
|
|
<div class="roomblock">
|
|
|
@@ -332,7 +339,7 @@ export default {
|
|
|
name: "Home",
|
|
|
data() {
|
|
|
return {
|
|
|
- cardShow: false,
|
|
|
+ cardShow: true,
|
|
|
clickId: "",
|
|
|
inquireValue: "", // 房间号
|
|
|
switchOff: "关电",
|
|
|
@@ -484,13 +491,24 @@ export default {
|
|
|
// // this.API.room.roomPageGroup(augument).then((res) => {
|
|
|
// // console.log(res);
|
|
|
// // });
|
|
|
+ // // this.API.room
|
|
|
+ // // .roomPageGroup({ curPage: 1, pageSize: 20 })
|
|
|
+ // // .then((res) => {
|
|
|
+ // // console.log(res.data.list);
|
|
|
+ // // });
|
|
|
+ // // this.API.room
|
|
|
+ // // .roomPageGroup({ curPage: 2, pageSize: 20 })
|
|
|
+ // // .then((res) => {
|
|
|
+ // // console.log(res.data.list);
|
|
|
+ // // });
|
|
|
// console.log("滚动到底部,触发"); //此处可以添加数据请求
|
|
|
// // 这这里可以写一些业务逻辑,请求数据等
|
|
|
// }
|
|
|
// },
|
|
|
|
|
|
roomList(Datas, resData) {
|
|
|
- this.API.room.roomPageGroup({ pageSize: 1000 }).then((res) => {
|
|
|
+ this.cardShow = true; // 数据加载前
|
|
|
+ this.API.room.roomPageGroup({ curPage: 1, pageSize: 100 }).then((res) => {
|
|
|
this.floorRoomDatas = [];
|
|
|
console.log(res);
|
|
|
|
|
|
@@ -590,6 +608,7 @@ export default {
|
|
|
items.room.forEach((item) => {
|
|
|
this.roomData.forEach((i, index) => {
|
|
|
if (item.id == i.roomId) {
|
|
|
+ item.doorLockShow = false;
|
|
|
// console.log(i);
|
|
|
let arr = {
|
|
|
id: i.roomId,
|
|
|
@@ -604,7 +623,7 @@ export default {
|
|
|
});
|
|
|
console.log(this.Data);
|
|
|
this.DataClone = _.cloneDeep(this.Data);
|
|
|
- this.cardShow = true;
|
|
|
+ this.cardShow = false;
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
@@ -747,7 +766,7 @@ export default {
|
|
|
if (res.success) {
|
|
|
this.$message({
|
|
|
message: "关房成功",
|
|
|
- // type: "success",
|
|
|
+ type: "success",
|
|
|
});
|
|
|
this.roomList(this.Data);
|
|
|
this.room = false;
|
|
|
@@ -878,7 +897,11 @@ export default {
|
|
|
|
|
|
//门锁管理
|
|
|
lockClose(done) {
|
|
|
- this.doorLock = false;
|
|
|
+ this.$confirm("确认关闭?")
|
|
|
+ .then((_) => {
|
|
|
+ done();
|
|
|
+ })
|
|
|
+ .catch((_) => {});
|
|
|
},
|
|
|
// 下发密码
|
|
|
sending(item) {
|
|
|
@@ -1425,7 +1448,13 @@ export default {
|
|
|
box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
|
|
|
border-radius: 8px;
|
|
|
}
|
|
|
-
|
|
|
+.dialongAllRoom {
|
|
|
+ .el-dialog__footer {
|
|
|
+ .el-button--primary {
|
|
|
+ background: rgba(41, 109, 227, 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
/deep/ .lock.el-dialog {
|
|
|
box-shadow: none;
|
|
|
margin: 350px 0 0 450px !important;
|