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

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="table-wrap">
<el-table
:data="infoTableDatas"
ref="multipleTable"
tooltip-effect="dark"
border
@@ -42,41 +43,36 @@
width="55"
align="center">
</el-table-column>
<el-table-column
label="序号"
type="index"
align="center"
width="100">
</el-table-column>
<el-table-column
label="标准编号/政策编号"
prop="lawId"
align="center"
width="300"
>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="standName"
prop="lawName"
label="标准名称/政策名称"
align="center"
>
</el-table-column>
<el-table-column
prop="issueTime"
prop="productType"
sortable="custom"
width="200px"
align="center"
label="产品类型">
</el-table-column>
<el-table-column
prop="SSRQ"
prop="implTime"
sortable="custom"
align="center"
width="200px"
label="实施日期">
</el-table-column>
<el-table-column
prop="SSRQ"
prop="implRequire"
sortable="custom"
align="center"
width="200px"
@@ -280,12 +276,6 @@
width="55"
align="center">
</el-table-column>
<el-table-column
type="index"
label="序号"
width="80"
align="center"
></el-table-column>
<el-table-column
prop="lawId"
width="200"
@@ -377,6 +367,7 @@ export default {
},
data() {
return {
infoTableDatas: [],
productTypeOptions: [{label: '树形结构', value: 'TREE'}, {label: '下拉选项', value: 'SEL_OPTION'}],
loadSarStandard: false,
tableHeight: {
@@ -498,43 +489,13 @@ export default {
break
// 带入
case 2:
if (this.standardCheckedList.length === 1) {
this.$http.get('lawss/sarLawsInfo/getStandInfoUpdateById', {id: this.standardCheckedList[0].id}, {
_this: this
}, res => {
if (res && res.data) {
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('最多可以带入一条政策信息')
if (this.standardCheckedList && this.standardCheckedList.length >= 1) {
console.log('504',this.standardCheckedList)
this.infoTableDatas = this.standardCheckedList
console.log('505',this.infoTableDatas)
this.standardDrawer = false
} else {
this.$message.warning('请选择要带入的政策信息')
this.$message.warning('请选择要带入的数据')
}
break
// 取消
@@ -589,9 +550,11 @@ export default {
this.$http.get('sarIssueTrack/issueTrack', this.standardSearchForm, {_this: this}, res => {
this.loadSarStandard = false
if (res.ok) {
this.standardSearchForm.page = 1
this.tableData.standardData = res.data.records
this.standardSearchForm.total = res.data.total
if ((this.tableData.standardData.length === 0 || this.tableData.standardData === []) && this.standardSearchForm.page !== 1) {
this.handleStandardPageChange(1)
}
}
}, e => {
this.loadSarStandard = false