af-mobile-client-vue3 1.4.68 → 1.4.69
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/__dummy__ +9 -9
- package/build/vite/optimize.ts +36 -36
- package/package.json +120 -121
- package/public/favicon.svg +4 -4
- package/scripts/verifyCommit.js +19 -19
- package/src/components/common/MateChat/components/MateChatContent.vue +274 -274
- package/src/components/common/MateChat/components/MateChatHeader.vue +337 -337
- package/src/components/common/MateChat/index.vue +444 -444
- package/src/components/common/MateChat/types.ts +247 -247
- package/src/components/common/otherCharge/ChargePrintSelectorAndRemarks.vue +137 -137
- package/src/components/common/otherCharge/CodePayment.vue +357 -357
- package/src/components/common/otherCharge/FileUploader.vue +602 -602
- package/src/components/common/otherCharge/GridFileUploader.vue +846 -846
- package/src/components/common/otherCharge/PaymentMethodSelector.vue +202 -202
- package/src/components/common/otherCharge/PaymentMethodSelectorCard.vue +45 -45
- package/src/components/common/otherCharge/ReceiptModal.vue +273 -273
- package/src/components/common/otherCharge/index.ts +43 -43
- package/src/components/core/ImageUploader/index.vue +9 -2
- package/src/components/data/OtherCharge/OtherChargeItemModal.vue +547 -547
- package/src/components/data/UserDetail/types.ts +1 -1
- package/src/components/data/XReportGrid/XAddReport/index.ts +1 -1
- package/src/components/data/XReportGrid/XReportDrawer/index.ts +1 -1
- package/src/components/data/XTag/index.vue +10 -10
- package/src/components/layout/TabBarLayout/index.vue +40 -40
- package/src/hooks/useCommon.ts +9 -9
- package/src/plugins/AppData.ts +38 -38
- package/src/router/invoiceRoutes.ts +33 -33
- package/src/services/api/common.ts +109 -109
- package/src/services/api/manage.ts +8 -8
- package/src/services/api/search.ts +16 -16
- package/src/services/restTools.ts +56 -56
- package/src/utils/authority-utils.ts +84 -84
- package/src/utils/crypto.ts +39 -39
- package/src/utils/queryFormDefaultRangePicker.ts +57 -57
- package/src/utils/runEvalFunction.ts +13 -13
- package/src/views/component/EvaluateRecordView/index.vue +40 -40
- package/src/views/component/MateChat/MateChatView.vue +10 -10
- package/src/views/component/XCellDetailView/index.vue +217 -217
- package/src/views/component/XCellListView/index.vue +138 -107
- package/src/views/component/XFormGroupView/index.vue +82 -78
- package/src/views/component/XFormView/index.vue +46 -41
- package/src/views/component/XReportFormIframeView/index.vue +47 -47
- package/src/views/component/XReportFormView/index.vue +13 -13
- package/src/views/component/XSignatureView/index.vue +50 -50
- package/src/views/component/notice.vue +46 -46
- package/src/views/component/topNav.vue +36 -36
- package/src/views/invoiceShow/index.vue +61 -61
- package/src/views/user/login/index.vue +22 -22
- package/pnpm-lock.yaml +0 -11070
|
@@ -1,247 +1,247 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MateChat 提示项接口
|
|
3
|
-
*/
|
|
4
|
-
export interface MateChatPromptItem {
|
|
5
|
-
value: string
|
|
6
|
-
label: string
|
|
7
|
-
iconConfig?: {
|
|
8
|
-
name: string
|
|
9
|
-
color?: string
|
|
10
|
-
}
|
|
11
|
-
desc?: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* MateChat 配置接口
|
|
16
|
-
*/
|
|
17
|
-
export interface MateChatConfig {
|
|
18
|
-
/**
|
|
19
|
-
* 可选密码,如果存在则需要密码验证
|
|
20
|
-
*/
|
|
21
|
-
password?: string
|
|
22
|
-
/**
|
|
23
|
-
* FastGPT 应用 ID
|
|
24
|
-
*/
|
|
25
|
-
appId: string
|
|
26
|
-
/**
|
|
27
|
-
* FastGPT API Key
|
|
28
|
-
*/
|
|
29
|
-
appKey: string
|
|
30
|
-
/**
|
|
31
|
-
* 介绍文案
|
|
32
|
-
*/
|
|
33
|
-
description: string[]
|
|
34
|
-
/**
|
|
35
|
-
* 首屏推荐问题列表
|
|
36
|
-
*/
|
|
37
|
-
introPrompt: MateChatPromptItem[]
|
|
38
|
-
/**
|
|
39
|
-
* 底部快捷问题列表
|
|
40
|
-
*/
|
|
41
|
-
simplePrompt: MateChatPromptItem[]
|
|
42
|
-
/**
|
|
43
|
-
* 客服名称
|
|
44
|
-
*/
|
|
45
|
-
serviceName: string
|
|
46
|
-
/**
|
|
47
|
-
* 是否使用流式对话
|
|
48
|
-
*/
|
|
49
|
-
useStream: boolean
|
|
50
|
-
/**
|
|
51
|
-
* 背景渐变颜色(CSS linear-gradient 字符串)
|
|
52
|
-
* 如果不提供,使用默认蓝白渐变
|
|
53
|
-
*/
|
|
54
|
-
backgroundGradient?: string
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* 配置中心返回的多个配置对象
|
|
59
|
-
* key 为配置名称,value 为 MateChatConfig
|
|
60
|
-
*/
|
|
61
|
-
export type MateChatConfigs = Record<string, MateChatConfig>
|
|
62
|
-
|
|
63
|
-
// ==================== API 相关类型定义 ====================
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* 聊天消息接口
|
|
67
|
-
*/
|
|
68
|
-
export interface ChatMessage {
|
|
69
|
-
role: 'user' | 'assistant' | 'system'
|
|
70
|
-
content: string
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* 聊天请求参数接口
|
|
75
|
-
*/
|
|
76
|
-
export interface ChatCompletionsRequest {
|
|
77
|
-
chatId: string
|
|
78
|
-
stream: boolean
|
|
79
|
-
detail: boolean
|
|
80
|
-
messages: ChatMessage[]
|
|
81
|
-
customUid?: string
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* 聊天响应使用情况接口
|
|
86
|
-
*/
|
|
87
|
-
export interface ChatUsage {
|
|
88
|
-
prompt_tokens: number
|
|
89
|
-
completion_tokens: number
|
|
90
|
-
total_tokens: number
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* 聊天响应选择项接口
|
|
95
|
-
*/
|
|
96
|
-
export interface ChatChoice {
|
|
97
|
-
message: {
|
|
98
|
-
role: 'assistant'
|
|
99
|
-
content: string
|
|
100
|
-
}
|
|
101
|
-
finish_reason: string
|
|
102
|
-
index: number
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* 聊天响应接口
|
|
107
|
-
*/
|
|
108
|
-
export interface ChatCompletionsResponse {
|
|
109
|
-
id: string
|
|
110
|
-
model: string
|
|
111
|
-
usage: ChatUsage
|
|
112
|
-
choices: ChatChoice[]
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* 业务层聊天结果
|
|
117
|
-
*/
|
|
118
|
-
export interface ChatBizResult {
|
|
119
|
-
/**
|
|
120
|
-
* normal: 普通回复
|
|
121
|
-
* transfer: 转人工
|
|
122
|
-
*/
|
|
123
|
-
type: 'normal' | 'transfer'
|
|
124
|
-
/**
|
|
125
|
-
* 大模型原始返回内容
|
|
126
|
-
*/
|
|
127
|
-
content: string
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* 流式对话回调
|
|
132
|
-
*/
|
|
133
|
-
export interface ChatStreamCallbacks {
|
|
134
|
-
/**
|
|
135
|
-
* 每次收到 FastGPT SSE 的增量内容时触发
|
|
136
|
-
*/
|
|
137
|
-
onMessage?: (chunk: string) => void
|
|
138
|
-
/**
|
|
139
|
-
* 流结束时触发(包括收到 [DONE] 或正常读取结束)
|
|
140
|
-
*/
|
|
141
|
-
onComplete?: () => void
|
|
142
|
-
/**
|
|
143
|
-
* 请求或解析发生异常时触发
|
|
144
|
-
*/
|
|
145
|
-
onError?: (error: unknown) => void
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* 历史会话项接口
|
|
150
|
-
*/
|
|
151
|
-
export interface ChatHistoryItem {
|
|
152
|
-
chatId: string
|
|
153
|
-
updateTime: string
|
|
154
|
-
appId: string
|
|
155
|
-
customTitle: string
|
|
156
|
-
title: string
|
|
157
|
-
top: boolean
|
|
158
|
-
[key: string]: any
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* 历史会话查询请求参数接口
|
|
163
|
-
*/
|
|
164
|
-
export interface GetHistoriesRequest {
|
|
165
|
-
appId: string
|
|
166
|
-
outLinkUid: string
|
|
167
|
-
offset: number
|
|
168
|
-
pageSize: number
|
|
169
|
-
source: string
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* 历史会话查询响应接口
|
|
174
|
-
*/
|
|
175
|
-
export interface GetHistoriesResponse {
|
|
176
|
-
code: number
|
|
177
|
-
statusText: string
|
|
178
|
-
message: string
|
|
179
|
-
data: {
|
|
180
|
-
list: ChatHistoryItem[]
|
|
181
|
-
total: number
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* 历史会话记录项接口
|
|
187
|
-
*/
|
|
188
|
-
export interface ChatRecordItem {
|
|
189
|
-
_id: string
|
|
190
|
-
dataId: string
|
|
191
|
-
hideInUI: boolean
|
|
192
|
-
obj: 'Human' | 'AI'
|
|
193
|
-
value: Array<{
|
|
194
|
-
type: string
|
|
195
|
-
text: {
|
|
196
|
-
content: string
|
|
197
|
-
}
|
|
198
|
-
}>
|
|
199
|
-
customFeedbacks: any[]
|
|
200
|
-
time: string
|
|
201
|
-
durationSeconds?: number
|
|
202
|
-
llmModuleAccount?: number
|
|
203
|
-
totalQuoteList?: any[]
|
|
204
|
-
historyPreviewLength?: number
|
|
205
|
-
[key: string]: any
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* 获取历史会话记录请求参数接口
|
|
210
|
-
*/
|
|
211
|
-
export interface GetPaginationRecordsRequest {
|
|
212
|
-
appId: string
|
|
213
|
-
chatId: string
|
|
214
|
-
offset: number
|
|
215
|
-
pageSize: number
|
|
216
|
-
loadCustomFeedbacks: boolean
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* 获取历史会话记录响应接口
|
|
221
|
-
*/
|
|
222
|
-
export interface GetPaginationRecordsResponse {
|
|
223
|
-
code: number
|
|
224
|
-
statusText: string
|
|
225
|
-
message: string
|
|
226
|
-
data: {
|
|
227
|
-
list: ChatRecordItem[]
|
|
228
|
-
total: number
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
// ==================== MateChat 组件内部类型 ====================
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* MateChat 组件内部使用的消息结构
|
|
236
|
-
*/
|
|
237
|
-
export interface MateChatMessage {
|
|
238
|
-
from: 'user' | 'model' | 'service'
|
|
239
|
-
content: string
|
|
240
|
-
loading?: boolean
|
|
241
|
-
/**
|
|
242
|
-
* 是否启用打字机效果
|
|
243
|
-
* - true: 启用打字机
|
|
244
|
-
* - false 或未定义: 不启用打字机
|
|
245
|
-
*/
|
|
246
|
-
typing?: boolean
|
|
247
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* MateChat 提示项接口
|
|
3
|
+
*/
|
|
4
|
+
export interface MateChatPromptItem {
|
|
5
|
+
value: string
|
|
6
|
+
label: string
|
|
7
|
+
iconConfig?: {
|
|
8
|
+
name: string
|
|
9
|
+
color?: string
|
|
10
|
+
}
|
|
11
|
+
desc?: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* MateChat 配置接口
|
|
16
|
+
*/
|
|
17
|
+
export interface MateChatConfig {
|
|
18
|
+
/**
|
|
19
|
+
* 可选密码,如果存在则需要密码验证
|
|
20
|
+
*/
|
|
21
|
+
password?: string
|
|
22
|
+
/**
|
|
23
|
+
* FastGPT 应用 ID
|
|
24
|
+
*/
|
|
25
|
+
appId: string
|
|
26
|
+
/**
|
|
27
|
+
* FastGPT API Key
|
|
28
|
+
*/
|
|
29
|
+
appKey: string
|
|
30
|
+
/**
|
|
31
|
+
* 介绍文案
|
|
32
|
+
*/
|
|
33
|
+
description: string[]
|
|
34
|
+
/**
|
|
35
|
+
* 首屏推荐问题列表
|
|
36
|
+
*/
|
|
37
|
+
introPrompt: MateChatPromptItem[]
|
|
38
|
+
/**
|
|
39
|
+
* 底部快捷问题列表
|
|
40
|
+
*/
|
|
41
|
+
simplePrompt: MateChatPromptItem[]
|
|
42
|
+
/**
|
|
43
|
+
* 客服名称
|
|
44
|
+
*/
|
|
45
|
+
serviceName: string
|
|
46
|
+
/**
|
|
47
|
+
* 是否使用流式对话
|
|
48
|
+
*/
|
|
49
|
+
useStream: boolean
|
|
50
|
+
/**
|
|
51
|
+
* 背景渐变颜色(CSS linear-gradient 字符串)
|
|
52
|
+
* 如果不提供,使用默认蓝白渐变
|
|
53
|
+
*/
|
|
54
|
+
backgroundGradient?: string
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 配置中心返回的多个配置对象
|
|
59
|
+
* key 为配置名称,value 为 MateChatConfig
|
|
60
|
+
*/
|
|
61
|
+
export type MateChatConfigs = Record<string, MateChatConfig>
|
|
62
|
+
|
|
63
|
+
// ==================== API 相关类型定义 ====================
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 聊天消息接口
|
|
67
|
+
*/
|
|
68
|
+
export interface ChatMessage {
|
|
69
|
+
role: 'user' | 'assistant' | 'system'
|
|
70
|
+
content: string
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 聊天请求参数接口
|
|
75
|
+
*/
|
|
76
|
+
export interface ChatCompletionsRequest {
|
|
77
|
+
chatId: string
|
|
78
|
+
stream: boolean
|
|
79
|
+
detail: boolean
|
|
80
|
+
messages: ChatMessage[]
|
|
81
|
+
customUid?: string
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* 聊天响应使用情况接口
|
|
86
|
+
*/
|
|
87
|
+
export interface ChatUsage {
|
|
88
|
+
prompt_tokens: number
|
|
89
|
+
completion_tokens: number
|
|
90
|
+
total_tokens: number
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* 聊天响应选择项接口
|
|
95
|
+
*/
|
|
96
|
+
export interface ChatChoice {
|
|
97
|
+
message: {
|
|
98
|
+
role: 'assistant'
|
|
99
|
+
content: string
|
|
100
|
+
}
|
|
101
|
+
finish_reason: string
|
|
102
|
+
index: number
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* 聊天响应接口
|
|
107
|
+
*/
|
|
108
|
+
export interface ChatCompletionsResponse {
|
|
109
|
+
id: string
|
|
110
|
+
model: string
|
|
111
|
+
usage: ChatUsage
|
|
112
|
+
choices: ChatChoice[]
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* 业务层聊天结果
|
|
117
|
+
*/
|
|
118
|
+
export interface ChatBizResult {
|
|
119
|
+
/**
|
|
120
|
+
* normal: 普通回复
|
|
121
|
+
* transfer: 转人工
|
|
122
|
+
*/
|
|
123
|
+
type: 'normal' | 'transfer'
|
|
124
|
+
/**
|
|
125
|
+
* 大模型原始返回内容
|
|
126
|
+
*/
|
|
127
|
+
content: string
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* 流式对话回调
|
|
132
|
+
*/
|
|
133
|
+
export interface ChatStreamCallbacks {
|
|
134
|
+
/**
|
|
135
|
+
* 每次收到 FastGPT SSE 的增量内容时触发
|
|
136
|
+
*/
|
|
137
|
+
onMessage?: (chunk: string) => void
|
|
138
|
+
/**
|
|
139
|
+
* 流结束时触发(包括收到 [DONE] 或正常读取结束)
|
|
140
|
+
*/
|
|
141
|
+
onComplete?: () => void
|
|
142
|
+
/**
|
|
143
|
+
* 请求或解析发生异常时触发
|
|
144
|
+
*/
|
|
145
|
+
onError?: (error: unknown) => void
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* 历史会话项接口
|
|
150
|
+
*/
|
|
151
|
+
export interface ChatHistoryItem {
|
|
152
|
+
chatId: string
|
|
153
|
+
updateTime: string
|
|
154
|
+
appId: string
|
|
155
|
+
customTitle: string
|
|
156
|
+
title: string
|
|
157
|
+
top: boolean
|
|
158
|
+
[key: string]: any
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* 历史会话查询请求参数接口
|
|
163
|
+
*/
|
|
164
|
+
export interface GetHistoriesRequest {
|
|
165
|
+
appId: string
|
|
166
|
+
outLinkUid: string
|
|
167
|
+
offset: number
|
|
168
|
+
pageSize: number
|
|
169
|
+
source: string
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* 历史会话查询响应接口
|
|
174
|
+
*/
|
|
175
|
+
export interface GetHistoriesResponse {
|
|
176
|
+
code: number
|
|
177
|
+
statusText: string
|
|
178
|
+
message: string
|
|
179
|
+
data: {
|
|
180
|
+
list: ChatHistoryItem[]
|
|
181
|
+
total: number
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* 历史会话记录项接口
|
|
187
|
+
*/
|
|
188
|
+
export interface ChatRecordItem {
|
|
189
|
+
_id: string
|
|
190
|
+
dataId: string
|
|
191
|
+
hideInUI: boolean
|
|
192
|
+
obj: 'Human' | 'AI'
|
|
193
|
+
value: Array<{
|
|
194
|
+
type: string
|
|
195
|
+
text: {
|
|
196
|
+
content: string
|
|
197
|
+
}
|
|
198
|
+
}>
|
|
199
|
+
customFeedbacks: any[]
|
|
200
|
+
time: string
|
|
201
|
+
durationSeconds?: number
|
|
202
|
+
llmModuleAccount?: number
|
|
203
|
+
totalQuoteList?: any[]
|
|
204
|
+
historyPreviewLength?: number
|
|
205
|
+
[key: string]: any
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* 获取历史会话记录请求参数接口
|
|
210
|
+
*/
|
|
211
|
+
export interface GetPaginationRecordsRequest {
|
|
212
|
+
appId: string
|
|
213
|
+
chatId: string
|
|
214
|
+
offset: number
|
|
215
|
+
pageSize: number
|
|
216
|
+
loadCustomFeedbacks: boolean
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* 获取历史会话记录响应接口
|
|
221
|
+
*/
|
|
222
|
+
export interface GetPaginationRecordsResponse {
|
|
223
|
+
code: number
|
|
224
|
+
statusText: string
|
|
225
|
+
message: string
|
|
226
|
+
data: {
|
|
227
|
+
list: ChatRecordItem[]
|
|
228
|
+
total: number
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// ==================== MateChat 组件内部类型 ====================
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* MateChat 组件内部使用的消息结构
|
|
236
|
+
*/
|
|
237
|
+
export interface MateChatMessage {
|
|
238
|
+
from: 'user' | 'model' | 'service'
|
|
239
|
+
content: string
|
|
240
|
+
loading?: boolean
|
|
241
|
+
/**
|
|
242
|
+
* 是否启用打字机效果
|
|
243
|
+
* - true: 启用打字机
|
|
244
|
+
* - false 或未定义: 不启用打字机
|
|
245
|
+
*/
|
|
246
|
+
typing?: boolean
|
|
247
|
+
}
|