cnhis-design-vue 3.3.1-release.5 → 3.3.2-release.0
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/README.md +87 -87
- package/es/components/audio-sdk/index.d.ts +20 -0
- package/es/components/audio-sdk/src/Index.vue.d.ts +20 -0
- package/es/components/audio-sdk/src/Index.vue2.js +1 -1
- package/es/components/audio-sdk/src/audioSDK.d.ts +1 -0
- package/es/components/audio-sdk/src/audioSDK.js +11 -3
- package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +10 -0
- package/es/components/audio-sdk/src/components/recording.vue.d.ts +10 -0
- package/es/components/audio-sdk/src/components/recording.vue2.js +5 -0
- package/es/components/audio-sdk/src/constants/index.d.ts +1 -0
- package/es/components/audio-sdk/src/constants/index.js +3 -0
- package/es/components/audio-sdk/src/utils/recorder/fft.d.ts +4 -0
- package/es/components/audio-sdk/src/utils/recorder/mp3-engine.d.ts +4 -0
- package/es/components/audio-sdk/src/utils/recorder/mp3.d.ts +4 -0
- package/es/components/audio-sdk/src/utils/recorder/recorder.d.ts +4 -0
- package/es/components/audio-sdk/src/utils/recorder/wave.d.ts +4 -0
- package/es/components/audio-sdk/src/utils/recordingModal.js +13 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/callback/src/components/render/popupMaps.d.ts +17 -1
- package/es/components/card-render/index.d.ts +4 -4
- package/es/components/card-render/src/CardRender.vue.d.ts +4 -4
- package/es/components/card-render/src/components/index.d.ts +23 -23
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +12 -6
- package/es/components/field-editor/index.d.ts +4 -0
- package/es/components/field-editor/src/FieldEditor.vue.d.ts +4 -0
- package/es/components/form-config/index.d.ts +80 -5
- package/es/components/form-config/src/FormConfig.vue.d.ts +80 -5
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +4 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +57 -4
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +16 -1
- package/es/components/form-config/src/constants/index.d.ts +2 -1
- package/es/components/form-config/src/constants/index.js +1 -0
- package/es/components/form-config/src/hooks/useConfigurationField.js +19 -1
- package/es/components/form-config/src/hooks/useLocale.d.ts +1 -0
- package/es/components/form-config/src/hooks/useLocale.js +1 -0
- package/es/components/form-config/src/types/index.d.ts +1 -0
- package/es/components/form-render/index.d.ts +4 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +4 -0
- package/es/components/form-render/src/FormRender.vue2.js +3 -2
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +4 -0
- package/es/components/form-render/src/components/renderer/combination/combination.js +1 -1
- package/es/components/form-render/src/components/renderer/date.d.ts +2 -2
- package/es/components/form-render/src/components/renderer/input.d.ts +16 -4
- package/es/components/form-render/src/components/renderer/input.js +39 -7
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +3 -0
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +9 -8
- package/es/components/form-render/src/components/renderer/text.js +1 -1
- package/es/components/form-render/src/components/renderer/textarea.d.ts +16 -1
- package/es/components/form-render/src/components/renderer/textarea.js +36 -8
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -0
- package/es/components/form-render/src/hooks/useComplexOptions.js +3 -2
- package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +4 -3
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -0
- package/es/components/form-render/src/hooks/useFormField.d.ts +2 -0
- package/es/components/form-render/src/hooks/useFormField.js +5 -1
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -0
- package/es/components/form-render/src/hooks/usePresetScope.js +1 -0
- package/es/components/form-render/src/types/fieldItem.d.ts +11 -0
- package/es/components/form-render/src/types/index.d.ts +1 -0
- package/es/components/form-render/src/utils/index.js +1 -0
- package/es/components/form-render/src/utils/schema.js +60 -15
- package/es/components/guide/src/renderer.d.ts +2 -2
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-table/index.d.ts +13 -1
- package/es/components/iho-table/src/IhoTable.vue.d.ts +13 -2
- package/es/components/iho-table/src/IhoTable.vue2.js +27 -20
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +6 -0
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +1 -2
- package/es/components/index.js +0 -3
- package/es/components/info-header/index.d.ts +13 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +13 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +5 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +4 -0
- package/es/components/scale-view/index.d.ts +1 -1
- package/es/components/scale-view/src/ScaleView.vue.d.ts +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +2 -2
- package/es/components/scale-view/src/hooks/scaleview-init.d.ts +1 -1
- package/es/components/scale-view/src/hooks/scaleview-init.js +2 -2
- package/es/components/select-person/src/SelectPerson.vue2.js +8 -5
- package/es/components/shortcut-setter/index.d.ts +16 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +16 -1
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +11 -11
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
- package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
- package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
- package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
- package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
- package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
- package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
- package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
- package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
- package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
- package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/table_style_2.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/CancelRadio/CancelRadio.d.ts +7 -0
- package/es/shared/components/CancelRadio/CancelRadio.js +6 -6
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +76 -77
- package/es/components/ai-chat/index.d.ts +0 -680
- package/es/components/ai-chat/index.js +0 -10
- package/es/components/ai-chat/src/Index.vue.d.ts +0 -682
- package/es/components/ai-chat/src/Index.vue.js +0 -6
- package/es/components/ai-chat/src/Index.vue2.js +0 -175
- package/es/components/ai-chat/src/api/index.d.ts +0 -8
- package/es/components/ai-chat/src/api/index.js +0 -87
- package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +0 -38
- package/es/components/ai-chat/src/components/ChatAudio.vue.js +0 -6
- package/es/components/ai-chat/src/components/ChatAudio.vue2.js +0 -103
- package/es/components/ai-chat/src/components/ChatBI.vue.d.ts +0 -101
- package/es/components/ai-chat/src/components/ChatBI.vue.js +0 -6
- package/es/components/ai-chat/src/components/ChatBI.vue2.js +0 -73
- package/es/components/ai-chat/src/components/ChatCard.d.ts +0 -43
- package/es/components/ai-chat/src/components/ChatCard.js +0 -403
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +0 -203
- package/es/components/ai-chat/src/components/ChatFooter.vue.js +0 -6
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +0 -373
- package/es/components/ai-chat/src/components/ChatMain.d.ts +0 -2
- package/es/components/ai-chat/src/components/ChatMain.js +0 -350
- package/es/components/ai-chat/src/components/ChatMainDefault.d.ts +0 -2
- package/es/components/ai-chat/src/components/ChatMainDefault.js +0 -278
- package/es/components/ai-chat/src/components/ChatPatient.vue.d.ts +0 -59
- package/es/components/ai-chat/src/components/ChatPatient.vue.js +0 -6
- package/es/components/ai-chat/src/components/ChatPatient.vue2.js +0 -218
- package/es/components/ai-chat/src/components/ChatPrompt.vue.d.ts +0 -45
- package/es/components/ai-chat/src/components/ChatPrompt.vue.js +0 -6
- package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +0 -143
- package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +0 -57
- package/es/components/ai-chat/src/components/ChatRight.vue.js +0 -6
- package/es/components/ai-chat/src/components/ChatRight.vue2.js +0 -190
- package/es/components/ai-chat/src/components/card/JsonCard.d.ts +0 -25
- package/es/components/ai-chat/src/components/card/JsonCard.js +0 -574
- package/es/components/ai-chat/src/components/message-render/CardRender.d.ts +0 -16
- package/es/components/ai-chat/src/components/message-render/CardRender.js +0 -80
- package/es/components/ai-chat/src/components/message-render/FormRender.d.ts +0 -16
- package/es/components/ai-chat/src/components/message-render/FormRender.js +0 -173
- package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue.d.ts +0 -36
- package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue.js +0 -6
- package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue2.js +0 -96
- package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue.d.ts +0 -105
- package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue.js +0 -6
- package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue2.js +0 -260
- package/es/components/ai-chat/src/components/svgs/AddIcon.vue.js +0 -18
- package/es/components/ai-chat/src/components/svgs/AudioIcon.vue.js +0 -37
- package/es/components/ai-chat/src/components/svgs/KeyboardIcon.vue.js +0 -20
- package/es/components/ai-chat/src/components/svgs/MicroPhone.vue.js +0 -48
- package/es/components/ai-chat/src/hooks/index.d.ts +0 -2
- package/es/components/ai-chat/src/hooks/index.js +0 -2
- package/es/components/ai-chat/src/hooks/useChartAudioContext.d.ts +0 -18
- package/es/components/ai-chat/src/hooks/useChartAudioContext.js +0 -202
- package/es/components/ai-chat/src/hooks/useData.d.ts +0 -77
- package/es/components/ai-chat/src/hooks/useData.js +0 -289
- package/es/components/ai-chat/src/hooks/useFooterContext.d.ts +0 -38
- package/es/components/ai-chat/src/hooks/useFooterContext.js +0 -218
- package/es/components/ai-chat/src/hooks/useProgram.d.ts +0 -14
- package/es/components/ai-chat/src/hooks/useProgram.js +0 -306
- package/es/components/ai-chat/src/hooks/useSSE.d.ts +0 -9
- package/es/components/ai-chat/src/hooks/useSSE.js +0 -138
- package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +0 -4
- package/es/components/ai-chat/src/hooks/useWebsocket.js +0 -66
- package/es/components/ai-chat/src/types/index.d.ts +0 -45
- package/es/components/ai-chat/src/types/index.js +0 -1
- package/es/components/ai-chat/src/utils/index.d.ts +0 -7
- package/es/components/ai-chat/src/utils/index.js +0 -41
- package/es/components/ai-chat/style/index.css +0 -1
- package/es/shared/assets/img/ai__avatar.png.js +0 -3
- package/es/shared/assets/img/file-emr.png.js +0 -3
- package/es/shared/assets/img/file.png.js +0 -3
- package/es/shared/assets/img/logo.png.js +0 -3
- package/es/shared/assets/img/use.png.js +0 -3
@@ -1,80 +0,0 @@
|
|
1
|
-
import { defineComponent, computed, createVNode } from 'vue';
|
2
|
-
import { isArray, omit, property } from 'lodash-es';
|
3
|
-
import CardRender$1 from '../../../../card-render/index.js';
|
4
|
-
import { isValidJSON } from '../../utils/index.js';
|
5
|
-
|
6
|
-
var CardRender = /* @__PURE__ */ defineComponent({
|
7
|
-
name: "CardRender",
|
8
|
-
inheritAttrs: false,
|
9
|
-
props: {
|
10
|
-
msgItem: {
|
11
|
-
type: Object,
|
12
|
-
default: () => ({})
|
13
|
-
}
|
14
|
-
},
|
15
|
-
setup(props) {
|
16
|
-
const {
|
17
|
-
settings = {},
|
18
|
-
data = {}
|
19
|
-
} = props.msgItem.content;
|
20
|
-
const config = computed(() => {
|
21
|
-
if (!isValidJSON(settings == null ? void 0 : settings.setting))
|
22
|
-
return null;
|
23
|
-
return JSON.parse(settings.setting);
|
24
|
-
});
|
25
|
-
function handleModuleClick(_module) {
|
26
|
-
console.log("handleModuleClick ==>", _module);
|
27
|
-
}
|
28
|
-
function handleButtonClick(buttonInfo) {
|
29
|
-
var _a, _b, _c;
|
30
|
-
if (!buttonInfo)
|
31
|
-
return;
|
32
|
-
const {
|
33
|
-
button,
|
34
|
-
config: config2,
|
35
|
-
data: data2,
|
36
|
-
fullData = data2
|
37
|
-
} = buttonInfo;
|
38
|
-
const paramsList = (_c = (_b = (_a = button == null ? void 0 : button.advancedConfig) == null ? void 0 : _a.eventConfig) == null ? void 0 : _b.params) != null ? _c : [];
|
39
|
-
const parsedParams = {};
|
40
|
-
paramsList.forEach((item) => {
|
41
|
-
const {
|
42
|
-
label,
|
43
|
-
value
|
44
|
-
} = item;
|
45
|
-
const valueMatched = value.match(/\${(.*?)}/);
|
46
|
-
if (!valueMatched) {
|
47
|
-
parsedParams[label] = value;
|
48
|
-
return;
|
49
|
-
}
|
50
|
-
const keyList = valueMatched[1].split(".").map((k) => k.trim());
|
51
|
-
if (keyList.length === 2 && keyList[1] === "selected") {
|
52
|
-
let tableData = fullData == null ? void 0 : fullData[keyList[0]];
|
53
|
-
if (!isArray(tableData))
|
54
|
-
tableData = [];
|
55
|
-
parsedParams[label] = tableData.reduce((res, r) => {
|
56
|
-
if (r == null ? void 0 : r.__checked)
|
57
|
-
res.push(omit(r, ["__checked"]));
|
58
|
-
return res;
|
59
|
-
}, []);
|
60
|
-
return;
|
61
|
-
}
|
62
|
-
parsedParams[label] = property(keyList.join("."))({
|
63
|
-
...fullData,
|
64
|
-
row: data2
|
65
|
-
});
|
66
|
-
});
|
67
|
-
console.log("parsed_params=>", parsedParams);
|
68
|
-
}
|
69
|
-
return () => createVNode("div", {
|
70
|
-
"class": "card"
|
71
|
-
}, [createVNode(CardRender$1, {
|
72
|
-
"config": config.value,
|
73
|
-
"data": data,
|
74
|
-
"onModule-click": handleModuleClick,
|
75
|
-
"onButton-click": handleButtonClick
|
76
|
-
}, null)]);
|
77
|
-
}
|
78
|
-
});
|
79
|
-
|
80
|
-
export { CardRender as default };
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import { PropType } from 'vue';
|
2
|
-
import { MessageItem } from '../../types';
|
3
|
-
declare const _default: import("vue").DefineComponent<{
|
4
|
-
msgItem: {
|
5
|
-
type: PropType<MessageItem>;
|
6
|
-
default: () => {};
|
7
|
-
};
|
8
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
9
|
-
msgItem: {
|
10
|
-
type: PropType<MessageItem>;
|
11
|
-
default: () => {};
|
12
|
-
};
|
13
|
-
}>>, {
|
14
|
-
msgItem: MessageItem;
|
15
|
-
}>;
|
16
|
-
export default _default;
|
@@ -1,173 +0,0 @@
|
|
1
|
-
import { defineComponent, ref, createVNode, createTextVNode } from 'vue';
|
2
|
-
import { NButton } from 'naive-ui';
|
3
|
-
import FormRender$1 from '../../../../form-render/index.js';
|
4
|
-
import { isArray } from 'lodash-es';
|
5
|
-
import { useData } from '../../hooks/useData.js';
|
6
|
-
import '../../utils/index.js';
|
7
|
-
|
8
|
-
const htmlTypeMap = {
|
9
|
-
input: "INPUT",
|
10
|
-
textarea: "TEXTAREA",
|
11
|
-
radio: "RADIO",
|
12
|
-
switch: "SWITCH",
|
13
|
-
checkbox: "CHECKBOX",
|
14
|
-
datePicker: "DATE",
|
15
|
-
singleSelect: "SELECT",
|
16
|
-
multiSelect: "SELECT"
|
17
|
-
};
|
18
|
-
const getOptionsUrl = "/flow/api/process/start";
|
19
|
-
var FormRender = /* @__PURE__ */ defineComponent({
|
20
|
-
name: "FormRender",
|
21
|
-
inheritAttrs: false,
|
22
|
-
props: {
|
23
|
-
msgItem: {
|
24
|
-
type: Object,
|
25
|
-
default: () => ({})
|
26
|
-
}
|
27
|
-
},
|
28
|
-
setup(props, {
|
29
|
-
attrs,
|
30
|
-
slots,
|
31
|
-
emit
|
32
|
-
}) {
|
33
|
-
var _a;
|
34
|
-
const {
|
35
|
-
state,
|
36
|
-
axiosInstance,
|
37
|
-
toReplyAiConditions
|
38
|
-
} = useData();
|
39
|
-
const fieldList = ref([]);
|
40
|
-
const formRenderRef = ref();
|
41
|
-
const {
|
42
|
-
formConfig = [],
|
43
|
-
formContent = ""
|
44
|
-
} = ((_a = props.msgItem) == null ? void 0 : _a.content) || {};
|
45
|
-
init();
|
46
|
-
function init() {
|
47
|
-
fieldList.value = formConfig.map((form) => {
|
48
|
-
var _a2, _b;
|
49
|
-
const dataMap = form.dataMap || {
|
50
|
-
label: "label",
|
51
|
-
value: "value"
|
52
|
-
};
|
53
|
-
const item = {
|
54
|
-
html_type: htmlTypeMap[form.fieldInputType] || form.fieldInputType,
|
55
|
-
val_key: form.fieldKey,
|
56
|
-
name: form.fieldName,
|
57
|
-
elem_width: 12,
|
58
|
-
default_val: form.fieldDefValue,
|
59
|
-
lazyRequest: true,
|
60
|
-
requestCache: true,
|
61
|
-
urlConfig: {
|
62
|
-
nameKey: dataMap.label
|
63
|
-
},
|
64
|
-
option: form.dataList || [],
|
65
|
-
is_null: form.fieldRequired ? "0" : "1",
|
66
|
-
is_edit: props.msgItem.disabled ? "0" : "1",
|
67
|
-
componentProps: {
|
68
|
-
...form.fieldConfig
|
69
|
-
},
|
70
|
-
multi_select: form.fieldInputType === "multiSelect" ? "0" : "1"
|
71
|
-
};
|
72
|
-
if (item.html_type === "DATE") {
|
73
|
-
item.date_format = form.dateFormat || "yyyy-MM-dd HH:mm:ss";
|
74
|
-
}
|
75
|
-
if (form.dataSources == 1) {
|
76
|
-
item.html_type === "REMOTE_SEARCH";
|
77
|
-
item.componentProps = {
|
78
|
-
fallbackOption: false
|
79
|
-
};
|
80
|
-
item.default_val = null;
|
81
|
-
if (form.fieldDefValue && isArray(form.dataList) && form.dataList.length > 0) {
|
82
|
-
const option = form.dataList.find((o) => (o == null ? void 0 : o[dataMap.value]) === form.fieldDefValue);
|
83
|
-
if (option) {
|
84
|
-
item.default_val = form.fieldDefValue;
|
85
|
-
}
|
86
|
-
}
|
87
|
-
Object.assign(item.urlConfig, {
|
88
|
-
url: getOptionsUrl,
|
89
|
-
method: "post",
|
90
|
-
nameKey: dataMap.lable,
|
91
|
-
valueKey: dataMap.value,
|
92
|
-
params: {
|
93
|
-
bpmnProcessId: (_a2 = form.fieldConfig) == null ? void 0 : _a2.dataSetCode,
|
94
|
-
isRes: 1,
|
95
|
-
variables: (_b = form.fieldConfig) == null ? void 0 : _b.params
|
96
|
-
},
|
97
|
-
dependKey: []
|
98
|
-
});
|
99
|
-
}
|
100
|
-
return item;
|
101
|
-
});
|
102
|
-
}
|
103
|
-
function buttonRender() {
|
104
|
-
async function onClick() {
|
105
|
-
var _a2, _b;
|
106
|
-
if (!formRenderRef.value)
|
107
|
-
return;
|
108
|
-
try {
|
109
|
-
state.loading = true;
|
110
|
-
const values = formRenderRef.value.getFormValues();
|
111
|
-
await ((_a2 = formRenderRef.value) == null ? void 0 : _a2.validate());
|
112
|
-
formConfig.forEach((form) => {
|
113
|
-
if (values[form.fieldKey]) {
|
114
|
-
form.fieldDefValue = values[form.fieldKey];
|
115
|
-
}
|
116
|
-
});
|
117
|
-
toReplyAiConditions({
|
118
|
-
programData: (_b = props.msgItem) == null ? void 0 : _b.__programData,
|
119
|
-
params: values
|
120
|
-
});
|
121
|
-
props.msgItem.disabled = true;
|
122
|
-
} catch (err) {
|
123
|
-
console.log("\u63D0\u4EA4\u8868\u5355 ===>", err);
|
124
|
-
} finally {
|
125
|
-
state.loading = false;
|
126
|
-
}
|
127
|
-
}
|
128
|
-
const style = {
|
129
|
-
width: "100%",
|
130
|
-
"--n-height": "36px",
|
131
|
-
fontSize: "15px",
|
132
|
-
marginTop: "10px"
|
133
|
-
};
|
134
|
-
return createVNode(NButton, {
|
135
|
-
"style": style,
|
136
|
-
"secondary": true,
|
137
|
-
"class": "gradient",
|
138
|
-
"disabled": props.msgItem.disabled || state.loading,
|
139
|
-
"onClick": onClick
|
140
|
-
}, {
|
141
|
-
default: () => [createTextVNode("\u63D0\u4EA4")]
|
142
|
-
});
|
143
|
-
}
|
144
|
-
function FormBoxRender() {
|
145
|
-
return createVNode("div", {
|
146
|
-
"class": "form-box"
|
147
|
-
}, [createVNode(FormRender$1, {
|
148
|
-
"request-instance": {
|
149
|
-
get: axiosInstance["get"],
|
150
|
-
post: axiosInstance["post"]
|
151
|
-
},
|
152
|
-
"column": 12,
|
153
|
-
"ref": formRenderRef,
|
154
|
-
"field-list": fieldList.value
|
155
|
-
}, null), buttonRender()]);
|
156
|
-
}
|
157
|
-
function renderList() {
|
158
|
-
const replacedFormContent = formContent.replace(/\\n|\n|\r\n/g, "<br>").split("<br>");
|
159
|
-
const renderList2 = replacedFormContent.filter((str) => !!str).map((str) => {
|
160
|
-
if (str.includes("{form}")) {
|
161
|
-
return FormBoxRender();
|
162
|
-
}
|
163
|
-
return [createVNode("p", null, [str.replace(/( |\s|<br>)+/g, "")])];
|
164
|
-
});
|
165
|
-
return renderList2;
|
166
|
-
}
|
167
|
-
return () => createVNode("div", {
|
168
|
-
"class": "card"
|
169
|
-
}, [renderList()]);
|
170
|
-
}
|
171
|
-
});
|
172
|
-
|
173
|
-
export { FormRender as default };
|
@@ -1,36 +0,0 @@
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
2
|
-
show: {
|
3
|
-
type: BooleanConstructor;
|
4
|
-
};
|
5
|
-
}, {
|
6
|
-
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
7
|
-
show: {
|
8
|
-
type: BooleanConstructor;
|
9
|
-
};
|
10
|
-
}>> & {
|
11
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
12
|
-
}>>;
|
13
|
-
emit: (event: "update:show", ...args: any[]) => void;
|
14
|
-
audioChatRef: import("vue").Ref<HTMLDivElement | undefined>;
|
15
|
-
isWarning: import("vue").Ref<boolean>;
|
16
|
-
isActive: import("vue").Ref<boolean>;
|
17
|
-
handlePlay: () => void;
|
18
|
-
handlePause: () => void;
|
19
|
-
handleEnd: (trigger?: string | undefined) => Promise<void>;
|
20
|
-
formattedTime: import("vue").ComputedRef<string>;
|
21
|
-
warnTime: import("vue").Ref<number>;
|
22
|
-
audioSdk: import("../../../..").CAudioSDK;
|
23
|
-
audioSdkContentRef: import("vue").Ref<string>;
|
24
|
-
tip: import("vue").ComputedRef<"未识别录音" | "录音已暂停" | "正在听...">;
|
25
|
-
stateText: import("vue").ComputedRef<"" | "已暂停">;
|
26
|
-
NButton: any;
|
27
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
28
|
-
show: {
|
29
|
-
type: BooleanConstructor;
|
30
|
-
};
|
31
|
-
}>> & {
|
32
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
33
|
-
}, {
|
34
|
-
show: boolean;
|
35
|
-
}>;
|
36
|
-
export default _default;
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import _sfc_main from './MobileChatAudio.vue2.js';
|
2
|
-
import _export_sfc from '../../../../../_virtual/_plugin-vue_export-helper.js';
|
3
|
-
|
4
|
-
var MobileChatAudio = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "MobileChatAudio.vue"]]);
|
5
|
-
|
6
|
-
export { MobileChatAudio as default };
|
@@ -1,96 +0,0 @@
|
|
1
|
-
import { defineComponent, ref, computed, withDirectives, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, createBlock, withCtx, createTextVNode, createVNode, vShow } from 'vue';
|
2
|
-
import { NButton } from 'naive-ui';
|
3
|
-
import { useChartAudioContext } from '../../hooks/useChartAudioContext.js';
|
4
|
-
|
5
|
-
const _hoisted_1 = {
|
6
|
-
class: "mobile-ai-chat-audio"
|
7
|
-
};
|
8
|
-
const _hoisted_2 = {
|
9
|
-
class: "mobile-ai-chat-audio--wrapper"
|
10
|
-
};
|
11
|
-
const _hoisted_3 = {
|
12
|
-
class: "mobile-ai-chat-audio--content"
|
13
|
-
};
|
14
|
-
const _hoisted_4 = {
|
15
|
-
class: "mobile-ai-chat-audio--footer"
|
16
|
-
};
|
17
|
-
const _hoisted_5 = {
|
18
|
-
class: "mobile-ai-chat-audio--operation"
|
19
|
-
};
|
20
|
-
const _hoisted_6 = /* @__PURE__ */ createElementVNode("i", {
|
21
|
-
class: "mobile-ai-chat-audio--operationRedDot"
|
22
|
-
}, null, -1);
|
23
|
-
const _hoisted_7 = {
|
24
|
-
class: "mobile-ai-chat-audio--operationTimer"
|
25
|
-
};
|
26
|
-
const _hoisted_8 = {
|
27
|
-
class: "mobile-ai-chat-audio--operationBtns"
|
28
|
-
};
|
29
|
-
var _sfc_main = /* @__PURE__ */ defineComponent({
|
30
|
-
__name: "MobileChatAudio",
|
31
|
-
props: {
|
32
|
-
show: {
|
33
|
-
type: Boolean
|
34
|
-
}
|
35
|
-
},
|
36
|
-
emits: ["update:show"],
|
37
|
-
setup(__props, {
|
38
|
-
emit
|
39
|
-
}) {
|
40
|
-
const props = __props;
|
41
|
-
const audioChatRef = ref();
|
42
|
-
const {
|
43
|
-
isWarning,
|
44
|
-
isActive,
|
45
|
-
handlePlay,
|
46
|
-
handlePause,
|
47
|
-
handleEnd,
|
48
|
-
formattedTime,
|
49
|
-
warnTime,
|
50
|
-
audioSdk
|
51
|
-
} = useChartAudioContext(props, emit, {
|
52
|
-
waveSelector: () => audioChatRef.value
|
53
|
-
});
|
54
|
-
const audioSdkContentRef = audioSdk.contentRef;
|
55
|
-
const tip = computed(() => isActive.value ? isWarning.value ? "\u672A\u8BC6\u522B\u5F55\u97F3" : "\u6B63\u5728\u542C..." : "\u5F55\u97F3\u5DF2\u6682\u505C");
|
56
|
-
const stateText = computed(() => {
|
57
|
-
return isActive.value ? "" : "\u5DF2\u6682\u505C";
|
58
|
-
});
|
59
|
-
return (_ctx, _cache) => {
|
60
|
-
return withDirectives((openBlock(), createElementBlock("section", _hoisted_1, [createElementVNode("section", _hoisted_2, [createElementVNode("section", _hoisted_3, toDisplayString(unref(audioSdkContentRef)), 1), createElementVNode("footer", _hoisted_4, [createElementVNode("div", {
|
61
|
-
style: {
|
62
|
-
"width": "300px",
|
63
|
-
"height": "60px"
|
64
|
-
},
|
65
|
-
ref_key: "audioChatRef",
|
66
|
-
ref: audioChatRef
|
67
|
-
}, null, 512), createElementVNode("div", null, toDisplayString(unref(tip)), 1), createElementVNode("section", _hoisted_5, [_hoisted_6, createElementVNode("div", _hoisted_7, [createElementVNode("span", null, toDisplayString(unref(formattedTime)), 1), createElementVNode("span", null, toDisplayString(unref(stateText)), 1)]), createElementVNode("div", _hoisted_8, [unref(isActive) ? (openBlock(), createBlock(unref(NButton), {
|
68
|
-
key: 0,
|
69
|
-
round: "",
|
70
|
-
color: "rgb(236, 96, 42)",
|
71
|
-
onClick: unref(handlePause)
|
72
|
-
}, {
|
73
|
-
default: withCtx(() => [createTextVNode("\u6682\u505C")]),
|
74
|
-
_: 1
|
75
|
-
}, 8, ["onClick"])) : (openBlock(), createBlock(unref(NButton), {
|
76
|
-
key: 1,
|
77
|
-
type: "warning",
|
78
|
-
round: "",
|
79
|
-
color: "rgb(236, 96, 42)",
|
80
|
-
onClick: unref(handlePlay)
|
81
|
-
}, {
|
82
|
-
default: withCtx(() => [createTextVNode("\u7EE7\u7EED")]),
|
83
|
-
_: 1
|
84
|
-
}, 8, ["onClick"])), createVNode(unref(NButton), {
|
85
|
-
text: "",
|
86
|
-
color: "white",
|
87
|
-
onClick: unref(handleEnd)
|
88
|
-
}, {
|
89
|
-
default: withCtx(() => [createTextVNode("\u5B8C\u6210")]),
|
90
|
-
_: 1
|
91
|
-
}, 8, ["onClick"])])])])])], 512)), [[vShow, __props.show]]);
|
92
|
-
};
|
93
|
-
}
|
94
|
-
});
|
95
|
-
|
96
|
-
export { _sfc_main as default };
|
@@ -1,105 +0,0 @@
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {
|
2
|
-
state: import("../../../../../shared/types").AnyObject;
|
3
|
-
shortcutList: import("vue").Ref<any>;
|
4
|
-
getShortcutName: (item: string | import("../../../../../shared/types").AnyObject) => any;
|
5
|
-
isAllDisabled: import("vue").ComputedRef<any>;
|
6
|
-
isStreamingOutput: import("vue").Ref<any>;
|
7
|
-
handleShortcut: (item: string | import("../../../../../shared/types").AnyObject) => void;
|
8
|
-
showPopover: import("vue").Ref<boolean>;
|
9
|
-
handleKeyDown: (event: KeyboardEvent) => void;
|
10
|
-
handleInput: (value: string) => void;
|
11
|
-
btnDisabled: import("vue").ComputedRef<any>;
|
12
|
-
showAudio: import("vue").Ref<boolean>;
|
13
|
-
breadcrumb: import("vue").Ref<{
|
14
|
-
[x: string]: any;
|
15
|
-
shortcutTitle: string;
|
16
|
-
shortcutId: string;
|
17
|
-
shortcutDescription?: string | undefined;
|
18
|
-
children?: any[] | undefined;
|
19
|
-
}[]>;
|
20
|
-
currentShortcutId: import("vue").Ref<string>;
|
21
|
-
currentCommand: import("vue").Ref<{
|
22
|
-
[x: string]: any;
|
23
|
-
shortcutTitle: string;
|
24
|
-
shortcutId: string;
|
25
|
-
shortcutDescription?: string | undefined;
|
26
|
-
children?: any[] | undefined;
|
27
|
-
}[]>;
|
28
|
-
commandList: import("vue").Ref<any>;
|
29
|
-
clickMenu: (menu: import("../../types").CommandItem) => void;
|
30
|
-
handleBack: () => void;
|
31
|
-
AudioStateMap: {
|
32
|
-
INPUT: string;
|
33
|
-
AUDIO: string;
|
34
|
-
AUDIO_DOING: string;
|
35
|
-
AUDIO_CANCEL: string;
|
36
|
-
};
|
37
|
-
audioState: any;
|
38
|
-
showState: {
|
39
|
-
show: boolean;
|
40
|
-
};
|
41
|
-
footerRef: import("vue").Ref<HTMLDivElement | undefined>;
|
42
|
-
footerRect: null;
|
43
|
-
onBarTouchStart: () => void;
|
44
|
-
onFooterTouchMove: (event: TouchEvent) => void;
|
45
|
-
onFooterTouchEnd: () => void;
|
46
|
-
onFooterTouchCancel: () => void;
|
47
|
-
audioChartRef: import("vue").Ref<HTMLDivElement | undefined>;
|
48
|
-
isWarning: import("vue").Ref<boolean>;
|
49
|
-
isActive: import("vue").Ref<boolean>;
|
50
|
-
handlePlay: () => void;
|
51
|
-
handlePause: () => void;
|
52
|
-
handleEnd: (trigger?: string | undefined) => Promise<void>;
|
53
|
-
handleCancel: () => void;
|
54
|
-
formattedTime: import("vue").ComputedRef<string>;
|
55
|
-
warnTime: import("vue").Ref<number>;
|
56
|
-
audioSdk: import("../../../..").CAudioSDK;
|
57
|
-
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<{}>>, {}>;
|
58
|
-
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<{}>>, {}>;
|
59
|
-
NBreadcrumb: any;
|
60
|
-
NBreadcrumbItem: any;
|
61
|
-
NButton: any;
|
62
|
-
NIcon: any;
|
63
|
-
NInput: any;
|
64
|
-
NPopover: any;
|
65
|
-
MobileChatAudio: import("vue").DefineComponent<{
|
66
|
-
show: {
|
67
|
-
type: BooleanConstructor;
|
68
|
-
};
|
69
|
-
}, {
|
70
|
-
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
71
|
-
show: {
|
72
|
-
type: BooleanConstructor;
|
73
|
-
};
|
74
|
-
}>> & {
|
75
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
76
|
-
}>>;
|
77
|
-
emit: (event: "update:show", ...args: any[]) => void;
|
78
|
-
audioChatRef: import("vue").Ref<HTMLDivElement | undefined>;
|
79
|
-
isWarning: import("vue").Ref<boolean>;
|
80
|
-
isActive: import("vue").Ref<boolean>;
|
81
|
-
handlePlay: () => void;
|
82
|
-
handlePause: () => void;
|
83
|
-
handleEnd: (trigger?: string | undefined) => Promise<void>;
|
84
|
-
formattedTime: import("vue").ComputedRef<string>;
|
85
|
-
warnTime: import("vue").Ref<number>;
|
86
|
-
audioSdk: import("../../../..").CAudioSDK;
|
87
|
-
audioSdkContentRef: import("vue").Ref<string>;
|
88
|
-
tip: import("vue").ComputedRef<"未识别录音" | "录音已暂停" | "正在听...">;
|
89
|
-
stateText: import("vue").ComputedRef<"" | "已暂停">;
|
90
|
-
NButton: any;
|
91
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
92
|
-
show: {
|
93
|
-
type: BooleanConstructor;
|
94
|
-
};
|
95
|
-
}>> & {
|
96
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
97
|
-
}, {
|
98
|
-
show: boolean;
|
99
|
-
}>;
|
100
|
-
AddIcon: any;
|
101
|
-
MicroPhone: any;
|
102
|
-
AudioIcon: any;
|
103
|
-
KeyboardIcon: any;
|
104
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
105
|
-
export default _default;
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import _sfc_main from './MobileChatFooter.vue2.js';
|
2
|
-
import _export_sfc from '../../../../../_virtual/_plugin-vue_export-helper.js';
|
3
|
-
|
4
|
-
var MobileChatFooter = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "MobileChatFooter.vue"]]);
|
5
|
-
|
6
|
-
export { MobileChatFooter as default };
|