aegon-lv82 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +12 -0
- package/src/App.vue +44 -0
- package/src/api/index.ts +19 -0
- package/src/api/modules/build-report/reportEditor.ts +526 -0
- package/src/api/modules/build-report/reportPermission.ts +64 -0
- package/src/api/modules/index.ts +69 -0
- package/src/api/modules/industry/green_mortgage.ts +42 -0
- package/src/api/modules/user/index.ts +4 -0
- package/src/api/request.ts +124 -0
- package/src/assets/sample-access-icon.png +0 -0
- package/src/assets/sample-pie-chart.png +0 -0
- package/src/assets/vue.svg +1 -0
- package/src/components/CapsuleScrollbar.vue +7 -0
- package/src/components/Export/ExcelExport.vue +592 -0
- package/src/components/Export/ExcelExport2.vue +494 -0
- package/src/components/Export/ExcelExport3.vue +342 -0
- package/src/components/Export/ExcelExport4.vue +665 -0
- package/src/components/Export/excelExport.js +547 -0
- package/src/components/Export/excelExport.ts +551 -0
- package/src/components/GEN-AI/index.vue +140 -0
- package/src/components/GEN-AI/index1.vue +422 -0
- package/src/components/GEN-AI/index10.vue +5 -0
- package/src/components/GEN-AI/index2.vue +548 -0
- package/src/components/GEN-AI/index3.vue +605 -0
- package/src/components/GEN-AI/index4.vue +609 -0
- package/src/components/GEN-AI/index5.vue +558 -0
- package/src/components/GEN-AI/index6.vue +634 -0
- package/src/components/GEN-AI/index7.vue +688 -0
- package/src/components/GEN-AI/index8.vue +458 -0
- package/src/components/GEN-AI/index9.vue +1217 -0
- package/src/components/GEN-AI/types.ts +12 -0
- package/src/components/GEN-AI/utils.ts +42 -0
- package/src/components/HelloWorld.vue +41 -0
- package/src/components/PageCard.vue +124 -0
- package/src/components/PageHeader.vue +32 -0
- package/src/components/backup/index5 copy.vue +556 -0
- package/src/components/backup/index5.vue +620 -0
- package/src/components/backup/index9 copy.vue +1029 -0
- package/src/components/backup/index9-pro.vue +1065 -0
- package/src/components/backup/index9.vue +1057 -0
- package/src/directives/btnLoading.ts +455 -0
- package/src/directives/debounce copy.ts +670 -0
- package/src/directives/debounce.ts +98 -0
- package/src/directives/index.ts +25 -0
- package/src/layouts/MainLayout.vue +129 -0
- package/src/main.ts +76 -0
- package/src/router/index.ts +142 -0
- package/src/router/menus.ts +28 -0
- package/src/store/modules/gen-ai/index.ts +1 -0
- package/src/store/modules/gen-ai/reportBuild.ts +37 -0
- package/src/style.css +79 -0
- package/src/styles/report-config-popover.css +39 -0
- package/src/styles/report-icon-btn.css +19 -0
- package/src/test/mock.ts +101 -0
- package/src/test/test1.vue +402 -0
- package/src/test/test2.vue +1689 -0
- package/src/types/gen-ai/build-report/reportEditor.ts +684 -0
- package/src/utils/function.ts +46 -0
- package/src/utils/gen-ai-navigation.ts +1 -0
- package/src/utils/gen-ai-scroll.ts +1 -0
- package/src/utils/openDataLoaderWordExport.ts +33 -0
- package/src/utils/pageScrollbar.ts +115 -0
- package/src/utils/randomTranscode.ts +87 -0
- package/src/utils/reportPdfExport.ts +44 -0
- package/src/views/Blank.vue +68 -0
- package/src/views/Home.vue +29 -0
- package/src/views/TemplateCenter/Knowledge.ts +83 -0
- package/src/views/TemplateCenter/data.d.ts +10 -0
- package/src/views/TemplateCenter/index.vue +1128 -0
- package/src/views/TemplateCenter/service.ts +69 -0
- package/src/views/gen-ai/build-report/chartStreamRefs.ts +174 -0
- package/src/views/gen-ai/build-report/coherence-check/index.vue +559 -0
- package/src/views/gen-ai/build-report/components/ReportChapterWorkspace.vue +4258 -0
- package/src/views/gen-ai/build-report/components/ReportConfigPanel.vue +727 -0
- package/src/views/gen-ai/build-report/components/ReportGenerateSettingsPanel.vue +2361 -0
- package/src/views/gen-ai/build-report/components/ReportGeneratingPanel.vue +1765 -0
- package/src/views/gen-ai/build-report/components/ReportPromptPanel.vue +614 -0
- package/src/views/gen-ai/build-report/components/ReportSourceFileSummary.vue +656 -0
- package/src/views/gen-ai/build-report/components/ReportSourcesPanel.vue +1327 -0
- package/src/views/gen-ai/build-report/components/ReportTemplateDetail.vue +191 -0
- package/src/views/gen-ai/build-report/components/ReportTemplateEditorFormPanel.vue +667 -0
- package/src/views/gen-ai/build-report/components/ReportTemplatePicker.vue +302 -0
- package/src/views/gen-ai/build-report/components/ReportWorkflowSidebar.vue +148 -0
- package/src/views/gen-ai/build-report/components/paramsSetting.vue +886 -0
- package/src/views/gen-ai/build-report/components/reportEdit.vue +2283 -0
- package/src/views/gen-ai/build-report/index.vue +856 -0
- package/src/views/gen-ai/build-report/report-domain.ts +1133 -0
- package/src/views/gen-ai/build-report/report-template-data.ts +295 -0
- package/src/views/gen-ai/build-report/useReportWorkflow.ts +1408 -0
- package/src/views/gen-ai/common/assets/NotoSans-SC.woff2 +0 -0
- package/src/views/gen-ai/common/assets/NotoSans-TC.woff2 +0 -0
- package/src/views/gen-ai/common/assets/NotoSans.woff2 +0 -0
- package/src/views/gen-ai/common/assets/fonts.css +278 -0
- package/src/views/gen-ai/common/assets/pagination.css +163 -0
- package/src/views/gen-ai/common/directives/btnLoading.ts +455 -0
- package/src/views/gen-ai/common/directives/debounce.ts +98 -0
- package/src/views/gen-ai/common/directives/index.ts +30 -0
- package/src/views/gen-ai/common/en.md +417 -0
- package/src/views/gen-ai/common/index.ts +36 -0
- package/src/views/gen-ai/common/types/component-expose.ts +9 -0
- package/src/views/gen-ai/common/utils/api-res-status.ts +7 -0
- package/src/views/gen-ai/common/utils/navigation.ts +59 -0
- package/src/views/gen-ai/common/utils/remote-request.ts +45 -0
- package/src/views/gen-ai/common/utils/scroll.ts +577 -0
- package/src/views/gen-ai/components/AIExport/docx-export.ts +950 -0
- package/src/views/gen-ai/components/AIExport/docxExport.ts +2566 -0
- package/src/views/gen-ai/components/AIExport/index.ts +52 -0
- package/src/views/gen-ai/components/AIExport/parseMarkdownHtml.ts +649 -0
- package/src/views/gen-ai/components/CapsuleScrollbar.vue +149 -0
- package/src/views/gen-ai/components/ChapterTitleScroll.vue +468 -0
- package/src/views/gen-ai/components/EntryHeroNavCards.vue +379 -0
- package/src/views/gen-ai/components/GenAiPagination.vue +52 -0
- package/src/views/gen-ai/components/ModelCard.vue +1114 -0
- package/src/views/gen-ai/components/Preview/FilePreviewPage.vue +947 -0
- package/src/views/gen-ai/components/Preview/PreviewCapsuleScroll.vue +205 -0
- package/src/views/gen-ai/components/Preview/PreviewOutlineTree.vue +148 -0
- package/src/views/gen-ai/components/Preview/index.ts +11 -0
- package/src/views/gen-ai/components/Preview/preview.ts +722 -0
- package/src/views/gen-ai/components/PromptField.vue +505 -0
- package/src/views/gen-ai/components/RecentReportsTable.vue +974 -0
- package/src/views/gen-ai/components/ReportCollapsibleSection.vue +172 -0
- package/src/views/gen-ai/components/ReportHistoryList.vue +637 -0
- package/src/views/gen-ai/components/ReportSectionConfirmPopover.vue +251 -0
- package/src/views/gen-ai/components/editor/ChapterTiptapEditor.vue +3139 -0
- package/src/views/gen-ai/components/editor/StructureBlockView.vue +441 -0
- package/src/views/gen-ai/components/editor/TiptapToolbar.vue +1036 -0
- package/src/views/gen-ai/components/editor/TypewriterDocEditor.vue +398 -0
- package/src/views/gen-ai/components/editor/_StructureOrgNode.vue +326 -0
- package/src/views/gen-ai/components/editor/index.ts +12 -0
- package/src/views/gen-ai/components/editor/parseMarkdownHtml.ts +667 -0
- package/src/views/gen-ai/gen-entry/api/index.ts +32 -0
- package/src/views/gen-ai/gen-entry/index.vue +287 -0
- package/src/views/gen-ai/gen-entry/types/index.ts +4 -0
- package/src/views/gen-ai/i.mark +2 -0
- package/src/views/gen-ai/management-center/index.vue +1815 -0
- package/src/views/gen-ai/management-center/mockData.ts +248 -0
- package/src/views/gen-ai/management-center/types/index.ts +37 -0
- package/src/views/gen-ai/model-manager/TemplateEditorFormPanel.vue +661 -0
- package/src/views/gen-ai/model-manager/api/index.ts +32 -0
- package/src/views/gen-ai/model-manager/api/mockApi.ts +33 -0
- package/src/views/gen-ai/model-manager/index.vue +1583 -0
- package/src/views/gen-ai/model-manager/mockData.ts +177 -0
- package/src/views/gen-ai/model-manager/template-detail-shared.ts +154 -0
- package/src/views/gen-ai/model-manager/template-editor.vue +345 -0
- package/src/views/gen-ai/model-manager/types/index.ts +40 -0
- package/src/views/gen-ai/model-manager/utils.ts +25 -0
- package/src/views/greenMortgage.vue +1834 -0
- package/src/vite-env.d.ts +46 -0
|
@@ -0,0 +1,684 @@
|
|
|
1
|
+
/** 章節狀態:PENDING 未生成 / EDITING 編輯中 / CREATED 已生成 */
|
|
2
|
+
export type GenAiSectionLatestStatus = 'PENDING' | 'EDITING' | 'CREATED'
|
|
3
|
+
|
|
4
|
+
/** 查詢章節下拉列表 - 請求參數 */
|
|
5
|
+
export interface GenAiGetSectionListParams {
|
|
6
|
+
/** 報告ID */
|
|
7
|
+
instanceId: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/** 章節下拉項 */
|
|
11
|
+
export interface GenAiReportSectionItem {
|
|
12
|
+
/** 報告ID */
|
|
13
|
+
instanceId: string
|
|
14
|
+
/** 章節ID */
|
|
15
|
+
sectionId: string
|
|
16
|
+
/** 章節順序 */
|
|
17
|
+
orderSeq: number
|
|
18
|
+
/** 章節名稱 */
|
|
19
|
+
sectionName: string
|
|
20
|
+
/** 章節描述 */
|
|
21
|
+
sectionDesc: string
|
|
22
|
+
/** 章節狀態 */
|
|
23
|
+
latestStatus: GenAiSectionLatestStatus
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** 查詢章節下拉列表 - 響應 */
|
|
27
|
+
export interface GenAiGetSectionListResponse {
|
|
28
|
+
success: boolean
|
|
29
|
+
message: string
|
|
30
|
+
code: string
|
|
31
|
+
data: GenAiReportSectionItem[]
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** 更新章節順序 - 單項 */
|
|
35
|
+
export interface GenAiUpdateSectionOrderItem {
|
|
36
|
+
/** 報告ID */
|
|
37
|
+
instanceId: string
|
|
38
|
+
/** 章節ID */
|
|
39
|
+
sectionId: string
|
|
40
|
+
/** 調整後章節的新順序 */
|
|
41
|
+
orderSeq: number
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** 更新章節順序 - 請求參數 */
|
|
45
|
+
export interface GenAiUpdateSectionOrderParams {
|
|
46
|
+
sections: GenAiUpdateSectionOrderItem[]
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** 更新章節順序 - 響應 */
|
|
50
|
+
export interface GenAiUpdateSectionOrderResponse {
|
|
51
|
+
success: boolean
|
|
52
|
+
message: string
|
|
53
|
+
code: string
|
|
54
|
+
data: null
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Y/N 標誌位(後臺慣例,非 boolean) */
|
|
58
|
+
export type GenAiYnFlag = 'Y' | 'N'
|
|
59
|
+
|
|
60
|
+
/** 查詢版本列表 - 請求參數 */
|
|
61
|
+
export interface GenAiGetSectionVersionListParams {
|
|
62
|
+
/** 報告ID */
|
|
63
|
+
instanceId: string
|
|
64
|
+
/** 章節ID */
|
|
65
|
+
sectionId: string
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* 生成表格信息
|
|
70
|
+
* 調試:chartAsStream 帶 enableTable Y/N;舊接口無表格時可為 null
|
|
71
|
+
*/
|
|
72
|
+
export interface GenAiSectionTableInfo {
|
|
73
|
+
/** Y=勾選生成表格 / N=未勾選 */
|
|
74
|
+
enableTable?: GenAiYnFlag
|
|
75
|
+
/** 表格標題 */
|
|
76
|
+
tableTitle: string
|
|
77
|
+
/** 列標籤 */
|
|
78
|
+
columnLabel: string
|
|
79
|
+
/** 欄標籤 */
|
|
80
|
+
barLabel: string
|
|
81
|
+
/** 內容 */
|
|
82
|
+
content: string
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* 引用資訊源圖表信息
|
|
87
|
+
* 調試:chartAsStream 帶 enableChart Y/N;舊接口無圖表時可為 null
|
|
88
|
+
*/
|
|
89
|
+
export interface GenAiSectionChartInfo {
|
|
90
|
+
/** Y=勾選引用圖表 / N=未勾選 */
|
|
91
|
+
enableChart?: GenAiYnFlag
|
|
92
|
+
/** 圖表描述 */
|
|
93
|
+
chartDesc: string
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* 正文引用 tip 數據(與 chartAsStream Type:REF 同形;字段名兼容後端 chunkld 等拼寫)
|
|
98
|
+
*/
|
|
99
|
+
export interface ChartStreamRefRef {
|
|
100
|
+
chunkId?: string
|
|
101
|
+
chunkld?: string
|
|
102
|
+
filePath?: string
|
|
103
|
+
filePreviewUrl?: string
|
|
104
|
+
index?: number
|
|
105
|
+
sourceName?: string
|
|
106
|
+
sourceText?: string
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* 章節版本項(getSectionVersionList.data[])
|
|
111
|
+
*
|
|
112
|
+
* 調試注意:
|
|
113
|
+
* 1. versionNo:章節第幾個版本;「保存」「存為草稿」須原值傳回後臺
|
|
114
|
+
* 2. draftFlag / promptByGen / backupFlag / finalizedFlag / hasOldAiContent:均為 "Y"|"N" 字符串
|
|
115
|
+
* 3. hasOldAiContent:後臺邏輯標識;「保存」「存為草稿」須原值傳回後臺
|
|
116
|
+
* 4. tableInfo / chartInfo:沒有時為 null
|
|
117
|
+
* 5. seq / promptDetailExt:文檔標註可忽略
|
|
118
|
+
*/
|
|
119
|
+
export interface GenAiSectionVersionItem {
|
|
120
|
+
/** 忽略 */
|
|
121
|
+
seq: number
|
|
122
|
+
/** 版本名稱(如 V2) */
|
|
123
|
+
objectName: string
|
|
124
|
+
/** 版本名稱更新人信息 */
|
|
125
|
+
updateUserId: string
|
|
126
|
+
/** 版本名稱更新人信息 */
|
|
127
|
+
updateUserName: string
|
|
128
|
+
/** 版本名稱更新人信息 */
|
|
129
|
+
updateUserUnitSeq: string
|
|
130
|
+
/** 版本更新時間 */
|
|
131
|
+
updateDatetime: string
|
|
132
|
+
/** 報告ID */
|
|
133
|
+
instanceId: string
|
|
134
|
+
/** 章節ID */
|
|
135
|
+
sectionId: string
|
|
136
|
+
/** 版本ID */
|
|
137
|
+
versionId: string
|
|
138
|
+
/**
|
|
139
|
+
* 版本號(即:章節的第幾個版本)
|
|
140
|
+
* 調試:「保存」和「存為草稿」時,需原值傳回後臺
|
|
141
|
+
*/
|
|
142
|
+
versionNo: number
|
|
143
|
+
/** 是否草稿("Y" 是草稿,否則不是) */
|
|
144
|
+
draftFlag: GenAiYnFlag
|
|
145
|
+
/** prompt 內容 */
|
|
146
|
+
promptDetail: string
|
|
147
|
+
/** prompt 是否通過 AI 生成("Y" 是,否則不是) */
|
|
148
|
+
promptByGen: GenAiYnFlag
|
|
149
|
+
/** 字數限制 */
|
|
150
|
+
contentLengthLimit: number
|
|
151
|
+
/** 章節正文 */
|
|
152
|
+
contentText: string
|
|
153
|
+
/**
|
|
154
|
+
* 引用片段(與 chartAsStream Type:REF 同形;字段名 refList)
|
|
155
|
+
* 靜態預覽時用 chunkId 匹配正文 [ref:uuid] → tip
|
|
156
|
+
*/
|
|
157
|
+
refList?: ChartStreamRefRef | ChartStreamRefRef[] | string | null
|
|
158
|
+
/** @deprecated 請用 refList */
|
|
159
|
+
Ref?: ChartStreamRefRef | ChartStreamRefRef[] | string | null
|
|
160
|
+
ref?: ChartStreamRefRef | ChartStreamRefRef[] | string | null
|
|
161
|
+
refs?: ChartStreamRefRef | ChartStreamRefRef[] | string | null
|
|
162
|
+
/** 用到的文件 ID 列表 */
|
|
163
|
+
fileIndexIdList: string[]
|
|
164
|
+
/** 版本創建人信息 */
|
|
165
|
+
createdUserId: string
|
|
166
|
+
/** 版本創建人信息 */
|
|
167
|
+
createdUserName: string
|
|
168
|
+
/** 版本創建人信息 */
|
|
169
|
+
createdUserUnitSeq: string
|
|
170
|
+
/** 版本創建時間 */
|
|
171
|
+
createdDatetime: string
|
|
172
|
+
/** 是否備份版本("Y" 是,否則不是) */
|
|
173
|
+
backupFlag: GenAiYnFlag
|
|
174
|
+
/** 忽略 */
|
|
175
|
+
promptDetailExt: string
|
|
176
|
+
/** 生成表格信息(如果沒有的話,對象值為 null) */
|
|
177
|
+
tableInfo: GenAiSectionTableInfo | null
|
|
178
|
+
/** 引用資訊源圖表信息(如果沒有的話,對象值為 null) */
|
|
179
|
+
chartInfo: GenAiSectionChartInfo | null
|
|
180
|
+
/** 是否定稿版本("Y" 是,否則不是) */
|
|
181
|
+
finalizedFlag: GenAiYnFlag
|
|
182
|
+
/**
|
|
183
|
+
* 是否有章節正文("Y" 是,否則不是)
|
|
184
|
+
* 調試:後臺邏輯標識字段;「保存」和「存為草稿」時,需原值傳回後臺
|
|
185
|
+
*/
|
|
186
|
+
hasOldAiContent: GenAiYnFlag
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** 查詢版本列表 - 響應 */
|
|
190
|
+
export interface GenAiGetSectionVersionListResponse {
|
|
191
|
+
success: boolean
|
|
192
|
+
message: string
|
|
193
|
+
code: string
|
|
194
|
+
data: GenAiSectionVersionItem[]
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* 更新版本名稱 - 請求參數
|
|
199
|
+
* 調試:章節歷史重命名確認時調用
|
|
200
|
+
*/
|
|
201
|
+
export interface GenAiUpdateSectionVersionNameParams {
|
|
202
|
+
/** 類型ID */
|
|
203
|
+
categoryId: number
|
|
204
|
+
/** 要更新的版本 ID */
|
|
205
|
+
versionId: string
|
|
206
|
+
/** 更新後的版本名稱 */
|
|
207
|
+
objectName: string
|
|
208
|
+
/** 誰更新的 */
|
|
209
|
+
updateUserId: string
|
|
210
|
+
/** 誰更新的 */
|
|
211
|
+
updateUserName: string
|
|
212
|
+
/** 誰更新的 */
|
|
213
|
+
updateUserUnitSeq: string
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/** 更新版本名稱 - 響應 */
|
|
217
|
+
export interface GenAiUpdateSectionVersionNameResponse {
|
|
218
|
+
success: boolean
|
|
219
|
+
message: string
|
|
220
|
+
code: string
|
|
221
|
+
data: null
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* 更新章節狀態 - 操作標識
|
|
226
|
+
* 調試:傳 "EDIT" 表示將章節狀態更新為 EDITING(點「編輯」時調用)
|
|
227
|
+
*/
|
|
228
|
+
export type GenAiChangeSectionStatusAction = 'EDIT'
|
|
229
|
+
|
|
230
|
+
/** 更新章節狀態 - 請求參數(點編輯時調用) */
|
|
231
|
+
export interface GenAiChangeSectionStatusParams {
|
|
232
|
+
/** 類型ID */
|
|
233
|
+
categoryId: number
|
|
234
|
+
/** 要更新的章節的 ID */
|
|
235
|
+
sectionId: string
|
|
236
|
+
/**
|
|
237
|
+
* 操作標識
|
|
238
|
+
* 調試:"EDIT" 表示將狀態更新為 EDITING
|
|
239
|
+
*/
|
|
240
|
+
action: GenAiChangeSectionStatusAction
|
|
241
|
+
/** 誰更新的 */
|
|
242
|
+
updateUserId: string
|
|
243
|
+
/** 誰更新的 */
|
|
244
|
+
updateUserName: string
|
|
245
|
+
/** 誰更新的 */
|
|
246
|
+
updateUserUnitSeq: string
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/** 更新章節狀態 - 響應 */
|
|
250
|
+
export interface GenAiChangeSectionStatusResponse {
|
|
251
|
+
success: boolean
|
|
252
|
+
message: string
|
|
253
|
+
code: string
|
|
254
|
+
data: null
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* 版本[保存]/[存為草稿] - 請求參數
|
|
259
|
+
*
|
|
260
|
+
* 調試注意:
|
|
261
|
+
* 1. instanceId / sectionId / versionId / versionNo / hasOldAiContent:
|
|
262
|
+
* 一律用 getSectionVersionList 返回的原值,勿前端自造
|
|
263
|
+
* 2. draftFlag:"N"=保存,"Y"=存為草稿
|
|
264
|
+
* 3. contentText:存草稿時可為空;後臺存草稿時不存該字段
|
|
265
|
+
* 4. promptDetail / promptByGen / contentLengthLimit / contentText /
|
|
266
|
+
* fileIndexIdList / tableInfo / chartInfo:用戶更新後的值
|
|
267
|
+
*/
|
|
268
|
+
export interface GenAiSaveSectionVersionParams {
|
|
269
|
+
/** 類型ID */
|
|
270
|
+
categoryId: number
|
|
271
|
+
/** 報告ID(getSectionVersionList 原值) */
|
|
272
|
+
instanceId: string
|
|
273
|
+
/** 章節ID(getSectionVersionList 原值) */
|
|
274
|
+
sectionId: string
|
|
275
|
+
/** 版本ID(getSectionVersionList 原值) */
|
|
276
|
+
versionId: string
|
|
277
|
+
/**
|
|
278
|
+
* 版本號(即:章節的第幾個版本)
|
|
279
|
+
* 調試:getSectionVersionList 原值
|
|
280
|
+
*/
|
|
281
|
+
versionNo: number
|
|
282
|
+
/**
|
|
283
|
+
* 是否草稿
|
|
284
|
+
* 調試:"N"=保存,"Y"=存為草稿
|
|
285
|
+
*/
|
|
286
|
+
draftFlag: GenAiYnFlag
|
|
287
|
+
/** prompt 內容(用戶更新後的值) */
|
|
288
|
+
promptDetail: string
|
|
289
|
+
/** prompt 是否通過 AI 生成(用戶更新後的值) */
|
|
290
|
+
promptByGen: GenAiYnFlag
|
|
291
|
+
/** 字數限制(用戶更新後的值) */
|
|
292
|
+
contentLengthLimit: number
|
|
293
|
+
/**
|
|
294
|
+
* 章節正文(用戶更新後的值)
|
|
295
|
+
* 調試:存草稿時可為空;後臺存草稿時不存該字段
|
|
296
|
+
*/
|
|
297
|
+
contentText: string
|
|
298
|
+
/** 用到的文件 ID 列表(用戶更新後的值) */
|
|
299
|
+
fileIndexIdList: string[]
|
|
300
|
+
/** 誰更新的 */
|
|
301
|
+
createdUserId: string
|
|
302
|
+
/** 誰更新的 */
|
|
303
|
+
createdUserName: string
|
|
304
|
+
/** 誰更新的 */
|
|
305
|
+
createdUserUnitSeq: string
|
|
306
|
+
/** 生成表格信息(用戶更新後的值;沒有可為 null) */
|
|
307
|
+
tableInfo: GenAiSectionTableInfo | null
|
|
308
|
+
/** 引用資訊源圖表信息(用戶更新後的值;沒有可為 null) */
|
|
309
|
+
chartInfo: GenAiSectionChartInfo | null
|
|
310
|
+
/**
|
|
311
|
+
* 是否有章節正文("Y" 是,否則不是)
|
|
312
|
+
* 調試:getSectionVersionList 原值,須原值傳回後臺
|
|
313
|
+
*/
|
|
314
|
+
hasOldAiContent: GenAiYnFlag
|
|
315
|
+
auditEventId?: string
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/** 版本[保存]/[存為草稿] - 響應 */
|
|
319
|
+
export interface GenAiSaveSectionVersionResponse {
|
|
320
|
+
success: boolean
|
|
321
|
+
message: string
|
|
322
|
+
code: string
|
|
323
|
+
data: null
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* 刪除版本及草稿 - 請求參數
|
|
328
|
+
* 調試:刪除指定 versionId;需帶上操作人信息供後臺審計
|
|
329
|
+
*/
|
|
330
|
+
export interface GenAiDeleteSectionVersionParams {
|
|
331
|
+
/** 要刪除的版本 ID */
|
|
332
|
+
versionId: string
|
|
333
|
+
/** 誰刪除的 */
|
|
334
|
+
updateUserId: string
|
|
335
|
+
/** 誰刪除的 */
|
|
336
|
+
updateUserName: string
|
|
337
|
+
/** 誰刪除的 */
|
|
338
|
+
updateUserUnitSeq: string
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/** 刪除版本及草稿 - 響應 */
|
|
342
|
+
export interface GenAiDeleteSectionVersionResponse {
|
|
343
|
+
success: boolean
|
|
344
|
+
message: string
|
|
345
|
+
code: string
|
|
346
|
+
data: null
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* 生成章節內容 - 請求參數
|
|
351
|
+
* 調試:點「生成章節內容」;入參 = Prompt 面板全部 input + instanceId
|
|
352
|
+
*/
|
|
353
|
+
export interface GenAiGenerateSectionContentParams {
|
|
354
|
+
instanceId: string
|
|
355
|
+
prompt: string
|
|
356
|
+
enableBodyContent: boolean
|
|
357
|
+
bodyWordLimit: number
|
|
358
|
+
enableTable: boolean
|
|
359
|
+
tableTitle: string
|
|
360
|
+
tableRowLabels: string
|
|
361
|
+
tableColumnLabels: string
|
|
362
|
+
tableContent: string
|
|
363
|
+
enableSourceChart: boolean
|
|
364
|
+
chartDescription: string
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* 生成章節內容 - data
|
|
369
|
+
* 與 AdjustInstance 同形:正文取 instanceContents[].sectionContent
|
|
370
|
+
*/
|
|
371
|
+
export interface GenAiGenerateSectionContentData {
|
|
372
|
+
instanceContents: GenAiAdjustInstanceContent[]
|
|
373
|
+
instanceSections: GenAiAdjustInstanceSection[]
|
|
374
|
+
instanceFileList: GenAiAdjustInstanceFileItem[]
|
|
375
|
+
existsInstanceVersionNo?: string | null
|
|
376
|
+
/** 兼容舊字段 */
|
|
377
|
+
sectionContent?: string
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/** PromptType:INSTANCE_PROMPT_DETAIL | COHERENCE_CHECK_PROMPT | AI_PROMPT */
|
|
381
|
+
export type GenAiPromptType =
|
|
382
|
+
| 'INSTANCE_PROMPT_DETAIL'
|
|
383
|
+
| 'COHERENCE_CHECK_PROMPT'
|
|
384
|
+
| 'AI_PROMPT'
|
|
385
|
+
|
|
386
|
+
/** @deprecated 使用 GenAiPromptType */
|
|
387
|
+
export type GenAiChartAsStreamPromptType = GenAiPromptType
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* 生成章節 / 報告流式 SSE POST /api/v1/ai/chartAsStream
|
|
391
|
+
* 入參對齊 ChartAsStreamDTO;event:message + data:片段;data:[DONE] 結束
|
|
392
|
+
*/
|
|
393
|
+
export interface GenAiChartAsStreamParams {
|
|
394
|
+
modelName: string
|
|
395
|
+
promptDetail: string
|
|
396
|
+
promptType: GenAiPromptType
|
|
397
|
+
contentLengthLimit: number | null
|
|
398
|
+
tableInfo: GenAiSectionTableInfo | null
|
|
399
|
+
chartInfo: GenAiSectionChartInfo | null
|
|
400
|
+
/** 資訊源已勾選檔案 UUID 列表(全選 / 全不選 / 部分勾選) */
|
|
401
|
+
fileIdList: string[]
|
|
402
|
+
instanceId: string
|
|
403
|
+
categoryId: number
|
|
404
|
+
temperature: number | null
|
|
405
|
+
maxTokens: number | null
|
|
406
|
+
stream: boolean
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* POST /api/v1/Instance/Rpt/AdjustInstance 統一入參
|
|
411
|
+
* - 報告頁:僅 instanceId
|
|
412
|
+
* - 智能化生成 Prompt:promptType=AI_PROMPT + sectionTitle/sectionDesc
|
|
413
|
+
* - 報告連貫性檢查:promptType=COHERENCE_CHECK_PROMPT + versionIdList/instanceSections
|
|
414
|
+
* - 生成章節內容(舊):Prompt 面板字段
|
|
415
|
+
*/
|
|
416
|
+
export interface GenAiAdjustInstanceParams {
|
|
417
|
+
instanceId: string
|
|
418
|
+
promptType?: GenAiPromptType
|
|
419
|
+
/** AI_PROMPT:章節標題 */
|
|
420
|
+
sectionTitle?: string
|
|
421
|
+
/** AI_PROMPT:章節描述 */
|
|
422
|
+
sectionDesc?: string
|
|
423
|
+
/** COHERENCE_CHECK_PROMPT:已勾選章節版本 UUID(上→下) */
|
|
424
|
+
versionIdList?: string[]
|
|
425
|
+
/** COHERENCE_CHECK_PROMPT:已勾選章節 + 版本 */
|
|
426
|
+
instanceSections?: GenAiAdjustInstanceSection[]
|
|
427
|
+
prompt?: string
|
|
428
|
+
enableBodyContent?: boolean
|
|
429
|
+
bodyWordLimit?: number
|
|
430
|
+
enableTable?: boolean
|
|
431
|
+
tableTitle?: string
|
|
432
|
+
tableRowLabels?: string
|
|
433
|
+
tableColumnLabels?: string
|
|
434
|
+
tableContent?: string
|
|
435
|
+
enableSourceChart?: boolean
|
|
436
|
+
chartDescription?: string
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/** 智能化生成 Prompt - AdjustInstance(promptType=AI_PROMPT) */
|
|
440
|
+
export interface GenAiGenerateAiPromptParams {
|
|
441
|
+
instanceId: string
|
|
442
|
+
promptType: 'AI_PROMPT'
|
|
443
|
+
sectionTitle: string
|
|
444
|
+
sectionDesc: string
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/** 報告連貫性檢查 - AdjustInstance(promptType=COHERENCE_CHECK_PROMPT) */
|
|
448
|
+
export interface GenAiCoherenceCheckAdjustParams {
|
|
449
|
+
instanceId: string
|
|
450
|
+
promptType: 'COHERENCE_CHECK_PROMPT'
|
|
451
|
+
versionIdList: string[]
|
|
452
|
+
instanceSections: GenAiAdjustInstanceSection[]
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/** 生成報告返回的章節內容項 */
|
|
456
|
+
export interface GenAiAdjustInstanceContent {
|
|
457
|
+
/** 章節標題 */
|
|
458
|
+
sectionTitle: string
|
|
459
|
+
/** 章節正文(可含 markdown) */
|
|
460
|
+
sectionContent: string
|
|
461
|
+
/**
|
|
462
|
+
* 引用片段(與 chartAsStream Type:REF / getSectionVersionList.refList 同形)
|
|
463
|
+
* 無打字機預覽時用 chunkId 匹配 [ref:uuid] → tip
|
|
464
|
+
*/
|
|
465
|
+
refList?: ChartStreamRefRef | ChartStreamRefRef[] | string | null
|
|
466
|
+
/** @deprecated 請用 refList */
|
|
467
|
+
Ref?: ChartStreamRefRef | ChartStreamRefRef[] | string | null
|
|
468
|
+
ref?: ChartStreamRefRef | ChartStreamRefRef[] | string | null
|
|
469
|
+
refs?: ChartStreamRefRef | ChartStreamRefRef[] | string | null
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/** 章節版本選項(右側「章節版本」下拉) */
|
|
473
|
+
export interface GenAiAdjustInstanceVersionOption {
|
|
474
|
+
/** 下拉展示文本,如 V1 / V3 */
|
|
475
|
+
text: string
|
|
476
|
+
/** 版本唯一標識 UUID(select 的 value) */
|
|
477
|
+
value: string
|
|
478
|
+
/**
|
|
479
|
+
* 是否選中:
|
|
480
|
+
* - 用於章節勾選推斷(無 section.selected 時)
|
|
481
|
+
* - 同時作為版本下拉默認項
|
|
482
|
+
*/
|
|
483
|
+
selected: boolean | GenAiYnFlag
|
|
484
|
+
uploadUsrNameDisplay?: string
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/** 右側「生成報告設置」章節行 */
|
|
488
|
+
export interface GenAiAdjustInstanceSection {
|
|
489
|
+
/** 右側面板展示的章節名稱 */
|
|
490
|
+
sectionTitle: string
|
|
491
|
+
/**
|
|
492
|
+
* 章節是否勾選(若接口有返回則優先使用)
|
|
493
|
+
* 否則由 versions[].selected 推斷
|
|
494
|
+
*/
|
|
495
|
+
selected?: boolean | GenAiYnFlag
|
|
496
|
+
/** 生成人展示名(可選;無則界面為空) */
|
|
497
|
+
createUserName?: string
|
|
498
|
+
/** 該章節可選版本列表 */
|
|
499
|
+
versions: GenAiAdjustInstanceVersionOption[]
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/** 資訊源檔案項 */
|
|
503
|
+
export interface GenAiAdjustInstanceFileItem {
|
|
504
|
+
/** 檔案名稱 */
|
|
505
|
+
text: string
|
|
506
|
+
/** 文件唯一標識 UUID */
|
|
507
|
+
value: string
|
|
508
|
+
/** 是否勾選反顯;報告歷史環節只讀不可主動改 */
|
|
509
|
+
selected: boolean | GenAiYnFlag
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* 生成報告 AdjustInstance - data
|
|
514
|
+
* existsInstanceVersionNo(兼容 existsInstanceVersionNO):有值 = 已通過連貫性檢查;
|
|
515
|
+
* 同時可對照報告歷史 instanceVersionNo 選中 card
|
|
516
|
+
*/
|
|
517
|
+
export interface GenAiAdjustInstanceData {
|
|
518
|
+
/** 報告內容 = 章節標題 + 章節正文(中欄) */
|
|
519
|
+
instanceContents: GenAiAdjustInstanceContent[]
|
|
520
|
+
/** 右側章節列表 + 版本下拉 */
|
|
521
|
+
instanceSections: GenAiAdjustInstanceSection[]
|
|
522
|
+
/** 資訊源列表 */
|
|
523
|
+
instanceFileList: GenAiAdjustInstanceFileItem[]
|
|
524
|
+
/** 有值 = 已通過連貫性檢查;可與報告歷史 instanceVersionNo 對照選中 */
|
|
525
|
+
existsInstanceVersionNo?: string | null
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/** 生成報告 AdjustInstance - 響應 */
|
|
529
|
+
export interface GenAiAdjustInstanceResponse {
|
|
530
|
+
success: boolean
|
|
531
|
+
message: string
|
|
532
|
+
code: string
|
|
533
|
+
data: GenAiAdjustInstanceData
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* 報告歷史查詢 InstHistEnquiry - 請求參數
|
|
538
|
+
* 調試:報告頁「報告歷史」;參數僅 instanceId
|
|
539
|
+
*/
|
|
540
|
+
export interface GenAiInstHistEnquiryParams {
|
|
541
|
+
/** 報告 ID */
|
|
542
|
+
instanceId: string
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* 報告歷史項(data.instanceVersionVOList[])
|
|
547
|
+
* sectionIdList / sectionVersionIdList 為逗號分隔字符串
|
|
548
|
+
*/
|
|
549
|
+
export interface GenAiInstanceVersionVO {
|
|
550
|
+
instanceId: string
|
|
551
|
+
/** 納入的章節 ID,逗號分隔,如 "s1,s2" */
|
|
552
|
+
sectionIdList: string
|
|
553
|
+
/** 對應章節版本 UUID,逗號分隔 */
|
|
554
|
+
sectionVersionIdList: string
|
|
555
|
+
/** 報告版本號 / 展示名(接口若返回則用於歷史標題) */
|
|
556
|
+
instanceVersionNo?: string | number | null
|
|
557
|
+
objectName?: string | null
|
|
558
|
+
createdUserId?: string
|
|
559
|
+
createdUserName?: string
|
|
560
|
+
createdUserUnitSeq?: string
|
|
561
|
+
createdDatetime?: string
|
|
562
|
+
updateUserId?: string
|
|
563
|
+
updateUserName?: string
|
|
564
|
+
updateUserUnitSeq?: string
|
|
565
|
+
updateDatetime?: string
|
|
566
|
+
/** 若有獨立版本主鍵則作列表 key */
|
|
567
|
+
instanceVersionId?: string
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
/** 報告歷史查詢 - data */
|
|
571
|
+
export interface GenAiInstHistEnquiryData {
|
|
572
|
+
instanceVersionVOList: GenAiInstanceVersionVO[]
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
/** 報告歷史查詢 - 響應 */
|
|
576
|
+
export interface GenAiInstHistEnquiryResponse {
|
|
577
|
+
success: boolean
|
|
578
|
+
message: string
|
|
579
|
+
code: string
|
|
580
|
+
data: GenAiInstHistEnquiryData
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* 調整報告設置 AdjustInstanceSetting - 請求參數
|
|
585
|
+
* 調試:勾選章節 / 拖動排序後調用;全部不選不調用
|
|
586
|
+
* versionIdList = 已勾選章節當前版本 value(UUID),順序=列表上到下
|
|
587
|
+
*/
|
|
588
|
+
export interface GenAiAdjustInstanceSettingParams {
|
|
589
|
+
instanceId: string
|
|
590
|
+
versionIdList: string[]
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
/** 調整報告設置 - data(切換報告歷史 / 勾選章節後刷新設置欄 + 中欄 + 資訊源) */
|
|
594
|
+
export interface GenAiAdjustInstanceSettingData {
|
|
595
|
+
/** 資訊源列表(與 AdjustInstance.instanceFileList 同形) */
|
|
596
|
+
instanceFileList: GenAiAdjustInstanceFileItem[]
|
|
597
|
+
/** 有值 = 已通過連貫性檢查(兼容 existsInstanceVersionNO) */
|
|
598
|
+
existsInstanceVersionNo?: string | null
|
|
599
|
+
/** 中欄報告正文(與 AdjustInstance.instanceContents 同形;有則刷新 editor) */
|
|
600
|
+
instanceContents?: GenAiAdjustInstanceContent[]
|
|
601
|
+
/** 右側章節列表(與 AdjustInstance.instanceSections 同形;有則刷新生成報告設置) */
|
|
602
|
+
instanceSections?: GenAiAdjustInstanceSection[]
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
/** 調整報告設置 - 響應 */
|
|
606
|
+
export interface GenAiAdjustInstanceSettingResponse {
|
|
607
|
+
success: boolean
|
|
608
|
+
message: string
|
|
609
|
+
code: string
|
|
610
|
+
data: GenAiAdjustInstanceSettingData
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* 報告定稿 FinalInstance - 請求參數
|
|
615
|
+
* 調試:生成報告設置頁點「生成報告」後調用
|
|
616
|
+
* versionIdList = 已勾選章節當前版本 value(UUID),順序=列表上到下
|
|
617
|
+
*/
|
|
618
|
+
export interface GenAiFinalInstanceParams {
|
|
619
|
+
instanceId: string
|
|
620
|
+
versionIdList: string[]
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/** 報告定稿 - 響應(data 暫無固定結構) */
|
|
624
|
+
export interface GenAiFinalInstanceResponse {
|
|
625
|
+
success: boolean
|
|
626
|
+
message: string
|
|
627
|
+
code: string
|
|
628
|
+
data?: unknown
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
/** 繁簡轉換目標語言:CHS=簡體,CHT=繁體 */
|
|
632
|
+
export type GenAiSimTradTargetLang = 'CHS' | 'CHT'
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* 繁簡轉換 SimTradTransfer - 請求參數
|
|
636
|
+
* 調試:生成報告設置「語言」下拉切換繁/簡時調用
|
|
637
|
+
*/
|
|
638
|
+
export interface GenAiSimTradTransferParams {
|
|
639
|
+
/** CHS=簡體中文,CHT=繁體中文 */
|
|
640
|
+
targetLang: GenAiSimTradTargetLang
|
|
641
|
+
/** 當前報告章節標題+正文(與 AdjustInstance.instanceContents 同形) */
|
|
642
|
+
instanceContents: GenAiAdjustInstanceContent[]
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/** 繁簡轉換 - data */
|
|
646
|
+
export interface GenAiSimTradTransferData {
|
|
647
|
+
instanceContents: GenAiAdjustInstanceContent[]
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
/** 繁簡轉換 - 響應 */
|
|
651
|
+
export interface GenAiSimTradTransferResponse {
|
|
652
|
+
success: boolean
|
|
653
|
+
message: string
|
|
654
|
+
code: string
|
|
655
|
+
data: GenAiSimTradTransferData
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* 報告連貫性檢查 CoherenceCheck - 請求參數
|
|
660
|
+
* 調試:生成報告設置「報告連貫性檢查」
|
|
661
|
+
*/
|
|
662
|
+
export interface GenAiCoherenceCheckParams {
|
|
663
|
+
instanceId: string
|
|
664
|
+
/** 已勾選章節版本 UUID(上→下) */
|
|
665
|
+
versionIdList: string[]
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
/** 報告連貫性檢查 - data */
|
|
669
|
+
export interface GenAiCoherenceCheckData {
|
|
670
|
+
/** Y=已做過連貫性檢查;N=未定稿/未檢查完 */
|
|
671
|
+
beenFinalizedFlag: string
|
|
672
|
+
/** 連貫性檢查返回文本 */
|
|
673
|
+
coherenceCheckContentText: string | null
|
|
674
|
+
/** 章節及順序已有定稿時返回報告名稱,否則 null */
|
|
675
|
+
instanceName: string | null
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
/** 報告連貫性檢查 - 響應 */
|
|
679
|
+
export interface GenAiCoherenceCheckResponse {
|
|
680
|
+
success: boolean
|
|
681
|
+
message: string
|
|
682
|
+
code: string
|
|
683
|
+
data: GenAiCoherenceCheckData
|
|
684
|
+
}
|