lilu 2 years ago
commit 46e1bd7250

@ -12,7 +12,13 @@ export function CommondbCodeCountryList(parameter) {
params: parameter
})
}
export function CommondbPageCodeCountryList(parameter) {
return axios({
url: '/commondbpage/CodeCountryList',
method: 'get',
params: parameter
})
}
/**
* 保存国家
*

@ -12,7 +12,13 @@ export function CommondbCodeLaneList(parameter) {
params: parameter
})
}
export function CommondbPageCodeLaneList(parameter) {
return axios({
url: '/commondbpage/CodeLaneList',
method: 'get',
params: parameter
})
}
/**
* 保存航线信息
*

@ -49,7 +49,7 @@
</a-button>
</template>
</vxe-toolbar>
<vxe-table :data="loadData" border :loading="loading" height="600px" empty-text="">
<vxe-table :data="loadData" border :loading="loading" height="546" empty-text="">
<vxe-column type="seq" width="50" fixed="left"></vxe-column>
<vxe-column
v-for="item in columns"
@ -67,13 +67,21 @@
</template>
</vxe-column>
</vxe-table>
<vxe-pager
:current-page="queryParam.PageNo"
:page-size="queryParam.PageSize"
:total="queryParam.totalCount"
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
@page-change="handlePageChange1"
>
</vxe-pager>
<add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />
</a-card>
</div>
</template>
<script>
import { CommondbCodeCountryList } from '@/api/modular/main/CommondbCodeCountry'
import { CommondbPageCodeCountryList } from '@/api/modular/main/CommondbCodeCountry'
import addForm from './addForm.vue'
import editForm from './editForm.vue'
export default {
@ -90,9 +98,11 @@ export default {
setVisible: false,
setVisible1: false,
queryParam: {
// currentPage: 1,
// pageSize: 10,
// totalResult: 1
PageNo: 1,
PageSize: 10,
totalCount: 0,
SortField: 'sort',
descSort: true
},
ColumnsQuery: [],
columns: [
@ -139,7 +149,7 @@ export default {
dataIndex: 'remark'
}
],
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
tstyle: { 'padding-top': '12px', 'padding-bottom': '0px', 'margin-bottom': '10px' },
// Promise
loadData: [],
CodeData: [],
@ -153,6 +163,11 @@ export default {
this.init()
},
methods: {
handlePageChange1({ currentPage, pageSize }) {
this.queryParam.PageNo = currentPage
this.queryParam.PageSize = pageSize
this.FnGetData()
},
toggleAdvanced() {
this.advanced = !this.advanced
},
@ -163,9 +178,10 @@ export default {
},
FnGetData() {
this.loading = true
CommondbCodeCountryList(this.queryParam).then(res => {
CommondbPageCodeCountryList(this.queryParam).then(res => {
if (res.code == 200) {
this.loadData = res.data
this.loadData = res.data.items
this.queryParam.totalCount = res.data.totalCount
} else {
this.loadData = []
this.$message.warning(res.message)

@ -49,7 +49,7 @@
</a-button>
</template>
</vxe-toolbar>
<vxe-table :data="loadData" border :loading="loading" height="600px" empty-text="">
<vxe-table :data="loadData" border :loading="loading" height="546" empty-text="">
<vxe-column type="seq" width="50" fixed="left"></vxe-column>
<vxe-column
v-for="item in columns"
@ -67,13 +67,21 @@
</template>
</vxe-column>
</vxe-table>
<vxe-pager
:current-page="queryParam.PageNo"
:page-size="queryParam.PageSize"
:total="queryParam.totalCount"
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
@page-change="handlePageChange1"
>
</vxe-pager>
<add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />
</a-card>
</div>
</template>
<script>
import { CommondbCodeLaneList } from '@/api/modular/main/CommondbCodeLane'
import { CommondbPageCodeLaneList } from '@/api/modular/main/CommondbCodeLane'
import addForm from './addForm.vue'
import editForm from './editForm.vue'
export default {
@ -90,9 +98,11 @@ export default {
setVisible: false,
setVisible1: false,
queryParam: {
// currentPage: 1,
// pageSize: 10,
// totalResult: 1
PageNo: 1,
PageSize: 10,
totalCount: 0,
SortField: 'sort',
descSort: true
},
ColumnsQuery: [],
columns: [
@ -128,7 +138,7 @@ export default {
dataIndex: 'description'
}
],
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
tstyle: { 'padding-top': '12px', 'padding-bottom': '0px', 'margin-bottom': '10px' },
// Promise
loadData: [],
CodeData: [],
@ -142,6 +152,11 @@ export default {
this.init()
},
methods: {
handlePageChange1({ currentPage, pageSize }) {
this.queryParam.PageNo = currentPage
this.queryParam.PageSize = pageSize
this.FnGetData()
},
toggleAdvanced() {
this.advanced = !this.advanced
},
@ -152,9 +167,10 @@ export default {
},
FnGetData() {
this.loading = true
CommondbCodeLaneList(this.queryParam).then(res => {
CommondbPageCodeLaneList(this.queryParam).then(res => {
if (res.code == 200) {
this.loadData = res.data
this.loadData = res.data.items
this.queryParam.totalCount = res.data.totalCount
} else {
this.loadData = []
this.$message.warning(res.message)

Loading…
Cancel
Save