diff --git a/dormitory-for-admin/src/views/personnelInformation/HousekeepingInformation.vue b/dormitory-for-admin/src/views/personnelInformation/HousekeepingInformation.vue index ab1d946f3c79a5e531c15bb9764559c144d7dda9..967906a8c2abb6d53df92d87b2cfce2d5ae293ac 100644 --- a/dormitory-for-admin/src/views/personnelInformation/HousekeepingInformation.vue +++ b/dormitory-for-admin/src/views/personnelInformation/HousekeepingInformation.vue @@ -432,19 +432,23 @@ export default { }).then( async() => { this.deleteOptions=[]; let d = this.multipleSelection; - for(let i = 0 ; i{ - if (response.data.status === 1000){ - this.$message.success("批量删除成功"); - this.refleshTable(); + if(d.length == 0) + { + this.$message.error('未选择删除的数据行'); + }else{ + for(let i = 0 ; i{ + if (response.data.status === 1000){ + this.$message.success("批量删除成功"); + this.refleshTable(); + } + }).catch(function (error) { + console.log(error); + this.$message.error("批量删除失败"); + }); + } }); } }, diff --git a/dormitory-for-admin/src/views/personnelInformation/MaintainerInformation.vue b/dormitory-for-admin/src/views/personnelInformation/MaintainerInformation.vue index 568ecae9480cfae59f4f706c487e36e2eff4f8d7..ec44948b476687cc7251e30df696d566cfd3007e 100644 --- a/dormitory-for-admin/src/views/personnelInformation/MaintainerInformation.vue +++ b/dormitory-for-admin/src/views/personnelInformation/MaintainerInformation.vue @@ -429,19 +429,23 @@ export default { }).then( async() => { this.deleteOptions=[]; let d = this.multipleSelection; - for(let i = 0 ; i{ - if (response.data.status === 1000){ - this.$message.success("批量删除成功"); - this.refleshTable(); + if(d.length == 0) + { + this.$message.error('未选择删除的数据行'); + }else { + for (let i = 0; i < d.length; i++) { + this.deleteOptions.push(d[i].id); } - }).catch(function (error) { - console.log(error); - this.$message.error("批量删除失败"); - }); - + axios.post("http://124.223.194.15:19260/admin/repairer/delete", {id: this.deleteOptions}).then(response => { + if (response.data.status === 1000) { + this.$message.success("批量删除成功"); + this.refleshTable(); + } + }).catch(function (error) { + console.log(error); + this.$message.error("批量删除失败"); + }); + } }); } }, diff --git a/dormitory-for-admin/src/views/personnelInformation/StudentInformation.vue b/dormitory-for-admin/src/views/personnelInformation/StudentInformation.vue index f73d043cf1e6d0346e8c4a4d39224f3665fb0559..d10e39152fbca701325f9faa714789167f80a0ad 100644 --- a/dormitory-for-admin/src/views/personnelInformation/StudentInformation.vue +++ b/dormitory-for-admin/src/views/personnelInformation/StudentInformation.vue @@ -500,19 +500,23 @@ export default { }).then( async() => { this.deleteOptions=[]; let d = this.multipleSelection; - for(let i = 0 ; i{ - if (response.data.status === 1000){ - this.$message.success("批量删除成功"); - this.refleshTable(); + if(d.length == 0) + { + this.$message.error('未选择删除的数据行'); + }else { + for (let i = 0; i < d.length; i++) { + this.deleteOptions.push(d[i].id); } - }).catch(function (error) { - console.log(error); - this.$message.error("批量删除失败"); - }); - + axios.post("http://124.223.194.15:19260/admin/student/delete", {id: this.deleteOptions}).then(response => { + if (response.data.status === 1000) { + this.$message.success("批量删除成功"); + this.refleshTable(); + } + }).catch(function (error) { + console.log(error); + this.$message.error("批量删除失败"); + }); + } }); } },