af-mobile-client-vue3 1.4.65 → 1.4.68

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.
Files changed (43) hide show
  1. package/__dummy__ +9 -9
  2. package/build/vite/optimize.ts +36 -36
  3. package/package.json +121 -120
  4. package/pnpm-lock.yaml +11070 -0
  5. package/public/favicon.svg +4 -4
  6. package/scripts/verifyCommit.js +19 -19
  7. package/src/components/common/MateChat/components/MateChatContent.vue +274 -274
  8. package/src/components/common/MateChat/components/MateChatHeader.vue +337 -337
  9. package/src/components/common/MateChat/index.vue +444 -444
  10. package/src/components/common/MateChat/types.ts +247 -247
  11. package/src/components/data/UserDetail/types.ts +1 -1
  12. package/src/components/data/XFormGroup/doc/DeviceForm.vue +1 -1
  13. package/src/components/data/XFormGroup/doc/UserForm.vue +1 -1
  14. package/src/components/data/XReportGrid/XAddReport/index.ts +1 -1
  15. package/src/components/data/XReportGrid/XReportDemo.vue +33 -33
  16. package/src/components/data/XReportGrid/XReportDrawer/index.ts +1 -1
  17. package/src/components/data/XReportGrid/print.js +184 -184
  18. package/src/components/data/XTag/index.vue +10 -10
  19. package/src/components/layout/TabBarLayout/index.vue +40 -40
  20. package/src/hooks/useCommon.ts +9 -9
  21. package/src/plugins/AppData.ts +38 -38
  22. package/src/router/invoiceRoutes.ts +33 -33
  23. package/src/services/api/common.ts +109 -109
  24. package/src/services/api/manage.ts +8 -8
  25. package/src/services/api/search.ts +16 -16
  26. package/src/services/restTools.ts +56 -56
  27. package/src/stores/modules/user.ts +3 -0
  28. package/src/utils/authority-utils.ts +84 -84
  29. package/src/utils/crypto.ts +39 -39
  30. package/src/utils/runEvalFunction.ts +13 -13
  31. package/src/utils/timeUtil.ts +27 -27
  32. package/src/views/component/EvaluateRecordView/index.vue +40 -40
  33. package/src/views/component/MateChat/MateChatView.vue +10 -10
  34. package/src/views/component/XCellDetailView/index.vue +217 -217
  35. package/src/views/component/XFormView/index.vue +2 -2
  36. package/src/views/component/XReportFormIframeView/index.vue +47 -47
  37. package/src/views/component/XReportFormView/index.vue +13 -13
  38. package/src/views/component/XSignatureView/index.vue +50 -50
  39. package/src/views/component/notice.vue +46 -46
  40. package/src/views/component/topNav.vue +36 -36
  41. package/src/views/invoiceShow/index.vue +61 -61
  42. package/src/views/user/login/LoginForm.vue +0 -1
  43. package/src/views/user/login/index.vue +22 -22
@@ -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
+ }
@@ -23,4 +23,4 @@ export interface ConfigItem {
23
23
  format?: (value: string | number) => string
24
24
  template?: string
25
25
  condition?: (data: any) => boolean
26
- }
26
+ }
@@ -119,4 +119,4 @@ onUnmounted(() => {
119
119
  color: #ff976a;
120
120
  }
121
121
  }
122
- </style>
122
+ </style>
@@ -99,4 +99,4 @@ onUnmounted(() => {
99
99
  .user-form {
100
100
  padding: 16px;
101
101
  }
102
- </style>
102
+ </style>
@@ -7,4 +7,4 @@ export default {
7
7
  install(app: App) {
8
8
  app.component('XAddReport', XAddReport)
9
9
  },
10
- }
10
+ }
@@ -1,33 +1,33 @@
1
- <script setup lang="ts">
2
- import { onMounted, ref } from 'vue'
3
- import XReport from './XReport.vue'
4
-
5
- const mainRef = ref()
6
-
7
- onMounted(() => {
8
- // 初始化逻辑
9
- })
10
- </script>
11
-
12
- <template>
13
- <div id="test">
14
- <van-card :bordered="false">
15
- <XReport
16
- ref="mainRef"
17
- :use-oss-for-img="false"
18
- config-name="nurseWorkstationCover"
19
- server-name="af-his"
20
- :show-img-in-cell="true"
21
- :display-only="true"
22
- :edit-mode="false"
23
- :show-save-button="false"
24
- :no-padding="true"
25
- :dont-format="true"
26
- />
27
- </van-card>
28
- </div>
29
- </template>
30
-
31
- <style scoped>
32
-
33
- </style>
1
+ <script setup lang="ts">
2
+ import { onMounted, ref } from 'vue'
3
+ import XReport from './XReport.vue'
4
+
5
+ const mainRef = ref()
6
+
7
+ onMounted(() => {
8
+ // 初始化逻辑
9
+ })
10
+ </script>
11
+
12
+ <template>
13
+ <div id="test">
14
+ <van-card :bordered="false">
15
+ <XReport
16
+ ref="mainRef"
17
+ :use-oss-for-img="false"
18
+ config-name="nurseWorkstationCover"
19
+ server-name="af-his"
20
+ :show-img-in-cell="true"
21
+ :display-only="true"
22
+ :edit-mode="false"
23
+ :show-save-button="false"
24
+ :no-padding="true"
25
+ :dont-format="true"
26
+ />
27
+ </van-card>
28
+ </div>
29
+ </template>
30
+
31
+ <style scoped>
32
+
33
+ </style>
@@ -7,4 +7,4 @@ export default {
7
7
  install(app: App) {
8
8
  app.component('XReportDrawer', XReportDrawer)
9
9
  },
10
- }
10
+ }