分页增加

yanzili 3 years ago
parent 56e6335b32
commit 3ba7518893

@ -167,7 +167,7 @@ export function editReportExcel (data) {
// /dataSet/pageList
export function dataSetPageList (data) {
return request({
url: '/dataSet/pageList',
url: '/dataSet/pageList?page=' + data.page + '&size=' + data.size + '&sort=' + data.sort + '&order=' + data.order + '&pageNumber=' + data.pageNumber + '&pageSize=' + data.pageSize,
method: 'GET',
data,
})

@ -899,8 +899,9 @@ li {
top: 0;
}
.nav > li:last-child > ul > li > ul {
left: -100%;
left: 140px;
top: 0;
width: 400px;
}
.nav > li > ul > li:hover > ul {
display: block;

@ -14,12 +14,12 @@
:md="6"
:lg="6"
:xl="6">
<el-form-item label="数据集名称"
<el-form-item label="数据集编码"
label-width="120px">
<el-input v-model.trim="query.setName"
<el-input v-model.trim="query.setCode"
size="mini"
clearable
placeholder="数据源名称"
placeholder="数据集编码"
class="filter-item" />
</el-form-item>
</el-col>
@ -28,12 +28,12 @@
:md="6"
:lg="6"
:xl="6">
<el-form-item label="数据集编码"
<el-form-item label="数据集名称"
label-width="120px">
<el-input v-model.trim="query.setCode"
<el-input v-model.trim="query.setName"
size="mini"
clearable
placeholder="数据集编码"
placeholder="数据源名称"
class="filter-item" />
</el-form-item>
</el-col>
@ -106,7 +106,15 @@
</el-table-column>
</el-table>
<!--分页组件-->
<!-- <pagination /> -->
<div class="block">
<el-pagination :total="totalCount"
:page-sizes="[10, 20, 50, 100]"
:page-size="params.pageSize"
:current-page="params.pageNumber"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange" />
</div>
<!--表单组件-->
<el-dialog :visible.sync="dialogFormVisible"
@ -119,7 +127,7 @@
:model="formData"
:rules="formRules"
size="small"
label-width="100px">
label-width="130px">
<el-row :gutter="10">
<el-col :xs="24"
:sm="20"
@ -144,9 +152,9 @@
:md="8"
:lg="8"
:xl="8">
<el-form-item label="数据集名称"
prop="setName">
<el-input v-model.trim="formData.setName"
<el-form-item label="数据集编码"
prop="setCode">
<el-input v-model.trim="formData.setCode"
size="mini" />
</el-form-item>
</el-col>
@ -155,9 +163,9 @@
:md="8"
:lg="8"
:xl="8">
<el-form-item label="数据集编码"
prop="setCode">
<el-input v-model.trim="formData.setCode"
<el-form-item label="数据集名称"
prop="setName">
<el-input v-model.trim="formData.setName"
size="mini" />
</el-form-item>
</el-col>
@ -178,8 +186,7 @@
:lg="22"
:xl="22"
class="code-mirror-form">
<el-form-item label="查询SQL或请求体"
label-width="140px">
<el-form-item label="查询SQL或请求体">
<div class="codemirror">
<codemirror v-model.trim="formData.dynSentence"
:options="optionsSql"
@ -498,6 +505,8 @@ export default {
}`,
itemFilterScriptId: '',
title: '自定义高级规则',
totalCount: 0,
totalPage: 0,
params: {
pageNumber: 1,
pageSize: 10,
@ -570,24 +579,30 @@ export default {
},
async queryByPage () {
let params = {
page: 0,
size: 10,
page: this.params.pageNumber,
size: this.params.pageSize,
sort: "update_time",
order: "DESC",
pageNumber: 1,
pageSize: 10
pageNumber: this.params.pageNumber,
pageSize: this.params.pageSize
}
const res = await dataSetPageList(params)
if (res.code != '200') return
this.listLoading = true
this.data = res.data.records
this.totalCount = res.data.total
this.totalPage = res.data.pages
this.listLoading = false
},
handleSizeChange (val) {
this.params.pageSize = val
this.queryByPage()
},
handleCurrentChange (val) {
this.params.pageNumber = val
this.queryByPage()
},
onJsonChange (value) { },
onJsonSave (value) { },

Loading…
Cancel
Save