From f01d916828cf9746a0f438d9472af9271efd9729 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期一, 03 三月 2025 14:47:47 +0800
Subject: [PATCH] 完成设备搬迁

---
 src/views/CNAS/resourceDemand/device/component/check.vue |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/src/views/CNAS/resourceDemand/device/component/check.vue b/src/views/CNAS/resourceDemand/device/component/check.vue
index 10c378d..362cbfd 100644
--- a/src/views/CNAS/resourceDemand/device/component/check.vue
+++ b/src/views/CNAS/resourceDemand/device/component/check.vue
@@ -177,7 +177,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">闄勪欢涓婁紶
@@ -247,6 +247,7 @@
 <script>
 import ValueTable from "@/components/Table/value-table.vue";
 import file from '@/utils/file';
+import { mapGetters } from "vuex";
 export default {
   components: {
     ValueTable
@@ -330,11 +331,7 @@
   },
   // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
   computed: {
-    headers() {
-      return {
-        'token': sessionStorage.getItem('token')
-      }
-    },
+    ...mapGetters(["nickName"]),
     action() {
       return this.javaApi + this.$api.personnel.saveCNASFile
     }
@@ -397,8 +394,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 +437,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