|
@@ -31,7 +31,7 @@
|
|
|
|
|
|
<div class="line-between-divs"></div>
|
|
|
|
|
|
- <el-table :data="businessShowData.slice((currentPage-1)*pagesize,currentPage*pagesize)" style="width: 100%;" @row-click="onButtonClick" stripe>
|
|
|
+ <el-table :data="businessShowData" style="width: 100%;" @row-click="onButtonClick" stripe>
|
|
|
<el-table-column align="center" label="申请编号" >
|
|
|
<template v-slot="{row}">
|
|
|
<span>{{ row.businessNum}}</span>
|
|
@@ -90,7 +90,7 @@
|
|
|
:page-sizes="[5,10,15]"
|
|
|
:page-size="pagesize"
|
|
|
layout="total,jumper,prev, pager, next,sizes"
|
|
|
- :total="businessShowData.length" >
|
|
|
+ :total=showSize >
|
|
|
</el-pagination>
|
|
|
</el-main>
|
|
|
|
|
@@ -101,7 +101,7 @@
|
|
|
<script>
|
|
|
|
|
|
import {
|
|
|
- businessAnalysisList
|
|
|
+ businessAnalysisList, selectBusinessAnalysis,
|
|
|
} from '@/api/index.js'
|
|
|
import store from "@/store";
|
|
|
import request from '@/utils/request.js'
|
|
@@ -119,8 +119,10 @@ export default {
|
|
|
activeKey: 0,
|
|
|
activeName: "second",
|
|
|
currentPage: 1,
|
|
|
- pagesize:5,
|
|
|
+ pagesize:10,
|
|
|
businessData : [],
|
|
|
+ selectBusinessData : [],
|
|
|
+
|
|
|
businessShowData : [],
|
|
|
|
|
|
selected1: true,
|
|
@@ -130,6 +132,8 @@ export default {
|
|
|
selected5: true,
|
|
|
selected6: false,
|
|
|
input:'',
|
|
|
+ showSize:'',
|
|
|
+ totalSize:''
|
|
|
}
|
|
|
},
|
|
|
watch: {},
|
|
@@ -139,11 +143,14 @@ export default {
|
|
|
beforeMount() {},
|
|
|
mounted()
|
|
|
{
|
|
|
- businessAnalysisList().then(
|
|
|
+ businessAnalysisList(this.currentPage,this.pagesize).then(
|
|
|
res=>
|
|
|
{
|
|
|
- this.businessData=res.data.business_todo_list;
|
|
|
+ this.businessData=res.data.business_analysis_list.list;
|
|
|
this.businessShowData = this.businessData
|
|
|
+ var j = parseInt(res.data.business_analysis_list.total)
|
|
|
+ this.totalSize = j
|
|
|
+ this.showSize = this.totalSize
|
|
|
}
|
|
|
)
|
|
|
},
|
|
@@ -185,9 +192,45 @@ export default {
|
|
|
},
|
|
|
handleCurrentChange:function(currentPage){
|
|
|
this.currentPage=currentPage;
|
|
|
+ if(!this.input){
|
|
|
+ businessAnalysisList(this.currentPage,this.pagesize).then(
|
|
|
+ res=>
|
|
|
+ {
|
|
|
+ this.businessData=res.data.business_analysis_list.list;
|
|
|
+ this.businessShowData = this.businessData
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ selectBusinessAnalysis(this.currentPage,this.pagesize,this.input).then(
|
|
|
+ res=>
|
|
|
+ {
|
|
|
+ this.selectBusinessData=res.data.select_business_analysis.list;
|
|
|
+ this.businessShowData = this.selectBusinessData
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
},
|
|
|
handleSizeChange:function(size){
|
|
|
this.pagesize=size;
|
|
|
+ if(!this.input){
|
|
|
+ businessAnalysisList(this.currentPage,this.pagesize).then(
|
|
|
+ res=>
|
|
|
+ {
|
|
|
+ this.businessData=res.data.business_analysis_list.list;
|
|
|
+ this.businessShowData = this.businessData
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ selectBusinessAnalysis(this.currentPage,this.pagesize,this.input).then(
|
|
|
+ res=>
|
|
|
+ {
|
|
|
+ this.selectBusinessData=res.data.select_business_analysis.list;
|
|
|
+ this.businessShowData = this.selectBusinessData
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
},
|
|
|
async getTableData(){
|
|
|
try {
|
|
@@ -254,19 +297,27 @@ export default {
|
|
|
filterTable(){
|
|
|
|
|
|
if (this.input.trim() === '') {
|
|
|
- this.businessShowData = this.businessData
|
|
|
+ businessAnalysisList(this.currentPage,this.pagesize).then(
|
|
|
+ res=>
|
|
|
+ {
|
|
|
+ this.businessData=res.data.business_analysis_list.list;
|
|
|
+ this.businessShowData = this.businessData
|
|
|
+ }
|
|
|
+ )
|
|
|
+ this.showSize = this.totalSize
|
|
|
// 如果输入框为空,显示所有数据
|
|
|
} else {
|
|
|
// 否则,只显示与输入文本匹配的数据
|
|
|
-
|
|
|
-
|
|
|
- this.businessShowData = this.businessData.filter(item =>
|
|
|
- {
|
|
|
- const values = Object.values(item);
|
|
|
- const str = values.join(' ').toLowerCase();
|
|
|
- return str.includes(this.input.toLowerCase());
|
|
|
- });
|
|
|
-
|
|
|
+ selectBusinessAnalysis(this.currentPage,this.pagesize,this.input).then(
|
|
|
+ res=>
|
|
|
+ {
|
|
|
+ this.selectBusinessData=res.data.select_business_analysis.list;
|
|
|
+ this.businessShowData = this.selectBusinessData
|
|
|
+ var j = parseInt(res.data.select_business_analysis.total)
|
|
|
+ this.totalSize = j
|
|
|
+ this.showSize = this.totalSize
|
|
|
+ }
|
|
|
+ )
|
|
|
}
|
|
|
},
|
|
|
|