From dc642f0f1c8a9c56b550a4ceeba3802b093a9b24 Mon Sep 17 00:00:00 2001 From: kongyeqing <2697454777@qq.com> Date: Tue, 4 Jul 2023 15:23:01 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assessment/device/device.component.html | 4 +- .../assessment/device/device.component.vue | 46 +++++++++++-------- .../device/deviceAnal.component.html | 4 +- .../device/deviceAnal.component.vue | 15 +++++- .../risk/assessment/work/work.component.vue | 11 +++-- .../assessment/work/workAnal.component.html | 4 +- .../assessment/work/workAnal.component.vue | 16 ++++++- src/views/risk/duty/duty.component.html | 12 +++-- src/views/risk/duty/duty.component.vue | 14 +++++- .../risk/duty/dutyRecords.component.html | 20 ++++---- src/views/risk/duty/dutyRecords.component.vue | 16 +++++-- .../risk/identify/identify.component.html | 4 +- .../risk/identify/identify.component.vue | 21 +++++++-- .../risk/measures/measures.component.html | 4 +- .../risk/measures/measures.component.vue | 17 +++++-- .../measuresReport.component.html | 10 ++-- .../measuresReport.component.vue | 13 +++++- 17 files changed, 167 insertions(+), 64 deletions(-) diff --git a/src/views/risk/assessment/device/device.component.html b/src/views/risk/assessment/device/device.component.html index a5a6668..fa8f1da 100644 --- a/src/views/risk/assessment/device/device.component.html +++ b/src/views/risk/assessment/device/device.component.html @@ -9,8 +9,8 @@
+ @actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')" + @pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions"> diff --git a/src/views/risk/assessment/device/device.component.vue b/src/views/risk/assessment/device/device.component.vue index 51c1f6a..43b9cd1 100644 --- a/src/views/risk/assessment/device/device.component.vue +++ b/src/views/risk/assessment/device/device.component.vue @@ -54,7 +54,7 @@ export default class DeviceManagerComponent extends BaseRecordComponent { datas: [] } as any; - + public showUpdate = false; public updateParams = { @@ -104,7 +104,7 @@ export default class DeviceManagerComponent extends BaseRecordComponent { key: "unitName", type: "text", }]; - + public updateOptions: FormOption[] = [] as any; public buildUpdateForm() { @@ -202,20 +202,20 @@ export default class DeviceManagerComponent extends BaseRecordComponent { } 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[] = [ @@ -360,7 +360,12 @@ export default class DeviceManagerComponent extends BaseRecordComponent { } } - 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 { } 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; diff --git a/src/views/risk/assessment/device/deviceAnal.component.html b/src/views/risk/assessment/device/deviceAnal.component.html index 38fc435..6008a10 100644 --- a/src/views/risk/assessment/device/deviceAnal.component.html +++ b/src/views/risk/assessment/device/deviceAnal.component.html @@ -9,8 +9,8 @@
+ @actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')" + @pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions"> diff --git a/src/views/risk/assessment/device/deviceAnal.component.vue b/src/views/risk/assessment/device/deviceAnal.component.vue index 2fda79e..cd12424 100644 --- a/src/views/risk/assessment/device/deviceAnal.component.vue +++ b/src/views/risk/assessment/device/deviceAnal.component.vue @@ -595,7 +595,12 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent }); } - 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 } 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") { diff --git a/src/views/risk/assessment/work/work.component.vue b/src/views/risk/assessment/work/work.component.vue index 201373d..2088aa3 100644 --- a/src/views/risk/assessment/work/work.component.vue +++ b/src/views/risk/assessment/work/work.component.vue @@ -474,7 +474,7 @@ export default class WorkManagerComponent extends BaseRecordComponent { 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 { } as any; } - + // 分页数据 + public getTableData() { + this.tableService.selectByPage(this.params).then(res => { + this.tableData = res.data as any; + }) + } public showUpdateModel(row?, isRead?) { this.isReadonly = !!isRead; @@ -519,7 +524,7 @@ export default class WorkManagerComponent extends BaseRecordComponent { } else { this.updateParams.safetyFactor = this.updateParams.safetyFactor.split(",").map(item => +item); this.updateParams.safetyFactorName = this.updateParams.safetyFactor.map(item => this.$store.getters.prevention_safe_reason_map[item]).join(",") - + } } this.buildUpdateForm() diff --git a/src/views/risk/assessment/work/workAnal.component.html b/src/views/risk/assessment/work/workAnal.component.html index b85c4e9..0d284f9 100644 --- a/src/views/risk/assessment/work/workAnal.component.html +++ b/src/views/risk/assessment/work/workAnal.component.html @@ -9,8 +9,8 @@
+ @actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')" + @pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions"> diff --git a/src/views/risk/assessment/work/workAnal.component.vue b/src/views/risk/assessment/work/workAnal.component.vue index 32a0e10..9062884 100644 --- a/src/views/risk/assessment/work/workAnal.component.vue +++ b/src/views/risk/assessment/work/workAnal.component.vue @@ -589,7 +589,13 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent { }); } - 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 { } } } + // 重置数据 public reset() { this.params = { @@ -661,6 +668,13 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent { } 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") { diff --git a/src/views/risk/duty/duty.component.html b/src/views/risk/duty/duty.component.html index ca6c4e5..666b77d 100644 --- a/src/views/risk/duty/duty.component.html +++ b/src/views/risk/duty/duty.component.html @@ -9,8 +9,8 @@
+ @actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')" + @pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions"> @@ -46,11 +46,13 @@ + :actions="subActions" @actionCallback="subActionCallback" @change="changes" :full-btn="true" + btnPosition="center"> - + - +
\ No newline at end of file diff --git a/src/views/risk/duty/duty.component.vue b/src/views/risk/duty/duty.component.vue index 5bdf13e..0d55d07 100644 --- a/src/views/risk/duty/duty.component.vue +++ b/src/views/risk/duty/duty.component.vue @@ -267,7 +267,12 @@ export default class DutyManagerComponent extends BaseRecordComponent { }); } - 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 { } } + // 分页数据 + 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 diff --git a/src/views/risk/duty/dutyRecords.component.html b/src/views/risk/duty/dutyRecords.component.html index a971c4d..db6b485 100644 --- a/src/views/risk/duty/dutyRecords.component.html +++ b/src/views/risk/duty/dutyRecords.component.html @@ -1,4 +1,4 @@ -
+
@@ -9,9 +9,9 @@
- + @actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')" + @pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions"> + @@ -34,19 +34,21 @@ - +
- + - + - + \ No newline at end of file diff --git a/src/views/risk/duty/dutyRecords.component.vue b/src/views/risk/duty/dutyRecords.component.vue index 62b2220..0aa30b3 100644 --- a/src/views/risk/duty/dutyRecords.component.vue +++ b/src/views/risk/duty/dutyRecords.component.vue @@ -230,7 +230,12 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent { + this.tableData = res.data as any; + }) + } public showUpdateModel(id) { this.showUpdate = true diff --git a/src/views/risk/identify/identify.component.html b/src/views/risk/identify/identify.component.html index da2edea..88dd5fd 100644 --- a/src/views/risk/identify/identify.component.html +++ b/src/views/risk/identify/identify.component.html @@ -9,8 +9,8 @@
+ @actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')" + @pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions"> diff --git a/src/views/risk/identify/identify.component.vue b/src/views/risk/identify/identify.component.vue index 42ae723..1ad054a 100644 --- a/src/views/risk/identify/identify.component.vue +++ b/src/views/risk/identify/identify.component.vue @@ -26,8 +26,8 @@ export default class IdentifyManagerComponent extends BaseRecordComponent { 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 { } }); this.tableColumn.push({ - name: '风险等级', key: "riskLevel",width:"150px", render: (data) => { + name: '风险等级', key: "riskLevel", width: "150px", render: (data) => { return "" + (data.riskLevel ? (this.$store.getters.prevention_risk_level_map[data.riskLevel]) : '') + "" }, filters: this.$store.state.prevention_risk_level.map(item => { @@ -355,7 +355,13 @@ export default class IdentifyManagerComponent extends BaseRecordComponent { 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 { } as any; } - + // 分页数据 + public getTableData() { + this.tableService.selectByPage(this.params).then(res => { + this.tableData = res.data as any; + }) + } public showUpdateModel(row) { this.showUpdate = true diff --git a/src/views/risk/measures/measures.component.html b/src/views/risk/measures/measures.component.html index 7fd6265..a72edb0 100644 --- a/src/views/risk/measures/measures.component.html +++ b/src/views/risk/measures/measures.component.html @@ -9,8 +9,8 @@
+ @actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')" + @pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions"> diff --git a/src/views/risk/measures/measures.component.vue b/src/views/risk/measures/measures.component.vue index a2eeae0..e52c994 100644 --- a/src/views/risk/measures/measures.component.vue +++ b/src/views/risk/measures/measures.component.vue @@ -133,7 +133,7 @@ export default class MeasuresManagerComponent extends BaseRecordComponent { //管控措施详情 - 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 { } }); 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 { 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 = { diff --git a/src/views/risk/measuresReport/measuresReport.component.html b/src/views/risk/measuresReport/measuresReport.component.html index edd2544..206dcd2 100644 --- a/src/views/risk/measuresReport/measuresReport.component.html +++ b/src/views/risk/measuresReport/measuresReport.component.html @@ -9,13 +9,17 @@
- + @actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')" + @pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions"> + + +