aegon-lv97 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/gen-ai/build-report/chartStreamRefs.ts +227 -0
- package/gen-ai/build-report/coherence-check/index.vue +559 -0
- package/gen-ai/build-report/components/ReportChapterWorkspace.vue +4571 -0
- package/gen-ai/build-report/components/ReportConfigPanel.vue +727 -0
- package/gen-ai/build-report/components/ReportGenerateSettingsPanel.vue +2361 -0
- package/gen-ai/build-report/components/ReportGeneratingPanel.vue +1765 -0
- package/gen-ai/build-report/components/ReportPromptPanel.vue +625 -0
- package/gen-ai/build-report/components/ReportSourceFileSummary.vue +665 -0
- package/gen-ai/build-report/components/ReportSourcesPanel.vue +1327 -0
- package/gen-ai/build-report/components/ReportTemplateDetail.vue +191 -0
- package/gen-ai/build-report/components/ReportTemplateEditorFormPanel.vue +667 -0
- package/gen-ai/build-report/components/ReportTemplatePicker.vue +302 -0
- package/gen-ai/build-report/components/ReportWorkflowSidebar.vue +148 -0
- package/gen-ai/build-report/components/paramsSetting.vue +886 -0
- package/gen-ai/build-report/components/reportEdit.vue +2283 -0
- package/gen-ai/build-report/index.vue +856 -0
- package/gen-ai/build-report/report-domain.ts +1133 -0
- package/gen-ai/build-report/report-template-data.ts +295 -0
- package/gen-ai/build-report/useReportWorkflow.ts +1386 -0
- package/gen-ai/common/assets/NotoSans-SC.woff2 +0 -0
- package/gen-ai/common/assets/NotoSans-TC.woff2 +0 -0
- package/gen-ai/common/assets/NotoSans.woff2 +0 -0
- package/gen-ai/common/assets/fonts.css +278 -0
- package/gen-ai/common/assets/pagination.css +163 -0
- package/gen-ai/common/directives/btnLoading.ts +455 -0
- package/gen-ai/common/directives/debounce.ts +98 -0
- package/gen-ai/common/directives/index.ts +30 -0
- package/gen-ai/common/en.md +417 -0
- package/gen-ai/common/index.ts +36 -0
- package/gen-ai/common/types/component-expose.ts +9 -0
- package/gen-ai/common/utils/api-res-status.ts +7 -0
- package/gen-ai/common/utils/navigation.ts +59 -0
- package/gen-ai/common/utils/remote-request.ts +45 -0
- package/gen-ai/common/utils/scroll.ts +577 -0
- package/gen-ai/components/AIExport/docx-export.ts +950 -0
- package/gen-ai/components/AIExport/docxExport.ts +2566 -0
- package/gen-ai/components/AIExport/index.ts +52 -0
- package/gen-ai/components/AIExport/parseMarkdownHtml.ts +653 -0
- package/gen-ai/components/CapsuleScrollbar.vue +149 -0
- package/gen-ai/components/ChapterTitleScroll.vue +468 -0
- package/gen-ai/components/EntryHeroNavCards.vue +379 -0
- package/gen-ai/components/GenAiPagination.vue +52 -0
- package/gen-ai/components/ModelCard.vue +1114 -0
- package/gen-ai/components/Preview/FilePreviewPage.vue +949 -0
- package/gen-ai/components/Preview/PreviewCapsuleScroll.vue +205 -0
- package/gen-ai/components/Preview/PreviewOutlineTree.vue +148 -0
- package/gen-ai/components/Preview/index.ts +11 -0
- package/gen-ai/components/Preview/preview.ts +724 -0
- package/gen-ai/components/PromptField.vue +505 -0
- package/gen-ai/components/RecentReportsTable.vue +974 -0
- package/gen-ai/components/ReportCollapsibleSection.vue +172 -0
- package/gen-ai/components/ReportHistoryList.vue +637 -0
- package/gen-ai/components/ReportSectionConfirmPopover.vue +251 -0
- package/gen-ai/components/editor/ChapterTiptapEditor.vue +3718 -0
- package/gen-ai/components/editor/StructureBlockView.vue +441 -0
- package/gen-ai/components/editor/TiptapToolbar.vue +1036 -0
- package/gen-ai/components/editor/TypewriterDocEditor.vue +422 -0
- package/gen-ai/components/editor/_StructureOrgNode.vue +326 -0
- package/gen-ai/components/editor/index.ts +28 -0
- package/gen-ai/components/editor/parseMarkdownHtml.ts +754 -0
- package/gen-ai/components/editor/reviewCitationTip.ts +163 -0
- package/gen-ai/gen-entry/api/index.ts +32 -0
- package/gen-ai/gen-entry/index.vue +287 -0
- package/gen-ai/gen-entry/types/index.ts +4 -0
- package/gen-ai/i.mark +2 -0
- package/gen-ai/management-center/index.vue +1815 -0
- package/gen-ai/management-center/mockData.ts +248 -0
- package/gen-ai/management-center/types/index.ts +37 -0
- package/gen-ai/model-manager/TemplateEditorFormPanel.vue +661 -0
- package/gen-ai/model-manager/api/index.ts +32 -0
- package/gen-ai/model-manager/api/mockApi.ts +33 -0
- package/gen-ai/model-manager/index.vue +1583 -0
- package/gen-ai/model-manager/mockData.ts +177 -0
- package/gen-ai/model-manager/template-detail-shared.ts +154 -0
- package/gen-ai/model-manager/template-editor.vue +345 -0
- package/gen-ai/model-manager/types/index.ts +40 -0
- package/gen-ai/model-manager/utils.ts +25 -0
- package/package.json +12 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="org-tree-node" :class="{ 'is-root': isRoot, 'has-children': hasChildren }">
|
|
3
|
+
<div
|
|
4
|
+
class="org-tree-node__box"
|
|
5
|
+
:class="{
|
|
6
|
+
'is-root': isRoot,
|
|
7
|
+
'is-selected': selected,
|
|
8
|
+
'is-editing': editing,
|
|
9
|
+
}"
|
|
10
|
+
@click.stop="onBoxClick"
|
|
11
|
+
>
|
|
12
|
+
<span
|
|
13
|
+
ref="labelRef"
|
|
14
|
+
class="org-tree-node__label"
|
|
15
|
+
:contenteditable="canEdit ? 'true' : 'false'"
|
|
16
|
+
spellcheck="false"
|
|
17
|
+
@focus="editing = true"
|
|
18
|
+
@blur="onLabelBlur"
|
|
19
|
+
@keydown.enter.prevent="blurLabel"
|
|
20
|
+
@keydown.esc.prevent="cancelEdit"
|
|
21
|
+
@mousedown.stop
|
|
22
|
+
@click.stop="onLabelClick"
|
|
23
|
+
>{{ node.label }}</span
|
|
24
|
+
>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<!-- 連續豎幹:線不斷開,+ 疊在線上 -->
|
|
28
|
+
<div v-if="hasChildren || (selected && !readonly)" class="org-tree-node__trunk">
|
|
29
|
+
<button
|
|
30
|
+
v-if="selected && !readonly"
|
|
31
|
+
type="button"
|
|
32
|
+
class="org-tree-node__plus"
|
|
33
|
+
title="新增子公司"
|
|
34
|
+
@mousedown.prevent
|
|
35
|
+
@click.stop="emit('add', node.id)"
|
|
36
|
+
>
|
|
37
|
+
<Plus :size="12" :stroke-width="3" />
|
|
38
|
+
</button>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div v-if="hasChildren" class="org-tree-node__children">
|
|
42
|
+
<div v-for="child in node.children" :key="child.id" class="org-tree-node__branch">
|
|
43
|
+
<span class="org-tree-node__pct">{{ child.pct }}%</span>
|
|
44
|
+
<ReportStructureOrgNode
|
|
45
|
+
:node="child"
|
|
46
|
+
:selected-id="selectedId"
|
|
47
|
+
:readonly="readonly"
|
|
48
|
+
@select="emit('select', $event)"
|
|
49
|
+
@add="emit('add', $event)"
|
|
50
|
+
@rename="onChildRename"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
<script setup lang="ts">
|
|
58
|
+
import { Plus } from 'lucide-vue-next'
|
|
59
|
+
import { computed, nextTick, ref, watch } from 'vue'
|
|
60
|
+
|
|
61
|
+
export type StructureOrgNode = {
|
|
62
|
+
id: string
|
|
63
|
+
label: string
|
|
64
|
+
pct: number
|
|
65
|
+
children: StructureOrgNode[]
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const props = defineProps<{
|
|
69
|
+
node: StructureOrgNode
|
|
70
|
+
selectedId: string | null
|
|
71
|
+
readonly?: boolean
|
|
72
|
+
}>()
|
|
73
|
+
|
|
74
|
+
const emit = defineEmits<{
|
|
75
|
+
select: [id: string]
|
|
76
|
+
add: [id: string]
|
|
77
|
+
rename: [id: string, label: string]
|
|
78
|
+
}>()
|
|
79
|
+
|
|
80
|
+
const labelRef = ref<HTMLElement | null>(null)
|
|
81
|
+
const editing = ref(false)
|
|
82
|
+
|
|
83
|
+
const isRoot = computed(() => props.node.id === 'root')
|
|
84
|
+
const selected = computed(() => props.selectedId === props.node.id)
|
|
85
|
+
const hasChildren = computed(() => props.node.children.length > 0)
|
|
86
|
+
const canEdit = computed(() => !props.readonly && selected.value)
|
|
87
|
+
|
|
88
|
+
watch(selected, (isSelected) => {
|
|
89
|
+
if (!isSelected && editing.value) {
|
|
90
|
+
commitLabel()
|
|
91
|
+
}
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
function onBoxClick() {
|
|
95
|
+
emit('select', props.node.id)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function onLabelClick() {
|
|
99
|
+
emit('select', props.node.id)
|
|
100
|
+
if (props.readonly) return
|
|
101
|
+
nextTick(() => {
|
|
102
|
+
const el = labelRef.value
|
|
103
|
+
if (!el) return
|
|
104
|
+
el.focus()
|
|
105
|
+
const range = document.createRange()
|
|
106
|
+
range.selectNodeContents(el)
|
|
107
|
+
const sel = window.getSelection()
|
|
108
|
+
sel?.removeAllRanges()
|
|
109
|
+
sel?.addRange(range)
|
|
110
|
+
})
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function blurLabel() {
|
|
114
|
+
labelRef.value?.blur()
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function commitLabel() {
|
|
118
|
+
editing.value = false
|
|
119
|
+
const text = (labelRef.value?.innerText ?? '').trim()
|
|
120
|
+
if (labelRef.value) labelRef.value.innerText = text
|
|
121
|
+
if (text !== props.node.label) {
|
|
122
|
+
emit('rename', props.node.id, text)
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function cancelEdit() {
|
|
127
|
+
editing.value = false
|
|
128
|
+
if (labelRef.value) labelRef.value.innerText = props.node.label
|
|
129
|
+
labelRef.value?.blur()
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function onLabelBlur() {
|
|
133
|
+
commitLabel()
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function onChildRename(id: string, label: string) {
|
|
137
|
+
emit('rename', id, label)
|
|
138
|
+
}
|
|
139
|
+
</script>
|
|
140
|
+
|
|
141
|
+
<script lang="ts">
|
|
142
|
+
export default {
|
|
143
|
+
name: 'ReportStructureOrgNode',
|
|
144
|
+
}
|
|
145
|
+
</script>
|
|
146
|
+
|
|
147
|
+
<style scoped>
|
|
148
|
+
.org-tree-node {
|
|
149
|
+
position: relative;
|
|
150
|
+
display: flex;
|
|
151
|
+
flex-direction: column;
|
|
152
|
+
align-items: center;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.org-tree-node__box {
|
|
156
|
+
position: relative;
|
|
157
|
+
z-index: 2;
|
|
158
|
+
display: flex;
|
|
159
|
+
align-items: center;
|
|
160
|
+
justify-content: center;
|
|
161
|
+
box-sizing: border-box;
|
|
162
|
+
min-width: 88px;
|
|
163
|
+
min-height: 36px;
|
|
164
|
+
padding: 0 14px;
|
|
165
|
+
border: 1px solid transparent;
|
|
166
|
+
border-radius: 2px;
|
|
167
|
+
background: #f4f4f4;
|
|
168
|
+
color: #303133;
|
|
169
|
+
cursor: pointer;
|
|
170
|
+
outline: none;
|
|
171
|
+
box-shadow: none;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.org-tree-node__box.is-root {
|
|
175
|
+
background: #c53355;
|
|
176
|
+
color: #fff;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.org-tree-node__box:focus,
|
|
180
|
+
.org-tree-node__box:focus-visible,
|
|
181
|
+
.org-tree-node__label:focus,
|
|
182
|
+
.org-tree-node__label:focus-visible {
|
|
183
|
+
outline: none !important;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* 選中:紅色邊框(覆蓋瀏覽器/編輯器藍色 focus) */
|
|
187
|
+
.org-tree-node__box.is-selected {
|
|
188
|
+
border-color: #c53355 !important;
|
|
189
|
+
outline: none !important;
|
|
190
|
+
box-shadow: none !important;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.org-tree-node__box.is-root.is-selected {
|
|
194
|
+
border-color: #c53355 !important;
|
|
195
|
+
box-shadow: 0 0 0 2px #c53355 !important;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.org-tree-node__label {
|
|
199
|
+
display: inline-block;
|
|
200
|
+
min-width: 2em;
|
|
201
|
+
max-width: 160px;
|
|
202
|
+
outline: none;
|
|
203
|
+
font-family: var(--gen-ai-font-family, 'Noto Sans', 'Noto Sans TC', sans-serif);
|
|
204
|
+
font-size: 13px;
|
|
205
|
+
font-weight: 500;
|
|
206
|
+
line-height: 1.2;
|
|
207
|
+
white-space: nowrap;
|
|
208
|
+
overflow: hidden;
|
|
209
|
+
text-overflow: ellipsis;
|
|
210
|
+
cursor: text;
|
|
211
|
+
color: inherit;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.org-tree-node__label[contenteditable='false'] {
|
|
215
|
+
cursor: pointer;
|
|
216
|
+
user-select: none;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.org-tree-node__label[contenteditable='true'] {
|
|
220
|
+
cursor: text;
|
|
221
|
+
user-select: text;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* 連續豎幹:整段實線,+ 居中疊加,線不中斷 */
|
|
225
|
+
.org-tree-node__trunk {
|
|
226
|
+
position: relative;
|
|
227
|
+
z-index: 1;
|
|
228
|
+
width: 1px;
|
|
229
|
+
height: 36px;
|
|
230
|
+
flex-shrink: 0;
|
|
231
|
+
background: #d1d5db;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.org-tree-node__plus {
|
|
235
|
+
position: absolute;
|
|
236
|
+
top: 50%;
|
|
237
|
+
left: 50%;
|
|
238
|
+
z-index: 2;
|
|
239
|
+
display: flex;
|
|
240
|
+
align-items: center;
|
|
241
|
+
justify-content: center;
|
|
242
|
+
width: 18px;
|
|
243
|
+
height: 18px;
|
|
244
|
+
padding: 0;
|
|
245
|
+
border: none;
|
|
246
|
+
border-radius: 50%;
|
|
247
|
+
background: #c53355;
|
|
248
|
+
color: #fff;
|
|
249
|
+
transform: translate(-50%, -50%);
|
|
250
|
+
cursor: pointer;
|
|
251
|
+
/* 不使用白圈打斷豎線;線從圓形兩側連續可見 */
|
|
252
|
+
box-shadow: none;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.org-tree-node__plus:hover {
|
|
256
|
+
background: #a82b48;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.org-tree-node__children {
|
|
260
|
+
position: relative;
|
|
261
|
+
display: flex;
|
|
262
|
+
justify-content: center;
|
|
263
|
+
align-items: flex-start;
|
|
264
|
+
gap: 28px;
|
|
265
|
+
width: max-content;
|
|
266
|
+
margin-top: 0;
|
|
267
|
+
padding-top: 0;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.org-tree-node__branch {
|
|
271
|
+
position: relative;
|
|
272
|
+
display: flex;
|
|
273
|
+
flex-direction: column;
|
|
274
|
+
align-items: center;
|
|
275
|
+
padding-top: 20px;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/*
|
|
279
|
+
* 水平連線:向兩側延伸半個 gap(14px) 以跨過 flex gap,避免斷開
|
|
280
|
+
*/
|
|
281
|
+
.org-tree-node__branch::before {
|
|
282
|
+
content: '';
|
|
283
|
+
position: absolute;
|
|
284
|
+
top: 0;
|
|
285
|
+
left: -14px;
|
|
286
|
+
right: -14px;
|
|
287
|
+
height: 1px;
|
|
288
|
+
background: #d1d5db;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.org-tree-node__branch:first-child::before {
|
|
292
|
+
left: 50%;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.org-tree-node__branch:last-child::before {
|
|
296
|
+
right: 50%;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.org-tree-node__branch:only-child::before {
|
|
300
|
+
display: none;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/* 落到百分比/節點的豎線(與水平線相接,不斷開) */
|
|
304
|
+
.org-tree-node__branch::after {
|
|
305
|
+
content: '';
|
|
306
|
+
position: absolute;
|
|
307
|
+
top: 0;
|
|
308
|
+
left: 50%;
|
|
309
|
+
width: 1px;
|
|
310
|
+
height: 20px;
|
|
311
|
+
background: #d1d5db;
|
|
312
|
+
transform: translateX(-50%);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.org-tree-node__pct {
|
|
316
|
+
position: relative;
|
|
317
|
+
z-index: 1;
|
|
318
|
+
margin-bottom: 6px;
|
|
319
|
+
padding: 0 3px;
|
|
320
|
+
color: #9ca3af;
|
|
321
|
+
font-family: var(--gen-ai-font-family, 'Noto Sans', 'Noto Sans TC', sans-serif);
|
|
322
|
+
font-size: 12px;
|
|
323
|
+
line-height: 1;
|
|
324
|
+
background: #fff;
|
|
325
|
+
}
|
|
326
|
+
</style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GEN-AI TipTap 編輯器(高度集成)
|
|
3
|
+
*
|
|
4
|
+
* - ChapterTiptapEditor.vue — 章節富文本(業務入口;含 //0918 tip popup)
|
|
5
|
+
* - TypewriterDocEditor.vue — 多章打字機(//0918:disableTypewriter true→false 須 reset typedKeys)
|
|
6
|
+
* - reviewCitationTip.ts — //0918 tip/REF(未命中删除 [ref:uuid],只显示命中)
|
|
7
|
+
* - parseMarkdownHtml.ts — Markdown→HTML(旧 tip 三层 + REF)
|
|
8
|
+
* - TiptapToolbar.vue — 格式 + 插入工具欄(僅編輯器內部,非 tip popup)
|
|
9
|
+
* - StructureBlockView.vue — 結構區塊 NodeView
|
|
10
|
+
*
|
|
11
|
+
* 迁移 tip + 打字机整组:
|
|
12
|
+
* reviewCitationTip.ts + chartStreamRefs.ts + ChapterTiptapEditor + TypewriterDocEditor + parseMarkdownHtml
|
|
13
|
+
*/
|
|
14
|
+
export { default as ReportChapterTiptapEditor } from './ChapterTiptapEditor.vue'
|
|
15
|
+
export { default as ReportTypewriterDocEditor } from './TypewriterDocEditor.vue'
|
|
16
|
+
export type { EditorReviewMarker } from './ChapterTiptapEditor.vue'
|
|
17
|
+
export { parseMarkdownToHtml } from './parseMarkdownHtml'
|
|
18
|
+
//0918 tip / REF 兼容层导出(迁移时一并带走)
|
|
19
|
+
export {
|
|
20
|
+
REF_MARKER_RE,
|
|
21
|
+
//0918-1
|
|
22
|
+
REF_ANY_MARKER_RE,
|
|
23
|
+
//0918-1
|
|
24
|
+
resolveRefMarker,
|
|
25
|
+
canOpenCitationTip,
|
|
26
|
+
readCitationDataset,
|
|
27
|
+
} from './reviewCitationTip'
|
|
28
|
+
//0918
|