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/archiveMaterial/index.vue | 10 ++--
src/api/system/annotation.js | 8 ++++
src/api/system/signature.js | 9 ++++
src/views/archiveManager/index.vue | 76 ++++++++++++++++++++++++++++++++++----
4 files changed, 90 insertions(+), 13 deletions(-)
diff --git a/src/api/system/annotation.js b/src/api/system/annotation.js
index deb4584..a22e846 100644
--- a/src/api/system/annotation.js
+++ b/src/api/system/annotation.js
@@ -42,3 +42,11 @@
method: 'delete'
})
}
+
+export function selectAllAnn(data) {
+ return request({
+ url: '/system/annotation/listAll',
+ method: 'get',
+ data: data
+ })
+}
diff --git a/src/api/system/signature.js b/src/api/system/signature.js
index e352565..f28405f 100644
--- a/src/api/system/signature.js
+++ b/src/api/system/signature.js
@@ -42,3 +42,12 @@
method: 'delete'
})
}
+
+
+export function selectAllSig(data) {
+ return request({
+ url: '/system/signature/listAll',
+ method: 'get',
+ data: data
+ })
+}
diff --git a/src/views/archiveManager/archiveMaterial/index.vue b/src/views/archiveManager/archiveMaterial/index.vue
index b27238d..381c1b4 100644
--- a/src/views/archiveManager/archiveMaterial/index.vue
+++ b/src/views/archiveManager/archiveMaterial/index.vue
@@ -1656,14 +1656,14 @@
this.download('system/materials/exportDir', {
ids: this.ids.join(','),
// exportType: 'selected'
- }, `materiaDir_selected_${new Date().getTime()}.xls`)
+ }, this.recordStrId+ ` 鍗峰唴鐩綍.xls`)
} else {
// 鏄剧ず瀵煎嚭鍏ㄩ儴鏁版嵁鐨勬彁绀�
this.$message.info('姝e湪瀵煎嚭绗﹀悎褰撳墠鏌ヨ鏉′欢鐨勬墍鏈夋暟鎹�...');
// 娌℃湁閫変腑琛屾椂锛屽鍑哄綋鍓嶆煡璇㈡潯浠剁殑鏁版嵁
this.download('system/materials/exportDir', {
...this.queryParams
- }, `materiaDir_${new Date().getTime()}.xls`)
+ }, this.recordStrId+` 鍗峰唴鐩綍.xls`)
}
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 - 鏀寔瀵煎嚭閫変腑琛屾垨鍏ㄩ儴鏁版嵁 */
@@ -1676,14 +1676,14 @@
this.download('system/materials/export', {
ids: this.ids.join(','),
// exportType: 'selected'
- }, `materials_selected_${new Date().getTime()}.xls`)
+ }, this.recordStrId+` 鐢靛瓙鏂囦欢淇℃伅.xls`)
} else {
// 鏄剧ず瀵煎嚭鍏ㄩ儴鏁版嵁鐨勬彁绀�
this.$message.info('姝e湪瀵煎嚭绗﹀悎褰撳墠鏌ヨ鏉′欢鐨勬墍鏈夋暟鎹�...');
// 娌℃湁閫変腑琛屾椂锛屽鍑哄綋鍓嶆煡璇㈡潯浠剁殑鏁版嵁
this.download('system/materials/export', {
...this.queryParams
- }, `materials_${new Date().getTime()}.xls`)
+ }, this.recordStrId+` 鐢靛瓙鏂囦欢淇℃伅.xls`)
}
},
@@ -1738,7 +1738,7 @@
// alert(userId)
// alert(this.queryParams.archiveRecordsId)
// alert(row.sysUser.userName)
- this.$modal.confirm('纭瑕佸彇娑堣鐢ㄦ埛鐨�"' + '' + '"鎺堟潈鍚楋紵').then(function() {
+ this.$modal.confirm('纭瑕佸彇娑堣鐢ㄦ埛鐨勬巿鏉冨悧锛�').then(function() {
return delArchiverecordstouserByReIdAndUid({ recordId: recordId, userId: userId })
}).then(() => {
// this.getList()
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