From 32a362e542715285088026554a922b999e00b137 Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期三, 21 一月 2026 19:19:53 +0800
Subject: [PATCH] 增加了相关代码

---
 src/views/archiveManager/index.vue |   76 ++++++++++++++++++++++++++++++++++----
 1 files changed, 68 insertions(+), 8 deletions(-)

diff --git a/src/views/archiveManager/index.vue b/src/views/archiveManager/index.vue
index e7b204f..0d3fe5d 100644
--- a/src/views/archiveManager/index.vue
+++ b/src/views/archiveManager/index.vue
@@ -327,6 +327,17 @@
           v-hasPermi="['system:materials:edit']"
         >鎵归噺鎺堟潈</el-button>
       </el-col>
+
+      <el-col v-if="userId==1" :span="1.5">
+           <el-button
+             type="warning"
+             plain
+             icon="el-icon-download"
+             size="mini"
+             @click="handleGivePermission"
+             v-hasPermi="['system:materials:edit']"
+           >鎵归噺鍙栨秷鎺堟潈</el-button>
+         </el-col>
         <el-col v-if="userId==1" :span="1.5">
         <el-button
           type="warning"
@@ -438,6 +449,10 @@
                   @click="viewAndPrintExcel(scope.row)"
                   title="鏌ョ湅骞舵墦鍗癊xcel鏂囦欢"
                 >鎵撳嵃棰勬暣鐞嗘竻鍗�</el-button>
+                <el-button   icon="el-icon-edit" size="mini"
+                v-if="userId!==1&&scope.row.ownData" type="text" @click="cancelAuthUser(scope.row)">
+                  閫�鍥炵鐞嗗憳</el-button>
+
           <el-button
                 v-if="userId!==1&&scope.row.ownData"
 
@@ -552,8 +567,8 @@
               <div class="option-label">閫夋嫨娉ㄨВ:</div>
               <div class="annotation-options">
               <label v-for="(annotation, index) in excelOptions.selectedAnnotations" :key="index" class="signature-checkbox">
-                              <input type="checkbox" v-model="excelOptions.subselectedAnnotations" :value="index">
-                              <span>{{ annotation }}
+                              <input type="checkbox" v-model="excelOptions.subselectedAnnotations" :value="annotation.srt">
+                              <span>{{ annotation.name }}
                               </span>
               </label>
               </div>
@@ -565,8 +580,8 @@
               <div class="signature-options">
                 <div class="signature-checkboxes">
                  <label v-for="(signature, index) in excelOptions.selectedSignatures" :key="index" class="signature-checkbox">
-                                 <input type="checkbox" v-model="excelOptions.subselectedSignatures" :value="index">
-                                 <span>{{ signature }}</span>
+                                 <input type="checkbox" v-model="excelOptions.subselectedSignatures" :value="signature.sot">
+                                 <span>{{ signature.sigaName }}</span>
                   </label>
 
 
@@ -977,7 +992,7 @@
 <script>
 import VueOfficeExcel from '@vue-office/excel'
 import '@vue-office/excel/lib/index.css'
-
+import store from '@/store'
 import axios from 'axios'
 import { getToken } from '@/utils/auth'
 import { enload, getIdFileCounts,batchSubmitRecords,updateStatusById,listRecords,getMaxId, getRecords, delRecords, addRecords, updateRecords } from "@/api/system/records"
@@ -986,8 +1001,9 @@
 import { listPlaceName, listAllPlaceName } from "@/api/system/placeName"
 import { judge,getFileCount } from "@/api/system/materials"
 import { UserRoleIdList,unallocatedUserList, authUserSelectAll } from "@/api/system/role"
-import {authManyRecordsToUsers}  from "@/api/system/archiverecordstouser"
-
+import {authManyRecordsToUsers, delArchiverecordstouserByReIdAndUid}  from "@/api/system/archiverecordstouser"
+import { selectAllSig } from "@/api/system/signature"
+import { selectAllAnn } from "@/api/system/annotation"
 export default {
      components: {
         VueOfficeExcel
@@ -1156,7 +1172,8 @@
     this.fetchProjectOptions()
     this.fetchProjectCompanyOptions()
 this.getList()
-
+    this.getSigInfo();
+    this.getAnnInfo();
   },
   watch: {
     'form.constructionUnit': {
@@ -1189,6 +1206,49 @@
     }
   },
   methods: {
+    getAnnInfo(){
+      selectAllAnn({}).then(response=>{
+        this.excelOptions.selectedAnnotations = response.data
+      })
+    },
+    getSigInfo(){
+      selectAllSig({}).then(response => {
+        console.log(']]][[[[[[[[[]]]]]]]]]')
+
+        console.log(response)
+        this.excelOptions.selectedSignatures= response.data
+
+        console.log(this.excelOptions.selectedSignatures)
+      })
+    },
+    /** 鍙栨秷鎺堟潈鎸夐挳鎿嶄綔 */
+      cancelAuthUser(row) {
+
+        const recordId =  row.id
+        var userId = store.state.user.id
+        var _this = this
+        // alert(userId)
+        alert(userId)
+        alert(recordId)
+        // 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(() => {})
+      },
     handleSearch()
     {
       this.openSearch = true;

--
Gitblit v1.9.1