|
|
@@ -106,7 +106,10 @@
|
|
|
:disabled="item.statu != 1"
|
|
|
>关房</el-button
|
|
|
>
|
|
|
- <el-button size="mini" @click="todirty(item)"
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ @click="todirty(item)"
|
|
|
+ :disabled="item.statu == 4 || item.statu == 5"
|
|
|
>转脏房</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
@@ -115,15 +118,15 @@
|
|
|
@click="leisure(item)"
|
|
|
>转空闲</el-button
|
|
|
>
|
|
|
- <el-button size="mini" @click="closeEle(item)"
|
|
|
- >关电</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
+ <el-button size="mini" @click="closeEle(item)">{{
|
|
|
+ switchOff
|
|
|
+ }}</el-button>
|
|
|
+ <!-- <el-button
|
|
|
size="mini"
|
|
|
:disabled="item.statuName != '脏房'"
|
|
|
@click="leisure(item)"
|
|
|
>清扫</el-button
|
|
|
- >
|
|
|
+ > -->
|
|
|
<el-button size="mini">IC卡</el-button>
|
|
|
<el-button size="mini">指纹</el-button>
|
|
|
</div>
|
|
|
@@ -332,6 +335,7 @@ export default {
|
|
|
cardShow: false,
|
|
|
clickId: "",
|
|
|
inquireValue: "", // 房间号
|
|
|
+ switchOff: "关电",
|
|
|
// 门锁管理
|
|
|
doorLock: false,
|
|
|
doorLockList: {
|
|
|
@@ -449,6 +453,12 @@ export default {
|
|
|
window.removeEventListener("scroll", this.lazyLoading);
|
|
|
//页面离开后销毁,防止切换路由后上一个页面监听scroll滚动事件会在新页面报错问题
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ date(newVal, oldVal) {
|
|
|
+ console.log(newVal);
|
|
|
+ this.roomList();
|
|
|
+ },
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 数据滚动加载
|
|
|
// lazyLoading() {
|
|
|
@@ -531,8 +541,9 @@ export default {
|
|
|
roomIds.push("roomIds=" + item);
|
|
|
});
|
|
|
roomIds = roomIds.join("&");
|
|
|
- let startDay = dayjs(new Date()).format("YYYY-MM-DD");
|
|
|
- let endDay = dayjs(new Date()).add(1, "day").format("YYYY-MM-DD");
|
|
|
+ let startDay = dayjs(this.date).format("YYYY-MM-DD");
|
|
|
+ console.log(startDay);
|
|
|
+ let endDay = dayjs(this.date).add(1, "day").format("YYYY-MM-DD");
|
|
|
let params =
|
|
|
"?" +
|
|
|
"startDay=" +
|
|
|
@@ -582,7 +593,7 @@ export default {
|
|
|
// console.log(i);
|
|
|
let arr = {
|
|
|
id: i.roomId,
|
|
|
- label: i.build + "栋" + i.roomno,
|
|
|
+ label: i.build + "栋" + i.roomNo,
|
|
|
};
|
|
|
if (i.statu == 1) {
|
|
|
this.data[0].children.push(arr);
|
|
|
@@ -733,10 +744,18 @@ export default {
|
|
|
.lock({ roomId, startDate, endDate, remark })
|
|
|
.then((res) => {
|
|
|
console.log(res);
|
|
|
- this.roomList(this.Data);
|
|
|
- this.room = false;
|
|
|
- this.count = [];
|
|
|
- this.$refs.roomTree.setCheckedNodes([]);
|
|
|
+ if (res.success) {
|
|
|
+ this.$message({
|
|
|
+ message: "关房成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.roomList(this.Data);
|
|
|
+ this.room = false;
|
|
|
+ this.count = [];
|
|
|
+ this.$refs.roomTree.setCheckedNodes([]);
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
});
|
|
|
})
|
|
|
.catch((_) => {});
|
|
|
@@ -792,8 +811,8 @@ export default {
|
|
|
todirty(item) {
|
|
|
console.log(item);
|
|
|
let roomId = item.roomId;
|
|
|
- let startDay = dayjs(new Date()).format("YYYY-MM-DD");
|
|
|
- let endDay = dayjs(new Date()).add(1, "day").format("YYYY-MM-DD");
|
|
|
+ let startDay = dayjs(this.date).format("YYYY-MM-DD");
|
|
|
+ let endDay = dayjs(this.date).add(1, "day").format("YYYY-MM-DD");
|
|
|
// let startDate = "2022-08-23";
|
|
|
// let endDate = "2022-08-24";
|
|
|
this.API.roomRealTimeStatu
|
|
|
@@ -816,7 +835,7 @@ export default {
|
|
|
console.log(item);
|
|
|
let operType = "2";
|
|
|
let roomId = item.roomId;
|
|
|
- this.$confirm(`确认关电吗?`)
|
|
|
+ this.$confirm(`确认${this.switchOff}吗?`)
|
|
|
.then((_) => {
|
|
|
this.API.roomThirdSetting
|
|
|
.changeElectric(roomId, operType)
|
|
|
@@ -827,7 +846,8 @@ export default {
|
|
|
message: "关电成功",
|
|
|
type: "success",
|
|
|
});
|
|
|
- this.roomList(this.Data);
|
|
|
+ this.switchOff = "开电";
|
|
|
+ // this.roomList(this.Data);
|
|
|
} else {
|
|
|
this.$message.error(res.message);
|
|
|
}
|
|
|
@@ -1595,8 +1615,9 @@ export default {
|
|
|
.el-popover.popperOptions {
|
|
|
min-width: 0;
|
|
|
padding: 0;
|
|
|
- height: 167px;
|
|
|
+ height: 145px;
|
|
|
width: 70px;
|
|
|
+ // background-color: #f0f3f7;
|
|
|
|
|
|
.control-room {
|
|
|
width: 70px;
|
|
|
@@ -1621,6 +1642,7 @@ export default {
|
|
|
color: rgba(0, 0, 0, 1);
|
|
|
border: none;
|
|
|
border-radius: 0;
|
|
|
+ // background-color: #f0f3f7;
|
|
|
}
|
|
|
}
|
|
|
.popper__arrow {
|