diff --git a/src/api/modules/api.js b/src/api/modules/api.js index dfdbdab..e9ee38b 100644 --- a/src/api/modules/api.js +++ b/src/api/modules/api.js @@ -523,9 +523,33 @@ export function zkequipmentbatchList(query) { } // 添加设备 -export function zkequipmentbatchInsert(data) { +export function equipmentAdd(data) { return request({ - url: '/autoSR/zkequipmentbatch/insert', + url: 'autoSR/zk/equipment/add', + method:'post', + data + }) +} +// 归还设备 +export function equipmentUnbind(data) { + return request({ + url: 'autoSR/zk/equipment/unbind', + method:'post', + data + }) +} +// 恢复正常 +export function backToNormal(data) { + return request({ + url: 'autoSR/zk/equipment/backToNormal', + method:'post', + data + }) +} +//转写方式修改 +export function updateTranslationMethod(data) { + return request({ + url: 'autoSR/zk/equipment/updateTranslationMethod', method:'post', data }) diff --git a/src/views/Equipment/equipmentOnlineRecordList.vue b/src/views/Equipment/equipmentOnlineRecordList.vue index add08d3..8e23dd5 100644 --- a/src/views/Equipment/equipmentOnlineRecordList.vue +++ b/src/views/Equipment/equipmentOnlineRecordList.vue @@ -310,7 +310,7 @@ export default { }; }, mounted() { - return + // return let theRequest=this.$route.query console.log(theRequest, "123"); //此时的theRequest就是我们需要的参数; if (theRequest.houseId) { @@ -378,6 +378,7 @@ export default { }, goinfo(row) { console.log(row); + return location.href = "${jypath}/zk/file/receptionDetails"; localStorage.setItem("AudioListId", row.id); localStorage.setItem("AudioIdx", 0); @@ -419,14 +420,14 @@ export default { //获取楼盘数据 getHouseList() { axios({ - url: `${jypath}/equipment/onlinerecord/findAllProperties`, + url: `/autoSR/zkhouse/findHouseByUser?orgType=0`, method: "get", }).then((res) => { // console.log(res.data.obj) - if (res.data.res == 1) { - this.houseList = res.data.obj; + + this.houseList = res.data; if (!this.flag) { - this.page.houseName = res.data.obj[0].id; + this.page.houseName = res.data[0].id; } this.getTableList(); // res.data.obj.results.forEach((item,index)=>{ @@ -434,7 +435,7 @@ export default { // }) // this.tableData=res.data.obj.results; // this.page.total = res.data.obj.totalRecord; - } + }); }, //获取table数据、 @@ -448,13 +449,13 @@ export default { }; this.tableData = []; if (this.activeTotal == 0) { - url = `${jypath}/equipment/onlinerecord/findByPage`; + url = `autoSR/zk/equipment/onlineRecordList`; obj.openTime = this.page.openTime; obj.closeTime = this.page.closeTime; obj.houseId = this.page.houseName; obj.accountName = this.page.accountName; } else { - url = `${jypath}/equipment/onlinerecord/assignmentRecord`; + url = `autoSR/zk/equipment/assignmentRecordList`; obj.staDate = this.page.openTime; obj.endDate = this.page.closeTime; obj.projectId = this.page.houseName; @@ -463,18 +464,18 @@ export default { } axios({ url: url, - method: "post", - data: obj, + method: "get", + params: obj, }).then((res) => { // console.log(res) - if (res.data.res == 1) { - if (!res.data.obj.results) return; - res.data.obj.results.forEach((item, index) => { + + if (!res.data.records) return; + res.data.records.forEach((item, index) => { item.index = index + 1; }); - this.tableData = res.data.obj.results; - this.page.total = res.data.obj.totalRecord; - } + this.tableData = res.data.records; + this.page.total = res.data.total; + }); }, }, diff --git a/src/views/Equipment/index.vue b/src/views/Equipment/index.vue index c110444..1a5833d 100644 --- a/src/views/Equipment/index.vue +++ b/src/views/Equipment/index.vue @@ -102,7 +102,7 @@ - - + @@ -277,18 +297,33 @@ --> - + - + - +