From f2fbb3b07155274408d68084e2d607760c765ad6 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 14 三月 2025 11:09:51 +0800
Subject: [PATCH] 前端跳转路由修改

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

diff --git a/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue b/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
index 874abfc..f03e924 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";
@@ -150,6 +149,7 @@
 } from '@/api/cnas/systemManagement/documentControl.js'
 import { mapGetters } from "vuex";
 export default {
+  name: 'DistributionCollectionRecord',
   components: {
     limsTable
   },
@@ -232,11 +232,6 @@
   },
   // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
   computed: {
-    headers() {
-      return {
-        'Authorization': "Bearer " + getToken()
-      }
-    },
     action() {
       return this.javaApi + '/manageRecordIssueRecycle/exportInManageRecordIssueRecycle'
     },
@@ -252,43 +247,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 +264,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 +327,7 @@
       this.upLoading = false;
       if (response.code == 200) {
         this.$message.success('涓婁紶鎴愬姛');
-        this.refreshTable()()
+        this.refreshTable()
       } else {
         this.$message.error('涓婁紶澶辫触');
       }
@@ -416,9 +371,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 +381,6 @@
       } else {
         doManageRecordIssueRecycle(obj).then(res => {
           this.addLoading = false
-          if (res.code == 201) {
-            return
-          }
           this.addDialogVisible = false
           this.$message({
             type: 'success',
@@ -453,9 +402,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 +425,6 @@
       })
         .then(() => {
           delManageRecordIssueRecycle({ id: row.id }).then((res) => {
-            if (res.code == 201) return;
             this.$message.success("鍒犻櫎鎴愬姛");
             this.refresh();
           });

--
Gitblit v1.9.3