发起变更保存接口统一修改
This commit is contained in:
+19
-62
@@ -10,80 +10,37 @@ export function queryUnsavedApi() {
|
||||
});
|
||||
}
|
||||
|
||||
/** 变更预识别查询
|
||||
*
|
||||
*/
|
||||
export function precheckApi(id: number) {
|
||||
// 保存
|
||||
export function saveChangeApi(id: number, params: any) {
|
||||
return request({
|
||||
url: `/api/changes/${id}/precheck`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 变更预识别保存
|
||||
*
|
||||
*/
|
||||
export function precheckSaveApi(params: {
|
||||
change_id: number,
|
||||
title: string,
|
||||
description: string,
|
||||
severity: string,
|
||||
probability: string,
|
||||
protection: string,
|
||||
compare_rows: {item: string, before_text: string, after_text: string}[]
|
||||
}) {
|
||||
return request({
|
||||
url: '/api/changes/precheck',
|
||||
url: `/api/changes/${id}/form`,
|
||||
method: 'put',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
/** 变更申请表查询
|
||||
*
|
||||
*/
|
||||
export function applicationApi(id: number) {
|
||||
// 提交
|
||||
export function submitChangeApi(id: number, params: any) {
|
||||
return request({
|
||||
url: `/api/changes/${id}/apply-form`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 变更申请表保存
|
||||
*
|
||||
*/
|
||||
export function applicationSaveApi(id: number, params: {
|
||||
change_type: number | null,
|
||||
change_level: any,
|
||||
duration_type: number | null,
|
||||
restore_deadline: number | null,
|
||||
org_id: number | null,
|
||||
urgent: number,
|
||||
purposes: string[],
|
||||
effect: string,
|
||||
main_changes: string[],
|
||||
related_changes: string[],
|
||||
materials: string,
|
||||
update_docs: string[],
|
||||
disciplines: string[],
|
||||
manage_dept: string,
|
||||
plan_use_date: number | null,
|
||||
risk_tools: string[],
|
||||
}) {
|
||||
return request({
|
||||
url: `/api/changes/${id}/apply-form`,
|
||||
method: 'put',
|
||||
url: `/api/changes/${id}/form/submit`,
|
||||
method: 'post',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// 变更培训内容保存
|
||||
export function trainingSaveApi(id: number, params: {
|
||||
content: string,
|
||||
}) {
|
||||
// 获取详情
|
||||
export function getChangeDetailApi(id: number) {
|
||||
return request({
|
||||
url: `/api/changes/${id}/train/content`,
|
||||
method: 'put',
|
||||
url: `/api/changes/${id}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 使用ai分析-步骤确认/取消
|
||||
export function useAiAnalysisApi(id: number, stepId: number, params: {action: string}) {
|
||||
return request({
|
||||
url: `/api/changes/${id}/steps/${stepId}/confirm`,
|
||||
method: 'post',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user