fix:分页

feature1.0
kongyeqing 2023-07-04 15:23:01 +08:00
parent 78828cc127
commit dc642f0f1c
17 changed files with 167 additions and 64 deletions

View File

@ -9,8 +9,8 @@
</div>
<div class="table-box flex-1">
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
@actionCallback="callback($event)" @pageNumberChange="callback($event)"
@pageSizeChange="callback($event)" :footerActions="footerActions" :actions="tableActions">
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')"
@pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions">
<el-table ref="multipleTable" :data="tableData.datas" height="100%" border row-key="checked"
@selection-change="handleSelectionChange" style="width: 100%">

View File

@ -360,7 +360,12 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
}
}
public callback(data) {
public callback(data, type) {
if (type) {
this.params[type] = data;
this.getTableData();
return
}
//
if (data.value === "search") {
this.getTableData()
@ -398,7 +403,12 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
} as any;
}
//
public getTableData() {
this.tableService.selectByPage(this.params).then(res => {
this.tableData = res.data as any;
})
}
public showUpdateModel(row, isReadonly) {
this.updateParams = { items: [], } as any;

View File

@ -9,8 +9,8 @@
</div>
<div class="table-box flex-1">
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
@actionCallback="callback($event)" @pageNumberChange="callback($event)"
@pageSizeChange="callback($event)" :footerActions="footerActions" :actions="tableActions">
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')"
@pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions">
<el-table ref="multipleTable" :data="tableData.datas" height="100%" border row-key="checked"
@selection-change="handleSelectionChange" style="width: 100%">

View File

@ -595,7 +595,12 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
});
}
public callback(data) {
public callback(data, type) {
if (type) {
this.params[type] = data;
this.getTableData();
return
}
//
if (data.value === "search") {
this.getTableData()
@ -668,6 +673,14 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
} as any;
}
//
public getTableData() {
this.tableService.selectByPage(this.params).then(res => {
this.tableData = res.data as any;
})
}
public changes(data, item) {
//
if (item && item.key === "areaId") {

View File

@ -494,7 +494,12 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
} as any;
}
//
public getTableData() {
this.tableService.selectByPage(this.params).then(res => {
this.tableData = res.data as any;
})
}
public showUpdateModel(row?, isRead?) {
this.isReadonly = !!isRead;

View File

@ -9,8 +9,8 @@
</div>
<div class="table-box flex-1">
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
@actionCallback="callback($event)" @pageNumberChange="callback($event)"
@pageSizeChange="callback($event)" :footerActions="footerActions" :actions="tableActions">
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')"
@pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions">
<el-table ref="multipleTable" :data="tableData.datas" height="100%" border row-key="checked"
@selection-change="handleSelectionChange" style="width: 100%">
<el-table-column type="selection" fixed label="全选" width="40">

View File

@ -589,7 +589,13 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
});
}
public callback(data) {
public callback(data, type) {
if (type) {
this.params[type] = data;
this.getTableData();
return
}
//
if (data.value === "search") {
this.getTableData()
@ -653,6 +659,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
}
}
}
//
public reset() {
this.params = {
@ -661,6 +668,13 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
} as any;
}
//
public getTableData() {
this.tableService.selectByPage(this.params).then(res => {
this.tableData = res.data as any;
})
}
public changes(data, item) {
//
if (item && item.key === "areaId") {

View File

@ -9,8 +9,8 @@
</div>
<div class="table-box flex-1">
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
@actionCallback="callback($event)" @pageNumberChange="callback($event)"
@pageSizeChange="callback($event)" :footerActions="footerActions" :actions="tableActions">
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')"
@pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions">
<el-table ref="multipleTable" :data="tableData.datas" height="100%" border row-key="checked"
@selection-change="handleSelectionChange" style="width: 100%">
@ -46,11 +46,13 @@
<el-dialog :close-on-click-modal="false" :title="'排查信息'" :visible.sync="showUpdate" width="800px"
:before-close="handleClose">
<FormComponent :options="subUpdateOptions" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
:actions="subActions" @actionCallback="subActionCallback" @change="changes" :full-btn="true" btnPosition="center">
:actions="subActions" @actionCallback="subActionCallback" @change="changes" :full-btn="true"
btnPosition="center">
</FormComponent>
</el-dialog>
<el-dialog v-if="showFile" :close-on-click-modal="false" title="查看图片" :visible.sync="showFile" destroy-on-close width="680px">
<el-dialog v-if="showFile" :close-on-click-modal="false" title="查看图片" :visible.sync="showFile" destroy-on-close
width="680px">
<img :src="currentUrl" style="width: 100%;" alt="">
</el-dialog>
</div>

View File

@ -267,7 +267,12 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
});
}
public callback(data) {
public callback(data, type) {
if (type) {
this.params[type] = data;
this.getTableData();
return
}
//
if (data.value === "search") {
this.getTableData()
@ -285,6 +290,13 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
}
}
//
public getTableData() {
this.tableService.selectByPage(this.params).then(res => {
this.tableData = res.data as any;
})
}
public subActionCallback(data) {
if (data.value === "cancel") {
this.showUpdate = false

View File

@ -9,8 +9,8 @@
</div>
<div class="table-box flex-1">
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
@actionCallback="callback($event)" @pageNumberChange="callback($event)" @pageSizeChange="callback($event)"
:footerActions="footerActions" :actions="tableActions">
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')"
@pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions">
<el-table ref="multipleTable" :data="tableData.datas" height="100%" border row-key="checked"
@selection-change="handleSelectionChange" style="width: 100%">
@ -41,12 +41,14 @@
<el-dialog :close-on-click-modal="false" :title="'排查信息'" :visible.sync="showUpdate" width="800px"
:before-close="handleClose">
<FormComponent :options="subUpdateOptions" :isReadonly="true" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
:actions="subActions" @actionCallback="subActionCallback" @change="changes" :full-btn="true" btnPosition="center">
<FormComponent :options="subUpdateOptions" :isReadonly="true" labelWidth="110px" labelAlign="right"
:data.sync="updateParams" :actions="subActions" @actionCallback="subActionCallback" @change="changes"
:full-btn="true" btnPosition="center">
</FormComponent>
</el-dialog>
<el-dialog v-if="showFile" :close-on-click-modal="false" title="查看图片" :visible.sync="showFile" destroy-on-close width="680px">
<el-dialog v-if="showFile" :close-on-click-modal="false" title="查看图片" :visible.sync="showFile" destroy-on-close
width="680px">
<img :src="currentUrl" style="width: 100%;" alt="">
</el-dialog>
</div>

View File

@ -230,7 +230,12 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
}
public callback(data) {
public callback(data, type) {
if (type) {
this.params[type] = data;
this.getTableData();
return
}
//
if (data.value === "search") {
this.getTableData()
@ -254,9 +259,12 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
pageSize: 20,
} as any;
}
//
//
public getTableData() {
this.tableService.selectByPage2(this.params).then(res => {
this.tableData = res.data as any;
})
}
public showUpdateModel(id) {
this.showUpdate = true

View File

@ -9,8 +9,8 @@
</div>
<div class="table-box flex-1">
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
@actionCallback="callback($event)" @pageNumberChange="callback($event)"
@pageSizeChange="callback($event)" :footerActions="footerActions" :actions="tableActions">
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')"
@pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions">
<el-table ref="multipleTable" :data="tableData.datas" height="100%" border row-key="checked"
@selection-change="handleSelectionChange" style="width: 100%">

View File

@ -355,7 +355,13 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
this.tableColumn.push({ name: '评估时间', key: "appraiseTime", width: "150px" });
}
public callback(data) {
public callback(data, type) {
if (type) {
this.params[type] = data;
this.getTableData();
return
}
//
if (data.value === "search") {
this.getTableData()
@ -380,7 +386,12 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
} as any;
}
//
public getTableData() {
this.tableService.selectByPage(this.params).then(res => {
this.tableData = res.data as any;
})
}
public showUpdateModel(row) {
this.showUpdate = true

View File

@ -9,8 +9,8 @@
</div>
<div class="table-box flex-1">
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
@actionCallback="callback($event)" @pageNumberChange="callback($event)"
@pageSizeChange="callback($event)" :footerActions="footerActions" :actions="tableActions">
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')"
@pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions">
<el-table ref="multipleTable" :data="tableData.datas" height="100%" border row-key="checked"
@selection-change="handleSelectionChange" style="width: 100%">

View File

@ -154,7 +154,12 @@ export default class MeasuresManagerComponent extends BaseRecordComponent<any> {
this.proTableColumn.push({ name: '管控措施', key: "description", width: "300px" });
}
public callback(data) {
public callback(data, type) {
if (type) {
this.params[type] = data;
this.getTableData();
return
}
//
if (data.value === "search") {
this.getTableData()
@ -171,6 +176,12 @@ export default class MeasuresManagerComponent extends BaseRecordComponent<any> {
this.deleteData(this.selectData.map((item: any) => item.id))
}
}
//
public getTableData() {
this.tableService.selectByPage(this.params).then(res => {
this.tableData = res.data as any;
})
}
//
public reset() {
this.params = {

View File

@ -9,13 +9,17 @@
</div>
<div class="table-box flex-1">
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
@actionCallback="callback($event)" @pageNumberChange="callback($event)"
@pageSizeChange="callback($event)" :footerActions="footerActions" :actions="tableActions">
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')"
@pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions">
<el-table ref="multipleTable" :data="tableData.datas" height="100%" border row-key="checked"
@selection-change="handleSelectionChange" style="width: 100%" highlight-current-row>
<el-table-column type="selection" fixed label="全选" width="60">
</el-table-column>
<el-table-column label="序号" width="60">
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<template v-for="item in tableColumn">
<el-table-column class="cursor td-content" v-if="item.render" :label="item.name"
:width="item.width" :key="item.key" :filters="item.filters" :filter-multiple="false"

View File

@ -295,7 +295,12 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
})
}
public callback(data) {
public callback(data, type) {
if (type) {
this.params[type] = data;
this.getTableData();
return
}
//
if (data.value === "search") {
this.getTableData()
@ -315,6 +320,12 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
this.doUpdate()
}
}
//
public getTableData() {
this.tableService.selectByPage(this.params).then(res => {
this.tableData = res.data as any;
})
}
//--
public doUpdate() {
if (this.selectData && this.selectData.length > 0) {