Commit 5e8319be authored by neogcg's avatar neogcg

2.23

parent bd3a2a11
......@@ -24,6 +24,7 @@
"vue-router": "3.0.6",
"vuex": "3.1.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "4.4.4",
"@vue/cli-plugin-eslint": "4.4.4",
......
This diff is collapsed.
import request from '@/utils/request'
const path = {
railWaylist: 'railWay/selectPage',
railWaydetail: 'railWay/detail',
railWaysave: 'railWay/save',
railWaybatchDelete: 'railWay/batchDelete',
railWayselectList: 'railWay/selectList',
}
export function railWaylist() {
return request.post(path.railWaylist, ...arguments)
}
export function railWaydetail() {
return request.post(path.railWaydetail, ...arguments)
}
export function railWaysave() {
return request.post(path.railWaysave, ...arguments)
}
export function railWaybatchDelete() {
return request.post(path.railWaybatchDelete, ...arguments)
}
export function railWayselectList() {
return request.post(path.railWayselectList, ...arguments)
}
......@@ -69,8 +69,8 @@
</el-table-column>
</el-table>
<pagination
:limit="searchForm.pageSize"
:page="searchForm.pageNum"
:limit="params.pageSize"
:page="params.pageNum"
:total="total"
class="pagination"
@pagination="handlePageChange"
......@@ -80,11 +80,12 @@
<script>
import Pagination from "@/components/Pagination";
import { railWaylist } from "../api"
export default {
components: { Pagination },
data() {
return {
searchForm: {
params: {
pageNum: 1,
pageSize: 10,
},
......@@ -198,16 +199,25 @@ export default {
},
handleView() {},
handlePageChange(pageData) {
this.searchForm.pageSize = pageData.size;
this.searchForm.pageNum = pageData.page;
this.params.pageSize = pageData.size;
this.params.pageNum = pageData.page;
this.getTableData()
},
getTableData() {
this.tableData2 = this.tableData.slice(( this.searchForm.pageNum - 1) * this.searchForm.pageSize,
this.searchForm.pageNum * this.searchForm.pageSize
);
this.total = this.tableData.length
// this.tableData2 = this.tableData.slice(( this.params.pageNum - 1) * this.params.pageSize,
// this.params.pageNum * this.params.pageSize
// );
// this.total = this.tableData.length
let params = {
current: this.params.pageNum,
size: this.params.pageSize
}
railWaylist(params).then((res)=>{
console.log(res);
let list = res.records || []
this.tableData = list
this.total = res.total
})
},
},
mounted() {
......
......@@ -5,6 +5,7 @@ const path = {
create: 'user/saveUser',
updatePwd: 'user/updatePwd',
updateInfo: 'user/updateUserBaseInfo',
}
export function list() {
......@@ -23,3 +24,4 @@ export function updateInfo() {
return request.post(path.updateInfo, ...arguments)
}
......@@ -76,6 +76,7 @@ export default {
size: this.params.pageSize
}
list(params).then(res => {
let list = res.records || []
this.tableData = list
this.total = res.total
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment