cnhis-design-vue 3.3.3-beta.42 → 3.3.3-beta.46
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/button-print/index.d.ts +7 -2
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +7 -2
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +10 -3
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +100 -11
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +4 -1
- package/es/components/button-print/src/utils/print.d.ts +1 -1
- package/es/components/button-print/src/utils/print.js +7 -3
- package/es/components/button-print/style/index.css +1 -1
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/field-set/src/FieldColor.vue.d.ts +4 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +4 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +4 -1
- package/es/components/field-set/src/components/table-row.vue.d.ts +2 -1
- package/es/components/field-set/src/components/table-row.vue2.js +21 -6
- package/es/components/field-set/src/types/index.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +19 -6
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ContextMenu.js +32 -17
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +52 -23
- package/es/env.d.ts +25 -25
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
@@ -753,6 +753,7 @@ class Print {
|
|
753
753
|
templateId,
|
754
754
|
number,
|
755
755
|
formatId: originFormatId,
|
756
|
+
formatItem,
|
756
757
|
params = "",
|
757
758
|
paramsArr,
|
758
759
|
authorizationKey,
|
@@ -785,6 +786,8 @@ class Print {
|
|
785
786
|
if (!this._handleResultTest(testResult, errorCallbackFn))
|
786
787
|
return false;
|
787
788
|
try {
|
789
|
+
const hideButtonsValue = hideButtons ? hideButtons : (formatItem == null ? void 0 : formatItem.previewCanExport) === void 0 || (formatItem == null ? void 0 : formatItem.previewCanExport) ? void 0 : "Export";
|
790
|
+
const btnprintValue = btnprint != "1" ? btnprint : (formatItem == null ? void 0 : formatItem.previewCanPrint) === false ? "0" : "1";
|
788
791
|
const result = await this._handleEventDirect({
|
789
792
|
templateId,
|
790
793
|
number,
|
@@ -793,8 +796,8 @@ class Print {
|
|
793
796
|
paramsArr,
|
794
797
|
cmdid: this.isRemote ? PRINT_CMD_ID : PREVIEW_CMD_ID,
|
795
798
|
signature,
|
796
|
-
btnprint,
|
797
|
-
hideButtons,
|
799
|
+
btnprint: btnprintValue,
|
800
|
+
hideButtons: hideButtonsValue,
|
798
801
|
messageTimeout
|
799
802
|
});
|
800
803
|
const handledResult = this._handleResult(result, errorCallbackFn);
|
@@ -983,6 +986,7 @@ class Print {
|
|
983
986
|
}];
|
984
987
|
params = "";
|
985
988
|
}
|
989
|
+
const printdlgshowValue = printdlgshow != "0" ? printdlgshow : (formatItem == null ? void 0 : formatItem.showPrintDialog) ? "1" : "0";
|
986
990
|
const result = await this._handleEventDirect({
|
987
991
|
templateId,
|
988
992
|
number,
|
@@ -992,7 +996,7 @@ class Print {
|
|
992
996
|
cmdid: PRINT_CMD_ID,
|
993
997
|
print,
|
994
998
|
signature,
|
995
|
-
printdlgshow,
|
999
|
+
printdlgshow: printdlgshowValue,
|
996
1000
|
nobillnode,
|
997
1001
|
copies,
|
998
1002
|
svrUpdateIp,
|
@@ -1 +1 @@
|
|
1
|
-
.dropdown-button{border-color:#d5d5d5!important;color:#212121;padding-right:0}.dropdown-button .n-button__content{height:100%}.dropdown-button .n-button__content .n-icon{align-items:center;display:flex;height:100%;justify-content:center;padding-right:10px;width:30px}.c-dropdown .n-dropdown-menu-wrapper span.active{color:#5585f5}.login-form-button{border-radius:24px;color:#fff;font-size:16px;height:50px;width:100%}.login-form-button-print{padding-top:15px}.login-form-button-print .n-input{border-radius:6px;color:#757575;font-size:14px;height:50px;line-height:50px}.c-button-print-modal .n-form-item-feedback-wrapper{display:none}.c-button-preview-modal{max-width:none!important}.c-button-preview-modal .n-dialog__content{height:98%}.newprint-button-component .icon-select{padding:0 8px!important}.newprint-button-poperOver{border-radius:3px;overflow-y:auto}.newprint-button-poperOver .bold{font-weight:700}.newprint-button-poperOver .isDisabled{color:#999;cursor:default}.newprint-button-poperOver .print-li{overflow:hidden}.newprint-button-poperOver .print-li .n-divider{margin-bottom:6px;margin-top:6px}.newprint-button-poperOver .print-li .print-lite{align-items:center;border-radius:3px;cursor:pointer;display:flex;height:32px;justify-content:space-between;margin:3px 0}.newprint-button-poperOver .print-li .print-lite .label{padding:0 8px;white-space:nowrap}.newprint-button-poperOver .print-li .print-lite .n-icon{align-items:center;border-radius:0 3px 3px 0;display:flex;height:100%;justify-content:center;width:30px}.newprint-button-poperOver .print-li .print-lite .n-checkbox{white-space:nowrap}.newprint-button-poperOver .print-li.active{color:#2563f4}.newprint-button-poperOver .print-li.active .print-lite{background:rgba(37,99,244,.1)}.newprint-button-poperOver .print-li.active .
|
1
|
+
.dropdown-button{border-color:#d5d5d5!important;color:#212121;padding-right:0}.dropdown-button .n-button__content{height:100%}.dropdown-button .n-button__content .n-icon{align-items:center;display:flex;height:100%;justify-content:center;padding-right:10px;width:30px}.c-dropdown .n-dropdown-menu-wrapper span.active{color:#5585f5}.login-form-button{border-radius:24px;color:#fff;font-size:16px;height:50px;width:100%}.login-form-button-print{padding-top:15px}.login-form-button-print .n-input{border-radius:6px;color:#757575;font-size:14px;height:50px;line-height:50px}.c-button-print-modal .n-form-item-feedback-wrapper{display:none}.c-button-preview-modal{max-width:none!important}.c-button-preview-modal .n-dialog__content{height:98%}.newprint-button-component .icon-select{padding:0 8px!important}.newprint-button-poperOver{border-radius:3px;overflow-y:auto}.newprint-button-poperOver .bold{font-weight:700}.newprint-button-poperOver .isDisabled{color:#999;cursor:default}.newprint-button-poperOver .print-li{overflow:hidden}.newprint-button-poperOver .print-li .n-divider{margin-bottom:6px;margin-top:6px}.newprint-button-poperOver .print-li .print-lite{align-items:center;border-radius:3px;cursor:pointer;display:flex;height:32px;justify-content:space-between;margin:3px 0;white-space:nowrap}.newprint-button-poperOver .print-li .print-lite .label{padding:0 8px;white-space:nowrap}.newprint-button-poperOver .print-li .print-lite .n-icon{align-items:center;border-radius:0 3px 3px 0;display:flex;height:100%;justify-content:center;width:30px}.newprint-button-poperOver .print-li .print-lite .n-checkbox{white-space:nowrap}.newprint-button-poperOver .print-li.active{color:#2563f4}.newprint-button-poperOver .print-li.active .print-lite{background:rgba(37,99,244,.1)}.newprint-button-poperOver .print-li.active .print-li-icon{background:rgba(37,99,244,.15)}.newprint-button-poperOver .print-li .print-preview-item:hover{color:#2563f4}.newprint-button-outer{align-items:center;display:flex;overflow-x:auto}.newprint-button-outer .outButtonGroup .isPrintDisabled .n-button__border{border-right-width:0!important}.newprint-button-outer .outButtonGroup .n-button.n-button--disabled+.n-button.n-button--default-type:not(.n-button--disabled) .n-button__border{border-left-width:1px!important}.newprint-button-outer .outerLastButton .n-button__border{border-bottom-right-radius:0;border-right:none;border-top-right-radius:0}.newprint-button-outer .outerLastButton:hover .n-button__state-border{border-bottom-right-radius:0;border-top-right-radius:0}.newprint-button-outer .printAllLeftCls .n-button__border,.newprint-button-outer .printAllLeftCls:hover .n-button__state-border{border-bottom-left-radius:0;border-top-left-radius:0}.newprint-button-outer__shortcut{color:#76797f}
|
@@ -52,6 +52,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
52
52
|
titleRender?: ((column: AnyObject) => import("vue").VNodeChild) | undefined;
|
53
53
|
hide?: boolean | undefined;
|
54
54
|
positionField?: string | undefined;
|
55
|
+
showPrevFn?: ((column: FieldSetColumnItem, row: AnyObject) => boolean) | undefined;
|
55
56
|
}[]>;
|
56
57
|
rowProps: {
|
57
58
|
columns: {
|
@@ -67,6 +68,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
67
68
|
titleRender?: ((column: AnyObject) => import("vue").VNodeChild) | undefined;
|
68
69
|
hide?: boolean | undefined;
|
69
70
|
positionField?: string | undefined;
|
71
|
+
showPrevFn?: ((column: FieldSetColumnItem, row: AnyObject) => boolean) | undefined;
|
70
72
|
}[];
|
71
73
|
data: AnyObject[];
|
72
74
|
onEdit: ({ row, readonly: _readonly, add }: AnyObject) => void;
|
@@ -358,12 +360,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
358
360
|
emit: (event: "edit" | "updateChecked", ...args: any[]) => void;
|
359
361
|
onRemove: () => void;
|
360
362
|
onEdit: (param?: AnyObject) => void;
|
363
|
+
prevFunc: (column: AnyObject) => any;
|
361
364
|
isRenderTooltip: (field: string) => any;
|
362
365
|
getTooltipContent: () => any;
|
363
366
|
getTextValue: (field: string) => any;
|
364
367
|
isMultiple: (field: string) => boolean;
|
365
368
|
isRender: (field: string) => boolean;
|
366
|
-
isShow: (
|
369
|
+
isShow: (column: AnyObject) => any;
|
367
370
|
showRelation: (field: string) => boolean;
|
368
371
|
getSortPriorityOptions: () => {
|
369
372
|
label: string;
|
@@ -48,6 +48,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
48
48
|
titleRender?: ((column: AnyObject) => import("vue").VNodeChild) | undefined;
|
49
49
|
hide?: boolean | undefined;
|
50
50
|
positionField?: string | undefined;
|
51
|
+
showPrevFn?: ((column: FieldSetColumnItem, row: AnyObject) => boolean) | undefined;
|
51
52
|
}[]>;
|
52
53
|
data: import("vue").Ref<{
|
53
54
|
[x: string]: any;
|
@@ -76,6 +77,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
76
77
|
titleRender?: ((column: AnyObject) => import("vue").VNodeChild) | undefined;
|
77
78
|
hide?: boolean | undefined;
|
78
79
|
positionField?: string | undefined;
|
80
|
+
showPrevFn?: ((column: FieldSetColumnItem, row: AnyObject) => boolean) | undefined;
|
79
81
|
}[];
|
80
82
|
data: {
|
81
83
|
[x: string]: any;
|
@@ -387,12 +389,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
387
389
|
emit: (event: "edit" | "updateChecked", ...args: any[]) => void;
|
388
390
|
onRemove: () => void;
|
389
391
|
onEdit: (param?: AnyObject) => void;
|
392
|
+
prevFunc: (column: AnyObject) => any;
|
390
393
|
isRenderTooltip: (field: string) => any;
|
391
394
|
getTooltipContent: () => any;
|
392
395
|
getTextValue: (field: string) => any;
|
393
396
|
isMultiple: (field: string) => boolean;
|
394
397
|
isRender: (field: string) => boolean;
|
395
|
-
isShow: (
|
398
|
+
isShow: (column: AnyObject) => any;
|
396
399
|
showRelation: (field: string) => boolean;
|
397
400
|
getSortPriorityOptions: () => {
|
398
401
|
label: string;
|
@@ -232,6 +232,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
232
232
|
titleRender?: ((column: AnyObject) => VNodeChild) | undefined;
|
233
233
|
hide?: boolean | undefined;
|
234
234
|
positionField?: string | undefined;
|
235
|
+
showPrevFn?: ((column: FieldSetColumnItem, row: AnyObject) => boolean) | undefined;
|
235
236
|
}[]>;
|
236
237
|
itemWidth: import("vue").ComputedRef<string>;
|
237
238
|
fieldList: import("vue").ComputedRef<AnyObject[]>;
|
@@ -251,6 +252,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
251
252
|
titleRender?: ((column: AnyObject) => VNodeChild) | undefined;
|
252
253
|
hide?: boolean | undefined;
|
253
254
|
positionField?: string | undefined;
|
255
|
+
showPrevFn?: ((column: FieldSetColumnItem, row: AnyObject) => boolean) | undefined;
|
254
256
|
}[];
|
255
257
|
data: AnyObject[];
|
256
258
|
onUpdateChecked: ({ checked, column }: {
|
@@ -578,12 +580,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
578
580
|
emit: (event: "edit" | "updateChecked", ...args: any[]) => void;
|
579
581
|
onRemove: () => void;
|
580
582
|
onEdit: (param?: AnyObject) => void;
|
583
|
+
prevFunc: (column: AnyObject) => any;
|
581
584
|
isRenderTooltip: (field: string) => any;
|
582
585
|
getTooltipContent: () => any;
|
583
586
|
getTextValue: (field: string) => any;
|
584
587
|
isMultiple: (field: string) => boolean;
|
585
588
|
isRender: (field: string) => boolean;
|
586
|
-
isShow: (
|
589
|
+
isShow: (column: AnyObject) => any;
|
587
590
|
showRelation: (field: string) => boolean;
|
588
591
|
getSortPriorityOptions: () => {
|
589
592
|
label: string;
|
@@ -205,12 +205,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
205
205
|
emit: (event: "edit" | "updateChecked", ...args: any[]) => void;
|
206
206
|
onRemove: () => void;
|
207
207
|
onEdit: (param?: AnyObject) => void;
|
208
|
+
prevFunc: (column: AnyObject) => any;
|
208
209
|
isRenderTooltip: (field: string) => any;
|
209
210
|
getTooltipContent: () => any;
|
210
211
|
getTextValue: (field: string) => any;
|
211
212
|
isMultiple: (field: string) => boolean;
|
212
213
|
isRender: (field: string) => boolean;
|
213
|
-
isShow: (
|
214
|
+
isShow: (column: AnyObject) => any;
|
214
215
|
showRelation: (field: string) => boolean;
|
215
216
|
getSortPriorityOptions: () => {
|
216
217
|
label: string;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { createElementVNode, defineComponent, openBlock, createElementBlock, Fragment, renderList, normalizeStyle, unref, createBlock, withCtx, createVNode, createCommentVNode, toDisplayString, resolveDynamicComponent, normalizeClass, withDirectives, vShow, mergeProps, createTextVNode } from 'vue';
|
1
|
+
import { createElementVNode, defineComponent, openBlock, createElementBlock, Fragment, renderList, normalizeStyle, unref, createBlock, withCtx, createVNode, createCommentVNode, toDisplayString, resolveDynamicComponent, normalizeClass, withDirectives, vShow, mergeProps, createTextVNode, toRaw } from 'vue';
|
2
2
|
import { NTooltip, NIcon, NCheckbox, NPopover, NSpace, NSelect, NColorPicker, NInput, NInputNumber, NButton, NPopconfirm } from 'naive-ui';
|
3
3
|
import { setStyle, setColorInfo, isShowExplicitRequired, isDisable } from '../utils/index.js';
|
4
4
|
import { ReorderTwoOutline, HelpCircleOutline, CaretDownOutline, EyeOutline, CopyOutline, CreateOutline, TrashOutline } from '@vicons/ionicons5';
|
@@ -179,6 +179,14 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
179
179
|
...param
|
180
180
|
});
|
181
181
|
}
|
182
|
+
function prevFunc(column) {
|
183
|
+
const {
|
184
|
+
showPrevFn
|
185
|
+
} = column;
|
186
|
+
if (isFunction(showPrevFn))
|
187
|
+
return showPrevFn(toRaw(column), toRaw(props.element));
|
188
|
+
return true;
|
189
|
+
}
|
182
190
|
function isRenderTooltip(field) {
|
183
191
|
var _a;
|
184
192
|
return field === "title" && (props.fieldDescribeMode === "tooltip" && props.element.feildDescribe || props.developMode && ((_a = props.element.settingObj) == null ? void 0 : _a.fieldDescDev));
|
@@ -215,7 +223,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
215
223
|
return false;
|
216
224
|
return true;
|
217
225
|
}
|
218
|
-
function isShow(
|
226
|
+
function isShow(column) {
|
227
|
+
const {
|
228
|
+
field
|
229
|
+
} = column;
|
219
230
|
if (["explicitRequired", "defaultValue"].includes(field))
|
220
231
|
return isShowExplicitRequired(props.element);
|
221
232
|
if (["isSum", "isAvg"].includes(field))
|
@@ -327,6 +338,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
327
338
|
}
|
328
339
|
}
|
329
340
|
default:
|
341
|
+
if (isArray(column == null ? void 0 : column.options))
|
342
|
+
return column.options;
|
330
343
|
return [];
|
331
344
|
}
|
332
345
|
}
|
@@ -392,6 +405,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
392
405
|
class: "table-cell",
|
393
406
|
title: __props.element[column.field],
|
394
407
|
style: normalizeStyle(unref(setStyle)(column, index, __props.columnWidthProps))
|
408
|
+
}, [prevFunc(column) ? (openBlock(), createElementBlock(Fragment, {
|
409
|
+
key: 0
|
395
410
|
}, [column.type === "text" ? (openBlock(), createElementBlock(Fragment, {
|
396
411
|
key: 0
|
397
412
|
}, [index === 0 ? (openBlock(), createElementBlock(Fragment, {
|
@@ -434,7 +449,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
434
449
|
disabled: setDisabled(column),
|
435
450
|
checked: __props.element[column.field],
|
436
451
|
"onUpdate:checked": [($event) => __props.element[column.field] = $event, (checked) => onUpdateChecked(checked, column)]
|
437
|
-
}, null, 8, ["disabled", "checked", "onUpdate:checked"]), [[vShow, isShow(column
|
452
|
+
}, null, 8, ["disabled", "checked", "onUpdate:checked"]), [[vShow, isShow(column)]]), showRelation(column.field) ? (openBlock(), createBlock(unref(NPopover), {
|
438
453
|
key: 0,
|
439
454
|
placement: "right-start",
|
440
455
|
"show-arrow": false
|
@@ -474,7 +489,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
474
489
|
value: __props.element._defaultValue,
|
475
490
|
"onUpdate:value": [_cache[0] || (_cache[0] = ($event) => __props.element._defaultValue = $event), (value) => handleUpdateSelect(value, column)],
|
476
491
|
options: getOptions(column)
|
477
|
-
}), null, 16, ["multiple", "disabled", "value", "options", "onUpdate:value"])), [[vShow, isShow(column
|
492
|
+
}), null, 16, ["multiple", "disabled", "value", "options", "onUpdate:value"])), [[vShow, isShow(column)]]) : withDirectives((openBlock(), createBlock(unref(NSelect), mergeProps({
|
478
493
|
key: 1
|
479
494
|
}, selectProps(column.field), {
|
480
495
|
clearable: "",
|
@@ -483,7 +498,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
483
498
|
value: __props.element[column.field],
|
484
499
|
"onUpdate:value": [($event) => __props.element[column.field] = $event, (value) => handleUpdateSelect(value, column)],
|
485
500
|
options: getOptions(column)
|
486
|
-
}), null, 16, ["multiple", "disabled", "value", "onUpdate:value", "options"])), [[vShow, isShow(column
|
501
|
+
}), null, 16, ["multiple", "disabled", "value", "onUpdate:value", "options"])), [[vShow, isShow(column)]])], 64))], 64)) : createCommentVNode("v-if", true), column.type === "color" ? (openBlock(), createBlock(unref(NColorPicker), {
|
487
502
|
key: 3,
|
488
503
|
class: "c-field-set__color-picker",
|
489
504
|
clearable: "",
|
@@ -604,7 +619,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
604
619
|
}
|
605
620
|
}())]),
|
606
621
|
_: 1
|
607
|
-
})], 64))], 64)) : createCommentVNode("v-if", true)], 12, _hoisted_2)) : createCommentVNode("v-if", true)], 64);
|
622
|
+
})], 64))], 64)) : createCommentVNode("v-if", true)], 64)) : createCommentVNode("v-if", true)], 12, _hoisted_2)) : createCommentVNode("v-if", true)], 64);
|
608
623
|
}), 128))]);
|
609
624
|
};
|
610
625
|
}
|
@@ -31,6 +31,7 @@ export type FieldSetColumnItem = {
|
|
31
31
|
titleRender?: (column: AnyObject) => VNodeChild;
|
32
32
|
hide?: boolean;
|
33
33
|
positionField?: string;
|
34
|
+
showPrevFn?: (column: FieldSetColumnItem, row: AnyObject) => boolean;
|
34
35
|
[key: string]: any;
|
35
36
|
};
|
36
37
|
export type FieldSetTab = 'field' | 'fieldColor' | 'highlightRow' | 'tableStyle' | 'fieldFilter';
|
@@ -224,13 +224,26 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
224
224
|
} else {
|
225
225
|
chatMessageType = MESSAGE_TYPE.IMAGE;
|
226
226
|
const match = innerHTML.match(/src\s*=\s*"([^"]*)"/);
|
227
|
-
if (match) {
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
227
|
+
if (match == null ? void 0 : match.length) {
|
228
|
+
if (match[1].startsWith("data:")) {
|
229
|
+
const file = await base64ToFile(match[1]);
|
230
|
+
if (file) {
|
231
|
+
const data = await doUpdateFile(file);
|
232
|
+
if (data) {
|
233
|
+
msg = isObject(data) ? JSON.stringify(data) : data;
|
234
|
+
}
|
233
235
|
}
|
236
|
+
} else {
|
237
|
+
const filenameMatch = innerHTML.match(/data-filename\s*=\s*"([^"]*)"/);
|
238
|
+
const fileName = filenameMatch ? filenameMatch[1] : "";
|
239
|
+
const filesizeMatch = innerHTML.match(/data-filesize\s*=\s*"([^"]*)"/);
|
240
|
+
const fileSize = filesizeMatch ? filesizeMatch[1] : "";
|
241
|
+
const fileUrl = match[1];
|
242
|
+
msg = JSON.stringify({
|
243
|
+
fileUrl,
|
244
|
+
fileName,
|
245
|
+
fileSize
|
246
|
+
});
|
234
247
|
}
|
235
248
|
}
|
236
249
|
}
|
@@ -603,7 +603,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
603
603
|
}, {
|
604
604
|
default: withCtx(() => [!unref(isAudioOrVideoMessage)(item.content) ? (openBlock(), createElementBlock(Fragment, {
|
605
605
|
key: 0
|
606
|
-
}, [createCommentVNode(' <n-button\n quaternary\n size="tiny"\n @click="(event: MouseEvent) => handleSelectLabel(event, item.id)"\n >\n <template #icon>\n <n-icon size="17" :component="HappyOutline" />\n </template>\n </n-button> '), createVNode(unref(NButton), {
|
606
|
+
}, [createCommentVNode(' <n-button\r\n quaternary\r\n size="tiny"\r\n @click="(event: MouseEvent) => handleSelectLabel(event, item.id)"\r\n >\r\n <template #icon>\r\n <n-icon size="17" :component="HappyOutline" />\r\n </template>\r\n </n-button> '), createVNode(unref(NButton), {
|
607
607
|
quaternary: "",
|
608
608
|
size: "tiny",
|
609
609
|
onClick: () => setReferenceMsg(item)
|
@@ -168,6 +168,7 @@ var ContextMenu = /* @__PURE__ */ defineComponent({
|
|
168
168
|
emit("update:show", false);
|
169
169
|
});
|
170
170
|
async function clickMenu(key) {
|
171
|
+
var _a;
|
171
172
|
emit("update:show", false);
|
172
173
|
const {
|
173
174
|
content = {},
|
@@ -184,27 +185,41 @@ var ContextMenu = /* @__PURE__ */ defineComponent({
|
|
184
185
|
if (!content.msg)
|
185
186
|
return console.log("\u590D\u5236\u5185\u5BB9\u4E3A\u7A7A\uFF01");
|
186
187
|
const isSupported = navigator && "clipboard" in navigator;
|
187
|
-
if (!isSupported)
|
188
|
-
|
188
|
+
if (!isSupported) {
|
189
|
+
$message.error("\u5F53\u524D\u6D4F\u89C8\u5668\u7248\u672C\u6216\u8005http\u534F\u8BAE\u4E0D\u652F\u6301\u590D\u5236\uFF01");
|
190
|
+
return console.log("\u5F53\u524D\u6D4F\u89C8\u5668\u7248\u672C\u6216\u8005http\u534F\u8BAE\u4E0D\u652F\u6301\u590D\u5236\uFF01");
|
191
|
+
}
|
189
192
|
try {
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
193
|
+
let data;
|
194
|
+
switch (chatMessageType) {
|
195
|
+
case MESSAGE_TYPE.TEXT:
|
196
|
+
await navigator.clipboard.writeText(content.msg);
|
197
|
+
break;
|
198
|
+
case MESSAGE_TYPE.EMOJI: {
|
199
|
+
const url = emojis.findEmoji(content.msg);
|
200
|
+
data = `<img data-msg=${content.msg} data-type=${chatMessageType} class="emoji--min" src=${url} />`;
|
201
|
+
break;
|
202
|
+
}
|
203
|
+
case MESSAGE_TYPE.IMAGE: {
|
204
|
+
const url = formatJsonstr(content.msg, "fileUrl");
|
205
|
+
const fileName = formatJsonstr(content.msg, "fileName");
|
206
|
+
const fileSize = (_a = formatJsonstr(content.msg, "fileSize")) == null ? void 0 : _a.replace(/\s+/g, "");
|
207
|
+
data = `<img data-filename=${fileName} data-filesize=${fileSize} data-type=${chatMessageType} class="chat-image-copy" src=${url} />`;
|
208
|
+
break;
|
209
|
+
}
|
210
|
+
case MESSAGE_TYPE.BLEND:
|
198
211
|
data = __content;
|
199
|
-
|
212
|
+
break;
|
213
|
+
default:
|
200
214
|
data = content.msg;
|
201
|
-
|
202
|
-
await navigator.clipboard.write([new window.ClipboardItem({
|
203
|
-
"text/html": new Blob([data], {
|
204
|
-
type: "text/html"
|
205
|
-
})
|
206
|
-
})]);
|
215
|
+
break;
|
207
216
|
}
|
217
|
+
await navigator.clipboard.write([new window.ClipboardItem({
|
218
|
+
"text/html": new Blob([data], {
|
219
|
+
type: "text/html"
|
220
|
+
})
|
221
|
+
})]);
|
222
|
+
$message.success("\u590D\u5236\u6210\u529F");
|
208
223
|
} catch (error) {
|
209
224
|
console.log("\u590D\u5236\u5931\u8D25\uFF01");
|
210
225
|
}
|
@@ -225,7 +225,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
225
225
|
round: "",
|
226
226
|
size: 100,
|
227
227
|
onClickCapture: _cache[0] || (_cache[0] = ($event) => showLargeAvatar.value = true)
|
228
|
-
}, null, 8, ["src"]), createCommentVNode(' <n-upload abstract accept="image/*" @change="onChange">\n <n-upload-trigger #="{ handleClick }" abstract>\n <n-button\n circle\n secondary\n class="edit-avatar"\n v-show="userDetail.id === state.userInfo.id"\n @click="handleClick"\n >\n <template #icon>\n <n-icon size="16" color="#666666" :component="Camera" />\n </template>\n </n-button>\n </n-upload-trigger>\n </n-upload> '), createElementVNode("div", _hoisted_4, [createElementVNode("h4", null, [createElementVNode("label", _hoisted_5, toDisplayString(userDetail.name), 1), withDirectives(createElementVNode("label", {
|
228
|
+
}, null, 8, ["src"]), createCommentVNode(' <n-upload abstract accept="image/*" @change="onChange">\r\n <n-upload-trigger #="{ handleClick }" abstract>\r\n <n-button\r\n circle\r\n secondary\r\n class="edit-avatar"\r\n v-show="userDetail.id === state.userInfo.id"\r\n @click="handleClick"\r\n >\r\n <template #icon>\r\n <n-icon size="16" color="#666666" :component="Camera" />\r\n </template>\r\n </n-button>\r\n </n-upload-trigger>\r\n </n-upload> '), createElementVNode("div", _hoisted_4, [createElementVNode("h4", null, [createElementVNode("label", _hoisted_5, toDisplayString(userDetail.name), 1), withDirectives(createElementVNode("label", {
|
229
229
|
class: normalizeClass(["iho-chatRole", unref(isDoctorRole)(userDetail.roleInfo) ? "isDoctor" : ""])
|
230
230
|
}, toDisplayString(unref(getRoleName)(userDetail.roleInfo)), 3), [[vShow, unref(getRoleName)(userDetail.roleInfo)]])]), createElementVNode("p", null, toDisplayString(userDetail.orgName), 1)]), createVNode(unref(NButton), {
|
231
231
|
strong: "",
|