+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+
+
+ style="width: 100%;position: relative;top:30px">
-
+
+
+ 编辑
+ 删除
+
-
-
+ -->
+
+
+
@@ -109,9 +138,9 @@
if (valid) {
const _this = this
_this.ruleForm.page = _this.currentPage
- axios.get('http://localhost:8080/dormitoryAdmin/search',{params:_this.ruleForm}).then(function (resp) {
- _this.tableData = resp.data.data.data
- _this.total = resp.data.data.total
+ axios.get('http://localhost:8080/system/dormitoryAdmin/search',{params:_this.ruleForm}).then(function (resp) {
+ _this.tableData = resp.data.content
+ _this.total = resp.data.totalElements
})
}
});
@@ -119,15 +148,16 @@
page(currentPage){
const _this = this
if(_this.ruleForm.value == ''){
- axios.get('http://localhost:8080/dormitoryAdmin/list/'+currentPage+'/'+_this.pageSize).then(function (resp) {
- _this.tableData = resp.data.data.data
- _this.total = resp.data.data.total
+ axios.get('http://localhost:8080/system/dormitoryAdmin/list/'+currentPage+'/'+_this.pageSize).then(function (resp) {
+ _this.tableData = resp.data.content
+ _this.total = resp.data.totalElements
})
} else {
_this.ruleForm.page = _this.currentPage
- axios.get('http://localhost:8080/dormitoryAdmin/search',{params:_this.ruleForm}).then(function (resp) {
- _this.tableData = resp.data.data.data
- _this.total = resp.data.data.total
+ axios.get('http://localhost:8080/system/dormitoryAdmin/search',{params:_this.ruleForm}).then(function (resp) {
+ _this.tableData = resp.data.content
+ _this.total = resp.data.totalElements
+ console.log(resp.data)
})
}
},
@@ -141,8 +171,8 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
- axios.delete('http://localhost:8080/dormitoryAdmin/deleteById/'+row.id).then(function (resp) {
- if(resp.data.code==0){
+ axios.delete('http://localhost:8080/system/dormitoryAdmin/'+row.id).then(function (resp) {
+ if(resp.data.code==200){
_this.$alert('【'+row.username+'】已删除', '', {
confirmButtonText: '确定',
callback: action => {
@@ -153,12 +183,13 @@
});
});
}
- },
+ },
created() {
const _this = this
- axios.get('http://localhost:8080/dormitoryAdmin/list/1/'+_this.pageSize).then(function (resp) {
- _this.tableData = resp.data.data.data
- _this.total = resp.data.data.total
+ axios.get('http://127.0.0.1:8080/system/dormitoryAdmin/list/1/'+_this.pageSize).then(function (resp) {
+ _this.tableData = resp.data.content
+ _this.total = resp.data.totalElements
+ console.log(resp.data)
})
}
}
diff --git a/src/views/DormitoryAdminUpdate.vue b/src/views/DormitoryAdminUpdate.vue
index 6ad49e8..5455b13 100644
--- a/src/views/DormitoryAdminUpdate.vue
+++ b/src/views/DormitoryAdminUpdate.vue
@@ -15,10 +15,10 @@