From cb2a01ee7dea28a2661720060b03c41dc372acb5 Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期五, 01 八月 2025 11:53:16 +0800
Subject: [PATCH] 完善串口处理数据,数据选择
---
src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue | 24 +++++++-----------------
1 files changed, 7 insertions(+), 17 deletions(-)
diff --git a/src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue b/src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue
index f0c97d8..1a2f691 100644
--- a/src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue
+++ b/src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue
@@ -6,14 +6,15 @@
<el-button type="primary" size="small" @click="addFun">鏂� 澧�</el-button>
<el-button type="primary" size="small" @click="approvalFun">瀹� 鎵�</el-button>
<el-button type="primary" size="small" @click="approveFun">鎵� 鍑�</el-button>
- <el-upload style="display: inline-block; padding: 0 6px" :headers="headers" :action="action" :on-error="onError"
- :show-file-list="false" :on-success="onSuccess">
+ <el-upload style="display: inline-block; padding: 0 6px" :headers="uploadHeader" :action="action"
+ :on-error="onError" :show-file-list="false" :on-success="onSuccess">
<el-button size="small" type="primary">瀵� 鍏�</el-button>
</el-upload>
<el-button size="small" @click="openDownloadDia">瀵煎嚭</el-button>
</div>
</div>
- <el-table :data="tableData" style="width: 100%" height="calc(100vh - 18em)">
+ <el-table :data="tableData" style="width: 100%" height="calc(100vh - 18em)" key="table1"
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border>
<el-table-column type="index" label="搴忓彿" width="120">
<template v-slot="scope">
<span>{{ (page.current - 1) * page.size + scope.$index + 1 }}</span>
@@ -57,7 +58,7 @@
</el-table-column>
</el-table>
<el-pagination :current-page="1" :page-size="page.size" :page-sizes="[10, 20, 30, 50, 100]" :total="page.total"
- layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
+ layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange" background
@current-change="handleCurrentChange">
</el-pagination>
<el-dialog title="鎻愮ず" :visible.sync="dialogVisible" width="50%">
@@ -142,18 +143,13 @@
page: {
total: 0,
size: 10,
- current: 0,
+ current: 1,
},
tableData: [],
loading: false
}
},
computed: {
- headers() {
- return {
- 'Authorization': "Bearer " + getToken()
- }
- },
action() {
return this.javaApi + '/manageRiskAssessmentResults/riskAssessmentImport'
},
@@ -172,7 +168,6 @@
initData() {
this.tableData = []
getPageResults(this.page).then(res => {
- if (res.code === 201) return;
this.tableData = res.data.records;
this.page.total = res.data.total;
});
@@ -202,7 +197,6 @@
// 瀹℃壒鎺ュ彛
approvalApi(userId, status) {
dangerousRiskApproval({ approval: userId, status: status }).then(res => {
- if (res.code === 201) return;
this.initData()
this.$message({
type: 'success',
@@ -235,7 +229,6 @@
// 鎵瑰噯鎺ュ彛
approveApi(userId, status) {
hazardIdentificationAndRiskApproval({ approve: userId, status: status }).then(res => {
- if (res.code === 201) return;
this.initData()
this.$message({
type: 'success',
@@ -252,7 +245,7 @@
},
// 鏂囦欢涓婁紶鎴愬姛
onSuccess(response) {
- if (response.code == 201) {
+ if (response.code != 200) {
this.$message({
type: 'error',
message: response.message,
@@ -277,7 +270,6 @@
type: 'warning'
}).then(() => {
removeRiskFactors({ id: row.id }).then(res => {
- if (res.code === 201) return;
this.initData()
this.$message({
type: 'success',
@@ -294,7 +286,6 @@
addApi() {
this.loading = true
addNewRiskFactors(this.form).then(res => {
- if (res.code === 201) return;
this.dialogVisible = false
this.loading = false
this.initData()
@@ -315,7 +306,6 @@
openDownloadDia() {
exportHazardFactorIdentification().then(res => {
this.outLoading = false
- this.$message.success('瀵煎嚭鎴愬姛')
const blob = new Blob([res], { type: 'application/msword' });
this.$download.saveAs(blob, '鍗遍櫓鍥犵礌杈ㄨ瘑涓庨闄╄瘎浠风粨鏋滀竴瑙�' + '.docx');
})
--
Gitblit v1.9.3