cnhis-design-vue 3.3.1-release.5 → 3.3.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/README.md +87 -87
  2. package/es/components/audio-sdk/index.d.ts +20 -0
  3. package/es/components/audio-sdk/src/Index.vue.d.ts +20 -0
  4. package/es/components/audio-sdk/src/Index.vue2.js +1 -1
  5. package/es/components/audio-sdk/src/audioSDK.d.ts +1 -0
  6. package/es/components/audio-sdk/src/audioSDK.js +11 -3
  7. package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +10 -0
  8. package/es/components/audio-sdk/src/components/recording.vue.d.ts +10 -0
  9. package/es/components/audio-sdk/src/components/recording.vue2.js +5 -0
  10. package/es/components/audio-sdk/src/constants/index.d.ts +1 -0
  11. package/es/components/audio-sdk/src/constants/index.js +3 -0
  12. package/es/components/audio-sdk/src/utils/recorder/fft.d.ts +4 -0
  13. package/es/components/audio-sdk/src/utils/recorder/mp3-engine.d.ts +4 -0
  14. package/es/components/audio-sdk/src/utils/recorder/mp3.d.ts +4 -0
  15. package/es/components/audio-sdk/src/utils/recorder/recorder.d.ts +4 -0
  16. package/es/components/audio-sdk/src/utils/recorder/wave.d.ts +4 -0
  17. package/es/components/audio-sdk/src/utils/recordingModal.js +13 -2
  18. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  19. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  20. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  21. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  22. package/es/components/callback/src/components/render/popupMaps.d.ts +17 -1
  23. package/es/components/card-render/index.d.ts +4 -4
  24. package/es/components/card-render/src/CardRender.vue.d.ts +4 -4
  25. package/es/components/card-render/src/components/index.d.ts +23 -23
  26. package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
  27. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +12 -6
  28. package/es/components/field-editor/index.d.ts +4 -0
  29. package/es/components/field-editor/src/FieldEditor.vue.d.ts +4 -0
  30. package/es/components/form-config/index.d.ts +80 -5
  31. package/es/components/form-config/src/FormConfig.vue.d.ts +80 -5
  32. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +4 -0
  33. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +57 -4
  34. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +16 -1
  35. package/es/components/form-config/src/constants/index.d.ts +2 -1
  36. package/es/components/form-config/src/constants/index.js +1 -0
  37. package/es/components/form-config/src/hooks/useConfigurationField.js +19 -1
  38. package/es/components/form-config/src/hooks/useLocale.d.ts +1 -0
  39. package/es/components/form-config/src/hooks/useLocale.js +1 -0
  40. package/es/components/form-config/src/types/index.d.ts +1 -0
  41. package/es/components/form-render/index.d.ts +4 -0
  42. package/es/components/form-render/src/FormRender.vue.d.ts +4 -0
  43. package/es/components/form-render/src/FormRender.vue2.js +3 -2
  44. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +4 -0
  45. package/es/components/form-render/src/components/renderer/combination/combination.js +1 -1
  46. package/es/components/form-render/src/components/renderer/date.d.ts +2 -2
  47. package/es/components/form-render/src/components/renderer/input.d.ts +16 -4
  48. package/es/components/form-render/src/components/renderer/input.js +39 -7
  49. package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +3 -0
  50. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -0
  51. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -0
  52. package/es/components/form-render/src/components/renderer/radio_checkbox.js +9 -8
  53. package/es/components/form-render/src/components/renderer/text.js +1 -1
  54. package/es/components/form-render/src/components/renderer/textarea.d.ts +16 -1
  55. package/es/components/form-render/src/components/renderer/textarea.js +36 -8
  56. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -0
  57. package/es/components/form-render/src/hooks/useComplexOptions.js +3 -2
  58. package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +2 -2
  59. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +4 -3
  60. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -0
  61. package/es/components/form-render/src/hooks/useFormField.d.ts +2 -0
  62. package/es/components/form-render/src/hooks/useFormField.js +5 -1
  63. package/es/components/form-render/src/hooks/useFormValidator.js +1 -0
  64. package/es/components/form-render/src/hooks/usePresetScope.js +1 -0
  65. package/es/components/form-render/src/types/fieldItem.d.ts +11 -0
  66. package/es/components/form-render/src/types/index.d.ts +2 -1
  67. package/es/components/form-render/src/utils/index.js +1 -0
  68. package/es/components/form-render/src/utils/schema.js +60 -15
  69. package/es/components/guide/src/renderer.d.ts +2 -2
  70. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  71. package/es/components/iho-table/index.d.ts +13 -1
  72. package/es/components/iho-table/src/IhoTable.vue.d.ts +13 -2
  73. package/es/components/iho-table/src/IhoTable.vue2.js +27 -20
  74. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +6 -0
  75. package/es/components/index.css +1 -1
  76. package/es/components/index.d.ts +1 -2
  77. package/es/components/index.js +0 -3
  78. package/es/components/info-header/index.d.ts +13 -0
  79. package/es/components/info-header/src/InfoHeader.vue.d.ts +13 -0
  80. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -0
  81. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -0
  82. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +5 -0
  83. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +4 -0
  84. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  85. package/es/components/select-person/src/SelectPerson.vue2.js +8 -5
  86. package/es/components/shortcut-setter/index.d.ts +16 -1
  87. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +16 -1
  88. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +11 -11
  89. package/es/env.d.ts +25 -25
  90. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  91. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  92. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  93. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  94. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  95. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  96. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  97. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  98. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  99. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  100. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  101. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  102. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  103. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  104. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  105. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  106. package/es/shared/assets/img/failure.png.js +1 -1
  107. package/es/shared/assets/img/no-permission.png.js +1 -1
  108. package/es/shared/assets/img/nodata.png.js +1 -1
  109. package/es/shared/assets/img/notfound.png.js +1 -1
  110. package/es/shared/assets/img/qr.png.js +1 -1
  111. package/es/shared/assets/img/success.png.js +1 -1
  112. package/es/shared/assets/img/table_style_2.png.js +1 -1
  113. package/es/shared/assets/img/video.png.js +1 -1
  114. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  115. package/es/shared/assets/img/xb_big.png.js +1 -1
  116. package/es/shared/assets/img/xb_small.png.js +1 -1
  117. package/es/shared/components/CancelRadio/CancelRadio.d.ts +7 -0
  118. package/es/shared/components/CancelRadio/CancelRadio.js +6 -6
  119. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  120. package/es/shared/package.json.js +1 -1
  121. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  122. package/es/shared/utils/tapable/index.d.ts +139 -0
  123. package/package.json +76 -77
  124. package/es/components/ai-chat/index.d.ts +0 -680
  125. package/es/components/ai-chat/index.js +0 -10
  126. package/es/components/ai-chat/src/Index.vue.d.ts +0 -682
  127. package/es/components/ai-chat/src/Index.vue.js +0 -6
  128. package/es/components/ai-chat/src/Index.vue2.js +0 -175
  129. package/es/components/ai-chat/src/api/index.d.ts +0 -8
  130. package/es/components/ai-chat/src/api/index.js +0 -87
  131. package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +0 -38
  132. package/es/components/ai-chat/src/components/ChatAudio.vue.js +0 -6
  133. package/es/components/ai-chat/src/components/ChatAudio.vue2.js +0 -103
  134. package/es/components/ai-chat/src/components/ChatBI.vue.d.ts +0 -101
  135. package/es/components/ai-chat/src/components/ChatBI.vue.js +0 -6
  136. package/es/components/ai-chat/src/components/ChatBI.vue2.js +0 -73
  137. package/es/components/ai-chat/src/components/ChatCard.d.ts +0 -43
  138. package/es/components/ai-chat/src/components/ChatCard.js +0 -403
  139. package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +0 -203
  140. package/es/components/ai-chat/src/components/ChatFooter.vue.js +0 -6
  141. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +0 -373
  142. package/es/components/ai-chat/src/components/ChatMain.d.ts +0 -2
  143. package/es/components/ai-chat/src/components/ChatMain.js +0 -350
  144. package/es/components/ai-chat/src/components/ChatMainDefault.d.ts +0 -2
  145. package/es/components/ai-chat/src/components/ChatMainDefault.js +0 -278
  146. package/es/components/ai-chat/src/components/ChatPatient.vue.d.ts +0 -59
  147. package/es/components/ai-chat/src/components/ChatPatient.vue.js +0 -6
  148. package/es/components/ai-chat/src/components/ChatPatient.vue2.js +0 -218
  149. package/es/components/ai-chat/src/components/ChatPrompt.vue.d.ts +0 -45
  150. package/es/components/ai-chat/src/components/ChatPrompt.vue.js +0 -6
  151. package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +0 -143
  152. package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +0 -57
  153. package/es/components/ai-chat/src/components/ChatRight.vue.js +0 -6
  154. package/es/components/ai-chat/src/components/ChatRight.vue2.js +0 -190
  155. package/es/components/ai-chat/src/components/card/JsonCard.d.ts +0 -25
  156. package/es/components/ai-chat/src/components/card/JsonCard.js +0 -574
  157. package/es/components/ai-chat/src/components/message-render/CardRender.d.ts +0 -16
  158. package/es/components/ai-chat/src/components/message-render/CardRender.js +0 -80
  159. package/es/components/ai-chat/src/components/message-render/FormRender.d.ts +0 -16
  160. package/es/components/ai-chat/src/components/message-render/FormRender.js +0 -173
  161. package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue.d.ts +0 -36
  162. package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue.js +0 -6
  163. package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue2.js +0 -96
  164. package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue.d.ts +0 -105
  165. package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue.js +0 -6
  166. package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue2.js +0 -260
  167. package/es/components/ai-chat/src/components/svgs/AddIcon.vue.js +0 -18
  168. package/es/components/ai-chat/src/components/svgs/AudioIcon.vue.js +0 -37
  169. package/es/components/ai-chat/src/components/svgs/KeyboardIcon.vue.js +0 -20
  170. package/es/components/ai-chat/src/components/svgs/MicroPhone.vue.js +0 -48
  171. package/es/components/ai-chat/src/hooks/index.d.ts +0 -2
  172. package/es/components/ai-chat/src/hooks/index.js +0 -2
  173. package/es/components/ai-chat/src/hooks/useChartAudioContext.d.ts +0 -18
  174. package/es/components/ai-chat/src/hooks/useChartAudioContext.js +0 -202
  175. package/es/components/ai-chat/src/hooks/useData.d.ts +0 -77
  176. package/es/components/ai-chat/src/hooks/useData.js +0 -289
  177. package/es/components/ai-chat/src/hooks/useFooterContext.d.ts +0 -38
  178. package/es/components/ai-chat/src/hooks/useFooterContext.js +0 -218
  179. package/es/components/ai-chat/src/hooks/useProgram.d.ts +0 -14
  180. package/es/components/ai-chat/src/hooks/useProgram.js +0 -306
  181. package/es/components/ai-chat/src/hooks/useSSE.d.ts +0 -9
  182. package/es/components/ai-chat/src/hooks/useSSE.js +0 -138
  183. package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +0 -4
  184. package/es/components/ai-chat/src/hooks/useWebsocket.js +0 -66
  185. package/es/components/ai-chat/src/types/index.d.ts +0 -45
  186. package/es/components/ai-chat/src/types/index.js +0 -1
  187. package/es/components/ai-chat/src/utils/index.d.ts +0 -7
  188. package/es/components/ai-chat/src/utils/index.js +0 -41
  189. package/es/components/ai-chat/style/index.css +0 -1
  190. package/es/shared/assets/img/ai__avatar.png.js +0 -3
  191. package/es/shared/assets/img/file-emr.png.js +0 -3
  192. package/es/shared/assets/img/file.png.js +0 -3
  193. package/es/shared/assets/img/logo.png.js +0 -3
  194. package/es/shared/assets/img/use.png.js +0 -3
@@ -1,403 +0,0 @@
1
- import { defineComponent, ref, reactive, computed, watch, createVNode } from 'vue';
2
- import { NForm, NFormItem, NInput, NIcon, NButton } from 'naive-ui';
3
- import FormRender from '../../../form-render/index.js';
4
- import CardRender from '../../../card-render/index.js';
5
- import { cloneDeep, isArray, omit } from 'lodash-es';
6
- import { isValidJSON } from '../utils/index.js';
7
- import { ChevronDown, ChevronForward } from '@vicons/ionicons5';
8
- import { useData } from '../hooks/useData.js';
9
-
10
- var ChatCard = /* @__PURE__ */ defineComponent({
11
- name: "ChatCard",
12
- inheritAttrs: false,
13
- props: {
14
- msgItem: {
15
- type: Object,
16
- default: () => ({})
17
- },
18
- selectParams: {
19
- type: Object
20
- },
21
- configs: {
22
- type: Object
23
- },
24
- msgId: {
25
- type: String
26
- }
27
- },
28
- emits: ["button-click"],
29
- setup(props, {
30
- attrs,
31
- slots,
32
- emit
33
- }) {
34
- const htmlTypeMap = {
35
- TEXT: "INPUT",
36
- NUMBER: "INPUT_NUMBER",
37
- DATETIME: "DATE",
38
- MULTI_SELECT: "REMOTE_SEARCH",
39
- SELECT: "REMOTE_SEARCH"
40
- };
41
- const {
42
- cssVars,
43
- patientInfo,
44
- state,
45
- axiosInstance,
46
- isSmall,
47
- appId
48
- } = useData();
49
- const fieldList = ref([]);
50
- const formRenderRef = ref();
51
- const patientItem = ref();
52
- const patientFormValue = reactive({
53
- vaa05: ""
54
- });
55
- const patientFormRef = ref();
56
- const isForm = computed(() => {
57
- var _a, _b;
58
- return !!((_b = (_a = props.msgItem) == null ? void 0 : _a.content) == null ? void 0 : _b.body);
59
- });
60
- const c = props.msgItem.content;
61
- const remoteSearch = {};
62
- const templateData = reactive(cloneDeep(c.data || {}));
63
- const lifeCycle = {
64
- beforeRequest(fieldKey, params, payload) {
65
- var _a, _b;
66
- if (params == null ? void 0 : params.params) {
67
- const {
68
- items = []
69
- } = c.body || {};
70
- const values = (_b = (_a = formRenderRef.value).getFormValues) == null ? void 0 : _b.call(_a);
71
- Object.keys(params.params).forEach((key) => {
72
- const item = items.find((i) => i.code === key);
73
- if (key === "vaa05") {
74
- params.params.vaa05 = patientItem.value.selectedPatient.vaa01;
75
- } else if (Reflect.has(values, key)) {
76
- params.params[key] = values[key];
77
- } else if (item) {
78
- params.params[key] = item.value;
79
- }
80
- });
81
- }
82
- if (params && Reflect.has(params, "configs")) {
83
- params.configs = patientItem.value.selectedPatient;
84
- }
85
- }
86
- };
87
- function handleModuleClick(param) {
88
- const {
89
- eventName,
90
- data
91
- } = param;
92
- if (eventName) {
93
- emit("button-click", {
94
- buttonInfo: data,
95
- isBI: true
96
- });
97
- }
98
- }
99
- function handleButtonClick(buttonInfo) {
100
- templateData[buttonInfo.button.id + "Disabled"] = "1";
101
- emit("button-click", {
102
- buttonInfo: {
103
- ...omit(buttonInfo.button, ["props"]),
104
- data: buttonInfo.data
105
- }
106
- });
107
- }
108
- if (isForm.value) {
109
- const items = c.body.items || [];
110
- const hasPatient = items.some((form) => form.code === "vaa05");
111
- fieldList.value = items.filter((item) => item.showFlag).map((form) => {
112
- var _a, _b, _c;
113
- if (form.code === "vaa05" && !isSmall.value) {
114
- patientItem.value = {
115
- ...form
116
- };
117
- if (form._value) {
118
- patientFormValue.vaa05 = form._value;
119
- } else if (((_a = form.options) == null ? void 0 : _a.length) && form.value) {
120
- patientFormValue.vaa05 = (_b = form.options.find((o) => o.value === form.value)) == null ? void 0 : _b.label;
121
- patientItem.value.selectedPatient = props.configs;
122
- }
123
- return null;
124
- }
125
- const item = {
126
- html_type: htmlTypeMap[form.type] || form.type,
127
- val_key: form.code,
128
- name: form.name,
129
- elem_width: 12,
130
- default_val: form.value,
131
- lazyRequest: true,
132
- requestCache: true,
133
- urlConfig: {
134
- nameKey: (_c = form.labelField) != null ? _c : "label"
135
- },
136
- option: [],
137
- is_null: form.required ? "0" : "1",
138
- is_edit: props.msgItem.disabled ? "0" : "1",
139
- componentProps: {},
140
- multi_select: form.type === "MULTI_SELECT" ? "0" : "1"
141
- };
142
- if (form.type === "DATETIME") {
143
- item.date_format = "yyyy-MM-dd HH:mm:ss";
144
- }
145
- if (item.html_type === "REMOTE_SEARCH") {
146
- item.componentProps = {
147
- fallbackOption: false
148
- };
149
- item.option = form.options || [];
150
- item.default_val = null;
151
- if (form.value && isArray(form.options) && form.options.length > 0) {
152
- const option = form.options.find((o) => (o == null ? void 0 : o.value) === form.value);
153
- if (option) {
154
- item.default_val = form.value;
155
- }
156
- }
157
- Object.assign(item.urlConfig, {
158
- url: "/flow/api/instruction/parameter/getOptionsValues",
159
- method: "post",
160
- params: {
161
- ...props.selectParams,
162
- code: form.code,
163
- source: isSmall.value ? "inner" : "global",
164
- ...isSmall.value ? {
165
- appId: appId.value
166
- } : {}
167
- },
168
- dependKey: []
169
- });
170
- if (hasPatient) {
171
- item.urlConfig.params.configs = patientInfo.value.info || state.selectedPatient;
172
- }
173
- if (form.dependencies) {
174
- const dependencies = form.dependencies.split(",");
175
- item.urlConfig.dependKey = dependencies;
176
- item.urlConfig.params.params = {};
177
- dependencies.forEach((dependencie) => {
178
- item.urlConfig.params.params[dependencie] = "";
179
- });
180
- }
181
- }
182
- return item;
183
- }).filter((form) => !!form);
184
- }
185
- watch(() => state.showPatient, (value) => {
186
- if (!props.msgItem.disabled && isForm.value && !value && state.selectedPatientLabel && patientItem.value) {
187
- patientFormValue.vaa05 = state.selectedPatientLabel;
188
- patientItem.value.selectedPatient = {
189
- ...state.selectedPatientForm
190
- };
191
- }
192
- });
193
- function patientSelectRender() {
194
- var _a;
195
- if (!patientItem.value)
196
- return null;
197
- function onClick() {
198
- if (props.msgItem.disabled)
199
- return;
200
- state.showPatient = true;
201
- }
202
- return createVNode(NForm, {
203
- "class": "form-render",
204
- "ref": patientFormRef,
205
- "require-mark-placement": "left",
206
- "disabled": props.msgItem.disabled,
207
- "model": patientFormValue,
208
- "rules": {
209
- vaa05: {
210
- required: patientItem.value.required,
211
- message: patientItem.value.name + (((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.146")) || "\u4E3A\u5FC5\u586B"),
212
- trigger: ["input"]
213
- }
214
- }
215
- }, {
216
- default: () => [createVNode(NFormItem, {
217
- "label": patientItem.value.name,
218
- "path": "vaa05",
219
- "class": "form-render__formItem",
220
- "style": "--n-feedback-height: 16px; --n-feedback-padding: 0px; --n-feedback-font-size: 12px"
221
- }, {
222
- default: () => {
223
- var _a2;
224
- return [createVNode(NInput, {
225
- "style": "--n-text-color-disabled: #000; --n-placeholder-color-disabled: #000;--n-padding-left: 8px; --n-padding-right: 8px",
226
- "readonly": true,
227
- "value": patientFormValue.vaa05,
228
- "placeholder": ((_a2 = window.getLanguageByCode) == null ? void 0 : _a2.call(window, "10010.1.147")) || "\u8BF7\u9009\u62E9",
229
- "onClick": onClick
230
- }, {
231
- suffix: () => createVNode(NIcon, {
232
- "color": "#c2c2c2",
233
- "component": ChevronDown
234
- }, null)
235
- })];
236
- }
237
- })]
238
- });
239
- }
240
- async function handleFormSubmit(buttonInfo, _values) {
241
- var _a, _b;
242
- try {
243
- const values = _values || formRenderRef.value.getFormValues();
244
- await ((_a = formRenderRef.value) == null ? void 0 : _a.validate());
245
- c.body.items.forEach((form) => {
246
- var _a2;
247
- if (form.code === "vaa05") {
248
- form._value = state.selectedPatientLabel;
249
- form.value = patientItem.value.selectedPatient.vaa01 || form.value;
250
- } else if (values[form.code]) {
251
- form.value = values[form.code];
252
- }
253
- if (!form.showFlag) {
254
- values[form.code] = form.value;
255
- }
256
- if ((_a2 = remoteSearch[form.code]) == null ? void 0 : _a2[0]) {
257
- form.options = remoteSearch[form.code];
258
- }
259
- });
260
- state.loading = true;
261
- emit("button-click", {
262
- values,
263
- buttonInfo,
264
- patient: ((_b = patientItem.value) == null ? void 0 : _b.selectedPatient) || props.configs,
265
- isForm: true
266
- });
267
- } catch (err) {
268
- state.loading = false;
269
- }
270
- }
271
- function buttonRender(buttonInfo) {
272
- async function onClick() {
273
- var _a;
274
- if (isForm.value) {
275
- if (!formRenderRef.value)
276
- return;
277
- try {
278
- if (patientItem.value) {
279
- (_a = patientFormRef.value) == null ? void 0 : _a.validate(async (err) => {
280
- var _a2, _b;
281
- if (!err) {
282
- const values = (_b = (_a2 = formRenderRef.value).getFormValues) == null ? void 0 : _b.call(_a2);
283
- Object.assign(values, {
284
- vaa05: patientItem.value.selectedPatient.vaa01
285
- });
286
- await handleFormSubmit(buttonInfo, values);
287
- }
288
- });
289
- } else {
290
- await handleFormSubmit(buttonInfo);
291
- }
292
- } catch (err) {
293
- }
294
- } else {
295
- emit("button-click");
296
- }
297
- }
298
- const _style = {
299
- width: "100%",
300
- "--n-height": "36px",
301
- fontSize: "15px",
302
- marginTop: "10px"
303
- };
304
- const style = isForm.value ? {
305
- ..._style,
306
- marginTop: "0"
307
- } : _style;
308
- return createVNode(NButton, {
309
- "id": props.msgId,
310
- "style": style,
311
- "secondary": true,
312
- "class": "gradient",
313
- "disabled": props.msgItem.disabled,
314
- "onClick": onClick
315
- }, {
316
- default: () => [isForm.value ? buttonInfo == null ? void 0 : buttonInfo.text : c.buttonName]
317
- });
318
- }
319
- function onFormChange(p) {
320
- const {
321
- fieldInstance,
322
- context,
323
- value,
324
- fieldKey
325
- } = p;
326
- if (fieldInstance.componentType === "REMOTE_SEARCH" && (value == null ? void 0 : value.length)) {
327
- remoteSearch[fieldKey] = [context == null ? void 0 : context.currentOption];
328
- }
329
- }
330
- function handleMore() {
331
- emit("button-click", {
332
- showMore: true
333
- });
334
- }
335
- function moreRender() {
336
- var _a;
337
- if (((_a = c.settings) == null ? void 0 : _a.id) !== "1834043761964638208" || !c.data)
338
- return null;
339
- const setting = JSON.parse(c.settings.setting);
340
- const findScopeKey = (tree) => {
341
- var _a2;
342
- let scopeKey2 = "";
343
- for (let i = 0; i < tree.length; i++) {
344
- const node = tree[i];
345
- if (node.setting.scopeKey) {
346
- scopeKey2 = node.setting.scopeKey;
347
- break;
348
- }
349
- if ((_a2 = node.childrens) == null ? void 0 : _a2.length) {
350
- scopeKey2 = findScopeKey(node.childrens);
351
- if (scopeKey2)
352
- break;
353
- }
354
- }
355
- return scopeKey2;
356
- };
357
- const scopeKey = findScopeKey(setting.templates);
358
- if (!scopeKey || !isValidJSON(c.data[scopeKey]) || JSON.parse(c.data[scopeKey]).length <= 5)
359
- return null;
360
- if (isValidJSON(templateData[scopeKey])) {
361
- templateData[scopeKey] = JSON.parse(templateData[scopeKey]).slice(0, 5);
362
- }
363
- return createVNode(NButton, {
364
- "block": true,
365
- "text": true,
366
- "icon-placement": "right",
367
- "color": cssVars.value["--c-primary-color"],
368
- "style": "margin-top: 10px",
369
- "onClick": handleMore
370
- }, {
371
- icon: () => createVNode(NIcon, {
372
- "component": ChevronForward
373
- }, null),
374
- default: () => "\u67E5\u770B\u66F4\u591A"
375
- });
376
- }
377
- return () => {
378
- var _a;
379
- return createVNode("div", {
380
- "class": "card"
381
- }, [isForm.value ? [createVNode("p", null, [c.title || c.header.title]), createVNode("div", {
382
- "class": "form-box"
383
- }, [[patientSelectRender(), createVNode(FormRender, {
384
- "request-instance": {
385
- get: axiosInstance["get"],
386
- post: axiosInstance["post"]
387
- },
388
- "life-cycle": lifeCycle,
389
- "column": 12,
390
- "ref": formRenderRef,
391
- "field-list": fieldList.value,
392
- "onFormChange": onFormChange
393
- }, null)]]), c.footer.buttons.map((buttonInfo) => buttonRender(buttonInfo))] : [createVNode(CardRender, {
394
- "config": isValidJSON((_a = c.settings) == null ? void 0 : _a.setting) ? JSON.parse(c.settings.setting) : null,
395
- "data": templateData,
396
- "onModule-click": handleModuleClick,
397
- "onButton-click": handleButtonClick
398
- }, null), moreRender()]]);
399
- };
400
- }
401
- });
402
-
403
- export { ChatCard as default };
@@ -1,203 +0,0 @@
1
- import { CSSProperties } from 'vue';
2
- import { CAudioSDK } from '../../../../components/audio-sdk';
3
- declare const _default: import("vue").DefineComponent<{}, {
4
- state: import("../../../../shared/types").AnyObject;
5
- shortcutList: import("vue").Ref<any>;
6
- getShortcutName: (item: string | import("../../../../shared/types").AnyObject) => any;
7
- isAllDisabled: import("vue").ComputedRef<any>;
8
- isStreamingOutput: import("vue").Ref<any>;
9
- handleShortcut: (item: string | import("../../../../shared/types").AnyObject) => void;
10
- showPopover: import("vue").Ref<boolean>;
11
- handleKeyDown: (event: KeyboardEvent) => void;
12
- handleInput: (value: string) => void;
13
- btnDisabled: import("vue").ComputedRef<any>;
14
- commandList: import("vue").Ref<any>;
15
- showAudio: import("vue").Ref<boolean>;
16
- handleSend: () => void;
17
- isDefault: import("vue").ComputedRef<boolean>;
18
- breadcrumb: import("vue").Ref<{
19
- [x: string]: any;
20
- shortcutTitle: string;
21
- shortcutId: string;
22
- shortcutDescription?: string | undefined;
23
- children?: any[] | undefined;
24
- }[]>;
25
- currentShortcutId: import("vue").Ref<string>;
26
- currentCommand: import("vue").Ref<{
27
- [x: string]: any;
28
- shortcutTitle: string;
29
- shortcutId: string;
30
- shortcutDescription?: string | undefined;
31
- children?: any[] | undefined;
32
- }[]>;
33
- clickMenu: (menu: import("../types").CommandItem) => void;
34
- audioTimed: import("vue").Ref<any>;
35
- showLBtn: import("vue").Ref<any>;
36
- isSmall: import("vue").ComputedRef<boolean>;
37
- cssVars: import("vue").ComputedRef<import("../../../../shared/types").AnyObject>;
38
- railStyle: ({ focused, checked }: {
39
- focused: boolean;
40
- checked: boolean;
41
- }) => CSSProperties;
42
- inputRef: import("vue").Ref<any>;
43
- placeholder: import("vue").ComputedRef<"请向我提问,Shift+Enter换行" | "请向我提问或输入\"/\"查看指令" | "请向我提问或输入\"/\"查看指令,Shift+Enter换行">;
44
- audioSdk: CAudioSDK;
45
- recorderStart: () => Promise<void>;
46
- showPrompt: import("vue").Ref<boolean>;
47
- showPatient: import("vue").Ref<boolean>;
48
- showMagicWand: import("vue").ComputedRef<boolean>;
49
- patient: import("vue").ComputedRef<string>;
50
- handleBack: () => void;
51
- updateShow: (value: boolean) => void;
52
- NButton: any;
53
- NInput: any;
54
- NIcon: any;
55
- NPopover: any;
56
- NBreadcrumb: any;
57
- NBreadcrumbItem: any;
58
- NTag: any;
59
- NSwitch: any;
60
- PaperPlane: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
61
- ChevronBack: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
62
- ChevronForward: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
63
- SparklesSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
64
- PeopleOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
65
- ChatPrompt: import("vue").DefineComponent<{
66
- show: {
67
- type: BooleanConstructor;
68
- };
69
- }, {
70
- pageInfo: {
71
- page: number;
72
- hasMore: boolean;
73
- };
74
- props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
75
- show: {
76
- type: BooleanConstructor;
77
- };
78
- }>> & {
79
- "onUpdate:show"?: ((...args: any[]) => any) | undefined;
80
- }>>;
81
- emit: (event: "update:show", ...args: any[]) => void;
82
- state: import("../../../../shared/types").AnyObject;
83
- queryPrompt: import("vue").Ref<any>;
84
- listRef: import("vue").Ref<any>;
85
- keyword: import("vue").Ref<string>;
86
- list: import("vue").Ref<import("../../../../shared/types").AnyObject[]>;
87
- showNoData: import("vue").ComputedRef<boolean>;
88
- handleInput: () => void;
89
- handleSearch: () => Promise<void>;
90
- resetAndSearch: () => void;
91
- select: (item: import("../../../../shared/types").AnyObject) => void;
92
- NDrawer: any;
93
- NDrawerContent: any;
94
- NIcon: any;
95
- NInput: any;
96
- NButton: any;
97
- CloseOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
98
- SearchOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
99
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
100
- show: {
101
- type: BooleanConstructor;
102
- };
103
- }>> & {
104
- "onUpdate:show"?: ((...args: any[]) => any) | undefined;
105
- }, {
106
- show: boolean;
107
- }>;
108
- ChatPatient: import("vue").DefineComponent<{
109
- show: {
110
- type: BooleanConstructor;
111
- };
112
- }, {
113
- props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
114
- show: {
115
- type: BooleanConstructor;
116
- };
117
- }>> & {
118
- "onUpdate:show"?: ((...args: any[]) => any) | undefined;
119
- }>>;
120
- emit: (event: "update:show", ...args: any[]) => void;
121
- state: import("../../../../shared/types").AnyObject;
122
- patientInfo: import("vue").Ref<any>;
123
- formValue: {
124
- businessType: string;
125
- vaa01: null;
126
- bck03a: string;
127
- };
128
- rules: {
129
- businessType: {
130
- required: boolean;
131
- trigger: string;
132
- message: string;
133
- };
134
- vaa01: {
135
- required: boolean;
136
- trigger: string[];
137
- message: string;
138
- };
139
- };
140
- options: import("vue").Ref<import("../../../../shared/types").AnyObject[]>;
141
- formRef: import("vue").Ref<any>;
142
- renderLabel: (option: import("../../../../shared/types").AnyObject) => string;
143
- handleUpdateValue: (value: string, option: import("naive-ui").SelectOption) => void;
144
- handleSearch: (keyword: string) => Promise<void>;
145
- handleBusinessTypeUpdate: () => void;
146
- handleValidateClick: (e: MouseEvent) => void;
147
- NDrawer: any;
148
- NDrawerContent: any;
149
- NForm: any;
150
- NFormItem: any;
151
- NButton: any;
152
- NRadioGroup: any;
153
- NRadio: any;
154
- NSelect: any;
155
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
156
- show: {
157
- type: BooleanConstructor;
158
- };
159
- }>> & {
160
- "onUpdate:show"?: ((...args: any[]) => any) | undefined;
161
- }, {
162
- show: boolean;
163
- }>;
164
- ChatAudio: import("vue").DefineComponent<{
165
- show: {
166
- type: BooleanConstructor;
167
- };
168
- }, {
169
- props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
170
- show: {
171
- type: BooleanConstructor;
172
- };
173
- }>> & {
174
- "onUpdate:show"?: ((...args: any[]) => any) | undefined;
175
- }>>;
176
- emit: (event: "update:show", ...args: any[]) => void;
177
- audioChartRef: import("vue").Ref<HTMLDivElement | undefined>;
178
- isWarning: import("vue").Ref<boolean>;
179
- isActive: import("vue").Ref<boolean>;
180
- handlePlay: () => void;
181
- handlePause: () => void;
182
- handleEnd: (trigger?: string | undefined) => Promise<void>;
183
- formattedTime: import("vue").ComputedRef<string>;
184
- warnTime: import("vue").Ref<number>;
185
- tip: import("vue").ComputedRef<"未识别录音" | "正在录音中..." | "录音已暂停">;
186
- NSpace: any;
187
- NButton: any;
188
- NIcon: any;
189
- StopCircleOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
190
- MicOff: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
191
- AlertCircle: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
192
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
193
- show: {
194
- type: BooleanConstructor;
195
- };
196
- }>> & {
197
- "onUpdate:show"?: ((...args: any[]) => any) | undefined;
198
- }, {
199
- show: boolean;
200
- }>;
201
- MicroPhone: any;
202
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
203
- export default _default;
@@ -1,6 +0,0 @@
1
- import _sfc_main from './ChatFooter.vue2.js';
2
- import _export_sfc from '../../../../_virtual/_plugin-vue_export-helper.js';
3
-
4
- var ChatFooter = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "ChatFooter.vue"]]);
5
-
6
- export { ChatFooter as default };