forked from xxhjsb/hbt-prevention-ui
fix:分页
parent
78828cc127
commit
dc642f0f1c
|
@ -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%">
|
||||
|
|
|
@ -202,20 +202,20 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
|
|||
}
|
||||
|
||||
public updateActions = [] as any;
|
||||
public buildActionsForm(){
|
||||
this.updateActions = [{
|
||||
name: "取消",
|
||||
value: "cancel"
|
||||
}, {
|
||||
name: "保存并继续添加",
|
||||
value: "saveAndContinue",
|
||||
type: "primary",
|
||||
hide:this.updateParams.id
|
||||
}, {
|
||||
name: "保存",
|
||||
value: "save",
|
||||
type: "primary"
|
||||
}];
|
||||
public buildActionsForm() {
|
||||
this.updateActions = [{
|
||||
name: "取消",
|
||||
value: "cancel"
|
||||
}, {
|
||||
name: "保存并继续添加",
|
||||
value: "saveAndContinue",
|
||||
type: "primary",
|
||||
hide: this.updateParams.id
|
||||
}, {
|
||||
name: "保存",
|
||||
value: "save",
|
||||
type: "primary"
|
||||
}];
|
||||
}
|
||||
|
||||
public projectOptions: FormOption<BtnOption>[] = [
|
||||
|
@ -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;
|
||||
|
|
|
@ -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%">
|
||||
|
|
|
@ -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") {
|
||||
|
|
|
@ -474,7 +474,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
this.updateParams.stepNum = this.updateParams.steps.length;
|
||||
this.updateParams.postCode = this.updateParams.postCode.join(";")
|
||||
this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id).then((res) => {
|
||||
this.$message.success(!this.updateParams.id? "新增成功!" : "编辑成功!");
|
||||
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
||||
this.updateParams = {
|
||||
postCode: [],
|
||||
safetyFactor: []
|
||||
|
@ -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;
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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") {
|
||||
|
|
|
@ -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>
|
||||
</el-dialog>
|
||||
</div>
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="common-box dis-flex " >
|
||||
<div class="common-box dis-flex ">
|
||||
<div class="common-tree-box">
|
||||
<UnitTreeComponent @callback="handleNodeClick"></UnitTreeComponent>
|
||||
</div>
|
||||
|
@ -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>
|
||||
</el-dialog>
|
||||
</div>
|
|
@ -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
|
||||
|
|
|
@ -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%">
|
||||
|
|
|
@ -26,8 +26,8 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
|
|||
public tableService = new IdentifyService();
|
||||
|
||||
public params = {
|
||||
areaId:null,
|
||||
unitId:null,
|
||||
areaId: null,
|
||||
unitId: null,
|
||||
} as any;
|
||||
|
||||
public formActions = [{
|
||||
|
@ -334,7 +334,7 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
|
|||
}
|
||||
});
|
||||
this.tableColumn.push({
|
||||
name: '风险等级', key: "riskLevel",width:"150px", render: (data) => {
|
||||
name: '风险等级', key: "riskLevel", width: "150px", render: (data) => {
|
||||
return "<span class='color_" + data.riskLevel + "'>" + (data.riskLevel ? (this.$store.getters.prevention_risk_level_map[data.riskLevel]) : '') + "</span>"
|
||||
},
|
||||
filters: this.$store.state.prevention_risk_level.map(item => {
|
||||
|
@ -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
|
||||
|
|
|
@ -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%">
|
||||
|
|
|
@ -133,7 +133,7 @@ export default class MeasuresManagerComponent extends BaseRecordComponent<any> {
|
|||
|
||||
|
||||
//管控措施详情
|
||||
this.proTableColumn.push({ name: '序号', key: "index",width:"80px" });
|
||||
this.proTableColumn.push({ name: '序号', key: "index", width: "80px" });
|
||||
this.proTableColumn.push({
|
||||
name: '措施类型一', key: "firstTypeName", render: (data) => {
|
||||
if (data.firstType) {
|
||||
|
@ -151,10 +151,15 @@ export default class MeasuresManagerComponent extends BaseRecordComponent<any> {
|
|||
}
|
||||
});
|
||||
this.proTableColumn.push({ name: '措施类型三', key: "thirdType" });
|
||||
this.proTableColumn.push({ name: '管控措施', key: "description" ,width:"300px"});
|
||||
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 = {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue