cnhis-design-vue 3.2.2-beta.2 → 3.2.2-beta.9

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 (116) hide show
  1. package/README.md +87 -87
  2. package/es/components/biunique-chat/index.d.ts +750 -562
  3. package/es/components/biunique-chat/index.js +1 -1
  4. package/es/components/biunique-chat/src/Index.vue.d.ts +1213 -0
  5. package/es/components/biunique-chat/src/Index.vue.js +1 -0
  6. package/es/components/biunique-chat/src/Index.vue2.js +1 -0
  7. package/es/components/biunique-chat/src/api/index.d.ts +2 -5
  8. package/es/components/biunique-chat/src/api/index.js +1 -1
  9. package/es/components/biunique-chat/src/components/ChatFile.vue.d.ts +241 -0
  10. package/es/components/biunique-chat/src/components/ChatFile.vue.js +1 -0
  11. package/es/components/biunique-chat/src/components/ChatFile.vue2.js +1 -0
  12. package/es/components/biunique-chat/src/components/ChatFooter.vue.d.ts +3 -5
  13. package/es/components/biunique-chat/src/components/ChatFooter.vue2.js +1 -1
  14. package/es/components/biunique-chat/src/components/ChatHeader.vue.d.ts +639 -0
  15. package/es/components/biunique-chat/src/components/ChatHeader.vue2.js +1 -1
  16. package/es/components/biunique-chat/src/components/ChatMain.vue.d.ts +61 -5
  17. package/es/components/biunique-chat/src/components/ChatMain.vue2.js +1 -1
  18. package/es/components/biunique-chat/src/components/ChatRecord.vue.d.ts +101 -0
  19. package/es/components/biunique-chat/src/components/ChatRecord.vue.js +1 -0
  20. package/es/components/biunique-chat/src/components/ChatRecord.vue2.js +1 -0
  21. package/es/components/biunique-chat/src/components/ChatSet.vue.d.ts +246 -0
  22. package/es/components/biunique-chat/src/components/ChatSet.vue.js +1 -0
  23. package/es/components/biunique-chat/src/components/ChatSet.vue2.js +1 -0
  24. package/es/components/biunique-chat/src/components/PersonProfile.vue.d.ts +59 -0
  25. package/es/components/biunique-chat/src/components/PersonProfile.vue.js +1 -0
  26. package/es/components/biunique-chat/src/components/PersonProfile.vue2.js +1 -0
  27. package/es/components/biunique-chat/src/components/SiderList.vue.d.ts +18 -28
  28. package/es/components/biunique-chat/src/components/SiderList.vue2.js +1 -1
  29. package/es/components/biunique-chat/src/hooks/useState.d.ts +7 -0
  30. package/es/components/biunique-chat/src/hooks/useState.js +1 -0
  31. package/es/components/biunique-chat/src/types/index.d.ts +10 -0
  32. package/es/components/biunique-chat/src/types/index.js +1 -0
  33. package/es/components/biunique-chat/src/utils/index.d.ts +6 -0
  34. package/es/components/biunique-chat/src/utils/index.js +1 -0
  35. package/es/components/biunique-chat/style/iconfont.ttf +0 -0
  36. package/es/components/biunique-chat/style/index.css +1 -1
  37. package/es/components/button-print/src/utils/print.d.ts +1 -0
  38. package/es/components/button-print/src/utils/print.js +1 -1
  39. package/es/components/calendar/index.d.ts +2 -11
  40. package/es/components/calendar/src/Calendar.vue.d.ts +1 -11
  41. package/es/components/callback/src/components/render/popupMaps.d.ts +2 -0
  42. package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
  43. package/es/components/classification/src/index.vue.d.ts +3 -3
  44. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  45. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  46. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
  47. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  48. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  49. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  50. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  51. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  52. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  53. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  54. package/es/components/fabric-chart/src/hooks/useCommon.d.ts +1 -0
  55. package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
  56. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  57. package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
  58. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1 -1
  59. package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -1
  60. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  61. package/es/components/form-render/src/hooks/useSelectedSetting.d.ts +3 -4
  62. package/es/components/form-render/src/hooks/useSelectedSetting.js +1 -1
  63. package/es/components/iho-table/index.d.ts +2 -0
  64. package/es/components/iho-table/src/IhoTable.vue.d.ts +2 -0
  65. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  66. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -0
  67. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  68. package/es/components/iho-table/src/plugins/headerPlugin.js +1 -1
  69. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/index.d.ts +5 -0
  70. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useHeaderCSS.js +1 -1
  71. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useHoverColumn.js +1 -1
  72. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/renderer.js +1 -1
  73. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/types.d.ts +1 -0
  74. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.d.ts +1 -0
  75. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +1 -1
  76. package/es/components/iho-table/src/types/index.d.ts +1 -0
  77. package/es/components/iho-table/src/utils/index.d.ts +1 -1
  78. package/es/components/iho-table/src/utils/index.js +1 -1
  79. package/es/components/iho-table/style/index.css +1 -1
  80. package/es/components/index.css +1 -1
  81. package/es/components/index.js +1 -1
  82. package/es/components/node_modules/naive-ui/node_modules/date-fns/docs/logo.svg +26 -0
  83. package/es/components/node_modules/naive-ui/node_modules/date-fns/docs/logotype.svg +1 -0
  84. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  85. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  86. package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
  87. package/es/components/step-notice/index.d.ts +1 -0
  88. package/es/components/step-notice/src/StepNotice.vue.d.ts +2 -0
  89. package/es/components/step-notice/src/StepNotice.vue2.js +1 -1
  90. package/es/env.d.ts +25 -25
  91. package/es/shared/assets/img/failure.png.js +1 -1
  92. package/es/shared/assets/img/no-permission.png.js +1 -1
  93. package/es/shared/assets/img/nodata.png.js +1 -1
  94. package/es/shared/assets/img/notfound.png.js +1 -1
  95. package/es/shared/assets/img/qr.png.js +1 -1
  96. package/es/shared/assets/img/success.png.js +1 -1
  97. package/es/shared/assets/img/table_style_2.png.js +1 -1
  98. package/es/shared/assets/img/video.png.js +1 -1
  99. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  100. package/es/shared/assets/img/xb_big.png.js +1 -1
  101. package/es/shared/assets/img/xb_small.png.js +1 -1
  102. package/es/shared/hooks/index.js +1 -1
  103. package/es/shared/hooks/useTheme.d.ts +1 -0
  104. package/es/shared/hooks/useTheme.js +1 -1
  105. package/es/shared/package.json.js +1 -1
  106. package/package.json +2 -2
  107. package/es/components/biunique-chat/src/BiuniqueChat.vue.d.ts +0 -1005
  108. package/es/components/biunique-chat/src/BiuniqueChat.vue.js +0 -1
  109. package/es/components/biunique-chat/src/BiuniqueChat.vue2.js +0 -1
  110. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  111. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  112. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  113. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  114. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  115. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  116. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -0,0 +1 @@
1
+ import e from"./Index.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var o=r(e,[["__file","Index.vue"]]);export{o as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as s,reactive as o,provide as t,openBlock as n,createBlock as r,unref as i,withCtx as a,normalizeStyle as c,createVNode as u}from"vue";import{NConfigProvider as p,NSpin as m,NLayout as d,NLayoutContent as l}from"naive-ui";import h from"./components/SiderList.vue.js";import f from"./components/ChatHeader.vue.js";import g from"./components/ChatMain.vue.js";import v from"./components/ChatFooter.vue.js";import{ChatSock as b}from"./utils/chatSock.js";import{instanceAxios as y}from"./api/index.js";import{formatTime as C}from"./utils/index.js";import{useTheme as _}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";var S=e({__name:"Index",props:{token:{type:String,required:!0},userId:{type:String,required:!0},baseURL:{type:String,default:"/fdp-chat"}},setup(e){const S=e;y.defaults.baseURL=S.baseURL+"/chat";const j=_(),k=s(!1),I=s(),L=o({reConnention:0,currentSessionItem:{},sessionKey:"",userInfo:{},msgList:[],currentMsg:{},isAppendMsg:!1,sessionList:[],isChangeSession:!1,updateSessionItem:{},isUpdateSession:!1});function M(){const e={headers:{UserId:S.userId},heartbeatFn:()=>{try{I.value.send("test")}catch(e){I.value.disconnect(),M()}},connectCb:()=>{console.log("连接成功"),L.reConnention>0&&(L.reConnention=0),I.value.subscribe("/user/topic/single",(({body:e})=>{try{console.log(e,"订阅新增消息");const s=JSON.parse(e);L.currentMsg=s,L.isAppendMsg=!0}catch(e){console.log(e)}})),I.value.subscribe("/app/sessionList",(({body:e})=>{try{const s=JSON.parse(e),{currentUser:o,sessionVos:t}=s;if(console.log("body",s),L.userInfo=o,!(null==t?void 0:t.length))return;const n=t.map((e=>({...e,__name:e.name.slice(-2),__time:C(e.updatedTime).siderMsgTime,__lastContent:e.lastMessage})));L.sessionList=n}catch(e){console.log(e)}}))},errorCb:(e,s)=>{L.reConnention=s,console.log("断线了,正在重连...")}};I.value=new b("/fdp-chat/websocket",e)}return t("state",L),t("stompClient",I),async function(){M()}(),(e,s)=>(n(),r(i(p),{abstract:"",namespace:"c-biunique-chat__popover"},{default:a((()=>[k.value?(n(),r(i(m),{key:0,stroke:"#5585f5"})):(n(),r(i(d),{key:1,class:"c-biunique-chat","has-sider":"",style:c(i(j))},{default:a((()=>[u(h),u(i(l),{class:"chat-wrapper"},{default:a((()=>[u(f),u(g),u(v)])),_:1})])),_:1},8,["style"]))])),_:1}))}});export{S as default};
@@ -1,8 +1,5 @@
1
1
  import { AnyObject } from '../../../../shared/types';
2
- export declare function accessApi(params: AnyObject): import("axios").AxiosPromise<any>;
3
- export declare function getMySessionListApi(params: AnyObject): import("axios").AxiosPromise<any>;
2
+ export declare const instanceAxios: import("axios").AxiosInstance;
4
3
  export declare function accessSessionApi(params: AnyObject): import("axios").AxiosPromise<any>;
5
4
  export declare function getHistoryRecordApi(params: AnyObject): import("axios").AxiosPromise<any>;
6
- export declare function sendMessageApi(params: AnyObject): import("axios").AxiosPromise<any>;
7
- export declare function readMessageApi(params: AnyObject): import("axios").AxiosPromise<any>;
8
- export declare function createSessionApi(params: AnyObject): import("axios").AxiosPromise<any>;
5
+ export declare function toppingSessionApi(params: AnyObject): import("axios").AxiosPromise<any>;
@@ -1 +1 @@
1
- import t from"axios";const e=t.create({withCredentials:!0,timeout:5e3,baseURL:"/dev_chat"});function s(t){return e({method:"post",url:"/basic/access",data:t})}function a(t){return e({method:"get",url:"/basic/getMySessionList",params:t})}function r(t){return e({method:"post",url:"/basic/accessSession",data:t})}function o(t){return e({method:"get",url:"/basic/historyRecord",params:t})}function n(t){return e({method:"post",url:"/basic/sendMessage",data:t})}function i(t){return e({method:"post",url:"/basic/readMessage",data:t})}function c(t){return e({method:"post",url:"/basic/createSession",data:t})}e.interceptors.response.use((t=>{var e,s;if(null==(e=t.data)?void 0:e.success)return null==(s=t.data)?void 0:s.data;console.log("请求错误")}));export{s as accessApi,r as accessSessionApi,c as createSessionApi,o as getHistoryRecordApi,a as getMySessionListApi,i as readMessageApi,n as sendMessageApi};
1
+ import o from"axios";function e(o){const e=[];for(const n in o){const t=o[n];Array.isArray(t)?t.forEach((o=>{e.push(`${encodeURIComponent(n)}=${encodeURIComponent(o)}`)})):e.push(`${encodeURIComponent(n)}=${encodeURIComponent(t)}`)}return e.join("&")}const n=o.create({withCredentials:!0,timeout:5e3});function t(o){return n({headers:{"Content-Type":"application/x-www-form-urlencoded"},method:"post",url:"/openSession",data:e(o)})}function r(o){return n({method:"get",url:"/recordList",params:o})}function s(o){return n({method:"post",url:"/toppingSession",data:o})}n.interceptors.response.use((o=>{var e,n;if(null==(e=o.data)?void 0:e.result)return null==(n=o.data)?void 0:n.data;console.log("请求错误")}));export{t as accessSessionApi,r as getHistoryRecordApi,n as instanceAxios,s as toppingSessionApi};
@@ -0,0 +1,241 @@
1
+ import { PropType } from 'vue';
2
+ import { AnyObject } from '../../../../shared/types';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ type: {
5
+ type: StringConstructor;
6
+ default: string;
7
+ };
8
+ }, {
9
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
10
+ type: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ }>> & {}>>;
15
+ imageList: {
16
+ label: string;
17
+ data: string[];
18
+ }[];
19
+ fileList: {
20
+ name: string;
21
+ size: string;
22
+ time: string;
23
+ sender: string;
24
+ }[];
25
+ title: import("vue").ComputedRef<"聊天图片" | "聊天文件">;
26
+ getDetail: (item: AnyObject) => string;
27
+ NModal: any;
28
+ NImageGroup: import("vue").DefineComponent<{
29
+ showToolbar: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ showToolbarTooltip: BooleanConstructor;
34
+ theme: PropType<import("naive-ui/es/_mixins").Theme<"Image", {
35
+ toolbarIconColor: string;
36
+ toolbarColor: string;
37
+ toolbarBoxShadow: string;
38
+ toolbarBorderRadius: string;
39
+ }, {
40
+ Tooltip: import("naive-ui/es/_mixins").Theme<"Tooltip", {
41
+ borderRadius: string;
42
+ boxShadow: string;
43
+ color: string;
44
+ textColor: string;
45
+ padding: string;
46
+ }, {
47
+ Popover: import("naive-ui/es/_mixins").Theme<"Popover", {
48
+ fontSize: string;
49
+ borderRadius: string;
50
+ color: string;
51
+ dividerColor: string;
52
+ textColor: string;
53
+ boxShadow: string;
54
+ space: string;
55
+ spaceArrow: string;
56
+ arrowOffset: string;
57
+ arrowOffsetVertical: string;
58
+ arrowHeight: string;
59
+ padding: string;
60
+ }, any>;
61
+ }>;
62
+ }>>;
63
+ themeOverrides: PropType<import("naive-ui/es/_mixins/use-theme").ExtractThemeOverrides<import("naive-ui/es/_mixins").Theme<"Image", {
64
+ toolbarIconColor: string;
65
+ toolbarColor: string;
66
+ toolbarBoxShadow: string;
67
+ toolbarBorderRadius: string;
68
+ }, {
69
+ Tooltip: import("naive-ui/es/_mixins").Theme<"Tooltip", {
70
+ borderRadius: string;
71
+ boxShadow: string;
72
+ color: string;
73
+ textColor: string;
74
+ padding: string;
75
+ }, {
76
+ Popover: import("naive-ui/es/_mixins").Theme<"Popover", {
77
+ fontSize: string;
78
+ borderRadius: string;
79
+ color: string;
80
+ dividerColor: string;
81
+ textColor: string;
82
+ boxShadow: string;
83
+ space: string;
84
+ spaceArrow: string;
85
+ arrowOffset: string;
86
+ arrowOffsetVertical: string;
87
+ arrowHeight: string;
88
+ padding: string;
89
+ }, any>;
90
+ }>;
91
+ }>>>;
92
+ builtinThemeOverrides: PropType<import("naive-ui/es/_mixins/use-theme").ExtractThemeOverrides<import("naive-ui/es/_mixins").Theme<"Image", {
93
+ toolbarIconColor: string;
94
+ toolbarColor: string;
95
+ toolbarBoxShadow: string;
96
+ toolbarBorderRadius: string;
97
+ }, {
98
+ Tooltip: import("naive-ui/es/_mixins").Theme<"Tooltip", {
99
+ borderRadius: string;
100
+ boxShadow: string;
101
+ color: string;
102
+ textColor: string;
103
+ padding: string;
104
+ }, {
105
+ Popover: import("naive-ui/es/_mixins").Theme<"Popover", {
106
+ fontSize: string;
107
+ borderRadius: string;
108
+ color: string;
109
+ dividerColor: string;
110
+ textColor: string;
111
+ boxShadow: string;
112
+ space: string;
113
+ spaceArrow: string;
114
+ arrowOffset: string;
115
+ arrowOffsetVertical: string;
116
+ arrowHeight: string;
117
+ padding: string;
118
+ }, any>;
119
+ }>;
120
+ }>>>;
121
+ }, {
122
+ mergedClsPrefix: import("vue").ComputedRef<string>;
123
+ previewInstRef: import("vue").Ref<{
124
+ setThumbnailEl: (e: HTMLImageElement | null) => void;
125
+ setPreviewSrc: (src?: string | undefined) => void;
126
+ toggleShow: () => void;
127
+ } | null>;
128
+ next: () => void;
129
+ prev: () => void;
130
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
131
+ showToolbar: {
132
+ type: BooleanConstructor;
133
+ default: boolean;
134
+ };
135
+ showToolbarTooltip: BooleanConstructor;
136
+ theme: PropType<import("naive-ui/es/_mixins").Theme<"Image", {
137
+ toolbarIconColor: string;
138
+ toolbarColor: string;
139
+ toolbarBoxShadow: string;
140
+ toolbarBorderRadius: string;
141
+ }, {
142
+ Tooltip: import("naive-ui/es/_mixins").Theme<"Tooltip", {
143
+ borderRadius: string;
144
+ boxShadow: string;
145
+ color: string;
146
+ textColor: string;
147
+ padding: string;
148
+ }, {
149
+ Popover: import("naive-ui/es/_mixins").Theme<"Popover", {
150
+ fontSize: string;
151
+ borderRadius: string;
152
+ color: string;
153
+ dividerColor: string;
154
+ textColor: string;
155
+ boxShadow: string;
156
+ space: string;
157
+ spaceArrow: string;
158
+ arrowOffset: string;
159
+ arrowOffsetVertical: string;
160
+ arrowHeight: string;
161
+ padding: string;
162
+ }, any>;
163
+ }>;
164
+ }>>;
165
+ themeOverrides: PropType<import("naive-ui/es/_mixins/use-theme").ExtractThemeOverrides<import("naive-ui/es/_mixins").Theme<"Image", {
166
+ toolbarIconColor: string;
167
+ toolbarColor: string;
168
+ toolbarBoxShadow: string;
169
+ toolbarBorderRadius: string;
170
+ }, {
171
+ Tooltip: import("naive-ui/es/_mixins").Theme<"Tooltip", {
172
+ borderRadius: string;
173
+ boxShadow: string;
174
+ color: string;
175
+ textColor: string;
176
+ padding: string;
177
+ }, {
178
+ Popover: import("naive-ui/es/_mixins").Theme<"Popover", {
179
+ fontSize: string;
180
+ borderRadius: string;
181
+ color: string;
182
+ dividerColor: string;
183
+ textColor: string;
184
+ boxShadow: string;
185
+ space: string;
186
+ spaceArrow: string;
187
+ arrowOffset: string;
188
+ arrowOffsetVertical: string;
189
+ arrowHeight: string;
190
+ padding: string;
191
+ }, any>;
192
+ }>;
193
+ }>>>;
194
+ builtinThemeOverrides: PropType<import("naive-ui/es/_mixins/use-theme").ExtractThemeOverrides<import("naive-ui/es/_mixins").Theme<"Image", {
195
+ toolbarIconColor: string;
196
+ toolbarColor: string;
197
+ toolbarBoxShadow: string;
198
+ toolbarBorderRadius: string;
199
+ }, {
200
+ Tooltip: import("naive-ui/es/_mixins").Theme<"Tooltip", {
201
+ borderRadius: string;
202
+ boxShadow: string;
203
+ color: string;
204
+ textColor: string;
205
+ padding: string;
206
+ }, {
207
+ Popover: import("naive-ui/es/_mixins").Theme<"Popover", {
208
+ fontSize: string;
209
+ borderRadius: string;
210
+ color: string;
211
+ dividerColor: string;
212
+ textColor: string;
213
+ boxShadow: string;
214
+ space: string;
215
+ spaceArrow: string;
216
+ arrowOffset: string;
217
+ arrowOffsetVertical: string;
218
+ arrowHeight: string;
219
+ padding: string;
220
+ }, any>;
221
+ }>;
222
+ }>>>;
223
+ }>>, {
224
+ showToolbar: boolean;
225
+ showToolbarTooltip: boolean;
226
+ }>;
227
+ NImage: any;
228
+ NInput: any;
229
+ NIcon: any;
230
+ 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<{}>>, {}>;
231
+ OpenOutline: 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<{}>>, {}>;
232
+ DownloadOutline: 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<{}>>, {}>;
233
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
234
+ type: {
235
+ type: StringConstructor;
236
+ default: string;
237
+ };
238
+ }>>, {
239
+ type: string;
240
+ }>;
241
+ export default _default;
@@ -0,0 +1 @@
1
+ import e from"./ChatFile.vue2.js";import r from"../../../../_virtual/_plugin-vue_export-helper.js";var t=r(e,[["__file","ChatFile.vue"]]);export{t as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as t,computed as i,openBlock as a,createBlock as e,unref as m,withCtx as c,createElementBlock as s,createVNode as p,Fragment as o,renderList as l,createElementVNode as n,toDisplayString as u}from"vue";import{NModal as d,NImageGroup as f,NImage as h,NInput as r,NIcon as g}from"naive-ui";import{SearchOutline as b,OpenOutline as y,DownloadOutline as w}from"@vicons/ionicons5";const G={key:0,class:"c-chat-dialog__content c-chat-image-wrapper"},v={class:"label"},E={class:"image-box"},P={key:1,class:"c-chat-dialog__content c-chat-file-wrapper"},_={class:"file-list-box"},x={class:"text"},J={class:"name"},k={class:"detail"},C={class:"opt-box"};var z=t({__name:"ChatFile",props:{type:{type:String,default:"image"}},setup(t){const z=t,j=[{label:"本周",data:["https://cdn.cnhis.cc/1204564363755786242/03014.jpg","https://img1.baidu.com/it/u=1068679326,1387532038&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=664","https://img0.baidu.com/it/u=2417241712,2153529446&fm=253&fmt=auto&app=138&f=JPEG?w=501&h=500"]},{label:"本月",data:["https://img1.baidu.com/it/u=1068679326,1387532038&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=664","https://img0.baidu.com/it/u=2417241712,2153529446&fm=253&fmt=auto&app=138&f=JPEG?w=501&h=500","https://himg.bdimg.com/sys/portrait/item/public.1.f50c02bd.y9WGGCP1aqCEf85wL6yrng?tt=1706769350037"]},{label:"2024年01月",data:["https://cdn.cnhis.cc/1204564363755786242/03014.jpg","https://img1.baidu.com/it/u=1068679326,1387532038&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=664","https://img0.baidu.com/it/u=2417241712,2153529446&fm=253&fmt=auto&app=138&f=JPEG?w=501&h=500","https://himg.bdimg.com/sys/portrait/item/public.1.f50c02bd.y9WGGCP1aqCEf85wL6yrng?tt=1706769350037","https://cdn.cnhis.cc/1204564363755786242/03014.jpg","https://img1.baidu.com/it/u=1068679326,1387532038&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=664","https://img0.baidu.com/it/u=2417241712,2153529446&fm=253&fmt=auto&app=138&f=JPEG?w=501&h=500","https://himg.bdimg.com/sys/portrait/item/public.1.f50c02bd.y9WGGCP1aqCEf85wL6yrng?tt=1706769350037"]}],q=[{name:"问的那个1.docx",size:"8kb",time:"2024/01/01 10:30",sender:"大傻子(质控部)"},{name:"问的那个21.docx",size:"8kb",time:"2024/01/01 10:30",sender:"大傻子(质控2部)"}],L=i((()=>"image"===z.type?"聊天图片":"聊天文件"));function W(t){const{size:i,time:a,sender:e}=t;return`${i}.${a}.${e}`}return(i,z)=>(a(),e(m(d),{preset:"dialog",title:m(L),"show-icon":!1,class:"c-chat-dialog"},{default:c((()=>["image"===t.type?(a(),s("div",G,[p(m(f),null,{default:c((()=>[(a(),s(o,null,l(j,(t=>n("div",{class:"image-item",key:t.label},[n("span",v,u(t.label),1),n("div",E,[(a(!0),s(o,null,l(t.data,((t,i)=>(a(),e(m(h),{key:i,width:"80",height:"80",src:t},null,8,["src"])))),128))])]))),64))])),_:1})])):(a(),s("div",P,[p(m(r),{placeholder:"搜索文件"},{prefix:c((()=>[p(m(g),{component:m(b)},null,8,["component"])])),_:1}),n("div",_,[(a(),s(o,null,l(q,((t,i)=>n("div",{class:"file-item",key:i},[p(m(g),{component:m(b)},null,8,["component"]),n("div",x,[n("span",J,u(t.name),1),n("span",k,u(W(t)),1)]),n("div",C,[p(m(g),{size:16,component:m(y)},null,8,["component"]),p(m(g),{size:16,component:m(w)},null,8,["component"])])]))),64))])]))])),_:1},8,["title"]))}});export{z as default};
@@ -1,12 +1,10 @@
1
1
  import { AnyObject } from '../../../../shared/types';
2
2
  declare const _default: import("vue").DefineComponent<{}, {
3
3
  inputRef: import("vue").Ref<HTMLDivElement | undefined>;
4
- state: AnyObject;
5
- setCurrentMsg: Function;
6
- setIsAppendMsg: Function;
7
- setCurrentSessionItem: Function;
8
- setIsChangeSession: Function;
9
4
  content: import("vue").Ref<string>;
5
+ state: AnyObject;
6
+ setCurrentSessionItem: (item: AnyObject) => void;
7
+ stompClient: AnyObject;
10
8
  handleKeyDown: (event: KeyboardEvent) => void;
11
9
  isWrap: (event: KeyboardEvent) => boolean;
12
10
  handleInput: () => void;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as n,inject as t,openBlock as s,createElementBlock as r,normalizeStyle as o,unref as a,withDirectives as i,createElementVNode as u,vShow as l,createVNode as c,withCtx as d,createTextVNode as f}from"vue";import{NButton as m}from"naive-ui";import{sendMessageApi as p}from"../api/index.js";import{format as v}from"date-fns";const y={class:"btn-box"},g=u("span",{class:"tip"},"Enter 发送, Ctrl + Enter 换行",-1);var I=e({__name:"ChatFooter",setup(e){const I=n(),S=t("state"),M=t("setCurrentMsg"),_=t("setIsAppendMsg"),b=t("setCurrentSessionItem"),C=t("setIsChangeSession"),h=n("");function w(e){["Enter"].includes(e.key)&&(function(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}(e)||(e.preventDefault(),K()))}function x(){var e,n;h.value=(null==(n=null==(e=I.value)?void 0:e.innerText)?void 0:n.trim())||""}function K(){if(!(h.value.length>2e3))return h.value?void async function(){const e={content:h.value,type:0};I.value.innerHTML="",h.value="";const n=Date.now();M({content:e,fromName:S.userInfo.username,sessionId:S.currentSessionItem.id,id:"",createdTime:n,sending:!0,fail:!1}),_(!0),b({__time:v(new Date(n),"MM/dd HH:mm"),__lastContent:e.content}),C(!0);try{const n=await p({sessionId:S.currentSessionId,from:S.userInfo.username,source:2,body:JSON.stringify(e)});M({...S.currentMsg,id:n.messageId,fail:!1,readStatus:n.readStatus})}catch(e){M({...S.currentMsg,fail:!0})}finally{M({...S.currentMsg,sending:!1})}}():console.log("请输入内容");console.log("请控制在2000字以内")}return(e,n)=>(s(),r("section",{class:"chat-footer",style:o({cursor:a(S).currentSessionId?"default":"not-allowed"})},[i(u("div",{ref_key:"inputRef",ref:I,class:"input-box",contenteditable:"",onKeydown:w,onInput:x},null,544),[[l,a(S).currentSessionId]]),u("div",y,[g,c(a(m),{type:"primary",round:"",disabled:!h.value,onClick:K},{default:d((()=>[f("发送")])),_:1},8,["disabled"])])],4))}});export{I as default};
1
+ import{defineComponent as e,ref as t,openBlock as n,createElementBlock as s,normalizeStyle as r,unref as i,withDirectives as o,createElementVNode as a,vShow as l,createVNode as u,withCtx as c,createTextVNode as d}from"vue";import{NButton as f}from"naive-ui";import{format as m}from"date-fns";import{useState as p}from"../hooks/useState.js";import{formatTime as y}from"../utils/index.js";const g={class:"btn-box"},v=a("span",{class:"tip"},"Enter 发送, Ctrl + Enter 换行",-1);var M=e({__name:"ChatFooter",setup(e){const M=t(),T=t(""),{state:h,setCurrentSessionItem:_,stompClient:C}=p();function K(e){["Enter"].includes(e.key)&&(function(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}(e)||(e.preventDefault(),E()))}function b(){var e,t;T.value=(null==(t=null==(e=M.value)?void 0:e.innerText)?void 0:t.trim())||""}function E(){if(!(T.value.length>2e3))return T.value?void async function(){const e={msg:T.value,chatMessageType:"TEXT"};M.value.innerHTML="",T.value="";const t=m(new Date,"yyyy-MM-dd HH:mm:ss");h.currentMsg={content:e,sender:h.userInfo.id,id:"",sendTime:t,sending:!0,fail:!1},h.isAppendMsg=!0,_({__time:y(t).siderMsgTime,__lastContent:e.msg,updatedTime:t}),h.isChangeSession=!0;try{C.value.send("/app/chat/send",{},JSON.stringify({chatType:"SINGLE",content:{chatMessageType:"TEXT",msg:e.msg},receiver:h.currentSessionItem.receiver})),h.currentMsg={...h.currentMsg,fail:!1}}catch(e){h.currentMsg={...h.currentMsg,fail:!0}}finally{h.currentMsg={...h.currentMsg,sending:!1}}}():console.log("请输入内容");console.log("请控制在2000字以内")}return(e,t)=>(n(),s("section",{class:"chat-footer",style:r({cursor:i(h).sessionKey?"default":"not-allowed"})},[o(a("div",{ref_key:"inputRef",ref:M,class:"input-box",contenteditable:"",onKeydown:K,onInput:b},null,544),[[l,i(h).sessionKey]]),a("div",g,[v,u(i(f),{type:"primary",round:"",disabled:!T.value,onClick:E},{default:c((()=>[d("发送")])),_:1},8,["disabled"])])],4))}});export{M as default};