From 8706ec4b9259735cd4620ef55d5c63a3b96ee6fb Mon Sep 17 00:00:00 2001 From: bestlee Date: Fri, 4 Sep 2026 14:20:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E8=B5=B7=E5=8F=98=E6=9B=B4=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=8E=A5=E5=8F=A3=E7=BB=9F=E4=B8=80=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/service/api/change.ts | 81 ++------- src/views/my/initiateChange/index.vue | 165 +++++++++++++++--- .../my/initiateChange/modules/changeApply.vue | 23 ++- .../my/initiateChange/modules/changePre.vue | 38 +--- .../initiateChange/modules/changeTraining.vue | 26 ++- .../my/initiateChange/modules/footer.vue | 83 ++------- 6 files changed, 221 insertions(+), 195 deletions(-) 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})