This commit is contained in:
liang.chao 2025-12-08 16:24:36 +08:00
parent d9fa6d07c5
commit d1ba466efd
2 changed files with 54 additions and 1 deletions

View File

@ -23,3 +23,10 @@ export function submitRectifyNoticeApi(data) {
data: data,
})
}
export function agreeRectificationApi(data) {
return request({
url: '/blade-system/archivingManage/agreeRectification',
method: 'POST',
data: data,
})
}

View File

@ -21,6 +21,13 @@
>
下发整改通知
</el-button>
<el-button
type="success"
plain
@click="agreeRectification"
>
同意归档
</el-button>
</template>
<template #fileName="{ row }">
@ -131,7 +138,7 @@ import { useRouter } from 'vue-router';
import { ref, reactive, watch, nextTick } from 'vue';
import { ElMessage, ElLoading, ElMessageBox } from 'element-plus';
import { getFileManageApi } from '@/api/archivesManagement/fileManager/fileManager.js';
import { getArchivingManageFilesApi,submitRectifyNoticeApi } from '@/api/archivesManagement/archivingManage'; // API
import { getArchivingManageFilesApi,submitRectifyNoticeApi,agreeRectificationApi } from '@/api/archivesManagement/archivingManage';
import ViewFile from '@/views/viewFile/viewFile.vue';
import FileTree from '@/views/common/fileTree.vue'; //
@ -480,6 +487,45 @@ const submitRectifyNotice = async () => {
ElMessage.error('整改通知下发失败');
}
};
//
const agreeRectification = async () => {
try {
//
await ElMessageBox.confirm(
'确定要同意归档吗?此操作不可撤销。',
'确认归档',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}
);
const loading = ElLoading.service({
lock: true,
text: '正在处理归档,请稍候...',
background: 'rgba(0,0,0,0.5)'
});
// API
await agreeRectificationApi({
proId: props.projectId // ID
});
loading.close();
ElMessage.success('归档同意操作成功');
//
onLoad(page, query);
} catch (error) {
if (error !== 'cancel') { //
console.error('同意归档失败:', error);
ElMessage.error('归档同意操作失败');
}
console.log('用户取消操作或操作失败');
}
};
</script>
<style scoped>