cnhis-design-vue 3.3.1-beta.14 → 3.3.1-beta.17
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/es/components/ai-chat/index.d.ts +17 -17
- package/es/components/ai-chat/src/Index.vue.d.ts +17 -17
- package/es/components/ai-chat/src/Index.vue2.js +1 -1
- package/es/components/ai-chat/src/api/index.d.ts +1 -2
- package/es/components/ai-chat/src/api/index.js +1 -1
- package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +0 -1
- package/es/components/ai-chat/src/components/ChatAudio.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatCard.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +9 -11
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatMain.js +1 -1
- package/es/components/ai-chat/src/components/ChatMainDefault.js +1 -0
- package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +0 -2
- package/es/components/ai-chat/src/components/ChatRight.vue2.js +1 -1
- package/es/components/ai-chat/src/components/card/JsonCard.js +1 -1
- package/es/components/ai-chat/src/hooks/useWebsocket.js +1 -1
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/audio-sdk/index.d.ts +304 -2
- package/es/components/audio-sdk/index.js +1 -1
- package/es/components/audio-sdk/src/Index.vue.d.ts +304 -0
- package/es/components/audio-sdk/src/Index.vue.js +1 -0
- package/es/components/audio-sdk/src/Index.vue2.js +1 -0
- package/es/components/audio-sdk/src/audioSDK.d.ts +5 -7
- package/es/components/audio-sdk/src/audioSDK.js +1 -1
- package/es/components/audio-sdk/src/components/form.vue.d.ts +51 -0
- package/es/components/audio-sdk/src/components/form.vue.js +1 -0
- package/es/components/audio-sdk/src/components/form.vue2.js +1 -0
- package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +91 -0
- package/es/components/audio-sdk/src/components/recording-modal.vue.js +1 -0
- package/es/components/audio-sdk/src/components/recording-modal.vue2.js +1 -0
- package/es/components/audio-sdk/src/components/recording.vue.d.ts +43 -4
- package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
- package/es/components/audio-sdk/src/utils/index.d.ts +4 -0
- package/es/components/audio-sdk/src/utils/index.js +1 -0
- package/es/components/audio-sdk/src/utils/recordingModal.d.ts +7 -4
- package/es/components/audio-sdk/src/utils/recordingModal.js +1 -1
- package/es/components/audio-sdk/style/index.css +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +7 -1
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/field-editor/index.d.ts +7 -1
- package/es/components/field-editor/src/FieldEditor.vue.d.ts +7 -1
- package/es/components/form-config/index.d.ts +38 -3
- package/es/components/form-config/src/FormConfig.vue.d.ts +38 -3
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +7 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +17 -1
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +8 -1
- package/es/components/form-render/index.d.ts +7 -1
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +7 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +7 -1
- package/es/components/form-render/src/components/renderer/date.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/formItem.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/formItem.js +1 -1
- package/es/components/form-render/src/components/renderer/input.d.ts +5 -0
- package/es/components/form-render/src/components/renderer/input.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +14 -1
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +14 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +5 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/components/tooltipMessage.vue.d.ts +12 -1
- package/es/components/form-render/src/components/tooltipMessage.vue2.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +4 -0
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
- package/es/components/form-render/src/types/index.d.ts +2 -0
- package/es/components/form-render/src/utils/index.d.ts +1 -0
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/iho-chat/index.d.ts +56 -0
- package/es/components/iho-chat/src/Index.vue.d.ts +56 -0
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +7 -0
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +7 -0
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +6 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +27 -0
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +7 -0
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +7 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +9 -0
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +6 -0
- package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +3 -0
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +3 -1
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/constants/index.d.ts +7 -0
- package/es/components/iho-chat/src/constants/index.js +1 -1
- package/es/components/iho-chat/src/utils/index.d.ts +2 -0
- package/es/components/iho-chat/src/utils/index.js +1 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +3 -0
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +3 -3
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
- package/es/components/iho-table/src/hooks/useTablePlugin.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin/index.d.ts +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/index.d.ts +79 -3
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.d.ts +7 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +1 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/stickyFixedPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +1 -0
- package/es/components/iho-table/src/types/pluginType.d.ts +2 -2
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +24 -2
- package/es/components/info-header/src/InfoHeader.vue.d.ts +24 -2
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +2 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +2 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +9 -1
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +7 -1
- package/es/components/scale-view/index.d.ts +3 -2
- package/es/components/scale-view/src/ScaleView.vue.d.ts +3 -2
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-init.d.ts +3 -1
- package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +1 -2189
- package/es/components/shortcut-setter/index.d.ts +8 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +8 -1
- package/es/shared/components/ArrowIcon/ArrowIcon.vue.js +1 -0
- package/es/shared/components/ArrowIcon/index.d.ts +2 -0
- package/es/shared/components/ArrowIcon/index.js +1 -0
- package/es/shared/components/DateIcon/DateIcon.vue.js +1 -0
- package/es/shared/components/DateIcon/index.d.ts +2 -0
- package/es/shared/components/DateIcon/index.js +1 -0
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/ai-chat/src/components/ChatMainInner.js +0 -1
- package/es/components/ai-chat/src/hooks/useProgram.d.ts +0 -6
- package/es/components/ai-chat/src/hooks/useProgram.js +0 -1
- /package/es/components/ai-chat/src/components/{ChatMainInner.d.ts → ChatMainDefault.d.ts} +0 -0
@@ -181,6 +181,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
181
181
|
remark: import("vue").Ref<string>;
|
182
182
|
currentTab: import("vue").Ref<AnyObject[]>;
|
183
183
|
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
184
|
+
breadcrumbRef: import("vue").Ref<any>;
|
184
185
|
userList: import("vue").Ref<AnyObject[]>;
|
185
186
|
handleInput: () => void;
|
186
187
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -189,18 +190,21 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
189
190
|
name: any;
|
190
191
|
avatar: any;
|
191
192
|
chatType: any;
|
193
|
+
roleInfo: any;
|
192
194
|
}[]>;
|
193
195
|
friends: import("vue").ComputedRef<{
|
194
196
|
id: any;
|
195
197
|
name: any;
|
196
198
|
avatar: any;
|
197
199
|
chatType: any;
|
200
|
+
roleInfo: any;
|
198
201
|
}[]>;
|
199
202
|
groups: import("vue").ComputedRef<{
|
200
203
|
id: any;
|
201
204
|
name: any;
|
202
205
|
avatar: any;
|
203
206
|
chatType: any;
|
207
|
+
roleInfo: any;
|
204
208
|
}[]>;
|
205
209
|
checkedIds: import("vue").ComputedRef<any[]>;
|
206
210
|
btnDisabled: import("vue").ComputedRef<boolean>;
|
@@ -238,6 +242,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
238
242
|
ChevronBackOutline: 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<{}>>, {}>;
|
239
243
|
ChevronForwardOutline: 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<{}>>, {}>;
|
240
244
|
last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
|
245
|
+
isDoctorRole: typeof import("../utils").isDoctorRole;
|
246
|
+
getRoleName: typeof import("../utils").getRoleName;
|
241
247
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
242
248
|
title: {
|
243
249
|
type: StringConstructor;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { UploadFileInfo } from 'naive-ui';
|
2
2
|
import { AnyObject } from '../../../../shared/types';
|
3
|
+
import { isDoctorRole, getRoleName } from '../utils';
|
3
4
|
declare const _default: import("vue").DefineComponent<{}, {
|
4
5
|
state: {
|
5
6
|
orgId: string | number;
|
@@ -58,5 +59,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
58
59
|
Close: 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
60
|
EyeOutline: 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<{}>>, {}>;
|
60
61
|
EyeOffOutline: 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
|
+
isDoctorRole: typeof isDoctorRole;
|
63
|
+
getRoleName: typeof getRoleName;
|
61
64
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
62
65
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as t,ref as e,reactive as
|
1
|
+
import{defineComponent as t,ref as e,reactive as o,computed as l,watch as n,openBlock as a,createBlock as i,unref as s,withCtx as r,createElementBlock as c,Fragment as u,withDirectives as d,createElementVNode as p,createVNode as v,createCommentVNode as m,toDisplayString as w,normalizeClass as g,vShow as f,createTextVNode as y,renderList as h}from"vue";import{NPopover as k,NAvatar as b,NButton as C,NIcon as D}from"naive-ui";import{ChatbubbleEllipses as I,EyeOffOutline as _,EyeOutline as j,Close as x}from"@vicons/ionicons5";import{useData as L}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{CHAT_TYPE as B}from"../constants/index.js";import{openSessionApi as z,getUserDetailApi as N}from"../api/index.js";import{isDoctorRole as E,getRoleName as P}from"../utils/index.js";import"lodash-es";import"trtc-sdk-v5";const S={class:"person-profile-main"},$={class:"left"},G={class:"profile"},O={class:"profile__text"},R={class:"user__name"},T={class:"right"},q={class:"right__content"},A={class:"label"},F={class:"content"};var H=t({__name:"PersonProfile",setup(t){var H,J,K,M,Q,U,V,W;const{state:X,openSession:Y}=L(),Z=e(!1),tt=e(!1),et=o({}),ot=[{label:(null==(H=window.getLanguageByCode)?void 0:H.call(window,"10010.1.115"))||"机构",value:"",key:"orgName"},{label:(null==(J=window.getLanguageByCode)?void 0:J.call(window,"10010.1.116"))||"姓名",value:"",key:"name"},{label:(null==(K=window.getLanguageByCode)?void 0:K.call(window,"10010.1.117"))||"归属科室",value:"",key:"deptName"},{label:(null==(M=window.getLanguageByCode)?void 0:M.call(window,"10010.1.118"))||"业务科室",value:"",key:"businessDeptNames"},{label:(null==(Q=window.getLanguageByCode)?void 0:Q.call(window,"10010.1.119"))||"手机号",value:"",key:"phone"},{label:(null==(U=window.getLanguageByCode)?void 0:U.call(window,"10010.1.120"))||"岗位",value:"",key:"post"},{label:(null==(V=window.getLanguageByCode)?void 0:V.call(window,"10010.1.121"))||"工号",value:"",key:"jobId"},{label:(null==(W=window.getLanguageByCode)?void 0:W.call(window,"10010.1.122"))||"性别",value:"",key:"orgName"}],lt=l((()=>(et.id&&ot.forEach((t=>{const{key:e}=t;t.value=et[e]})),ot)));async function nt(){var t;X.userDetail.show=!1;const e=X.userDetail.userId||(null==(t=X.userDetail.info)?void 0:t.id);let o=X.sessionList.find((t=>t.receiver===e));if(!o)try{o=await z({chatType:B.SINGLE,receiver:e,sender:X.userInfo.id})}catch(t){console.log("error :>> ",t)}o&&Y(o)}function at(t){const{key:e,value:o}=t;return"phone"!==e||tt.value?o:(o||"").replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}return n((()=>X.userDetail.show),(t=>{if(!t)return X.userDetail.userId="",void(X.userDetail.info=null);!async function(){const{userId:t,info:e}=X.userDetail;if(!t&&!e)return;let o={};t?o=await N({userId:t}):e&&(o=e),(null==o?void 0:o.id)?Object.assign(et,o):et.id=""}()})),(t,e)=>(a(),i(s(k),{raw:"",class:"person-profile-wrapper",show:s(X).userDetail.show,x:s(X).userDetail.position.x,y:s(X).userDetail.position.y,trigger:"manual","show-arrow":!1,"display-directive":"show",to:"body",shift:"",onClickoutside:e[3]||(e[3]=()=>s(X).userDetail.show=!1)},{default:r((()=>[et.id?(a(),c(u,{key:0},[d(p("div",S,[p("div",$,[p("div",G,[v(s(b),{src:et.avatar,bordered:"",round:"",size:100,onClickCapture:e[0]||(e[0]=t=>Z.value=!0)},null,8,["src"]),m(' <n-upload abstract accept="image/*" @change="onChange">\r\n\t\t\t\t\t\t\t<n-upload-trigger #="{ handleClick }" abstract>\r\n\t\t\t\t\t\t\t\t<n-button\r\n\t\t\t\t\t\t\t\t\tcircle\r\n\t\t\t\t\t\t\t\t\tsecondary\r\n\t\t\t\t\t\t\t\t\tclass="edit-avatar"\r\n\t\t\t\t\t\t\t\t\tv-show="userDetail.id === state.userInfo.id"\r\n\t\t\t\t\t\t\t\t\t@click="handleClick"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t<template #icon>\r\n\t\t\t\t\t\t\t\t\t\t<n-icon size="16" color="#666666" :component="Camera" />\r\n\t\t\t\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t\t\t</n-button>\r\n\t\t\t\t\t\t\t</n-upload-trigger>\r\n\t\t\t\t\t\t</n-upload> '),p("div",O,[p("h4",null,[p("label",R,w(et.name),1),d(p("label",{class:g(["iho-chatRole",s(E)(et.roleInfo)?"isDoctor":""])},w(s(P)(et.roleInfo)),3),[[f,s(P)(et.roleInfo)]])]),p("p",null,w(et.orgName),1)]),v(s(C),{strong:"",secondary:"",onClick:nt},{default:r((()=>[v(s(D),{size:"13",color:"#666666",component:s(I),style:{"margin-right":"6px"}},null,8,["component"]),y(" 发消息 ")])),_:1})])]),p("div",T,[p("div",q,[(a(!0),c(u,null,h(s(lt),((t,o)=>(a(),c("div",{class:"info-item",key:o},[p("span",A,w(t.label),1),p("div",F,[p("span",null,w(at(t)),1),"phone"===t.key&&at(t)?(a(),i(s(D),{key:0,size:"16",color:"#666666",component:tt.value?s(_):s(j),style:{"margin-left":"10px"},onClick:e[1]||(e[1]=t=>tt.value=!tt.value)},null,8,["component"])):m("v-if",!0)])])))),128))])])],512),[[f,!Z.value]]),d(p("div",{class:"large-avatar",onClick:e[2]||(e[2]=t=>Z.value=!1)},[v(s(C),{circle:"",size:"small",secondary:""},{icon:r((()=>[v(s(D),{size:24,component:s(x),color:"#fff"},null,8,["component"])])),_:1}),v(s(b),{size:310,round:"",src:et.avatar},null,8,["src"])],512),[[f,Z.value]])],64)):m("v-if",!0)])),_:1},8,["show","x","y"]))}});export{H as default};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { CSSProperties } from 'vue';
|
2
2
|
import { AnyObject } from '../../../../shared/types';
|
3
|
-
import { formatTime } from '../utils';
|
3
|
+
import { formatTime, isDoctorRole, getRoleName } from '../utils';
|
4
4
|
import { STATUS } from '../constants';
|
5
5
|
declare const _default: import("vue").DefineComponent<{}, {
|
6
6
|
filterKey: {
|
@@ -121,6 +121,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
121
121
|
beforeUnmount(el: any): void;
|
122
122
|
};
|
123
123
|
formatTime: typeof formatTime;
|
124
|
+
isDoctorRole: typeof isDoctorRole;
|
125
|
+
getRoleName: typeof getRoleName;
|
124
126
|
STATUS: typeof STATUS;
|
125
127
|
CDatePicker: import("../../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
|
126
128
|
updateUnchangedValue: {
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as t,computed as l,withDirectives as n,openBlock as i,createElementBlock as a,normalizeStyle as o,unref as s,createVNode as u,withCtx as r,createElementVNode as d,Fragment as v,renderList as c,createBlock as p,vShow as m,createCommentVNode as f,createTextVNode as g,toDisplayString as w,withModifiers as y,normalizeClass as
|
1
|
+
import{defineComponent as e,ref as t,computed as l,withDirectives as n,openBlock as i,createElementBlock as a,normalizeStyle as o,unref as s,createVNode as u,withCtx as r,createElementVNode as d,Fragment as v,renderList as c,createBlock as p,vShow as m,createCommentVNode as f,createTextVNode as g,toDisplayString as w,withModifiers as y,normalizeClass as h,nextTick as k}from"vue";import{NPopover as _,NInput as x,NIcon as C,NTag as b,NAvatar as R,NBadge as M}from"naive-ui";import D from"./ContextMenu.js";import{useData as j}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{STATUS as E}from"../constants/index.js";import{toppingSessionApi as I,updateStatusApi as L}from"../api/index.js";import{listSort as B,isDoctorRole as T,getRoleName as N,formatTime as S}from"../utils/index.js";import"lodash-es";import"trtc-sdk-v5";import{vFlexibleResize as V}from"../../../../shared/directive/flexibleResize.js";import $ from"../../../date-picker/index.js";import{SearchOutline as O}from"@vicons/ionicons5";import U from"./userItemRender.js";import H from"../../../default-page/index.js";import{useDebounceFn as z}from"@vueuse/core";import{isBefore as K,isAfter as P}from"date-fns";const W={key:0,class:"sider-list__filter"},A={class:"user-list-wrapper"},X={class:"sider-list__tags box-shadow"},Y=["onClick","onContextmenu"],q={class:"avatar-right"},F={class:"name"},G={class:"chat-name"},J={class:"msg-tip"},Q={class:"msg-tip__content"},Z={key:0},ee=["innerHTML"];var te=e({__name:"SiderList",setup(e){var te,le,ne;const ie="all",ae="unread",oe="ended";let se=[];const ue=t(300),re=t(),de=t([{label:(null==(te=window.getLanguageByCode)?void 0:te.call(window,"10010.1.123"))||"全部",key:ie},{label:(null==(le=window.getLanguageByCode)?void 0:le.call(window,"10010.1.124"))||"未读",key:ae},{label:(null==(ne=window.getLanguageByCode)?void 0:ne.call(window,"10010.1.77"))||"结束",key:oe}]),ve=t(),ce=t(!1),pe=t({left:0,top:0}),me=t(),fe=t("all"),ge=t(),we=t(),ye=t(),he=t(""),ke=t(!1),_e=t([]),xe=z($e,500),{state:Ce,unreadTotal:be,filterable:Re,openSession:Me,setUpdateSessionItem:De,setCurrentSessionItem:je}=j(),Ee=l((()=>Math.min(Math.max(ue.value,240),360))),Ie=l((()=>B(Ce.sessionList)));function Le({distance:e}){ue.value=ue.value+e}function Be(e,t=s(fe)){var l;return t===ie||(t===ae?se.includes(e.sessionKey)||(null!=(l=e.unreadNum)?l:0)>0:t===oe?e.status===E.ENDED:void 0)}async function Te(e,t){try{if("topping"===e)return await I({id:t.id,topping:!(null==t?void 0:t.topping)}),void(Ce.id===t.id?je({topping:!(null==t?void 0:t.topping)}):De({...t,topping:!(null==t?void 0:t.topping)}));"remove"===e&&(await L({id:t.id,status:E.REMOVED}),Ce.id===t.id?je({status:E.REMOVED}):De({...t,status:E.REMOVED}))}catch(e){}}function Ne(e){ke.value=e,e||(he.value="",ye.value=null,_e.value=[])}function Se(e){var t,l,n,i,a;const o=null==(n=null==(l=null==(t=ge.value)?void 0:t.$datePicker)?void 0:l.panelInstRef)?void 0:n.$el;Ne(!(!e.target||!(o&&o.contains(e.target)||(null==(i=we.value)?void 0:i.$el)&&(null==(a=we.value)?void 0:a.$el.contains(e.target)))))}function Ve(e){ye.value=e,$e()}function $e(){he.value||ye.value?_e.value=Ie.value.filter((e=>{const t=e.name.includes(he.value);if(!ye.value)return t;const[l,n]=ye.value,i=new Date(e.createdTime);return t&&K(i,new Date(n+" 23:59:59"))&&P(i,new Date(l+" 00:00:00"))})):_e.value=[]}return(e,t)=>n((i(),a("section",{class:"sider-list",style:o({width:s(Ee)+"px"})},[s(Re)?(i(),a("div",W,[u(s(_),{raw:"","content-class":"search-content__sider",class:"search-wrapper",show:ke.value,placement:"bottom-start","display-directive":"show","show-arrow":!1,onClickoutside:Se},{trigger:r((()=>[u(s(x),{ref_key:"inputRef",ref:we,placeholder:"请输入名称模糊搜索",value:he.value,"onUpdate:value":t[0]||(t[0]=e=>he.value=e),onInput:s(xe),onClick:t[1]||(t[1]=()=>Ne(!0))},{prefix:r((()=>[u(s(C),{component:s(O)},null,8,["component"])])),_:1},8,["value","onInput"])])),default:r((()=>{var e;return[u(s($),{ref_key:"datePickerRef",ref:ge,"formatted-value":ye.value,type:"daterange",clearable:"","onUpdate:formattedValue":Ve},null,8,["formatted-value"]),d("div",A,[(i(!0),a(v,null,c(_e.value,(e=>(i(),p(s(U),{key:e.id,item:e,onItemClick:t[2]||(t[2]=()=>Ne(!1))},null,8,["item"])))),128)),n(u(s(H),{config:{title:" ",content:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.81"))||"找不到相关的结果"},type:"5"},null,512),[[m,_e.value.length<1]])])]})),_:1},8,["show"])])):f("v-if",!0),d("div",X,[(i(!0),a(v,null,c(de.value,(e=>(i(),p(s(b),{type:fe.value===e.key?"primary":"default",round:"",bordered:!1,key:e.key,onClick:()=>{return t=e.key,fe.value=t,void(t===ae&&(se=(Ie.value.filter((e=>{var t;return(null!=(t=e.unreadNum)?t:0)>0}))||[]).map((e=>e.sessionKey))));var t}},{default:r((()=>{return[g(w(e.label)+"("+w((t=e,t.key===oe?Ie.value.filter((e=>e.status===E.ENDED)).length:be.value))+") ",1)];var t})),_:2},1032,["type","onClick"])))),128))]),d("div",{class:"sider-list__box",ref_key:"listBoxRef",ref:re},[(i(!0),a(v,null,c(s(Ie),(e=>{var t;return i(),a(v,{key:e.id},[e.status!==s(E).REMOVED?n((i(),a("div",{key:0,onClick:()=>s(Me)(e),onContextmenu:y((t=>async function(e,t){var l,n,i,a,o;me.value=t,ce.value=!0,await k();const{clientX:s,clientY:u}=e,{width:r=0,height:d=0,left:v=0,top:c=0}=(null==(l=re.value)?void 0:l.getBoundingClientRect())||{},{width:p=100,height:m=80}=(null==(i=null==(n=ve.value)?void 0:n.$el)?void 0:i.getBoundingClientRect())||{},f=null!=(o=null==(a=re.value)?void 0:a.scrollTop)?o:0,g={};s<v+r-(p+2)-5?g.left=s-v+5+"px":g.right=v+r-s+5+"px",c+d-u<=m+5?g.bottom=5-f+"px":g.top=u-c+f+5+"px",pe.value=g}(t,e.id)),["prevent"]),class:h(["sider-list__box__item",{active:e.id===s(Ce).id},e.topping?"sider-list__box__item--top":""])},[u(s(R),{round:"",size:"large",src:e.avatar},null,8,["src"]),d("div",q,[d("div",F,[d("h4",null,[d("label",G,w(e.name),1),n(d("label",{class:h(["iho-chatRole",s(T)(e.roleInfo)?"isDoctor":""])},w(s(N)(e.roleInfo)),3),[[m,s(N)(e.roleInfo)]])]),d("span",null,w(e.lastMessage?s(S)(e.lastMessageSendTime).siderMsgTime:""),1)]),d("div",J,[d("div",Q,["WITHDRAWN"===e.lastMessageStatus?(i(),a("div",Z,(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.68"))||"撤回了一条消息")):(i(),a("div",{key:1,innerHTML:e.lastMessageContent},null,8,ee))]),u(s(M),{value:e.unreadNum>99?"99+":e.unreadNum},null,8,["value"])])])],42,Y)),[[m,Be(e)]]):f("v-if",!0)],64)})),128)),u(s(D),{ref_key:"contextmenuRef",ref:ve,show:ce.value,"onUpdate:show":t[3]||(t[3]=e=>ce.value=e),type:"session",position:pe.value,id:me.value,onSelect:Te},null,8,["show","position","id"])],512)],4)),[[s(V),{mode:"VR",onMove:Le}]])}});export{te as default};
|
@@ -1 +1 @@
|
|
1
|
-
var E=(E=>(E.SINGLE="SINGLE",E.GROUP="GROUP",E))(E||{}),S=(E=>(E.TEXT="TEXT",E.FILE="FILE",E.EMOJI="EMOJI",E.IMAGE="IMAGE",E.TEMPLATE="TEMPLATE",E.BLEND="BLEND",E.FORWARD="FORWARD",E.QUICK_REPLY="QUICK_REPLY",E.AUDIO="AUDIO",E.VIDEO="VIDEO",E.EVENT="EVENT",E))(S||{}),A=(E=>(E.JOIN_GROUP="JOIN_GROUP",E.LEAVE_GROUP="LEAVE_GROUP",E.NEW_SESSION="NEW_SESSION",E.MESSAGE="MESSAGE",E.AV_STATUS="AV_STATUS",E.RECALL_MESSAGE="RECALL_MESSAGE",E.DISABLE_SESSION="DISABLE_SESSION",E))(A||{}),
|
1
|
+
var E=(E=>(E.SINGLE="SINGLE",E.GROUP="GROUP",E))(E||{}),S=(E=>(E.TEXT="TEXT",E.FILE="FILE",E.EMOJI="EMOJI",E.IMAGE="IMAGE",E.TEMPLATE="TEMPLATE",E.BLEND="BLEND",E.FORWARD="FORWARD",E.QUICK_REPLY="QUICK_REPLY",E.AUDIO="AUDIO",E.VIDEO="VIDEO",E.EVENT="EVENT",E))(S||{}),A=(E=>(E.JOIN_GROUP="JOIN_GROUP",E.LEAVE_GROUP="LEAVE_GROUP",E.NEW_SESSION="NEW_SESSION",E.MESSAGE="MESSAGE",E.AV_STATUS="AV_STATUS",E.RECALL_MESSAGE="RECALL_MESSAGE",E.DISABLE_SESSION="DISABLE_SESSION",E))(A||{}),I=(E=>(E.IN_CALL="IN_CALL",E.CALL_BUSY="CALL_BUSY",E.NO_RESPONSE="NO_RESPONSE",E.FINISHED="FINISHED",E.REJECTED="REJECTED",E.CANCELED="CANCELED",E))(I||{}),L=(E=>(E.REMOVED="REMOVED",E.ENABLED="ENABLED",E.ENDED="ENDED",E))(L||{}),N=(E=>(E.DOCTOR="DOCTOR",E.PATIENT="PATIENT",E))(N||{});export{I as AV_STATUS,E as CHAT_TYPE,S as MESSAGE_TYPE,N as ROLE_TYPE,L as STATUS,A as SUBSCRIBE_MESSAGE_TYPE};
|
@@ -16,3 +16,5 @@ export declare function isAudioOrVideoMessage(message: AnyObject): boolean;
|
|
16
16
|
export declare function formatSeconds(seconds: number): string;
|
17
17
|
export declare function isGroup(session: AnyObject): boolean;
|
18
18
|
export declare function getForwardTitle(content: AnyObject): string | undefined;
|
19
|
+
export declare function isDoctorRole(type: string): boolean;
|
20
|
+
export declare function getRoleName(type: string): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{isToday as e,format as t,isYesterday as n,startOfDay as r}from"date-fns";import{cloneDeep as o,isNumber as a,isNaN as i,isArray as s,uniqBy as l}from"lodash-es";import{MESSAGE_TYPE as c,CHAT_TYPE as u}from"../constants/index.js";import{emojis as
|
1
|
+
import{isToday as e,format as t,isYesterday as n,startOfDay as r}from"date-fns";import{cloneDeep as o,isNumber as a,isNaN as i,isArray as s,uniqBy as l}from"lodash-es";import{MESSAGE_TYPE as c,CHAT_TYPE as u,ROLE_TYPE as d}from"../constants/index.js";import{emojis as g}from"./emoji.js";import{uuidGenerator as m}from"../../../../shared/utils/index.js";import{createDiscreteApi as w}from"naive-ui";const{message:p}=w(["message"]);function f(r){var o;const a=new Date(r);let i,s;if(e(a))i=s=t(a,"HH:mm");else{i=n(a)?(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.132"))||"昨天":t(a,"MM-dd");const e=a.getFullYear(),r=(new Date).getFullYear();s=t(a,e<r?"yyyy年M月d日 HH:mm":"M月d日 HH:mm")}return{siderMsgTime:i,msgTime:s,recordTime:function(r){var o,a,i,s;const l=new Date(r),c=Date.now()-l.getTime();if(c<6e4)return(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.133"))||"刚刚";if(c<36e5)return Math.ceil(c/1e3/60)+((null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.136"))||"分钟前");if(e(l))return((null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.134"))||"今天")+t(l,"HH:mm");if(n(l))return((null==(s=window.getLanguageByCode)?void 0:s.call(window,"10010.1.132"))||"昨天")+t(l,"HH:mm");{const e=l.getFullYear(),n=(new Date).getFullYear();return t(l,e<n?"yyyy年M月d日 HH:mm":"M月d日 HH:mm")}}(r)}}function y(e){return o(e||[]).sort(((e,t)=>e.topping&&!t.topping?-1:!e.topping&&t.topping?1:new Date(t.sortTime).getTime()-new Date(e.sortTime).getTime()))}function h(e){if(!(null==e?void 0:e.msg))return"";const{chatMessageType:t="",msg:n=""}=e;let r=n.toString();if(t===c.BLEND){const e=r.match(/\[([^\]]+)\]/g);return null==e||e.forEach((e=>{const n=e.match(/\[([^\]]+)\]/);if(n&&n.length>1){const o=g.findEmoji(n[1]);o&&(r=r.replace(e,`<img data-msg=${n[1]} data-type=${t} class="emoji--min" src=${o} />`))}})),r}if(t===c.TEXT){const e=e=>new RegExp("\\n*\\["+(e||"")+"(code|pre|div|span|p|table|thead|th|tbody|tr|td|ul|li|ol|li|dl|dt|dd|h2|h3|h4|h5)([\\s\\S]*?)]\\n*","g");return r=r.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/@(\S+)(\s+?|$)/g,'@<a href="javascript:;">$1</a>$2').replace(e(),"<$1 $2>").replace(e("/"),"</$1>").replace(/\n/g,"<br>"),r}return n}function T(e){var t,n;if(e&&a(+e)&&!i(+e)){const n=$(+e),r=n.split(":");let o=n;return 3===r.length&&"00"===r[0]&&(o=`${r[1]}:${r[2]}`),((null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.137"))||"通话时长")+o}return(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.138"))||"已取消"}function v(e){var t;if(!e)return"";const{chatMessageType:n,msg:r,messageTemplate:o}=e,a=M(e)?T(r):"";switch(n){case c.TEXT:return h(e);case c.IMAGE:return"[图片]";case c.FILE:return"[文件]";case c.EMOJI:return`<img class="emoji--min" alt=${r} src=${g.findEmoji(r)}>`;case c.TEMPLATE:return null==(t=null==o?void 0:o.setting)?void 0:t.title;case c.VIDEO:return`[视频通话]${a}`;case c.AUDIO:return`[语音通话]${a}`;default:return"[消息]"}}function E(e,t){const n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="blob",n.onload=function(e){if(200===n.status){const e=window.URL.createObjectURL(n.response),r=document.createElement("a");r.href=e,r.download=t,r.dispatchEvent(new MouseEvent("click")),window.URL.revokeObjectURL(e)}},n.send()}function H(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("HEAD",e,!0),r.onreadystatechange=()=>{var e;if(4===r.readyState&&200===r.status){let n=null!=(e=r.getResponseHeader("Content-Length"))?e:0;const o=+n;o>1048576?n=(o/1048576).toFixed(2)+"M":o>1024?n=(o/1024).toFixed(2)+"K":n+="B",t(n)}},r.send()}))}async function L(e){try{const t=await fetch(e),n=await t.blob();return new File([n],`${m()}.${n.type.split("/")[1]}`,{type:n.type})}catch(e){return}}function M(e){return e&&[c.AUDIO,c.VIDEO].includes(e.chatMessageType)}function $(e){const n=r(new Date);return n.setSeconds(e),t(n,"HH:mm:ss")}function D(e){return e.chatType===u.GROUP}function O(e){if(!s(null==e?void 0:e.forwardMessageList))return;const t=l(e.forwardMessageList,"sender").map((e=>e.senderName)),n="的聊天记录";return t.length>2?"群聊的聊天记录":1===t.length?t[0]+n:t[0]+"和"+t[1]+n}function j(e){return e===d.DOCTOR}function C(e){var t;let n="";switch(e){case d.DOCTOR:n="医护";break;case d.PATIENT:n=(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.200"))||"患者"}return n}export{p as $message,L as base64ToFile,E as downloadFile,$ as formatSeconds,f as formatTime,T as getAVTime,H as getFileSize,O as getForwardTitle,C as getRoleName,M as isAudioOrVideoMessage,j as isDoctorRole,D as isGroup,y as listSort,v as simplifyMessage,h as transformMessage};
|