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/regularReviewsRecord.vue |  190 +---------------------------------------------
 1 files changed, 7 insertions(+), 183 deletions(-)

diff --git a/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue b/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
index f0ec6cd..2257543 100644
--- a/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
@@ -22,18 +22,15 @@
           </div>
           <div class="btns">
             <el-button size="small" type="primary" @click="openAdd" v-if="addPower">鏂板</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' v-if="upPower" :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' v-if="upPower"
+              :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
               <el-button type="primary" size="small">瀵煎叆</el-button></el-upload>
           </div>
         </div>
         <div class="table">
           <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
             :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table>
-          <!-- <ValueTable ref="ValueTable" :url="$api.manageRecordIntervals.pageManageRecordIntervals"
-            :delUrl="$api.manageRecordIntervals.delManageRecordIntervals" :componentData="componentData"
-            :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex" /> -->
         </div>
       </el-tab-pane>
       <el-tab-pane label="鍘嗗彶璁板綍" name="鍘嗗彶璁板綍" style="height: 100%;">
@@ -54,8 +51,6 @@
         <div class="table">
           <lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading"
             :height="'calc(100vh - 290px)'" @pagination="pagination0"></lims-table>
-          <!-- <ValueTable ref="ValueTable0" :url="$api.manageRecordIntervals.pageManageRecordIntervalsTotal"
-            :componentData="componentData0" :key="upIndex" /> -->
         </div>
       </el-tab-pane>
     </el-tabs>
@@ -134,7 +129,6 @@
 <script>
 import limsTable from "@/components/Table/lims-table.vue";
 import filePreview from '@/components/Preview/filePreview.vue'
-import { getToken } from "@/utils/auth";
 import {
   exportOutManageRecordIntervals,
   addManageRecordIntervals,
@@ -149,6 +143,7 @@
   pageManageDocumentList,
 } from '@/api/cnas/systemManagement/documentControl.js'
 export default {
+  name: 'RegularReviewsRecord',
   components: {
     limsTable,
     filePreview
@@ -165,110 +160,6 @@
       lookDialogVisible: false,
       noCheckLoading: false,
       checkLoading: false,
-      componentData: {
-        entity: {
-          documentName: null,
-          documentCode: null,
-          orderBy: {
-            field: 'id',
-            order: 'desc'
-          }
-        },
-        isIndex: true,
-        showSelect: false,
-        select: false,
-        // selectMethod: 'handleChangeTask',
-        do: [{
-          id: 'handleEdit',
-          font: '淇敼',
-          type: 'text',
-          method: 'handleEdit',
-          field: [],
-        }, {
-          id: 'delete',
-          font: '鍒犻櫎',
-          type: 'text',
-          method: 'doDiy',
-        }],
-        tagField: {
-          // documentType:{
-          //   select: []
-          // },
-          // receiveUserName:{
-          //   select: []
-          // },
-        },
-        selectField: {
-          // documentType:{
-          //   select: []
-          // },
-          // receiveUserName:{
-          //   select: []
-          // },
-        },
-        addUpload: ['signatoryUrl'],
-        requiredAdd: [],
-        requiredUp: [],
-        datePicker: ['receiveDate'],
-        noHead: ['signedUserName', 'signedDate', 'departLims'],//涓嶅弬涓庢柊澧炵紪杈戠殑瀛楁
-        needSort: [],
-        inputType: ''
-      },
-      componentData0: {
-        entity: {
-          year: null,
-          orderBy: {
-            field: 'id',
-            order: 'desc'
-          }
-        },
-        isIndex: true,
-        showSelect: false,
-        select: false,
-        do: [{
-          id: 'handleLook',
-          font: '鏌ョ湅',
-          type: 'text',
-          method: 'handleLook',
-          disabFun: (row, index) => {
-            return !row.url
-          }
-        }, {
-          id: 'handleDown0',
-          font: '涓嬭浇',
-          type: 'text',
-          method: 'handleDown0',
-          disabFun: (row, index) => {
-            return !row.url
-          }
-        },
-        {
-          id: 'handleSubmit',
-          font: '鎻愪氦',
-          type: 'text',
-          method: 'handleSubmit',
-          disabFun: (row, index) => {
-            return !!row.submitUserName
-          }
-        }, {
-          id: 'handleApproval',
-          font: '鎵瑰噯',
-          type: 'text',
-          method: 'handleApproval',
-          disabFun: (row, index) => {
-            return !row.submitUserName || !!row.ratifyUserName
-          }
-        }],
-        tagField: {},
-        selectField: {},
-        requiredAdd: [],
-        requiredUp: [],
-        needSort: [],
-        inputType: ''
-      },
-      entityCopy: {},
-      entityCopy0: {},
-      upIndex: 0,
       addInfo: {},
       title: '鏂板',
       addInfo: {},
@@ -386,71 +277,19 @@
   },
   // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
   computed: {
-    headers() {
-      return {
-        'Authorization': "Bearer " + getToken()
-      }
-    },
     action() {
       return this.javaApi + '/manageRecordIntervals/exportInManageRecordIntervals'
     }
   },
   mounted() {
-    // this.entityCopy = this.HaveJson(this.componentData.entity);
-    // this.entityCopy0 = this.HaveJson(this.componentData0.entity);
     this.getList()
     this.getList0()
     this.getFileList()
     this.selectEnumByCategory()
   },
   methods: {
-    getPower() {
-      let power = JSON.parse(sessionStorage.getItem('power'))
-      let add = false
-      let del = false
-      let up = false;
-      let out = false;
-      let submit = false
-      let ratify = false
-      for (var i = 0; i < power.length; i++) {
-        if (power[i].menuMethod == 'addManageRecordIntervals') {
-          add = true
-        }
-        if (power[i].menuMethod == 'delManageRecordIntervals') {
-          del = true
-        }
-        if (power[i].menuMethod == 'exportInManageRecordIntervals') {
-          up = true
-        }
-        if (power[i].menuMethod == 'exportOutManageRecordIntervals') {
-          out = true
-        }
-        if (power[i].menuMethod == 'submitManageRecordIntervalsTotal') {
-          submit = true
-        }
-        if (power[i].menuMethod == 'ratifyManageRecordIntervalsTotal') {
-          ratify = true
-        }
-      }
-      if (!ratify) {
-        this.componentData0.do.splice(3, 1)
-      }
-      if (!submit) {
-        this.componentData0.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);
       this.addInfo = {}
       this.title = '鏂板'
       this.addDialogVisible = true;
@@ -460,10 +299,7 @@
       this.outLoading = true
       exportOutManageRecordIntervals(this.queryParams).then(res => {
         this.outLoading = false
-        if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触')
-        this.$message.success('瀵煎嚭鎴愬姛')
-        let url = this.javaApi + 'word/' + res.message
-        this.$download.saveAs(url, "鏂囦欢瀹氭湡瀹℃煡璁板綍");
+        this.$download.saveAs(res.message, "鏂囦欢瀹氭湡瀹℃煡璁板綍");
       })
     },
     getList() {
@@ -546,7 +382,7 @@
       this.upLoading = false;
       if (response.code == 200) {
         this.$message.success('涓婁紶鎴愬姛');
-        this.refreshTable()()
+        this.refreshTable()
       } else {
         this.$message.error('涓婁紶澶辫触');
       }
@@ -592,9 +428,6 @@
       if (this.title == '鏂板') {
         addManageRecordIntervals(obj).then(res => {
           this.addLoading = false
-          if (res.code == 201) {
-            return
-          }
           this.addDialogVisible = false
           this.$message({
             type: 'success',
@@ -605,9 +438,6 @@
       } else {
         doManageRecordIntervals(obj).then(res => {
           this.addLoading = false
-          if (res.code == 201) {
-            return
-          }
           this.addDialogVisible = false
           this.$message({
             type: 'success',
@@ -634,9 +464,6 @@
         ratifyState: state
       }).then(res => {
         this.checkLoading = false
-        if (res.code == 201) {
-          return
-        }
         this.noCheckLoading = false
         this.$message({
           type: 'success',
@@ -659,8 +486,7 @@
       }
     },
     handleDown0(row) {
-      let url = this.javaApi + '/word/' + row.url
-      this.$download.saveAs(url, "鎵�鏈夋枃浠跺畾鏈熸鏌ヨ褰�");
+      this.$download.saveAs(row.url, "鎵�鏈夋枃浠跺畾鏈熸鏌ヨ褰�");
     },
     // 鎻愪氦
     handleSubmit(row) {
@@ -672,7 +498,6 @@
         submitManageRecordIntervalsTotal({
           id: row.id
         }).then(res => {
-          if (res.code === 201) return
           this.$message({
             type: 'success',
             message: '鎻愪氦鎴愬姛!'
@@ -694,7 +519,6 @@
       })
         .then(() => {
           delManageRecordIntervals({ id: row.id }).then((res) => {
-            if (res.code == 201) return;
             this.$message.success("鍒犻櫎鎴愬姛");
             this.refreshTable();
           });

--
Gitblit v1.9.3