From 368b525db5f3f4f82b13c074341708a46b9a4111 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 11 三月 2025 09:11:29 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev

---
 src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue |   66 ++------------------------------
 1 files changed, 5 insertions(+), 61 deletions(-)

diff --git a/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue b/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
index 874abfc..4da0bf3 100644
--- a/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
@@ -20,9 +20,9 @@
       </div>
       <div class="btn">
         <el-button size="small" type="primary" @click="openAdd">鏂板</el-button>
-        <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers"
-          :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp"
-          style="display:inline-block;margin-left: 20px;">
+        <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx'
+          :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload'
+          :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
           <el-button type="primary" size="small">瀵煎叆</el-button></el-upload>
         <el-button size="small" type="primary" @click="handleDown" :loading="outLoading"
           style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button>
@@ -133,7 +133,6 @@
 import {
   getYearAndMonthAndDays
 } from '@/utils/date'
-import { getToken } from "@/utils/auth";
 import {
   selectUserCondition,
 } from "@/api/business/inspectionTask.js";
@@ -232,11 +231,6 @@
   },
   // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
   computed: {
-    headers() {
-      return {
-        'Authorization': "Bearer " + getToken()
-      }
-    },
     action() {
       return this.javaApi + '/manageRecordIssueRecycle/exportInManageRecordIssueRecycle'
     },
@@ -252,43 +246,6 @@
     // this.selectTreeList()
   },
   methods: {
-    getPower() {
-      let power = JSON.parse(sessionStorage.getItem('power'))
-      let add = false
-      let del = false
-      let up = false;
-      let out = false;
-      let edit = false
-      for (var i = 0; i < power.length; i++) {
-        if (power[i].menuMethod == 'addManageRecordIssueRecycle') {
-          add = true
-        }
-        if (power[i].menuMethod == 'delManageRecordIssueRecycle') {
-          del = true
-        }
-        if (power[i].menuMethod == 'exportInManageRecordIssueRecycle') {
-          up = true
-        }
-        if (power[i].menuMethod == 'doManageRecordIssueRecycle') {
-          edit = true
-        }
-        if (power[i].menuMethod == 'exportOutManageRecordIssueRecycle') {
-          out = true
-        }
-      }
-      if (!add) {
-        this.componentData.do.splice(2, 1)
-      }
-      if (!add) {
-        this.componentData.do.splice(1, 1)
-      }
-      if (!del) {
-        this.componentData.do.splice(0, 1)
-      }
-      this.addPower = add
-      this.outPower = out
-      this.upPower = up
-    },
     // 鏂板
     openAdd() {
       // this.$refs.ValueTable.openAddDia(this.$api.manageRecordIssueRecycle.addManageRecordIssueRecycle);
@@ -306,10 +263,7 @@
       this.outLoading = true
       exportOutManageRecordIssueRecycle(this.queryParams).then(res => {
         this.outLoading = false
-        if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触')
-        this.$message.success('瀵煎嚭鎴愬姛')
-        let url = this.javaApi + '/word/' + res.data
-        this.$download.saveAs(url, '鏂囦欢鍙戞斁涓庡洖鏀惰褰�')
+        this.$download.saveAs(res.data, '鏂囦欢鍙戞斁涓庡洖鏀惰褰�')
       })
     },
     getList() {
@@ -372,7 +326,7 @@
       this.upLoading = false;
       if (response.code == 200) {
         this.$message.success('涓婁紶鎴愬姛');
-        this.refreshTable()()
+        this.refreshTable()
       } else {
         this.$message.error('涓婁紶澶辫触');
       }
@@ -416,9 +370,6 @@
       if (this.title == '鏂板') {
         addManageRecordIssueRecycle(obj).then(res => {
           this.addLoading = false
-          if (res.code == 201) {
-            return
-          }
           this.addDialogVisible = false
           this.$message({
             type: 'success',
@@ -429,9 +380,6 @@
       } else {
         doManageRecordIssueRecycle(obj).then(res => {
           this.addLoading = false
-          if (res.code == 201) {
-            return
-          }
           this.addDialogVisible = false
           this.$message({
             type: 'success',
@@ -453,9 +401,6 @@
         obj = { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims, signedDate: getYearAndMonthAndDays(), signedUser: this.userId }
         doManageRecordIssueRecycle(obj).then(res => {
           this.addLoading = false
-          if (res.code == 201) {
-            return
-          }
           this.addDialogVisible = false
           this.$message({
             type: 'success',
@@ -479,7 +424,6 @@
       })
         .then(() => {
           delManageRecordIssueRecycle({ id: row.id }).then((res) => {
-            if (res.code == 201) return;
             this.$message.success("鍒犻櫎鎴愬姛");
             this.refresh();
           });

--
Gitblit v1.9.3