cnhis-design-vue 3.3.1-beta.12 → 3.3.1-beta.13

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 (182) hide show
  1. package/README.md +87 -87
  2. package/es/components/ai-chat/index.d.ts +10 -145
  3. package/es/components/ai-chat/src/Index.vue.d.ts +10 -145
  4. package/es/components/ai-chat/src/Index.vue2.js +1 -1
  5. package/es/components/ai-chat/src/components/ChatCard.js +1 -1
  6. package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +2 -55
  7. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  8. package/es/components/ai-chat/src/utils/index.d.ts +0 -1
  9. package/es/components/ai-chat/src/utils/index.js +1 -1
  10. package/es/components/ai-chat/style/index.css +1 -1
  11. package/es/components/audio-sdk/index.d.ts +304 -2
  12. package/es/components/audio-sdk/index.js +1 -1
  13. package/es/components/audio-sdk/src/Index.vue.d.ts +304 -0
  14. package/es/components/audio-sdk/src/Index.vue.js +1 -0
  15. package/es/components/audio-sdk/src/Index.vue2.js +1 -0
  16. package/es/components/audio-sdk/src/audioSDK.d.ts +5 -8
  17. package/es/components/audio-sdk/src/audioSDK.js +1 -1
  18. package/es/components/audio-sdk/src/components/form.vue.d.ts +51 -0
  19. package/es/components/audio-sdk/src/components/form.vue.js +1 -0
  20. package/es/components/audio-sdk/src/components/form.vue2.js +1 -0
  21. package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +91 -0
  22. package/es/components/audio-sdk/src/components/recording-modal.vue.js +1 -0
  23. package/es/components/audio-sdk/src/components/recording-modal.vue2.js +1 -0
  24. package/es/components/audio-sdk/src/components/recording.vue.d.ts +43 -4
  25. package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
  26. package/es/components/audio-sdk/src/utils/index.d.ts +4 -0
  27. package/es/components/audio-sdk/src/utils/index.js +1 -0
  28. package/es/components/audio-sdk/src/utils/recordingModal.d.ts +7 -4
  29. package/es/components/audio-sdk/src/utils/recordingModal.js +1 -1
  30. package/es/components/audio-sdk/style/index.css +1 -1
  31. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  32. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  33. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  34. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  35. package/es/components/callback/src/components/render/popupMaps.d.ts +7 -1
  36. package/es/components/card-render/src/components/index.d.ts +23 -23
  37. package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
  38. package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
  39. package/es/components/editor/src/Editor.js +1 -1
  40. package/es/components/editor/style/index.css +0 -1
  41. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  42. package/es/components/field-editor/index.d.ts +7 -1
  43. package/es/components/field-editor/src/FieldEditor.vue.d.ts +7 -1
  44. package/es/components/form-config/index.d.ts +38 -3
  45. package/es/components/form-config/src/FormConfig.vue.d.ts +38 -3
  46. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +7 -1
  47. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +17 -1
  48. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +8 -1
  49. package/es/components/form-render/index.d.ts +7 -1
  50. package/es/components/form-render/index.js +1 -1
  51. package/es/components/form-render/src/FormRender.vue.d.ts +7 -1
  52. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  53. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +7 -1
  54. package/es/components/form-render/src/components/renderer/date.d.ts +2 -0
  55. package/es/components/form-render/src/components/renderer/date.js +1 -1
  56. package/es/components/form-render/src/components/renderer/formItem.d.ts +2 -0
  57. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  58. package/es/components/form-render/src/components/renderer/input.d.ts +5 -0
  59. package/es/components/form-render/src/components/renderer/input.js +1 -1
  60. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +14 -1
  61. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +14 -1
  62. package/es/components/form-render/src/components/renderer/select.d.ts +5 -0
  63. package/es/components/form-render/src/components/renderer/select.js +1 -1
  64. package/es/components/form-render/src/components/tooltipMessage.vue.d.ts +12 -1
  65. package/es/components/form-render/src/components/tooltipMessage.vue2.js +1 -1
  66. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  67. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +4 -0
  68. package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
  69. package/es/components/form-render/src/types/index.d.ts +2 -0
  70. package/es/components/form-render/src/utils/index.d.ts +1 -0
  71. package/es/components/form-render/src/utils/index.js +1 -1
  72. package/es/components/form-render/style/index.css +1 -1
  73. package/es/components/iho-chat/index.d.ts +1 -0
  74. package/es/components/iho-chat/src/Index.vue.d.ts +1 -0
  75. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  76. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +1 -0
  77. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  78. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  79. package/es/components/iho-table/index.d.ts +26 -23
  80. package/es/components/iho-table/index.js +1 -1
  81. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  82. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -1
  83. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
  84. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +3 -3
  85. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
  86. package/es/components/iho-table/src/hooks/useTablePlugin.js +1 -1
  87. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  88. package/es/components/iho-table/src/plugins/headerPlugin/index.d.ts +1 -1
  89. package/es/components/iho-table/src/plugins/headerPlugin/index.js +1 -1
  90. package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -1
  91. package/es/components/iho-table/src/plugins/index.d.ts +78 -0
  92. package/es/components/iho-table/src/plugins/index.js +1 -1
  93. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.d.ts +7 -0
  94. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.js +1 -1
  95. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  96. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +1 -2
  97. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
  98. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
  99. package/es/components/iho-table/src/plugins/stickyFixedPlugin.js +1 -1
  100. package/es/components/iho-table/src/plugins/varialbleHeightPlugin.js +1 -1
  101. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +1 -1
  102. package/es/components/iho-table/src/types/index.d.ts +1 -0
  103. package/es/components/iho-table/src/types/pluginType.d.ts +2 -2
  104. package/es/components/index.css +1 -1
  105. package/es/components/index.d.ts +2 -1
  106. package/es/components/index.js +1 -1
  107. package/es/components/info-header/index.d.ts +24 -2
  108. package/es/components/info-header/src/InfoHeader.vue.d.ts +24 -2
  109. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +2 -0
  110. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +2 -0
  111. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +9 -1
  112. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +7 -1
  113. package/es/components/scale-view/index.d.ts +3 -2
  114. package/es/components/scale-view/src/ScaleView.vue.d.ts +3 -2
  115. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  116. package/es/components/scale-view/src/hooks/scaleview-init.d.ts +3 -1
  117. package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
  118. package/es/components/scale-view/src/hooks/use-component.d.ts +1 -2189
  119. package/es/components/shortcut-setter/index.d.ts +8 -1
  120. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +8 -1
  121. package/es/env.d.ts +25 -25
  122. package/es/shared/assets/img/ai__avatar.png.js +1 -1
  123. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  124. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  125. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  126. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  127. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  128. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  129. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  130. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  131. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  132. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  133. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  134. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  135. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  136. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  137. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  138. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  139. package/es/shared/assets/img/failure.png.js +1 -1
  140. package/es/shared/assets/img/logo.png.js +1 -1
  141. package/es/shared/assets/img/no-permission.png.js +1 -1
  142. package/es/shared/assets/img/nodata.png.js +1 -1
  143. package/es/shared/assets/img/notfound.png.js +1 -1
  144. package/es/shared/assets/img/qr.png.js +1 -1
  145. package/es/shared/assets/img/success.png.js +1 -1
  146. package/es/shared/assets/img/table_style_2.png.js +1 -1
  147. package/es/shared/assets/img/video.png.js +1 -1
  148. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  149. package/es/shared/assets/img/xb_big.png.js +1 -1
  150. package/es/shared/assets/img/xb_small.png.js +1 -1
  151. package/es/shared/components/ArrowIcon/ArrowIcon.vue.js +1 -0
  152. package/es/shared/components/ArrowIcon/index.d.ts +2 -0
  153. package/es/shared/components/ArrowIcon/index.js +1 -0
  154. package/es/shared/components/DateIcon/DateIcon.vue.js +1 -0
  155. package/es/shared/components/DateIcon/index.d.ts +2 -0
  156. package/es/shared/components/DateIcon/index.js +1 -0
  157. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  158. package/es/shared/package.json.js +1 -1
  159. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  160. package/es/shared/utils/tapable/index.d.ts +139 -0
  161. package/package.json +2 -2
  162. package/es/components/ai-chat/src/api/index.d.ts +0 -6
  163. package/es/components/ai-chat/src/api/index.js +0 -1
  164. package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +0 -44
  165. package/es/components/ai-chat/src/components/ChatAudio.vue.js +0 -1
  166. package/es/components/ai-chat/src/components/ChatAudio.vue2.js +0 -1
  167. package/es/components/ai-chat/src/components/ChatMainInner.d.ts +0 -2
  168. package/es/components/ai-chat/src/components/ChatMainInner.js +0 -1
  169. package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +0 -55
  170. package/es/components/ai-chat/src/components/ChatRight.vue.js +0 -1
  171. package/es/components/ai-chat/src/components/ChatRight.vue2.js +0 -1
  172. package/es/components/ai-chat/src/components/card/JsonCard.d.ts +0 -25
  173. package/es/components/ai-chat/src/components/card/JsonCard.js +0 -1
  174. package/es/components/ai-chat/src/components/card/SelectIcon.d.ts +0 -14
  175. package/es/components/ai-chat/src/components/card/SelectIcon.js +0 -1
  176. package/es/components/ai-chat/src/hooks/useProgram.d.ts +0 -6
  177. package/es/components/ai-chat/src/hooks/useProgram.js +0 -1
  178. package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +0 -2
  179. package/es/components/ai-chat/src/hooks/useWebsocket.js +0 -1
  180. package/es/shared/assets/img/file-emr.png.js +0 -1
  181. package/es/shared/assets/img/file.png.js +0 -1
  182. package/es/shared/assets/img/use.png.js +0 -1
@@ -1 +1 @@
1
- import{ref as e}from"vue";import t from"recorder-core";import"recorder-core/src/engine/mp3";import"recorder-core/src/engine/mp3-engine";import{RecordingModal as s}from"./utils/recordingModal.js";const i=class{constructor(){if(this.recordingModal=null,this.webSocket=null,this.messageHandlerQueue=[],this.recorder=null,this.contentRef=e(""),this.realTimeSendStartTime=0,this.realTimeSendBytesChunks=[],this.realTimeSendClearPrevBufferIdx=0,this.timer=null,this.option={},this.hasEventListener=!1,this.isReady=!1,i.instance)return i.instance;i.instance=this}static create(){return new i}initRecorder(){this.recorder=t({type:"mp3",sampleRate:16e3,bitRate:16,...this.option.realTimeRecognition&&this.option.recognizable?{onProcess:this.onProcess.bind(this),takeoffEncodeChunk:this.takeoffEncodeChunk.bind(this)}:{}})}async onProcess(e,t,s,i,r){0===this.realTimeSendStartTime&&(this.realTimeSendStartTime=Date.now(),this.realTimeSendBytesChunks=[],this.realTimeSendClearPrevBufferIdx=0);for(let t=this.realTimeSendClearPrevBufferIdx;t<r;t++)e[t]=null;this.realTimeSendClearPrevBufferIdx=r}async takeoffEncodeChunk(e){var t;e&&this.realTimeSendBytesChunks.push(e);const s=Date.now();if(s-this.realTimeSendStartTime<i.sendInterval)return;this.realTimeSendStartTime=s;let r=0;for(let e=0;e<this.realTimeSendBytesChunks.length;e++)r+=this.realTimeSendBytesChunks[e].length;const n=new Uint8Array(r);for(let e=0,t=0;e<this.realTimeSendBytesChunks.length;e++){const s=this.realTimeSendBytesChunks[e];n.set(s,t),t+=s.length}if(this.realTimeSendBytesChunks=[],n.length>0){const e=new Blob([n],{type:"audio/wav"});null==(t=this.webSocket)||t.send(e)}}run(e,t){this.recorder||this.initRecorder(),this.messageHandlerQueue.push(e),this.option.timed&&(this.timer=setTimeout((()=>{this.stop()}),1e3*this.option.timed)),this.recorder.open((()=>{var e;this.recorder.start(),null==(e=this.recordingModal)||e.show({instance:t,contentRef:this.contentRef,onClose:()=>this.stop()})}),((e,t)=>{this.handleError({msg:e,isUserNotAllow:t})}))}start(e,t){return Object.assign(this.option,{recognizable:!0,showModal:!0},t||{}),this.option.recognizable||(this.option.showModal=!1),new Promise(((t,i)=>{if(this.messageHandlerQueue.length>0)return void i({result:"fail",msg:"当前已存在正在录音的任务"});const{showModal:r}=this.option;if(r&&!this.recordingModal&&(this.recordingModal=new s),r&&!this.hasEventListener&&(document.addEventListener("keydown",this.handleKeydown),this.hasEventListener=!0),this.option.recognizable&&!this.webSocket)return this.webSocket=new WebSocket("wss://emr-tl.cnhis.com/audio/socket"),this.webSocket.onopen=()=>{this.isReady=!0,this.run({resolve:t,reject:i},e)},this.webSocket.onmessage=this.handleMessage.bind(this),this.webSocket.onerror=()=>console.log("WebSocket连接失败"),void(this.webSocket.binaryType="blob");const n=this;!async function s(r=0){if(r>5)return i({result:"fail",msg:"WebSocket连接失败"});n.option.recognizable&&!n.isReady?setTimeout((()=>{s(++r)}),100):n.run({resolve:t,reject:i},e)}()}))}pause(){var e;null==(e=this.recorder)||e.pause()}resume(){var e;null==(e=this.recorder)||e.resume()}stop(){var e,t;if(null==(e=this.recordingModal)||e.hide(),this.option.realTimeRecognition&&this.option.recognizable){const e=this.messageHandlerQueue.shift();if(!e)return;const{resolve:t,reject:s}=e;t({result:"success",data:{text:this.contentRef.value}}),this.reset()}else null==(t=this.recorder)||t.stop((async(e,t)=>{var s;if(this.option.recognizable)null==(s=this.webSocket)||s.send(e);else{const t=this.messageHandlerQueue.shift();if(!t)return;const{resolve:s,reject:i}=t;s({result:"success",data:e}),this.reset()}}),(e=>{this.handleError({msg:e})}),!0)}handleError(e){const t=this.messageHandlerQueue.shift();if(!t)return;const{resolve:s,reject:i}=t;i({result:"fail",...e}),this.reset()}handleMessage(e){const{data:t}=e||{};if(!function(e){try{return JSON.parse(e),!0}catch(e){return!1}}(t))return void this.handleError({msg:"接收数据不是一个有效SJON"});const s=JSON.parse(t);if("success"===s.msg)if(this.option.realTimeRecognition)this.contentRef.value+=s.data.text.replace(/[??,。,.\s]/g,"");else{const e=this.messageHandlerQueue.shift();if(!e)return;const{resolve:t,reject:i}=e;t({result:"success",data:s.data.text.replace(/[??,。,.\s]/g,"")}),this.reset()}else this.handleError({msg:s.msg})}handleKeydown(e){var t,s,r,n;if(" "===e.key||"Space"===e.code){if(!(null==(s=null==(t=i.instance)?void 0:t.recordingModal)?void 0:s.rendered)||0===(null==(r=i.instance)?void 0:r.messageHandlerQueue.length))return;e.preventDefault(),null==(n=i.instance)||n.stop()}}reset(){var e;null==(e=this.recorder)||e.close(),this.realTimeSendStartTime=0,this.contentRef.value="",this.timer&&(clearTimeout(this.timer),this.timer=null),this.option={realTimeRecognition:!1,allowPunctuationMark:!0,timed:5},this.messageHandlerQueue=[]}destroy(){this.webSocket&&(this.webSocket.close(),this.webSocket=null,this.isReady=!1),document.removeEventListener("keydown",this.handleKeydown),this.hasEventListener=!1,this.reset(),this.recorder=null}static destroy(){i.instance&&(i.instance.destroy(),i.instance=null)}};let r=i;r.sendInterval=1500;export{r as default};
1
+ import{ref as e}from"vue";import t from"recorder-core";import"recorder-core/src/engine/mp3";import"recorder-core/src/engine/mp3-engine";import{RecordingModal as s}from"./utils/recordingModal.js";import{isString as i}from"lodash-es";import{$message as n}from"./utils/index.js";const r=class{constructor(){if(this.recordingModal=new s,this.webSocket=null,this.messageHandlerQueue=[],this.recorder=null,this.realTimeSendStartTime=0,this.realTimeSendBytesChunks=[],this.realTimeSendClearPrevBufferIdx=0,this.timer=null,this.option={},this.hasEventListener=!1,this.contentRef=e(""),this.isReady=!1,r.instance)return r.instance;r.instance=this}static create(){return new r}initRecorder(){this.recorder=t({type:"mp3",sampleRate:16e3,bitRate:16,...this.option.realTimeRecognition?{onProcess:this.onProcess.bind(this),takeoffEncodeChunk:this.takeoffEncodeChunk.bind(this)}:{}})}async onProcess(e,t,s,i,n){0===this.realTimeSendStartTime&&(this.realTimeSendStartTime=Date.now(),this.realTimeSendBytesChunks=[],this.realTimeSendClearPrevBufferIdx=0);for(let t=this.realTimeSendClearPrevBufferIdx;t<n;t++)e[t]=null;this.realTimeSendClearPrevBufferIdx=n}async takeoffEncodeChunk(e){e&&this.realTimeSendBytesChunks.push(e);const t=Date.now();if(t-this.realTimeSendStartTime<r.sendInterval)return;this.realTimeSendStartTime=t;let s=0;for(let e=0;e<this.realTimeSendBytesChunks.length;e++)s+=this.realTimeSendBytesChunks[e].length;const i=new Uint8Array(s);for(let e=0,t=0;e<this.realTimeSendBytesChunks.length;e++){const s=this.realTimeSendBytesChunks[e];i.set(s,t),t+=s.length}if(this.realTimeSendBytesChunks=[],i.length>0){const e=new Blob([i],{type:"audio/mp3"});this.toSend(e)}}toSend(e){if((null==e?void 0:e.size)>0){const t=new FileReader;t.onloadend=()=>{var e,s;const i=null==(e=t.result)?void 0:e.toString().split(",")[1];i&&(null==(s=this.webSocket)||s.send(JSON.stringify({data:i})))},t.readAsDataURL(e)}}run(e){this.recorder||this.initRecorder(),this.messageHandlerQueue.push(e),this.option.timed&&(this.timer=setTimeout((()=>{this.stop({timeout:!0})}),1e3*this.option.timed)),this.recorder.open((()=>{this.recorder.start(),this.option.instance&&this.recordingModal.show({instance:this.option.instance,onClose:()=>this.stop(),props:{contentRef:this.contentRef}})}),((e,t)=>{t&&n.warning("请开启麦克风权限"),this.handleError({msg:e,isUserNotAllow:t})}))}start(e={}){return this.contentRef.value="",Object.assign(this.option,e),new Promise(((e,t)=>{if(!function(){var e;if((null==(e=null==navigator?void 0:navigator.userAgent)?void 0:e.includes("Chrome"))&&!(null==window?void 0:window.isSecureContext))return n.warning("当前使用的http协议默认不支持麦克风权限,需要用户开启浏览器麦克风权限"),!1;return!0}())return void t({result:"fail",msg:"当前环境不支持录音"});if(this.messageHandlerQueue.length>0)return void t({result:"fail",msg:"当前已存在正在录音的任务"});if(!this.webSocket)return this.webSocket=new WebSocket(this.option.origin||"/flow/ws/speech"),this.webSocket.onopen=()=>{this.isReady=!0,this.run({resolve:e,reject:t})},this.webSocket.onmessage=this.handleMessage.bind(this),void(this.webSocket.onerror=()=>console.log("WebSocket连接失败"));const s=this;!async function i(n=0){if(n>5)return t({result:"fail",msg:"WebSocket连接失败"});s.isReady?s.run({resolve:e,reject:t}):setTimeout((()=>{i(++n)}),100)}()}))}stop(e={}){var s;if(null==(s=this.recordingModal)||s.hide(),t.IsOpen())if(this.option.realTimeRecognition){const t=this.messageHandlerQueue.shift();if(!t)return;const{resolve:s,reject:i}=t;s({result:"success",data:this.contentRef.value,timeout:!!e.timeout}),this.reset()}else this.recorder.stop((async(e,t)=>{this.toSend(e)}),(e=>{this.handleError({msg:e})}),!0)}handleError(e){const t=this.messageHandlerQueue.shift();if(!t)return;const{resolve:s,reject:i}=t;i({result:"fail",...e}),this.reset()}handleMessage(e){const{data:t}=e||{};if(i(t))if(this.option.realTimeRecognition){const e=this.option.allowPunctuationMark?t:t.replace(/[??,。,.\s]/g,"");this.contentRef.value+=e}else{const e=this.messageHandlerQueue.shift();if(!e)return;const{resolve:s,reject:i}=e;s({result:"success",data:this.option.allowPunctuationMark?t:t.replace(/[??,。,.\s]/g,"")}),this.reset()}else this.handleError({msg:"接收到的数据不是一个有效字符串"})}reset(){var e;null==(e=this.recorder)||e.close(),this.realTimeSendStartTime=0,this.timer&&(clearTimeout(this.timer),this.timer=null),Object.assign(this.option,{realTimeRecognition:!1,allowPunctuationMark:!0,timed:5,isGenerateMedicalRecord:!1}),this.messageHandlerQueue=[]}destroy(){this.webSocket&&(this.webSocket.close(),this.webSocket=null,this.isReady=!1),this.hasEventListener=!1,this.reset(),this.recorder=null}static destroy(){r.instance&&(r.instance.destroy(),r.instance=null)}};let o=r;o.sendInterval=1800;export{o as default};
@@ -0,0 +1,51 @@
1
+ import { PropType } from 'vue';
2
+ declare const _default: import("vue").DefineComponent<{
3
+ configs: {
4
+ type: PropType<Record<string, string>>;
5
+ };
6
+ data: {
7
+ type: PropType<Record<string, string>>;
8
+ };
9
+ }, {
10
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
11
+ configs: {
12
+ type: PropType<Record<string, string>>;
13
+ };
14
+ data: {
15
+ type: PropType<Record<string, string>>;
16
+ };
17
+ }>> & {
18
+ onClose?: ((...args: any[]) => any) | undefined;
19
+ onFinish?: ((...args: any[]) => any) | undefined;
20
+ }>>;
21
+ emit: (event: "close" | "finish", ...args: any[]) => void;
22
+ dynamicForm: {
23
+ list: {
24
+ label: string;
25
+ key: string;
26
+ value: string;
27
+ }[];
28
+ };
29
+ initForm: () => void;
30
+ handleClear: () => void;
31
+ onFinish: () => void;
32
+ NForm: any;
33
+ NFormItem: any;
34
+ NSpace: any;
35
+ NButton: any;
36
+ NInput: any;
37
+ NScrollbar: any;
38
+ NIcon: any;
39
+ 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<{}>>, {}>;
40
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "finish")[], "close" | "finish", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
41
+ configs: {
42
+ type: PropType<Record<string, string>>;
43
+ };
44
+ data: {
45
+ type: PropType<Record<string, string>>;
46
+ };
47
+ }>> & {
48
+ onClose?: ((...args: any[]) => any) | undefined;
49
+ onFinish?: ((...args: any[]) => any) | undefined;
50
+ }, {}>;
51
+ export default _default;
@@ -0,0 +1 @@
1
+ import r from"./form.vue2.js";import e from"../../../../_virtual/_plugin-vue_export-helper.js";var o=e(r,[["__file","form.vue"]]);export{o as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,reactive as t,openBlock as l,createElementBlock as a,Fragment as n,createVNode as o,unref as i,withCtx as u,renderList as r,createBlock as s,createTextVNode as c,createElementVNode as f}from"vue";import{NSpace as p,NButton as d,NIcon as m,NScrollbar as v,NForm as y,NFormItem as w,NInput as g}from"naive-ui";import{Close as h}from"@vicons/ionicons5";const _=f("h5",null,"病历转录结果",-1);var b=e({__name:"form",props:{configs:{type:Object},data:{type:Object}},emits:["finish","close"],setup(e,{emit:f}){const b=e,k=t({list:[]});function x(){k.list.forEach((e=>{e.value=""}))}function C(){const e=k.list.reduce(((e,t)=>(e[t.key]=t.value,e)),{});f("finish",e)}return function(){var e;for(const t in b.configs)k.list.push({label:b.configs[t],key:t,value:(null==(e=b.data)?void 0:e[t])||""})}(),(e,t)=>(l(),a(n,null,[o(i(p),{justify:"space-between",align:"center","wrap-item":!1,size:30,class:"title"},{default:u((()=>[_,o(i(d),{quaternary:"",onClick:t[0]||(t[0]=()=>f("close"))},{icon:u((()=>[o(i(m),{component:i(h)},null,8,["component"])])),_:1})])),_:1}),o(i(v),{style:{"max-height":"600px"}},{default:u((()=>[o(i(y),{ref:"formRef",model:k},{default:u((()=>[(l(!0),a(n,null,r(k.list,(e=>(l(),s(i(w),{key:e.key,label:e.label,path:e.key},{default:u((()=>{var t;return[o(i(g),{placeholder:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.383"))||"请输入",type:"textarea",value:e.value,"onUpdate:value":t=>e.value=t,clearable:"",autosize:{minRows:2,maxRows:5}},null,8,["value","onUpdate:value"])]})),_:2},1032,["label","path"])))),128))])),_:1},8,["model"])])),_:1}),o(i(p),{justify:"center","wrap-item":!1,size:30,style:{"margin-top":"15px"}},{default:u((()=>[o(i(d),{type:"primary",onClick:C},{default:u((()=>[c("导入病历")])),_:1}),o(i(d),{"attr-type":"button",onClick:x},{default:u((()=>{var e;return[c((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.509"))||"清空")]})),_:1})])),_:1})],64))}});export{b as default};
@@ -0,0 +1,91 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ content: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ }, {
7
+ cssVars: import("vue").ComputedRef<import("../../../../shared/types").AnyObject>;
8
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
9
+ content: {
10
+ type: StringConstructor;
11
+ default: string;
12
+ };
13
+ }>> & {}>>;
14
+ NModal: any;
15
+ Recording: import("vue").DefineComponent<{
16
+ content: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ showBtn: {
21
+ type: BooleanConstructor;
22
+ };
23
+ token: {
24
+ type: StringConstructor;
25
+ };
26
+ configs: {
27
+ type: import("vue").PropType<Record<string, string>>;
28
+ };
29
+ }, {
30
+ consultationRecordUrl: string;
31
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
32
+ content: {
33
+ type: StringConstructor;
34
+ default: string;
35
+ };
36
+ showBtn: {
37
+ type: BooleanConstructor;
38
+ };
39
+ token: {
40
+ type: StringConstructor;
41
+ };
42
+ configs: {
43
+ type: import("vue").PropType<Record<string, string>>;
44
+ };
45
+ }>> & {
46
+ onClose?: ((...args: any[]) => any) | undefined;
47
+ onEdit?: ((...args: any[]) => any) | undefined;
48
+ onFail?: ((...args: any[]) => any) | undefined;
49
+ onEnd?: ((...args: any[]) => any) | undefined;
50
+ }>>;
51
+ emit: (event: "edit" | "close" | "end" | "fail", ...args: any[]) => void;
52
+ loading: import("vue").Ref<boolean>;
53
+ handleKeydown: (event: KeyboardEvent) => void;
54
+ close: () => void;
55
+ toEdit: () => Promise<void>;
56
+ NIcon: any;
57
+ NButton: any;
58
+ NSpin: any;
59
+ Mic: 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
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "close" | "end" | "fail")[], "edit" | "close" | "end" | "fail", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
61
+ content: {
62
+ type: StringConstructor;
63
+ default: string;
64
+ };
65
+ showBtn: {
66
+ type: BooleanConstructor;
67
+ };
68
+ token: {
69
+ type: StringConstructor;
70
+ };
71
+ configs: {
72
+ type: import("vue").PropType<Record<string, string>>;
73
+ };
74
+ }>> & {
75
+ onClose?: ((...args: any[]) => any) | undefined;
76
+ onEdit?: ((...args: any[]) => any) | undefined;
77
+ onFail?: ((...args: any[]) => any) | undefined;
78
+ onEnd?: ((...args: any[]) => any) | undefined;
79
+ }, {
80
+ content: string;
81
+ showBtn: boolean;
82
+ }>;
83
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
84
+ content: {
85
+ type: StringConstructor;
86
+ default: string;
87
+ };
88
+ }>>, {
89
+ content: string;
90
+ }>;
91
+ export default _default;
@@ -0,0 +1 @@
1
+ import r from"./recording-modal.vue2.js";import e from"../../../../_virtual/_plugin-vue_export-helper.js";var o=e(r,[["__file","recording-modal.vue"]]);export{o as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,openBlock as o,createBlock as t,unref as s,normalizeStyle as r,withCtx as n,createVNode as i,mergeProps as a}from"vue";import{NModal as m}from"naive-ui";import{useTheme as p}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";import"../../../../shared/hooks/useScrollLoading.js";import u from"./recording.vue.js";var c=e({__name:"recording-modal",props:{content:{type:String,default:""}},setup(e){const c=p();return(p,d)=>(o(),t(s(m),{style:r(s(c)),"close-on-esc":!1,"mask-closable":!1},{default:n((()=>[i(u,a(p.$attrs,{content:e.content}),null,16,["content"])])),_:1},8,["style"]))}});export{c as default};
@@ -1,31 +1,70 @@
1
+ import { PropType } from 'vue';
1
2
  declare const _default: import("vue").DefineComponent<{
2
3
  content: {
3
4
  type: StringConstructor;
4
5
  default: string;
5
6
  };
7
+ showBtn: {
8
+ type: BooleanConstructor;
9
+ };
10
+ token: {
11
+ type: StringConstructor;
12
+ };
13
+ configs: {
14
+ type: PropType<Record<string, string>>;
15
+ };
6
16
  }, {
7
- cssVars: import("vue").ComputedRef<import("../../../../shared/types").AnyObject>;
17
+ consultationRecordUrl: string;
8
18
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
9
19
  content: {
10
20
  type: StringConstructor;
11
21
  default: string;
12
22
  };
23
+ showBtn: {
24
+ type: BooleanConstructor;
25
+ };
26
+ token: {
27
+ type: StringConstructor;
28
+ };
29
+ configs: {
30
+ type: PropType<Record<string, string>>;
31
+ };
13
32
  }>> & {
14
33
  onClose?: ((...args: any[]) => any) | undefined;
34
+ onEdit?: ((...args: any[]) => any) | undefined;
35
+ onFail?: ((...args: any[]) => any) | undefined;
36
+ onEnd?: ((...args: any[]) => any) | undefined;
15
37
  }>>;
16
- emit: (event: "close", ...args: any[]) => void;
38
+ emit: (event: "edit" | "close" | "end" | "fail", ...args: any[]) => void;
39
+ loading: import("vue").Ref<boolean>;
40
+ handleKeydown: (event: KeyboardEvent) => void;
17
41
  close: () => void;
18
- NModal: any;
42
+ toEdit: () => Promise<void>;
19
43
  NIcon: any;
44
+ NButton: any;
45
+ NSpin: any;
20
46
  Mic: 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<{}>>, {}>;
21
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], "close", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
47
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "close" | "end" | "fail")[], "edit" | "close" | "end" | "fail", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
48
  content: {
23
49
  type: StringConstructor;
24
50
  default: string;
25
51
  };
52
+ showBtn: {
53
+ type: BooleanConstructor;
54
+ };
55
+ token: {
56
+ type: StringConstructor;
57
+ };
58
+ configs: {
59
+ type: PropType<Record<string, string>>;
60
+ };
26
61
  }>> & {
27
62
  onClose?: ((...args: any[]) => any) | undefined;
63
+ onEdit?: ((...args: any[]) => any) | undefined;
64
+ onFail?: ((...args: any[]) => any) | undefined;
65
+ onEnd?: ((...args: any[]) => any) | undefined;
28
66
  }, {
29
67
  content: string;
68
+ showBtn: boolean;
30
69
  }>;
31
70
  export default _default;
@@ -1 +1 @@
1
- import{createElementVNode as o,defineComponent as e,openBlock as s,createBlock as t,unref as r,normalizeStyle as i,withCtx as n,toDisplayString as a,createVNode as c}from"vue";import{NModal as l,NIcon as p}from"naive-ui";import{Mic as m}from"@vicons/ionicons5";import{useTheme as d}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"../../../../shared/hooks/useScrollLoading.js";var u;const f={class:"c-recording-wrapper"},h={class:"content"},v=o("div",{class:"animation"},null,-1),g=o("p",{class:"tip"},(null==(u=window.getLanguageByCode)?void 0:u.call(window,"10010.1.141"))||"按下空格键停止录音",-1);var k=e({__name:"recording",props:{content:{type:String,default:""}},emits:["close"],setup(e,{emit:u}){const k=d();function w(){u("close")}return(d,u)=>(s(),t(r(l),{style:i(r(k))},{default:n((()=>[o("div",f,[o("p",h,a(e.content||"正在聆听..."),1),v,o("div",{class:"icon-box",onClick:w},[c(r(p),{size:"60",color:"#fff",component:r(m)},null,8,["component"])]),g])])),_:1},8,["style"]))}});export{k as default};
1
+ import{createElementVNode as e,defineComponent as n,ref as o,onMounted as t,onBeforeUnmount as i,openBlock as a,createElementBlock as c,createBlock as l,unref as d,Fragment as r,toDisplayString as s,createVNode as p,withCtx as u,createTextVNode as f,createCommentVNode as m}from"vue";import{NSpin as v,NIcon as y,NButton as k}from"naive-ui";import{Mic as w}from"@vicons/ionicons5";import g from"axios";var b;const h={class:"c-recording-wrapper"},x={class:"content"},B=e("p",null,(null==(b=window.getLanguageByCode)?void 0:b.call(window,"10010.1.141"))||"按下空格键停止录音",-1),C={key:0,class:"btns"};var _=n({__name:"recording",props:{content:{type:String,default:""},showBtn:{type:Boolean},token:{type:String},configs:{type:Object}},emits:["close","edit","end","fail"],setup(n,{expose:b,emit:_}){const E=n,L=o(!1);function S(e){if(" "===e.key||"Space"===e.code){if(L.value)return;e.preventDefault(),z()}}function z(){_("close")}async function A(){_("end"),L.value=!0;try{const{data:e}=await g.post("/flow/openApi/consultationRecord",{taskId:1,audioText:E.content||"",medicalTemplateInfo:E.configs},{headers:{Authorization:`bearer ${E.token}`}});_("edit",(null==e?void 0:e.data)||{})}catch(e){_("fail",e)}finally{L.value=!1}}return t((()=>{document.addEventListener("keydown",S)})),i((()=>{document.removeEventListener("keydown",S)})),b({toEdit:A}),(o,t)=>(a(),c("div",h,[L.value?(a(),l(d(v),{key:0,description:"加载中..."})):(a(),c(r,{key:1},[e("p",x,s(n.content||"正在聆听..."),1),e("div",{class:"icon-box",onClick:z},[p(d(y),{size:"60",color:"#fff",component:d(w)},null,8,["component"])]),B,n.showBtn?(a(),c("div",C,[p(d(k),{type:"primary",onClick:A,disabled:!n.content},{default:u((()=>[f("结束录音")])),_:1},8,["disabled"]),p(d(k),{onClick:z},{default:u((()=>[f("取消录音")])),_:1})])):m("v-if",!0)],64))]))}});export{_ as default};
@@ -0,0 +1,4 @@
1
+ import { AnyObject } from '../../../../shared/types';
2
+ export declare const $message: import("naive-ui").MessageApi;
3
+ export declare function getConfigs(medicalTemplateInfo: AnyObject[]): AnyObject;
4
+ export declare function getMedicalTemplateInfo(data: AnyObject, originList?: AnyObject[]): AnyObject[];
@@ -0,0 +1 @@
1
+ import{createDiscreteApi as e}from"naive-ui";const{message:n}=e(["message"]);function r(e){return e.reduce(((e,n)=>{var i;return(null==(i=n.children)?void 0:i.length)?Object.assign(e,r(n.children)):e[n.innerIdentifier||n.dataId]=n.elementName,e}),{})}function i(e,n=[]){const r=[];return n.forEach((n=>{var t;if(null==(t=n.children)?void 0:t.length){const t={...n,children:i(e,n.children)};r.push(t)}else r.push({...n,text:e[n.innerIdentifier||n.dataId]})})),r}export{n as $message,r as getConfigs,i as getMedicalTemplateInfo};
@@ -1,11 +1,14 @@
1
- import { ComponentInternalInstance, Ref } from 'vue';
1
+ import { ComponentInternalInstance } from 'vue';
2
+ import { AnyObject } from '../../../../shared/types';
2
3
  export declare class RecordingModal {
3
4
  rendered: boolean;
4
5
  target: HTMLElement | null;
5
- show({ contentRef, onClose, instance }: {
6
- contentRef: Ref<string>;
7
- onClose: () => void;
6
+ modalType: string;
7
+ show({ instance, modalType, onClose, props }: {
8
8
  instance?: ComponentInternalInstance;
9
+ onClose: () => void;
10
+ modalType?: string;
11
+ props: AnyObject;
9
12
  }): void;
10
13
  hide(): void;
11
14
  }
@@ -1 +1 @@
1
- import{ref as e,render as t,createVNode as n,withCtx as r,nextTick as o}from"vue";import{createProviderWrapper as s}from"../../../../shared/utils/index.js";import i from"../components/recording.vue.js";class l{constructor(){this.rendered=!1,this.target=null}show({contentRef:l,onClose:a,instance:d}){if(this.rendered)return;this.rendered=!0;const u=document.createElement("div"),h=e(!1),c=s(d);t(n(c,null,{default:r((()=>n(i,{to:u,content:l.value,show:h.value,"onUpdate:show":e=>h.value=e,onClose:()=>p(),onAfterLeave:()=>p()},null)),d)}),u);const m=this;var v;function p(){a()}v=u,document.body.appendChild(v),m.target=v,o((()=>h.value=!0))}hide(){var e;(null==(e=this.target)?void 0:e.parentElement)&&(this.rendered=!1,this.target.parentElement.removeChild(this.target),this.target=null)}}export{l as RecordingModal};
1
+ import{ref as e,render as t,createVNode as r,withCtx as o,mergeProps as n,nextTick as d}from"vue";import{createProviderWrapper as l}from"../../../../shared/utils/index.js";import s from"../components/recording-modal.vue.js";class i{constructor(){this.rendered=!1,this.target=null,this.modalType="recording"}show({instance:i,modalType:a,onClose:h,props:m}){if(this.modalType=a||"recording",this.rendered)return;this.rendered=!0;const u=document.createElement("div"),p=e(!1),c=l(i),v=this;var g;t(r(c,null,{default:o((()=>r(s,n({show:p.value,"onUpdate:show":e=>p.value=e},{to:u,onClose:h,onAfterLeave:h},{content:m.contentRef.value}),null)),i)}),u),g=u,document.body.appendChild(g),v.target=g,d((()=>p.value=!0))}hide(){var e;(null==(e=this.target)?void 0:e.parentElement)&&(this.rendered=!1,this.target.parentElement.removeChild(this.target),this.target=null)}}export{i as RecordingModal};
@@ -1 +1 @@
1
- .c-recording-wrapper{align-items:center;background-color:#fff;border-radius:10px;bottom:100px;display:flex;height:350px;justify-content:center;left:calc(50% - 250px);position:fixed;width:500px}@keyframes toScale{0%{transform:translateX(-50%) translateY(-50%) scale(1)}to{transform:translateX(-50%) translateY(-50%) scale(1.5)}}.c-recording-wrapper .content{font-size:18px;position:absolute;text-align:center;top:20px}.c-recording-wrapper .animation{animation:toScale 1s infinite;background-color:#5585f54d;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%) scale(1);z-index:-1}.c-recording-wrapper .animation,.c-recording-wrapper .icon-box{align-items:center;border-radius:50%;display:flex;height:90px;justify-content:center;width:90px}.c-recording-wrapper .icon-box{background-color:#5585f5;cursor:pointer}.c-recording-wrapper .tip{bottom:20px;position:absolute}
1
+ .c-recording-wrapper{align-items:center;background-color:#fff;border-radius:10px;display:flex;flex-flow:column nowrap;height:350px;justify-content:center;padding:20px;width:500px}@keyframes toScale{0%{transform:translateX(-50%) translateY(-50%) scale(1)}to{transform:translateX(-50%) translateY(-50%) scale(1.5)}}.c-recording-wrapper .content{-webkit-box-orient:vertical;-webkit-line-clamp:3;display:-webkit-box;font-size:18px;overflow:hidden;text-align:center}.c-recording-wrapper .icon-box{background-color:#5585f5;cursor:pointer;margin:30px auto;position:relative}.c-recording-wrapper .icon-box,.c-recording-wrapper .icon-box:before{align-items:center;border-radius:50%;display:flex;height:90px;justify-content:center;width:90px}.c-recording-wrapper .icon-box:before{animation:toScale 1s infinite;background-color:#5585f54d;content:"";left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%) scale(1);transform-origin:center center}.c-recording-wrapper .title{height:50px;width:100%}.c-recording-wrapper .title h5{font-size:15px}.c-recording-wrapper .btns{display:flex;margin-top:10px}.c-recording-wrapper .btns .n-button:first-child{margin-right:30px}.c-recording-sdk-wrapper{height:100%;padding:20px;width:100%}.c-recording-sdk-wrapper .c-recording-wrapper{height:100%;width:100%}
@@ -0,0 +1 @@
1
+ declare module 'bpmn-js/lib/Viewer';
@@ -0,0 +1 @@
1
+ declare module 'bpmn-js/lib/features/modeling';
@@ -0,0 +1 @@
1
+ declare module 'diagram-js/lib/navigation/movecanvas';
@@ -206,6 +206,7 @@ export declare const CallbackMaps: Map<string, {
206
206
  fixMemoLeak: {
207
207
  type: BooleanConstructor;
208
208
  };
209
+ lazyRender: BooleanConstructor;
209
210
  }, {
210
211
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
211
212
  fieldList: {
@@ -408,6 +409,7 @@ export declare const CallbackMaps: Map<string, {
408
409
  fixMemoLeak: {
409
410
  type: BooleanConstructor;
410
411
  };
412
+ lazyRender: BooleanConstructor;
411
413
  }>> & {
412
414
  onFormChange?: ((...args: any[]) => any) | undefined;
413
415
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -582,6 +584,8 @@ export declare const CallbackMaps: Map<string, {
582
584
  linebarTextDirection: "horizontal" | "vertical";
583
585
  autoWidth: number | boolean;
584
586
  feedbackType: "default" | "tooltip";
587
+ fixMemoLeak: boolean;
588
+ lazyRender: boolean;
585
589
  }>) => Record<string, import("@formily/json-schema").Stringify<{
586
590
  [key: symbol]: any;
587
591
  [key: `x-${string}`]: any;
@@ -968,6 +972,7 @@ export declare const CallbackMaps: Map<string, {
968
972
  fixMemoLeak: {
969
973
  type: BooleanConstructor;
970
974
  };
975
+ lazyRender: BooleanConstructor;
971
976
  }>> & {
972
977
  onFormChange?: ((...args: any[]) => any) | undefined;
973
978
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -999,9 +1004,10 @@ export declare const CallbackMaps: Map<string, {
999
1004
  linebarTextDirection: "horizontal" | "vertical";
1000
1005
  autoWidth: number | boolean;
1001
1006
  feedbackType: "default" | "tooltip";
1007
+ fixMemoLeak: boolean;
1008
+ lazyRender: boolean;
1002
1009
  operationalFormInit: boolean;
1003
1010
  incrementalRender: boolean;
1004
- fixMemoLeak: boolean;
1005
1011
  }>;
1006
1012
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
1007
1013
  props: {
@@ -143,6 +143,29 @@ declare function getComponent(type: COMPONENT_TYPE): import("vue").DefineCompone
143
143
  default: () => {};
144
144
  type: import("vue").PropType<import("../../../../shared/types").AnyObject>;
145
145
  };
146
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "button-click"[], "button-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
147
+ config: {
148
+ default: () => {};
149
+ type: import("vue").PropType<import("../../../../shared/types").AnyObject>;
150
+ };
151
+ data: {
152
+ default: () => {};
153
+ type: import("vue").PropType<import("../../../../shared/types").AnyObject>;
154
+ };
155
+ }>> & {
156
+ "onButton-click"?: ((...args: any[]) => any) | undefined;
157
+ }, {
158
+ data: import("../../../../shared/types").AnyObject;
159
+ config: import("../../../../shared/types").AnyObject;
160
+ }> | import("vue").DefineComponent<{
161
+ config: {
162
+ default: () => {};
163
+ type: import("vue").PropType<import("../../../../shared/types").AnyObject>;
164
+ };
165
+ data: {
166
+ default: () => {};
167
+ type: import("vue").PropType<import("../../../../shared/types").AnyObject>;
168
+ };
146
169
  }, {
147
170
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
148
171
  config: {
@@ -464,29 +487,6 @@ declare function getComponent(type: COMPONENT_TYPE): import("vue").DefineCompone
464
487
  default: () => {};
465
488
  type: import("vue").PropType<import("../../../../shared/types").AnyObject>;
466
489
  };
467
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "button-click"[], "button-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
468
- config: {
469
- default: () => {};
470
- type: import("vue").PropType<import("../../../../shared/types").AnyObject>;
471
- };
472
- data: {
473
- default: () => {};
474
- type: import("vue").PropType<import("../../../../shared/types").AnyObject>;
475
- };
476
- }>> & {
477
- "onButton-click"?: ((...args: any[]) => any) | undefined;
478
- }, {
479
- data: import("../../../../shared/types").AnyObject;
480
- config: import("../../../../shared/types").AnyObject;
481
- }> | import("vue").DefineComponent<{
482
- config: {
483
- default: () => {};
484
- type: import("vue").PropType<import("../../../../shared/types").AnyObject>;
485
- };
486
- data: {
487
- default: () => {};
488
- type: import("vue").PropType<import("../../../../shared/types").AnyObject>;
489
- };
490
490
  }, {
491
491
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
492
492
  config: {
@@ -175,9 +175,6 @@ declare const _default: import("vue").DefineComponent<{
175
175
  modelValue: unknown[];
176
176
  componentData: Record<string, any>;
177
177
  } & {
178
- /**
179
- * 改变弹窗大小
180
- */
181
178
  itemKey?: string | Function | undefined;
182
179
  }>, {
183
180
  move: Function;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as t,ref as a,computed as l,onBeforeUnmount as n,watch as o,openBlock as r,createBlock as u,unref as s,isRef as d,createSlots as i,renderList as p,withCtx as c,renderSlot as y,nextTick as f}from"vue";import{promiseTimeout as v}from"@vueuse/shared";import{NDatePicker as m}from"naive-ui";import"../../../shared/utils/index.js";import{useDateTime as h,handleInputEvent as D}from"../../../shared/hooks/useDateTime.js";import{isArray as g,isEqual as w,isString as b,isFunction as k,isNumber as V}from"lodash-es";import"@vue/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../../shared/hooks/useScrollLoading.js";import{subYears as S,addYears as _,isWithinInterval as A,format as I,sub as M,startOfDay as R,endOfDay as C}from"date-fns";var $=e({__name:"DatePicker",props:{updateUnchangedValue:{type:Boolean},onConfirm:{type:Function},formattedValue:{type:[String,Array]},placeholder:{type:String},allowedInvalidValue:{type:String},to:{type:[Object,String,Boolean],default:"body"},holidays:{type:Array,default:()=>[]},type:{type:String,default:"date"},isDateDisabled:{type:Function}},emits:["update:formatted-value"],setup(e,{expose:$,emit:j}){const F=e,P=t(),U=a(null),q=a(null),x=a();let E="";const H=l({get:()=>W(F.formattedValue)?null:F.formattedValue,set(e){g(e)&&g(E)&&w(E,e)||E===e||(j("update:formatted-value",e,b(e)?Date.parse(e):g(e)?[Date.parse(e[0]),Date.parse(e[1])]:null),E=e)}}),L=l((()=>F.type.includes("datetime"))),B=l((()=>Reflect.get(P,"format")?P.format:L.value?"yyyy-MM-dd HH:mm:ss":"month"===F.type?"yyyy-MM":"year"===F.type?"yyyy":"yyyy-MM-dd")),Y=l((()=>L.value?B.value.split(" "):"")),O=l((()=>{const e=e=>{const t=new Date(e),a=new Date,l=S(a,150),n=_(a,150);return!A(t,{start:l,end:n})};return k(F.isDateDisabled)?(t,...a)=>{var l;return(null==(l=F.isDateDisabled)?void 0:l.call(F,t,...a))||e(t)}:e})),{focus:T,blur:z,handleConfirm:G}=h(U,{formatRef:B,attrs:{...P,type:F.type,isDateDisabled:O.value},emit:j,allowedInvalidValue:F.allowedInvalidValue});async function J(e){!async function(e){var t;if(!e||!F.holidays.length)return;await v(0);const a=null==(t=U.value)?void 0:t.panelInstRef;if(!a)return;const l=a.$el;if(!l)return;N(),"daterange"===F.type?K.push(n((()=>a.startDateArray),".n-date-panel-calendar--start .n-date-panel-dates>div"),n((()=>a.endDateArray),".n-date-panel-calendar--end .n-date-panel-dates>div")):"date"===F.type&&K.push(n((()=>a.dateArray),".n-date-panel-calendar .n-date-panel-dates>div"));function n(e,t){const a=[],n=o(e,(e=>{a.forEach((e=>e.classList.remove("c-date-picker__holiday"))),a.length=0,g(e)&&Array.from(l.querySelectorAll(t)).forEach(((t,l)=>{const{ts:n}=e[l]||{};if(!V(n))return;const o=new Date(n);F.holidays.some((e=>e.getDate()===o.getDate()&&e.getMonth()===o.getMonth()&&e.getFullYear()===o.getFullYear()))&&(f((()=>t.classList.add("c-date-picker__holiday"))),a.push(t))}))}),{immediate:!0,deep:!0});return()=>{n(),a.length=0}}}(e),e&&L.value&&(await f(),async function e(t=0){var a;t>2||(q.value=null==(a=U.value)?void 0:a.panelInstRef,q.value?h(q,{formatRef:Y,attrs:{...P,type:F.type,isDateDisabled:O.value},isPanel:!0}):(await f(),e(++t)))}())}const K=[];function N(){K.forEach((e=>e())),K.length=0}async function Q(...e){var t,a,l,n,o,r;const u=null==(n=null==(l=null==(a=null==(t=U.value)?void 0:t.inputInstRef)?void 0:a.$el)?void 0:l.querySelector)?void 0:n.call(l,"input");if(F.type.includes("range")?null==(o=F.onConfirm)||o.call(F,...e):(await f(),u.focus(),G(u),u.blur(),null==(r=F.onConfirm)||r.call(F,Date.parse(u.value),u.value)),!(null==u?void 0:u.value)||!F.updateUnchangedValue||F.type.includes("range"))return;const s=u.value;D(u,I(new Date,B.value)),D(u,s)}function W(e){return F.allowedInvalidValue&&F.allowedInvalidValue===e}return n(N),o((()=>F.formattedValue),(e=>{x.value=W(e)?e:F.placeholder?F.placeholder:"选择日期时间",W(e)||(E=e)}),{immediate:!0}),$({$datePicker:U,focus:T,blur:z,setShortcutValue:async function(e){if(!F.type||!F.type.includes("range")||!U.value)return;const t=U.value.$el.querySelectorAll(".n-input__input-el");let a,l;const n=new Date;if("week"===e){const e=M(n,{weeks:1});a=I(R(e),B.value)}else{const e=M(n,{months:1});a=I(R(e),B.value)}l=I(C(n),B.value),D(t[0],a),await f(),D(t[1],l)}}),(t,a)=>(r(),u(s(m),{ref_key:"datePickerRef",ref:U,"onUpdate:show":J,onConfirm:Q,placeholder:x.value,to:e.to,type:e.type,"formatted-value":s(H),"onUpdate:formatted-value":a[0]||(a[0]=e=>d(H)?H.value=e:null),"is-date-disabled":s(O)},i({_:2},[p(t.$slots,((e,a)=>({name:a,fn:c((()=>[y(t.$slots,a)]))})))]),1032,["placeholder","to","type","formatted-value","is-date-disabled"]))}});export{$ as default};
1
+ import{defineComponent as e,useAttrs as t,ref as a,computed as l,onBeforeUnmount as n,watch as o,openBlock as r,createBlock as u,unref as s,isRef as d,createSlots as i,renderList as c,withCtx as p,renderSlot as y,nextTick as f}from"vue";import{promiseTimeout as v}from"@vueuse/shared";import{NDatePicker as m}from"naive-ui";import"../../../shared/utils/index.js";import{useDateTime as h,handleInputEvent as D}from"../../../shared/hooks/useDateTime.js";import{isArray as g,isEqual as w,isString as b,isFunction as k,isNumber as V}from"lodash-es";import"@vue/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../../shared/hooks/useScrollLoading.js";import{subYears as S,addYears as _,isWithinInterval as A,format as I,sub as M,startOfDay as R,endOfDay as C}from"date-fns";var $=e({__name:"DatePicker",props:{updateUnchangedValue:{type:Boolean},onConfirm:{type:Function},formattedValue:{type:[String,Array]},placeholder:{type:String},allowedInvalidValue:{type:String},to:{type:[Object,String,Boolean],default:"body"},holidays:{type:Array,default:()=>[]},type:{type:String,default:"date"},isDateDisabled:{type:Function}},emits:["update:formatted-value"],setup(e,{expose:$,emit:j}){const F=e,P=t(),U=a(null),q=a(null),x=a();let E="";const H=l({get:()=>W(F.formattedValue)?null:F.formattedValue,set(e){g(e)&&g(E)&&w(E,e)||E===e||(j("update:formatted-value",e,b(e)?Date.parse(e):g(e)?[Date.parse(e[0]),Date.parse(e[1])]:null),E=e)}}),L=l((()=>F.type.includes("datetime"))),B=l((()=>Reflect.get(P,"format")?P.format:L.value?"yyyy-MM-dd HH:mm:ss":"month"===F.type?"yyyy-MM":"year"===F.type?"yyyy":"yyyy-MM-dd")),Y=l((()=>L.value?B.value.split(" "):"")),O=l((()=>{const e=e=>{const t=new Date(e),a=new Date,l=S(a,150),n=_(a,150);return!A(t,{start:l,end:n})};return k(F.isDateDisabled)?(t,...a)=>{var l;return(null==(l=F.isDateDisabled)?void 0:l.call(F,t,...a))||e(t)}:e})),{focus:T,blur:z,handleConfirm:G}=h(U,{formatRef:B,attrs:{...P,type:F.type,isDateDisabled:O.value},emit:j,allowedInvalidValue:F.allowedInvalidValue});async function J(e){!async function(e){var t;if(!e||!F.holidays.length)return;await v(0);const a=null==(t=U.value)?void 0:t.panelInstRef;if(!a)return;const l=a.$el;if(!l)return;N(),"daterange"===F.type?K.push(n((()=>a.startDateArray),".n-date-panel-calendar--start .n-date-panel-dates>div"),n((()=>a.endDateArray),".n-date-panel-calendar--end .n-date-panel-dates>div")):["date","datetime"].includes(F.type)&&K.push(n((()=>a.dateArray),".n-date-panel-calendar .n-date-panel-dates>div"));function n(e,t){const a=[],n=o(e,(e=>{a.forEach((e=>e.classList.remove("c-date-picker__holiday"))),a.length=0,g(e)&&Array.from(l.querySelectorAll(t)).forEach(((t,l)=>{const{ts:n}=e[l]||{};if(!V(n))return;const o=new Date(n);F.holidays.some((e=>e.getDate()===o.getDate()&&e.getMonth()===o.getMonth()&&e.getFullYear()===o.getFullYear()))&&(f((()=>t.classList.add("c-date-picker__holiday"))),a.push(t))}))}),{immediate:!0,deep:!0});return()=>{n(),a.length=0}}}(e),e&&L.value&&(await f(),async function e(t=0){var a;t>2||(q.value=null==(a=U.value)?void 0:a.panelInstRef,q.value?h(q,{formatRef:Y,attrs:{...P,type:F.type,isDateDisabled:O.value},isPanel:!0}):(await f(),e(++t)))}())}const K=[];function N(){K.forEach((e=>e())),K.length=0}async function Q(...e){var t,a,l,n,o,r;const u=null==(n=null==(l=null==(a=null==(t=U.value)?void 0:t.inputInstRef)?void 0:a.$el)?void 0:l.querySelector)?void 0:n.call(l,"input");if(F.type.includes("range")?null==(o=F.onConfirm)||o.call(F,...e):(await f(),u.focus(),G(u),u.blur(),null==(r=F.onConfirm)||r.call(F,Date.parse(u.value),u.value)),!(null==u?void 0:u.value)||!F.updateUnchangedValue||F.type.includes("range"))return;const s=u.value;D(u,I(new Date,B.value)),D(u,s)}function W(e){return F.allowedInvalidValue&&F.allowedInvalidValue===e}return n(N),o((()=>F.formattedValue),(e=>{x.value=W(e)?e:F.placeholder?F.placeholder:"选择日期时间",W(e)||(E=e)}),{immediate:!0}),$({$datePicker:U,focus:T,blur:z,setShortcutValue:async function(e){if(!F.type||!F.type.includes("range")||!U.value)return;const t=U.value.$el.querySelectorAll(".n-input__input-el");let a,l;const n=new Date;if("week"===e){const e=M(n,{weeks:1});a=I(R(e),B.value)}else{const e=M(n,{months:1});a=I(R(e),B.value)}l=I(C(n),B.value),D(t[0],a),await f(),D(t[1],l)}}),(t,a)=>(r(),u(s(m),{ref_key:"datePickerRef",ref:U,"onUpdate:show":J,onConfirm:Q,placeholder:x.value,to:e.to,type:e.type,"formatted-value":s(H),"onUpdate:formatted-value":a[0]||(a[0]=e=>d(H)?H.value=e:null),"is-date-disabled":s(O)},i({_:2},[c(t.$slots,((e,a)=>({name:a,fn:p((()=>[y(t.$slots,a)]))})))]),1032,["placeholder","to","type","formatted-value","is-date-disabled"]))}});export{$ as default};
@@ -1 +1 @@
1
- import{defineComponent as e,shallowRef as t,reactive as o,onBeforeUnmount as r,createVNode as i,mergeProps as l}from"vue";import"@wangeditor/editor/dist/css/style.css";import{Editor as d,Toolbar as s}from"@wangeditor/editor-for-vue";var a=e({name:"Editor",inheritAttrs:!1,components:{Editor:d,Toolbar:s},props:{editorConfig:{type:Object},toolbarConfig:{type:Object},uploadImgUrl:{type:String},isDisabled:{type:Boolean,default:!1}},emits:[],setup(e,{attrs:a,slots:n,emit:u}){const p=t(),c=o({MENU_CONF:{uploadImage:{server:e.uploadImgUrl||""}},...e.editorConfig});r((()=>{const e=p.value;null!=e&&e.destroy()}));const f=t=>{p.value=t,e.isDisabled&&t.disable(),console.log("实例",t)};return{editorRef:p,renderVN:()=>i("div",{class:"c-editor"},[i(s,{style:"border-bottom: 1px solid #ccc",editor:p.value,defaultConfig:e.toolbarConfig,mode:"default"},null),i(d,l({class:"c-editor__main",style:"height: 500px"},a,{defaultConfig:c,mode:"default",onOnCreated:f}),null)])}},render(){return this.renderVN()}});export{a as default};
1
+ import{defineComponent as e,shallowRef as o,reactive as t,onBeforeUnmount as r,createVNode as d,mergeProps as l}from"vue";import"@wangeditor/editor/dist/css/style.css";import{Editor as i,Toolbar as s}from"@wangeditor/editor-for-vue";var n=e({name:"Editor",inheritAttrs:!1,components:{Editor:i,Toolbar:s},props:{editorConfig:{type:Object},toolbarConfig:{type:Object},uploadImgUrl:{type:String},isDisabled:{type:Boolean,default:!1}},emits:[],setup(e,{attrs:n,slots:a,emit:u}){const p=o(),f=t({MENU_CONF:{uploadImage:{server:e.uploadImgUrl||""}},...e.editorConfig});r((()=>{const e=p.value;null!=e&&e.destroy()}));const c=o=>{p.value=o,e.isDisabled&&o.disable(),console.log("实例",o)};return{editorRef:p,renderVN:()=>d("div",{style:"border: 1px solid #ccc"},[d(s,{style:"border-bottom: 1px solid #ccc",editor:p.value,defaultConfig:e.toolbarConfig,mode:"default"},null),d(i,l({style:"height: 500px; overflow-y: hidden;"},n,{defaultConfig:f,mode:"default",onOnCreated:c}),null)])}},render(){return this.renderVN()}});export{n as default};
@@ -1 +0,0 @@
1
- .c-editor{border:1px solid #ccc}.c-editor__main{height:500px;overflow-y:hidden}
@@ -1 +1 @@
1
- import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawPoint as e,drawText as i,drawLine as o,defaultLineStyle as n}from"../useDraw.js";import{useBirthProcessCumputedPoint as r}from"../useCumputedPoint.js";import{bus as a}from"../useEvent.js";import{useShadow as l}from"../useShadow.js";import{useCommon as s}from"../useCommon.js";import"vue";import{getIndex as c}from"../../utils/index.js";import{filter as d,cloneDeep as u,omit as f,flatten as h,isNumber as g,pick as m}from"lodash-es";import{format as p}from"date-fns";import{OTHER_MENU as v}from"../../constants/index.js";import"@vueuse/shared";import"naive-ui";import"./useTop.js";import"@vueuse/core";import"../../../../../shared/utils/index.js";const x=d(v,(t=>"add"!==t.type));function y(d,v,y,k,C,w,X,b,E){const{computedX:A,getXValue:L}=r(v),{getEqualXTypes:j,handleAddPrevent:P,isGridLimit:S,getPointEventProps:z}=s(d,y,v),{createShadowLines:I}=l(),{canvasWidth:M,other:T,yCellHeight:H,xCellWidth:O,endX:$,originX:B,originY:W,endY:Y,markHeight:D,event:_,topGridYCellHeight:V,extracorporealCirculationHeight:G}=v,K=new Map,R=u(T);let q=[],F=null;function J(){var o;if(!(null==(o=null==R?void 0:R.horizontal)?void 0:o.length))return;const n="horizontal";K.set(n,[]);const{horizontal:r}=R;let a=W+H/2;r.forEach(((o,r)=>{const{title:l,type:s,pointAttr:c={},textStyle:d={},data:u,showIcon:f=!0}=o;let h=null;u.forEach(((o,u)=>{const{time:g,value:m}=o,p=A(g);if(!ot(p))return;const v=[],x=f&&e(s,{...c,left:p,top:a});x&&v.push(x);const y=f?p+x.width/2+2:p,k=i([y,a],{value:m,...d,originX:"left"});v.push(k);const C=new t.Group(v,{lockMovementY:!0,objectCaching:!1,hasControls:!1,hasBorders:!1,hoverCursor:"pointer",...z()});Object.assign(C,{originLeft:p,iconHalfWidth:x?x.width/2:0,origin:{type:"other",key:n,dataIndex:r,index:u,data:o,title:l},limitX:{x1:B,x2:$-C.width}}),h&&(C.limitX.x1=h.left,h.limitX.x2=C.left,C.prevPoint=h,h.nextPoint=C),h=C,tt(C),K.get(n).push(C)})),a+=H})),d.value.add(...K.get(n))}function N(){var t;if(!(null==(t=null==R?void 0:R.vertical)?void 0:t.length))return;const i="vertical";K.set(i,[]);const{vertical:o}=R;o.forEach(((t,o)=>{const{show:n=!0,marginTop:r=0,textStyle:a={},data:l,time:s}=t,c=A(s);if(!n||!ot(c))return;const{lineHeight:d=H}=a;let u=W+r+d/2;l.forEach(((t,n)=>{const r=e(String(t.value),{...a,lockMovementY:!0,left:c,originX:"left",top:u,origin:{type:"other",key:i,dataIndex:o,index:n,data:t},...z()});u+=d,tt(r),K.get(i).push(r)}));const f=K.get(i).filter((t=>t.origin.dataIndex===o)),h=Math.max(...f.map((t=>t.width))),g=c>$-h;f.forEach(((t,e,i)=>{t.siblingPoints=i.filter((e=>e.origin.index!==t.origin.index)),t.maxTextWidth=h,g&&t.set("originX","right")}))})),d.value.add(...K.get(i))}function Q(t,e="add"){const{dataIndex:i,data:o,index:n,key:r,dataKey:a,time:l}=t,s=R[r],d=["mark","extracorporealCirculation"].includes(r)?s.dataList[i]:s[i];switch(e){case"remove":d.data.splice(n,1);break;case"change":if("mark"===r){d.list.splice(n,1);const t=s.dataList.find((t=>t.time===l));t?t.list.push(o):(s.dataList.push({time:l,list:[o]}),s.dataList.sort(((t,e)=>Date.parse(t.time)-Date.parse(e.time))))}else"extracorporealCirculation"===r?d[a]=o:d.data[n]=o;break;default:{const t=Array.isArray(o)?o[0].time:o.time,e=c(t,d.data),i=Array.isArray(o)?o:[o];d.data.splice(e,0,...i);break}}U(t)}function U(t){var e;const{key:i}=t;switch(null==(e=d.value)||e.remove(...K.get(i)),K.delete(i),i){case"horizontal":J();break;case"vertical":N();break;case"mark":Z();break;case"extracorporealCirculation":rt()}}function Z(){if(!D)return;const{title:t,titleStyle:o,pointAttr:n,dataList:r}=R.mark||{};if(!(null==r?void 0:r.length))return;const a="mark";K.set(a,[]);const l=i([B-5,Y+D/2],{value:t,...o,originX:"right"});d.value.add(l);const s=Y+D+G,c=Y+G;let u=0;const f={};r.forEach(((t,i)=>{const{time:o,list:r=[]}=t,l=A(o);if(!ot(l))return;let h=c+1;r.forEach(((t,o)=>{var r;const{style:g}=t,m=e((null==g?void 0:g.type)||"circleAndText",{...(null==g?void 0:g.pointAttr)||n,text:t.text,left:l,top:c+10,origin:{data:t,key:"mark",type:"other",dataIndex:i,index:o}}),p=m.height;u&&l-u<=O&&(null==(r=f[`x_${u}`])||r.forEach((([t,e])=>{h+p>=s&&(h=Y-1),t<e&&h>=t&&h<e&&(h=e),t>e&&h>e&&h<=t&&(h=e)})));const{topObj:v,startTop:x,oldStartTop:y}=function(t,e){const i={};let o;if(t>Y){const r=t+e;i.y2=t+e/2,r>=s?n(Y-1):(o=t,t=r)}else n(t);function n(n){o=n,i.y2=n-e/2;t=n-e}return{topObj:i,startTop:t,oldStartTop:o}}(h,p);h=x,f[`x_${l}`]||(f[`x_${l}`]=[]),f[`x_${l}`].push([y,h]),m.set("top",v.y2),K.get(a).push(m),tt(m),d.value.add(m)})),u=l})),function(t){const e=t=>{var e,i;return null==(i=null==(e=t.origin)?void 0:e.data)?void 0:i.isStart},i=t.find((t=>e(t))),o=t.find((t=>!e(t)&&t.left>i.left)),n=t.filter((t=>!e(t)));t.forEach((t=>{const r={x1:B,x2:$};e(t)?(r.x2=o.left,t.otherPoints=n):(r.x1=i.left,t.startPoint=i),t.limitX=r}))}(K.get(a))}function tt(t){if(_.hovered&&(t.on("mouseover",(()=>{et(t)})),t.on("mouseout",(()=>{k.show=!1}))),t.lockMovementX&&t.lockMovementY)return;const{key:e}=t.origin,i=["mark","horizontal"].includes(e),o=["mark","vertical"].includes(e),n=["mark","extracorporealCirculation"].includes(e),r="extracorporealCirculation"===e;t.on("moving",(()=>{t.moving=!0,i?function(t){const e=t.origin.key,i="horizontal"===e;t.setCoords(),t.left<t.limitX.x1&&t.set("left",t.limitX.x1+(i?1:0));t.left>t.limitX.x2&&t.set("left",t.limitX.x2+(i?-1:0));if("mark"===e){t.top<W&&t.set("top",W);const e=Y+G+D-t.height/2;t.top>e&&t.set("top",e)}i&&(t.originLeft=t.left+t.iconHalfWidth)}(t):r?function(t){t.setCoords();const{left:e,limitX:i}=t,o=p(new Date,"yyyy-MM-dd HH:mm"),n=A(o);i.isCurrentTime&&i.x2<n&&n>0&&n<M&&(i.x2=n);e<i.x1&&t.set({x1:i.x1,x2:i.x1});e>i.x2&&t.set({x1:i.x2,x2:i.x2});it(t,"left"),it(t,"right")}(t):(w(t),function(t){const e=t.left+t.maxTextWidth>$?"right":"left";t.setCoords().set({originX:e}),t.siblingPoints.forEach((i=>i.setCoords().set({originX:e,left:t.left})))}(t)),_.hovered&&et(t)})),t.on("mouseup",(r=>{var a;if(k.show=!1,1===r.button){if(!t.moving)return;t.moving=!1,i&&function(t){var e,i;if("mark"===t.origin.key){if((null==(i=null==(e=t.origin)?void 0:e.data)?void 0:i.isStart)&&t.otherPoints)t.otherPoints.forEach((e=>{e.limitX.x1=t.left}));else{const e=t.startPoint.otherPoints.map((t=>t.left)),i=Math.min(...e);t.startPoint.limitX.x2=i}return}t.prevPoint&&(t.prevPoint.limitX.x2=t.left);t.nextPoint&&(t.nextPoint.limitX.x1=t.left)}(t);const e=L(null!=(a=t.originLeft)?a:t.left),r={...t.origin,...o?{time:e}:{data:{...t.origin.data,time:e}}};d.value.discardActiveObject(),y("change",r),n&&Q(r,"change")}3===r.button&&["horizontal","vertical"].includes(e)&&(C.point={x:t.left,y:t.top},C.show=!0,C.target=t,C.list=x.map((t=>({...t,renderItem:()=>t.label,_type:"other"}))))}))}function et(t){k.isTarget=!0,k.show=!0;const{key:e,data:i={}}=t.origin||{};let o=i.value;const n="extracorporealCirculation"===e||"mark"===e;k.point={x:t.left,y:n?t.top:t.top+V/2};const r=!t.origin.isMenu&&t.originLeft?t.originLeft:t.left,a=L(r);k.list=[`时间 ${a.slice(-5)}`],n&&("mark"===e&&(o=i.name),k.list.unshift(o+" ")),k.sourceData=[{type:"other",key:e,time:a,value:o}]}function it(t,e){const{shadowObjs:i,params:o}=t[`${e}ShadowBox`]||{};if(!i||!o)return;i.forEach((t=>d.value.remove(t)));o["left"===e?1:0]=t.left;const n=nt(...o);t[`${e}ShadowBox`]={shadowObjs:n,params:o}}function ot(t){return t>=B&&t<=$}function nt(...e){const[i,o,r,a]=e,{mode:l,style:s}=a,c=f(s,["angle","space"]),u=[[i,Y],[o,Y],[o,r],[i,r]],h=new t.Polygon(u.map((t=>({x:t[0],y:t[1]}))),{...n,...c,stroke:"transparent",..."slash"===l?{fill:"transparent"}:{}}),g=[];return["slash"].includes(l)&&g.push(...I(u,s.angle,s.space,c)),d.value.add(h,...g),K.get("extracorporealCirculation").push(h,...g),[h,...g]}function rt(){if(!G)return;const{dataList:e,ascendAortaStyle:i,extracorporealCirculationStyle:o}=R.extracorporealCirculation||{};if(!(null==e?void 0:e.length))return;const n="extracorporealCirculation";K.set(n,[]);const r=Y+G;let a,l;function s(t){return t&&t>B&&t<M}function c(t){return void 0===t||""===t}e.forEach(((u,f)=>{const h=function(t){const{extracorporealCirculationStart:e,closeAscendAorta:i,openAscendAorta:o,extracorporealCirculationEnd:n}=t;let r,a,l,s;return e&&(r=A(e.time)),i&&(a=A(i.time)),o&&(l=A(o.time)),n&&(s=A(n.time)),[r,a,l,s]}(u);if(-1===h.findIndex((t=>t>0&&t<M)))return;let g;h.forEach(((m,v)=>{if(c(m))return;const x=h[v+1],y=h[v-1];if(s(m)||s(x)){const k=s(m)?m:B,C=s(x)?x:c(x)?null:$,w=s(y)?y:B,X={};if(v<h.length-1&&C&&(X.params=[k,C,r,[0,2].includes(v)?o:i],X.shadowObjs=nt(...X.params)),s(m)){const i=function(t){switch(t){case 0:return"extracorporealCirculationStart";case 1:return"closeAscendAorta";case 2:return"openAscendAorta";case 3:return"extracorporealCirculationEnd"}}(v),o=p(new Date,"yyyy-MM-dd HH:mm"),c=A(o),x=m<c&&s(c)?c:m,y=function(e,i){const o=new t.Line(e,{...i,stroke:"transparent",strokeWidth:5,hasControls:!1,hasBorders:!1,hoverCursor:"e-resize",lockMovementY:!0,originX:"center"});return tt(o),d.value.add(o),K.get("extracorporealCirculation").push(o),o}([m,Y,m,r],{origin:{dataIndex:f,dataKey:i,key:n,data:u[i],type:"other"},limitX:{x1:0===v?null!=a?a:B:w,x2:C||x,isCurrentTime:!C&&f===e.length-1},...[1,2,3].includes(v)?{leftShadowBox:g}:{},...[0,1,2].includes(v)?{rightShadowBox:X}:{}});v===h.length-1&&(a=m,l=y),0===v&&l&&(l.limitX.x2=k)}g=X}}))}))}function at(t){const{code:e}=t;F&&(e.includes("Enter")||e.includes("Esc"))&&(e.includes("Esc")&&(F.text=""),F.exitEditing(),d.value.discardActiveObject(F))}return function(){if(!(null==T?void 0:T.longLine)||!T.longLine.time)return;const{time:t,style:e}=T.longLine,i=A(t),n=o([i,0,i,Y],e);d.value.add(n)}(),function(){var t;if(!(null==(t=null==R?void 0:R.horizontal)?void 0:t.length))return;q=[];const{horizontal:i}=R,o=B-5;let n=W+H/2;i.forEach(((t,i)=>{const{title:r,titleStyle:a={},defaultAddValue:l,data:s=[]}=t,c=r&&e(r,{...a,originX:"right",left:o,top:n,origin:{defaultAddValue:l,dataIndex:i,type:"other",key:"horizontal",title:r,isMenu:!0},originLeft:o,originTop:n});var u;q.push({type:"other",title:r,key:"horizontal",dataIndex:i,dataList:s.map((t=>A(t.time))),y1:n-c.height/2,y2:n+c.height/2}),(u=c).on("moving",(()=>{u.set("originX","center"),S(u)?et(u):k.show=!1})),u.on("mouseup:before",(t=>{if(k.show=!1,0===t.e.button&&S(u))if(j(K.get("horizontal"),u.left,"key",O).includes(u.origin.key))P("repeat"),console.log("重复节点");else{const t={data:{time:L(u.left),value:u.origin.defaultAddValue},...u.origin};y("add",f(t,["isMenu"])),Q(t)}!function(t){t.setCoords().set({originX:"right",left:t.originLeft,top:t.originTop})}(u)})),d.value.add(c),n+=H}))}(),J(),N(),Z(),rt(),a.on((()=>{const t="horizontal",e=X(K.get(t));e.length>0?b((()=>{const i=function(t){const e=t.reduce(((t,e)=>{const{dataIndex:i}=e.origin;return t[i]=t[i]?t[i].concat(e.origin):[e.origin],t}),{});return h(Object.keys(e).map((t=>{const i=e[t];return R.horizontal[t].data.splice(i[0].index,i.length),i})))}(e);U({key:t}),y("remove",i)})):E()})),_.evented&&(window.addEventListener("keydown",at,!0),d.value.on("mouse:up",(e=>{var i,o,n,r;if(1===e.button){const{target:a,pointer:l={}}=e,{x:s=0,y:c=0}=l;if(!S({left:s,top:c}))return;if(!(null==q?void 0:q.length)||F)return;if(a&&"horizontal"!==(null==(i=a.origin)?void 0:i.key))return;let u="";if(a){if(a.moving)return;u=null==(r=null==(n=null==(o=a.origin)?void 0:o.data)?void 0:n.value)?void 0:r.toString()}const f=q.find((({y1:t,y2:e})=>c>=t&&c<=e));g(null==f?void 0:f.dataIndex)&&(F=new t.Textbox(u,{left:s,top:c,width:100,height:100,fontSize:18,objectCaching:!1,hasControls:!1,borderColor:"#000",editingBorderColor:"#000",backgroundColor:"#fff",fontFamily:"微软雅黑"}),F.otherListPointHeightRangeItem={...f,left:s,target:a},d.value.add(F),d.value.setActiveObject(F),F.enterEditing(),u&&F.setSelectionEnd(u.length))}})),d.value.on("selection:cleared",(({deselected:t})=>{var e;if(null==t?void 0:t.find((t=>t.otherListPointHeightRangeItem))){let{text:t}=F;const{otherListPointHeightRangeItem:i}=F;if(t=t.replace(/^\s+|\s+$/g,""),d.value.remove(F),F=null,!t)return;const{left:o,target:n}=i;if(n){if(t==(null==(e=n.origin)?void 0:e.data.value))return;const i={...n.origin,data:{...n.origin.data,value:t}};y("change",i),Q(i,"change")}else{const e={...m(i,["title","type","key","dataIndex"]),data:{time:L(o),value:t}};y("add",e),Q(e)}}}))),{clickMenu:function({item:t,target:e}){if(!e)return;const{type:i,_type:o}=t,n={...e.origin,type:o};y(i,n),"remove"===i&&Q(n,i)},handleKeydown:at}}export{y as useOther};
1
+ import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawPoint as e,drawText as i,drawLine as o,defaultLineStyle as n}from"../useDraw.js";import{useBirthProcessCumputedPoint as r}from"../useCumputedPoint.js";import{bus as a}from"../useEvent.js";import{useShadow as l}from"../useShadow.js";import{useCommon as s}from"../useCommon.js";import"vue";import{getIndex as c}from"../../utils/index.js";import{filter as d,cloneDeep as u,omit as f,flatten as h,isNumber as g,pick as m}from"lodash-es";import{format as p}from"date-fns";import{OTHER_MENU as v}from"../../constants/index.js";import"@vueuse/shared";import"naive-ui";import"./useTop.js";import"@vueuse/core";import"../../../../../shared/utils/index.js";const x=d(v,(t=>"add"!==t.type));function y(d,v,y,k,C,w,X,b,E){const{computedX:A,getXValue:L}=r(v),{getEqualXTypes:j,handleAddPrevent:P,isGridLimit:S,getPointEventProps:z}=s(d,y,v),{createShadowLines:I}=l(),{canvasWidth:M,other:T,yCellHeight:H,xCellWidth:O,endX:$,originX:B,originY:W,endY:Y,markHeight:D,event:_,topGridYCellHeight:V,extracorporealCirculationHeight:G}=v,K=new Map,R=u(T);let q=[],F=null;function J(){var o;if(!(null==(o=null==R?void 0:R.horizontal)?void 0:o.length))return;const n="horizontal";K.set(n,[]);const{horizontal:r}=R;let a=W+H/2;r.forEach(((o,r)=>{const{title:l,type:s,pointAttr:c={},textStyle:d={},data:u,showIcon:f=!0}=o;let h=null;u.forEach(((o,u)=>{const{time:g,value:m}=o,p=A(g);if(!ot(p))return;const v=[],x=f&&e(s,{...c,left:p,top:a});x&&v.push(x);const y=f?p+x.width/2+2:p,k=i([y,a],{value:m,...d,originX:"left"});v.push(k);const C=new t.Group(v,{lockMovementY:!0,objectCaching:!1,hasControls:!1,hasBorders:!1,hoverCursor:"pointer",...z()});Object.assign(C,{originLeft:p,iconHalfWidth:x?x.width/2:0,origin:{type:"other",key:n,dataIndex:r,index:u,data:o,title:l},limitX:{x1:B,x2:$-C.width}}),h&&(C.limitX.x1=h.left,h.limitX.x2=C.left,C.prevPoint=h,h.nextPoint=C),h=C,tt(C),K.get(n).push(C)})),a+=H})),d.value.add(...K.get(n))}function N(){var t;if(!(null==(t=null==R?void 0:R.vertical)?void 0:t.length))return;const i="vertical";K.set(i,[]);const{vertical:o}=R;o.forEach(((t,o)=>{const{show:n=!0,marginTop:r=0,textStyle:a={},data:l,time:s}=t,c=A(s);if(!n||!ot(c))return;const{lineHeight:d=H}=a;let u=W+r+d/2;l.forEach(((t,n)=>{const r=e(String(t.value),{...a,lockMovementY:!0,left:c,originX:"left",top:u,origin:{type:"other",key:i,dataIndex:o,index:n,data:t},...z()});u+=d,tt(r),K.get(i).push(r)}));const f=K.get(i).filter((t=>t.origin.dataIndex===o)),h=Math.max(...f.map((t=>t.width))),g=c>$-h;f.forEach(((t,e,i)=>{t.siblingPoints=i.filter((e=>e.origin.index!==t.origin.index)),t.maxTextWidth=h,g&&t.set("originX","right")}))})),d.value.add(...K.get(i))}function Q(t,e="add"){const{dataIndex:i,data:o,index:n,key:r,dataKey:a,time:l}=t,s=R[r],d=["mark","extracorporealCirculation"].includes(r)?s.dataList[i]:s[i];switch(e){case"remove":d.data.splice(n,1);break;case"change":if("mark"===r){d.list.splice(n,1);const t=s.dataList.find((t=>t.time===l));t?t.list.push(o):(s.dataList.push({time:l,list:[o]}),s.dataList.sort(((t,e)=>Date.parse(t.time)-Date.parse(e.time))))}else"extracorporealCirculation"===r?d[a]=o:d.data[n]=o;break;default:{const t=Array.isArray(o)?o[0].time:o.time,e=c(t,d.data),i=Array.isArray(o)?o:[o];d.data.splice(e,0,...i);break}}U(t)}function U(t){var e;const{key:i}=t;switch(null==(e=d.value)||e.remove(...K.get(i)),K.delete(i),i){case"horizontal":J();break;case"vertical":N();break;case"mark":Z();break;case"extracorporealCirculation":rt()}}function Z(){if(!D)return;const{title:t,titleStyle:o,pointAttr:n,dataList:r}=R.mark||{};if(!(null==r?void 0:r.length))return;const a="mark";K.set(a,[]);const l=i([B-5,Y+D/2],{value:t,...o,originX:"right"});d.value.add(l);const s=Y+D+G,c=Y+G;let u=0;const f={};r.forEach(((t,i)=>{const{time:o,list:r=[]}=t,l=A(o);if(!ot(l))return;let h=c+1;r.forEach(((t,o)=>{var r;const{style:g}=t,m=e((null==g?void 0:g.type)||"circleAndText",{...(null==g?void 0:g.pointAttr)||n,...t.text?{text:t.text}:{},left:l,top:c+10,origin:{data:t,key:"mark",type:"other",dataIndex:i,index:o}}),p=m.height;u&&l-u<=O&&(null==(r=f[`x_${u}`])||r.forEach((([t,e])=>{h+p>=s&&(h=Y-1),t<e&&h>=t&&h<e&&(h=e),t>e&&h>e&&h<=t&&(h=e)})));const{topObj:v,startTop:x,oldStartTop:y}=function(t,e){const i={};let o;if(t>Y){const r=t+e;i.y2=t+e/2,r>=s?n(Y-1):(o=t,t=r)}else n(t);function n(n){o=n,i.y2=n-e/2;t=n-e}return{topObj:i,startTop:t,oldStartTop:o}}(h,p);h=x,f[`x_${l}`]||(f[`x_${l}`]=[]),f[`x_${l}`].push([y,h]),m.set("top",v.y2),K.get(a).push(m),tt(m),d.value.add(m)})),u=l})),function(t){const e=t=>{var e,i;return null==(i=null==(e=t.origin)?void 0:e.data)?void 0:i.isStart},i=t.find((t=>e(t))),o=t.find((t=>!e(t)&&t.left>i.left)),n=t.filter((t=>!e(t)));t.forEach((t=>{const r={x1:B,x2:$};e(t)?(r.x2=o.left,t.otherPoints=n):(r.x1=i.left,t.startPoint=i),t.limitX=r}))}(K.get(a))}function tt(t){if(_.hovered&&(t.on("mouseover",(()=>{et(t)})),t.on("mouseout",(()=>{k.show=!1}))),t.lockMovementX&&t.lockMovementY)return;const{key:e}=t.origin,i=["mark","horizontal"].includes(e),o=["mark","vertical"].includes(e),n=["mark","extracorporealCirculation"].includes(e),r="extracorporealCirculation"===e;t.on("moving",(()=>{t.moving=!0,i?function(t){const e=t.origin.key,i="horizontal"===e;t.setCoords(),t.left<t.limitX.x1&&t.set("left",t.limitX.x1+(i?1:0));t.left>t.limitX.x2&&t.set("left",t.limitX.x2+(i?-1:0));if("mark"===e){t.top<W&&t.set("top",W);const e=Y+G+D-t.height/2;t.top>e&&t.set("top",e)}i&&(t.originLeft=t.left+t.iconHalfWidth)}(t):r?function(t){t.setCoords();const{left:e,limitX:i}=t,o=p(new Date,"yyyy-MM-dd HH:mm"),n=A(o);i.isCurrentTime&&i.x2<n&&n>0&&n<M&&(i.x2=n);e<i.x1&&t.set({x1:i.x1,x2:i.x1});e>i.x2&&t.set({x1:i.x2,x2:i.x2});it(t,"left"),it(t,"right")}(t):(w(t),function(t){const e=t.left+t.maxTextWidth>$?"right":"left";t.setCoords().set({originX:e}),t.siblingPoints.forEach((i=>i.setCoords().set({originX:e,left:t.left})))}(t)),_.hovered&&et(t)})),t.on("mouseup",(r=>{var a;if(k.show=!1,1===r.button){if(!t.moving)return;t.moving=!1,i&&function(t){var e,i;if("mark"===t.origin.key){if((null==(i=null==(e=t.origin)?void 0:e.data)?void 0:i.isStart)&&t.otherPoints)t.otherPoints.forEach((e=>{e.limitX.x1=t.left}));else{const e=t.startPoint.otherPoints.map((t=>t.left)),i=Math.min(...e);t.startPoint.limitX.x2=i}return}t.prevPoint&&(t.prevPoint.limitX.x2=t.left);t.nextPoint&&(t.nextPoint.limitX.x1=t.left)}(t);const e=L(null!=(a=t.originLeft)?a:t.left),r={...t.origin,...o?{time:e}:{data:{...t.origin.data,time:e}}};d.value.discardActiveObject(),y("change",r),n&&Q(r,"change")}3===r.button&&["horizontal","vertical"].includes(e)&&(C.point={x:t.left,y:t.top},C.show=!0,C.target=t,C.list=x.map((t=>({...t,renderItem:()=>t.label,_type:"other"}))))}))}function et(t){k.isTarget=!0,k.show=!0;const{key:e,data:i={}}=t.origin||{};let o=i.value;const n="extracorporealCirculation"===e||"mark"===e;k.point={x:t.left,y:n?t.top:t.top+V/2};const r=!t.origin.isMenu&&t.originLeft?t.originLeft:t.left,a=L(r);k.list=[`时间 ${a.slice(-5)}`],n&&("mark"===e&&(o=i.name),k.list.unshift(o+" ")),k.sourceData=[{type:"other",key:e,time:a,value:o}]}function it(t,e){const{shadowObjs:i,params:o}=t[`${e}ShadowBox`]||{};if(!i||!o)return;i.forEach((t=>d.value.remove(t)));o["left"===e?1:0]=t.left;const n=nt(...o);t[`${e}ShadowBox`]={shadowObjs:n,params:o}}function ot(t){return t>=B&&t<=$}function nt(...e){const[i,o,r,a]=e,{mode:l,style:s}=a,c=f(s,["angle","space"]),u=[[i,Y],[o,Y],[o,r],[i,r]],h=new t.Polygon(u.map((t=>({x:t[0],y:t[1]}))),{...n,...c,stroke:"transparent",..."slash"===l?{fill:"transparent"}:{}}),g=[];return["slash"].includes(l)&&g.push(...I(u,s.angle,s.space,c)),d.value.add(h,...g),K.get("extracorporealCirculation").push(h,...g),[h,...g]}function rt(){if(!G)return;const{dataList:e,ascendAortaStyle:i,extracorporealCirculationStyle:o}=R.extracorporealCirculation||{};if(!(null==e?void 0:e.length))return;const n="extracorporealCirculation";K.set(n,[]);const r=Y+G;let a,l;function s(t){return t&&t>B&&t<M}function c(t){return void 0===t||""===t}e.forEach(((u,f)=>{const h=function(t){const{extracorporealCirculationStart:e,closeAscendAorta:i,openAscendAorta:o,extracorporealCirculationEnd:n}=t;let r,a,l,s;return e&&(r=A(e.time)),i&&(a=A(i.time)),o&&(l=A(o.time)),n&&(s=A(n.time)),[r,a,l,s]}(u);if(-1===h.findIndex((t=>t>0&&t<M)))return;let g;h.forEach(((m,v)=>{if(c(m))return;const x=h[v+1],y=h[v-1];if(s(m)||s(x)){const k=s(m)?m:B,C=s(x)?x:c(x)?null:$,w=s(y)?y:B,X={};if(v<h.length-1&&C&&(X.params=[k,C,r,[0,2].includes(v)?o:i],X.shadowObjs=nt(...X.params)),s(m)){const i=function(t){switch(t){case 0:return"extracorporealCirculationStart";case 1:return"closeAscendAorta";case 2:return"openAscendAorta";case 3:return"extracorporealCirculationEnd"}}(v),o=p(new Date,"yyyy-MM-dd HH:mm"),c=A(o),x=m<c&&s(c)?c:m,y=function(e,i){const o=new t.Line(e,{...i,stroke:"transparent",strokeWidth:5,hasControls:!1,hasBorders:!1,hoverCursor:"e-resize",lockMovementY:!0,originX:"center"});return tt(o),d.value.add(o),K.get("extracorporealCirculation").push(o),o}([m,Y,m,r],{origin:{dataIndex:f,dataKey:i,key:n,data:u[i],type:"other"},limitX:{x1:0===v?null!=a?a:B:w,x2:C||x,isCurrentTime:!C&&f===e.length-1},...[1,2,3].includes(v)?{leftShadowBox:g}:{},...[0,1,2].includes(v)?{rightShadowBox:X}:{}});v===h.length-1&&(a=m,l=y),0===v&&l&&(l.limitX.x2=k)}g=X}}))}))}function at(t){const{code:e}=t;F&&(e.includes("Enter")||e.includes("Esc"))&&(e.includes("Esc")&&(F.text=""),F.exitEditing(),d.value.discardActiveObject(F))}return function(){if(!(null==T?void 0:T.longLine)||!T.longLine.time)return;const{time:t,style:e}=T.longLine,i=A(t),n=o([i,0,i,Y],e);d.value.add(n)}(),function(){var t;if(!(null==(t=null==R?void 0:R.horizontal)?void 0:t.length))return;q=[];const{horizontal:i}=R,o=B-5;let n=W+H/2;i.forEach(((t,i)=>{const{title:r,titleStyle:a={},defaultAddValue:l,data:s=[]}=t,c=r&&e(r,{...a,originX:"right",left:o,top:n,origin:{defaultAddValue:l,dataIndex:i,type:"other",key:"horizontal",title:r,isMenu:!0},originLeft:o,originTop:n});var u;q.push({type:"other",title:r,key:"horizontal",dataIndex:i,dataList:s.map((t=>A(t.time))),y1:n-c.height/2,y2:n+c.height/2}),(u=c).on("moving",(()=>{u.set("originX","center"),S(u)?et(u):k.show=!1})),u.on("mouseup:before",(t=>{if(k.show=!1,0===t.e.button&&S(u))if(j(K.get("horizontal"),u.left,"key",O).includes(u.origin.key))P("repeat"),console.log("重复节点");else{const t={data:{time:L(u.left),value:u.origin.defaultAddValue},...u.origin};y("add",f(t,["isMenu"])),Q(t)}!function(t){t.setCoords().set({originX:"right",left:t.originLeft,top:t.originTop})}(u)})),d.value.add(c),n+=H}))}(),J(),N(),Z(),rt(),a.on((()=>{const t="horizontal",e=X(K.get(t));e.length>0?b((()=>{const i=function(t){const e=t.reduce(((t,e)=>{const{dataIndex:i}=e.origin;return t[i]=t[i]?t[i].concat(e.origin):[e.origin],t}),{});return h(Object.keys(e).map((t=>{const i=e[t];return R.horizontal[t].data.splice(i[0].index,i.length),i})))}(e);U({key:t}),y("remove",i)})):E()})),_.evented&&(window.addEventListener("keydown",at,!0),d.value.on("mouse:up",(e=>{var i,o,n,r;if(1===e.button){const{target:a,pointer:l={}}=e,{x:s=0,y:c=0}=l;if(!S({left:s,top:c}))return;if(!(null==q?void 0:q.length)||F)return;if(a&&"horizontal"!==(null==(i=a.origin)?void 0:i.key))return;let u="";if(a){if(a.moving)return;u=null==(r=null==(n=null==(o=a.origin)?void 0:o.data)?void 0:n.value)?void 0:r.toString()}const f=q.find((({y1:t,y2:e})=>c>=t&&c<=e));g(null==f?void 0:f.dataIndex)&&(F=new t.Textbox(u,{left:s,top:c,width:100,height:100,fontSize:18,objectCaching:!1,hasControls:!1,borderColor:"#000",editingBorderColor:"#000",backgroundColor:"#fff",fontFamily:"微软雅黑"}),F.otherListPointHeightRangeItem={...f,left:s,target:a},d.value.add(F),d.value.setActiveObject(F),F.enterEditing(),u&&F.setSelectionEnd(u.length))}})),d.value.on("selection:cleared",(({deselected:t})=>{var e;if(null==t?void 0:t.find((t=>t.otherListPointHeightRangeItem))){let{text:t}=F;const{otherListPointHeightRangeItem:i}=F;if(t=t.replace(/^\s+|\s+$/g,""),d.value.remove(F),F=null,!t)return;const{left:o,target:n}=i;if(n){if(t==(null==(e=n.origin)?void 0:e.data.value))return;const i={...n.origin,data:{...n.origin.data,value:t}};y("change",i),Q(i,"change")}else{const e={...m(i,["title","type","key","dataIndex"]),data:{time:L(o),value:t}};y("add",e),Q(e)}}}))),{clickMenu:function({item:t,target:e}){if(!e)return;const{type:i,_type:o}=t,n={...e.origin,type:o};y(i,n),"remove"===i&&Q(n,i)},handleKeydown:at}}export{y as useOther};
@@ -210,6 +210,7 @@ declare const FieldEditor: SFCWithInstall<import("vue").DefineComponent<{}, {
210
210
  fixMemoLeak: {
211
211
  type: BooleanConstructor;
212
212
  };
213
+ lazyRender: BooleanConstructor;
213
214
  }, {
214
215
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
215
216
  fieldList: {
@@ -412,6 +413,7 @@ declare const FieldEditor: SFCWithInstall<import("vue").DefineComponent<{}, {
412
413
  fixMemoLeak: {
413
414
  type: BooleanConstructor;
414
415
  };
416
+ lazyRender: BooleanConstructor;
415
417
  }>> & {
416
418
  onFormChange?: ((...args: any[]) => any) | undefined;
417
419
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -586,6 +588,8 @@ declare const FieldEditor: SFCWithInstall<import("vue").DefineComponent<{}, {
586
588
  linebarTextDirection: "horizontal" | "vertical";
587
589
  autoWidth: number | boolean;
588
590
  feedbackType: "default" | "tooltip";
591
+ fixMemoLeak: boolean;
592
+ lazyRender: boolean;
589
593
  }>) => Record<string, import("@formily/json-schema").Stringify<{
590
594
  [key: symbol]: any;
591
595
  [key: `x-${string}`]: any;
@@ -972,6 +976,7 @@ declare const FieldEditor: SFCWithInstall<import("vue").DefineComponent<{}, {
972
976
  fixMemoLeak: {
973
977
  type: BooleanConstructor;
974
978
  };
979
+ lazyRender: BooleanConstructor;
975
980
  }>> & {
976
981
  onFormChange?: ((...args: any[]) => any) | undefined;
977
982
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -1003,9 +1008,10 @@ declare const FieldEditor: SFCWithInstall<import("vue").DefineComponent<{}, {
1003
1008
  linebarTextDirection: "horizontal" | "vertical";
1004
1009
  autoWidth: number | boolean;
1005
1010
  feedbackType: "default" | "tooltip";
1011
+ fixMemoLeak: boolean;
1012
+ lazyRender: boolean;
1006
1013
  operationalFormInit: boolean;
1007
1014
  incrementalRender: boolean;
1008
- fixMemoLeak: boolean;
1009
1015
  }>;
1010
1016
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
1011
1017
  export default FieldEditor;