From a0f40c39abc6b26e101f54433c150af5bbbc240a Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期三, 21 一月 2026 21:43:25 +0800
Subject: [PATCH] 修改了相关代码
---
src/views/archiveManager/index.vue | 155 ++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 132 insertions(+), 23 deletions(-)
diff --git a/src/views/archiveManager/index.vue b/src/views/archiveManager/index.vue
index b04ef15..34c8eda 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="handleBackPermission"
+ 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"
@@ -474,7 +489,15 @@
</el-dropdown>
</template>
</el-table-column>
-
+ <el-table-column label="褰撳墠鎺堟潈褰曞叆鐨勭敤鎴�" align="center" sortable="custom" prop="userName" width="120" v-if="userId==1">
+ <template slot-scope="scope">
+ <el-button
+ :type="scope.row.userName === '' ? 'default' : 'primary'"
+ size="mini">
+ {{ scope.row.userName === null ? '鏈垎閰�' : scope.row.userName }}
+ </el-button>
+ </template>
+ </el-table-column>
<el-table-column label="鐘舵��" align="center" sortable="custom" prop="recordStatus" width="120">
<template slot-scope="scope">
<el-button :type="scope.row.recordStatus === '鏈綍鍏�' ? 'danger' : 'success'" size="mini">
@@ -544,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>
@@ -557,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>
@@ -969,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"
@@ -978,15 +1001,19 @@
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, backPermission} from "@/api/system/archiverecordstouser"
+import { selectAllSig } from "@/api/system/signature"
+import { selectAllAnn } from "@/api/system/annotation"
export default {
components: {
VueOfficeExcel
},
- name: "Records",
+ name: "InfoManager",
data() {
return {
+ //鍒犻櫎鎵归噺鎺堟潈
+ allMapInfo: [],
+ recId: '',
openSearch: false,
totalUser: 0,
visibleUser:false,
@@ -1036,6 +1063,7 @@
loading: true,
// 閫変腑鏁扮粍
ids: [],
+ userAllIds: [],
// 闈炲崟涓鐢�
single: true,
// 闈炲涓鐢�
@@ -1053,7 +1081,7 @@
// 鏌ヨ鍙傛暟
queryParams: {
pageNum: 1,
- pageSize: 10,
+ pageSize: 50,
recordId: null,
inquiryNumber: null,
categoryType: null, // 绫诲埆绫诲瀷
@@ -1147,7 +1175,8 @@
this.fetchProjectOptions()
this.fetchProjectCompanyOptions()
this.getList()
-
+ this.getSigInfo();
+ this.getAnnInfo();
},
watch: {
'form.constructionUnit': {
@@ -1180,6 +1209,48 @@
}
},
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(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;
@@ -1206,6 +1277,7 @@
if(res.code === 200) {
this.$modal.msgSuccess(res.msg)
this.visibleUser = false
+ this.getList()
// this.$emit("ok")
} else {
this.$modal.msgError(res.msg || "鎺堟潈澶辫触锛屽凡缁忔巿鏉冭繃浜�")
@@ -1228,6 +1300,10 @@
// 澶氶�夋閫変腑鏁版嵁
handleSelectionChange(selection) {
this.userIds = selection.map(item => item.userId)
+
+ var allMapInfo = selection.map(item =>(item.id, item.userId))
+ console.log("0----------00000000000")
+ console.log(allMapInfo)
},
// 鏌ヨ琛ㄦ暟鎹�
getUserList() {
@@ -1489,6 +1565,14 @@
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
+ console.log( this.ids)
+ this.allMapInfo = selection.map(item => ({
+ recordId: item.id,
+ userId: item.userId
+}));
+
+console.log(this.allMapInfo)
+
},
/** 鏂板鎸夐挳鎿嶄綔 */
handleAdd() {
@@ -1521,14 +1605,18 @@
var mid = row.id
const roleId = 2
// alert(mid)
+var filingNumber = row.filingNumber
+
+if(filingNumber==="")
+ filingNumber = ' '
var recordId = mid
var pageCount = row.pageCount
var recordStrId = row.recordId
var inquiryNumber = row.inquiryNumber
var sho = false
// this.$router.push("/archiveManager/infoManagerAu/user/" + roleId+"/"+recordId)
- this.$router.push("/archiveManager/infoManagerAu/archiveMaterialManager/" + recordId+"/"+pageCount+"/"+sho+"/"+recordStrId+"/"+inquiryNumber)
+ this.$router.push("/archiveManager/infoManagerAu/archiveMaterialManager/" + recordId+"/"+pageCount+"/"+sho+"/"+recordStrId+"/"+inquiryNumber+"/"+filingNumber)
},
/*瀵煎嚭澶囪�冭〃*/
@@ -1538,16 +1626,17 @@
var id = row.id
id = Number(id)
-
+ var recordStrId = row.recordId
var recordId = row.recordId
this.download('/system/materials/exportBack/'+id+'/'+recordId, {
- }, `澶囪�冭〃_${new Date().getTime()}.pdf`)
+ }, recordStrId +` 澶囪�冭〃.pdf`)
},
/*瀵煎嚭鍗峰唴鐩綍*/
JuanInfo(row)
{
+
var id = row.id
console.log(row.pageCount)
if(row.pageCount==null)
@@ -1560,7 +1649,7 @@
var recordId = row.recordId
this.download('/system/materials/exportJuan/'+id, {
- }, `鍗峰唴鐩綍_${new Date().getTime()}.xls`)
+ }, recordId+` 鍗峰唴鐩綍.xls`)
},
/*瀵煎嚭妗堝嵎灏侀潰*/
pageInfo(row)
@@ -1572,7 +1661,7 @@
var recordId = row.recordId
this.download('/system/materials/exportPageInfo/'+id+'/'+recordId, {
- }, `妗堝嵎灏侀潰_${new Date().getTime()}.xls`)
+ }, recordId+` 妗堝嵎灏侀潰.xls`)
},
handleInfo(row)
{
@@ -1581,7 +1670,7 @@
var valid = false;
var pageCount = row.pageCount
var recordStrId = row.recordId
-
+ var filingNumber = row.filingNumber
var inquiryNumber = row.inquiryNumber
console.log(recordStrId==='')
console.log("+---------------------")
@@ -1599,10 +1688,11 @@
// alert(mid)
var recordId = mid
-
+if(filingNumber==="")
+ filingNumber = ' '
var sho = true
// this.$router.push("/archiveManager/infoManagerAu/user/" + roleId+"/"+recordId)
- this.$router.push("/archiveManager/infoManagerAu/archiveMaterialManager/" + recordId+"/"+pageCount+"/"+sho+"/"+recordStrId+"/"+inquiryNumber)
+ this.$router.push("/archiveManager/infoManagerAu/archiveMaterialManager/" + recordId+"/"+pageCount+"/"+sho+"/"+recordStrId+"/"+inquiryNumber+"/"+filingNumber)
}else
{
this.$modal.msgWarning("璇疯ˉ鍏呴〉鍙风瓑鐩稿叧淇℃伅锛屽啀缂栬緫鍗峰唴鐩綍锛�")
@@ -1676,6 +1766,23 @@
this.open = true
this.title = "淇敼妗f璁板綍"
})
+ },
+ handleBackPermission()
+ {
+ console.log("--------------------++++++++++]]]]]")
+ console.log(this.allMapInfo)
+ var _this = this;
+ const ids = this.ids
+ this.$modal.confirm('鏄惁纭鏀跺洖妗f璁板綍缂栧彿涓�"' + ids + '"鐨勬潈闄愶紵').then(function() {
+
+ backPermission(_this.allMapInfo)
+
+ }).then(() => {
+ this.getList()
+ this.$modal.msgSuccess("鏀跺洖鏉冮檺鎴愬姛")
+ }).catch(() => {})
+
+
},
/*鎵归噺鎺堟潈*/
handleGivePermission()
@@ -1880,6 +1987,7 @@
const id = row.id || this.ids;
// alert(id)
this.recordId = id;
+ this.recId = row.recordId
this.$modal.loading('姝e湪鑾峰彇Excel鏂囦欢锛岃绋嶅��...');
// 浠庡悗绔幏鍙朎xcel鏂囦欢
@@ -2109,6 +2217,7 @@
/** 澶勭悊涓嬭浇鎸夐挳鐐瑰嚮 */
handleDownloadClick() {
+
if (this.currentExcelUrl) {
// 鑾峰彇鐢ㄦ埛閫夋嫨鐨勯�夐」
const { includeQrCode, selectedAnnotations } = this.excelOptions;
@@ -2124,12 +2233,12 @@
link.href = this.currentExcelUrl;
// 鏋勫缓鏂囦欢鍚嶏紝鍖呭惈閫夐」淇℃伅
- let filename = `record_${this.currentExcelId}`;
- if (includeQrCode) filename += '_qr';
+ let filename =this.recId+ ` 棰勬暣鐞哷;
+ //if (includeQrCode) filename += '_qr';
// if (selectedAnnotations.length > 0) {
// filename += `_anno${selectedAnnotations.join('')}`;x
// }
- filename += `_${new Date().getTime()}.xls`;
+ filename += `.xls`;
link.download = filename;
@@ -2453,7 +2562,7 @@
const url = URL.createObjectURL(blob);
const link = document.createElement('a');
link.href = url;
- link.download = `record_${id}_${new Date().getTime()}.xls`;
+ link.download = `棰勬暣鐞�.xls`;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
--
Gitblit v1.9.1