diff --git a/src/service/api/change.ts b/src/service/api/change.ts
index ac6be21..34321a4 100644
--- a/src/service/api/change.ts
+++ b/src/service/api/change.ts
@@ -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
});
}
diff --git a/src/views/my/initiateChange/index.vue b/src/views/my/initiateChange/index.vue
index 4ae80a6..e2136d0 100644
--- a/src/views/my/initiateChange/index.vue
+++ b/src/views/my/initiateChange/index.vue
@@ -1,16 +1,10 @@
@@ -522,11 +536,14 @@ defineExpose({form})
!v && (sheet = '')" placement="right" :width="sheet === 'level' ? '45rem' : '28rem'">
diff --git a/src/views/my/initiateChange/modules/changePre.vue b/src/views/my/initiateChange/modules/changePre.vue
index 92e0aa3..a442fd2 100644
--- a/src/views/my/initiateChange/modules/changePre.vue
+++ b/src/views/my/initiateChange/modules/changePre.vue
@@ -1,16 +1,16 @@
@@ -41,11 +56,14 @@ const form = ref<{ content: string }>({