vue2-client 1.22.6 → 1.22.7
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/.claude/settings.local.json +30 -30
- package/.env.his +19 -19
- package/.eslintrc.js +74 -74
- package/.history/.eslintrc_20260521171150.js +74 -0
- package/.history/.eslintrc_20260521171213.js +74 -0
- package/.history/src/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm_20260601154443.vue +726 -0
- package/.history/src/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm_20260601154700.vue +478 -0
- package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260512175435.vue +706 -0
- package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260512175450.vue +694 -0
- package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260611152602.vue +755 -0
- package/.history/src/base-client/components/common/HIS/HForm/HForm_20260513145941.vue +524 -0
- package/.history/src/base-client/components/common/HIS/HForm/HForm_20260513153133.vue +731 -0
- package/.history/src/base-client/components/common/HIS/HForm/HForm_20260513160316.vue +525 -0
- package/.history/src/base-client/components/common/HIS/HForm/HForm_20260601144150.vue +1046 -0
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260310142713.vue +512 -0
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260310145118.vue +511 -0
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260311094834.vue +696 -0
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260320143028.vue +693 -0
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260409101450.vue +677 -0
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260508164645.vue +758 -0
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260508164714.vue +693 -0
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260508171651.vue +716 -0
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260509133717.vue +695 -0
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260509171115.vue +664 -0
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513140637.vue +1455 -0
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513140935.vue +1441 -0
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513150818.vue +1441 -0
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513153119.vue +1442 -0
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513153126.vue +1486 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20260513140854.vue +1607 -0
- package/.history/src/base-client/components/common/XMarkdownViewer/XMarkdownViewer_20260519140403.vue +643 -0
- package/.history/src/base-client/components/common/XMarkdownViewer/XMarkdownViewer_20260519140829.vue +628 -0
- package/.history/src/base-client/components/common/XMarkdownViewer/demo_20260519142824.vue +104 -0
- package/.history/src/base-client/components/common/XMarkdownViewer/demo_20260519143155.vue +102 -0
- package/.history/src/base-client/components/common/XReportGrid/XReport_20260309171231.vue +1241 -0
- package/.history/src/base-client/components/common/XReportGrid/XReport_20260309171441.vue +1223 -0
- package/.history/src/base-client/components/his/HAi/HAi_20260612174826.vue +472 -0
- package/.history/src/base-client/components/his/HAi/HAi_20260612175839.vue +538 -0
- package/.history/src/base-client/components/his/HAi/HAi_20260615103331.vue +650 -0
- package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260424134504.vue +1469 -0
- package/.history/src/base-client/components/his/XSidebar/XSidebar_20260610171133.vue +788 -0
- package/.history/src/base-client/components/his/XSidebar/XSidebar_20260610171151.vue +780 -0
- package/.history/src/base-client/components/his/XTransfer/XTransfer_20260511170841.vue +585 -0
- package/.history/src/base-client/components/his/XTransfer/XTransfer_20260511171138.vue +787 -0
- package/.history/src/base-client/components/his/XTransfer/XTransfer_20260512141830.vue +739 -0
- package/.history/src/components/STable/index_20260409155138.js +806 -0
- package/.history/src/components/STable/index_20260409155218.js +814 -0
- package/.history/src/expression/core/Expression_20260305164427.js +1371 -0
- package/.history/src/expression/core/Expression_20260305170258.js +1358 -0
- package/.history/src/expression/core/Program_20260305111830.js +944 -0
- package/.history/src/expression/core/Program_20260305112041.js +931 -0
- package/.history/src/logic/LogicRunner_20260304154306.js +170 -0
- package/.history/src/logic/LogicRunner_20260304155553.js +112 -0
- package/.history/src/logic/LogicRunner_20260305105834.js +112 -0
- package/.history/src/logic/LogicRunner_20260305112718.js +129 -0
- package/.history/src/logic/LogicRunner_20260305182436.js +133 -0
- package/.history/src/logic/LogicRunner_20260306151301.js +213 -0
- package/.history/src/logic/LogicRunner_20260306152419.js +213 -0
- package/.history/src/logic/plugins/common/DateTools_20260305154159.js +61 -0
- package/.history/src/logic/plugins/common/DateTools_20260305154217.js +44 -0
- package/.history/src/logic/plugins/common/DateTools_20260305161014.js +44 -0
- package/.history/src/logic/plugins/common/HttpTools_20260305164352.js +80 -0
- package/.history/src/logic/plugins/common/HttpTools_20260305170258.js +75 -0
- package/.history/src/logic/plugins/common/HttpTools_20260305171634.js +75 -0
- package/.history/src/logic/plugins/common/HttpTools_20260306152419.js +72 -0
- package/.history/src/services/api/restTools_20260427142149.js +245 -0
- package/.history/src/services/api/restTools_20260427142853.js +230 -0
- package/.history/src/services/api/restTools_20260519135558.js +230 -0
- package/.history/src/services/api/restTools_20260519140825.js +230 -0
- package/.history/src/services/api/restTools_20260519151223.js +230 -0
- package/.history/src/utils/indexedDB_20260306150918.js +593 -0
- package/.history/src/utils/indexedDB_20260306151301.js +586 -0
- package/.idea/af-vue2-client.iml +9 -0
- package/.idea/codeStyles/Project.xml +62 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +1 -1
- package/Components.md +60 -60
- package/index.js +31 -31
- package/jest-transform-stub.js +8 -8
- package/jest.setup.js +7 -7
- package/package.json +1 -1
- package/preview-input-box.html +180 -0
- package/src/assets/img/querySlotDemo.svg +15 -15
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +120 -120
- package/src/base-client/components/common/CitySelect/index.js +3 -3
- package/src/base-client/components/common/CitySelect/index.md +109 -109
- package/src/base-client/components/common/FormGroupEdit/index.js +3 -3
- package/src/base-client/components/common/FormGroupEdit/index.md +43 -43
- package/src/base-client/components/common/HIS/HForm/HForm.vue +1186 -1186
- package/src/base-client/components/common/JSONToTree/jsontotree.vue +271 -271
- package/src/base-client/components/common/PersonSetting/index.js +3 -3
- package/src/base-client/components/common/Tree/index.js +2 -2
- package/src/base-client/components/common/Upload/index.js +3 -3
- package/src/base-client/components/common/XAddNativeForm/index.md +146 -146
- package/src/base-client/components/common/XCard/XCard.vue +64 -64
- package/src/base-client/components/common/XDataDrawer/XDataDrawer.vue +180 -180
- package/src/base-client/components/common/XDataDrawer/index.js +3 -3
- package/src/base-client/components/common/XDataDrawer/index.md +41 -41
- package/src/base-client/components/common/XDescriptions/index.js +3 -3
- package/src/base-client/components/common/XDescriptions/index.md +382 -382
- package/src/base-client/components/common/XForm/index.md +178 -178
- package/src/base-client/components/common/XMarkdownViewer/demo.vue +102 -102
- package/src/base-client/components/common/XStepView/XStepView.vue +252 -252
- package/src/base-client/components/common/XStepView/index.js +3 -3
- package/src/base-client/components/common/XStepView/index.md +31 -31
- package/src/base-client/components/common/XTable/index.md +255 -255
- package/src/base-client/components/his/HAi/HAi.vue +349 -141
- package/src/base-client/components/his/XList/XList.vue +130 -17
- package/src/base-client/components/his/XTransfer/index.md +327 -327
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -232
- package/src/base-client/plugins/Config.js +19 -19
- package/src/base-client/plugins/tabs-page-plugin.js +39 -39
- package/src/components/Charts/Bar.vue +62 -62
- package/src/components/Charts/ChartCard.vue +134 -134
- package/src/components/Charts/Liquid.vue +67 -67
- package/src/components/Charts/MiniArea.vue +39 -39
- package/src/components/Charts/MiniBar.vue +39 -39
- package/src/components/Charts/MiniProgress.vue +75 -75
- package/src/components/Charts/MiniSmoothArea.vue +40 -40
- package/src/components/Charts/Radar.vue +68 -68
- package/src/components/Charts/RankList.vue +77 -77
- package/src/components/Charts/TagCloud.vue +113 -113
- package/src/components/Charts/TransferBar.vue +64 -64
- package/src/components/Charts/Trend.vue +82 -82
- package/src/components/Charts/chart.less +12 -12
- package/src/components/Charts/smooth.area.less +13 -13
- package/src/components/NumberInfo/NumberInfo.vue +54 -54
- package/src/components/NumberInfo/index.js +3 -3
- package/src/components/NumberInfo/index.less +54 -54
- package/src/components/NumberInfo/index.md +43 -43
- package/src/components/STable/index.js +953 -953
- package/src/components/card/ChartCard.vue +79 -79
- package/src/components/chart/Bar.vue +60 -60
- package/src/components/chart/MiniArea.vue +67 -67
- package/src/components/chart/MiniBar.vue +59 -59
- package/src/components/chart/MiniProgress.vue +57 -57
- package/src/components/chart/Radar.vue +80 -80
- package/src/components/chart/RankingList.vue +60 -60
- package/src/components/chart/Trend.vue +79 -79
- package/src/components/chart/index.less +9 -9
- package/src/components/checkbox/ColorCheckbox.vue +157 -157
- package/src/components/input/IInput.vue +66 -66
- package/src/components/menu/SideMenu.vue +75 -75
- package/src/components/menu/menu.js +273 -273
- package/src/components/tool/AStepItem.vue +60 -60
- package/src/layouts/CommonLayout.vue +56 -56
- package/src/lib.js +1 -1
- package/src/mock/extend/index.js +84 -84
- package/src/mock/goods/index.js +108 -108
- package/src/pages/dashboard/workplace/WorkPlace.vue +141 -141
- package/src/pages/system/dictionary/index.vue +44 -44
- package/src/pages/system/monitor/loginInfor/index.vue +37 -37
- package/src/pages/system/monitor/operLog/index.vue +37 -37
- package/src/services/api/cas.js +79 -79
- package/src/store/modules/setting.js +119 -119
- package/src/utils/errorCode.js +6 -6
- package//350/277/201/347/247/273/346/227/245/345/277/227.md +15 -15
- package/.idea/MarsCodeWorkspaceAppSettings.xml +0 -7
- package/.idea/google-java-format.xml +0 -6
- package/.idea/inspectionProfiles/Project_Default.xml +0 -24
- package/.idea/jsLinters/eslint.xml +0 -6
- package/.idea/vue2-client.iml +0 -12
- package/.vscode/settings.json +0 -28
|
@@ -16,162 +16,153 @@
|
|
|
16
16
|
<div class="chat-area">
|
|
17
17
|
<!-- 对话区域 -->
|
|
18
18
|
<div class="dialog-area">
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
19
|
+
<template v-for="(item, index) in displayItems">
|
|
20
|
+
<div
|
|
21
|
+
v-if="item.type === 'divider'"
|
|
22
|
+
:key="`divider-${index}`"
|
|
23
|
+
class="dialog-divider"
|
|
24
|
+
>
|
|
25
|
+
<span class="dialog-divider-text">{{ item.text }}</span>
|
|
26
|
+
</div>
|
|
27
|
+
<div
|
|
28
|
+
v-else
|
|
29
|
+
:key="`msg-${index}`"
|
|
30
|
+
:class="['dialog-message', item.type]"
|
|
31
|
+
>
|
|
32
|
+
<div class="message-content">
|
|
33
|
+
<div v-if="item.attachments && item.attachments.length" class="message-attachments">
|
|
34
|
+
<div
|
|
35
|
+
v-for="(file, fileIndex) in item.attachments"
|
|
36
|
+
:key="fileIndex"
|
|
37
|
+
:class="['attachment-item', { 'is-image': file.isImage }]"
|
|
38
|
+
>
|
|
39
|
+
<div v-if="file.isImage" class="image-preview" @click="previewImage(file)">
|
|
40
|
+
<img :src="file.url" :alt="file.name" />
|
|
41
|
+
<span class="image-name">{{ file.name }}</span>
|
|
42
|
+
</div>
|
|
43
|
+
<div v-else class="file-item">
|
|
44
|
+
<a-icon type="file" class="file-icon" />
|
|
45
|
+
<span class="file-name">{{ file.name }}</span>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="message-bubble">
|
|
50
|
+
<div class="message-text" v-html="renderMd(item.content)" />
|
|
51
|
+
</div>
|
|
52
|
+
<!-- 用户消息操作按钮 - 悬浮显示 -->
|
|
53
|
+
<div v-if="item.type === 'user'" class="message-actions user-actions">
|
|
38
54
|
<span class="action-btn" title="复制" @click="copyMessage(item)">
|
|
39
55
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="20" height="20" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_2979_064909"><rect x="24" y="0" width="24" height="24" rx="0"/></clipPath></defs><g transform="matrix(0,1,-1,0,24,-24)" clip-path="url(#master_svg0_2979_064909)"><path d="M35.0998046875,10.30078125C35.0998046875,10.30078125,43.1998046875,10.30078125,43.1998046875,10.30078125C43.1998046875,10.30078125,43.1998046875,8.30078125,43.1998046875,8.30078125C43.1998046875,8.30078125,35.0998046875,8.30078125,35.0998046875,8.30078125C35.0998046875,8.30078125,35.0998046875,10.30078125,35.0998046875,10.30078125C35.0998046875,10.30078125,35.0998046875,10.30078125,35.0998046875,10.30078125ZM43.1998046875,10.30078125C43.6416046875,10.30078125,43.9998046875,10.65895125,43.9998046875,11.10078125C43.9998046875,11.10078125,45.9998046875,11.10078125,45.9998046875,11.10078125C45.9998046875,9.55438425,44.7462046875,8.30078125,43.1998046875,8.30078125C43.1998046875,8.30078125,43.1998046875,10.30078125,43.1998046875,10.30078125C43.1998046875,10.30078125,43.1998046875,10.30078125,43.1998046875,10.30078125ZM43.9998046875,11.10078125C43.9998046875,11.10078125,43.9998046875,19.20078125,43.9998046875,19.20078125C43.9998046875,19.20078125,45.9998046875,19.20078125,45.9998046875,19.20078125C45.9998046875,19.20078125,45.9998046875,11.10078125,45.9998046875,11.10078125C45.9998046875,11.10078125,43.9998046875,11.10078125,43.9998046875,11.10078125C43.9998046875,11.10078125,43.9998046875,11.10078125,43.9998046875,11.10078125ZM43.9998046875,19.20078125C43.9998046875,19.64258125,43.6416046875,20.00078125,43.1998046875,20.00078125C43.1998046875,20.00078125,43.1998046875,22.00078125,43.1998046875,22.00078125C44.7462046875,22.00078125,45.9998046875,20.74718125,45.9998046875,19.20078125C45.9998046875,19.20078125,43.9998046875,19.20078125,43.9998046875,19.20078125C43.9998046875,19.20078125,43.9998046875,19.20078125,43.9998046875,19.20078125ZM43.1998046875,20.00078125C43.1998046875,20.00078125,35.0998046875,20.00078125,35.0998046875,20.00078125C35.0998046875,20.00078125,35.0998046875,22.00078125,35.0998046875,22.00078125C35.0998046875,22.00078125,43.1998046875,22.00078125,43.1998046875,22.00078125C43.1998046875,22.00078125,43.1998046875,20.00078125,43.1998046875,20.00078125C43.1998046875,20.00078125,43.1998046875,20.00078125,43.1998046875,20.00078125ZM35.0998046875,20.00078125C34.6579746875,20.00078125,34.2998046875,19.64258125,34.2998046875,19.20078125C34.2998046875,19.20078125,32.2998046875,19.20078125,32.2998046875,19.20078125C32.2998046875,20.74718125,33.5534076875,22.00078125,35.0998046875,22.00078125C35.0998046875,22.00078125,35.0998046875,20.00078125,35.0998046875,20.00078125C35.0998046875,20.00078125,35.0998046875,20.00078125,35.0998046875,20.00078125ZM34.2998046875,19.20078125C34.2998046875,19.20078125,34.2998046875,11.10078125,34.2998046875,11.10078125C34.2998046875,11.10078125,32.2998046875,11.10078125,32.2998046875,11.10078125C32.2998046875,11.10078125,32.2998046875,19.20078125,32.2998046875,19.20078125C32.2998046875,19.20078125,34.2998046875,19.20078125,34.2998046875,19.20078125C34.2998046875,19.20078125,34.2998046875,19.20078125,34.2998046875,19.20078125ZM34.2998046875,11.10078125C34.2998046875,10.65895125,34.6579746875,10.30078125,35.0998046875,10.30078125C35.0998046875,10.30078125,35.0998046875,8.30078125,35.0998046875,8.30078125C33.5534076875,8.30078125,32.2998046875,9.55438425,32.2998046875,11.10078125C32.2998046875,11.10078125,34.2998046875,11.10078125,34.2998046875,11.10078125C34.2998046875,11.10078125,34.2998046875,11.10078125,34.2998046875,11.10078125Z" fill="#94979E" fill-opacity="1"/><path d="M29.7,15.7C30.2522802,15.7,30.6999998,15.2523,30.6999998,14.7C30.6999998,14.1477,30.2522802,13.7,29.7,13.7C29.7,13.7,29.7,15.7,29.7,15.7C29.7,15.7,29.7,15.7,29.7,15.7ZM27,12.9C27,12.9,26,12.9,26,12.9C26,12.9,27,12.9,27,12.9C27,12.9,27,12.9,27,12.9ZM28.8,3C28.8,3,28.8,2,28.8,2C28.8,2,28.8,3,28.8,3C28.8,3,28.8,3,28.8,3ZM36.9,3C36.9,3,36.9,2,36.9,2C36.9,2,36.9,3,36.9,3C36.9,3,36.9,3,36.9,3ZM37.7,5.7C37.7,6.2522802,38.1477,6.6999998,38.7,6.6999998C39.2523,6.6999998,39.7,6.2522802,39.7,5.7C39.7,5.7,37.7,5.7,37.7,5.7C37.7,5.7,37.7,5.7,37.7,5.7ZM29.7,13.7C29.7,13.7,28.8,13.7,28.8,13.7C28.8,13.7,28.8,15.7,28.8,15.7C28.8,15.7,29.7,15.7,29.7,15.7C29.7,15.7,29.7,13.7,29.7,13.7C29.7,13.7,29.7,13.7,29.7,13.7ZM28.8,13.7C28.5878301,13.7,28.38434,13.6157,28.2343099,13.4657C28.2343099,13.4657,26.82010102,14.8799,26.82010102,14.8799C27.345203,15.405,28.057389999999998,15.7,28.8,15.7C28.8,15.7,28.8,13.7,28.8,13.7C28.8,13.7,28.8,13.7,28.8,13.7ZM28.2343099,13.4657C28.08429,13.3157,28,13.1122,28,12.9C28,12.9,26,12.9,26,12.9C26,13.6426,26.294999,14.3548,26.82010102,14.8799C26.82010102,14.8799,28.2343099,13.4657,28.2343099,13.4657C28.2343099,13.4657,28.2343099,13.4657,28.2343099,13.4657ZM28,12.9C28,12.9,28,4.8,28,4.8C28,4.8,26,4.8,26,4.8C26,4.8,26,12.9,26,12.9C26,12.9,28,12.9,28,12.9C28,12.9,28,12.9,28,12.9ZM28,4.8C28,4.5878301,28.08429,4.38434,28.2343099,4.2343098999999995C28.2343099,4.2343098999999995,26.82010102,2.82010102,26.82010102,2.82010102C26.294999,3.3452029999999997,26,4.05739,26,4.8C26,4.8,28,4.8,28,4.8C28,4.8,28,4.8,28,4.8ZM28.2343099,4.2343098999999995C28.38434,4.08429,28.5878301,4,28.8,4C28.8,4,28.8,2,28.8,2C28.057389999999998,2,27.345203,2.294999,26.82010102,2.82010102C26.82010102,2.82010102,28.2343099,4.2343098999999995,28.2343099,4.2343098999999995C28.2343099,4.2343098999999995,28.2343099,4.2343098999999995,28.2343099,4.2343098999999995ZM28.8,4C28.8,4,36.9,4,36.9,4C36.9,4,36.9,2,36.9,2C36.9,2,28.8,2,28.8,2C28.8,2,28.8,4,28.8,4C28.8,4,28.8,4,28.8,4ZM36.9,4C37.1122,4,37.3157,4.08429,37.4657,4.2343098999999995C37.4657,4.2343098999999995,38.8799,2.82010102,38.8799,2.82010102C38.3548,2.294999,37.6426,2,36.9,2C36.9,2,36.9,4,36.9,4C36.9,4,36.9,4,36.9,4ZM37.4657,4.2343098999999995C37.615700000000004,4.38434,37.7,4.5878301,37.7,4.8C37.7,4.8,39.7,4.8,39.7,4.8C39.7,4.05739,39.405,3.3452029999999997,38.8799,2.82010102C38.8799,2.82010102,37.4657,4.2343098999999995,37.4657,4.2343098999999995C37.4657,4.2343098999999995,37.4657,4.2343098999999995,37.4657,4.2343098999999995ZM37.7,4.8C37.7,4.8,37.7,5.7,37.7,5.7C37.7,5.7,39.7,5.7,39.7,5.7C39.7,5.7,39.7,4.8,39.7,4.8C39.7,4.8,37.7,4.8,37.7,4.8C37.7,4.8,37.7,4.8,37.7,4.8Z" fill="#94979E" fill-opacity="1"/></g></svg>
|
|
40
56
|
</span>
|
|
41
|
-
|
|
57
|
+
<span class="action-btn" title="修改" @click="editMessage(item)">
|
|
42
58
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="20" height="20" viewBox="0 0 24 24"><path d="M21.4545,8.3636398C22.181801,7.6363597,22.181801,6.5454497,21.4545,5.818179799999999C21.4545,5.818179799999999,18.181801,2.5454547400000003,18.181801,2.5454547400000003C17.4545,1.81818175,16.363599999999998,1.81818175,15.6364,2.5454547400000003C15.6364,2.5454547400000003,2,16.181800000000003,2,16.181800000000003C2,16.181800000000003,2,22,2,22C2,22,7.8181801,22,7.8181801,22C7.8181801,22,21.4545,8.3636398,21.4545,8.3636398ZM16.909100000000002,3.8181797C16.909100000000002,3.8181797,20.181801,7.09091,20.181801,7.09091C20.181801,7.09091,17.4545,9.8181796,17.4545,9.8181796C17.4545,9.8181796,14.1818,6.5454497,14.1818,6.5454497C14.1818,6.5454497,16.909100000000002,3.8181797,16.909100000000002,3.8181797ZM3.81818,20.181799C3.81818,20.181799,3.81818,16.909100000000002,3.81818,16.909100000000002C3.81818,16.909100000000002,12.9091,7.8181796,12.9091,7.8181796C12.9091,7.8181796,16.181800000000003,11.09091,16.181800000000003,11.09091C16.181800000000003,11.09091,7.09091,20.181799,7.09091,20.181799C7.09091,20.181799,3.81818,20.181799,3.81818,20.181799Z" fill="#94979E" fill-opacity="1"/></svg>
|
|
43
59
|
</span>
|
|
44
|
-
|
|
60
|
+
<span class="action-btn" title="收藏" @click="favoriteMessage(item)">
|
|
45
61
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="20" height="20" viewBox="0 0 24 24"><path d="M21.9251463125,8.9689453225C21.9251463125,8.5271173125,21.5670453125,8.1689453125,21.1252463125,8.1689453125C20.6833453125,8.1689453125,20.3251453125,8.5271173125,20.3251453125,8.9689453225C20.3251453125,8.9689453225,21.9251463125,8.9689453225,21.9251463125,8.9689453225C21.9251463125,8.9689453225,21.9251463125,8.9689453225,21.9251463125,8.9689453225ZM4.9064453225,18.2314453125C4.4646173125,18.2314453125,4.1064453125,18.5896153125,4.1064453125,19.0314453125C4.1064453125,19.473245312499998,4.4646173125,19.8314453125,4.9064453225,19.8314453125C4.9064453225,19.8314453125,4.9064453225,18.2314453125,4.9064453225,18.2314453125C4.9064453225,18.2314453125,4.9064453225,18.2314453125,4.9064453225,18.2314453125ZM20.3251453125,8.9689453225C20.3251453125,8.9689453225,20.3251453125,18.0314455125,20.3251453125,18.0314455125C20.3251453125,18.0314455125,21.9251463125,18.0314455125,21.9251463125,18.0314455125C21.9251463125,18.0314455125,21.9251463125,8.9689453225,21.9251463125,8.9689453225C21.9251463125,8.9689453225,20.3251453125,8.9689453225,20.3251453125,8.9689453225C20.3251453125,8.9689453225,20.3251453125,8.9689453225,20.3251453125,8.9689453225ZM20.1252463125,18.2314453125C20.1252463125,18.2314453125,4.9064453225,18.2314453125,4.9064453225,18.2314453125C4.9064453225,18.2314453125,4.9064453225,19.8314453125,4.9064453225,19.8314453125C4.9064453225,19.8314453125,20.1252463125,19.8314453125,20.1252463125,19.8314453125C20.1252463125,19.8314453125,20.1252463125,18.2314453125,20.1252463125,18.2314453125C20.1252463125,18.2314453125,20.1252463125,18.2314453125,20.1252463125,18.2314453125ZM20.3251453125,18.0314455125C20.3251453125,18.1419058125,20.2356453125,18.2314453125,20.1252463125,18.2314453125C20.1252463125,18.2314453125,20.1252463125,19.8314453125,20.1252463125,19.8314453125C21.1193443125,19.8314453125,21.9251463125,19.0255453125,21.9251463125,18.0314455125C21.9251463125,18.0314455125,20.3251453125,18.0314455125,20.3251453125,18.0314455125C20.3251453125,18.0314455125,20.3251453125,18.0314455125,20.3251453125,18.0314455125Z" fill="#94979E" fill-opacity="1"/><rect x="3.800000011920929" y="4.800000011920929" width="14.399999976158142" height="11.399999976158142" rx="1.199999988079071" fill-opacity="0" stroke-opacity="1" stroke="#94979E" fill="none" stroke-width="1.600000023841858"/><path d="M12,8C12,7.44771501,11.552285,7,11,7C10.44771501,7,10,7.44771501,10,8C10,8,12,8,12,8C12,8,12,8,12,8ZM10,13.4000001C10,13.95228,10.44771501,14.4000001,11,14.4000001C11.552285,14.4000001,12,13.95228,12,13.4000001C12,13.4000001,10,13.4000001,10,13.4000001C10,13.4000001,10,13.4000001,10,13.4000001ZM10,8C10,8,10,13.4000001,10,13.4000001C10,13.4000001,12,13.4000001,12,13.4000001C12,13.4000001,12,8,12,8C12,8,10,8,10,8C10,8,10,8,10,8Z" fill="#94979E" fill-opacity="1"/><path d="M16.7001953125,10.701171875C16.7001953125,10.148886885,16.2524803125,9.701171875,15.7001953125,9.701171875C15.1479103225,9.701171875,14.7001953125,10.148886885,14.7001953125,10.701171875C14.7001953125,10.701171875,16.7001953125,10.701171875,16.7001953125,10.701171875C16.7001953125,10.701171875,16.7001953125,10.701171875,16.7001953125,10.701171875ZM14.7001953125,16.101171975C14.7001953125,16.653451875000002,15.1479103225,17.101171975,15.7001953125,17.101171975C16.2524803125,17.101171975,16.7001953125,16.653451875000002,16.7001953125,16.101171975C16.7001953125,16.101171975,14.7001953125,16.101171975,14.7001953125,16.101171975C14.7001953125,16.101171975,14.7001953125,16.101171975,14.7001953125,16.101171975ZM14.7001953125,10.701171875C14.7001953125,10.701171875,14.7001953125,16.101171975,14.7001953125,16.101171975C14.7001953125,16.101171975,16.7001953125,16.101171975,16.7001953125,16.101171975C16.7001953125,16.101171975,16.7001953125,10.701171875,16.7001953125,10.701171875C16.7001953125,10.701171875,14.7001953125,10.701171875,14.7001953125,10.701171875C14.7001953125,10.701171875,14.7001953125,10.701171875,14.7001953125,10.701171875Z" fill="#94979E" fill-opacity="1" transform="matrix(0,1,-1,0,24.4013671875,-4.9990234375)"/></svg>
|
|
46
62
|
</span>
|
|
47
|
-
|
|
63
|
+
<span class="action-btn" title="删除" @click="deleteMessage(item)">
|
|
48
64
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="20" height="20" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_2979_064907"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_2979_064907)"><path d="M3.9000000953674316,5.60009765625C3.3477151053674317,5.60009765625,2.9000000953674316,6.04781266625,2.9000000953674316,6.60009765625C2.9000000953674316,7.1523826562499995,3.3477151053674317,7.60009765625,3.9000000953674316,7.60009765625C3.9000000953674316,7.60009765625,3.9000000953674316,5.60009765625,3.9000000953674316,5.60009765625C3.9000000953674316,5.60009765625,3.9000000953674316,5.60009765625,3.9000000953674316,5.60009765625ZM20.100001095367432,7.60009765625C20.652300095367433,7.60009765625,21.100001095367432,7.1523826562499995,21.100001095367432,6.60009765625C21.100001095367432,6.04781266625,20.652300095367433,5.60009765625,20.100001095367432,5.60009765625C20.100001095367432,5.60009765625,20.100001095367432,7.60009765625,20.100001095367432,7.60009765625C20.100001095367432,7.60009765625,20.100001095367432,7.60009765625,20.100001095367432,7.60009765625ZM3.9000000953674316,7.60009765625C3.9000000953674316,7.60009765625,20.100001095367432,7.60009765625,20.100001095367432,7.60009765625C20.100001095367432,7.60009765625,20.100001095367432,5.60009765625,20.100001095367432,5.60009765625C20.100001095367432,5.60009765625,3.9000000953674316,5.60009765625,3.9000000953674316,5.60009765625C3.9000000953674316,5.60009765625,3.9000000953674316,7.60009765625,3.9000000953674316,7.60009765625C3.9000000953674316,7.60009765625,3.9000000953674316,7.60009765625,3.9000000953674316,7.60009765625Z" fill="#94979E" fill-opacity="1"/><path d="M18.298828220367433,6.5999999C18.298828220367433,6.5999999,19.298828220367433,6.5999999,19.298828220367433,6.5999999C19.298828220367433,6.04772,18.851128220367432,5.5999999,18.298828220367433,5.5999999C18.298828220367433,5.5999999,18.298828220367433,6.5999999,18.298828220367433,6.5999999C18.298828220367433,6.5999999,18.298828220367433,6.5999999,18.298828220367433,6.5999999ZM5.698828220367432,19.200001C5.698828220367432,19.200001,4.698828220367432,19.200001,4.698828220367432,19.200001C4.698828220367432,19.200001,5.698828220367432,19.200001,5.698828220367432,19.200001C5.698828220367432,19.200001,5.698828220367432,19.200001,5.698828220367432,19.200001ZM5.698828220367432,6.5999999C5.698828220367432,6.5999999,5.698828220367432,5.5999999,5.698828220367432,5.5999999C5.146543230367431,5.5999999,4.698828220367432,6.04772,4.698828220367432,6.5999999C4.698828220367432,6.5999999,5.698828220367432,6.5999999,5.698828220367432,6.5999999C5.698828220367432,6.5999999,5.698828220367432,6.5999999,5.698828220367432,6.5999999ZM7.398828220367432,6.5999999C7.398828220367432,7.1522799,7.8465483203674316,7.5999999,8.398828220367431,7.5999999C8.951108420367433,7.5999999,9.398828020367432,7.1522799,9.398828020367432,6.5999999C9.398828020367432,6.5999999,7.398828220367432,6.5999999,7.398828220367432,6.5999999C7.398828220367432,6.5999999,7.398828220367432,6.5999999,7.398828220367432,6.5999999ZM10.198828220367432,3C10.198828220367432,3,10.198828220367432,2,10.198828220367432,2C10.198828220367432,2,10.198828220367432,3,10.198828220367432,3C10.198828220367432,3,10.198828220367432,3,10.198828220367432,3ZM13.798828620367432,3C13.798828620367432,3,13.798828620367432,2,13.798828620367432,2C13.798828620367432,2,13.798828620367432,3,13.798828620367432,3C13.798828620367432,3,13.798828620367432,3,13.798828620367432,3ZM14.59882782036743,6.5999999C14.59882782036743,7.1522799,15.046548220367432,7.5999999,15.598828220367432,7.5999999C16.151128220367433,7.5999999,16.59882822036743,7.1522799,16.59882822036743,6.5999999C16.59882822036743,6.5999999,14.59882782036743,6.5999999,14.59882782036743,6.5999999C14.59882782036743,6.5999999,14.59882782036743,6.5999999,14.59882782036743,6.5999999ZM17.298828220367433,6.5999999C17.298828220367433,6.5999999,17.298828220367433,19.200001,17.298828220367433,19.200001C17.298828220367433,19.200001,19.298828220367433,19.200001,19.298828220367433,19.200001C19.298828220367433,19.200001,19.298828220367433,6.5999999,19.298828220367433,6.5999999C19.298828220367433,6.5999999,17.298828220367433,6.5999999,17.298828220367433,6.5999999C17.298828220367433,6.5999999,17.298828220367433,6.5999999,17.298828220367433,6.5999999ZM17.298828220367433,19.200001C17.298828220367433,19.412201,17.214528220367434,19.6157,17.064528220367432,19.765699C17.064528220367432,19.765699,18.47872822036743,21.179899,18.47872822036743,21.179899C19.00382822036743,20.6548,19.298828220367433,19.9426,19.298828220367433,19.200001C19.298828220367433,19.200001,17.298828220367433,19.200001,17.298828220367433,19.200001C17.298828220367433,19.200001,17.298828220367433,19.200001,17.298828220367433,19.200001ZM17.064528220367432,19.765699C16.91452822036743,19.915701,16.71102822036743,20,16.498828220367432,20C16.498828220367432,20,16.498828220367432,22,16.498828220367432,22C17.241428220367432,22,17.95362822036743,21.705,18.47872822036743,21.179899C18.47872822036743,21.179899,17.064528220367432,19.765699,17.064528220367432,19.765699C17.064528220367432,19.765699,17.064528220367432,19.765699,17.064528220367432,19.765699ZM16.498828220367432,20C16.498828220367432,20,7.4988282203674315,20,7.4988282203674315,20C7.4988282203674315,20,7.4988282203674315,22,7.4988282203674315,22C7.4988282203674315,22,16.498828220367432,22,16.498828220367432,22C16.498828220367432,22,16.498828220367432,20,16.498828220367432,20C16.498828220367432,20,16.498828220367432,20,16.498828220367432,20ZM7.4988282203674315,20C7.286658320367431,20,7.0831682203674315,19.915701,6.933138120367431,19.765699C6.933138120367431,19.765699,5.518929240367432,21.179899,5.518929240367432,21.179899C6.044031220367431,21.705,6.7562182203674315,22,7.4988282203674315,22C7.4988282203674315,22,7.4988282203674315,20,7.4988282203674315,20C7.4988282203674315,20,7.4988282203674315,20,7.4988282203674315,20ZM6.933138120367431,19.765699C6.783118220367432,19.6157,6.698828220367432,19.412201,6.698828220367432,19.200001C6.698828220367432,19.200001,4.698828220367432,19.200001,4.698828220367432,19.200001C4.698828220367432,19.9426,4.993827220367431,20.6548,5.518929240367432,21.179899C5.518929240367432,21.179899,6.933138120367431,19.765699,6.933138120367431,19.765699C6.933138120367431,19.765699,6.933138120367431,19.765699,6.933138120367431,19.765699ZM6.698828220367432,19.200001C6.698828220367432,19.200001,6.698828220367432,6.5999999,6.698828220367432,6.5999999C6.698828220367432,6.5999999,4.698828220367432,6.5999999,4.698828220367432,6.5999999C4.698828220367432,6.5999999,4.698828220367432,19.200001,4.698828220367432,19.200001C4.698828220367432,19.200001,6.698828220367432,19.200001,6.698828220367432,19.200001C6.698828220367432,19.200001,6.698828220367432,19.200001,6.698828220367432,19.200001ZM5.698828220367432,7.5999999C5.698828220367432,7.5999999,18.298828220367433,7.5999999,18.298828220367433,7.5999999C18.298828220367433,7.5999999,18.298828220367433,5.5999999,18.298828220367433,5.5999999C18.298828220367433,5.5999999,5.698828220367432,5.5999999,5.698828220367432,5.5999999C5.698828220367432,5.5999999,5.698828220367432,7.5999999,5.698828220367432,7.5999999C5.698828220367432,7.5999999,5.698828220367432,7.5999999,5.698828220367432,7.5999999ZM9.398828020367432,6.5999999C9.398828020367432,6.5999999,9.398828020367432,4.8,9.398828020367432,4.8C9.398828020367432,4.8,7.398828220367432,4.8,7.398828220367432,4.8C7.398828220367432,4.8,7.398828220367432,6.5999999,7.398828220367432,6.5999999C7.398828220367432,6.5999999,9.398828020367432,6.5999999,9.398828020367432,6.5999999C9.398828020367432,6.5999999,9.398828020367432,6.5999999,9.398828020367432,6.5999999ZM9.398828020367432,4.8C9.398828020367432,4.5878301,9.483118020367431,4.38434,9.633138220367432,4.2343098999999995C9.633138220367432,4.2343098999999995,8.218928320367432,2.82010102,8.218928320367432,2.82010102C7.6938281203674315,3.345202,7.398828220367432,4.05739,7.398828220367432,4.8C7.398828220367432,4.8,9.398828020367432,4.8,9.398828020367432,4.8C9.398828020367432,4.8,9.398828020367432,4.8,9.398828020367432,4.8ZM9.633138220367432,4.2343098999999995C9.783168320367432,4.08429,9.986658120367432,4,10.198828220367432,4C10.198828220367432,4,10.198828220367432,2,10.198828220367432,2C9.456218220367433,2,8.744028120367432,2.294999,8.218928320367432,2.82010102C8.218928320367432,2.82010102,9.633138220367432,4.2343098999999995,9.633138220367432,4.2343098999999995C9.633138220367432,4.2343098999999995,9.633138220367432,4.2343098999999995,9.633138220367432,4.2343098999999995ZM10.198828220367432,4C10.198828220367432,4,13.798828620367432,4,13.798828620367432,4C13.798828620367432,4,13.798828620367432,2,13.798828620367432,2C13.798828620367432,2,10.198828220367432,2,10.198828220367432,2C10.198828220367432,2,10.198828220367432,4,10.198828220367432,4C10.198828220367432,4,10.198828220367432,4,10.198828220367432,4ZM13.798828620367432,4C14.010998220367432,4,14.214488520367432,4.08429,14.364518620367432,4.2343098999999995C14.364518620367432,4.2343098999999995,15.778728220367432,2.82010102,15.778728220367432,2.82010102C15.253628220367432,2.294999,14.541438620367432,2,13.798828620367432,2C13.798828620367432,2,13.798828620367432,4,13.798828620367432,4C13.798828620367432,4,13.798828620367432,4,13.798828620367432,4ZM14.364518620367432,4.2343098999999995C14.514538320367432,4.38434,14.59882782036743,4.5878301,14.59882782036743,4.8C14.59882782036743,4.8,16.59882822036743,4.8,16.59882822036743,4.8C16.59882822036743,4.05739,16.303828220367432,3.345202,15.778728220367432,2.82010102C15.778728220367432,2.82010102,14.364518620367432,4.2343098999999995,14.364518620367432,4.2343098999999995C14.364518620367432,4.2343098999999995,14.364518620367432,4.2343098999999995,14.364518620367432,4.2343098999999995ZM14.59882782036743,4.8C14.59882782036743,4.8,14.59882782036743,6.5999999,14.59882782036743,6.5999999C14.59882782036743,6.5999999,16.59882822036743,6.5999999,16.59882822036743,6.5999999C16.59882822036743,6.5999999,16.59882822036743,4.8,16.59882822036743,4.8C16.59882822036743,4.8,14.59882782036743,4.8,14.59882782036743,4.8C14.59882782036743,4.8,14.59882782036743,4.8,14.59882782036743,4.8Z" fill="#94979E" fill-opacity="1"/><path d="M11.198828220367432,11.10009765625C11.198828220367432,10.54781266625,10.751113220367431,10.10009765625,10.198828220367432,10.10009765625C9.646543230367431,10.10009765625,9.198828220367432,10.54781266625,9.198828220367432,11.10009765625C9.198828220367432,11.10009765625,11.198828220367432,11.10009765625,11.198828220367432,11.10009765625C11.198828220367432,11.10009765625,11.198828220367432,11.10009765625,11.198828220367432,11.10009765625ZM9.198828220367432,16.50009775625C9.198828220367432,17.052377656250002,9.646543230367431,17.50009775625,10.198828220367432,17.50009775625C10.751113220367431,17.50009775625,11.198828220367432,17.052377656250002,11.198828220367432,16.50009775625C11.198828220367432,16.50009775625,9.198828220367432,16.50009775625,9.198828220367432,16.50009775625C9.198828220367432,16.50009775625,9.198828220367432,16.50009775625,9.198828220367432,16.50009775625ZM9.198828220367432,11.10009765625C9.198828220367432,11.10009765625,9.198828220367432,16.50009775625,9.198828220367432,16.50009775625C9.198828220367432,16.50009775625,11.198828220367432,16.50009775625,11.198828220367432,16.50009775625C11.198828220367432,16.50009775625,11.198828220367432,11.10009765625,11.198828220367432,11.10009765625C11.198828220367432,11.10009765625,9.198828220367432,11.10009765625,9.198828220367432,11.10009765625C9.198828220367432,11.10009765625,9.198828220367432,11.10009765625,9.198828220367432,11.10009765625Z" fill="#94979E" fill-opacity="1"/><path d="M14.800390720367432,11.10009765625C14.800390720367432,10.54781266625,14.352675720367431,10.10009765625,13.800390720367432,10.10009765625C13.248105730367431,10.10009765625,12.800390720367432,10.54781266625,12.800390720367432,11.10009765625C12.800390720367432,11.10009765625,14.800390720367432,11.10009765625,14.800390720367432,11.10009765625C14.800390720367432,11.10009765625,14.800390720367432,11.10009765625,14.800390720367432,11.10009765625ZM12.800390720367432,16.50009775625C12.800390720367432,17.052377656250002,13.248105730367431,17.50009775625,13.800390720367432,17.50009775625C14.352675720367431,17.50009775625,14.800390720367432,17.052377656250002,14.800390720367432,16.50009775625C14.800390720367432,16.50009775625,12.800390720367432,16.50009775625,12.800390720367432,16.50009775625C12.800390720367432,16.50009775625,12.800390720367432,16.50009775625,12.800390720367432,16.50009775625ZM12.800390720367432,11.10009765625C12.800390720367432,11.10009765625,12.800390720367432,16.50009775625,12.800390720367432,16.50009775625C12.800390720367432,16.50009775625,14.800390720367432,16.50009775625,14.800390720367432,16.50009775625C14.800390720367432,16.50009775625,14.800390720367432,11.10009765625,14.800390720367432,11.10009765625C14.800390720367432,11.10009765625,12.800390720367432,11.10009765625,12.800390720367432,11.10009765625C12.800390720367432,11.10009765625,12.800390720367432,11.10009765625,12.800390720367432,11.10009765625Z" fill="#94979E" fill-opacity="1"/></g></svg>
|
|
49
65
|
</span>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
66
|
+
</div>
|
|
67
|
+
<!-- AI消息操作按钮 - 当前正在输出的消息等渲染完成后再显示 -->
|
|
68
|
+
<div v-if="item.type === 'ai' && (!isAiStreaming || index !== displayItems.length - 1)" class="message-actions ai-actions">
|
|
53
69
|
<span class="action-btn" title="复制" @click="copyMessage(item)">
|
|
54
70
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="20" height="20" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_2979_064909"><rect x="24" y="0" width="24" height="24" rx="0"/></clipPath></defs><g transform="matrix(0,1,-1,0,24,-24)" clip-path="url(#master_svg0_2979_064909)"><path d="M35.0998046875,10.30078125C35.0998046875,10.30078125,43.1998046875,10.30078125,43.1998046875,10.30078125C43.1998046875,10.30078125,43.1998046875,8.30078125,43.1998046875,8.30078125C43.1998046875,8.30078125,35.0998046875,8.30078125,35.0998046875,8.30078125C35.0998046875,8.30078125,35.0998046875,10.30078125,35.0998046875,10.30078125C35.0998046875,10.30078125,35.0998046875,10.30078125,35.0998046875,10.30078125ZM43.1998046875,10.30078125C43.6416046875,10.30078125,43.9998046875,10.65895125,43.9998046875,11.10078125C43.9998046875,11.10078125,45.9998046875,11.10078125,45.9998046875,11.10078125C45.9998046875,9.55438425,44.7462046875,8.30078125,43.1998046875,8.30078125C43.1998046875,8.30078125,43.1998046875,10.30078125,43.1998046875,10.30078125C43.1998046875,10.30078125,43.1998046875,10.30078125,43.1998046875,10.30078125ZM43.9998046875,11.10078125C43.9998046875,11.10078125,43.9998046875,19.20078125,43.9998046875,19.20078125C43.9998046875,19.20078125,45.9998046875,19.20078125,45.9998046875,19.20078125C45.9998046875,19.20078125,45.9998046875,11.10078125,45.9998046875,11.10078125C45.9998046875,11.10078125,43.9998046875,11.10078125,43.9998046875,11.10078125C43.9998046875,11.10078125,43.9998046875,11.10078125,43.9998046875,11.10078125ZM43.9998046875,19.20078125C43.9998046875,19.64258125,43.6416046875,20.00078125,43.1998046875,20.00078125C43.1998046875,20.00078125,43.1998046875,22.00078125,43.1998046875,22.00078125C44.7462046875,22.00078125,45.9998046875,20.74718125,45.9998046875,19.20078125C45.9998046875,19.20078125,43.9998046875,19.20078125,43.9998046875,19.20078125C43.9998046875,19.20078125,43.9998046875,19.20078125,43.9998046875,19.20078125ZM43.1998046875,20.00078125C43.1998046875,20.00078125,35.0998046875,20.00078125,35.0998046875,20.00078125C35.0998046875,20.00078125,35.0998046875,22.00078125,35.0998046875,22.00078125C35.0998046875,22.00078125,43.1998046875,22.00078125,43.1998046875,22.00078125C43.1998046875,22.00078125,43.1998046875,20.00078125,43.1998046875,20.00078125C43.1998046875,20.00078125,43.1998046875,20.00078125,43.1998046875,20.00078125ZM35.0998046875,20.00078125C34.6579746875,20.00078125,34.2998046875,19.64258125,34.2998046875,19.20078125C34.2998046875,19.20078125,32.2998046875,19.20078125,32.2998046875,19.20078125C32.2998046875,20.74718125,33.5534076875,22.00078125,35.0998046875,22.00078125C35.0998046875,22.00078125,35.0998046875,20.00078125,35.0998046875,20.00078125C35.0998046875,20.00078125,35.0998046875,20.00078125,35.0998046875,20.00078125ZM34.2998046875,19.20078125C34.2998046875,19.20078125,34.2998046875,11.10078125,34.2998046875,11.10078125C34.2998046875,11.10078125,32.2998046875,11.10078125,32.2998046875,11.10078125C32.2998046875,11.10078125,32.2998046875,19.20078125,32.2998046875,19.20078125C32.2998046875,19.20078125,34.2998046875,19.20078125,34.2998046875,19.20078125C34.2998046875,19.20078125,34.2998046875,19.20078125,34.2998046875,19.20078125ZM34.2998046875,11.10078125C34.2998046875,10.65895125,34.6579746875,10.30078125,35.0998046875,10.30078125C35.0998046875,10.30078125,35.0998046875,8.30078125,35.0998046875,8.30078125C33.5534076875,8.30078125,32.2998046875,9.55438425,32.2998046875,11.10078125C32.2998046875,11.10078125,34.2998046875,11.10078125,34.2998046875,11.10078125C34.2998046875,11.10078125,34.2998046875,11.10078125,34.2998046875,11.10078125Z" fill="#94979E" fill-opacity="1"/><path d="M29.7,15.7C30.2522802,15.7,30.6999998,15.2523,30.6999998,14.7C30.6999998,14.1477,30.2522802,13.7,29.7,13.7C29.7,13.7,29.7,15.7,29.7,15.7C29.7,15.7,29.7,15.7,29.7,15.7ZM27,12.9C27,12.9,26,12.9,26,12.9C26,12.9,27,12.9,27,12.9C27,12.9,27,12.9,27,12.9ZM28.8,3C28.8,3,28.8,2,28.8,2C28.8,2,28.8,3,28.8,3C28.8,3,28.8,3,28.8,3ZM36.9,3C36.9,3,36.9,2,36.9,2C36.9,2,36.9,3,36.9,3C36.9,3,36.9,3,36.9,3ZM37.7,5.7C37.7,6.2522802,38.1477,6.6999998,38.7,6.6999998C39.2523,6.6999998,39.7,6.2522802,39.7,5.7C39.7,5.7,37.7,5.7,37.7,5.7C37.7,5.7,37.7,5.7,37.7,5.7ZM29.7,13.7C29.7,13.7,28.8,13.7,28.8,13.7C28.8,13.7,28.8,15.7,28.8,15.7C28.8,15.7,29.7,15.7,29.7,15.7C29.7,15.7,29.7,13.7,29.7,13.7C29.7,13.7,29.7,13.7,29.7,13.7ZM28.8,13.7C28.5878301,13.7,28.38434,13.6157,28.2343099,13.4657C28.2343099,13.4657,26.82010102,14.8799,26.82010102,14.8799C27.345203,15.405,28.057389999999998,15.7,28.8,15.7C28.8,15.7,28.8,13.7,28.8,13.7C28.8,13.7,28.8,13.7,28.8,13.7ZM28.2343099,13.4657C28.08429,13.3157,28,13.1122,28,12.9C28,12.9,26,12.9,26,12.9C26,13.6426,26.294999,14.3548,26.82010102,14.8799C26.82010102,14.8799,28.2343099,13.4657,28.2343099,13.4657C28.2343099,13.4657,28.2343099,13.4657,28.2343099,13.4657ZM28,12.9C28,12.9,28,4.8,28,4.8C28,4.8,26,4.8,26,4.8C26,4.8,26,12.9,26,12.9C26,12.9,28,12.9,28,12.9C28,12.9,28,12.9,28,12.9ZM28,4.8C28,4.5878301,28.08429,4.38434,28.2343099,4.2343098999999995C28.2343099,4.2343098999999995,26.82010102,2.82010102,26.82010102,2.82010102C26.294999,3.3452029999999997,26,4.05739,26,4.8C26,4.8,28,4.8,28,4.8C28,4.8,28,4.8,28,4.8ZM28.2343099,4.2343098999999995C28.38434,4.08429,28.5878301,4,28.8,4C28.8,4,28.8,2,28.8,2C28.057389999999998,2,27.345203,2.294999,26.82010102,2.82010102C26.82010102,2.82010102,28.2343099,4.2343098999999995,28.2343099,4.2343098999999995C28.2343099,4.2343098999999995,28.2343099,4.2343098999999995,28.2343099,4.2343098999999995ZM28.8,4C28.8,4,36.9,4,36.9,4C36.9,4,36.9,2,36.9,2C36.9,2,28.8,2,28.8,2C28.8,2,28.8,4,28.8,4C28.8,4,28.8,4,28.8,4ZM36.9,4C37.1122,4,37.3157,4.08429,37.4657,4.2343098999999995C37.4657,4.2343098999999995,38.8799,2.82010102,38.8799,2.82010102C38.3548,2.294999,37.6426,2,36.9,2C36.9,2,36.9,4,36.9,4C36.9,4,36.9,4,36.9,4ZM37.4657,4.2343098999999995C37.615700000000004,4.38434,37.7,4.5878301,37.7,4.8C37.7,4.8,39.7,4.8,39.7,4.8C39.7,4.05739,39.405,3.3452029999999997,38.8799,2.82010102C38.8799,2.82010102,37.4657,4.2343098999999995,37.4657,4.2343098999999995C37.4657,4.2343098999999995,37.4657,4.2343098999999995,37.4657,4.2343098999999995ZM37.7,4.8C37.7,4.8,37.7,5.7,37.7,5.7C37.7,5.7,39.7,5.7,39.7,5.7C39.7,5.7,39.7,4.8,39.7,4.8C39.7,4.8,37.7,4.8,37.7,4.8C37.7,4.8,37.7,4.8,37.7,4.8Z" fill="#94979E" fill-opacity="1"/></g></svg>
|
|
55
71
|
</span>
|
|
56
|
-
|
|
72
|
+
<span class="action-btn" title="刷新" @click="regenerateAiResponse(item)">
|
|
57
73
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#94979E" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 11-9-9c2.52 0 4.93 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/></svg>
|
|
58
74
|
</span>
|
|
59
|
-
|
|
75
|
+
<span class="action-btn" title="收藏" @click="favoriteMessage(item)">
|
|
60
76
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="20" height="20" viewBox="0 0 24 24"><path d="M21.9251463125,8.9689453225C21.9251463125,8.5271173125,21.5670453125,8.1689453125,21.1252463125,8.1689453125C20.6833453125,8.1689453125,20.3251453125,8.5271173125,20.3251453125,8.9689453225C20.3251453125,8.9689453225,21.9251463125,8.9689453225,21.9251463125,8.9689453225C21.9251463125,8.9689453225,21.9251463125,8.9689453225,21.9251463125,8.9689453225ZM4.9064453225,18.2314453125C4.4646173125,18.2314453125,4.1064453125,18.5896153125,4.1064453125,19.0314453125C4.1064453125,19.473245312499998,4.4646173125,19.8314453125,4.9064453225,19.8314453125C4.9064453225,19.8314453125,4.9064453225,18.2314453125,4.9064453225,18.2314453125C4.9064453225,18.2314453125,4.9064453225,18.2314453125,4.9064453225,18.2314453125ZM20.3251453125,8.9689453225C20.3251453125,8.9689453225,20.3251453125,18.0314455125,20.3251453125,18.0314455125C20.3251453125,18.0314455125,21.9251463125,18.0314455125,21.9251463125,18.0314455125C21.9251463125,18.0314455125,21.9251463125,8.9689453225,21.9251463125,8.9689453225C21.9251463125,8.9689453225,20.3251453125,8.9689453225,20.3251453125,8.9689453225C20.3251453125,8.9689453225,20.3251453125,8.9689453225,20.3251453125,8.9689453225ZM20.1252463125,18.2314453125C20.1252463125,18.2314453125,4.9064453225,18.2314453125,4.9064453225,18.2314453125C4.9064453225,18.2314453125,4.9064453225,19.8314453125,4.9064453225,19.8314453125C4.9064453225,19.8314453125,20.1252463125,19.8314453125,20.1252463125,19.8314453125C20.1252463125,19.8314453125,20.1252463125,18.2314453125,20.1252463125,18.2314453125C20.1252463125,18.2314453125,20.1252463125,18.2314453125,20.1252463125,18.2314453125ZM20.3251453125,18.0314455125C20.3251453125,18.1419058125,20.2356453125,18.2314453125,20.1252463125,18.2314453125C20.1252463125,18.2314453125,20.1252463125,19.8314453125,20.1252463125,19.8314453125C21.1193443125,19.8314453125,21.9251463125,19.0255453125,21.9251463125,18.0314455125C21.9251463125,18.0314455125,20.3251453125,18.0314455125,20.3251453125,18.0314455125C20.3251453125,18.0314455125,20.3251453125,18.0314455125,20.3251453125,18.0314455125Z" fill="#94979E" fill-opacity="1"/><rect x="3.800000011920929" y="4.800000011920929" width="14.399999976158142" height="11.399999976158142" rx="1.199999988079071" fill-opacity="0" stroke-opacity="1" stroke="#94979E" fill="none" stroke-width="1.600000023841858"/><path d="M12,8C12,7.44771501,11.552285,7,11,7C10.44771501,7,10,7.44771501,10,8C10,8,12,8,12,8C12,8,12,8,12,8ZM10,13.4000001C10,13.95228,10.44771501,14.4000001,11,14.4000001C11.552285,14.4000001,12,13.95228,12,13.4000001C12,13.4000001,10,13.4000001,10,13.4000001C10,13.4000001,10,13.4000001,10,13.4000001ZM10,8C10,8,10,13.4000001,10,13.4000001C10,13.4000001,12,13.4000001,12,13.4000001C12,13.4000001,12,8,12,8C12,8,10,8,10,8C10,8,10,8,10,8Z" fill="#94979E" fill-opacity="1"/><path d="M16.7001953125,10.701171875C16.7001953125,10.148886885,16.2524803125,9.701171875,15.7001953125,9.701171875C15.1479103225,9.701171875,14.7001953125,10.148886885,14.7001953125,10.701171875C14.7001953125,10.701171875,16.7001953125,10.701171875,16.7001953125,10.701171875C16.7001953125,10.701171875,16.7001953125,10.701171875,16.7001953125,10.701171875ZM14.7001953125,16.101171975C14.7001953125,16.653451875000002,15.1479103225,17.101171975,15.7001953125,17.101171975C16.2524803125,17.101171975,16.7001953125,16.653451875000002,16.7001953125,16.101171975C16.7001953125,16.101171975,14.7001953125,16.101171975,14.7001953125,16.101171975C14.7001953125,16.101171975,14.7001953125,16.101171975,14.7001953125,16.101171975ZM14.7001953125,10.701171875C14.7001953125,10.701171875,14.7001953125,16.101171975,14.7001953125,16.101171975C14.7001953125,16.101171975,16.7001953125,16.101171975,16.7001953125,16.101171975C16.7001953125,16.101171975,16.7001953125,10.701171875,16.7001953125,10.701171875C16.7001953125,10.701171875,14.7001953125,10.701171875,14.7001953125,10.701171875C14.7001953125,10.701171875,14.7001953125,10.701171875,14.7001953125,10.701171875Z" fill="#94979E" fill-opacity="1" transform="matrix(0,1,-1,0,24.4013671875,-4.9990234375)"/></svg>
|
|
61
77
|
</span>
|
|
62
|
-
|
|
78
|
+
<span class="action-btn" title="删除" @click="deleteMessage(item)">
|
|
63
79
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="20" height="20" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_2979_064907"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_2979_064907)"><path d="M3.9000000953674316,5.60009765625C3.3477151053674317,5.60009765625,2.9000000953674316,6.04781266625,2.9000000953674316,6.60009765625C2.9000000953674316,7.1523826562499995,3.3477151053674317,7.60009765625,3.9000000953674316,7.60009765625C3.9000000953674316,7.60009765625,3.9000000953674316,5.60009765625,3.9000000953674316,5.60009765625C3.9000000953674316,5.60009765625,3.9000000953674316,5.60009765625,3.9000000953674316,5.60009765625ZM20.100001095367432,7.60009765625C20.652300095367433,7.60009765625,21.100001095367432,7.1523826562499995,21.100001095367432,6.60009765625C21.100001095367432,6.04781266625,20.652300095367433,5.60009765625,20.100001095367432,5.60009765625C20.100001095367432,5.60009765625,20.100001095367432,7.60009765625,20.100001095367432,7.60009765625C20.100001095367432,7.60009765625,20.100001095367432,7.60009765625,20.100001095367432,7.60009765625ZM3.9000000953674316,7.60009765625C3.9000000953674316,7.60009765625,20.100001095367432,7.60009765625,20.100001095367432,7.60009765625C20.100001095367432,7.60009765625,20.100001095367432,5.60009765625,20.100001095367432,5.60009765625C20.100001095367432,5.60009765625,3.9000000953674316,5.60009765625,3.9000000953674316,5.60009765625C3.9000000953674316,5.60009765625,3.9000000953674316,7.60009765625,3.9000000953674316,7.60009765625C3.9000000953674316,7.60009765625,3.9000000953674316,7.60009765625,3.9000000953674316,7.60009765625Z" fill="#94979E" fill-opacity="1"/><path d="M18.298828220367433,6.5999999C18.298828220367433,6.5999999,19.298828220367433,6.5999999,19.298828220367433,6.5999999C19.298828220367433,6.04772,18.851128220367432,5.5999999,18.298828220367433,5.5999999C18.298828220367433,5.5999999,18.298828220367433,6.5999999,18.298828220367433,6.5999999C18.298828220367433,6.5999999,18.298828220367433,6.5999999,18.298828220367433,6.5999999ZM5.698828220367432,19.200001C5.698828220367432,19.200001,4.698828220367432,19.200001,4.698828220367432,19.200001C4.698828220367432,19.200001,5.698828220367432,19.200001,5.698828220367432,19.200001C5.698828220367432,19.200001,5.698828220367432,19.200001,5.698828220367432,19.200001ZM5.698828220367432,6.5999999C5.698828220367432,6.5999999,5.698828220367432,5.5999999,5.698828220367432,5.5999999C5.146543230367431,5.5999999,4.698828220367432,6.04772,4.698828220367432,6.5999999C4.698828220367432,6.5999999,5.698828220367432,6.5999999,5.698828220367432,6.5999999C5.698828220367432,6.5999999,5.698828220367432,6.5999999,5.698828220367432,6.5999999ZM7.398828220367432,6.5999999C7.398828220367432,7.1522799,7.8465483203674316,7.5999999,8.398828220367431,7.5999999C8.951108420367433,7.5999999,9.398828020367432,7.1522799,9.398828020367432,6.5999999C9.398828020367432,6.5999999,7.398828220367432,6.5999999,7.398828220367432,6.5999999C7.398828220367432,6.5999999,7.398828220367432,6.5999999,7.398828220367432,6.5999999ZM10.198828220367432,3C10.198828220367432,3,10.198828220367432,2,10.198828220367432,2C10.198828220367432,2,10.198828220367432,3,10.198828220367432,3C10.198828220367432,3,10.198828220367432,3,10.198828220367432,3ZM13.798828620367432,3C13.798828620367432,3,13.798828620367432,2,13.798828620367432,2C13.798828620367432,2,13.798828620367432,3,13.798828620367432,3C13.798828620367432,3,13.798828620367432,3,13.798828620367432,3ZM14.59882782036743,6.5999999C14.59882782036743,7.1522799,15.046548220367432,7.5999999,15.598828220367432,7.5999999C16.151128220367433,7.5999999,16.59882822036743,7.1522799,16.59882822036743,6.5999999C16.59882822036743,6.5999999,14.59882782036743,6.5999999,14.59882782036743,6.5999999C14.59882782036743,6.5999999,14.59882782036743,6.5999999,14.59882782036743,6.5999999ZM17.298828220367433,6.5999999C17.298828220367433,6.5999999,17.298828220367433,19.200001,17.298828220367433,19.200001C17.298828220367433,19.200001,19.298828220367433,19.200001,19.298828220367433,19.200001C19.298828220367433,19.200001,19.298828220367433,6.5999999,19.298828220367433,6.5999999C19.298828220367433,6.5999999,17.298828220367433,6.5999999,17.298828220367433,6.5999999C17.298828220367433,6.5999999,17.298828220367433,6.5999999,17.298828220367433,6.5999999ZM17.298828220367433,19.200001C17.298828220367433,19.412201,17.214528220367434,19.6157,17.064528220367432,19.765699C17.064528220367432,19.765699,18.47872822036743,21.179899,18.47872822036743,21.179899C19.00382822036743,20.6548,19.298828220367433,19.9426,19.298828220367433,19.200001C19.298828220367433,19.200001,17.298828220367433,19.200001,17.298828220367433,19.200001C17.298828220367433,19.200001,17.298828220367433,19.200001,17.298828220367433,19.200001ZM17.064528220367432,19.765699C16.91452822036743,19.915701,16.71102822036743,20,16.498828220367432,20C16.498828220367432,20,16.498828220367432,22,16.498828220367432,22C17.241428220367432,22,17.95362822036743,21.705,18.47872822036743,21.179899C18.47872822036743,21.179899,17.064528220367432,19.765699,17.064528220367432,19.765699C17.064528220367432,19.765699,17.064528220367432,19.765699,17.064528220367432,19.765699ZM16.498828220367432,20C16.498828220367432,20,7.4988282203674315,20,7.4988282203674315,20C7.4988282203674315,20,7.4988282203674315,22,7.4988282203674315,22C7.4988282203674315,22,16.498828220367432,22,16.498828220367432,22C16.498828220367432,22,16.498828220367432,20,16.498828220367432,20C16.498828220367432,20,16.498828220367432,20,16.498828220367432,20ZM7.4988282203674315,20C7.286658320367431,20,7.0831682203674315,19.915701,6.933138120367431,19.765699C6.933138120367431,19.765699,5.518929240367432,21.179899,5.518929240367432,21.179899C6.044031220367431,21.705,6.7562182203674315,22,7.4988282203674315,22C7.4988282203674315,22,7.4988282203674315,20,7.4988282203674315,20C7.4988282203674315,20,7.4988282203674315,20,7.4988282203674315,20ZM6.933138120367431,19.765699C6.783118220367432,19.6157,6.698828220367432,19.412201,6.698828220367432,19.200001C6.698828220367432,19.200001,4.698828220367432,19.200001,4.698828220367432,19.200001C4.698828220367432,19.9426,4.993827220367431,20.6548,5.518929240367432,21.179899C5.518929240367432,21.179899,6.933138120367431,19.765699,6.933138120367431,19.765699C6.933138120367431,19.765699,6.933138120367431,19.765699,6.933138120367431,19.765699ZM6.698828220367432,19.200001C6.698828220367432,19.200001,6.698828220367432,6.5999999,6.698828220367432,6.5999999C6.698828220367432,6.5999999,4.698828220367432,6.5999999,4.698828220367432,6.5999999C4.698828220367432,6.5999999,4.698828220367432,19.200001,4.698828220367432,19.200001C4.698828220367432,19.200001,6.698828220367432,19.200001,6.698828220367432,19.200001C6.698828220367432,19.200001,6.698828220367432,19.200001,6.698828220367432,19.200001ZM5.698828220367432,7.5999999C5.698828220367432,7.5999999,18.298828220367433,7.5999999,18.298828220367433,7.5999999C18.298828220367433,7.5999999,18.298828220367433,5.5999999,18.298828220367433,5.5999999C18.298828220367433,5.5999999,5.698828220367432,5.5999999,5.698828220367432,5.5999999C5.698828220367432,5.5999999,5.698828220367432,7.5999999,5.698828220367432,7.5999999C5.698828220367432,7.5999999,5.698828220367432,7.5999999,5.698828220367432,7.5999999ZM9.398828020367432,6.5999999C9.398828020367432,6.5999999,9.398828020367432,4.8,9.398828020367432,4.8C9.398828020367432,4.8,7.398828220367432,4.8,7.398828220367432,4.8C7.398828220367432,4.8,7.398828220367432,6.5999999,7.398828220367432,6.5999999C7.398828220367432,6.5999999,9.398828020367432,6.5999999,9.398828020367432,6.5999999C9.398828020367432,6.5999999,9.398828020367432,6.5999999,9.398828020367432,6.5999999ZM9.398828020367432,4.8C9.398828020367432,4.5878301,9.483118020367431,4.38434,9.633138220367432,4.2343098999999995C9.633138220367432,4.2343098999999995,8.218928320367432,2.82010102,8.218928320367432,2.82010102C7.6938281203674315,3.345202,7.398828220367432,4.05739,7.398828220367432,4.8C7.398828220367432,4.8,9.398828020367432,4.8,9.398828020367432,4.8C9.398828020367432,4.8,9.398828020367432,4.8,9.398828020367432,4.8ZM9.633138220367432,4.2343098999999995C9.783168320367432,4.08429,9.986658120367432,4,10.198828220367432,4C10.198828220367432,4,10.198828220367432,2,10.198828220367432,2C9.456218220367433,2,8.744028120367432,2.294999,8.218928320367432,2.82010102C8.218928320367432,2.82010102,9.633138220367432,4.2343098999999995,9.633138220367432,4.2343098999999995C9.633138220367432,4.2343098999999995,9.633138220367432,4.2343098999999995,9.633138220367432,4.2343098999999995ZM10.198828220367432,4C10.198828220367432,4,13.798828620367432,4,13.798828620367432,4C13.798828620367432,4,13.798828620367432,2,13.798828620367432,2C13.798828620367432,2,10.198828220367432,2,10.198828220367432,2C10.198828220367432,2,10.198828220367432,4,10.198828220367432,4C10.198828220367432,4,10.198828220367432,4,10.198828220367432,4ZM13.798828620367432,4C14.010998220367432,4,14.214488520367432,4.08429,14.364518620367432,4.2343098999999995C14.364518620367432,4.2343098999999995,15.778728220367432,2.82010102,15.778728220367432,2.82010102C15.253628220367432,2.294999,14.541438620367432,2,13.798828620367432,2C13.798828620367432,2,13.798828620367432,4,13.798828620367432,4C13.798828620367432,4,13.798828620367432,4,13.798828620367432,4ZM14.364518620367432,4.2343098999999995C14.514538320367432,4.38434,14.59882782036743,4.5878301,14.59882782036743,4.8C14.59882782036743,4.8,16.59882822036743,4.8,16.59882822036743,4.8C16.59882822036743,4.05739,16.303828220367432,3.345202,15.778728220367432,2.82010102C15.778728220367432,2.82010102,14.364518620367432,4.2343098999999995,14.364518620367432,4.2343098999999995C14.364518620367432,4.2343098999999995,14.364518620367432,4.2343098999999995,14.364518620367432,4.2343098999999995ZM14.59882782036743,4.8C14.59882782036743,4.8,14.59882782036743,6.5999999,14.59882782036743,6.5999999C14.59882782036743,6.5999999,16.59882822036743,6.5999999,16.59882822036743,6.5999999C16.59882822036743,6.5999999,16.59882822036743,4.8,16.59882822036743,4.8C16.59882822036743,4.8,14.59882782036743,4.8,14.59882782036743,4.8C14.59882782036743,4.8,14.59882782036743,4.8,14.59882782036743,4.8Z" fill="#94979E" fill-opacity="1"/><path d="M11.198828220367432,11.10009765625C11.198828220367432,10.54781266625,10.751113220367431,10.10009765625,10.198828220367432,10.10009765625C9.646543230367431,10.10009765625,9.198828220367432,10.54781266625,9.198828220367432,11.10009765625C9.198828220367432,11.10009765625,11.198828220367432,11.10009765625,11.198828220367432,11.10009765625C11.198828220367432,11.10009765625,11.198828220367432,11.10009765625,11.198828220367432,11.10009765625ZM9.198828220367432,16.50009775625C9.198828220367432,17.052377656250002,9.646543230367431,17.50009775625,10.198828220367432,17.50009775625C10.751113220367431,17.50009775625,11.198828220367432,17.052377656250002,11.198828220367432,16.50009775625C11.198828220367432,16.50009775625,9.198828220367432,16.50009775625,9.198828220367432,16.50009775625C9.198828220367432,16.50009775625,9.198828220367432,16.50009775625,9.198828220367432,16.50009775625ZM9.198828220367432,11.10009765625C9.198828220367432,11.10009765625,9.198828220367432,16.50009775625,9.198828220367432,16.50009775625C9.198828220367432,16.50009775625,11.198828220367432,16.50009775625,11.198828220367432,16.50009775625C11.198828220367432,16.50009775625,11.198828220367432,11.10009765625,11.198828220367432,11.10009765625C11.198828220367432,11.10009765625,9.198828220367432,11.10009765625,9.198828220367432,11.10009765625C9.198828220367432,11.10009765625,9.198828220367432,11.10009765625,9.198828220367432,11.10009765625Z" fill="#94979E" fill-opacity="1"/><path d="M14.800390720367432,11.10009765625C14.800390720367432,10.54781266625,14.352675720367431,10.10009765625,13.800390720367432,10.10009765625C13.248105730367431,10.10009765625,12.800390720367432,10.54781266625,12.800390720367432,11.10009765625C12.800390720367432,11.10009765625,14.800390720367432,11.10009765625,14.800390720367432,11.10009765625C14.800390720367432,11.10009765625,14.800390720367432,11.10009765625,14.800390720367432,11.10009765625ZM12.800390720367432,16.50009775625C12.800390720367432,17.052377656250002,13.248105730367431,17.50009775625,13.800390720367432,17.50009775625C14.352675720367431,17.50009775625,14.800390720367432,17.052377656250002,14.800390720367432,16.50009775625C14.800390720367432,16.50009775625,12.800390720367432,16.50009775625,12.800390720367432,16.50009775625C12.800390720367432,16.50009775625,12.800390720367432,16.50009775625,12.800390720367432,16.50009775625ZM12.800390720367432,11.10009765625C12.800390720367432,11.10009765625,12.800390720367432,16.50009775625,12.800390720367432,16.50009775625C12.800390720367432,16.50009775625,14.800390720367432,16.50009775625,14.800390720367432,16.50009775625C14.800390720367432,16.50009775625,14.800390720367432,11.10009765625,14.800390720367432,11.10009765625C14.800390720367432,11.10009765625,12.800390720367432,11.10009765625,12.800390720367432,11.10009765625C12.800390720367432,11.10009765625,12.800390720367432,11.10009765625,12.800390720367432,11.10009765625Z" fill="#94979E" fill-opacity="1"/></g></svg>
|
|
64
80
|
</span>
|
|
65
|
-
</div>
|
|
66
|
-
<div v-if="item.attachments && item.attachments.length" class="message-attachments">
|
|
67
|
-
<div
|
|
68
|
-
v-for="(file, fileIndex) in item.attachments"
|
|
69
|
-
:key="fileIndex"
|
|
70
|
-
:class="['attachment-item', { 'is-image': file.isImage }]"
|
|
71
|
-
>
|
|
72
|
-
<div v-if="file.isImage" class="image-preview" @click="previewImage(file)">
|
|
73
|
-
<img :src="file.url" :alt="file.name" />
|
|
74
|
-
<span class="image-name">{{ file.name }}</span>
|
|
75
|
-
</div>
|
|
76
|
-
<div v-else class="file-item">
|
|
77
|
-
<a-icon type="file" class="file-icon" />
|
|
78
|
-
<span class="file-name">{{ file.name }}</span>
|
|
79
|
-
</div>
|
|
80
|
-
<a-button
|
|
81
|
-
type="primary"
|
|
82
|
-
shape="circle"
|
|
83
|
-
size="small"
|
|
84
|
-
class="remove-btn"
|
|
85
|
-
@click.stop="removeAttachment(item, fileIndex)"
|
|
86
|
-
>
|
|
87
|
-
<a-icon type="close" />
|
|
88
|
-
</a-button>
|
|
89
81
|
</div>
|
|
90
82
|
</div>
|
|
83
|
+
<span v-if="isAiStreaming && index === displayItems.length - 1 && item.type === 'ai'" class="typing-cursor">▍</span>
|
|
91
84
|
</div>
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
</template>
|
|
85
|
+
</template>
|
|
86
|
+
</div>
|
|
95
87
|
</div>
|
|
96
|
-
</div>
|
|
97
88
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
89
|
+
<div class="bottom-input-wrapper">
|
|
90
|
+
<div class="input-container">
|
|
91
|
+
<!-- 文件预览区域 - 仅当有附件时显示 -->
|
|
92
|
+
<div v-if="pendingAttachments.length" class="attachment-preview-area">
|
|
93
|
+
<div
|
|
94
|
+
v-for="(file, index) in pendingAttachments"
|
|
95
|
+
:key="index"
|
|
96
|
+
:class="['preview-item', { 'is-image': file.isImage }]"
|
|
97
|
+
>
|
|
98
|
+
<div v-if="file.isImage" class="preview-image">
|
|
99
|
+
<img :src="file.url" :alt="file.name" />
|
|
100
|
+
</div>
|
|
101
|
+
<div v-else class="preview-file">
|
|
102
|
+
<a-icon type="file" />
|
|
103
|
+
<span class="preview-file-name">{{ file.name }}</span>
|
|
104
|
+
</div>
|
|
105
|
+
<a-button
|
|
106
|
+
type="primary"
|
|
107
|
+
shape="circle"
|
|
108
|
+
size="small"
|
|
109
|
+
class="preview-remove-btn"
|
|
110
|
+
@click="removePendingAttachment(index)"
|
|
111
|
+
>
|
|
112
|
+
<a-icon type="close" />
|
|
113
|
+
</a-button>
|
|
109
114
|
</div>
|
|
110
|
-
<div
|
|
111
|
-
<
|
|
112
|
-
<span class="preview-file-name">{{ file.name }}</span>
|
|
115
|
+
<div class="add-upload-item" @click="triggerUpload">
|
|
116
|
+
<span class="add-upload-icon">+</span>
|
|
113
117
|
</div>
|
|
114
|
-
<a-button
|
|
115
|
-
type="primary"
|
|
116
|
-
shape="circle"
|
|
117
|
-
size="small"
|
|
118
|
-
class="preview-remove-btn"
|
|
119
|
-
@click="removePendingAttachment(index)"
|
|
120
|
-
>
|
|
121
|
-
<a-icon type="close" />
|
|
122
|
-
</a-button>
|
|
123
118
|
</div>
|
|
124
|
-
<div class="add-upload-item" @click="triggerUpload">
|
|
125
|
-
<span class="add-upload-icon">+</span>
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
119
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
</div>
|
|
141
|
-
|
|
142
|
-
<input
|
|
143
|
-
ref="uploadInput"
|
|
144
|
-
type="file"
|
|
145
|
-
style="display: none"
|
|
146
|
-
@change="handleFileChange"
|
|
147
|
-
multiple
|
|
148
|
-
accept="image/*,.pdf,.doc,.docx"
|
|
149
|
-
/>
|
|
150
|
-
|
|
151
|
-
<div class="input-controls">
|
|
152
|
-
<div class="input-controls-left">
|
|
153
|
-
<a-button class="upload-btn" @click="triggerUpload">
|
|
154
|
-
<a-icon type="plus" class="upload-icon" />
|
|
155
|
-
<span class="upload-text">上传(报告、图片)</span>
|
|
156
|
-
</a-button>
|
|
120
|
+
<div class="input-textarea-area">
|
|
121
|
+
<a-textarea
|
|
122
|
+
ref="consultTextarea"
|
|
123
|
+
v-model="doctorInputText"
|
|
124
|
+
placeholder="医生补充信息或提问..."
|
|
125
|
+
class="bottom-input"
|
|
126
|
+
:rows="1"
|
|
127
|
+
resize="none"
|
|
128
|
+
@input="handleInput"
|
|
129
|
+
@keydown="handleKeydown"
|
|
130
|
+
></a-textarea>
|
|
157
131
|
</div>
|
|
158
132
|
|
|
159
|
-
<
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
133
|
+
<input
|
|
134
|
+
ref="uploadInput"
|
|
135
|
+
type="file"
|
|
136
|
+
style="display: none"
|
|
137
|
+
@change="handleFileChange"
|
|
138
|
+
multiple
|
|
139
|
+
accept="image/*,.pdf,.doc,.docx"
|
|
140
|
+
/>
|
|
141
|
+
|
|
142
|
+
<div class="input-controls">
|
|
143
|
+
<div class="input-controls-left">
|
|
144
|
+
<a-button class="upload-btn" @click="triggerUpload">
|
|
145
|
+
<a-icon type="plus" class="upload-icon" />
|
|
146
|
+
<span class="upload-text">上传(报告、图片)</span>
|
|
147
|
+
</a-button>
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<div class="input-controls-right">
|
|
151
|
+
<span class="enter-tip">Enter</span>
|
|
152
|
+
<a-button
|
|
153
|
+
type="primary"
|
|
154
|
+
shape="circle"
|
|
155
|
+
class="send-btn"
|
|
156
|
+
@click="handleSendMessage"
|
|
157
|
+
:disabled="!doctorInputText.trim() && !pendingAttachments.length"
|
|
158
|
+
>
|
|
159
|
+
<span class="send-icon">↑</span>
|
|
160
|
+
</a-button>
|
|
161
|
+
</div>
|
|
170
162
|
</div>
|
|
171
163
|
</div>
|
|
172
164
|
</div>
|
|
173
165
|
</div>
|
|
174
|
-
</div>
|
|
175
166
|
|
|
176
167
|
<!-- 图片预览Modal -->
|
|
177
168
|
<a-modal :visible="previewVisible" :footer="null" @cancel="previewVisible = false" width="800px">
|
|
@@ -186,6 +177,10 @@ import { startEventStreamPOST } from '@vue2-client/services/api/restTools'
|
|
|
186
177
|
import { marked } from 'marked'
|
|
187
178
|
import moment from 'moment/moment'
|
|
188
179
|
import { mapState } from 'vuex'
|
|
180
|
+
import rawAxios from 'axios'
|
|
181
|
+
|
|
182
|
+
const BAICHUAN_FILE_API = 'http://api.baichuan-ai.com/v1/files'
|
|
183
|
+
const BAICHUAN_API_KEY = 'sk-c6368da98129d38b74d7df85a2be8414'
|
|
189
184
|
|
|
190
185
|
export default {
|
|
191
186
|
name: 'AIConsultation',
|
|
@@ -204,10 +199,11 @@ export default {
|
|
|
204
199
|
currentStreamConnection: null,
|
|
205
200
|
isAiStreaming: false,
|
|
206
201
|
resizeTimeout: null,
|
|
207
|
-
isTestMode: true, // 测试模式开关,测试完成后改为 false 走真实接口
|
|
208
202
|
previewVisible: false,
|
|
209
203
|
previewImageUrl: '',
|
|
210
|
-
activeNavIndex: -1
|
|
204
|
+
activeNavIndex: -1,
|
|
205
|
+
uploading: false,
|
|
206
|
+
uploadProgress: 0
|
|
211
207
|
}
|
|
212
208
|
},
|
|
213
209
|
computed: {
|
|
@@ -327,8 +323,13 @@ export default {
|
|
|
327
323
|
this.dialogMessages = []
|
|
328
324
|
},
|
|
329
325
|
|
|
330
|
-
handleSendMessage() {
|
|
326
|
+
async handleSendMessage() {
|
|
327
|
+
if (this.uploading) return
|
|
331
328
|
if (!this.doctorInputText.trim() && !this.pendingAttachments.length) return
|
|
329
|
+
if (this.pendingAttachments.some(f => f.uploading || f.uploadProgress > 0 && !f.file_id && !f.uploadFailed)) {
|
|
330
|
+
this.$message.warning('请等待文件上传完成')
|
|
331
|
+
return
|
|
332
|
+
}
|
|
332
333
|
|
|
333
334
|
// 确保有dialogId
|
|
334
335
|
if (!this.currentDialogId) {
|
|
@@ -337,6 +338,12 @@ export default {
|
|
|
337
338
|
|
|
338
339
|
const messageContent = this.doctorInputText.trim()
|
|
339
340
|
const attachments = [...this.pendingAttachments]
|
|
341
|
+
|
|
342
|
+
// 附件已经在选择时上传完成,直接使用file_id
|
|
343
|
+
const fileIds = attachments
|
|
344
|
+
.filter(f => f.file_id)
|
|
345
|
+
.map(f => ({ file_id: f.file_id }))
|
|
346
|
+
|
|
340
347
|
const doctorMessage = {
|
|
341
348
|
type: 'user',
|
|
342
349
|
content: messageContent,
|
|
@@ -364,23 +371,19 @@ export default {
|
|
|
364
371
|
|
|
365
372
|
this.isAiStreaming = true
|
|
366
373
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
const fullText = allAiMessages[Math.floor(Math.random() * allAiMessages.length)]
|
|
376
|
-
this.simulateTyping(aiMsgIndex, fullText)
|
|
377
|
-
return
|
|
374
|
+
const requestBody = {
|
|
375
|
+
userMessage: messageContent,
|
|
376
|
+
chatId,
|
|
377
|
+
model: '',
|
|
378
|
+
prompt: '',
|
|
379
|
+
useContext: true,
|
|
380
|
+
user: this.currUser.operInfo,
|
|
381
|
+
files: fileIds
|
|
378
382
|
}
|
|
379
383
|
|
|
380
|
-
// ==================== 真实接口 ====================
|
|
381
384
|
this.currentStreamConnection = startEventStreamPOST(
|
|
382
385
|
'/his-web/api/af-his/ai/chat/stream',
|
|
383
|
-
|
|
386
|
+
requestBody,
|
|
384
387
|
{'Content-Type': 'application/json'},
|
|
385
388
|
(data, type) => {
|
|
386
389
|
if (type === 'additionalInfo' || type === 'sourceInfo') return
|
|
@@ -438,6 +441,10 @@ export default {
|
|
|
438
441
|
},
|
|
439
442
|
() => {
|
|
440
443
|
this.isAiStreaming = false
|
|
444
|
+
// 如果 AI 消息为空(模型拒答或无响应),显示拒答提示
|
|
445
|
+
if (!aiContent && this.dialogMessages[aiMsgIndex]) {
|
|
446
|
+
this.dialogMessages[aiMsgIndex].content = '很抱歉,当前问题我无法回答,请尝试调整提问方式或联系管理员。'
|
|
447
|
+
}
|
|
441
448
|
this.scrollToBottom()
|
|
442
449
|
}
|
|
443
450
|
)
|
|
@@ -514,11 +521,144 @@ export default {
|
|
|
514
521
|
})
|
|
515
522
|
},
|
|
516
523
|
|
|
524
|
+
/**
|
|
525
|
+
* 开启新对话
|
|
526
|
+
* 父组件可通过 ref 调用此方法
|
|
527
|
+
*/
|
|
528
|
+
startNewChat() {
|
|
529
|
+
if (this.currentStreamConnection) {
|
|
530
|
+
this.currentStreamConnection()
|
|
531
|
+
this.currentStreamConnection = null
|
|
532
|
+
}
|
|
533
|
+
this.currentDialogId = moment().format('YYYYMMDDHHmmss')
|
|
534
|
+
this.isAiStreaming = false
|
|
535
|
+
this.patientComplaint = ''
|
|
536
|
+
this.doctorQuestions = []
|
|
537
|
+
this.examinationOrder = null
|
|
538
|
+
this.aiDiagnosis = null
|
|
539
|
+
this.doctorInputText = ''
|
|
540
|
+
this.isPlaying = false
|
|
541
|
+
this.isRecording = false
|
|
542
|
+
this.dialogMessages = []
|
|
543
|
+
this.pendingAttachments.forEach(file => {
|
|
544
|
+
if (file.url) {
|
|
545
|
+
URL.revokeObjectURL(file.url)
|
|
546
|
+
}
|
|
547
|
+
})
|
|
548
|
+
this.pendingAttachments = []
|
|
549
|
+
this.$nextTick(() => {
|
|
550
|
+
this.autoResizeTextarea()
|
|
551
|
+
const chatArea = document.querySelector('.chat-area')
|
|
552
|
+
if (chatArea) {
|
|
553
|
+
chatArea.scrollTop = 0
|
|
554
|
+
}
|
|
555
|
+
})
|
|
556
|
+
},
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* 加载历史对话
|
|
560
|
+
* @param {Array} dialogList - 对话列表,支持两种格式:
|
|
561
|
+
* 1. 直接消息数组:[{ type, content, time, id }, ...]
|
|
562
|
+
* 2. 嵌套格式:[{ messages: [{ type, content, time, id }, ...] }, ...]
|
|
563
|
+
* @param {string} sessionId - 可选,会话 ID,用于继续历史对话
|
|
564
|
+
* 父组件可通过 ref 调用此方法
|
|
565
|
+
*/
|
|
566
|
+
loadHistoryDialogs(dialogList, sessionId) {
|
|
567
|
+
console.log('加载历史信息',dialogList,sessionId)
|
|
568
|
+
if (!Array.isArray(dialogList)) {
|
|
569
|
+
console.error('loadHistoryDialogs: dialogList 必须是数组')
|
|
570
|
+
return
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
if (this.currentStreamConnection) {
|
|
574
|
+
this.currentStreamConnection()
|
|
575
|
+
this.currentStreamConnection = null
|
|
576
|
+
}
|
|
577
|
+
this.isAiStreaming = false
|
|
578
|
+
|
|
579
|
+
// 如果提供了 sessionId,设置当前会话 ID
|
|
580
|
+
if (sessionId) {
|
|
581
|
+
this.currentDialogId = sessionId
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
const allMessages = []
|
|
585
|
+
|
|
586
|
+
const processMessage = (msg) => {
|
|
587
|
+
if (!msg) return null
|
|
588
|
+
|
|
589
|
+
const message = {
|
|
590
|
+
type: msg.type === 'assistant' ? 'ai' : (msg.type || 'user'),
|
|
591
|
+
content: msg.content || '',
|
|
592
|
+
time: msg.time || '',
|
|
593
|
+
timestamp: msg.timestamp || Date.now()
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
// 清理 AI 响应中多余的引号(后端存储问题)
|
|
597
|
+
// 格式如: """"医学"影像"..." -> "医学影像..."
|
|
598
|
+
if (message.type === 'ai' && message.content && message.content.includes('"')) {
|
|
599
|
+
message.content = message.content.replace(/"/g, '')
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
let attachments = []
|
|
603
|
+
if (Array.isArray(msg.attachments)) {
|
|
604
|
+
attachments = msg.attachments
|
|
605
|
+
} else if (typeof msg.content === 'string' && msg.content.trim().startsWith('{')) {
|
|
606
|
+
try {
|
|
607
|
+
const parsed = JSON.parse(msg.content)
|
|
608
|
+
if (parsed.content && Array.isArray(parsed.content)) {
|
|
609
|
+
const textPart = parsed.content
|
|
610
|
+
.filter(item => item && item.type === 'text')
|
|
611
|
+
.map(item => item.text)
|
|
612
|
+
.join('')
|
|
613
|
+
if (textPart) {
|
|
614
|
+
message.content = textPart
|
|
615
|
+
}
|
|
616
|
+
attachments = parsed.content
|
|
617
|
+
.filter(item => item && item.type === 'file' && item.file && item.file.file_id)
|
|
618
|
+
.map(item => ({
|
|
619
|
+
name: item.file.file_name || item.file.file_id,
|
|
620
|
+
isImage: false,
|
|
621
|
+
url: item.file.url || '',
|
|
622
|
+
file_id: item.file.file_id
|
|
623
|
+
}))
|
|
624
|
+
}
|
|
625
|
+
} catch (e) {
|
|
626
|
+
// JSON 解析失败,保留原始 content
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
if (attachments.length) {
|
|
631
|
+
message.attachments = attachments
|
|
632
|
+
}
|
|
633
|
+
return message
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
dialogList.forEach(dialog => {
|
|
637
|
+
if (!dialog) return
|
|
638
|
+
|
|
639
|
+
if (Array.isArray(dialog.messages)) {
|
|
640
|
+
dialog.messages.forEach(msg => {
|
|
641
|
+
const processed = processMessage(msg)
|
|
642
|
+
if (processed) allMessages.push(processed)
|
|
643
|
+
})
|
|
644
|
+
} else if (dialog.type || dialog.content) {
|
|
645
|
+
const processed = processMessage(dialog)
|
|
646
|
+
if (processed) allMessages.push(processed)
|
|
647
|
+
}
|
|
648
|
+
})
|
|
649
|
+
|
|
650
|
+
this.dialogMessages = allMessages
|
|
651
|
+
console.log('加载历史对话:', allMessages)
|
|
652
|
+
this.$nextTick(() => {
|
|
653
|
+
this.scrollToBottom()
|
|
654
|
+
})
|
|
655
|
+
},
|
|
656
|
+
|
|
517
657
|
triggerUpload() {
|
|
518
658
|
this.$refs.uploadInput.click()
|
|
519
659
|
},
|
|
520
660
|
|
|
521
|
-
handleFileChange(event) {
|
|
661
|
+
async handleFileChange(event) {
|
|
522
662
|
const files = Array.from(event.target.files || [])
|
|
523
663
|
if (!files.length) return
|
|
524
664
|
|
|
@@ -530,12 +670,80 @@ export default {
|
|
|
530
670
|
type: file.type,
|
|
531
671
|
isImage,
|
|
532
672
|
url: isImage ? URL.createObjectURL(file) : '',
|
|
533
|
-
rawFile: file
|
|
673
|
+
rawFile: file,
|
|
674
|
+
uploadProgress: 0
|
|
534
675
|
}
|
|
535
676
|
})
|
|
536
677
|
|
|
537
678
|
this.pendingAttachments = [...this.pendingAttachments, ...attachments]
|
|
538
679
|
event.target.value = ''
|
|
680
|
+
|
|
681
|
+
await this.uploadPendingFiles()
|
|
682
|
+
},
|
|
683
|
+
|
|
684
|
+
async uploadPendingFiles() {
|
|
685
|
+
const pendingFiles = this.pendingAttachments.filter(f => !f.file_id && !f.uploading && f.uploadProgress !== 100)
|
|
686
|
+
if (!pendingFiles.length) return
|
|
687
|
+
|
|
688
|
+
this.uploading = true
|
|
689
|
+
|
|
690
|
+
for (const file of pendingFiles) {
|
|
691
|
+
file.uploading = true
|
|
692
|
+
file.uploadProgress = 0
|
|
693
|
+
|
|
694
|
+
try {
|
|
695
|
+
const result = await this.uploadFileToBaichuan(file)
|
|
696
|
+
if (result && result.file_id) {
|
|
697
|
+
file.file_id = result.file_id
|
|
698
|
+
file.uploadProgress = 100
|
|
699
|
+
} else {
|
|
700
|
+
file.uploadFailed = true
|
|
701
|
+
}
|
|
702
|
+
} catch (error) {
|
|
703
|
+
file.uploadFailed = true
|
|
704
|
+
} finally {
|
|
705
|
+
file.uploading = false
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
const allDone = this.pendingAttachments.every(
|
|
710
|
+
f => f.file_id || f.uploadFailed || f.uploadProgress === 100
|
|
711
|
+
)
|
|
712
|
+
if (allDone) {
|
|
713
|
+
this.uploading = false
|
|
714
|
+
this.uploadProgress = 0
|
|
715
|
+
}
|
|
716
|
+
},
|
|
717
|
+
|
|
718
|
+
async uploadFileToBaichuan(file) {
|
|
719
|
+
const formData = new FormData()
|
|
720
|
+
formData.append('purpose', 'medical')
|
|
721
|
+
formData.append('file', file.rawFile || file)
|
|
722
|
+
|
|
723
|
+
const uploadClient = rawAxios.create()
|
|
724
|
+
|
|
725
|
+
return uploadClient.post(BAICHUAN_FILE_API, formData, {
|
|
726
|
+
headers: {
|
|
727
|
+
'Authorization': `Bearer ${BAICHUAN_API_KEY}`,
|
|
728
|
+
'Content-Type': 'multipart/form-data'
|
|
729
|
+
},
|
|
730
|
+
onUploadProgress: (progressEvent) => {
|
|
731
|
+
if (progressEvent.total) {
|
|
732
|
+
file.uploadProgress = Math.round((progressEvent.loaded * 100) / progressEvent.total)
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}).then(res => {
|
|
736
|
+
const data = res.data
|
|
737
|
+
return {
|
|
738
|
+
name: file.name,
|
|
739
|
+
file_id: data && data.id ? data.id : '',
|
|
740
|
+
originalFile: file
|
|
741
|
+
}
|
|
742
|
+
}).catch(error => {
|
|
743
|
+
console.error('上传文件到百川失败:', error)
|
|
744
|
+
this.$message.error(`文件 ${file.name} 上传失败`)
|
|
745
|
+
return null
|
|
746
|
+
})
|
|
539
747
|
},
|
|
540
748
|
|
|
541
749
|
removePendingAttachment(index) {
|