|
@@ -7,47 +7,15 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="header-right">
|
|
<div class="header-right">
|
|
|
<el-input
|
|
<el-input
|
|
|
- placeholder="请输入姓名或者房间号"
|
|
|
|
|
|
|
+ placeholder="请输入房间号 如:1-1-1001"
|
|
|
prefix-icon="el-icon-search"
|
|
prefix-icon="el-icon-search"
|
|
|
class="inquire-input"
|
|
class="inquire-input"
|
|
|
|
|
+ v-model="inquireValue"
|
|
|
>
|
|
>
|
|
|
</el-input>
|
|
</el-input>
|
|
|
- <el-button class="inquire-button">查询</el-button>
|
|
|
|
|
- <!-- <div class="control">
|
|
|
|
|
- <div class="title" @click="water = !water" style="cursor: pointer">
|
|
|
|
|
- 批量控制电
|
|
|
|
|
- </div>
|
|
|
|
|
- <ul v-show="water">
|
|
|
|
|
- <li
|
|
|
|
|
- @click="dialogShow"
|
|
|
|
|
- v-for="(item, index) in titles"
|
|
|
|
|
- :key="index"
|
|
|
|
|
- >
|
|
|
|
|
- {{ item }}
|
|
|
|
|
- </li>
|
|
|
|
|
- <el-dialog
|
|
|
|
|
- :title="title"
|
|
|
|
|
- :visible.sync="dialogVisible"
|
|
|
|
|
- width="692px"
|
|
|
|
|
- append-to-body
|
|
|
|
|
- >
|
|
|
|
|
- <el-tree
|
|
|
|
|
- :data="data"
|
|
|
|
|
- show-checkbox
|
|
|
|
|
- node-key="id"
|
|
|
|
|
- @check="checkRoom"
|
|
|
|
|
- :props="defaultProps"
|
|
|
|
|
- >
|
|
|
|
|
- </el-tree>
|
|
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
|
|
- <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
|
|
- <el-button type="primary" @click="PLcloseRoom">确 定</el-button>
|
|
|
|
|
- </span>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
- </ul>
|
|
|
|
|
- </div> -->
|
|
|
|
|
|
|
+ <el-button class="inquire-button" @click="inquireRoom">查询</el-button>
|
|
|
<div class="control" style="margin-left: 17px">
|
|
<div class="control" style="margin-left: 17px">
|
|
|
- <div class="title" @click="room = !room" style="cursor: pointer">
|
|
|
|
|
|
|
+ <div class="title" @click="roomAll" style="cursor: pointer">
|
|
|
批量开关房
|
|
批量开关房
|
|
|
</div>
|
|
</div>
|
|
|
<ul v-show="room">
|
|
<ul v-show="room">
|
|
@@ -166,7 +134,7 @@
|
|
|
slot="reference"
|
|
slot="reference"
|
|
|
>
|
|
>
|
|
|
<div class="title">
|
|
<div class="title">
|
|
|
- <span>{{ item.build }}栋{{ item.roomno }}</span>
|
|
|
|
|
|
|
+ <span>{{ item.build }}栋 {{ item.roomNo }}</span>
|
|
|
<div class="state" :style="bgState(item.statu)">
|
|
<div class="state" :style="bgState(item.statu)">
|
|
|
{{ item.statuName }}
|
|
{{ item.statuName }}
|
|
|
</div>
|
|
</div>
|
|
@@ -180,126 +148,6 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="count-down">
|
|
<div class="count-down">
|
|
|
<span>退房倒计时 {{ item.EndTime }}</span>
|
|
<span>退房倒计时 {{ item.EndTime }}</span>
|
|
|
- <!-- <div class="tuifang" @click.stop="roomLock(item)">
|
|
|
|
|
- <IconSvg :W="21" :H="21" name="tuifang" />
|
|
|
|
|
- <el-dialog
|
|
|
|
|
- title="门锁管理"
|
|
|
|
|
- custom-class="lock"
|
|
|
|
|
- :append-to-body="true"
|
|
|
|
|
- :visible.sync="doorLock"
|
|
|
|
|
- width="30%"
|
|
|
|
|
- :before-close="lockClose"
|
|
|
|
|
- >
|
|
|
|
|
- <div class="roomID" style="margin-top: 13px">
|
|
|
|
|
- <div class="roomblock">
|
|
|
|
|
- <span>门锁ID:</span>
|
|
|
|
|
- <div
|
|
|
|
|
- class="number"
|
|
|
|
|
- v-if="doorLockList.doorIdshow"
|
|
|
|
|
- >
|
|
|
|
|
- <span>{{ doorLockList.doorId }}</span>
|
|
|
|
|
- <div @click="editlock">
|
|
|
|
|
- <IconSvg :W="16" :H="16" name="edit" />
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <el-input
|
|
|
|
|
- ref="roomId"
|
|
|
|
|
- v-else
|
|
|
|
|
- size="mini"
|
|
|
|
|
- v-model="doorLockList.doorId"
|
|
|
|
|
- @blur="editLockBlur"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="roomblock">
|
|
|
|
|
- <span>水表编码:</span>
|
|
|
|
|
- <div
|
|
|
|
|
- class="number"
|
|
|
|
|
- v-if="doorLockList.waterIdshow"
|
|
|
|
|
- >
|
|
|
|
|
- <span>{{ doorLockList.waterId }}</span>
|
|
|
|
|
- <div @click="editWater">
|
|
|
|
|
- <IconSvg :W="16" :H="16" name="edit" />
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-else
|
|
|
|
|
- size="mini"
|
|
|
|
|
- v-model="doorLockList.waterId"
|
|
|
|
|
- @blur="editWaterBlur"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="roomID">
|
|
|
|
|
- <div class="roomblock">
|
|
|
|
|
- <span>门锁序列号:</span>
|
|
|
|
|
- <div
|
|
|
|
|
- class="number"
|
|
|
|
|
- v-if="doorLockList.doorNumshow"
|
|
|
|
|
- >
|
|
|
|
|
- <span>{{ doorLockList.doorNum }}</span>
|
|
|
|
|
- <div @click="editRoomNum">
|
|
|
|
|
- <IconSvg :W="16" :H="16" name="edit" />
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-else
|
|
|
|
|
- size="mini"
|
|
|
|
|
- v-model="doorLockList.doorNum"
|
|
|
|
|
- @blur="editRoomNumBlur"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="roomblock">
|
|
|
|
|
- <span>电表编码:</span>
|
|
|
|
|
- <div
|
|
|
|
|
- class="number"
|
|
|
|
|
- v-if="doorLockList.electricityIdshow"
|
|
|
|
|
- >
|
|
|
|
|
- <span>{{ doorLockList.electricityId }}</span>
|
|
|
|
|
- <div @click="editEle">
|
|
|
|
|
- <IconSvg :W="16" :H="16" name="edit" />
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-else
|
|
|
|
|
- size="mini"
|
|
|
|
|
- v-model="doorLockList.electricityId"
|
|
|
|
|
- @blur="editEleBlur"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="roomID">
|
|
|
|
|
- <div class="roompassword">
|
|
|
|
|
- <span>门锁密码:</span>
|
|
|
|
|
- <div
|
|
|
|
|
- class="sendpass"
|
|
|
|
|
- v-for="item in roomPassWord"
|
|
|
|
|
- :key="item.id"
|
|
|
|
|
- >
|
|
|
|
|
- <span>{{ item.lockRealtimePassword }}</span>
|
|
|
|
|
- <span class="password" @click="sending(item)"
|
|
|
|
|
- >下发密码</span
|
|
|
|
|
- >
|
|
|
|
|
- <span style="margin-left: 10px"
|
|
|
|
|
- >密码到期时间 :
|
|
|
|
|
- {{ item.endTime.replace("T", " ") }}</span
|
|
|
|
|
- >
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
|
|
- <el-button
|
|
|
|
|
- @click.stop="doorLock = false"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- >取消</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button
|
|
|
|
|
- size="mini"
|
|
|
|
|
- @click.stop="doorLock = false"
|
|
|
|
|
- >完成</el-button
|
|
|
|
|
- >
|
|
|
|
|
- </span>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
- </div> -->
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</div>
|
|
</div>
|
|
@@ -483,6 +331,7 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
cardShow: false,
|
|
cardShow: false,
|
|
|
clickId: "",
|
|
clickId: "",
|
|
|
|
|
+ inquireValue: "", // 房间号
|
|
|
// 门锁管理
|
|
// 门锁管理
|
|
|
doorLock: false,
|
|
doorLock: false,
|
|
|
doorLockList: {
|
|
doorLockList: {
|
|
@@ -630,14 +479,14 @@ export default {
|
|
|
// }
|
|
// }
|
|
|
// },
|
|
// },
|
|
|
|
|
|
|
|
- roomList(Datas) {
|
|
|
|
|
- this.API.room.roomPageGroup({ pageSize: 100 }).then((res) => {
|
|
|
|
|
|
|
+ roomList(Datas, resData) {
|
|
|
|
|
+ this.API.room.roomPageGroup({ pageSize: 1000 }).then((res) => {
|
|
|
this.floorRoomDatas = [];
|
|
this.floorRoomDatas = [];
|
|
|
console.log(res);
|
|
console.log(res);
|
|
|
- console.log(res.data.list);
|
|
|
|
|
|
|
|
|
|
let arrays = [];
|
|
let arrays = [];
|
|
|
- res.data.list.forEach((items) => {
|
|
|
|
|
|
|
+ let lists = resData ? resData : res.data.list;
|
|
|
|
|
+ lists.forEach((items) => {
|
|
|
console.log(items);
|
|
console.log(items);
|
|
|
items.floors.forEach((item) => {
|
|
items.floors.forEach((item) => {
|
|
|
// console.log(item);
|
|
// console.log(item);
|
|
@@ -709,6 +558,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
+ this.citiesNum = [0, 0, 0, 0, 0];
|
|
|
this.Data.forEach((items) => {
|
|
this.Data.forEach((items) => {
|
|
|
items.room.forEach((resItem) => {
|
|
items.room.forEach((resItem) => {
|
|
|
if (resItem.useInfo) {
|
|
if (resItem.useInfo) {
|
|
@@ -720,17 +570,6 @@ export default {
|
|
|
this.citiesNum[resItem.statu - 1] += 1;
|
|
this.citiesNum[resItem.statu - 1] += 1;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- // if (resItem.statu == 1) {
|
|
|
|
|
- // resItem.statuName = "空闲";
|
|
|
|
|
- // } else if (resItem.statu == 2) {
|
|
|
|
|
- // resItem.statuName = "预定";
|
|
|
|
|
- // } else if (resItem.statu == 3) {
|
|
|
|
|
- // resItem.statuName = "入住";
|
|
|
|
|
- // } else if (resItem.statu == 4) {
|
|
|
|
|
- // resItem.statuName = "脏房";
|
|
|
|
|
- // } else if (resItem.statu == 5) {
|
|
|
|
|
- // resItem.statuName = "锁定";
|
|
|
|
|
- // }
|
|
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -804,7 +643,30 @@ export default {
|
|
|
this.clickId = item.roomId;
|
|
this.clickId = item.roomId;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ // 根据房间号查询房间
|
|
|
|
|
+ inquireRoom() {
|
|
|
|
|
+ let roomNo = this.inquireValue;
|
|
|
|
|
+ if (this.inquireValue == "") {
|
|
|
|
|
+ this.roomList();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.API.room.roomPageGroup({ roomNo }).then((res) => {
|
|
|
|
|
+ console.log(res);
|
|
|
|
|
+ if (res.data.list.length) {
|
|
|
|
|
+ this.roomList("", res.data.list);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error("请输入正确的房间号");
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
// 批量开关房start
|
|
// 批量开关房start
|
|
|
|
|
+ roomAll() {
|
|
|
|
|
+ this.room = !this.room;
|
|
|
|
|
+ if (this.data[0].children.length == 0) {
|
|
|
|
|
+ this.checked = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
chooseAll() {
|
|
chooseAll() {
|
|
|
if (this.checked) {
|
|
if (this.checked) {
|
|
|
this.$refs.roomTree.setCheckedNodes(this.data[0].children);
|
|
this.$refs.roomTree.setCheckedNodes(this.data[0].children);
|
|
@@ -837,6 +699,7 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
this.checked = false;
|
|
this.checked = false;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
console.log(this.count);
|
|
console.log(this.count);
|
|
|
},
|
|
},
|
|
|
// 取消选中房间
|
|
// 取消选中房间
|
|
@@ -1087,7 +950,10 @@ export default {
|
|
|
console.log(arr);
|
|
console.log(arr);
|
|
|
this.API.roomThirdSetting.Update(arr).then((res) => {
|
|
this.API.roomThirdSetting.Update(arr).then((res) => {
|
|
|
if (res.success) {
|
|
if (res.success) {
|
|
|
- console.log(res);
|
|
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "修改成功",
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ });
|
|
|
} else {
|
|
} else {
|
|
|
console.log(res);
|
|
console.log(res);
|
|
|
this.$message.error(res.message);
|
|
this.$message.error(res.message);
|
|
@@ -1305,6 +1171,7 @@ export default {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
margin: 15px;
|
|
margin: 15px;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
span {
|
|
span {
|
|
|
display: inline-block;
|
|
display: inline-block;
|
|
|
height: 24px;
|
|
height: 24px;
|