搜索非第一页的数据显示搜索无数据的解决方法

This commit is contained in:
yanyizhou
2021-11-14 15:09:24 +08:00
parent d2e449d204
commit f6168f9a4d
@@ -29,6 +29,7 @@
<div class="content"> <div class="content">
<div class="table-wrap"> <div class="table-wrap">
<el-table <el-table
:data="infoTableDatas"
ref="multipleTable" ref="multipleTable"
tooltip-effect="dark" tooltip-effect="dark"
border border
@@ -42,41 +43,36 @@
width="55" width="55"
align="center"> align="center">
</el-table-column> </el-table-column>
<el-table-column
label="序号"
type="index"
align="center"
width="100">
</el-table-column>
<el-table-column <el-table-column
label="标准编号/政策编号" label="标准编号/政策编号"
prop="lawId"
align="center" align="center"
width="300" width="300"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
prop="standName" prop="lawName"
label="标准名称/政策名称" label="标准名称/政策名称"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="issueTime" prop="productType"
sortable="custom" sortable="custom"
width="200px" width="200px"
align="center" align="center"
label="产品类型"> label="产品类型">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="SSRQ" prop="implTime"
sortable="custom" sortable="custom"
align="center" align="center"
width="200px" width="200px"
label="实施日期"> label="实施日期">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="SSRQ" prop="implRequire"
sortable="custom" sortable="custom"
align="center" align="center"
width="200px" width="200px"
@@ -280,12 +276,6 @@
width="55" width="55"
align="center"> align="center">
</el-table-column> </el-table-column>
<el-table-column
type="index"
label="序号"
width="80"
align="center"
></el-table-column>
<el-table-column <el-table-column
prop="lawId" prop="lawId"
width="200" width="200"
@@ -377,6 +367,7 @@ export default {
}, },
data() { data() {
return { return {
infoTableDatas: [],
productTypeOptions: [{label: '树形结构', value: 'TREE'}, {label: '下拉选项', value: 'SEL_OPTION'}], productTypeOptions: [{label: '树形结构', value: 'TREE'}, {label: '下拉选项', value: 'SEL_OPTION'}],
loadSarStandard: false, loadSarStandard: false,
tableHeight: { tableHeight: {
@@ -498,43 +489,13 @@ export default {
break break
// 带入 // 带入
case 2: case 2:
if (this.standardCheckedList.length === 1) { if (this.standardCheckedList && this.standardCheckedList.length >= 1) {
this.$http.get('lawss/sarLawsInfo/getStandInfoUpdateById', {id: this.standardCheckedList[0].id}, { console.log('504',this.standardCheckedList)
_this: this this.infoTableDatas = this.standardCheckedList
}, res => { console.log('505',this.infoTableDatas)
if (res && res.data) { this.standardDrawer = false
const bringData = res.data
const json = Object.assign(bringData, bringData.attrInfoMap);
this.form = JSON.parse(JSON.stringify(json))
this.form.TGRLAWS = JSON.parse(JSON.stringify(json)).TGRLAWS && JSON.parse(JSON.stringify(json)).TGRLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).TGRLAWS.split(',') : []
this.form.TGDWLAWS = JSON.parse(JSON.stringify(json)).TGDWLAWS && JSON.parse(JSON.stringify(json)).TGDWLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).TGDWLAWS.split(',') : []
this.form.NYLXLAWS = JSON.parse(JSON.stringify(json)).NYLXLAWS && JSON.parse(JSON.stringify(json)).NYLXLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).NYLXLAWS.split(',') : []
this.form.YYRZLAWS = JSON.parse(JSON.stringify(json)).YYRZLAWS && JSON.parse(JSON.stringify(json)).YYRZLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).YYRZLAWS.split(',') : []
this.form.ZRBMLAWS = JSON.parse(JSON.stringify(json)).ZRBMLAWS && JSON.parse(JSON.stringify(json)).ZRBMLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).ZRBMLAWS.split(',') : []
this.form.ZRGCSLAWS = JSON.parse(JSON.stringify(json)).ZRGCSLAWS && JSON.parse(JSON.stringify(json)).ZRGCSLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).ZRGCSLAWS.split(',') : []
this.form.prcNum = this.prcNum
this.form.prcName = this.prcName
this.form['id'] = bringData.id
this.standardDrawer = false
this.verifySarStandard = true
this.busVsFunc()
this.modelFunc()
this.$forceUpdate()
}
// 遍历对象初始化文件信息
for (const p in this.form) {
if (typeof (this.form[p]) != "function") {
this.initializeFileList(p, this.form[p]);
}
}
console.log("res", res);
})
} else if (this.standardCheckedList.length > 1) {
this.$message.warning('最多可以带入一条政策信息')
} else { } else {
this.$message.warning('请选择要带入的政策信息') this.$message.warning('请选择要带入的数据')
} }
break break
// 取消 // 取消
@@ -589,9 +550,11 @@ export default {
this.$http.get('sarIssueTrack/issueTrack', this.standardSearchForm, {_this: this}, res => { this.$http.get('sarIssueTrack/issueTrack', this.standardSearchForm, {_this: this}, res => {
this.loadSarStandard = false this.loadSarStandard = false
if (res.ok) { if (res.ok) {
this.standardSearchForm.page = 1
this.tableData.standardData = res.data.records this.tableData.standardData = res.data.records
this.standardSearchForm.total = res.data.total this.standardSearchForm.total = res.data.total
if ((this.tableData.standardData.length === 0 || this.tableData.standardData === []) && this.standardSearchForm.page !== 1) {
this.handleStandardPageChange(1)
}
} }
}, e => { }, e => {
this.loadSarStandard = false this.loadSarStandard = false