vue2-client 1.22.3 → 1.22.5
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/.env.his +19 -19
- package/.idea/.name +1 -0
- package/.idea/MarsCodeWorkspaceAppSettings.xml +8 -0
- package/.idea/deployment.xml +14 -0
- package/.idea/gradle.xml +7 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/libraries/contour_plot.xml +9 -0
- package/.idea/material_theme_project_new.xml +18 -0
- package/.idea/misc.xml +87 -5
- package/package.json +1 -1
- package/src/base-client/components/common/HIS/HForm/HForm.vue +1186 -1186
- package/src/base-client/components/common/XMarkdownViewer/demo.vue +102 -102
- package/src/base-client/components/his/HAi/HAi.vue +1177 -1177
- package/src/base-client/components/his/XTransfer/index.md +327 -327
- package/src/base-client/plugins/GetLoginInfoService.js +4 -4
- package/src/pages/login/Login.vue +9 -7
- package/src/pages/login/LoginV3.vue +9 -7
- package/src/utils/login.js +8 -19
- package/.history/.eslintrc_20260521171150.js +0 -74
- package/.history/.eslintrc_20260521171213.js +0 -74
- package/.history/src/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm_20260601154443.vue +0 -726
- package/.history/src/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm_20260601154700.vue +0 -478
- package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260512175435.vue +0 -706
- package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260512175450.vue +0 -694
- package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260611152602.vue +0 -755
- package/.history/src/base-client/components/common/HIS/HForm/HForm_20260513145941.vue +0 -524
- package/.history/src/base-client/components/common/HIS/HForm/HForm_20260513153133.vue +0 -731
- package/.history/src/base-client/components/common/HIS/HForm/HForm_20260513160316.vue +0 -525
- package/.history/src/base-client/components/common/HIS/HForm/HForm_20260601144150.vue +0 -1046
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260310142713.vue +0 -512
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260310145118.vue +0 -511
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260311094834.vue +0 -696
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260320143028.vue +0 -693
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260409101450.vue +0 -677
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260508164645.vue +0 -758
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260508164714.vue +0 -693
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260508171651.vue +0 -716
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260509133717.vue +0 -695
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260509171115.vue +0 -664
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513140637.vue +0 -1455
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513140935.vue +0 -1441
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513150818.vue +0 -1441
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513153119.vue +0 -1442
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513153126.vue +0 -1486
- package/.history/src/base-client/components/common/XForm/XFormItem_20260513140854.vue +0 -1607
- package/.history/src/base-client/components/common/XMarkdownViewer/XMarkdownViewer_20260519140403.vue +0 -643
- package/.history/src/base-client/components/common/XMarkdownViewer/XMarkdownViewer_20260519140829.vue +0 -628
- package/.history/src/base-client/components/common/XMarkdownViewer/demo_20260519142824.vue +0 -104
- package/.history/src/base-client/components/common/XMarkdownViewer/demo_20260519143155.vue +0 -102
- package/.history/src/base-client/components/common/XReportGrid/XReport_20260309171231.vue +0 -1241
- package/.history/src/base-client/components/common/XReportGrid/XReport_20260309171441.vue +0 -1223
- package/.history/src/base-client/components/his/HAi/HAi_20260612174826.vue +0 -472
- package/.history/src/base-client/components/his/HAi/HAi_20260612175839.vue +0 -538
- package/.history/src/base-client/components/his/HAi/HAi_20260615103331.vue +0 -650
- package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260424134504.vue +0 -1469
- package/.history/src/base-client/components/his/XSidebar/XSidebar_20260610171133.vue +0 -788
- package/.history/src/base-client/components/his/XSidebar/XSidebar_20260610171151.vue +0 -780
- package/.history/src/base-client/components/his/XTransfer/XTransfer_20260511170841.vue +0 -585
- package/.history/src/base-client/components/his/XTransfer/XTransfer_20260511171138.vue +0 -787
- package/.history/src/base-client/components/his/XTransfer/XTransfer_20260512141830.vue +0 -739
- package/.history/src/components/STable/index_20260409155138.js +0 -806
- package/.history/src/components/STable/index_20260409155218.js +0 -814
- package/.history/src/expression/core/Expression_20260305164427.js +0 -1371
- package/.history/src/expression/core/Expression_20260305170258.js +0 -1358
- package/.history/src/expression/core/Program_20260305111830.js +0 -944
- package/.history/src/expression/core/Program_20260305112041.js +0 -931
- package/.history/src/logic/LogicRunner_20260304154306.js +0 -170
- package/.history/src/logic/LogicRunner_20260304155553.js +0 -112
- package/.history/src/logic/LogicRunner_20260305105834.js +0 -112
- package/.history/src/logic/LogicRunner_20260305112718.js +0 -129
- package/.history/src/logic/LogicRunner_20260305182436.js +0 -133
- package/.history/src/logic/LogicRunner_20260306151301.js +0 -213
- package/.history/src/logic/LogicRunner_20260306152419.js +0 -213
- package/.history/src/logic/plugins/common/DateTools_20260305154159.js +0 -61
- package/.history/src/logic/plugins/common/DateTools_20260305154217.js +0 -44
- package/.history/src/logic/plugins/common/DateTools_20260305161014.js +0 -44
- package/.history/src/logic/plugins/common/HttpTools_20260305164352.js +0 -80
- package/.history/src/logic/plugins/common/HttpTools_20260305170258.js +0 -75
- package/.history/src/logic/plugins/common/HttpTools_20260305171634.js +0 -75
- package/.history/src/logic/plugins/common/HttpTools_20260306152419.js +0 -72
- package/.history/src/services/api/restTools_20260427142149.js +0 -245
- package/.history/src/services/api/restTools_20260427142853.js +0 -230
- package/.history/src/services/api/restTools_20260519135558.js +0 -230
- package/.history/src/services/api/restTools_20260519140825.js +0 -230
- package/.history/src/services/api/restTools_20260519151223.js +0 -230
- package/.history/src/utils/indexedDB_20260306150918.js +0 -593
- package/.history/src/utils/indexedDB_20260306151301.js +0 -586
- package/.idea/codeStyles/Project.xml +0 -62
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/preview-input-box.html +0 -180
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div style="padding: 16px">
|
|
3
|
-
<h2>XMarkdownViewer Demo</h2>
|
|
4
|
-
|
|
5
|
-
<div style="margin: 12px 0; padding: 12px; background: #f5f5f5; border-radius: 4px">
|
|
6
|
-
<h4 style="margin: 0 0 8px 0">流式 AI 调用示例</h4>
|
|
7
|
-
<div style="margin-bottom: 8px">
|
|
8
|
-
<input
|
|
9
|
-
v-model="userMessage"
|
|
10
|
-
type="text"
|
|
11
|
-
placeholder="输入消息"
|
|
12
|
-
style="width: 300px; padding: 6px 8px; border: 1px solid #ddd; border-radius: 4px"
|
|
13
|
-
@keyup.enter="sendMessage"
|
|
14
|
-
>
|
|
15
|
-
<button
|
|
16
|
-
type="button"
|
|
17
|
-
style="margin-left: 8px; padding: 6px 16px; background: #1890ff; color: #fff; border: none; border-radius: 4px; cursor: pointer"
|
|
18
|
-
@click="sendMessage"
|
|
19
|
-
>
|
|
20
|
-
发送
|
|
21
|
-
</button>
|
|
22
|
-
<button
|
|
23
|
-
v-if="isStreaming"
|
|
24
|
-
type="button"
|
|
25
|
-
style="margin-left: 8px; padding: 6px 16px; background: #ff4d4f; color: #fff; border: none; border-radius: 4px; cursor: pointer"
|
|
26
|
-
@click="stopMessage"
|
|
27
|
-
>
|
|
28
|
-
停止
|
|
29
|
-
</button>
|
|
30
|
-
</div>
|
|
31
|
-
<div v-if="isStreaming" style="color: #1890ff; font-size: 12px">AI 正在思考中...</div>
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
<div style="margin: 8px 0; color: #666; font-size: 12px">
|
|
35
|
-
<span v-if="fileName">当前文件:{{ fileName }}({{ md.length }} 字符)</span>
|
|
36
|
-
<span v-else-if="md">当前内容:流式响应({{ md.length }} 字符)</span>
|
|
37
|
-
<span v-else>请输入消息并点击发送</span>
|
|
38
|
-
</div>
|
|
39
|
-
|
|
40
|
-
<x-markdown-viewer ref="viewer" :markdown="md" />
|
|
41
|
-
</div>
|
|
42
|
-
</template>
|
|
43
|
-
|
|
44
|
-
<script>
|
|
45
|
-
import XMarkdownViewer from './XMarkdownViewer.vue'
|
|
46
|
-
|
|
47
|
-
export default {
|
|
48
|
-
name: 'XMarkdownViewerDemo',
|
|
49
|
-
components: {
|
|
50
|
-
XMarkdownViewer
|
|
51
|
-
},
|
|
52
|
-
data () {
|
|
53
|
-
return {
|
|
54
|
-
md: '',
|
|
55
|
-
fileName: '',
|
|
56
|
-
userMessage: '',
|
|
57
|
-
isStreaming: false,
|
|
58
|
-
currentStream: null
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
methods: {
|
|
62
|
-
async sendMessage () {
|
|
63
|
-
const message = this.userMessage.trim()
|
|
64
|
-
if (!message) return
|
|
65
|
-
|
|
66
|
-
const viewer = this.$refs.viewer
|
|
67
|
-
if (!viewer || typeof viewer.callAiStream !== 'function') {
|
|
68
|
-
console.warn('[Demo] viewer 不存在或没有 callAiStream 方法')
|
|
69
|
-
return
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// 开始时显示提示
|
|
73
|
-
viewer.receiveMarkdownString('### 思考中,请稍后...\n')
|
|
74
|
-
this.isStreaming = true
|
|
75
|
-
|
|
76
|
-
// 调用流式接口
|
|
77
|
-
const stream = viewer.callAiStream(message, {
|
|
78
|
-
onChunk: (text) => {
|
|
79
|
-
viewer.receiveMarkdownString('### 思考中,请稍后...\n\n' + viewer.getStreamContent())
|
|
80
|
-
},
|
|
81
|
-
onEnd: (fullContent) => {
|
|
82
|
-
viewer.receiveMarkdownString(fullContent)
|
|
83
|
-
this.isStreaming = false
|
|
84
|
-
},
|
|
85
|
-
onError: (error) => {
|
|
86
|
-
viewer.receiveMarkdownString('### 抱歉,发生了错误\n\n' + error)
|
|
87
|
-
this.isStreaming = false
|
|
88
|
-
}
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
this.currentStream = stream
|
|
92
|
-
},
|
|
93
|
-
stopMessage () {
|
|
94
|
-
if (this.currentStream && typeof this.currentStream.stop === 'function') {
|
|
95
|
-
this.currentStream.stop()
|
|
96
|
-
this.isStreaming = false
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
</script>
|
|
102
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div style="padding: 16px">
|
|
3
|
+
<h2>XMarkdownViewer Demo</h2>
|
|
4
|
+
|
|
5
|
+
<div style="margin: 12px 0; padding: 12px; background: #f5f5f5; border-radius: 4px">
|
|
6
|
+
<h4 style="margin: 0 0 8px 0">流式 AI 调用示例</h4>
|
|
7
|
+
<div style="margin-bottom: 8px">
|
|
8
|
+
<input
|
|
9
|
+
v-model="userMessage"
|
|
10
|
+
type="text"
|
|
11
|
+
placeholder="输入消息"
|
|
12
|
+
style="width: 300px; padding: 6px 8px; border: 1px solid #ddd; border-radius: 4px"
|
|
13
|
+
@keyup.enter="sendMessage"
|
|
14
|
+
>
|
|
15
|
+
<button
|
|
16
|
+
type="button"
|
|
17
|
+
style="margin-left: 8px; padding: 6px 16px; background: #1890ff; color: #fff; border: none; border-radius: 4px; cursor: pointer"
|
|
18
|
+
@click="sendMessage"
|
|
19
|
+
>
|
|
20
|
+
发送
|
|
21
|
+
</button>
|
|
22
|
+
<button
|
|
23
|
+
v-if="isStreaming"
|
|
24
|
+
type="button"
|
|
25
|
+
style="margin-left: 8px; padding: 6px 16px; background: #ff4d4f; color: #fff; border: none; border-radius: 4px; cursor: pointer"
|
|
26
|
+
@click="stopMessage"
|
|
27
|
+
>
|
|
28
|
+
停止
|
|
29
|
+
</button>
|
|
30
|
+
</div>
|
|
31
|
+
<div v-if="isStreaming" style="color: #1890ff; font-size: 12px">AI 正在思考中...</div>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div style="margin: 8px 0; color: #666; font-size: 12px">
|
|
35
|
+
<span v-if="fileName">当前文件:{{ fileName }}({{ md.length }} 字符)</span>
|
|
36
|
+
<span v-else-if="md">当前内容:流式响应({{ md.length }} 字符)</span>
|
|
37
|
+
<span v-else>请输入消息并点击发送</span>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<x-markdown-viewer ref="viewer" :markdown="md" />
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script>
|
|
45
|
+
import XMarkdownViewer from './XMarkdownViewer.vue'
|
|
46
|
+
|
|
47
|
+
export default {
|
|
48
|
+
name: 'XMarkdownViewerDemo',
|
|
49
|
+
components: {
|
|
50
|
+
XMarkdownViewer
|
|
51
|
+
},
|
|
52
|
+
data () {
|
|
53
|
+
return {
|
|
54
|
+
md: '',
|
|
55
|
+
fileName: '',
|
|
56
|
+
userMessage: '',
|
|
57
|
+
isStreaming: false,
|
|
58
|
+
currentStream: null
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
methods: {
|
|
62
|
+
async sendMessage () {
|
|
63
|
+
const message = this.userMessage.trim()
|
|
64
|
+
if (!message) return
|
|
65
|
+
|
|
66
|
+
const viewer = this.$refs.viewer
|
|
67
|
+
if (!viewer || typeof viewer.callAiStream !== 'function') {
|
|
68
|
+
console.warn('[Demo] viewer 不存在或没有 callAiStream 方法')
|
|
69
|
+
return
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// 开始时显示提示
|
|
73
|
+
viewer.receiveMarkdownString('### 思考中,请稍后...\n')
|
|
74
|
+
this.isStreaming = true
|
|
75
|
+
|
|
76
|
+
// 调用流式接口
|
|
77
|
+
const stream = viewer.callAiStream(message, {
|
|
78
|
+
onChunk: (text) => {
|
|
79
|
+
viewer.receiveMarkdownString('### 思考中,请稍后...\n\n' + viewer.getStreamContent())
|
|
80
|
+
},
|
|
81
|
+
onEnd: (fullContent) => {
|
|
82
|
+
viewer.receiveMarkdownString(fullContent)
|
|
83
|
+
this.isStreaming = false
|
|
84
|
+
},
|
|
85
|
+
onError: (error) => {
|
|
86
|
+
viewer.receiveMarkdownString('### 抱歉,发生了错误\n\n' + error)
|
|
87
|
+
this.isStreaming = false
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
this.currentStream = stream
|
|
92
|
+
},
|
|
93
|
+
stopMessage () {
|
|
94
|
+
if (this.currentStream && typeof this.currentStream.stop === 'function') {
|
|
95
|
+
this.currentStream.stop()
|
|
96
|
+
this.isStreaming = false
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
</script>
|
|
102
|
+
|