feat : 表格分页时序号连续

This commit is contained in:
2024-08-17 11:24:43 +08:00
parent 09c51f13fc
commit b6b1c8a3ff
14 changed files with 79 additions and 28 deletions

View File

@@ -109,7 +109,10 @@ const tableConfig = reactive({
type: 'index',
label: '序号',
align: 'center',
width:85
width:85,
index: index => {
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
}
},
{
prop: 'affiliatedCompany',

View File

@@ -101,7 +101,10 @@ const tableConfig = reactive({
type: 'index',
label: '序号',
align: 'center',
width:85
width:85,
index: index => {
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
}
},
{
prop: 'shareName',

View File

@@ -17,14 +17,14 @@
</el-row>
<el-tabs v-model="activeName" class="demo-tabs">
<el-tab-pane :label="'待办('+todoNum +''" name="first" v-loading="loading">
<fvTable ref="tableIns" class="home-table" :tableConfig="tableConfigBacklog" @getTotal="getTotal">
<fvTable ref="tableConfigBacklogRef" class="home-table" :tableConfig="tableConfigBacklog" @getTotal="getTotal">
<template #empty>
<el-empty description="暂无待办"/>
</template>
</fvTable>
</el-tab-pane>
<el-tab-pane :label="'待上报(' + reportNum + ''" name="second">
<fvTable ref="tableIns" :tableConfig="tableConfigReport" @getTotal="getReportNumTotal">
<fvTable ref="tableConfigReportRef" :tableConfig="tableConfigReport" @getTotal="getReportNumTotal">
<template #empty>
<el-empty description="暂无数据"/>
</template>
@@ -68,6 +68,8 @@ import {useAuthStore} from '@/stores/userstore.js'
const AuthStore = useAuthStore()
const router = useRouter()
const activeName = ref('first')
const tableConfigBacklogRef=ref()
const tableConfigReportRef=ref()
const list = ref([
{
title: '待立项',
@@ -129,6 +131,9 @@ const tableConfigBacklog = reactive({
label: '序号',
align: 'center',
width:85,
index: index => {
return (tableConfigBacklogRef.value.getQuery().pageNum - 1) * tableConfigBacklogRef.value.getQuery().pageSize + index + 1
}
},
{
prop: 'targetName',
@@ -194,6 +199,9 @@ const tableConfigReport = reactive({
label: '序号',
align: 'center',
width:85,
index: index => {
return (tableConfigReportRef.value.getQuery().pageNum - 1) * tableConfigReportRef.value.getQuery().pageSize + index + 1
}
},
{
prop: 'requirementName',

View File

@@ -35,7 +35,10 @@ const tableConfig = reactive({
type: 'index',
label: '序号',
align: 'center',
width:85
width:85,
index: index => {
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
}
},
{
prop: 'annualPlanName',

View File

@@ -1,14 +1,16 @@
<template>
<el-form ref="formRef" :model="selectForm" class="search-form select-form" style="margin-top: 18px;margin-left: 16px">
<el-row >
<el-row>
<el-col :span="5">
<el-form-item prop="requirementName" label="征集名称" >
<el-input v-model="selectForm.requirementName" placeholder="请输入征集名称" clearable @keyup.enter.native="getList" style="width: 100%"/>
<el-form-item prop="requirementName" label="征集名称">
<el-input v-model="selectForm.requirementName" placeholder="请输入征集名称" clearable @keyup.enter.native="getList"
style="width: 100%"/>
</el-form-item>
</el-col>
<el-col :span="5" :offset="1">
<el-form-item prop="collectType" label="征集类型">
<el-select v-model="selectForm.collectType" ref="collectTypeSelectRef" placeholder="请选择征集类型" clearable filterable remote
<el-select v-model="selectForm.collectType" ref="collectTypeSelectRef" placeholder="请选择征集类型" clearable
filterable remote
@change="getList">
<el-option
v-for="item in cacheStore.getDict('collect_type')"
@@ -21,7 +23,8 @@
</el-col>
<el-col :span="5" :offset="1">
<el-form-item prop="state" label="状态">
<el-select v-model="selectForm.state" placeholder="请选择状态" clearable filterable @change="getList" remote @visible-change="selectOptionVisibleChange">
<el-select v-model="selectForm.state" placeholder="请选择状态" clearable filterable @change="getList" remote
@visible-change="selectOptionVisibleChange">
<el-option
v-for="item in stateOption"
:key="item.value"
@@ -83,7 +86,10 @@ const tableConfig = reactive({
type: 'index',
label: '序号',
align: 'center',
width:85,
width: 85,
index: index => {
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
}
},
{
prop: 'requirementName',
@@ -115,9 +121,9 @@ const tableConfig = reactive({
align: 'center',
width: 120,
currentRender: ({row, index}) => {
if(row.state=='1'){
if (row.state == '1') {
return <span>{row.approveName}</span>
}else {
} else {
return <span>{row.taskNode}</span>
}
}
@@ -181,12 +187,12 @@ const tableConfig = reactive({
params: {}
})
const selectOptionVisibleChange=(value)=>{
console.log('value',value)
const selectOptionVisibleChange = (value) => {
console.log('value', value)
}
const getStatePerm = () => {
const getStatePerm = () => {
getRequirementStatePerm().then(res => {
stateOption.value=res.data
stateOption.value = res.data
})
}
getStatePerm()
@@ -257,10 +263,10 @@ const headBtnClick = (key) => {
}
</script>
<style lang="scss">
.select-form{
.select-form {
.el-select {
.el-select__wrapper{
.el-select__wrapper {
.el-select__suffix::before {
content: "";
width: 6px;
@@ -270,12 +276,13 @@ const headBtnClick = (key) => {
transform: translate(-50%, -50%) rotate(-45deg);
}
}
.is-focused {
.el-select__suffix::before {
margin-top: 10px;
transform:translate(-50%, -50%) rotate(-225deg)!important;
}
}
.el-select__suffix::before {
margin-top: 10px;
transform: translate(-50%, -50%) rotate(-225deg) !important;
}
}
}
}
</style>

View File

@@ -168,6 +168,9 @@ const tableConfig = reactive({
label: '序号',
align: 'center',
width:60,
index: index => {
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
}
},
{
prop: 'requirementName',

View File

@@ -162,6 +162,9 @@ const tableConfig = reactive({
label: '序号',
align: 'center',
width:85,
index: index => {
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
}
},
{
prop: 'affiliatedCompany',

View File

@@ -374,7 +374,10 @@ const tableConfig = reactive({
type: 'index',
label: '序号',
width: '80',
align: 'center'
align: 'center',
index: index => {
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
}
},
{
prop: 'time',

View File

@@ -165,6 +165,9 @@ const tableConfig = reactive({
label: '序号',
align: 'center',
width:85,
index: index => {
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
}
},
{
prop: 'affiliatedCompany',

View File

@@ -247,7 +247,10 @@ const tableConfig = reactive({
type: 'index',
label: '序号',
align: 'center',
width:'80'
width:'80',
index: index => {
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
}
},
{
prop: 'time',

View File

@@ -159,6 +159,9 @@ const tableConfig = reactive({
label: '序号',
align: 'center',
width:85,
index: index => {
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
}
},
{
prop: 'affiliatedCompany',

View File

@@ -73,6 +73,9 @@ const tableConfig = reactive({
label: '序号',
align: 'center',
width:85,
index: index => {
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
}
},
{
prop: 'name',

View File

@@ -119,7 +119,10 @@ const tableConfig = reactive({
type: 'index',
label: '序号',
align: 'center',
width:85
width:85,
index: index => {
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
}
},
{
prop: 'roleName',

View File

@@ -98,7 +98,10 @@ const tableConfig = reactive({
type: 'index',
label: '序号',
align: 'center',
width:85
width:85,
index: index => {
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
}
},
{
prop: 'userName',