Merge pull request 'feat(components): 调整分页组件默认页码和每页条数' (#1090) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1090
This commit is contained in:
@@ -30,12 +30,12 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
pageSize: {
|
pageSize: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 10,
|
default: 20,
|
||||||
},
|
},
|
||||||
pageSizes: {
|
pageSizes: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default(rawProps) {
|
default(rawProps) {
|
||||||
return [10, 15, 20, 30, 50]
|
return [10, 15, 20, 30, 50,100]
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
small: {
|
small: {
|
||||||
@@ -58,7 +58,7 @@ const total = ref(0)
|
|||||||
//对应页数
|
//对应页数
|
||||||
const currentPage = ref(1)
|
const currentPage = ref(1)
|
||||||
//每页多少条
|
//每页多少条
|
||||||
const pageSize = ref(10)
|
const pageSize = ref(20)
|
||||||
//默认每页多少条的数组
|
//默认每页多少条的数组
|
||||||
const pageSizes = ref([])
|
const pageSizes = ref([])
|
||||||
//是否使用小型分页样式
|
//是否使用小型分页样式
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="fv-table-container">
|
<div class="fv-table-container">
|
||||||
<el-button v-if="tableConfig.export && tableConfig.export.open&&changeExportPosition" @click="exportTable" color="#DED0B2"
|
<el-button v-if="tableConfig.export && tableConfig.export.open&&changeExportPosition" @click="exportTable"
|
||||||
|
color="#DED0B2"
|
||||||
style="float: left;margin-right: 10px">导出
|
style="float: left;margin-right: 10px">导出
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 表格头部按钮 -->
|
<!-- 表格头部按钮 -->
|
||||||
@@ -18,7 +19,8 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-button v-if="tableConfig.export && tableConfig.export.open&&!changeExportPosition" @click="exportTable" color="#DED0B2"
|
<el-button v-if="tableConfig.export && tableConfig.export.open&&!changeExportPosition" @click="exportTable"
|
||||||
|
color="#DED0B2"
|
||||||
style="margin-bottom: 10px">导出
|
style="margin-bottom: 10px">导出
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 列显示配置 -->
|
<!-- 列显示配置 -->
|
||||||
@@ -93,7 +95,7 @@
|
|||||||
v-if="pagination"
|
v-if="pagination"
|
||||||
:current-page="localData.query.pageNum"
|
:current-page="localData.query.pageNum"
|
||||||
:page-size="localData.query.pageSize"
|
:page-size="localData.query.pageSize"
|
||||||
:page-sizes="[10, 20, 30, 40,50]"
|
:page-sizes="[10, 20, 30, 40,50,100]"
|
||||||
:total="localData.total"
|
:total="localData.total"
|
||||||
@changeSize="handleSizeChange"
|
@changeSize="handleSizeChange"
|
||||||
@goPage="handleCurrentChange"
|
@goPage="handleCurrentChange"
|
||||||
@@ -157,7 +159,7 @@ const exportTable = () => {
|
|||||||
const localData = reactive({
|
const localData = reactive({
|
||||||
list: [], // 表格数据
|
list: [], // 表格数据
|
||||||
query: {
|
query: {
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
pageNum: 1
|
pageNum: 1
|
||||||
},
|
},
|
||||||
total: 0,
|
total: 0,
|
||||||
@@ -227,7 +229,7 @@ const getList = async () => {
|
|||||||
if (api) {
|
if (api) {
|
||||||
localData.loading = true
|
localData.loading = true
|
||||||
try {
|
try {
|
||||||
const {code, data, msg} = await requestList(api, queryParmas).then(res=>{
|
const {code, data, msg} = await requestList(api, queryParmas).then(res => {
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
@@ -250,8 +252,8 @@ const getList = async () => {
|
|||||||
localData.loading = false
|
localData.loading = false
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("error",error)
|
console.log("error", error)
|
||||||
if (!error){
|
if (!error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ElNotification({
|
ElNotification({
|
||||||
|
|||||||
@@ -156,7 +156,7 @@
|
|||||||
<div class="title-block">
|
<div class="title-block">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<div class="tag"></div>
|
<div class="tag"></div>
|
||||||
<span>专项资金项目</span>
|
<span>资金类型</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="more" @click="goToSpecialFund">
|
<div class="more" @click="goToSpecialFund">
|
||||||
<span>更多</span>
|
<span>更多</span>
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
<div id="fundPie" ref="fundPie"></div>
|
<div id="fundPie" ref="fundPie"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="fund-pie">专项资金项目统计图</div>
|
<div class="fund-pie">资金类型统计图</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -180,7 +180,7 @@
|
|||||||
<div class="title-block">
|
<div class="title-block">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<div class="tag"></div>
|
<div class="tag"></div>
|
||||||
<span>研发投入资金</span>
|
<span>研发投入</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="more" @click="goToResearchFund">
|
<div class="more" @click="goToResearchFund">
|
||||||
<span>更多</span>
|
<span>更多</span>
|
||||||
@@ -201,7 +201,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="moneyData&&moneyData.length==0" style="margin-top: 30px">
|
<div v-if="moneyData&&moneyData.length==0" style="margin-top: 30px">
|
||||||
<el-empty image-size="135" description="暂无研发投入资金信息~"/>
|
<el-empty image-size="135" description="暂无研发投入信息~"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="money-block" v-else>
|
<div class="money-block" v-else>
|
||||||
<div class="money-container">
|
<div class="money-container">
|
||||||
@@ -219,7 +219,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="fund-pie" v-if="totalMoney" style="text-align: left;margin-left: 70px;margin-top: 10px">
|
<div class="fund-pie" v-if="totalMoney" style="text-align: left;margin-left: 70px;margin-top: 10px">
|
||||||
研发投入资金统计图
|
研发投入统计图
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user