From fc98e676332302c4b835f8fa4ed42d72e177801f Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期二, 14 十月 2025 16:57:02 +0800
Subject: [PATCH] 增加了对应的代码

---
 src/views/archiveManager/archiveMaterial/index.vue |   65 +++++++++++++++++++++++++++-----
 1 files changed, 54 insertions(+), 11 deletions(-)

diff --git a/src/views/archiveManager/archiveMaterial/index.vue b/src/views/archiveManager/archiveMaterial/index.vue
index 5130c0f..83b9619 100644
--- a/src/views/archiveManager/archiveMaterial/index.vue
+++ b/src/views/archiveManager/archiveMaterial/index.vue
@@ -162,6 +162,10 @@
          <el-button type="primary" @click="resetForms">閲嶇疆</el-button>
 
           <el-button @click="cancel">鍙� 娑�</el-button>
+
+
+                    <el-button type="warning" @click="cancelAuthUser">閫�鍥炵鐞嗗憳</el-button>
+
         </div>
 
 
@@ -689,7 +693,10 @@
   <script>
   import { listMaterials, enload, getMaterials, delMaterials, addMaterials, updateMaterials } from "@/api/system/materials"
 import { getToken } from '@/utils/auth'
+import store from '@/store'
+import { updateStatusById } from "@/api/system/records"
 
+import {delArchiverecordstouserByReIdAndUid} from "@/api/system/archiverecordstouser"
   export default {
     name: "Materials",
     data() {
@@ -865,8 +872,10 @@
   this.$refs.upload.clearFiles();
   // 鍏抽棴涓婁紶瀵硅瘽妗�
   this.importDialogVisible = false;
-  // 鍒锋柊鍒楄〃鏁版嵁
-  this.getList();        // 杩欓噷鍙互璋冪敤鎺ュ彛鍏宠仈涓婁紶鐨勬枃浠跺拰褰撳墠璁板綍
+        // 鍒锋柊鍒楄〃鏁版嵁
+        this.getList();        // 杩欓噷鍙互璋冪敤鎺ュ彛鍏宠仈涓婁紶鐨勬枃浠跺拰褰撳墠璁板綍
+        //鏇存柊妗f鐨勭姸鎬�
+
       } else {
         // alert(234)
         console.log(response)
@@ -925,6 +934,10 @@
   if ((e.ctrlKey || e.metaKey) && e.key === 'd') {
     e.preventDefault();
     this.resetForms();
+  }
+  if ((e.ctrlKey || e.metaKey) && e.key === 'w') {
+    e.preventDefault();
+    this.closeCurrentTab();
   }
     },
       /** 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆戝垪琛� */
@@ -1038,15 +1051,19 @@
         })
       },
       resetForms()
-      {
+    {
    this.reset()
-          this.form.securityLevel = '鏅��' // 璁剧疆瀵硅瘽妗嗚〃鍗曢粯璁ゅ��
-          this.form.isSensitive = '鍚�' // 璁剧疆瀵硅瘽妗嗚〃鍗曢粯璁ゅ��
-          this.form.isCanceled = '鍚�' // 璁剧疆瀵硅瘽妗嗚〃鍗曢粯璁ゅ��
-          this.form.isAttachment = '鍚�' // 璁剧疆瀵硅瘽妗嗚〃鍗曢粯璁ゅ��
-          this.form.isDiagram = '鍚�' // 璁剧疆瀵硅瘽妗嗚〃鍗曢粯璁ゅ��
-          this.form.retentionPeriod = '姘镐箙' // 璁剧疆瀵硅瘽妗嗚〃鍗曢粯璁ゅ��
-      },
+          this.form.securityLevel = '鏅��'
+          this.form.isSensitive = '鍚�'
+          this.form.isCanceled = '鍚�'
+          this.form.isAttachment = '鍚�'
+          this.form.isDiagram = '鍚�'
+          this.form.retentionPeriod = '姘镐箙'
+    },
+    closeCurrentTab() {
+      this.$store.dispatch('tagsView/delView', this.$route)
+      this.$router.push('/archiveManager/infoManager')
+    },
       submitForm()
       {
         console.log(this.form)
@@ -1133,7 +1150,33 @@
     this.$message.error('瀵煎叆澶辫触: ' + (error.message || '鏈煡閿欒'));
   });
 
-    }
+    },
+     /** 鍙栨秷鎺堟潈鎸夐挳鎿嶄綔 */
+    cancelAuthUser(row) {
+      const recordId =  this.recordId 
+      var userId = store.state.user.id
+      var _this = this
+      // alert(userId)
+      // alert(userId)
+      // alert(this.queryParams.archiveRecordsId)
+      // alert(row.sysUser.userName)
+      this.$modal.confirm('纭瑕佸彇娑堣鐢ㄦ埛鐨�"' + '' + '"鎺堟潈鍚楋紵').then(function() {
+        return delArchiverecordstouserByReIdAndUid({  recordId: recordId, userId: userId   })
+      }).then(() => {
+      //  this.getList()
+      //淇敼妗堝嵎鐨勭姸鎬�
+  //  var id = row.id
+      var status = '鏈笂浼犻檮浠�'
+      updateStatusById(status, recordId).then(response=>{
+      //  this.$modal.msgSuccess("鎻愪氦鎴愬姛")
+      //  this.getList()
+      _this.$store.dispatch('tagsView/delView', this.$route);
+        _this.$router.push('/archiveManager/infoManager')
+        _this.$modal.msgSuccess("鍙栨秷鎺堟潈鎴愬姛")
+      })
+    
+      }).catch(() => {})
+    },
     }
   }
   </script>

--
Gitblit v1.9.1