This commit is contained in:
cwchen 2025-09-29 10:42:20 +08:00
parent 4bf259e803
commit 1375ad9845
10 changed files with 142 additions and 81 deletions

View File

@ -9,19 +9,30 @@ export function getTransferReceiceListApi(params) {
}) })
} }
// 接收查看、进度
export function getTransferRecordFilesApi(params) {
return request({
url: '/smartArchives/transferReceice/getTransferRecordFiles',
method: 'GET',
params: params,
})
}
export function getTransferReceiceDetailByAcceptApi(params) { // 详情
export function getTransferReceiceDetailApi(params) {
return request({ return request({
url: '/smartArchives/transferReceice/getTransferReceiceDetail', url: '/smartArchives/transferReceice/getTransferReceiceDetail',
method: 'GET', method: 'GET',
params: params, params: params,
}) })
} }
// 详情列表
export function getTransferReceiceFilesApi(params) {
return request({
url: '/smartArchives/transferReceice/getTransferReceiceFiles',
method: 'GET',
params: params,
})
}
// 确认接收
export function transferReceiveApi(data) {
return request({
url: '/smartArchives/transferReceice/transferReceive',
method: 'POST',
data,
})
}

View File

@ -16,4 +16,22 @@ export function auditTransferApplyApi(data) {
method: 'POST', method: 'POST',
data: data, data: data,
}) })
}
// 档案移交审核详情
export function getTransferAuditApi(params) {
return request({
url: '/smartArchives/transferApply/getTransferAudit',
method: 'GET',
params: params
})
}
// 档案移交审核-列表详情
export function getTransferAudieFilesByApplyIdApi(params) {
return request({
url: '/smartArchives/transferApply/getTransferAudieFilesByApplyId',
method: 'GET',
params: params
})
} }

View File

@ -35,3 +35,12 @@ export function updateTransferRecordFilesStatusApi(data) {
data, data,
}) })
} }
// 详情
export function getTransferRecordDetailApi(params) {
return request({
url: '/smartArchives/transferRecord/getTransferRecordDetail',
method: 'GET',
params: params,
})
}

View File

@ -104,7 +104,7 @@ export default {
}).then(() => { }).then(() => {
this.$store.dispatch('LogOut').then(() => { this.$store.dispatch('LogOut').then(() => {
location.href = process.env.VUE_APP_ENV === 'production'? '/smart-archiving/index': '/index' location.href = process.env.VUE_APP_ENV === 'production'? '/smart-archiving/index': '/index'
getSystemConfigApi(); // getSystemConfigApi();
}) })
}).catch(() => {}) }).catch(() => {})
} }

View File

@ -9,7 +9,8 @@ import { saveAs } from 'file-saver'
import { decryptWithSM4, encryptWithSM4, hashWithSM3AndSalt } from '@/utils/sm' import { decryptWithSM4, encryptWithSM4, hashWithSM3AndSalt } from '@/utils/sm'
import { generateRequestSignature } from '@/utils/crypto-js' import { generateRequestSignature } from '@/utils/crypto-js'
const encryptRequestFlag = getConfig('encryptRequest')
const encryptRequestFlag = getConfig('encryptRequest',1)
const encryptResponseFlag = getConfig('encryptResponse') const encryptResponseFlag = getConfig('encryptResponse')
const checkIntegrityFlag = getConfig('checkIntegrity') const checkIntegrityFlag = getConfig('checkIntegrity')
const replayAttackFlag = getConfig('replayAttack') const replayAttackFlag = getConfig('replayAttack')
@ -26,7 +27,8 @@ const systemConfig = {
}, },
} }
function getConfig(value) { function getConfig(value,type) {
let config = sessionStorage.getItem('systemConfig'); let config = sessionStorage.getItem('systemConfig');
if(config){ if(config){
const decryptArr = JSON.parse(decryptWithSM4(config)); const decryptArr = JSON.parse(decryptWithSM4(config));
@ -38,6 +40,7 @@ function getConfig(value) {
} }
} }
let downloadLoadingInstance let downloadLoadingInstance
export let isRelogin = { show: false } export let isRelogin = { show: false }

View File

@ -1,8 +1,9 @@
import { getNoAuthConfig } from '@/api/system/setting'; import { getNoAuthConfig } from '@/api/system/setting';
import {encryptWithSM4} from '@/utils/sm'; import {encryptWithSM4} from '@/utils/sm';
export function getSystemConfigApi() { export async function getSystemConfigApi() {
getNoAuthConfig().then(res => { await getNoAuthConfig().then(res => {
console.log(res.data);
sessionStorage.setItem('systemConfig', encryptWithSM4(JSON.stringify(res.data))); sessionStorage.setItem('systemConfig', encryptWithSM4(JSON.stringify(res.data)));
}).catch(error => { }).catch(error => {
console.error('Failed to fetch config:', error); console.error('Failed to fetch config:', error);

View File

@ -20,7 +20,7 @@
<script> <script>
import _ from 'lodash' import _ from 'lodash'
import { import {
getTransferRecordFilesApi, getTransferReceiceFilesApi,
} from '@/api/filesTransfer/accept' } from '@/api/filesTransfer/accept'
export default { export default {
name: "AcceptRecordList", name: "AcceptRecordList",
@ -67,7 +67,7 @@ export default {
} }
const transferApplyId = this.rowData.id; const transferApplyId = this.rowData.id;
const res = await getTransferRecordFilesApi({ transferApplyId }); const res = await getTransferReceiceFilesApi({ transferApplyId });
console.log(res); console.log(res);
if (Array.isArray(res.data) && res.data.length > 0) { if (Array.isArray(res.data) && res.data.length > 0) {

View File

@ -20,7 +20,7 @@
<template slot="handle" slot-scope="{ data }"> <template slot="handle" slot-scope="{ data }">
<el-button plain size="mini" type="success" icon="el-icon-warning-outline" <el-button plain size="mini" type="success" icon="el-icon-warning-outline"
v-hasPermi="['transfer:apply:query']" @click="handleDetail(data)"> v-hasPermi="['transfer:Receice:query']" @click="handleDetail(data)">
详情 详情
</el-button> </el-button>
</template> </template>

View File

@ -114,7 +114,7 @@ import {
getTransferApplyFilesByApplyIdApi, getTransferApplyFilesByApplyIdApi,
getTransferApplyApi, getTransferApplyApi,
} from '@/api/filesTransfer/apply' } from '@/api/filesTransfer/apply'
import {auditTransferApplyApi} from '@/api/filesTransfer/audit' import {auditTransferApplyApi,getTransferAuditApi,getTransferAudieFilesByApplyIdApi} from '@/api/filesTransfer/audit'
import ViewFile from '@/views/viewFile/viewFile.vue' import ViewFile from '@/views/viewFile/viewFile.vue'
export default { export default {
@ -199,12 +199,10 @@ export default {
}, },
async initData() { async initData() {
this.fileList = []; this.fileList = [];
console.error(this.id);
const res = await getTransferApplyFilesByApplyIdApi({ id: this.id }); const res = this.viewStatus === 'audit' ? await getTransferAudieFilesByApplyIdApi({ id: this.id }) : await getTransferApplyFilesByApplyIdApi({ id: this.id });
console.log(res);
const res2 = await getTransferApplyApi({ id: this.id }); const res2 = this.viewStatus === 'audit' ? await getTransferAuditApi({ id: this.id }) : await getTransferApplyApi({ id: this.id });
this.projectName = res2?.data?.proName || '/'; this.projectName = res2?.data?.proName || '/';
this.receivingOrg = res2?.data?.deptName || '/'; this.receivingOrg = res2?.data?.deptName || '/';
// //

View File

@ -28,7 +28,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="proName" label="项目名称" min-width="150"> <el-table-column prop="proName" label="项目名称" min-width="150">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.proName || '--'}} {{ scope.row.proName || '--' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="singleProName" label="单项工程名称" min-width="150"> <el-table-column prop="singleProName" label="单项工程名称" min-width="150">
@ -48,10 +48,11 @@
</el-table-column> </el-table-column>
<el-table-column prop="archiveName" label="档案名称" min-width="300"> <el-table-column prop="archiveName" label="档案名称" min-width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="archive-name-cell file-name-link" @click="viewFile(scope.row)">{{ scope.row.archiveName }}</div> <div class="archive-name-cell file-name-link" @click="viewFile(scope.row)">{{
scope.row.archiveName }}</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-table :data="fileList" border style="width: 100%" class="detail-table" v-if="viewStatus === 'accept'"> <el-table :data="fileList" border style="width: 100%" class="detail-table" v-if="viewStatus === 'accept'">
<el-table-column prop="index" label="序号" width="80" align="center"> <el-table-column prop="index" label="序号" width="80" align="center">
@ -61,26 +62,29 @@
</el-table-column> </el-table-column>
<el-table-column prop="proName" label="移交时间" min-width="150"> <el-table-column prop="proName" label="移交时间" min-width="150">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.proName || '--'}} {{ scope.row.transferDate || '--' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="archiveName" label="档案名称" min-width="300"> <el-table-column prop="archiveName" label="档案名称" min-width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="archive-name-cell file-name-link" @click="viewFile(scope.row)">{{ scope.row.archiveName }}</div> <div class="archive-name-cell file-name-link" @click="viewFile(scope.row)">{{
scope.row.archiveName }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="接收状态" min-width="120"> <el-table-column prop="createTime" label="接收状态" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.integrityStatus === '1'" :type="scope.row.integrityStatus === '1' ? 'success' : 'danger'"> <el-tag v-if="scope.row.receiveStatus === '1'"
{{ scope.row.integrityStatus === '1' ? '已接收' : '未接收' }} :type="scope.row.receiveStatus === '1' ? 'success' : 'warning'">
{{ scope.row.receiveStatus === '1' ? '已接收' : '未接收' }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="archiveName" label="操作" min-width="100" v-if="viewStatus === 'accept'"> <el-table-column prop="archiveName" label="操作" min-width="100" v-if="viewStatus === 'accept'">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button plain icon="el-icon-check" type="primary" size="mini" @click="handleAccept(scope.row)">确认接收</el-button> <el-button plain icon="el-icon-check" type="primary" size="mini" v-if="scope.row.receiveStatus === '0'" hasPermi="['transfer:Receice:accept']"
@click="handleAccept(scope.row)">确认接收</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -107,23 +111,23 @@
</span> </span>
</el-dialog> </el-dialog>
<!-- 预览文件 --> <!-- 预览文件 -->
<ViewFile v-if="isViewflag" :rowData="row" :title="title" @closeDialog="closeDialog" @showColose="showColose" :width="600" /> <ViewFile v-if="isViewflag" :rowData="row" :title="title" @closeDialog="closeDialog" @showColose="showColose"
:width="600" />
</div> </div>
</template> </template>
<script> <script>
import { decryptWithSM4 } from '@/utils/sm' import { decryptWithSM4 } from '@/utils/sm'
import { getTransferRecordDetailApi, getTransferRecordFilesApi } from '@/api/filesTransfer/record'
import { import {
getTransferApplyFilesByApplyIdApi, getTransferReceiceDetailApi,
getTransferApplyApi getTransferReceiceFilesApi,
} from '@/api/filesTransfer/apply' transferReceiveApi
import {
getTransferReceiceDetailByAcceptApi,
} from '@/api/filesTransfer/accept' } from '@/api/filesTransfer/accept'
import ViewFile from '@/views/viewFile/viewFile.vue' import ViewFile from '@/views/viewFile/viewFile.vue'
export default { export default {
name: 'RecordDetail', name: 'RecordDetail',
components:{ViewFile}, components: { ViewFile },
data() { data() {
return { return {
id: decryptWithSM4(this.$route.query.id), id: decryptWithSM4(this.$route.query.id),
@ -135,9 +139,10 @@ export default {
isViewflag: false, isViewflag: false,
row: {}, row: {},
title: "", title: "",
form: {},
} }
}, },
mounted() { mounted() {
// //
document.body.style.overflow = 'hidden'; document.body.style.overflow = 'hidden';
@ -146,88 +151,100 @@ export default {
// //
document.body.style.overflow = 'auto'; document.body.style.overflow = 'auto';
}, },
created(){ created() {
this.initData(); this.initData();
}, },
methods: { methods: {
// //
viewFile(row) { viewFile(row) {
console.error(row);
this.title = "预览"; this.title = "预览";
this.row = row; this.row = row;
this.isViewflag = true; this.isViewflag = true;
}, },
closeDialog() { closeDialog() {
this.isViewflag = false; this.isViewflag = false;
}, },
showColose() { showColose() {
this.isflag = false; this.isflag = false;
}, },
handleClose() { handleClose() {
let obj = null; let obj = null;
if(this.viewStatus === 'record'){ if (this.viewStatus === 'record') {
obj = { path: "/archivesManagement/filesTransfer/record" } obj = { path: "/archivesManagement/filesTransfer/record" }
}else{ } else {
obj = { path: "/archivesManagement/filesTransfer/accept" } obj = { path: "/archivesManagement/filesTransfer/accept" }
} }
this.$tab.closeOpenPage(obj) this.$tab.closeOpenPage(obj)
}, },
async initData() { async initData() {
this.fileList = []; this.fileList = [];
const res = await getTransferApplyFilesByApplyIdApi({ id: this.id }); const res = this.viewStatus === 'accept' ? await getTransferReceiceFilesApi({ transferApplyId: this.id }) : await getTransferRecordFilesApi({ transferApplyId: this.id });
console.log(res);
const res2 = this.viewStatus === 'accept' ? await getTransferReceiceDetailApi({ id: this.id }) : await getTransferRecordDetailApi({ id: this.id });
const res2 = await getTransferApplyApi({ id: this.id });
this.projectName = res2?.data?.proName || '/'; this.projectName = res2?.data?.proName || '/';
this.receivingOrg = res2?.data?.deptName || '/'; this.receivingOrg = res2?.data?.deptName || '/';
if (Array.isArray(res.data) && res.data.length > 0) { if (Array.isArray(res.data) && res.data.length > 0) {
res.data.map(item => { res.data.map(item => {
const newFile = { const newFile = {
id: item.id,
proName: item.proName, proName: item.proName,
singleProName: item.singleProName, singleProName: item.singleProName,
createUserName: item.createUserName, createUserName: item.createUserName,
createTime: item.createTime, createTime: item.createTime,
archiveName: item?.parParentName + '/' + item?.parentName + '/' + item?.fileName, archiveName: item?.parParentName + '/' + item?.parentName + '/' + item?.fileName,
receiveStatus: item.receiveStatus || '0',
transferDate: item.transferDate,
fileId: item?.fileId || '',
} }
this.fileList.push(newFile); this.fileList.push(newFile);
}) })
} }
}, },
//
handleAccept(row) { handleAccept(row) {
console.log(row); this.form = row;
this.confirmDialogVisible = true; this.confirmDialogVisible = true;
}, },
// //
confirmTransferStatus() { confirmTransferStatus() {
this.closeConfirmDialog(); this.closeConfirmDialog();
// transferReceiveApi({ id: this.form.id }).then(res => {
/* updateIntegrityStatusApi({ proId: this.projectId }) if (res.code === 200) {
.then(res => { this.$message.success(res.msg || '确认接收成功');
if (res.code === 200) { this.refreshData();
this.$message.success('完整性确认成功'); } else {
this.closeConfirmDialog(); this.$message.error(res.msg || '确认接收失败');
// }
} else { })
this.$message.error(res.msg || '完整性确认失败');
}
})
.catch(error => {
this.$message.error('完整性确认失败,请重试');
console.error('完整性确认失败:', error);
}); */
}, },
// //
closeConfirmDialog() { closeConfirmDialog() {
this.confirmDialogVisible = false; this.confirmDialogVisible = false;
/* setTimeout(() => {
const obj = { path: "/archivesManagement/fileManager" }
this.$tab.closeOpenPage(obj)
}, 200); */
}, },
//
async refreshData() {
this.fileList = [];
const res = await getTransferReceiceFilesApi({ transferApplyId: this.id })
if (Array.isArray(res.data) && res.data.length > 0) {
res.data.map(item => {
const newFile = {
id: item.id,
proName: item.proName,
singleProName: item.singleProName,
createUserName: item.createUserName,
createTime: item.createTime,
archiveName: item?.parParentName + '/' + item?.parentName + '/' + item?.fileName,
receiveStatus: item.receiveStatus || '0',
transferDate: item.transferDate,
fileId: item?.fileId || '',
}
this.fileList.push(newFile);
})
}
}
} }
} }
</script> </script>
@ -236,27 +253,28 @@ export default {
.detail-container { .detail-container {
padding: 20px; padding: 20px;
background: #fff; background: #fff;
height: calc(100vh - 120px); /* 减去头部导航栏的高度 */ height: calc(100vh - 120px);
/* 减去头部导航栏的高度 */
overflow-y: auto; overflow-y: auto;
box-sizing: border-box; box-sizing: border-box;
/* 自定义滚动条样式 */ /* 自定义滚动条样式 */
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 6px; width: 6px;
background: #f5f5f5; background: #f5f5f5;
} }
&::-webkit-scrollbar-track { &::-webkit-scrollbar-track {
background: #f5f5f5; background: #f5f5f5;
border-radius: 3px; border-radius: 3px;
} }
&::-webkit-scrollbar-thumb { &::-webkit-scrollbar-thumb {
background: #c0c4cc; background: #c0c4cc;
border-radius: 3px; border-radius: 3px;
transition: background 0.3s; transition: background 0.3s;
} }
&::-webkit-scrollbar-thumb:hover { &::-webkit-scrollbar-thumb:hover {
background: #909399; background: #909399;
} }
@ -333,9 +351,10 @@ export default {
} }
} }
.back-btn{ .back-btn {
height: 50px; height: 50px;
} }
/* 确认弹框样式 */ /* 确认弹框样式 */
.confirm-content { .confirm-content {
display: flex; display: flex;
@ -367,10 +386,12 @@ export default {
color: #909399; color: #909399;
line-height: 1.4; line-height: 1.4;
} }
.file-name-link { .file-name-link {
color: #409EFF; color: #409EFF;
cursor: pointer; cursor: pointer;
} }
.file-name-link:hover { .file-name-link:hover {
text-decoration: underline; text-decoration: underline;
} }