This commit is contained in:
parent
d9fa6d07c5
commit
d1ba466efd
|
|
@ -23,3 +23,10 @@ export function submitRectifyNoticeApi(data) {
|
||||||
data: data,
|
data: data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function agreeRectificationApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/blade-system/archivingManage/agreeRectification',
|
||||||
|
method: 'POST',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,13 @@
|
||||||
>
|
>
|
||||||
下发整改通知
|
下发整改通知
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
@click="agreeRectification"
|
||||||
|
>
|
||||||
|
同意归档
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #fileName="{ row }">
|
<template #fileName="{ row }">
|
||||||
|
|
@ -131,7 +138,7 @@ import { useRouter } from 'vue-router';
|
||||||
import { ref, reactive, watch, nextTick } from 'vue';
|
import { ref, reactive, watch, nextTick } from 'vue';
|
||||||
import { ElMessage, ElLoading, ElMessageBox } from 'element-plus';
|
import { ElMessage, ElLoading, ElMessageBox } from 'element-plus';
|
||||||
import { getFileManageApi } from '@/api/archivesManagement/fileManager/fileManager.js';
|
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 ViewFile from '@/views/viewFile/viewFile.vue';
|
||||||
import FileTree from '@/views/common/fileTree.vue'; // 引入文件树组件
|
import FileTree from '@/views/common/fileTree.vue'; // 引入文件树组件
|
||||||
|
|
||||||
|
|
@ -480,6 +487,45 @@ const submitRectifyNotice = async () => {
|
||||||
ElMessage.error('整改通知下发失败');
|
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>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue