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/resourceDemand/device/component/check.vue | 23 ++++++++---------------
1 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/component/check.vue b/src/views/CNAS/resourceDemand/device/component/check.vue
index 10c378d..b65048c 100644
--- a/src/views/CNAS/resourceDemand/device/component/check.vue
+++ b/src/views/CNAS/resourceDemand/device/component/check.vue
@@ -7,7 +7,7 @@
<el-button size="small" type="primary">瀵煎嚭Excel</el-button>
</div>
<div class="tables" style="margin-top: 16px;">
- <el-table :data="tableData" height="calc(100vh - 20em)">
+ <el-table :data="tableData" height="calc(100vh - 20em)" :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border>
<el-table-column label="搴忓彿" type="index" width="120">
<template v-slot="scope">
<span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span>
@@ -79,6 +79,7 @@
</h4>
<!-- 璁惧鏍″噯鍙傛暟琛ㄦ牸 -->
<el-table ref="calibrateTable" v-loading="calibrateParamsLoading" :data="calibrateParams" max-height="450" stripe
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
style="width: 100%">
<el-table-column label="缂栧彿" type="index" width="80"></el-table-column>
<el-table-column label="鏍告煡鍙傛暟" prop="measurementParameter"></el-table-column>
@@ -177,7 +178,7 @@
@click="deleteFile"></el-button>
</el-input>
<el-upload v-if="operationType === 'add'" ref="upload" :action="action" :before-upload="beforeUpload"
- :headers="headers" :limit="1" :on-error="onError" :on-success="handleSuccessUp"
+ :headers="uploadHeader" :limit="1" :on-error="onError" :on-success="handleSuccessUp"
:show-file-list="false" style="float: right;">
<el-button :loading="upLoading" size="small" style="position: relative; top: -4px;"
type="primary">闄勪欢涓婁紶
@@ -245,12 +246,10 @@
</template>
<script>
-import ValueTable from "@/components/Table/value-table.vue";
import file from '@/utils/file';
+import { mapGetters } from "vuex";
export default {
- components: {
- ValueTable
- },
+ components: {},
props: {
clickNodeVal: {
type: Object,
@@ -330,11 +329,7 @@
},
// 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
computed: {
- headers() {
- return {
- 'token': sessionStorage.getItem('token')
- }
- },
+ ...mapGetters(["nickName"]),
action() {
return this.javaApi + this.$api.personnel.saveCNASFile
}
@@ -397,8 +392,7 @@
this.calibrateParamsLoading = true
this.addCalibrateLoading = true
this.form0.deviceId = this.clickNodeVal.value;
- const user = JSON.parse(localStorage.getItem('user'))
- this.form0.createdBy = user.name;
+ this.form0.createdBy = this.nickName;
this.form0.type = 'examine'
this.$axios.post(this.$api.deviceCheck.saveOrUpdateDeviceMetric, this.form0, {
headers: {
@@ -441,8 +435,7 @@
}
this.addRecordLoading = true
this.calibrationRecord.deviceId = this.clickNodeVal.value;
- let user = JSON.parse(localStorage.getItem('user'))
- this.calibrationRecord.createUser = user.name
+ this.calibrationRecord.createUser = this.nickName
this.calibrationRecord.deviceMetricsCopyList = this.calibrateParams
this.calibrationRecord.type = 'examine'
this.$axios.post(this.$api.deviceCheck.addOrUpdateDeviceMetricRecord, this.calibrationRecord, {
--
Gitblit v1.9.3