diff --git a/src/views/alarmGroup/components/groupListUser.vue b/src/views/alarmGroup/components/groupListUser.vue index 3572125..479dc87 100644 --- a/src/views/alarmGroup/components/groupListUser.vue +++ b/src/views/alarmGroup/components/groupListUser.vue @@ -95,9 +95,14 @@ // { id: '1', name: '张三', phone: '19828192812', deptname: '执勤部' }, // { id: '1', name: '张三', phone: '19828192812', deptname: '执勤部' } // ] - this.list = response.data.rows - this.total = parseInt(response.data.total) - this.listLoading = false + if (response.data.rows.length === 0 && this.listQuery.offset > 1) { this.listQuery.offset -= 1 + this.listQuery.offset -= 1 + this.fetchData() + } else { + this.list = response.data.rows + this.total = parseInt(response.data.total) + this.listLoading = false + } } }) }, diff --git a/src/views/alarmGroup/components/groupListUser.vue b/src/views/alarmGroup/components/groupListUser.vue index 3572125..479dc87 100644 --- a/src/views/alarmGroup/components/groupListUser.vue +++ b/src/views/alarmGroup/components/groupListUser.vue @@ -95,9 +95,14 @@ // { id: '1', name: '张三', phone: '19828192812', deptname: '执勤部' }, // { id: '1', name: '张三', phone: '19828192812', deptname: '执勤部' } // ] - this.list = response.data.rows - this.total = parseInt(response.data.total) - this.listLoading = false + if (response.data.rows.length === 0 && this.listQuery.offset > 1) { this.listQuery.offset -= 1 + this.listQuery.offset -= 1 + this.fetchData() + } else { + this.list = response.data.rows + this.total = parseInt(response.data.total) + this.listLoading = false + } } }) }, diff --git a/src/views/alarmGroup/components/groupListWell.vue b/src/views/alarmGroup/components/groupListWell.vue index 85944a4..b642635 100644 --- a/src/views/alarmGroup/components/groupListWell.vue +++ b/src/views/alarmGroup/components/groupListWell.vue @@ -100,9 +100,14 @@ // { id: '1', wellCode: 'N57F141', position: '北京市通州区AA路AA号', wellTypeName: '雨水井', deptName: '永定路派出所' }, // { id: '1', wellCode: 'N57F141', position: '北京市通州区AA路AA号', wellTypeName: '雨水井', deptName: '永定路派出所' } // ] - this.list = response.data.rows - this.total = parseInt(response.data.total) - this.listLoading = false + if (response.data.rows.length === 0 && this.listQuery.offset > 1) { + this.listQuery.offset -= 1 + this.fetchData() + } else { + this.list = response.data.rows + this.total = parseInt(response.data.total) + this.listLoading = false + } } }) }, diff --git a/src/views/alarmGroup/components/groupListUser.vue b/src/views/alarmGroup/components/groupListUser.vue index 3572125..479dc87 100644 --- a/src/views/alarmGroup/components/groupListUser.vue +++ b/src/views/alarmGroup/components/groupListUser.vue @@ -95,9 +95,14 @@ // { id: '1', name: '张三', phone: '19828192812', deptname: '执勤部' }, // { id: '1', name: '张三', phone: '19828192812', deptname: '执勤部' } // ] - this.list = response.data.rows - this.total = parseInt(response.data.total) - this.listLoading = false + if (response.data.rows.length === 0 && this.listQuery.offset > 1) { this.listQuery.offset -= 1 + this.listQuery.offset -= 1 + this.fetchData() + } else { + this.list = response.data.rows + this.total = parseInt(response.data.total) + this.listLoading = false + } } }) }, diff --git a/src/views/alarmGroup/components/groupListWell.vue b/src/views/alarmGroup/components/groupListWell.vue index 85944a4..b642635 100644 --- a/src/views/alarmGroup/components/groupListWell.vue +++ b/src/views/alarmGroup/components/groupListWell.vue @@ -100,9 +100,14 @@ // { id: '1', wellCode: 'N57F141', position: '北京市通州区AA路AA号', wellTypeName: '雨水井', deptName: '永定路派出所' }, // { id: '1', wellCode: 'N57F141', position: '北京市通州区AA路AA号', wellTypeName: '雨水井', deptName: '永定路派出所' } // ] - this.list = response.data.rows - this.total = parseInt(response.data.total) - this.listLoading = false + if (response.data.rows.length === 0 && this.listQuery.offset > 1) { + this.listQuery.offset -= 1 + this.fetchData() + } else { + this.list = response.data.rows + this.total = parseInt(response.data.total) + this.listLoading = false + } } }) }, diff --git a/src/views/alarmGroup/editGroup.vue b/src/views/alarmGroup/editGroup.vue index 2debd9f..001229c 100644 --- a/src/views/alarmGroup/editGroup.vue +++ b/src/views/alarmGroup/editGroup.vue @@ -12,7 +12,7 @@ - +