From ceb7a95cc32033c4172be07a83aba7e003437a36 Mon Sep 17 00:00:00 2001 From: xiaoheiiskinder <11674173+xiaohei102908@user.noreply.gitee.com> Date: Wed, 13 Sep 2023 18:10:10 +0800 Subject: [PATCH] =?UTF-8?q?0913=E7=89=88=E6=9C=AC=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/index.js | 4 +- dist/index.html | 2 +- src/api/all.js | 1 + src/components/houseing1.vue | 6 +- src/store/index.js | 2 +- src/views/agreement.vue | 130 ++++++++++++++++++--- src/views/doorLock.vue | 4 + src/views/rechargeManagement/bill.vue | 2 +- .../rechargeManagement/rechargeManagement.vue | 3 +- src/views/room.vue | 28 +++-- src/views/userManagement.vue | 92 ++++++++++++--- src/views/visualization/flatsIndex.vue | 23 ++-- 12 files changed, 240 insertions(+), 57 deletions(-) diff --git a/config/index.js b/config/index.js index 54cfc86..9f473bf 100644 --- a/config/index.js +++ b/config/index.js @@ -11,9 +11,9 @@ module.exports = { assetsPublicPath: '/', proxyTable: { '/api': { - // target: 'http://apartmentcloud.xiaozhisz.cn/', + target: 'http://apartmentcloud.xiaozhisz.cn/', // target: 'http://test.zhiweisz.cn/', - target: 'http://192.168.1.26:8600/', + // target: 'http://192.168.1.26:8600/', changeOrigin: true, //是否跨域 pathRewrite: { //重写路径 diff --git a/dist/index.html b/dist/index.html index e7db29c..8d9a0d0 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1 +1 @@ -智慧公寓管理系统
\ No newline at end of file +智慧公寓管理系统
\ No newline at end of file diff --git a/src/api/all.js b/src/api/all.js index 964f343..a3d35e3 100644 --- a/src/api/all.js +++ b/src/api/all.js @@ -199,6 +199,7 @@ api.screenStatisticsItems="/v1/statistics/device/items" // 合同 +api.postrenewal = "/v1/leases/update" // 续租 api.postLeasesList="/v1/leases/get/list" // 获取合同列表 api.postAddLeases="/v1/leases/add" // 创建合同 api.postUpdateLeases="/v1/leases/update" // 修改合同 diff --git a/src/components/houseing1.vue b/src/components/houseing1.vue index 6e761d9..ce712dc 100644 --- a/src/components/houseing1.vue +++ b/src/components/houseing1.vue @@ -8,7 +8,7 @@
-
{{ data.count }}
+
{{ data.count.count ? data.count.count : data.count }}
入住
@@ -43,7 +43,9 @@ data() { return {} }, - mounted() {}, + mounted() { + console.log(this.data); + }, methods: {}, }; diff --git a/src/store/index.js b/src/store/index.js index 0643a93..9ce43a4 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -114,7 +114,7 @@ const store = new Vuex.Store({ }, getConditionRoomAndPersonnel(state){ var data = {}; - httpGet(data, api.onlyTenant).then((res) => { + httpPost(data, api.onlyTenant).then((res) => { if(res.success){ state.conditionRoomAndPersonnel = res.data.list } diff --git a/src/views/agreement.vue b/src/views/agreement.vue index 6584766..6f1c7d7 100644 --- a/src/views/agreement.vue +++ b/src/views/agreement.vue @@ -836,6 +836,19 @@ export default { // 重新绑定房间 httpPost(unbind, this.$api.setTenant).then((res) => { console.log(res); + // 续约 + let data = { + cardId: this.batchmessage.cardId, + signingTime: this.batchRenewalFrom.startTime, + cutoffTime: this.batchRenewalFrom.endTime, + status: 1 + } + httpPost(data, this.$api.postrenewal).then(res1 => { + console.log(123123, res1); + if (res1.success) { + this.getLeasesList() + } + }) }) // 修改凭证 httpGet(data, this.$api.getCertificates).then((res) => { @@ -887,7 +900,7 @@ export default { }) }) this.batchRenewalShow = false - }else{ + } else { this.$message.error("暂未发现对应设备") } } else { @@ -904,10 +917,47 @@ export default { // 查询和房间相关的设备 getAboutDevice() { - httpGet("", this.$api.onlySiteDevice).then((res) => { - this.AboutDevice = res.data.list; - this.$store.commit("getAboutDevice", res.data.list); - }); + let data = { + orderBy: "create_time desc", + pageNum: 0, + pageSize: 0, + q: JSON.stringify({ + name: '', + number: '', + cardId: '' + }) + } + let data1 = [] + httpPost(data, this.$api.getlistNum).then((res) => { + console.log("123", res); + if (res.success) { + res.data.list.map(li => { + data1.push(li.id) + }) + let data2 = { + cardIds: data1 + } + httpPost(data2, this.$api.onlyTenant).then((res1) => { + // this.$store.commit("getAboutRoom", res.data.list); + // this.getlist(); + console.log(res1); + let data3 = [] + if (res1.success) { + res1.data.list.map(li => { + data3.push(li.roomId) + }) + let data4 = { + ids: data3 + } + httpPost(data4, this.$api.onlySiteDevice).then((res) => { + console.log(res); + this.AboutDevice = res.data.list; + this.$store.commit("getAboutDevice", res.data.list); + }); + } + }); + } + }) }, getEnterprise() { httpGet("", this.$api.getEnterprise).then((res) => { @@ -1552,9 +1602,31 @@ export default { }, // 查询和人员相关的房间 getAboutRoom() { - httpGet("", this.$api.onlyTenant).then((res) => { - this.$store.commit("getAboutRoom", res.data.list); - }); + let data = { + orderBy: "create_time desc", + pageNum: 0, + pageSize: 0, + q: JSON.stringify({ + name: '', + number: '', + cardId: '' + }) + } + let data1 = [] + httpPost(data, this.$api.getlistNum).then((res) => { + console.log("123", res); + if (res.success) { + res.data.list.map(li => { + data1.push(li.id) + }) + let data2 = { + cardIds: data1 + } + httpPost(data2, this.$api.onlyTenant).then((res1) => { + this.$store.commit("getAboutRoom", res.data.list); + }); + } + }) }, // 添加人员 saveEdit() { @@ -1602,9 +1674,31 @@ export default { httpPost(ids, this.$api.createkeyCard).then(res => { }) - httpGet("", this.$api.onlyTenant).then((res) => { - this.$store.commit("getAboutRoom", res.data.list); - }); + let data = { + orderBy: "create_time desc", + pageNum: 0, + pageSize: 0, + q: JSON.stringify({ + name: '', + number: '', + cardId: '' + }) + } + let data1 = [] + httpPost(data, this.$api.getlistNum).then((res) => { + console.log("123", res); + if (res.success) { + res.data.list.map(li => { + data1.push(li.id) + }) + let data2 = { + cardIds: data1 + } + httpPost(data2, this.$api.onlyTenant).then((res1) => { + this.$store.commit("getAboutRoom", res.data.list); + }); + } + }) } else { } }) @@ -2223,9 +2317,9 @@ export default { }, // 删除凭证 deletefun(index, row) { + this.savevoucherlist = this.savevoucherlist.filter(li => { - console.log(li, row) - return li.password == row.password + return li.password != row.password }) }, // 录入凭证 @@ -3274,13 +3368,17 @@ export default { let _this = this this.multipleSelection.map(li => { this.getRoomIdDeviceInfo(li.siteId).then(res => { + console.log(res, res.data.total); if (res.data.total > 0) { if (res.data.list[0].manufactureId === 201 || res.data.list[0].manufactureId === 221) { RequestSet.unbindPeopleAndRooms(li.cardId, res.data.list[0].imei, (callback) => { + console.log(callback); if (callback.success) { let dataOne = utils.zlib_unzip(callback.data) + console.log(dataOne); if (dataOne.length > 0) { let lookUserInfo = JSON.parse(dataOne[0].content) + console.log(lookUserInfo); let dataLook = { lockerId: dataOne[0].deviceNum, imei: dataOne[0].imei, @@ -3293,12 +3391,14 @@ export default { roomName: lookUserInfo.roomName } httpPost(dataLook, _this.$api.ZGduserOperation).then(res2 => { + console.log(dataLook, res2); if (res2.success) { let dataUnbind = [{ siteId: li.siteId, cardId: li.cardId, }] httpPost(dataUnbind, _this.$api.unbindCard).then((res) => { + console.log(res); _this.$message.success("退租成功") let refundLeasesData = [ { @@ -3306,7 +3406,9 @@ export default { status: 3 } ] - httpPost(refundLeasesData, _this.$api.postUpdateLeases).then(res => { }) + httpPost(refundLeasesData, _this.$api.postUpdateLeases).then(res => { + console.log(res); + }) _this.getLeasesList() _this.getLeasesStatus() }) diff --git a/src/views/doorLock.vue b/src/views/doorLock.vue index 36d2055..229f146 100644 --- a/src/views/doorLock.vue +++ b/src/views/doorLock.vue @@ -1284,6 +1284,7 @@ export default { roomName: item.roomName, deviceNum: item.deviceNum, imei: item.imei, + imsi: item.imsi, isOnline: item.isOnline == 1 ? '在线' : item.isOnline == 2 ? '异常' : '离线', battery: item.battery, rssi: item.rssi, @@ -1296,6 +1297,7 @@ export default { roomName: '房间名称', deviceNum: '设备号', imei: 'IMEI', + imsi: 'IMSI', isOnline: '状态', battery: '电量', rssi: '信号', @@ -2248,6 +2250,7 @@ export default { order: 61101, roomName: li.roomName, opendDoorType: 0, + imei: li.imei, lockerId: li.deviceNum, lockerUserId: li.iotId, startTime: moment(this.opendTime[0]).format('YYYY-MM-DD HH:mm:ss'), @@ -2340,6 +2343,7 @@ export default { roomName: li.roomName, opendDoorType: 1, lockerId: li.deviceNum, + imei: li.imei, lockerUserId: li.iotId, startTime: moment(this.opendTime[0]).format('YYYY-MM-DD HH:mm:ss'), endTime: moment(this.opendTime[1]).format('YYYY-MM-DD HH:mm:ss'), diff --git a/src/views/rechargeManagement/bill.vue b/src/views/rechargeManagement/bill.vue index c8f51bc..0f503cc 100644 --- a/src/views/rechargeManagement/bill.vue +++ b/src/views/rechargeManagement/bill.vue @@ -88,7 +88,7 @@