cnhis-design-vue 3.2.2-beta.1 → 3.2.2-beta.7

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 (79) hide show
  1. package/es/components/biunique-chat/index.d.ts +738 -562
  2. package/es/components/biunique-chat/index.js +1 -1
  3. package/es/components/biunique-chat/src/Index.vue.d.ts +1201 -0
  4. package/es/components/biunique-chat/src/Index.vue.js +1 -0
  5. package/es/components/biunique-chat/src/Index.vue2.js +1 -0
  6. package/es/components/biunique-chat/src/api/index.d.ts +2 -5
  7. package/es/components/biunique-chat/src/api/index.js +1 -1
  8. package/es/components/biunique-chat/src/components/ChatFile.vue.d.ts +241 -0
  9. package/es/components/biunique-chat/src/components/ChatFile.vue.js +1 -0
  10. package/es/components/biunique-chat/src/components/ChatFile.vue2.js +1 -0
  11. package/es/components/biunique-chat/src/components/ChatFooter.vue.d.ts +3 -5
  12. package/es/components/biunique-chat/src/components/ChatFooter.vue2.js +1 -1
  13. package/es/components/biunique-chat/src/components/ChatHeader.vue.d.ts +639 -0
  14. package/es/components/biunique-chat/src/components/ChatHeader.vue2.js +1 -1
  15. package/es/components/biunique-chat/src/components/ChatMain.vue.d.ts +61 -5
  16. package/es/components/biunique-chat/src/components/ChatMain.vue2.js +1 -1
  17. package/es/components/biunique-chat/src/components/ChatRecord.vue.d.ts +101 -0
  18. package/es/components/biunique-chat/src/components/ChatRecord.vue.js +1 -0
  19. package/es/components/biunique-chat/src/components/ChatRecord.vue2.js +1 -0
  20. package/es/components/biunique-chat/src/components/ChatSet.vue.d.ts +246 -0
  21. package/es/components/biunique-chat/src/components/ChatSet.vue.js +1 -0
  22. package/es/components/biunique-chat/src/components/ChatSet.vue2.js +1 -0
  23. package/es/components/biunique-chat/src/components/PersonProfile.vue.d.ts +59 -0
  24. package/es/components/biunique-chat/src/components/PersonProfile.vue.js +1 -0
  25. package/es/components/biunique-chat/src/components/PersonProfile.vue2.js +1 -0
  26. package/es/components/biunique-chat/src/components/SiderList.vue.d.ts +18 -28
  27. package/es/components/biunique-chat/src/components/SiderList.vue2.js +1 -1
  28. package/es/components/biunique-chat/src/hooks/useState.d.ts +7 -0
  29. package/es/components/biunique-chat/src/hooks/useState.js +1 -0
  30. package/es/components/biunique-chat/src/types/index.d.ts +10 -0
  31. package/es/components/biunique-chat/src/types/index.js +1 -0
  32. package/es/components/biunique-chat/src/utils/index.d.ts +6 -0
  33. package/es/components/biunique-chat/src/utils/index.js +1 -0
  34. package/es/components/biunique-chat/style/iconfont.ttf +0 -0
  35. package/es/components/biunique-chat/style/index.css +1 -1
  36. package/es/components/button-print/src/utils/print.d.ts +1 -0
  37. package/es/components/button-print/src/utils/print.js +1 -1
  38. package/es/components/callback/src/components/render/popupMaps.d.ts +2 -0
  39. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  40. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
  41. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  42. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  43. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  44. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  45. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  46. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  47. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  48. package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -1
  49. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  50. package/es/components/form-render/src/hooks/useSelectedSetting.d.ts +3 -4
  51. package/es/components/form-render/src/hooks/useSelectedSetting.js +1 -1
  52. package/es/components/iho-table/index.d.ts +2 -0
  53. package/es/components/iho-table/src/IhoTable.vue.d.ts +2 -0
  54. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -0
  55. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  56. package/es/components/iho-table/src/plugins/headerPlugin.js +1 -1
  57. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/index.d.ts +5 -0
  58. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useHeaderCSS.js +1 -1
  59. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useHoverColumn.js +1 -1
  60. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/renderer.js +1 -1
  61. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/types.d.ts +1 -0
  62. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.d.ts +1 -0
  63. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +1 -1
  64. package/es/components/iho-table/src/types/index.d.ts +1 -0
  65. package/es/components/iho-table/src/utils/index.d.ts +1 -1
  66. package/es/components/iho-table/src/utils/index.js +1 -1
  67. package/es/components/index.css +1 -1
  68. package/es/components/step-notice/index.d.ts +9 -0
  69. package/es/components/step-notice/src/StepNotice.vue.d.ts +9 -0
  70. package/es/components/step-notice/src/StepNotice.vue2.js +1 -1
  71. package/es/components/step-notice/src/components/NoticeItem.vue.d.ts +3 -0
  72. package/es/components/step-notice/src/components/NoticeItem.vue2.js +1 -1
  73. package/es/components/step-notice/src/types.d.ts +1 -0
  74. package/es/components/step-notice/style/index.css +1 -1
  75. package/es/shared/package.json.js +1 -1
  76. package/package.json +2 -2
  77. package/es/components/biunique-chat/src/BiuniqueChat.vue.d.ts +0 -1005
  78. package/es/components/biunique-chat/src/BiuniqueChat.vue.js +0 -1
  79. package/es/components/biunique-chat/src/BiuniqueChat.vue2.js +0 -1
@@ -0,0 +1 @@
1
+ import{inject as s}from"vue";import{formatTime as e}from"../utils/index.js";function t(){const t=s("state"),n=s("stompClient");return{state:t,setCurrentSessionItem:function(s){Object.assign(t.currentSessionItem,s),t.sessionKey!==t.currentSessionItem.sessionKey&&(t.sessionKey=t.currentSessionItem.sessionKey,t.msgList=[])},setMsgList:function(s=[]){t.msgList=s.map((s=>{var t;return{...s,__time:e(s.sendTime).msgTime,__content:null==(t=s.content)?void 0:t.msg}}))},stompClient:n}}export{t as useState};
@@ -0,0 +1,10 @@
1
+ export declare namespace ChatType {
2
+ type UserInfo = {
3
+ chatType: number | string;
4
+ orgId: string;
5
+ userId: string;
6
+ name: string;
7
+ userType: string;
8
+ source: number | string;
9
+ };
10
+ }
@@ -0,0 +1,6 @@
1
+ import { AnyObject } from '../../../../shared/types';
2
+ export declare function formatTime(dateStr: string): {
3
+ siderMsgTime: any;
4
+ msgTime: any;
5
+ };
6
+ export declare function listSort(list: AnyObject[]): AnyObject[];
@@ -0,0 +1 @@
1
+ import{isToday as e,format as t,isYesterday as m}from"date-fns";import{cloneDeep as n}from"lodash-es";function i(n){const i=new Date(n);let o,p;if(e(i))o=p=t(i,"HH:mm");else{o=m(i)?"昨天":t(i,"MM-dd");const e=i.getFullYear(),n=(new Date).getFullYear();p=t(i,e<n?"yyyy年M月d日 HH:mm":"M月d日 HH:mm")}return{siderMsgTime:o,msgTime:p}}function o(e){return n(e).sort(((e,t)=>e.topping&&!t.topping?-1:!e.topping&&t.topping?1:new Date(t.updatedTime).getTime()-new Date(e.updatedTime).getTime()))}export{i as formatTime,o as listSort};
@@ -1 +1 @@
1
- .c-multi-chat *{box-sizing:border-box}.c-multi-chat .n-avatar{background-color:#5585f5}.c-multi-chat .n-spin-body{margin:auto}.c-multi-chat .sider-list__box{margin-top:15px}.c-multi-chat .sider-list__box__item{background-color:#fff;border-bottom:1px solid #ebebeb;display:flex;padding:12px 5px}.c-multi-chat .sider-list__box__item.active,.c-multi-chat .sider-list__box__item:active,.c-multi-chat .sider-list__box__item:focus,.c-multi-chat .sider-list__box__item:hover{background-color:#ebebeb}.c-multi-chat .sider-list__box__item .avatar-right{flex:1;margin-left:10px}.c-multi-chat .sider-list__box__item .avatar-right.hidden{display:none}.c-multi-chat .sider-list__box__item .avatar-right .name{display:flex}.c-multi-chat .sider-list__box__item .avatar-right .name h4{flex:1}.c-multi-chat .sider-list__box__item .avatar-right .msg-tip{display:flex}.c-multi-chat .sider-list__box__item .avatar-right .msg-tip__content{flex:1;width:0}.c-multi-chat .sider-list__box__item .avatar-right .msg-tip__content>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.c-multi-chat .sider-list__box__item .avatar-right .msg-tip p,.c-multi-chat .sider-list__box__item .avatar-right .name span{color:#999}.c-multi-chat .chat-wrapper .n-layout-scroll-container{display:flex;flex-flow:column nowrap;overflow:hidden}.c-multi-chat .chat-header{height:60px;padding:0 10px}.c-multi-chat .chat-header,.c-multi-chat .chat-header__left{align-items:center;display:flex}.c-multi-chat .chat-header__left .name{margin-left:10px}.c-multi-chat .chat-main{border-bottom:1px solid #e5e5e5;border-top:1px solid #e5e5e5;flex:1;overflow-y:scroll;padding:0 10px}.c-multi-chat .chat-main::-webkit-scrollbar{width:5px}.c-multi-chat .chat-main::-webkit-scrollbar-thumb{background:rgba(0,0,0,.25);border-radius:5px}.c-multi-chat .chat-main .message-item{margin-bottom:16px}.c-multi-chat .chat-main .message-item .time{color:#666;margin-bottom:16px;text-align:center}.c-multi-chat .chat-main .message-item .message-box{display:flex}.c-multi-chat .chat-main .message-item .message-box .content{background:#ebebeb;border-radius:8px;color:#000;font-size:14px;line-height:20px;margin:0;max-width:500px;padding:10px;text-align:left;word-break:break-word}.c-multi-chat .chat-main .message-item .message-box .content p{margin:0}.c-multi-chat .chat-main .message-item .message-box.left{justify-content:flex-start}.c-multi-chat .chat-main .message-item .message-box.left .content{border-top-left-radius:0;margin-left:10px}.c-multi-chat .chat-main .message-item .message-box.right{justify-content:flex-end}.c-multi-chat .chat-main .message-item .message-box.right .content{border-top-right-radius:0;margin-right:10px}.c-multi-chat .chat-footer{height:170px;position:relative}.c-multi-chat .chat-footer .input-box{cursor:text;height:114px;outline:none;overflow-x:hidden;overflow-y:scroll;padding:10px 16px;word-break:break-word}.c-multi-chat .chat-footer .input-box::-webkit-scrollbar{width:5px}.c-multi-chat .chat-footer .btn-box{align-items:center;bottom:0;display:flex;height:56px;justify-content:flex-end;padding-right:20px;position:absolute;right:0}.c-multi-chat .chat-footer .btn-box .tip{color:#a6a6a6;margin-right:20px}
1
+ .c-chat-dialog{box-sizing:border-box;padding:15px;width:640px!important}.c-chat-dialog__content{height:600px}.c-chat-dialog__content.c-chat-image-wrapper{background:#f2f2f2;box-sizing:border-box;overflow-y:auto;padding:0 15px;width:100%}.c-chat-dialog__content.c-chat-image-wrapper .image-item .label{display:block;padding:8px 0}.c-chat-dialog__content.c-chat-image-wrapper .image-item .image-box{background:#fff;display:flex;flex-flow:row wrap;gap:8px 8px;padding:8px}.c-chat-dialog__content.c-chat-file-wrapper{display:flex;flex-flow:column nowrap}.c-chat-dialog__content.c-chat-file-wrapper .file-list-box{flex:1;margin-top:10px;overflow-y:auto}.c-chat-dialog__content.c-chat-file-wrapper .file-list-box .file-item{align-items:center;display:flex;padding:10px}.c-chat-dialog__content.c-chat-file-wrapper .file-list-box .file-item .text{flex:1;margin-left:8px}.c-chat-dialog__content.c-chat-file-wrapper .file-list-box .file-item .text span{display:block}.c-chat-dialog__content.c-chat-file-wrapper .file-list-box .file-item .text span.detail{color:#666;font-size:12px}.c-chat-dialog__content.c-chat-file-wrapper .file-list-box .file-item .opt-box{display:none}.c-chat-dialog__content.c-chat-file-wrapper .file-list-box .file-item .opt-box .n-icon{margin-left:8px}.c-chat-dialog__content.c-chat-file-wrapper .file-list-box .file-item:hover{background-color:#f5f5f5}.c-chat-dialog__content.c-chat-file-wrapper .file-list-box .file-item:hover .opt-box{display:block}.c-chat-dialog__content.c-chat-record-wrapper{display:flex;flex-flow:column nowrap}.c-chat-dialog__content.c-chat-record-wrapper .n-input{background-color:#f2f2f2}.c-chat-dialog__content.c-chat-record-wrapper .chat-record-box{display:flex;flex:1;margin-top:10px}.c-chat-dialog__content.c-chat-record-wrapper .chat-record-box__content{background-color:#f2f2f2;box-sizing:border-box;flex:1;height:100%;overflow-y:auto;padding:10px}.c-chat-dialog__content.c-chat-record-wrapper .chat-record-box__content .content-item{background-color:#fff;display:flex;margin-bottom:10px;padding:10px}.c-chat-dialog__content.c-chat-record-wrapper .chat-record-box__content .content-item .msg-box{flex:1;margin-left:10px}.c-chat-dialog__content.c-chat-record-wrapper .chat-record-box__content .content-item .msg-box .name-and-time{display:flex;justify-content:space-between}.c-chat-dialog__content.c-chat-record-wrapper .chat-record-box__content .content-item .msg-box .name-and-time span{color:#666;font-size:12px}.c-chat-dialog__content.c-chat-record-wrapper .chat-record-box__filter{box-sizing:border-box;padding:0 10px;width:200px}.c-chat-dialog__content.c-chat-record-wrapper .chat-record-box__filter .filter-title{display:block}.c-chat-dialog__content.c-chat-record-wrapper .chat-record-box__filter .filter-item{margin-top:10px}.c-chat-dialog__content.c-chat-record-wrapper .chat-record-box__filter .filter-item .label{display:block}.c-chat-dialog__content.c-chat-record-wrapper .chat-record-box__filter .filter-item .time-target{background-color:#f2f2f2;padding:0 10px}.c-chat-dialog__content.c-chat-record-wrapper .chat-record-box__filter .filter-item .time-target__item{align-items:center;border-bottom:1px solid #c6c6c6;display:flex;min-height:42px}.c-chat-dialog__content.c-chat-record-wrapper .chat-record-box__filter .filter-item .time-target__item .n-date-picker{display:none}.c-chat-dialog__content.c-chat-record-wrapper .chat-record-box__filter .filter-item .time-target__item:last-child{border-bottom:none}.c-biunique-chat{height:100%}@font-face{font-family:iconfont;src:url(iconfont.ttf) format("truetype")}.c-biunique-chat .chat--iconfont{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:iconfont!important;font-size:16px;font-style:normal}.c-biunique-chat .chat--icon-list-search:before{content:"\e637"}.c-biunique-chat .chat--icon-image:before{content:"\e92e"}.c-biunique-chat .chat--icon-set:before{content:"\e62b"}.c-biunique-chat .chat--icon-folder:before{content:"\e701"}.c-biunique-chat .box-shadow{position:relative}.c-biunique-chat .box-shadow:after{bottom:0;box-shadow:0 1px 3px 0 rgba(0,0,0,.3);content:"";height:1px;left:0;position:absolute;width:100%;z-index:1}.c-biunique-chat *{box-sizing:border-box}.c-biunique-chat .n-avatar{background-color:#5585f5}.c-biunique-chat .n-spin-body{margin:auto}.c-biunique-chat .sider-list{border:1px solid #d5d5d5;box-sizing:border-box}.c-biunique-chat .sider-list__filter{align-items:center;column-gap:8px;display:flex;height:48px;padding:0 8px}.c-biunique-chat .sider-list__filter .n-tag{height:26px}.c-biunique-chat .sider-list__filter .n-tag__content{font-size:12px}.c-biunique-chat .sider-list__box__item{background-color:#fff;border-bottom:1px solid #ebebeb;display:flex;padding:12px 5px}.c-biunique-chat .sider-list__box__item.active,.c-biunique-chat .sider-list__box__item:active,.c-biunique-chat .sider-list__box__item:focus,.c-biunique-chat .sider-list__box__item:hover{background-color:#ebebeb}.c-biunique-chat .sider-list__box__item .avatar-right{flex:1;margin-left:10px}.c-biunique-chat .sider-list__box__item .avatar-right .name{display:flex}.c-biunique-chat .sider-list__box__item .avatar-right .name h4{flex:1}.c-biunique-chat .sider-list__box__item .avatar-right .msg-tip{display:flex}.c-biunique-chat .sider-list__box__item .avatar-right .msg-tip__content{flex:1;width:0}.c-biunique-chat .sider-list__box__item .avatar-right .msg-tip__content>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.c-biunique-chat .sider-list__box__item .avatar-right .msg-tip p,.c-biunique-chat .sider-list__box__item .avatar-right .name span{color:#999}.c-biunique-chat .chat-wrapper .n-layout-scroll-container{border:1px solid #d5d5d5;border-left:none;display:flex;flex-flow:column nowrap;overflow:hidden}.c-biunique-chat .chat-header{height:48px;justify-content:space-between;padding:0 10px}.c-biunique-chat .chat-header,.c-biunique-chat .chat-header__left{align-items:center;display:flex}.c-biunique-chat .chat-header__left .name{margin-left:10px}.c-biunique-chat .chat-header__right .chat--iconfont{font-size:18px;margin-left:18px}.c-biunique-chat .chat-main{background:#f5f5f5;border-bottom:1px solid #d5d5d5;flex:1;overflow-y:auto;padding:0 10px}.c-biunique-chat .chat-main::-webkit-scrollbar{width:5px}.c-biunique-chat .chat-main::-webkit-scrollbar-thumb{background:rgba(0,0,0,.25);border-radius:5px}.c-biunique-chat .chat-main .message-item{margin-bottom:22px}.c-biunique-chat .chat-main .message-item .time{color:#666;font-size:12px;margin-bottom:16px!important;text-align:center}.c-biunique-chat .chat-main .message-item .message-box{display:flex}.c-biunique-chat .chat-main .message-item .message-box .n-avatar{flex-shrink:0}.c-biunique-chat .chat-main .message-item .message-box .content{background:#fff;border-radius:8px;color:#000;font-size:14px;line-height:20px;margin:0;max-width:500px;padding:10px;position:relative;text-align:left;word-break:break-word}.c-biunique-chat .chat-main .message-item .message-box .content p{margin:0}.c-biunique-chat .chat-main .message-item .message-box .content:before{color:#666;content:"";font-size:12px;position:absolute;top:-20px;white-space:nowrap}.c-biunique-chat .chat-main .message-item .message-box:hover .content:before{content:attr(data-time)}.c-biunique-chat .chat-main .message-item .message-box.left{justify-content:flex-start}.c-biunique-chat .chat-main .message-item .message-box.left .content{border-top-left-radius:0;margin:0 48px 0 10px}.c-biunique-chat .chat-main .message-item .message-box.left:hover .content:before{left:0}.c-biunique-chat .chat-main .message-item .message-box.right{justify-content:flex-end}.c-biunique-chat .chat-main .message-item .message-box.right .content{border-top-right-radius:0;margin:0 10px 0 48px}.c-biunique-chat .chat-main .message-item .message-box.right:hover .content:before{right:0}.c-biunique-chat .chat-footer{height:170px;position:relative}.c-biunique-chat .chat-footer .input-box{cursor:text;height:114px;outline:none;overflow-x:hidden;overflow-y:scroll;padding:10px 16px;word-break:break-word}.c-biunique-chat .chat-footer .input-box::-webkit-scrollbar{width:5px}.c-biunique-chat .chat-footer .btn-box{align-items:center;bottom:0;display:flex;height:56px;justify-content:flex-end;padding-right:20px;position:absolute;right:0}.c-biunique-chat .chat-footer .btn-box .tip{color:#a6a6a6;margin-right:20px}.c-biunique-chat .chat-set-wrapper .item{align-items:center;border-bottom:1px solid #efefef;display:flex;min-height:64px;padding:10px 0;width:100%}.c-biunique-chat .chat-set-wrapper .item.user-info{background-color:#f5f5f5;padding:10px 12px}.c-biunique-chat .chat-set-wrapper .item__right{margin-left:auto}.c-biunique-chat__popover .n-popover{border-radius:14px;overflow:hidden;padding:unset!important}.c-biunique-chat__popover .n-popover .n-popover__content{padding:unset!important}.c-biunique-chat__popover .n-popover .n-popover__content .popover-person{background-color:#f5f5f5;box-sizing:border-box;column-gap:8px;display:flex;height:400px;width:538px}.c-biunique-chat__popover .n-popover .n-popover__content .popover-person>div{flex:1}.c-biunique-chat__popover .n-popover .n-popover__content .popover-person__left{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAABrCAYAAABe1p/bAAAAAXNSR0IArs4c6QAAIABJREFUeF7tnUuPZVl21/e9EZHvyqxHd7vbllMghGDIFAvBB4AJ4iuA7DaysS1bwAeAj+EZM88YMmHCBAlZGFttjN1Umq7qru56ZGdVvjPiov8667fjf1bsc++NzMhnO6RU3nvPOfucs/d6/tdjr9rOv83q8PvtH52s2z9dnbRfW63a322tfbBp7bIuPTps7Zc/bO3+49aenewc7I054bC19qy1tlm1dimfarNp7WTV2smmtaNVa/q+0v/523rVWjtp7XDV2nF5Ex3Tdfw/etGDNl2nsZ/mPfj/0aY1Hdf1q8103uVVa5evtXb8bNM2z1Ztc7Bpq+NVWx1u2vpE91u1zWrTVnrAuHZz5rn0u8aNgfW+eqn19G4aY7NaxTvGw7dVHFutW3uW765n0aV6noO2aavVSlMwna4rdN56/j3uk+/B/9NDtHbjSmtXV6396U8merm0au1JjnV40tqzdWvrTWtPNU/52LrXyUFr6+PpWbRux5qbXK94oLxO6/pEr7Fp7XGeU9dCa6zjMa4+T1PT76kx9LvuE1On51tPa6/fZ3+iBx3L8/T8QQc2tr4zpt5RfzyD7hHHtP4HrT09OX2euK/96VzNF8+tMTQez3RlPdHWz745XQ9dftzaH9bHtmE3q/br7Z8frdp/OFm3v18ni+/feb+1ywetPXxyOjFL577pv0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1/fPQYWvSav7E/byTisoIR/eO/dIzquevuZhYPJ7zF5RjAfZrQfm3QbiLs1Yj2akaxZuxi5L6RzT/7ad+vIYna6v1niw5k3T+MDDT6DZW/3wQeO/bRPv2h0rIP4vsXeZhtcyHlwJBcBO1zFeBfFCWwFGbaYmklLQCLvu8xeE/sZBaw8enC9La6TdXgfxgYuQY4Fm1+812w4Xrh5jPj0ByaMTvNfzaPS/0ebT7L1URp8tUKY2wmgg1DW9lu8wjRNvlez7SPoK+gWRWaN+CRt91x4IZHvpnpj0kSqZGt3BOs+qW2pvRQw+erMRDiy5+Wot/PjpKQD3Opj1Iu5JLT/rGlEK6uxL1Vusre19p2u91RcaHvR+Wyr1VoGXlpxSXX/R/14Jo6MFSU11kAo/PaROgmZI9grWjRa8gnEVHR8tsDNmz3KzDMCZL0d5rMXtQXX7ziEJAEa4zvrFV7clEjcss0/mrO5/j0aPbzk1hhDNYhnAT/q5IwD0ijBydOPJSEm3etL355iHRJmeSheeTIMiCdReuMvfMPmr0+hOv4GA597kzuT46EvVUUtxU5BYv4eHe0a8E7hM+tAw/azAwnbW7J1fU+O7r03XFtdGxOD1PxodYvckGY2jcNq+ANzbIgPCHbLWY2TNjUx6yqFn60Wmo7WdxgIgXIrQcCFC+K0LAeEn2l32F9gvd5p5ZRrdb9pR40yYcB99ZrprG2Q6m2YnkIq6j+qaK1NABEj7UVivuhlodVopd22SiSKRmGM58ZjmmPRxfj4/BAmYKBfgytGk/R+xb9rbwsl7PidrDNNj1fVkJvPhGbIDtRl6U+RCf7H1dvmr1p2b8OAGf6PNTyfttTA6t0f6A2CB2GLe+XmzunPLvV4C7apgqee5796BJOsMGz5kSIbsfe4Vbel70rihEmFPn8UPLdlfMksvHUwm+7uucWB4ml3A8CEQLUTndQKsP/Xx9AgExCMpKqwwwzx65qUyFn8B01y3yWAx+v8H2WefoJCBmLQAAAAASUVORK5CYII=");display:flex;flex-flow:column nowrap}.c-biunique-chat__popover .n-popover .n-popover__content .popover-person__left .profile{background-color:#fff;display:flex;flex:1;flex-flow:column nowrap;margin-top:107px;padding:26px 15px;position:relative}.c-biunique-chat__popover .n-popover .n-popover__content .popover-person__left .profile .n-avatar{left:30px;position:absolute;top:-50px}.c-biunique-chat__popover .n-popover .n-popover__content .popover-person__left .profile .edit-avatar{background-color:#eee;height:30px;left:98px;position:absolute;top:22px;width:30px}.c-biunique-chat__popover .n-popover .n-popover__content .popover-person__left .profile__text{flex:1}.c-biunique-chat__popover .n-popover .n-popover__content .popover-person__left .profile__text h4{font-size:20px;line-height:28px;margin:40px 0 0;word-break:break-all}.c-biunique-chat__popover .n-popover .n-popover__content .popover-person__right{background-color:#fff;padding:26px 15px}.c-biunique-chat__popover .n-popover .n-popover__content .popover-person__right .info-item{align-items:center;display:flex;margin-bottom:15px}.c-biunique-chat__popover .n-popover .n-popover__content .popover-person__right .info-item:last-child{margin-bottom:0}.c-biunique-chat__popover .n-popover .n-popover__content .popover-person__right .info-item .label{color:rgba(0,0,0,.6);flex:0 0 77px}.c-biunique-chat__popover .n-popover .n-popover__content .popover-person__right .info-item .content{align-items:center;display:flex;flex:1}.c-biunique-chat__popover .n-popover .n-popover__content .popover-person__right .info-item .content .n-icon{cursor:pointer}.c-biunique-chat__popover .n-popover .n-popover__content .large-avatar{align-items:center;background-color:#e4eefe;display:flex;height:380px;justify-content:center;position:relative;width:380px}.c-biunique-chat__popover .n-popover .n-popover__content .large-avatar .n-button{background-color:rgba(0,0,0,.3);position:absolute;right:10px;top:10px}.c-biunique-chat__popover .n-popover .n-popover__content .large-avatar .n-button:hover{background-color:rgba(0,0,0,.5)}
@@ -56,6 +56,7 @@ export declare class Print {
56
56
  _queryProxyOrigin(): Promise<void>;
57
57
  _queryPrintFile(formatId: string, params?: string): Promise<any>;
58
58
  paramsSerializer(params: AnyObject): AnyObject;
59
+ getIReportFormatId: (isIReport: boolean, formatId: string) => string;
59
60
  _queryPrintForBase64(templateId: string, formatId: string, params: string | undefined, authorizationKey: String): Promise<any>;
60
61
  _queryPrintForPdf(templateId: string, formatId: string, params: string | undefined, authorizationKey: String): Promise<any>;
61
62
  _browserPrint(result: AnyObject, mode: string): Promise<string | void>;
@@ -1 +1 @@
1
- import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as s}from"./dialog.js";import{getFileUrl as r,useBrowserPrint as n,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{uuidGenerator as l}from"../../../../shared/utils/index.js";import{format as c}from"date-fns";import{io as h}from"socket.io-client";const m=t.create({timeout:6e4,withCredentials:!1}),d=`${window.location.protocol}//${window.location.host}`,u=`${d}/fdp-api/print/assembly/printIReport`,p=`${d}/bi-api/reprot/print/open/client/printIReportForBase64`,f=`${d}/bi-api/reprot/print/open/client/previewIReport`,g=`${d}/bi-api/reprot/print/open/client/getRemote`,w=`${d}/printService/file`;let y=null;class P{constructor(){var t,e,r;if(this.webview=null,this.dialog=new i,this.dialogPreview=new s,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.CMonitor=null,this.queryServicesParams=null,this.isConnectHiPrint=!1,this.clientInfo=null,this.printerList=[],this.hiPrintSocket=null,this.base64Fragment="",this._successCallbackFn=null,this._errorCallbackFn=null,this.messageHandlerQueue=[],y)return y;y=this,this._initDomesticSystem();const n=window;this.CMonitor=n.$CMonitor;try{this.webview=n.top?null==(t=n.top.chrome)?void 0:t.webview:null==(e=n.chrome)?void 0:e.webview}catch(t){console.log(t),this.webview=null==(r=n.chrome)?void 0:r.webview}if(this.webview){this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler);try{this.webview.postMessage({exec:"config",data:""})}catch(t){const e="当前浏览器版本不支持获取配置接口";this._handleMonitorNotify(e),console.log("非封装浏览器或者"+e)}}}messageHandler(t){var e;if(console.log("打印事件message",t),!t)return this._handleMonitorNotify("接收到空的浏览器事件,"+t),console.log("当前回执",t,"接收到空的浏览器事件");let i;try{i=JSON.parse(t.data||"{}")}catch(e){console.log("解析e.data失败,"+e),this._handleMonitorNotify("解析e.data失败,"+t)}if(["print","pdf"].includes(null==i?void 0:i.cmd)){console.log("打印命令执行了",i);const e=this.messageHandlerQueue.shift();if(!e)return console.log("当前回执",t,"没有可用的handler");const{resolve:s,reject:r}=e;try{s(i.res||"")}catch(t){r(t)}}else"config"===(null==i?void 0:i.exec)&&(this.downloadPath=(null==(e=i.res)?void 0:e.downloadpath)||"")}_initDomesticSystem(){try{this.hiPrintSocket=h("http://127.0.0.1:17521",{transports:["websocket"],auth:{token:"no-use-vue-plugin-hiprint"}}),this.hiPrintSocket&&(this.hiPrintSocket.on("connect",(()=>{this.isConnectHiPrint=!0})),this.hiPrintSocket.on("disconnect",(()=>{this.isConnectHiPrint=!1})),this.hiPrintSocket.on("clientInfo",(t=>{console.log("获取到客户端信息>>>>>",t),t.clientUrl&&(this.clientInfo=t)})),this.hiPrintSocket.on("printerList",(t=>{this.printerList=t,console.log("获取到打印机列表信息>>>>>",t)})),this.hiPrintSocket.on("success",(t=>{console.log("打印成功>>>>>",t),this.base64Fragment="",this._successCallbackFn&&this._successCallbackFn(t)})),this.hiPrintSocket.on("replayPrinterTemplate",(t=>{console.log("获取到数据的回复>>>>>",t),t&&this.hiPrintSocket.emit("news",t)})),this.hiPrintSocket.on("error",(t=>{console.log("打印失败>>>>>",t),this.base64Fragment="",this._errorCallbackFn&&this._errorCallbackFn(t)})))}catch(t){console.log("hiprint系统连接失败",t)}}async getPicAndUpload(t){try{const e=t=>"[object Object]"===Object.prototype.toString.call(t);if("success"===(null==t?void 0:t.result)&&"Y"==(null==t?void 0:t.uploadTemplateFlag)&&!(null==t?void 0:t.filebase64)&&this.queryServicesParams){const t=e(this.queryServicesParams.params)?this.queryServicesParams.params:JSON.parse(this.queryServicesParams.params);t.uploadTemplateFlag="Y",this.queryServicesParams.params=JSON.stringify(t),this.queryServicesParams.cmdid="7",this.queryServicesParams.print={print:1,type:6,zip:0},this.queryServicesParams.paramsArr=[{params:JSON.stringify(t)}];await this._queryBase64ServicesPrint(this.queryServicesParams)}}catch(t){console.log(t)}finally{this.queryServicesParams=null}}async postMessage(t,e=0){if(!this.webview)return Promise.reject();const i=l();return e&&e>0?this.messageCollectAndNotifyFail(i,t,e):this.messageCollect(i,t)}messageCollect(t,e){return new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)}))}messageCollectAndNotifyFail(t,e,i){return Promise.race([new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)})),new Promise(((e,s)=>{setTimeout((()=>{const e=this.messageHandlerQueue.findIndex((e=>e.id===t));e>-1&&this.messageHandlerQueue.splice(e,1),s({type:"timeout"})}),i)}))])}destroy(){}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{m({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_queryServicesPrint(e){return this.webview?this.postMessage({exec:"print",data:{inputData:e}},null==e?void 0:e.messageTimeout):t({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(e)}}).then((({data:t})=>t))}_queryBase64ServicesPrint(t){return this.webview?this.postMessage({exec:"print",data:{inputData:t}}):m({url:"/services/Printqueue",method:"get",params:{inputData:JSON.stringify(t)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:s(i)}):m({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[s]}).then((({data:t})=>t));function s(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleMonitorNotify(t){var e,i;null==(i=null==(e=this.CMonitor)?void 0:e.notify)||i.call(e,{name:"custom_info",message:t,businessName:"打印sdk"})}_handleResult(t,e){if(!t){const t="打印命令返回空数据";return this._handleMonitorNotify(""),null==e||e({type:"printError",message:t,result:!1,errinfo:t}),!1}if("success"!==t.result){const i=t.message||t.Message;this._handleMonitorNotify(i);const s={type:"printError",message:i,result:t.result,errinfo:t.errinfo};return null==e||e(s),!1}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,s,r){const n={templateId:t,formatId:e,params:i,cmdid:"7",messageTimeout:s},a=await this._queryServicesPrint(n);return this._handleQueryPrintDataResult(a,e,r)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,paramsArr:s,cmdid:r,print:n,signature:a,printdlgshow:o="0",nobillnode:l="1",btnprint:h="1",messageTimeout:m=0}){const d={templateId:t,formatId:e,params:i,cmdid:r,nobillnode:l,printdlgshow:o,btnprint:h,messageTimeout:m,...a?{signature:a}:{}};if(s&&(d.paramsArr=s),n){try{n=JSON.parse(n)}catch(t){}d.print=n}else if(this.isRemote){const t=c(new Date,"yyyyMMddHHmmss");d.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${t}\\${t}`}}return this.queryServicesParams=d,await this._queryServicesPrint(d)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:s,messageTimeout:r=0}){const n={};let a={};try{a=Object.assign({},n,JSON.parse(i))}catch(t){a=n}const o={templateId:t,formatId:e,cmdid:"9",token:s,params:JSON.stringify(a),messageTimeout:r};return await this._queryServicesPrint(o)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await m({method:"get",url:g})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=d+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await m({method:"post",url:u,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}paramsSerializer(t){return Object.keys(t).forEach((e=>{const i=t[e];t[e]=i,"biParams"==e&&(t[e]=encodeURIComponent(i))})),t}async _queryPrintForBase64(t,e,i="",s){const r="object"==typeof i?i:JSON.parse(i),{data:n}=await m({method:"post",url:p,params:{id:t,formatId:e.split("_")[1],params:this.paramsSerializer(r),authorizationKey:s}})||{};return n}async _queryPrintForPdf(t,e,i="",s){const r="object"==typeof i?i:JSON.parse(i),{data:n}=await m({method:"post",url:f,responseType:"blob",params:{id:t,formatId:e.split("_")[1],params:this.paramsSerializer(r),authorizationKey:s}})||{};return n}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,s=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),a=s[s.length-2],o=s[s.length-1],l=await r(`${w}/${a}/${o}`),c=n(null,e,l);if("preview"===e)return c}}_base64ToBlob(t,e){const i=window.atob(t);let s=i.length;const r=new Uint8Array(s);for(;s--;)r[s]=i.charCodeAt(s);return new Blob([r],{type:e})}async preview({templateId:t,formatId:e,params:i="",paramsArr:s,authorizationKey:r,signature:l,btnprint:c,messageTimeout:h=0},m,d){if(a(e)){const s=await this._queryPrintForPdf(t,e,i,r);if(!s)return null==d?void 0:d("获取文件失败!");const a=n(s,"preview");return this.instance||(this.instance=o()),this.showPreview(this.instance,a),null==m?void 0:m({file:s})}await this._queryProxyOrigin();const u=await this._testConnection();if(!this._handleResultTest(u,d))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,paramsArr:s,cmdid:this.isRemote?"7":"8",signature:l,btnprint:c,messageTimeout:h}),n=this._handleResult(r,d);if(!n)return!1;if(this.isRemote){const t=await this._browserPrint(n,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}await this.getPicAndUpload(n),null==m||m(n)}catch(t){const e="预览失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==d||d(i),this._handleMonitorNotify(i)}}async printSync(t,e,i){const s=t.map((t=>{const e={params:"",printdlgshow:"0",nobillnode:"1",btnprint:"1",...t,cmdid:"7",...t.signature?{signature:t.signature}:{}};if(e.print)try{e.print=JSON.parse(e.print)}catch(t){}return{inputData:e}}));try{const t=l(),r=await this.messageCollect(t,{exec:"printA",data:s});if(r&&Array.isArray(r)){r.some((t=>"success"===t.res.result))?null==e||e(r):(null==i||i(r),this._handleMonitorNotify(r))}else{const t="打印命令返回无效数据";this._handleMonitorNotify(r||""),null==i||i({type:"printError",message:t,result:!1,errinfo:t})}}catch(t){const e={error:t,message:"打印失败"};null==i||i(e),this._handleMonitorNotify(e)}}async printDirect({templateId:t,formatId:e,params:i="",paramsArr:s,authorizationKey:r,print:n,signature:o,printdlgshow:l,nobillnode:c,isDownloadFile:h=!0,messageTimeout:m=0},d,u,p="printDirect"){if(a(e)){if(!this.isConnectHiPrint)return void u({message:"请连接hiPrint客户端"});const s=await this._queryPrintForBase64(t,e,i,r);if(!s.success)return u({message:s.resultMsg});const{base64:n,formatId:a}=s.map;return this.base64Fragment=n,this._successCallbackFn=d,this._errorCallbackFn=u,void this.hiPrintSocket.emit("news",{printerList:this.printerList,type:"askPrinterTemplate",markTemplateId:a,pdf_stream:this.base64Fragment})}await this._queryProxyOrigin();const f=await this._testConnection();if(!this._handleResultTest(f,u))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,paramsArr:s,cmdid:"7",print:n,signature:o,printdlgshow:l,nobillnode:c,messageTimeout:m}),a=this._handleResult(r,u);if(!a)return!1;h&&["downloadPDF"].includes(p)&&await this._browserPrint(a,p),null==d||d(a)}catch(t){const e="printDirect"===p?"打印失败":"下载失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==u||u(i),this._handleMonitorNotify(i)}}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):m.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}async downloadPDF(t,i,s){if(this.webview&&this.downloadPath&&(Reflect.has(t,"print")||Reflect.set(t,"print",{print:"1",type:"1"}),!t.print.filename)){const e=c(new Date,"yyyy-MM-dd"),i=l(),s=c(new Date,"yyyyMMddHHmmss")+i;t.print.filename=`${this.downloadPath}/${e}/${s}/${s}`.replace(/\\/g,"/")}if(a(t.formatId)){const e=await this._queryPrintForPdf(t.templateId||"",t.formatId,t.params||"",t.authorizationKey);return e?(n(e,"downloadPDF"),i({file:e})):null==s?void 0:s("获取文件失败!")}this.printDirect(t,(async t=>{t||s(null);const r=this,n=await async function(t){const i=[],s=JSON.parse(t);if(!e(s))return await r._downloadPDF("");if(1===s.length)return await r._downloadPDF(s[0]||"");for(let t=0,e=s.length;t<e;t++)i.push(await r._downloadPDF(s[t]||""));return i}(t.filedir);i(n,t)}),(t=>s(t)),"downloadPDF")}async print({templateId:t,formatId:e,params:i="",messageTimeout:s=0},r,n){const a=await this._testConnection();if(!this._handleResultTest(a,n))return!1;const o=await this.queryPrintData({templateId:t,formatId:e,params:i,messageTimeout:s},void 0,n);if(!o)return!1;const l=this.printFileData({formatId:e,file:o.file,printerName:o.printerName},void 0,n);if(!l)return!1;r&&r(l)}async queryPrintData({templateId:t,formatId:e,params:i="",messageTimeout:s=0},r,n){const a=await this._testConnection();if(!this._handleResultTest(a,n))return!1;const o=await this._handleEventQueryPrintData(t,e,i,s,n);return!!o&&(r&&r(o),o)}async printFileData({formatId:t,file:e,printerName:i="Default"},s,r){const n=await this._testConnection();if(!this._handleResultTest(n,r))return!1;const a=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(a,r);return!!o&&(s&&s(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:r=0},n,a){const o=await this._testConnection();if(!this._handleResultTest(o,a))return!1;const l=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:r}),c=this._handleResult(l,a);if(!c)return!1;n&&n(c)}async addPrintFormat({templateId:t,params:e,token:i},s,r){const n=await this._testConnection();if(!this._handleResultTest(n,r))return!1;const a=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(a,r);if(!o)return!1;s&&s(o)}}export{P as Print};
1
+ import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as s}from"./dialog.js";import{getFileUrl as r,useBrowserPrint as n,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{uuidGenerator as l}from"../../../../shared/utils/index.js";import{format as c}from"date-fns";import{io as h}from"socket.io-client";const m=String(navigator.platform).toLowerCase().includes("linux"),d=t.create({timeout:6e4,withCredentials:!1}),u=`${window.location.protocol}//${window.location.host}`,p=`${u}/fdp-api/print/assembly/printIReport`,f=`${u}/bi-api/reprot/print/open/client/printIReportForBase64`,g=`${u}/bi-api/reprot/print/open/client/previewIReport`,w=`${u}/bi-api/reprot/print/open/client/getRemote`,y=`${u}/printService/file`;let P=null;class v{constructor(){var t,e,r;if(this.webview=null,this.dialog=new i,this.dialogPreview=new s,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.CMonitor=null,this.queryServicesParams=null,this.isConnectHiPrint=!1,this.clientInfo=null,this.printerList=[],this.hiPrintSocket=null,this.base64Fragment="",this._successCallbackFn=null,this._errorCallbackFn=null,this.messageHandlerQueue=[],this.getIReportFormatId=(t,e)=>t?e.split("_")[1]:e,P)return P;P=this,this._initDomesticSystem();const n=window;this.CMonitor=n.$CMonitor;try{this.webview=n.top?null==(t=n.top.chrome)?void 0:t.webview:null==(e=n.chrome)?void 0:e.webview}catch(t){console.log(t),this.webview=null==(r=n.chrome)?void 0:r.webview}if(this.webview){this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler);try{this.webview.postMessage({exec:"config",data:""})}catch(t){const e="当前浏览器版本不支持获取配置接口";this._handleMonitorNotify(e),console.log("非封装浏览器或者"+e)}}}messageHandler(t){var e;if(console.log("打印事件message",t),!t)return this._handleMonitorNotify("接收到空的浏览器事件,"+t),console.log("当前回执",t,"接收到空的浏览器事件");let i;try{i=JSON.parse(t.data||"{}")}catch(e){console.log("解析e.data失败,"+e),this._handleMonitorNotify("解析e.data失败,"+t)}if(["print","pdf"].includes(null==i?void 0:i.cmd)){console.log("打印命令执行了",i);const e=this.messageHandlerQueue.shift();if(!e)return console.log("当前回执",t,"没有可用的handler");const{resolve:s,reject:r}=e;try{s(i.res||"")}catch(t){r(t)}}else"config"===(null==i?void 0:i.exec)&&(this.downloadPath=(null==(e=i.res)?void 0:e.downloadpath)||"")}_initDomesticSystem(){try{this.hiPrintSocket=h("http://127.0.0.1:17521",{transports:["websocket"],auth:{token:"no-use-vue-plugin-hiprint"}}),this.hiPrintSocket&&(this.hiPrintSocket.on("connect",(()=>{this.isConnectHiPrint=!0})),this.hiPrintSocket.on("disconnect",(()=>{this.isConnectHiPrint=!1})),this.hiPrintSocket.on("clientInfo",(t=>{console.log("获取到客户端信息>>>>>",t),t.clientUrl&&(this.clientInfo=t)})),this.hiPrintSocket.on("printerList",(t=>{this.printerList=t,console.log("获取到打印机列表信息>>>>>",t)})),this.hiPrintSocket.on("success",(t=>{console.log("打印成功>>>>>",t),this.base64Fragment="",this._successCallbackFn&&this._successCallbackFn(t)})),this.hiPrintSocket.on("replayPrinterTemplate",(t=>{console.log("获取到数据的回复>>>>>",t),t&&this.hiPrintSocket.emit("news",t)})),this.hiPrintSocket.on("error",(t=>{console.log("打印失败>>>>>",t),this.base64Fragment="",this._errorCallbackFn&&this._errorCallbackFn(t)})))}catch(t){console.log("hiprint系统连接失败",t)}}async getPicAndUpload(t){try{const e=t=>"[object Object]"===Object.prototype.toString.call(t);if("success"===(null==t?void 0:t.result)&&"Y"==(null==t?void 0:t.uploadTemplateFlag)&&!(null==t?void 0:t.filebase64)&&this.queryServicesParams){const t=e(this.queryServicesParams.params)?this.queryServicesParams.params:JSON.parse(this.queryServicesParams.params);t.uploadTemplateFlag="Y",this.queryServicesParams.params=JSON.stringify(t),this.queryServicesParams.cmdid="7",this.queryServicesParams.print={print:1,type:6,zip:0},this.queryServicesParams.paramsArr=[{params:JSON.stringify(t)}];await this._queryBase64ServicesPrint(this.queryServicesParams)}}catch(t){console.log(t)}finally{this.queryServicesParams=null}}async postMessage(t,e=0){if(!this.webview)return Promise.reject();const i=l();return e&&e>0?this.messageCollectAndNotifyFail(i,t,e):this.messageCollect(i,t)}messageCollect(t,e){return new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)}))}messageCollectAndNotifyFail(t,e,i){return Promise.race([new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)})),new Promise(((e,s)=>{setTimeout((()=>{const e=this.messageHandlerQueue.findIndex((e=>e.id===t));e>-1&&this.messageHandlerQueue.splice(e,1),s({type:"timeout"})}),i)}))])}destroy(){}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{d({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_queryServicesPrint(e){return this.webview?this.postMessage({exec:"print",data:{inputData:e}},null==e?void 0:e.messageTimeout):t({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(e)}}).then((({data:t})=>t))}_queryBase64ServicesPrint(t){return this.webview?this.postMessage({exec:"print",data:{inputData:t}}):d({url:"/services/Printqueue",method:"get",params:{inputData:JSON.stringify(t)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:s(i)}):d({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[s]}).then((({data:t})=>t));function s(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleMonitorNotify(t){var e,i;null==(i=null==(e=this.CMonitor)?void 0:e.notify)||i.call(e,{name:"custom_info",message:t,businessName:"打印sdk"})}_handleResult(t,e){if(!t){const t="打印命令返回空数据";return this._handleMonitorNotify(""),null==e||e({type:"printError",message:t,result:!1,errinfo:t}),!1}if("success"!==t.result){const i=t.message||t.Message;this._handleMonitorNotify(i);const s={type:"printError",message:i,result:t.result,errinfo:t.errinfo};return null==e||e(s),!1}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,s,r){const n={templateId:t,formatId:e,params:i,cmdid:"7",messageTimeout:s},a=await this._queryServicesPrint(n);return this._handleQueryPrintDataResult(a,e,r)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,paramsArr:s,cmdid:r,print:n,signature:a,printdlgshow:o="0",nobillnode:l="1",btnprint:h="1",messageTimeout:m=0}){const d={templateId:t,formatId:e,params:i,cmdid:r,nobillnode:l,printdlgshow:o,btnprint:h,messageTimeout:m,...a?{signature:a}:{}};if(s&&(d.paramsArr=s),n){try{n=JSON.parse(n)}catch(t){}d.print=n}else if(this.isRemote){const t=c(new Date,"yyyyMMddHHmmss");d.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${t}\\${t}`}}return this.queryServicesParams=d,await this._queryServicesPrint(d)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:s,messageTimeout:r=0}){const n={};let a={};try{a=Object.assign({},n,JSON.parse(i))}catch(t){a=n}const o={templateId:t,formatId:e,cmdid:"9",token:s,params:JSON.stringify(a),messageTimeout:r};return await this._queryServicesPrint(o)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await d({method:"get",url:w})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=u+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await d({method:"post",url:p,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}paramsSerializer(t){return Object.keys(t).forEach((e=>{const i=t[e];t[e]=i,"biParams"==e&&(t[e]=encodeURIComponent(i))})),t}async _queryPrintForBase64(t,e,i="",s){const r="object"==typeof i?i:JSON.parse(i),{data:n}=await d({method:"post",url:f,params:{id:t,formatId:e,params:this.paramsSerializer(r),authorizationKey:s}})||{};return n}async _queryPrintForPdf(t,e,i="",s){const r="object"==typeof i?i:JSON.parse(i),{data:n}=await d({method:"post",url:g,responseType:"blob",params:{id:t,formatId:e,params:this.paramsSerializer(r),authorizationKey:s}})||{};return n}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,s=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),a=s[s.length-2],o=s[s.length-1],l=await r(`${y}/${a}/${o}`),c=n(null,e,l);if("preview"===e)return c}}_base64ToBlob(t,e){const i=window.atob(t);let s=i.length;const r=new Uint8Array(s);for(;s--;)r[s]=i.charCodeAt(s);return new Blob([r],{type:e})}async preview({templateId:t,formatId:e,params:i="",paramsArr:s,authorizationKey:r,signature:l,btnprint:c,messageTimeout:h=0},d,u){const p=a(e);if(e=this.getIReportFormatId(p,e),p&&m){const s=await this._queryPrintForPdf(t,e,i,r);if(!s)return null==u?void 0:u("获取文件失败!");const a=n(s,"preview");return this.instance||(this.instance=o()),this.showPreview(this.instance,a),null==d?void 0:d({file:s})}await this._queryProxyOrigin();const f=await this._testConnection();if(!this._handleResultTest(f,u))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,paramsArr:s,cmdid:this.isRemote?"7":"8",signature:l,btnprint:c,messageTimeout:h}),n=this._handleResult(r,u);if(!n)return!1;if(this.isRemote){const t=await this._browserPrint(n,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}await this.getPicAndUpload(n),null==d||d(n)}catch(t){const e="预览失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==u||u(i),this._handleMonitorNotify(i)}}async printSync(t,e,i){const s=t.map((t=>{const e={params:"",printdlgshow:"0",nobillnode:"1",btnprint:"1",...t,cmdid:"7",...t.signature?{signature:t.signature}:{}};if(e.print)try{e.print=JSON.parse(e.print)}catch(t){}return{inputData:e}}));try{const t=l(),r=await this.messageCollect(t,{exec:"printA",data:s});if(r&&Array.isArray(r)){r.some((t=>"success"===t.res.result))?null==e||e(r):(null==i||i(r),this._handleMonitorNotify(r))}else{const t="打印命令返回无效数据";this._handleMonitorNotify(r||""),null==i||i({type:"printError",message:t,result:!1,errinfo:t})}}catch(t){const e={error:t,message:"打印失败"};null==i||i(e),this._handleMonitorNotify(e)}}async printDirect({templateId:t,formatId:e,params:i="",paramsArr:s,authorizationKey:r,print:n,signature:o,printdlgshow:l,nobillnode:c,isDownloadFile:h=!0,messageTimeout:d=0},u,p,f="printDirect"){const g=a(e);if(e=this.getIReportFormatId(g,e),g&&m){if(!this.isConnectHiPrint)return void p({message:"请连接hiPrint客户端"});const s=await this._queryPrintForBase64(t,e,i,r);if(!s.success)return p({message:s.resultMsg});const{base64:n,formatId:a}=s.map;return this.base64Fragment=n,this._successCallbackFn=u,this._errorCallbackFn=p,void this.hiPrintSocket.emit("news",{printerList:this.printerList,type:"askPrinterTemplate",markTemplateId:a,pdf_stream:this.base64Fragment})}await this._queryProxyOrigin();const w=await this._testConnection();if(!this._handleResultTest(w,p))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,paramsArr:s,cmdid:"7",print:n,signature:o,printdlgshow:l,nobillnode:c,messageTimeout:d}),a=this._handleResult(r,p);if(!a)return!1;h&&["downloadPDF"].includes(f)&&await this._browserPrint(a,f),null==u||u(a)}catch(t){const e="printDirect"===f?"打印失败":"下载失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==p||p(i),this._handleMonitorNotify(i)}}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):d.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}async downloadPDF(t,i,s){if(this.webview&&this.downloadPath&&(Reflect.has(t,"print")||Reflect.set(t,"print",{print:"1",type:"1"}),!t.print.filename)){const e=c(new Date,"yyyy-MM-dd"),i=l(),s=c(new Date,"yyyyMMddHHmmss")+i;t.print.filename=`${this.downloadPath}/${e}/${s}/${s}`.replace(/\\/g,"/")}const r=a(t.formatId);if(t.formatId=this.getIReportFormatId(r,t.formatId),r&&m){const e=await this._queryPrintForPdf(t.templateId||"",t.formatId,t.params||"",t.authorizationKey);return e?(n(e,"downloadPDF"),i({file:e})):null==s?void 0:s("获取文件失败!")}this.printDirect(t,(async t=>{t||s(null);const r=this,n=await async function(t){const i=[],s=JSON.parse(t);if(!e(s))return await r._downloadPDF("");if(1===s.length)return await r._downloadPDF(s[0]||"");for(let t=0,e=s.length;t<e;t++)i.push(await r._downloadPDF(s[t]||""));return i}(t.filedir);i(n,t)}),(t=>s(t)),"downloadPDF")}async print({templateId:t,formatId:e,params:i="",messageTimeout:s=0},r,n){const a=await this._testConnection();if(!this._handleResultTest(a,n))return!1;const o=await this.queryPrintData({templateId:t,formatId:e,params:i,messageTimeout:s},void 0,n);if(!o)return!1;const l=this.printFileData({formatId:e,file:o.file,printerName:o.printerName},void 0,n);if(!l)return!1;r&&r(l)}async queryPrintData({templateId:t,formatId:e,params:i="",messageTimeout:s=0},r,n){const a=await this._testConnection();if(!this._handleResultTest(a,n))return!1;const o=await this._handleEventQueryPrintData(t,e,i,s,n);return!!o&&(r&&r(o),o)}async printFileData({formatId:t,file:e,printerName:i="Default"},s,r){const n=await this._testConnection();if(!this._handleResultTest(n,r))return!1;const a=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(a,r);return!!o&&(s&&s(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:r=0},n,a){const o=await this._testConnection();if(!this._handleResultTest(o,a))return!1;const l=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:r}),c=this._handleResult(l,a);if(!c)return!1;n&&n(c)}async addPrintFormat({templateId:t,params:e,token:i},s,r){const n=await this._testConnection();if(!this._handleResultTest(n,r))return!1;const a=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(a,r);if(!o)return!1;s&&s(o)}}export{v as Print};
@@ -4092,6 +4092,7 @@ export declare const CallbackMaps: Map<string, {
4092
4092
  verticalConfig?: {
4093
4093
  enable?: boolean | undefined;
4094
4094
  headerWidth?: number | "auto" | ((level: number) => number) | undefined;
4095
+ bodyWidth?: number | ((index: number) => number) | undefined;
4095
4096
  } | undefined;
4096
4097
  onFormChange?: ((payload_0: import("../../../../../components/iho-table").IhoTableFormChangePayload) => void) | undefined;
4097
4098
  onCopy?: ((params: import("vxe-table").VxeTableDefines.CopyEventParams) => void) | undefined;
@@ -7655,6 +7656,7 @@ export declare const CallbackMaps: Map<string, {
7655
7656
  verticalConfig?: {
7656
7657
  enable?: boolean | undefined;
7657
7658
  headerWidth?: number | "auto" | ((level: number) => number) | undefined;
7659
+ bodyWidth?: number | ((index: number) => number) | undefined;
7658
7660
  } | undefined;
7659
7661
  onFormChange?: ((payload_0: import("../../../../../components/iho-table").IhoTableFormChangePayload) => void) | undefined;
7660
7662
  onSettingClick?: (() => void) | undefined;
@@ -1 +1 @@
1
- import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as t,drawArrow as o,drawText as n,defaultTextStyle as i,drawPoint as r,drawTextAndIconGroup as s,defaultStyle as l,defaultRectStyle as a}from"../useDraw.js";import{useGrid as u}from"../useGrid.js";import{useBirthProcessCumputedPoint as c}from"../useCumputedPoint.js";import"../useEvent.js";import{getScaleInfo as d,drawScaleNumber as f,drawScaleLine as p}from"../useScaleColumn.js";import{useCommon as h}from"../useCommon.js";import"vue";import{getIndex as g,isEffectiveNode as v,getTime as m,getScaleNumberList as y}from"../../utils/index.js";import{cloneDeep as k}from"lodash-es";import"../temperature/useShadow.js";import{format as w}from"date-fns";import"naive-ui";import"@vueuse/core";function x(x,b,j,C,P){const{computedX:S,computedY:E,getXValue:G,getYValue:M}=c(b),{getEqualXTypes:T,handleAddPrevent:Y,isGridLimit:L,setPrevAndNextPoint:X}=h(x,j,b),{xAxis:A,grid:I,originX:H,originY:W,xCellWidth:N,endY:O,startTime:V,leftAddAreaWidth:D,leftScales:R,rightScales:$,yCellHeight:B,endX:F,scaleValues:q,canvasWidth:z,borderStyle:J,rightAddAreaWidth:K,event:Q,originYCervix:U,other:Z,canvasHeight:_}=b,ee=k(q),te=new Set;function oe(){ee.filter((e=>e.show)).forEach(((e,s)=>{var l;const a=[],u=[],c=[];null==(l=e.data)||l.forEach(((l,d)=>{!function(l,d,f){let p,h;const{pointAttr:g={},lineAttr:v={},title:m="",key:y,type:k="circle",childbirthStyle:w={}}=e,P=e.data[f+1],S=le(P,e);if(l&&S&&!d.breakpoint)h=t([...l,...S],{...v});else if(l&&!S&&!d.breakpoint){const o=le(P,e);h=o?t([...l,...o],{...v}):null}let E,T;if(d.childbirth){const e=l[1]+B;E=o([l[0],l[1],e],w),c.push(E),T=n([l[0]+N/2,e-B/2],{value:String(d.childbirth),...i,originX:"left",originY:"center",...w}),c.push(T)}const Y=u[f-1],L={origin:{data:d,title:m,key:y||"",dataIndex:s,index:f},leftLine:Y,rightLine:h,arrowGroup:E,arrowGroupText:T,...g,...b.event.hovered?b.event.evented?{selectable:!0}:{selectable:!0,lockMovementX:!0,lockMovementY:!0}:b.event};l&&(Y||(L.leftLine=null),p=r(k,{left:l[0],top:l[1],...L}));u.push(h),p&&(!function(e){Q.hovered&&(e.on("mouseover",(()=>{se(e,"hover")})),e.on("mouseout",(()=>{C.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{re(e),function(e){var t,o,n,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(o=e.rightLine)||o.setCoords().set({x1:e.left,y1:e.top}),null==(n=e.arrowGroup)||n.setCoords().set({left:e.left,top:e.top}),null==(i=e.arrowGroupText)||i.setCoords().set({left:e.left+N/2,top:e.top+B/2})}(e),Q.hovered&&se(e)})),e.on("mouseup",(t=>{if(C.show=!1,1===t.button){const{key:t}=e.origin,o={...e.origin,data:{...e.origin.data,time:G(e.left),value:M(t,e.top)}};x.value.discardActiveObject(),j("change",o),ne(o,"change")}}))}(p),a.push(p),te.add(p))}(le(l,e),l,d)})),Promise.all(a).then((e=>{const t=u.filter((e=>e));X(e),Promise.all(c).then((o=>{x.value.add(...t,...e,...o),e.forEach((e=>{null==e||e.bringToFront()}))}))}))}))}function ne(e,t="add"){const{dataIndex:o,data:n,index:i,key:r}=e,s=ee.find((e=>e.key===r));switch(t){case"remove":s.data.splice(i,1);break;case"change":s.data[i]=n;break;default:{const e=g(n.time,s.data);s.data.splice(e,0,n);break}}ie()}function ie(){var e;te.size&&(null==(e=x.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),(null==e?void 0:e.arrowGroup)&&t.push(null==e?void 0:e.arrowGroup),(null==e?void 0:e.arrowGroupText)&&t.push(null==e?void 0:e.arrowGroupText)})),t}([...te]))),te.clear(),oe()}function re(e){const t=e.prevPoint?e.prevPoint.left:H,o=e.nextPoint?e.nextPoint.left:F;e.setCoords(),["cervix","fetalPresentation"].includes(e.origin.key)&&e.top<U&&e.set("top",U),e.top<W&&e.set("top",W),e.top>O&&e.set("top",O),e.left<t&&e.set("left",t),e.left>o&&e.set("left",o)}function se(e,t="moving"){const{title:o,key:n,data:i}=e.origin;C.point={x:e.left,y:e.top},C.list=[`${o} ${"hover"===t?i.value:M(n,e.top)}`,`时间 ${G(e.left).slice(-5)}`],C.show=!0}function le(e,t){if(v(e)&&function(e){const t=V+864e5,o=m(e);return o>=V&&o<=t}(e.time)){const o=S(e.time),n=E(t.key,t.range,e.value);return[o,n<W?W:n>O?O:n]}}function ae(e,t){return e+1>t[1]?t[0]:e+1}return u(x,b),function(){const t=new e.Rect({...J,width:z-D-K-1,height:O-1,left:D,top:0,fill:"transparent"});x.value.add(t)}(),function(){function t(t,o="left"){let r="left"===o?D:F;t.forEach(((t,o)=>{const{range:s,spaceValue:u,width:c,title:h,titleStyle:g,key:v,position:m="center",spaceGridNumber:k=1,showNumber:w,showMaxMinNumber:b}=t,j=[],C=[],P=r+c/2,S=y(s,u),E=S.length;S.forEach(((e,o)=>{const{lineXMain:n,lineXSub:i,textLeft:s}=d(m,r,c),l=O-o*B*k,a=0===o?O-8:o!==S.length-1||W||U&&"FHR"!==v?l:W+8;!w||(0===o||o===E-1)&&!b||j.push(f(String(e),t,s,a)),C.push(...p(t,o,n,i,l,B,W,E))}));const G=new e.Rect({...a,strokeWidth:.5,width:c,height:O,left:P,top:O/2}),M=n([P,W>0?W-B/2:B/2],{value:String(h),...i,...g}),T=new e.Group([...C,...j,G,...M?[M]:[]],{objectCaching:!1,...l});x.value.add(T),T.sendToBack(),r+=c}))}t(R),t($,"right")}(),function(){const{show:t,startTime:o,range:r=[0,23],position:s="top",style:a}=A.time,{show:u,range:c=[0,23],position:d,style:f}=A.processTime;if(t||u){const p=[],h=[],g=[],v=[],m=H+N/2,y=B/2;for(let e=0;e<I.mainXCell;e++){if(t){const t=0===e?+o.slice(11,13):ae(p.at(-1),r);p.push(t);const l="top"===s?W-y:O+y;g.push(n([m+e*N,l],{value:String(t),...i,...a||{}}))}if(u){const t=0===e?c[0]:h.at(-1)+1;h.push(t);const o="top"===d?y:_-y;v.push(n([m+e*N,o],{value:String(t),...i,...f||{}}))}}const k=new e.Group([...g,...v],{objectCaching:!1,...l});x.value.add(k),x.value.sendToBack(k)}}(),function(){var e;const o=Object.values(Z),n=[],i={},r=ee.find((e=>"cervix"===e.key&&e.show)),s=null==(e=null==r?void 0:r.data)?void 0:e.find((e=>3==+e.value));function l(e,t){const{key:o,range:n}=r||{},i=E(o,n,10),s=[0,t],l=[-t/e,0],a=[(O-i-t)/e,O-i],u=[F-H,e*(F-H)+t];let c=[],d=[];function f([o,n]){return Math.abs(n-e*o-t)<=1}function p([e,t]){const[o,n]=[...h([e,t])];return o>=H&&o<=F&&n>=i&&n<=O}function h([e,t]){return[H+e,O-t]}return f(s)&&p(s)&&(c=h(s)),f(l)&&p(l)&&(c=h(l)),f(a)&&p(a)&&(d=h(a)),f(u)&&p(u)&&(d=h(u)),[...c,...d]}o.forEach((e=>{if(!e.show)return;const{key:o}=e;switch(o){case"fetalPresentation":{const{range:i,show:r}=ee.find((e=>e.key===o));if(r){const r=E(o,i,0);n.push(t([H,r,F,r],{...e}))}break}case"alert":if(s){const{key:o,range:a}=r||{},u=216e5,c={time:w(new Date(m(s.time)+u),"yyyy-MM-dd HH:mm"),value:10},[d,f]=[S(s.time)-H,O-E(o,a,s.value)],[p,h]=[S(c.time)-H,O-E(o,a,c.value)],g=(h-f)/(p-d),v=f-d*g,y=l(g,v);y.length>0&&(n.push(t(y,{...e})),Object.assign(i,{k:g,b:v}))}break;case"handling":if(s){const{k:o,b:r}=i,a=144e5,u=l(o,r-(S(w(new Date(m(s.time)+a),"yyyy-MM-dd HH:mm"))-S(s.time))*o);u.length>0&&n.push(t(u,{...e}))}}})),x.value.add(...n)}(),oe(),function(){function e(e,t){const o=ee.findIndex((t=>t.key===e.key));return{renderItem:()=>e.title,origin:{title:e.title,unit:e.unit,dataIndex:o,key:e.key},pointer:t}}b.event.evented&&x.value.on("mouse:up",(t=>{if(3===t.button){const{x:o=0,y:n=0}=t.pointer||{};o>=H&&o<=F&&n>=W&&n<=O&&(P.point={x:o,y:n},P.show=!0,t.target?(P.target=t.target,P.list=["删除节点"],[...te].forEach((e=>{e.origin&&e.left===t.target.left&&e.top===t.target.top&&P.list.push({renderItem:()=>e.origin.title,origin:{...e.origin},mode:"remove",pointer:t.pointer})}))):(P.target=null,P.list=["新增节点"],ee.filter((e=>e.show)).forEach((i=>{if(!T([...te],o,"key").includes(i.key)){if(["cervix","fetalPresentation"].includes(i.key)&&n<U)return;P.list.push(e(i,t.pointer))}})),1===P.list.length&&(P.show=!1,Y("repeat"),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const e=z-K/2;function t(e,t){if(!e.length)return;let n=W;const i=[];e.forEach((e=>{const o=e.title.split("").join("\n"),r=q.findIndex((t=>t.key===e.key)),{text:l,icon:a}=s(o,e,{text:{originY:"top",left:t,top:n},icon:{left:t,topY:n,originY:"top",origin:{type:e.type,dataIndex:r},...b.event}},"vertical");var u;n+=l.height+a.height+15,(u=a).on("moving",(()=>{u.set("originY","center"),L(u)?(re(u),se(u)):C.show=!1})),u.on("mouseup:before",(e=>{if(C.show=!1,0===e.e.button&&L(u))if(T([...te],u.left,"key").includes(u.origin.key))Y("repeat");else{const e={data:{time:G(u.left),value:M(u.origin.key,u.top)},...u.origin};j("add",e),ne(e)}!function(e){e.setCoords().set({originY:"top",left:e.originLeft,top:e.originTop})}(u)})),i.push(l,a)})),o(i),x.value.add(...i)}function o(e){const t=e.at(-1),o=(O-W)/2,n=(t.height+t.top-W)/2;e.forEach((e=>{const t=e.top+o-n;e.set({top:t,originTop:t})}))}t(R,D/2),t($,e)}(),{clickMenu:function({item:e,target:t}){const o={...e.origin};"remove"===e.mode?(j("remove",o),ne(o,"remove")):(Object.assign(o,{data:{time:G(e.pointer.x),value:M(e.origin.key,e.pointer.y)}}),j("add",o),ne(o))},redrawPoints:ie}}export{x as useBirthProcess};
1
+ import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as t,drawArrow as o,drawText as n,defaultTextStyle as i,drawPoint as r,drawTextAndIconGroup as s,defaultStyle as l,defaultRectStyle as a}from"../useDraw.js";import{useGrid as u}from"../useGrid.js";import{useBirthProcessCumputedPoint as c}from"../useCumputedPoint.js";import"../useEvent.js";import{getScaleInfo as d,drawScaleNumber as f,drawScaleLine as p}from"../useScaleColumn.js";import{useCommon as h}from"../useCommon.js";import"vue";import{getIndex as g,isEffectiveNode as v,getTime as m,getScaleNumberList as y}from"../../utils/index.js";import{cloneDeep as k,last as w}from"lodash-es";import"../temperature/useShadow.js";import{format as x}from"date-fns";import"naive-ui";import"@vueuse/core";function b(b,j,C,P,S){const{computedX:E,computedY:G,getXValue:M,getYValue:T}=c(j),{getEqualXTypes:Y,handleAddPrevent:L,isGridLimit:X,setPrevAndNextPoint:A}=h(b,C,j),{xAxis:I,grid:H,originX:W,originY:N,xCellWidth:O,endY:V,startTime:D,leftAddAreaWidth:R,leftScales:$,rightScales:B,yCellHeight:F,endX:q,scaleValues:z,canvasWidth:J,borderStyle:K,rightAddAreaWidth:Q,event:U,originYCervix:Z,other:_,canvasHeight:ee}=j,te=k(z),oe=new Set;function ne(){te.filter((e=>e.show)).forEach(((e,s)=>{var l;const a=[],u=[],c=[];null==(l=e.data)||l.forEach(((l,d)=>{!function(l,d,f){let p,h;const{pointAttr:g={},lineAttr:v={},title:m="",key:y,type:k="circle",childbirthStyle:w={}}=e,x=e.data[f+1],S=ae(x,e);if(l&&S&&!d.breakpoint)h=t([...l,...S],{...v});else if(l&&!S&&!d.breakpoint){const o=ae(x,e);h=o?t([...l,...o],{...v}):null}let E,G;if(d.childbirth){const e=l[1]+F;E=o([l[0],l[1],e],w),c.push(E),G=n([l[0]+O/2,e-F/2],{value:String(d.childbirth),...i,originX:"left",originY:"center",...w}),c.push(G)}const Y=u[f-1],L={origin:{data:d,title:m,key:y||"",dataIndex:s,index:f},leftLine:Y,rightLine:h,arrowGroup:E,arrowGroupText:G,...g,...j.event.hovered?j.event.evented?{selectable:!0}:{selectable:!0,lockMovementX:!0,lockMovementY:!0}:j.event};l&&(Y||(L.leftLine=null),p=r(k,{left:l[0],top:l[1],...L}));u.push(h),p&&(!function(e){U.hovered&&(e.on("mouseover",(()=>{le(e,"hover")})),e.on("mouseout",(()=>{P.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{se(e),function(e){var t,o,n,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(o=e.rightLine)||o.setCoords().set({x1:e.left,y1:e.top}),null==(n=e.arrowGroup)||n.setCoords().set({left:e.left,top:e.top}),null==(i=e.arrowGroupText)||i.setCoords().set({left:e.left+O/2,top:e.top+F/2})}(e),U.hovered&&le(e)})),e.on("mouseup",(t=>{if(P.show=!1,1===t.button){const{key:t}=e.origin,o={...e.origin,data:{...e.origin.data,time:M(e.left),value:T(t,e.top)}};b.value.discardActiveObject(),C("change",o),ie(o,"change")}}))}(p),a.push(p),oe.add(p))}(ae(l,e),l,d)})),Promise.all(a).then((e=>{const t=u.filter((e=>e));A(e),Promise.all(c).then((o=>{b.value.add(...t,...e,...o),e.forEach((e=>{null==e||e.bringToFront()}))}))}))}))}function ie(e,t="add"){const{dataIndex:o,data:n,index:i,key:r}=e,s=te.find((e=>e.key===r));switch(t){case"remove":s.data.splice(i,1);break;case"change":s.data[i]=n;break;default:{const e=g(n.time,s.data);s.data.splice(e,0,n);break}}re()}function re(){var e;oe.size&&(null==(e=b.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),(null==e?void 0:e.arrowGroup)&&t.push(null==e?void 0:e.arrowGroup),(null==e?void 0:e.arrowGroupText)&&t.push(null==e?void 0:e.arrowGroupText)})),t}([...oe]))),oe.clear(),ne()}function se(e){const t=e.prevPoint?e.prevPoint.left:W,o=e.nextPoint?e.nextPoint.left:q;e.setCoords(),["cervix","fetalPresentation"].includes(e.origin.key)&&e.top<Z&&e.set("top",Z),e.top<N&&e.set("top",N),e.top>V&&e.set("top",V),e.left<t&&e.set("left",t),e.left>o&&e.set("left",o)}function le(e,t="moving"){const{title:o,key:n,data:i}=e.origin;P.point={x:e.left,y:e.top},P.list=[`${o} ${"hover"===t?i.value:T(n,e.top)}`,`时间 ${M(e.left).slice(-5)}`],P.show=!0}function ae(e,t){if(v(e)&&function(e){const t=D+864e5,o=m(e);return o>=D&&o<=t}(e.time)){const o=E(e.time),n=G(t.key,t.range,e.value);return[o,n<N?N:n>V?V:n]}}function ue(e,t){return e+1>t[1]?t[0]:e+1}return u(b,j),function(){const t=new e.Rect({...K,width:J-R-Q-1,height:V-1,left:R,top:0,fill:"transparent"});b.value.add(t)}(),function(){function t(t,o="left"){let r="left"===o?R:q;t.forEach(((t,o)=>{const{range:s,spaceValue:u,width:c,title:h,titleStyle:g,key:v,position:m="center",spaceGridNumber:k=1,showNumber:w,showMaxMinNumber:x}=t,j=[],C=[],P=r+c/2,S=y(s,u),E=S.length;S.forEach(((e,o)=>{const{lineXMain:n,lineXSub:i,textLeft:s}=d(m,r,c),l=V-o*F*k,a=0===o?V-8:o!==S.length-1||N||Z&&"FHR"!==v?l:N+8;!w||(0===o||o===E-1)&&!x||j.push(f(String(e),t,s,a)),C.push(...p(t,o,n,i,l,F,N,E))}));const G=new e.Rect({...a,strokeWidth:.5,width:c,height:V,left:P,top:V/2}),M=n([P,N>0?N-F/2:F/2],{value:String(h),...i,...g}),T=new e.Group([...C,...j,G,...M?[M]:[]],{objectCaching:!1,...l});b.value.add(T),T.sendToBack(),r+=c}))}t($),t(B,"right")}(),function(){const{show:t,startTime:o,range:r=[0,23],position:s="top",style:a}=I.time,{show:u,range:c=[0,23],position:d,style:f}=I.processTime;if(t||u){const p=[],h=[],g=[],v=[],m=W+O/2,y=F/2;for(let e=0;e<H.mainXCell;e++){if(t){const t=0===e?+o.slice(11,13):ue(w(p),r);p.push(t);const l="top"===s?N-y:V+y;g.push(n([m+e*O,l],{value:String(t),...i,...a||{}}))}if(u){const t=0===e?c[0]:w(h)+1;h.push(t);const o="top"===d?y:ee-y;v.push(n([m+e*O,o],{value:String(t),...i,...f||{}}))}}const k=new e.Group([...g,...v],{objectCaching:!1,...l});b.value.add(k),b.value.sendToBack(k)}}(),function(){var e;const o=Object.values(_),n=[],i={},r=te.find((e=>"cervix"===e.key&&e.show)),s=null==(e=null==r?void 0:r.data)?void 0:e.find((e=>3==+e.value));function l(e,t){const{key:o,range:n}=r||{},i=G(o,n,10),s=[0,t],l=[-t/e,0],a=[(V-i-t)/e,V-i],u=[q-W,e*(q-W)+t];let c=[],d=[];function f([o,n]){return Math.abs(n-e*o-t)<=1}function p([e,t]){const[o,n]=[...h([e,t])];return o>=W&&o<=q&&n>=i&&n<=V}function h([e,t]){return[W+e,V-t]}return f(s)&&p(s)&&(c=h(s)),f(l)&&p(l)&&(c=h(l)),f(a)&&p(a)&&(d=h(a)),f(u)&&p(u)&&(d=h(u)),[...c,...d]}o.forEach((e=>{if(!e.show)return;const{key:o}=e;switch(o){case"fetalPresentation":{const{range:i,show:r}=te.find((e=>e.key===o));if(r){const r=G(o,i,0);n.push(t([W,r,q,r],{...e}))}break}case"alert":if(s){const{key:o,range:a}=r||{},u=216e5,c={time:x(new Date(m(s.time)+u),"yyyy-MM-dd HH:mm"),value:10},[d,f]=[E(s.time)-W,V-G(o,a,s.value)],[p,h]=[E(c.time)-W,V-G(o,a,c.value)],g=(h-f)/(p-d),v=f-d*g,y=l(g,v);y.length>0&&(n.push(t(y,{...e})),Object.assign(i,{k:g,b:v}))}break;case"handling":if(s){const{k:o,b:r}=i,a=144e5,u=l(o,r-(E(x(new Date(m(s.time)+a),"yyyy-MM-dd HH:mm"))-E(s.time))*o);u.length>0&&n.push(t(u,{...e}))}}})),b.value.add(...n)}(),ne(),function(){function e(e,t){const o=te.findIndex((t=>t.key===e.key));return{renderItem:()=>e.title,origin:{title:e.title,unit:e.unit,dataIndex:o,key:e.key},pointer:t}}j.event.evented&&b.value.on("mouse:up",(t=>{if(3===t.button){const{x:o=0,y:n=0}=t.pointer||{};o>=W&&o<=q&&n>=N&&n<=V&&(S.point={x:o,y:n},S.show=!0,t.target?(S.target=t.target,S.list=["删除节点"],[...oe].forEach((e=>{e.origin&&e.left===t.target.left&&e.top===t.target.top&&S.list.push({renderItem:()=>e.origin.title,origin:{...e.origin},mode:"remove",pointer:t.pointer})}))):(S.target=null,S.list=["新增节点"],te.filter((e=>e.show)).forEach((i=>{if(!Y([...oe],o,"key").includes(i.key)){if(["cervix","fetalPresentation"].includes(i.key)&&n<Z)return;S.list.push(e(i,t.pointer))}})),1===S.list.length&&(S.show=!1,L("repeat"),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const e=J-Q/2;function t(e,t){if(!e.length)return;let n=N;const i=[];e.forEach((e=>{const o=e.title.split("").join("\n"),r=z.findIndex((t=>t.key===e.key)),{text:l,icon:a}=s(o,e,{text:{originY:"top",left:t,top:n},icon:{left:t,topY:n,originY:"top",origin:{type:e.type,dataIndex:r},...j.event}},"vertical");var u;n+=l.height+a.height+15,(u=a).on("moving",(()=>{u.set("originY","center"),X(u)?(se(u),le(u)):P.show=!1})),u.on("mouseup:before",(e=>{if(P.show=!1,0===e.e.button&&X(u))if(Y([...oe],u.left,"key").includes(u.origin.key))L("repeat");else{const e={data:{time:M(u.left),value:T(u.origin.key,u.top)},...u.origin};C("add",e),ie(e)}!function(e){e.setCoords().set({originY:"top",left:e.originLeft,top:e.originTop})}(u)})),i.push(l,a)})),o(i),b.value.add(...i)}function o(e){const t=w(e),o=(V-N)/2,n=(t.height+t.top-N)/2;e.forEach((e=>{const t=e.top+o-n;e.set({top:t,originTop:t})}))}t($,R/2),t(B,e)}(),{clickMenu:function({item:e,target:t}){const o={...e.origin};"remove"===e.mode?(C("remove",o),ie(o,"remove")):(Object.assign(o,{data:{time:M(e.pointer.x),value:T(e.origin.key,e.pointer.y)}}),C("add",o),ie(o))},redrawPoints:re}}export{b as useBirthProcess};
@@ -1 +1 @@
1
- import{ref as e,computed as a,reactive as t,watch as l}from"vue";import{defaultBorderStyle as u}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{getTime as r}from"../../utils/index.js";import{useCanvasEvent as i}from"../useEvent.js";import"lodash-es";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";import{useBirthProcess as s}from"./useBirthProcess.js";function d(d,n,o,v,c,h){const m=e(),f=e(),p=e(),g=a((()=>n.data.scaleValues.filter((e=>"left"===e.layout&&e.show)))),x=a((()=>n.data.scaleValues.filter((e=>"right"===e.layout&&e.show)))),w=a((()=>{var e;return(null==(e=x.value)?void 0:e.length)?30:0})),y=a((()=>{var e;return 30+(null==(e=g.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))})),V=a((()=>{var e;const{width:a}=n.data,t=null==(e=x.value)?void 0:e.reduce(((e,a)=>e+=a.width),0);return a-w.value-t})),b=a((()=>n.data.grid.mainXCell)),j=a((()=>{const e=n.data.grid.mainYCell||14;return n.data.scaleValues.find((e=>e.show&&"FHR"===e.key))||14!==e?e:10})),A=a((()=>(V.value-y.value)/b.value)),C=a((()=>{const{xAxis:e,height:a}=n.data,t=Object.values(e).reduce(((e,a)=>(a.show&&e++,e)),0);return a/(j.value+t)})),k=a((()=>{const{xAxis:e}=n.data,a=Object.values(e).reduce(((e,a)=>(a.show&&"top"===a.position&&e++,e)),0);return C.value*a})),Y=a((()=>{var e;const{scaleValues:a}=n.data;if(!(null==(e=a.find((e=>"FHR"===e.key)))?void 0:e.show)&&!k.value)return k.value;const t=a.find((e=>"cervix"===e.key)),[,l]=(null==t?void 0:t.range)||[0,10],u=(null==t?void 0:t.spaceValue)||1;return S.value-l*u*C.value})),S=a((()=>{const{xAxis:e,height:a}=n.data,t=Object.values(e).reduce(((e,a)=>(a.show&&"bottom"===a.position&&e++,e)),0);return a-C.value*t})),H=a((()=>r(n.data.xAxis.time.startTime))),P=a((()=>36e5/A.value)),X=a((()=>{const{scaleValues:e}=n.data,a=e.find((e=>"cervix"===e.key));return C.value/((null==a?void 0:a.spaceValue)||1)})),F=a((()=>{const{scaleValues:e}=n.data,a=e.find((e=>"FHR"===e.key));return C.value/((null==a?void 0:a.spaceValue)||10)})),R=a((()=>{const{scaleValues:e}=n.data,a=e.find((e=>"fetalPresentation"===e.key));return C.value/((null==a?void 0:a.spaceValue)||1)})),W=a((()=>{var e;return(null==(e=n.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),O=t({canvasWidth:n.data.width,canvasHeight:n.data.height,borderStyle:{...u,...n.data.borderStyle||{}},selectionStyle:n.data.selectionStyle||{},grid:n.data.grid,other:n.data.other,originX:y.value,endX:V.value,originY:k.value,endY:S.value,xCellWidth:A.value,yCellHeight:C.value,gridXNumber:b.value,gridYNumber:j.value,xAxis:n.data.xAxis,leftScales:g.value,rightScales:x.value,leftAddAreaWidth:30,rightAddAreaWidth:w.value,startTime:H.value,timeXCell:P.value,cervixYCell:X.value,FHRYCell:F.value,fetalPresentationYCell:R.value,scaleValues:n.data.scaleValues,event:W.value,originYCervix:Y.value});return l((()=>d.value),(e=>{e&&function(){const{clickMenu:e,redrawPoints:a}=s(d,O,o,c,h);f.value=a,p.value=e;const{select:t}=i(d,O,o);m.value=t}()}),{immediate:!0}),{propItems:O,redrawPoints:f,select:m,clickMenu:p}}export{d as useBirthProcessChart};
1
+ import{ref as e,computed as a,reactive as t,watch as l}from"vue";import{defaultBorderStyle as u}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{getTime as r}from"../../utils/index.js";import"lodash-es";import{useCanvasEvent as i}from"../useEvent.js";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";import{useBirthProcess as s}from"./useBirthProcess.js";function d(d,n,o,v,c,h){const m=e(),f=e(),p=e(),g=a((()=>n.data.scaleValues.filter((e=>"left"===e.layout&&e.show)))),x=a((()=>n.data.scaleValues.filter((e=>"right"===e.layout&&e.show)))),w=a((()=>{var e;return(null==(e=x.value)?void 0:e.length)?30:0})),y=a((()=>{var e;return 30+(null==(e=g.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))})),V=a((()=>{var e;const{width:a}=n.data,t=null==(e=x.value)?void 0:e.reduce(((e,a)=>e+=a.width),0);return a-w.value-t})),b=a((()=>n.data.grid.mainXCell)),j=a((()=>{const e=n.data.grid.mainYCell||14;return n.data.scaleValues.find((e=>e.show&&"FHR"===e.key))||14!==e?e:10})),A=a((()=>(V.value-y.value)/b.value)),C=a((()=>{const{xAxis:e,height:a}=n.data,t=Object.values(e).reduce(((e,a)=>(a.show&&e++,e)),0);return a/(j.value+t)})),k=a((()=>{const{xAxis:e}=n.data,a=Object.values(e).reduce(((e,a)=>(a.show&&"top"===a.position&&e++,e)),0);return C.value*a})),Y=a((()=>{var e;const{scaleValues:a}=n.data;if(!(null==(e=a.find((e=>"FHR"===e.key)))?void 0:e.show)&&!k.value)return k.value;const t=a.find((e=>"cervix"===e.key)),[,l]=(null==t?void 0:t.range)||[0,10],u=(null==t?void 0:t.spaceValue)||1;return S.value-l*u*C.value})),S=a((()=>{const{xAxis:e,height:a}=n.data,t=Object.values(e).reduce(((e,a)=>(a.show&&"bottom"===a.position&&e++,e)),0);return a-C.value*t})),H=a((()=>r(n.data.xAxis.time.startTime))),P=a((()=>36e5/A.value)),X=a((()=>{const{scaleValues:e}=n.data,a=e.find((e=>"cervix"===e.key));return C.value/((null==a?void 0:a.spaceValue)||1)})),F=a((()=>{const{scaleValues:e}=n.data,a=e.find((e=>"FHR"===e.key));return C.value/((null==a?void 0:a.spaceValue)||10)})),R=a((()=>{const{scaleValues:e}=n.data,a=e.find((e=>"fetalPresentation"===e.key));return C.value/((null==a?void 0:a.spaceValue)||1)})),W=a((()=>{var e;return(null==(e=n.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),O=t({canvasWidth:n.data.width,canvasHeight:n.data.height,borderStyle:{...u,...n.data.borderStyle||{}},selectionStyle:n.data.selectionStyle||{},grid:n.data.grid,other:n.data.other,originX:y.value,endX:V.value,originY:k.value,endY:S.value,xCellWidth:A.value,yCellHeight:C.value,gridXNumber:b.value,gridYNumber:j.value,xAxis:n.data.xAxis,leftScales:g.value,rightScales:x.value,leftAddAreaWidth:30,rightAddAreaWidth:w.value,startTime:H.value,timeXCell:P.value,cervixYCell:X.value,FHRYCell:F.value,fetalPresentationYCell:R.value,scaleValues:n.data.scaleValues,event:W.value,originYCervix:Y.value});return l((()=>d.value),(e=>{e&&function(){const{clickMenu:e,redrawPoints:a}=s(d,O,o,c,h);f.value=a,p.value=e;const{select:t}=i(d,O,o);m.value=t}()}),{immediate:!0}),{propItems:O,redrawPoints:f,select:m,clickMenu:p}}export{d as useBirthProcessChart};
@@ -1 +1 @@
1
- import{onUnmounted as e}from"vue";import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as n,drawLine as i,drawPoint as o}from"../useDraw.js";import{useGrid as l}from"../useGrid.js";import{useBirthProcessCumputedPoint as r}from"../useCumputedPoint.js";import{bus as a}from"../useEvent.js";import{useCommon as s}from"../useCommon.js";import{getPointRange as f,getIndex as c,isEffectiveNode as u,getTime as d}from"../../utils/index.js";import{cloneDeep as p,omit as m,flatten as v}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"naive-ui";import{useIntervalFn as g}from"@vueuse/core";function y(y,h,k,x,L){const{computedX:P,computedY:b,getXValue:w,getYValue:A}=r(h),{xCellWidth:I,pointSelectionStyle:C,originX:K,endX:j,originY:E,endY:X,event:M,scaleValues:V,xAxis:T,startTime:Y,timeXCell:S,itemList:$,dialog:F}=h,O=new Map,D=new Set,_=p(V);let z=[],N=null;const G=new Set;l(y,h);const{getEqualXTypes:J,handleAddPrevent:q,setPrevAndNextPoint:R}=s(y,k,h),{pause:W,resume:B}=g((()=>{!function(){if(!G.size)return;for(const e of G)e.set("opacity",1===e.opacity?.5:1);y.value.renderAll()}()}),800);function H(){_.forEach((e=>{const{range:t=[],spaceValue:n}=e;n&&(t[0]||t[1])&&e.dataList.forEach(((t,n)=>{t.show&&(!function(e,t){const{max:n={},min:o={}}=e.panicValue||{},{max:l={},min:r={}}=e.diffValue||{};function a({show:e=!1,value:n,name:o,lineStyle:l}){if(!e||!n)return;const r=b(t.type,t.range,n),a=i([K,r,j,r],{...l,evented:!0,lockMovementX:!0,lockMovementY:!0,hoverCursor:"pointer"});M.hovered&&o&&(a.on("mousemove",(({pointer:e})=>{x.point={...e||{x:a.left,y:a.top}},x.list=[`${o} ${n}${t.unit||""}`],x.show=!0})),a.on("mouseout",(()=>{x.show=!1}))),y.value.add(a)}a(n),a(o),a(l),a(r)}(t,e),ee(t,n,e))}))}))}function Q(e=[]){if(!(null==N?void 0:N.areaPos))return[];const{startPos:t,endPos:n}=N.areaPos,[i,o]=[t.x,n.x].sort(((e,t)=>e-t)),[l,r]=[t.y,n.y].sort(((e,t)=>e-t));return(e.length?e:fe()).filter((e=>e.left>=i&&e.left<=o&&e.top>=l&&e.top<=r))}function U(e){F.warning({maskClosable:!1,closeOnEsc:!1,title:"警告",content:"确认删除当前选中的节点?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e(),Z()},onNegativeClick:()=>Z(),onClose:()=>Z()})}function Z(){N&&y.value.remove(N),N=null}function ee(e,t,n){var l;const{type:r,unit:a,dataList:s=[]}=n,f=[];O.set(e.key,[]),function(e,t){G.size&&[...G].forEach((n=>{const{dataIndex:i,type:o}=n.origin;i===t&&o===e&&G.delete(n)}))}(r,t),null==(l=e.list)||l.forEach(((l,c)=>{!function(e,l,c,u){var d;let p,v,g=u;l.key&&(g=s.find((e=>e.key===l.key)));const{pointAttr:L={},lineAttr:P={},title:b="",key:C,type:K="circle"}=g,j=se(u.list[c+1],n);e&&j&&!l.breakpoint&&e[0]!==j[0]&&(v=i([...e,...j],P));const E=f[c-1],X={origin:{data:l,title:b,key:u.key,selfKey:C,unit:a,type:r,dataIndex:t,index:c,lineAttr:P},__type:"main",leftLine:E,rightLine:v,...L,...h.event.hovered?h.event.evented?{selectable:!0}:{selectable:!0,lockMovementX:!0,lockMovementY:!0}:h.event};e&&(E||(X.leftLine=null),p=o(K,{left:e[0],top:e[1],...X}));f.push(v),p&&(p.originLeft=p.left,p.originTop=p.top,function(e){M.hovered&&(e.on("mouseover",(()=>{re(e,"hover")})),e.on("mouseout",(()=>{x.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{ae(e),function(e){var t,n;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(n=e.rightLine)||n.setCoords().set({x1:e.left,y1:e.top})}(e),M.hovered&&re(e),function(e){var t,n,i,o;const{originLeft:l,originTop:r,left:a,top:s,origin:f}=e,c=~~((a-l)/I);if(a>l+I){if(0===z.length){ne(e,[...e.leftLine?[e.leftLine.x1,e.leftLine.y1]:[l,r],l,r]),null==(n=null==(t=e.leftLine)?void 0:t.set)||n.call(t,"stroke","transparent"),null==(o=null==(i=e.rightLine)?void 0:i.set)||o.call(i,"stroke","transparent")}const u=l+I*c;if(z.every((e=>e.left!==u))){const t=w(u),n=A(f.type,s);z.push({data:{time:t,value:n,...f.selfKey!==f.key?{key:f.selfKey}:{}},left:u,top:s}),ne(e,[...e.prevPointer,u,s])}if(z.length<c&&function(e,t){const{originLeft:n,originTop:i,origin:o}=e;let l=1;for(;l<=t;){const t=n+I*l,r=z.some((e=>Math.abs(e.left-t)<=1));if(!r){let l=0;const r=z.find(((e,n)=>(e.left>t&&(l=n),e.left>t)));if(r){const a=JSON.parse(JSON.stringify(r)),s=z[l-1]||{left:n,top:i},f=~~((r.left-(t-I))/I),c=(r.top-s.top)/f;a.top=s.top+c,a.left=t,a.data={time:w(t),value:A(o.type,a.top),...o.selfKey!==o.key?{key:o.selfKey}:{}},z.splice(l,0,a),ne(e,[s.left,s.top,a.left,a.top])}}l++}}(e,c),e.nextPoint){const t=O.get(f.key);!function(e,t){const{left:n,top:i,origin:o}=t,l=I/2,r=e.findIndex((e=>Math.abs(n-e.left)<l&&Math.abs(i-e.top)<l&&o.index!==e.origin.index));r>-1?(t.set({scaleX:2.5,scaleY:2.5}),t.coincidePoint=e[r]):t.set({scaleX:t.scale,scaleY:t.scale})}(t,e),null==t||t.forEach((e=>{e.left<=l||f.index===e.origin.index||(e.left<a?te(e,"#999"):te(e,e.origin.lineAttr.stroke))}))}}!function(e){var t,n;const{left:i}=e;if(z.length>0&&i<z[z.length-1].left){for(const e of D)e.left>i&&(e.leftLine&&y.value.remove(e.leftLine),y.value.remove(e));if(z=z.filter((e=>e.left<=i)),0===z.length){null==(n=null==(t=e.leftLine)?void 0:t.set)||n.call(t,e.origin.lineAttr);for(const e of D)e.leftLine&&y.value.remove(e.leftLine),y.value.remove(e)}if(z.length>0){const t=z.at(-1);e.prevPointer=[t.left,t.top]}}}(e)}(e)})),e.on("mouseup",(t=>{if(x.show=!1,1===t.button){const{type:t,selfKey:n,dataIndex:i}=e.origin,o={...e.origin,data:{...e.origin.data,time:w(e.left),value:A(t,e.top)}};if(y.value.discardActiveObject(),z.length>0){const l=_.find((e=>e.type===t));let r=-1;const a=z.map((e=>e.data));if(e.nextPoint){if(2.5!==e.scaleX)return void oe({dataIndex:i,scaleValue:l});const t=e.coincidePoint.origin,n=t.data;r=t.index;const o=a.findIndex((e=>e.time===n.time));o>-1?a[o].value=n.value:a.push({...a.at(-1),time:n.time,value:n.value})}const s=l.dataList.findIndex((e=>e.key===n));k("add",{...m(o,["index","selfKey","lineAttr"]),dataIndex:s,key:n,data:a}),ie({...o,data:a,coincideIndex:r})}else k("change",{...m(o,["selfKey","lineAttr"]),key:n}),ie(o,"change")}}))}(p),null==(d=O.get(u.key))||d.push(p))}(se(l,n),l,c,e)})),Promise.all(O.get(e.key)).then((t=>{const n=f.filter((e=>e));R(t),y.value.add(...n,...t),function(e,t){const{max:n={},min:i={}}=t.panicValue||{},{max:o={},min:l={}}=t.diffValue||{};function r({show:t=!1,value:n,flickerable:i},o){!t&&n&&i&&e.forEach((e=>{const t=e.origin.data.value;"max"===o&&t<n||"min"===o&&t>n||G.add(e)}))}r(n,"max"),r(i,"min"),r(o,"max"),r(l,"min")}(t,e)}))}function te(e,t){["stroke","fill"].forEach((n=>{const i=e[n];i&&!["transparent","#fff","#ffffff","#FFFFFF"].includes(i)&&i!==t&&e.set(n,t)})),e.rightLine&&e.rightLine.stroke!==t&&e.rightLine.set("stroke",t)}function ne(e,t){const[,,n,o]=t;e.clone((l=>{l.set({left:n,top:o,scaleX:1,scaleY:1}),e.prevPointer=[n,o];const r=i(t,e.origin.lineAttr);l.leftLine=r,D.add(l),y.value.add(r,l)}))}function ie(e,t="add",n=1){const{data:i,index:o,key:l,type:r,coincideIndex:a}=e;let{dataIndex:s}=e;const f=_.find((e=>e.type===r)),u=f.dataList.find(((e,t)=>(s=t,e.key===l)));switch(t){case"remove":u.list.splice(o,n),u.list[o-1]&&(u.list[o-1].breakpoint=!0);break;case"change":u.list[o]=i;break;default:{const e=Array.isArray(i)?i[0].time:i.time,t=c(e,u.list),n=Array.isArray(i)?i:[i];u.list.splice(t,a>-1?a-t+1:0,...n);break}}oe({dataIndex:s,scaleValue:f})}function oe(e){var t,n,i;if(D.size&&(null==(t=y.value)||t.remove(...le([...D]))),D.clear(),z=[],e){const{dataIndex:t,scaleValue:i}=e,o=i.dataList[t];null==(n=y.value)||n.remove(...le(O.get(o.key))),O.delete(o.key),ee(o,t,i)}else O.size&&(null==(i=y.value)||i.remove(...le(fe()))),O.clear(),H()}function le(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine)})),t}function re(e,t="moving"){const{title:n,type:i,data:o,unit:l}=e.origin;x.point={x:e.left,y:e.top};const r=`${"hover"===t?o.value:A(i,e.top)}`;x.list=[`${n} ${r}${l||""}`,`时间 ${w(e.left).slice(-5)}`],x.show=!0}function ae(e){e.setCoords();const t=6e4/S,n=e.prevPoint?e.prevPoint.left+t:K,i=j;e.top<E&&e.set("top",E),e.top>X&&e.set("top",X),e.left<n&&e.set("left",n),e.left>i&&e.set("left",i)}function se(e,t){if(u(e)&&function(e){const t=Date.parse(T.list.at(-1)),n=d(e);return n>=Y&&n<=t}(e.time)){const n=P(e.time),i=b(t.type,t.range,e.value);return[n,i<E?E:i>X?X:i]}}function fe(){return v(Array.from(O.values()))}return e((()=>{W()})),H(),function(){if(!M.evented)return;let e=!1,i={x:0,y:0};y.value.on("mouse:up",(t=>{if(3===t.button&&function(e){const{x:t=0,y:n=0}=e.pointer||{};if(t>=K&&t<=j&&n>=E&&n<=X)if(e.target){if("main"!==e.target.__type)return;i(e.pointer,e.target,["删除节点"]);const{minLeft:t,maxLeft:n,minTop:o,maxTop:l}=f(e.target);fe().forEach((i=>{"main"===i.__type&&i.left>t&&i.left<n&&i.top>o&&i.top<l&&L.list.push({renderItem:()=>i.origin.title,origin:{...i.origin},mode:"remove",pointer:e.pointer})})),1===L.list.length&&(L.show=!1,console.log("当前时间段内无可删除节点"))}else i(e.pointer,null,["新增节点"]),$.forEach((n=>{J(fe(),t,"key",2*I).includes(n.linkKey||n.key)||L.list.push({renderItem:()=>n.title,origin:{title:n.title,unit:n.unit,type:n.bigType,dataIndex:n.dataIndex,key:n.key,linkKey:n.linkKey},pointer:e.pointer})})),1===L.list.length&&(L.show=!1,q("repeat"),console.log("当前时间段内无可新增节点"));function i(e,t,n){Object.assign(L,{point:e,show:!0,target:t,list:n})}}(t),1===t.button&&e){e=!1;const t=Q();t.length>0?U((()=>{const e=function(e){const t=e.reduce(((e,t)=>{const{key:n}=t.origin;return e[n]=e[n]?e[n].concat(t.origin):[t.origin],e}),{});return Object.keys(t).map((e=>{const n=t[e].sort(((e,t)=>Date.parse(e.data.time)-Date.parse(t.data.time)));return ie(n[0],"remove",n.length),n.map((e=>({...m(e,["selfKey","lineAttr"]),key:e.selfKey})))}))}(t);k("remove",e)})):a.emit(N)}})),y.value.on("mouse:down",(t=>{1!==t.button||t.target||(e=!0,i=t.pointer)})),y.value.on("mouse:move",(o=>{if(!e)return;const{x:l,y:r}=i,{x:a,y:s}=o.pointer;N&&y.value.remove(N),N=new t.Rect({...n,fill:"#CAF982",opacity:.4,...C,left:l,top:r,width:a-l,height:s-r,objectCaching:!0}),N.areaPos={startPos:i,endPos:o.pointer},y.value.add(N)}))}(),{redrawPoints:oe,clickMenu:function({item:e,target:t}){const n={...e.origin};"remove"===e.mode?(k("remove",n),ie(n,"remove")):(Object.assign(n,{data:{time:w(e.pointer.x),value:A(e.origin.type,e.pointer.y),...e.origin.linkKey?{key:e.origin.key}:{}}}),k("add",n),ie({...n,key:e.origin.linkKey||e.origin.key}))},moveLimit:ae,setPopup:re,updateData:ie,getGridPoints:fe,getContainPoints:Q,showDialog:U,removeCurrentSelection:Z}}export{y as useCenter};
1
+ import{onUnmounted as e}from"vue";import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as n,drawLine as i,drawPoint as o}from"../useDraw.js";import{useGrid as l}from"../useGrid.js";import{useBirthProcessCumputedPoint as r}from"../useCumputedPoint.js";import{bus as a}from"../useEvent.js";import{useCommon as s}from"../useCommon.js";import{getPointRange as f,getIndex as c,isEffectiveNode as u,getTime as d}from"../../utils/index.js";import{cloneDeep as p,last as m,omit as v,flatten as g}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"naive-ui";import{useIntervalFn as y}from"@vueuse/core";function h(h,k,x,L,P){const{computedX:b,computedY:w,getXValue:A,getYValue:I}=r(k),{xCellWidth:C,pointSelectionStyle:K,originX:j,endX:E,originY:X,endY:M,event:V,scaleValues:T,xAxis:Y,startTime:S,timeXCell:$,itemList:F,dialog:O}=k,D=new Map,_=new Set,z=p(T);let N=[],G=null;const J=new Set;l(h,k);const{getEqualXTypes:q,handleAddPrevent:R,setPrevAndNextPoint:W}=s(h,x,k),{pause:B,resume:H}=y((()=>{!function(){if(!J.size)return;for(const e of J)e.set("opacity",1===e.opacity?.5:1);h.value.renderAll()}()}),800);function Q(){z.forEach((e=>{const{range:t=[],spaceValue:n}=e;n&&(t[0]||t[1])&&e.dataList.forEach(((t,n)=>{t.show&&(!function(e,t){const{max:n={},min:o={}}=e.panicValue||{},{max:l={},min:r={}}=e.diffValue||{};function a({show:e=!1,value:n,name:o,lineStyle:l}){if(!e||!n)return;const r=w(t.type,t.range,n),a=i([j,r,E,r],{...l,evented:!0,lockMovementX:!0,lockMovementY:!0,hoverCursor:"pointer"});V.hovered&&o&&(a.on("mousemove",(({pointer:e})=>{L.point={...e||{x:a.left,y:a.top}},L.list=[`${o} ${n}${t.unit||""}`],L.show=!0})),a.on("mouseout",(()=>{L.show=!1}))),h.value.add(a)}a(n),a(o),a(l),a(r)}(t,e),te(t,n,e))}))}))}function U(e=[]){if(!(null==G?void 0:G.areaPos))return[];const{startPos:t,endPos:n}=G.areaPos,[i,o]=[t.x,n.x].sort(((e,t)=>e-t)),[l,r]=[t.y,n.y].sort(((e,t)=>e-t));return(e.length?e:ce()).filter((e=>e.left>=i&&e.left<=o&&e.top>=l&&e.top<=r))}function Z(e){O.warning({maskClosable:!1,closeOnEsc:!1,title:"警告",content:"确认删除当前选中的节点?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e(),ee()},onNegativeClick:()=>ee(),onClose:()=>ee()})}function ee(){G&&h.value.remove(G),G=null}function te(e,t,n){var l;const{type:r,unit:a,dataList:s=[]}=n,f=[];D.set(e.key,[]),function(e,t){J.size&&[...J].forEach((n=>{const{dataIndex:i,type:o}=n.origin;i===t&&o===e&&J.delete(n)}))}(r,t),null==(l=e.list)||l.forEach(((l,c)=>{!function(e,l,c,u){var d;let p,g,y=u;l.key&&(y=s.find((e=>e.key===l.key)));const{pointAttr:P={},lineAttr:b={},title:w="",key:K,type:j="circle"}=y,E=fe(u.list[c+1],n);e&&E&&!l.breakpoint&&e[0]!==E[0]&&(g=i([...e,...E],b));const X=f[c-1],M={origin:{data:l,title:w,key:u.key,selfKey:K,unit:a,type:r,dataIndex:t,index:c,lineAttr:b},__type:"main",leftLine:X,rightLine:g,...P,...k.event.hovered?k.event.evented?{selectable:!0}:{selectable:!0,lockMovementX:!0,lockMovementY:!0}:k.event};e&&(X||(M.leftLine=null),p=o(j,{left:e[0],top:e[1],...M}));f.push(g),p&&(p.originLeft=p.left,p.originTop=p.top,function(e){V.hovered&&(e.on("mouseover",(()=>{ae(e,"hover")})),e.on("mouseout",(()=>{L.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{se(e),function(e){var t,n;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(n=e.rightLine)||n.setCoords().set({x1:e.left,y1:e.top})}(e),V.hovered&&ae(e),function(e){var t,n,i,o;const{originLeft:l,originTop:r,left:a,top:s,origin:f}=e,c=~~((a-l)/C);if(a>l+C){if(0===N.length){ie(e,[...e.leftLine?[e.leftLine.x1,e.leftLine.y1]:[l,r],l,r]),null==(n=null==(t=e.leftLine)?void 0:t.set)||n.call(t,"stroke","transparent"),null==(o=null==(i=e.rightLine)?void 0:i.set)||o.call(i,"stroke","transparent")}const u=l+C*c;if(N.every((e=>e.left!==u))){const t=A(u),n=I(f.type,s);N.push({data:{time:t,value:n,...f.selfKey!==f.key?{key:f.selfKey}:{}},left:u,top:s}),ie(e,[...e.prevPointer,u,s])}if(N.length<c&&function(e,t){const{originLeft:n,originTop:i,origin:o}=e;let l=1;for(;l<=t;){const t=n+C*l,r=N.some((e=>Math.abs(e.left-t)<=1));if(!r){let l=0;const r=N.find(((e,n)=>(e.left>t&&(l=n),e.left>t)));if(r){const a=JSON.parse(JSON.stringify(r)),s=N[l-1]||{left:n,top:i},f=~~((r.left-(t-C))/C),c=(r.top-s.top)/f;a.top=s.top+c,a.left=t,a.data={time:A(t),value:I(o.type,a.top),...o.selfKey!==o.key?{key:o.selfKey}:{}},N.splice(l,0,a),ie(e,[s.left,s.top,a.left,a.top])}}l++}}(e,c),e.nextPoint){const t=D.get(f.key);!function(e,t){const{left:n,top:i,origin:o}=t,l=C/2,r=e.findIndex((e=>Math.abs(n-e.left)<l&&Math.abs(i-e.top)<l&&o.index!==e.origin.index));r>-1?(t.set({scaleX:2.5,scaleY:2.5}),t.coincidePoint=e[r]):t.set({scaleX:t.scale,scaleY:t.scale})}(t,e),null==t||t.forEach((e=>{e.left<=l||f.index===e.origin.index||(e.left<a?ne(e,"#999"):ne(e,e.origin.lineAttr.stroke))}))}}!function(e){var t,n;const{left:i}=e;if(N.length>0&&i<N[N.length-1].left){for(const e of _)e.left>i&&(e.leftLine&&h.value.remove(e.leftLine),h.value.remove(e));if(N=N.filter((e=>e.left<=i)),0===N.length){null==(n=null==(t=e.leftLine)?void 0:t.set)||n.call(t,e.origin.lineAttr);for(const e of _)e.leftLine&&h.value.remove(e.leftLine),h.value.remove(e)}if(N.length>0){const t=m(N);e.prevPointer=[t.left,t.top]}}}(e)}(e)})),e.on("mouseup",(t=>{if(L.show=!1,1===t.button){const{type:t,selfKey:n,dataIndex:i}=e.origin,o={...e.origin,data:{...e.origin.data,time:A(e.left),value:I(t,e.top)}};if(h.value.discardActiveObject(),N.length>0){const l=z.find((e=>e.type===t));let r=-1;const a=N.map((e=>e.data));if(e.nextPoint){if(2.5!==e.scaleX)return void le({dataIndex:i,scaleValue:l});const t=e.coincidePoint.origin,n=t.data;r=t.index;const o=a.findIndex((e=>e.time===n.time));o>-1?a[o].value=n.value:a.push({...m(a),time:n.time,value:n.value})}const s=l.dataList.findIndex((e=>e.key===n));x("add",{...v(o,["index","selfKey","lineAttr"]),dataIndex:s,key:n,data:a}),oe({...o,data:a,coincideIndex:r})}else x("change",{...v(o,["selfKey","lineAttr"]),key:n}),oe(o,"change")}}))}(p),null==(d=D.get(u.key))||d.push(p))}(fe(l,n),l,c,e)})),Promise.all(D.get(e.key)).then((t=>{const n=f.filter((e=>e));W(t),h.value.add(...n,...t),function(e,t){const{max:n={},min:i={}}=t.panicValue||{},{max:o={},min:l={}}=t.diffValue||{};function r({show:t=!1,value:n,flickerable:i},o){!t&&n&&i&&e.forEach((e=>{const t=e.origin.data.value;"max"===o&&t<n||"min"===o&&t>n||J.add(e)}))}r(n,"max"),r(i,"min"),r(o,"max"),r(l,"min")}(t,e)}))}function ne(e,t){["stroke","fill"].forEach((n=>{const i=e[n];i&&!["transparent","#fff","#ffffff","#FFFFFF"].includes(i)&&i!==t&&e.set(n,t)})),e.rightLine&&e.rightLine.stroke!==t&&e.rightLine.set("stroke",t)}function ie(e,t){const[,,n,o]=t;e.clone((l=>{l.set({left:n,top:o,scaleX:1,scaleY:1}),e.prevPointer=[n,o];const r=i(t,e.origin.lineAttr);l.leftLine=r,_.add(l),h.value.add(r,l)}))}function oe(e,t="add",n=1){const{data:i,index:o,key:l,type:r,coincideIndex:a}=e;let{dataIndex:s}=e;const f=z.find((e=>e.type===r)),u=f.dataList.find(((e,t)=>(s=t,e.key===l)));switch(t){case"remove":u.list.splice(o,n),u.list[o-1]&&(u.list[o-1].breakpoint=!0);break;case"change":u.list[o]=i;break;default:{const e=Array.isArray(i)?i[0].time:i.time,t=c(e,u.list),n=Array.isArray(i)?i:[i];u.list.splice(t,a>-1?a-t+1:0,...n);break}}le({dataIndex:s,scaleValue:f})}function le(e){var t,n,i;if(_.size&&(null==(t=h.value)||t.remove(...re([..._]))),_.clear(),N=[],e){const{dataIndex:t,scaleValue:i}=e,o=i.dataList[t];null==(n=h.value)||n.remove(...re(D.get(o.key))),D.delete(o.key),te(o,t,i)}else D.size&&(null==(i=h.value)||i.remove(...re(ce()))),D.clear(),Q()}function re(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine)})),t}function ae(e,t="moving"){const{title:n,type:i,data:o,unit:l}=e.origin;L.point={x:e.left,y:e.top};const r=`${"hover"===t?o.value:I(i,e.top)}`;L.list=[`${n} ${r}${l||""}`,`时间 ${A(e.left).slice(-5)}`],L.show=!0}function se(e){e.setCoords();const t=6e4/$,n=e.prevPoint?e.prevPoint.left+t:j,i=E;e.top<X&&e.set("top",X),e.top>M&&e.set("top",M),e.left<n&&e.set("left",n),e.left>i&&e.set("left",i)}function fe(e,t){if(u(e)&&function(e){const t=Date.parse(m(Y.list)),n=d(e);return n>=S&&n<=t}(e.time)){const n=b(e.time),i=w(t.type,t.range,e.value);return[n,i<X?X:i>M?M:i]}}function ce(){return g(Array.from(D.values()))}return e((()=>{B()})),Q(),function(){if(!V.evented)return;let e=!1,i={x:0,y:0};h.value.on("mouse:up",(t=>{if(3===t.button&&function(e){const{x:t=0,y:n=0}=e.pointer||{};if(t>=j&&t<=E&&n>=X&&n<=M)if(e.target){if("main"!==e.target.__type)return;i(e.pointer,e.target,["删除节点"]);const{minLeft:t,maxLeft:n,minTop:o,maxTop:l}=f(e.target);ce().forEach((i=>{"main"===i.__type&&i.left>t&&i.left<n&&i.top>o&&i.top<l&&P.list.push({renderItem:()=>i.origin.title,origin:{...i.origin},mode:"remove",pointer:e.pointer})})),1===P.list.length&&(P.show=!1,console.log("当前时间段内无可删除节点"))}else i(e.pointer,null,["新增节点"]),F.forEach((n=>{q(ce(),t,"key",2*C).includes(n.linkKey||n.key)||P.list.push({renderItem:()=>n.title,origin:{title:n.title,unit:n.unit,type:n.bigType,dataIndex:n.dataIndex,key:n.key,linkKey:n.linkKey},pointer:e.pointer})})),1===P.list.length&&(P.show=!1,R("repeat"),console.log("当前时间段内无可新增节点"));function i(e,t,n){Object.assign(P,{point:e,show:!0,target:t,list:n})}}(t),1===t.button&&e){e=!1;const t=U();t.length>0?Z((()=>{const e=function(e){const t=e.reduce(((e,t)=>{const{key:n}=t.origin;return e[n]=e[n]?e[n].concat(t.origin):[t.origin],e}),{});return Object.keys(t).map((e=>{const n=t[e].sort(((e,t)=>Date.parse(e.data.time)-Date.parse(t.data.time)));return oe(n[0],"remove",n.length),n.map((e=>({...v(e,["selfKey","lineAttr"]),key:e.selfKey})))}))}(t);x("remove",e)})):a.emit(G)}})),h.value.on("mouse:down",(t=>{1!==t.button||t.target||(e=!0,i=t.pointer)})),h.value.on("mouse:move",(o=>{if(!e)return;const{x:l,y:r}=i,{x:a,y:s}=o.pointer;G&&h.value.remove(G),G=new t.Rect({...n,fill:"#CAF982",opacity:.4,...K,left:l,top:r,width:a-l,height:s-r,objectCaching:!0}),G.areaPos={startPos:i,endPos:o.pointer},h.value.add(G)}))}(),{redrawPoints:le,clickMenu:function({item:e,target:t}){const n={...e.origin};"remove"===e.mode?(x("remove",n),oe(n,"remove")):(Object.assign(n,{data:{time:A(e.pointer.x),value:I(e.origin.type,e.pointer.y),...e.origin.linkKey?{key:e.origin.key}:{}}}),x("add",n),oe({...n,key:e.origin.linkKey||e.origin.key}))},moveLimit:se,setPopup:ae,updateData:oe,getGridPoints:ce,getContainPoints:U,showDialog:Z,removeCurrentSelection:ee}}export{h as useCenter};
@@ -1 +1 @@
1
- import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawTextGroup as e,defaultRectStyle as i,drawTextAndIconGroup as o,drawText as n,defaultTextStyle as r,defaultStyle as l}from"../useDraw.js";import{useBirthProcessCumputedPoint as a}from"../useCumputedPoint.js";import"../useEvent.js";import{drawScaleNumber as s}from"../useScaleColumn.js";import{useCommon as u}from"../useCommon.js";import"vue";import{getScaleNumberList as d}from"../../utils/index.js";import{cloneDeep as c}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";function f(f,p,g,h,m,v,y,k){const{getYValue:w,getXValue:j}=a(p),{getEqualXTypes:x,handleAddPrevent:b,isGridLimit:X}=u(f,g,p),{originY:W,endY:C,borderStyle:E,left:S,itemList:Y,scaleValues:K,originX:L,endX:M,yCellHeight:N,markHeight:V,canvasWidth:G,canvasHeight:H,xCellWidth:T}=p;!function(){if(!S)return;const{title:t,titleWidth:i,titleStyle:o}=S,n=e({width:i,height:C-W+V,...E},{value:t.split("").join("\n"),...o||{}},{left:0,top:W},!0);f.value.add(n)}(),K.forEach(((e,i)=>{var o,a;const{range:u,spaceValue:c,title:p,unit:g,titleStyle:h,spaceGridNumber:m=1,showNumber:v,showMaxMinNumber:y,titleMargin:k=[5,30],margin:w=5}=e,j="left"===e.layout?L-w:M+w,x=[],b=d(u,c),X=b.length;b.forEach(((t,i)=>{const o=0===i?C-5:C-i*N*m;!v||(0===i||i===X-1)&&!y||x.push(s(String(t),{...e,position:e.layout},j,o))}));const W="left"===e.layout?"right":"left",E=p&&n(["left"===e.layout?L-k[0]:M+k[0],(null!=(a=null==(o=x.at(-1))?void 0:o.top)?a:330)-N-k[1]],{value:`${p}${g?"\n"+g:""}`,...r,...h,textAlign:W,originX:W,originY:"bottom"}),S=new t.Group([...x,...E?[E]:[]],{objectCaching:!1,...l});f.value.add(S),S.sendToBack()})),function(){const e=new t.Rect({width:L-S.titleWidth,height:C-W+V,left:S.titleWidth,top:W,...i,originX:"left",originY:"top",...E});f.value.add(e);const n=c(Y),r=c(S.externalIconList||[]).map((t=>({...t,isExternal:!0}))),{projectNameMargin:l=[5,30],titleWidth:a=20}=S;let s=C+V-l[0];const u=a+l[1];r.concat(n.reverse()).forEach((t=>{s-=10;const e=t.title,{text:i,icon:n}=o(e,t,{text:{left:u,top:s},icon:{leftX:u,topY:s,originX:"center",...t.isExternal?{evented:!1,selectable:!1}:{},origin:{linkKey:t.linkKey}}});var r;s-=i.height||30,n.set("left",n.left+n.width/2),(r=n).on("moving",(()=>{r.set("originX","center"),X(r)?(m(r),v(r)):h.show=!1})),r.on("mouseup:before",(t=>{if(h.show=!1,0===t.e.button&&X(r)){const t=r.origin.linkKey||r.origin.key;if(x(k(),r.left,"key",2*T).includes(t))b("repeat");else{const e={data:{time:j(r.left),value:w(r.origin.type,r.top),...r.origin.linkKey?{key:r.origin.key}:{}},...r.origin};g("add",e),y({...e,key:t})}}!function(t){t.setCoords().set({originX:"left",left:t.originLeft,top:t.originTop})}(r)})),f.value.add(i,n)}))}(),f.value.add(new t.Rect({left:0,top:0,width:G-E.strokeWidth,height:H-E.strokeWidth,fill:"transparent",...E}))}export{f as useLeft};
1
+ import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawTextGroup as e,defaultRectStyle as i,drawTextAndIconGroup as o,drawText as n,defaultTextStyle as r,defaultStyle as l}from"../useDraw.js";import{useBirthProcessCumputedPoint as s}from"../useCumputedPoint.js";import"../useEvent.js";import{drawScaleNumber as a}from"../useScaleColumn.js";import{useCommon as u}from"../useCommon.js";import"vue";import{getScaleNumberList as d}from"../../utils/index.js";import{cloneDeep as c,last as f}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";function p(p,g,h,m,v,y,k,w){const{getYValue:j,getXValue:x}=s(g),{getEqualXTypes:b,handleAddPrevent:X,isGridLimit:W}=u(p,h,g),{originY:C,endY:E,borderStyle:S,left:Y,itemList:K,scaleValues:L,originX:M,endX:N,yCellHeight:V,markHeight:G,canvasWidth:H,canvasHeight:T,xCellWidth:A}=g;!function(){if(!Y)return;const{title:t,titleWidth:i,titleStyle:o}=Y,n=e({width:i,height:E-C+G,...S},{value:t.split("").join("\n"),...o||{}},{left:0,top:C},!0);p.value.add(n)}(),L.forEach(((e,i)=>{var o,s;const{range:u,spaceValue:c,title:g,unit:h,titleStyle:m,spaceGridNumber:v=1,showNumber:y,showMaxMinNumber:k,titleMargin:w=[5,30],margin:j=5}=e,x="left"===e.layout?M-j:N+j,b=[],X=d(u,c),W=X.length;X.forEach(((t,i)=>{const o=0===i?E-5:E-i*V*v;!y||(0===i||i===W-1)&&!k||b.push(a(String(t),{...e,position:e.layout},x,o))}));const C="left"===e.layout?"right":"left",S=g&&n(["left"===e.layout?M-w[0]:N+w[0],(null!=(s=null==(o=f(b))?void 0:o.top)?s:330)-V-w[1]],{value:`${g}${h?"\n"+h:""}`,...r,...m,textAlign:C,originX:C,originY:"bottom"}),Y=new t.Group([...b,...S?[S]:[]],{objectCaching:!1,...l});p.value.add(Y),Y.sendToBack()})),function(){const e=new t.Rect({width:M-Y.titleWidth,height:E-C+G,left:Y.titleWidth,top:C,...i,originX:"left",originY:"top",...S});p.value.add(e);const n=c(K),r=c(Y.externalIconList||[]).map((t=>({...t,isExternal:!0}))),{projectNameMargin:l=[5,30],titleWidth:s=20}=Y;let a=E+G-l[0];const u=s+l[1];r.concat(n.reverse()).forEach((t=>{a-=10;const e=t.title,{text:i,icon:n}=o(e,t,{text:{left:u,top:a},icon:{leftX:u,topY:a,originX:"center",...t.isExternal?{evented:!1,selectable:!1}:{},origin:{linkKey:t.linkKey}}});var r;a-=i.height||30,n.set("left",n.left+n.width/2),(r=n).on("moving",(()=>{r.set("originX","center"),W(r)?(v(r),y(r)):m.show=!1})),r.on("mouseup:before",(t=>{if(m.show=!1,0===t.e.button&&W(r)){const t=r.origin.linkKey||r.origin.key;if(b(w(),r.left,"key",2*A).includes(t))X("repeat");else{const e={data:{time:x(r.left),value:j(r.origin.type,r.top),...r.origin.linkKey?{key:r.origin.key}:{}},...r.origin};h("add",e),k({...e,key:t})}}!function(t){t.setCoords().set({originX:"left",left:t.originLeft,top:t.originTop})}(r)})),p.value.add(i,n)}))}(),p.value.add(new t.Rect({left:0,top:0,width:H-S.strokeWidth,height:T-S.strokeWidth,fill:"transparent",...S}))}export{p as useLeft};
@@ -1 +1 @@
1
- import{ref as e,computed as t,reactive as a,unref as r,onMounted as i,nextTick as n}from"vue";import{useDialog as l}from"naive-ui";import{defaultBorderStyle as o}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as u}from"date-fns";import{getChildrenSize as s}from"../../utils/index.js";import"../useEvent.js";import{cloneDeep as d,range as c,flatten as p}from"lodash-es";import"../temperature/useShadow.js";import{OTHER_MENU as m}from"../../constants/index.js";import"@vueuse/core";import{useTop as v}from"./useTop.js";import{useLeft as h}from"./useLeft.js";import{useCenter as f}from"./useCenter.js";import{useOther as g}from"./useOther.js";function y(y,w,x,b,j,C){const Y=l(),H=e(),S=e(),D=e(),A=t((()=>w.data.layout||{top:"drug",center:"xAxis",bottom:"intraoperatively"})),M=t((()=>{var e;return null!=(e=w.data.left.width)?e:0})),T=t((()=>{const{grid:e}=w.data;return e.mainXCell*e.subXCell})),X=t((()=>{const{grid:e}=w.data;return e.mainYCell*e.subYCell})),G=t((()=>{const{treeData:e=[],show:t=!0}=w.data.top;return t?s(e):0})),V=t((()=>w.data.top.tree.cellHeight)),k=t((()=>V.value*G.value)),P=t((()=>te(_("drug")||"top"))),L=t((()=>P.value+k.value)),N=t((()=>{var e;return Date.parse((null==(e=w.data.xAxis)?void 0:e.startTime)||u(new Date,"yyyy-MM-dd HH:mm:ss"))})),O=t((()=>{const e=d(w.data.xAxis),{spaceValue:t,spaceTimeStamp:a}=e,r=c(T.value/t+1).map((r=>0===r?e.startTime:u(new Date(N.value+r*t*a),"yyyy-MM-dd HH:mm:ss")));return{...e,list:r,left:M.value}})),E=function(){const{show:e=!0}=w.data.top;if(!e)return[];const t=d(w.data.top.treeData);let a=0;const{cellWidth:r,cellHeight:i}=w.data.top.tree;return function e(t,n=0){t.forEach((t=>{var l;const o={top:a*i+P.value,left:n*r,width:r,height:i};if(a++,null==(l=t.children)?void 0:l.length){a--;const r=s(t.children);o.height=r*i,e(t.children,n+1)}else o.width=M.value-o.left;Object.assign(t,o)}))}(t),t}(),W=t((()=>te(_("xAxis")||"center"))),I=t((()=>{var e;const{width:t,right:a}=w.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),q=t((()=>te(_("intraoperatively")||"bottom"))),z=t((()=>{var e;const{show:t=!0,height:a}=(null==(e=w.data.other)?void 0:e.mark)||{};return t&&a?a:0})),B=t((()=>q.value+(w.data.height-k.value-O.value.height-z.value))),F=t((()=>(I.value-M.value)/T.value)),J=t((()=>(B.value-q.value)/X.value)),K=t((()=>O.value.spaceTimeStamp/F.value)),Q=t((()=>{const{scaleValues:e}=w.data;return p(e.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:e.type,unit:e.unit,dataIndex:a}))))))})),R=t((()=>ae("pulse"))),U=t((()=>ae("temperature"))),Z=t((()=>{var e;return(null==(e=w.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),$=a({canvasWidth:w.data.width,canvasHeight:w.data.height,borderStyle:{...o,...w.data.borderStyle},pointSelectionStyle:w.data.pointSelectionStyle||{},grid:w.data.grid,top:w.data.top,left:w.data.left,other:w.data.other,topGridYNumber:r(G),topGridYCellHeight:r(V),topGridOriginY:r(P),topGridEndY:r(L),treeData:E,xAxis:r(O),originYXAxis:r(W),startTime:r(N),timeXCell:r(K),gridXNumber:r(T),gridYNumber:r(X),xCellWidth:r(F),yCellHeight:r(J),originX:r(M),endX:r(I),originY:r(q),endY:r(B),markHeight:r(z),itemList:r(Q),scaleValues:w.data.scaleValues,pulseYCell:r(R),temperatureYCell:r(U),event:r(Z),dialog:Y});function _(e){let t="";return Object.entries(A.value).some((([a,r])=>{if(r===e)return t=a,!0})),t}function ee(e){const t=A.value[e],a=O.value.height;switch(t){case"drug":return k.value;case"xAxis":return a;default:return w.data.height-k.value-a}}function te(e){switch(e){case"top":return 0;case"center":return ee("top");default:return ee("top")+ee("center")}}function ae(e){const{scaleValues:t}=w.data,a=t.find((t=>t.type===e));return J.value*(a.spaceGridNumber||1)/(a.spaceValue||1)}return i((async()=>{await n(),v(y,$,x,j);const{redrawPoints:e,clickMenu:t,moveLimit:a,setPopup:r,updateData:i,getGridPoints:l,getContainPoints:o,showDialog:u,removeCurrentSelection:s}=f(y,$,x,j,C);h(y,$,x,j,a,r,i,l);const{clickMenu:d}=g(y,$,x,j,C,a,o,u,s);S.value=e,D.value=e=>{const{item:a}=e;a.type&&m.map((e=>e.type)).includes(a.type)?d(e):t(e)}})),{propItems:$,redrawPoints:S,select:H,clickMenu:D}}export{y as useSurgicalAnesthesiaChart};
1
+ import{ref as e,computed as t,reactive as a,unref as r,onMounted as i,nextTick as n}from"vue";import{useDialog as l}from"naive-ui";import{defaultBorderStyle as o}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as u}from"date-fns";import{getChildrenSize as s}from"../../utils/index.js";import{cloneDeep as d,range as c,flatten as p}from"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import{OTHER_MENU as m}from"../../constants/index.js";import"@vueuse/core";import{useTop as v}from"./useTop.js";import{useLeft as h}from"./useLeft.js";import{useCenter as f}from"./useCenter.js";import{useOther as g}from"./useOther.js";function y(y,w,x,b,j,C){const Y=l(),H=e(),S=e(),D=e(),A=t((()=>w.data.layout||{top:"drug",center:"xAxis",bottom:"intraoperatively"})),M=t((()=>{var e;return null!=(e=w.data.left.width)?e:0})),T=t((()=>{const{grid:e}=w.data;return e.mainXCell*e.subXCell})),X=t((()=>{const{grid:e}=w.data;return e.mainYCell*e.subYCell})),G=t((()=>{const{treeData:e=[],show:t=!0}=w.data.top;return t?s(e):0})),V=t((()=>w.data.top.tree.cellHeight)),k=t((()=>V.value*G.value)),P=t((()=>te(_("drug")||"top"))),L=t((()=>P.value+k.value)),N=t((()=>{var e;return Date.parse((null==(e=w.data.xAxis)?void 0:e.startTime)||u(new Date,"yyyy-MM-dd HH:mm:ss"))})),O=t((()=>{const e=d(w.data.xAxis),{spaceValue:t,spaceTimeStamp:a}=e,r=c(T.value/t+1).map((r=>0===r?e.startTime:u(new Date(N.value+r*t*a),"yyyy-MM-dd HH:mm:ss")));return{...e,list:r,left:M.value}})),E=function(){const{show:e=!0}=w.data.top;if(!e)return[];const t=d(w.data.top.treeData);let a=0;const{cellWidth:r,cellHeight:i}=w.data.top.tree;return function e(t,n=0){t.forEach((t=>{var l;const o={top:a*i+P.value,left:n*r,width:r,height:i};if(a++,null==(l=t.children)?void 0:l.length){a--;const r=s(t.children);o.height=r*i,e(t.children,n+1)}else o.width=M.value-o.left;Object.assign(t,o)}))}(t),t}(),W=t((()=>te(_("xAxis")||"center"))),I=t((()=>{var e;const{width:t,right:a}=w.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),q=t((()=>te(_("intraoperatively")||"bottom"))),z=t((()=>{var e;const{show:t=!0,height:a}=(null==(e=w.data.other)?void 0:e.mark)||{};return t&&a?a:0})),B=t((()=>q.value+(w.data.height-k.value-O.value.height-z.value))),F=t((()=>(I.value-M.value)/T.value)),J=t((()=>(B.value-q.value)/X.value)),K=t((()=>O.value.spaceTimeStamp/F.value)),Q=t((()=>{const{scaleValues:e}=w.data;return p(e.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:e.type,unit:e.unit,dataIndex:a}))))))})),R=t((()=>ae("pulse"))),U=t((()=>ae("temperature"))),Z=t((()=>{var e;return(null==(e=w.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),$=a({canvasWidth:w.data.width,canvasHeight:w.data.height,borderStyle:{...o,...w.data.borderStyle},pointSelectionStyle:w.data.pointSelectionStyle||{},grid:w.data.grid,top:w.data.top,left:w.data.left,other:w.data.other,topGridYNumber:r(G),topGridYCellHeight:r(V),topGridOriginY:r(P),topGridEndY:r(L),treeData:E,xAxis:r(O),originYXAxis:r(W),startTime:r(N),timeXCell:r(K),gridXNumber:r(T),gridYNumber:r(X),xCellWidth:r(F),yCellHeight:r(J),originX:r(M),endX:r(I),originY:r(q),endY:r(B),markHeight:r(z),itemList:r(Q),scaleValues:w.data.scaleValues,pulseYCell:r(R),temperatureYCell:r(U),event:r(Z),dialog:Y});function _(e){let t="";return Object.entries(A.value).some((([a,r])=>{if(r===e)return t=a,!0})),t}function ee(e){const t=A.value[e],a=O.value.height;switch(t){case"drug":return k.value;case"xAxis":return a;default:return w.data.height-k.value-a}}function te(e){switch(e){case"top":return 0;case"center":return ee("top");default:return ee("top")+ee("center")}}function ae(e){const{scaleValues:t}=w.data,a=t.find((t=>t.type===e));return J.value*(a.spaceGridNumber||1)/(a.spaceValue||1)}return i((async()=>{await n(),v(y,$,x,j);const{redrawPoints:e,clickMenu:t,moveLimit:a,setPopup:r,updateData:i,getGridPoints:l,getContainPoints:o,showDialog:u,removeCurrentSelection:s}=f(y,$,x,j,C);h(y,$,x,j,a,r,i,l);const{clickMenu:d}=g(y,$,x,j,C,a,o,u,s);S.value=e,D.value=e=>{const{item:a}=e;a.type&&m.map((e=>e.type)).includes(a.type)?d(e):t(e)}})),{propItems:$,redrawPoints:S,select:H,clickMenu:D}}export{y as useSurgicalAnesthesiaChart};
@@ -1 +1 @@
1
- import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useShadow as t}from"./useShadow.js";import{drawLine as i,defaultStyle as n,drawPoint as o,drawText as l,drawArrow as s}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import"date-fns";import{isOneLine as a,getType as u,isOverlapPoint as c,getFloorNumber as d,isValidValue as p,setOtherType as f,isEffectiveNode as h,getTime as v,getIndex as g,deleteProperty as y}from"../../utils/index.js";import"../useEvent.js";import{useCommon as m}from"../useCommon.js";import"vue";import{cloneDeep as x,flatten as b}from"lodash-es";import"naive-ui";import"@vueuse/core";import{TEMPERATURE_MENU as j,PAIN_MENU as w,OVERLAP as L}from"../../constants/index.js";function k(k,Y,E,M,$,O,C,P,A,I){r(k,Y);const{getEqualXTypes:R,handleAddPrevent:T}=m(k,E,Y),{createShadowLines:V}=t(),{left:X,xScaleList:z,xCellWidth:D,yCellHeight:F,originX:H,endX:_,originY:W,endY:q,itemList:G,event:B,vitalSignsOriginY:J,painOriginY:K,hospitalizationDate:N,config:Q,canvasHeight:U}=Y,Z=new Set,ee=["xinmai","mai"],te=new Map,ie=new Set,ne=new Set,oe=new Set,le=x(X.yScaleValue);function se(t){var o;const l=le.find((e=>"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(Z.size&&k.value.remove(...Z),Z.clear(),te.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=te.get(i),n=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(n,1,[t.left,t.top])}}const o=function(){const e=[],t=[],i=[];for(const e of te)t.push(e[1]),e[0]===ee[0]&&e[1].forEach((e=>{(te.get(ee[1])||[]).findIndex((t=>t[0]===e[0]))>-1&&i.push(e[0])}));const[n,o]=t;let l=[],s=[];return i.forEach((t=>{const i=n.findIndex((e=>e[0]===t)),r=o.findIndex((e=>e[0]===t)),a=n[i],u=o[r],c=n[i-1],d=n[i+1],p=o[r-1],f=o[r+1];if(c&&p){if(c[0]!==p[0]){const e=Math.max(c[0],p[0]);l.push([c,p].find((t=>t[0]===e)))}}else c?l.push(c):p&&s.push(p);const h=Math.min(a[1],u[1]);l.push([a,u].find((e=>e[1]===h)));const v=Math.max(a[1],u[1]);s.push([a,u].find((e=>e[1]===v)));const g=()=>{const t=[...l,...s.reverse()],[i]=t,n=t.at(-1);i[0]===n[0]&&i[1]===n[1]&&t.splice(-1,1),e.push(t),l=[],s=[]};if(d&&f){if(d[0]!==f[0]){const e=Math.min(d[0],f[0]);l.push([d,f].find((t=>t[0]===e))),g()}}else d?(l.push(d),g()):f?(s.push(f),g()):g()})),e}(),{mode:s,style:r={}}=l.shadow||{};o.forEach((t=>{const o=t.map((e=>({x:e[0],y:e[1]}))),l=new e.Polygon(o,{...n,...r,strokeWidth:1});if(["slash","line"].includes(s)){l.set({fill:"transparent",stroke:r.stroke||"#f00"});const e=[];if(["slash"].includes(s))e.push(...V(t,r._angle,r.space)),e.forEach((e=>{Object.assign(e,{...n,...r}),Z.add(e)}));else{const n=function(e){const t=e.reduce(((e,t)=>{const i=Math.trunc(t[0]);return e[i]=e[i]?e[i].concat([t]):[t],e}),{}),i=Object.values(t).filter((e=>2===e.length&&Math.trunc(e[0][1])!==Math.trunc(e[1][1])));return i}(t);n.forEach((t=>{const n=i([...b(t)],{...r,originX:"center"});e.push(n),Z.add(n)}))}k.value.add(...e)}Z.add(l),k.value.add(l)}))}}function re(){var e;const t=le.find((e=>"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>e.title.includes("脉搏"))))return;const i=Object.assign({},L,X.overlap||{}),l=[];ie.size&&[...ie].forEach((e=>{[...ne].forEach((t=>{if(t.origin&&c(e,t)){const e=t.origin.key;if(e){const s={left:t.left,top:t.top,...n,hoverCursor:"default"};let r="koumai";"yemai"===e&&(r=e),"humai"===e&&(r="circle"),l.push(o(r,{...i[e]||{},...s}))}}}))})),setTimeout((()=>{k.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),oe.add(e)}))}))}function ae(e,t,r){var u;const{type:c,riseStyle:h={},noRiseStyle:v={},verifiedStyle:g={},reduceStyle:y={},pacemaker:m={},upArrowStyle:x={},limitValueStyle:b={},nonePainPointStyle:j={},belowMinValueStyle:w={},dataList:L=[],list:M=[]}=r,{type:O,textStyle:P,showConnectLine:I=!1}=j,R=[],T=[],V=[];let X=null;if(null==(u=e.list)||u.forEach(((u,j)=>{const z=a(c)?L.find((e=>e.key===u.key)):e,H=de(u,r),_=e.list[j+1],W=_?de(_,r):void 0,q=_?a(c)?L.find((e=>e.key===_.key)):e:{},{title:G=""}=z;if("脉搏"===G&&"脉搏"!==q.title||"脉搏"!==G&&"脉搏"===q.title||!H||!W||d(H[0],1)!==d(W[0],1))H&&X&&(H[0]=X),X=null;else{const e=H[0]-D/2;H[0]=e+D/4,W[0]=X=H[0]+D/2}const N={};N.value=function(e,t,i){if(!(null==e?void 0:e.length)||!Q.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=J.originY+F?e[1]+F:e[1]-F,s=l([e[0],o],{value:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return V.push(s),{obj:s,top:-F}}(H,u,z),function(e,t,r,a){var u,d;if(!(null==e?void 0:e.length)||!["temperature","pain"].includes(c))return;const{lineAttr:f={}}=r,{value:m}=a;let x,b,j,w,L;if(t.noRise&&v.show){const t=S(v)?$(c,M,35):e[1];if(v.text)j=l([e[0],S(v)?t:t+5],{value:v.text.split("").join("\n"),originY:"top",...v.style});else{const i=t+2*F;j=s([e[0],t,i],{...v.style})}V.push(j)}t.rise&&h.show&&h.text&&(w=l([e[0],e[1]-(m?F:0)-5],{value:h.text.split("").join("\n"),originY:"bottom",...h.style}),V.push(w));t.verified&&(L=l([e[0],e[1]-(m?F:0)-5],{value:"v",originX:"center",originY:"bottom",...g}),V.push(L));if(p(t.physicsReduce)||p(t.drugReduce)){const l=$(c,M,null!=(u=t.physicsReduce)?u:t.drugReduce),s=l<e[1]&&(null==Q?void 0:Q.hypothermyViewCustom)?e[0]+D/2:e[0];x=i([...e,s,l],{...f,...y.line,...n}),b=o((null==(d=null==y?void 0:y.point)?void 0:d.type)||"circle",{left:s,top:l,...y.point,...n,originY:l===U?"bottom":"center"}),x&&V.push(x),b&&V.push(b)}Object.assign(a,{reduceLine:{obj:x,type:"line"},noRiseText:{obj:j,top:v.text?5:2*F,isFixed:S(v)},riseText:{obj:w,top:(m?-F:0)-5},verifiedText:{obj:L,top:(m?-F:0)-5},reducePoint:{obj:b,type:"reduce"}})}(H,u,z,N),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(c))return;const o=Math.max(...M),r=Math.min(...M);let a,u,d;const{upArrowShow:p=!1,limitValueShow:f=!1}=i;if(p&&+t.value>180){let t=e[1]-2.5*F,i=[e[1]-F/2,t];t<J.originY&&(t=e[1]+2.5*F,i=[t,e[1]+F/2]),a=s([e[0],i[0],i[1]],x,"up"),V.push(a)}if(f){const i={value:t.value,originX:"center",originY:"center",...b};if(+t.value>o){const t=a?e[1]+F/2+a.height:e[1]+F;u=l([e[0],t],i),V.push(u)}+t.value<r&&(u=l([e[0],e[1]-F],i),V.push(u))}if(w.show&&+t.value<r){const t=e[1];if(w.text)d=l([e[0],e[1]+5],{value:w.text.split("").join("\n"),originY:"top",...w.style});else{const i=t+2*F;d=s([e[0],t,i],{...w.style})}V.push(d)}Object.assign(n,{upArrow:{obj:a},limitValue:{obj:u,top:-F},belowMinValue:{obj:d,top:w.text?5:2*F,moveHide:!0}})}(H,u,z,N),function(n,l,s,a,u,d){let p,h;const{pointAttr:v={},lineAttr:g={},title:y="",key:x,type:b="circle"}=u,j=e.list[a+1],w=ue(c,e.list[a].value),L=l&&ue(c,j.value);if(n&&l&&!s.breakpoint&&(!w&&!L||I)){h=i([...n,...l],{...g});const{obj:e}=(null==d?void 0:d.reducePoint)||{};if((null==e?void 0:e.top)<n[1]&&(null==Q?void 0:Q.hypothermyViewCustom)){const t=i([e.left,e.top,...l],{...g});V.unshift(t),Object.assign(d,{reduceRightLine:{obj:t,type:"reduce"}}),h.set("stroke","transparent")}}const S=s.pacemakerShow&&"pulse"==c?m.value:w&&"number"===O?0:b,M=T[a-1],$={origin:{data:s,title:y,key:x||"",unit:r.unit,type:c,_type:f(y,c),dataIndex:t,index:a},leftLine:M,rightLine:h,otherObj:d,lockMovementX:!0,...s.pacemakerShow&&"pulse"==c?m.style:v,...Y.event.hovered?Y.event.evented?{selectable:!0}:{selectable:!0,lockMovementY:!0}:Y.event,...w?{selectable:!1,evented:!1,..."number"===O?P:{}}:{}};n&&(M?$.leftLine.set("x2",n[0]):$.leftLine=null,p=o(S,{left:n[0],top:w?n[1]-5:n[1],...$}));T.push(h),p&&(y.includes("脉搏")?ie.add(p):ne.add(p),function(e){B.hovered&&(e.on("mouseover",(()=>{ce(e,"hover")})),e.on("mouseout",(()=>{A.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?K:J;e.top<t.originY&&e.set("top",t.originY);e.top>t.endY&&e.set("top",t.endY)}(e),function(e){var t,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(i=e.rightLine)||i.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:i,type:n="",top:o=0,isFixed:l,moveHide:s=!1}=t||{};"reduce"!==n&&i&&("line"===n?i.setCoords().set({x1:e.left,y1:e.top}):(l||i.setCoords().set({left:e.left,top:e.top+o}),s&&(k.value.remove(i),delete e.otherObj.obj)))})),se(e)}(e),B.hovered&&ce(e)})),e.on("mouseup",(t=>{if(A.show=!1,1===t.button){const{type:t}=e.origin,i=C(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};k.value.discardActiveObject(),E("change",n),fe(n,"change")}}))}(p),R.push(p),oe.add(p))}(H,W,u,j,z,N)})),"pulse"===c){const e={};ee.forEach((t=>{e[t]=R.filter((e=>{var i;return(null==(i=e.origin)?void 0:i.key)===t}))}));let t=null;ee.forEach((i=>{te.set(i,e[i].map(((e,i,n)=>{var o,l;const s=n[i+1];if(s&&d(e.left,1)===d(s.left,1)){const i=e.left-D/2;e.set("left",i+D/4),null==(o=e.rightLine)||o.set("x1",e.left),t=e.left+D/2,s.set("left",t)}else t&&(null==(l=e.leftLine)||l.set("x2",t),e.set("left",t)),t=null;return[e.left,e.top]})))}))}Promise.all(R).then((e=>{const t=T.filter((e=>e));Promise.all(V).then((i=>{k.value.add(...t,...e,...i),e.forEach((t=>{null==t||t.bringToFront(),function(e,t){if("pulse"===e.origin.type){t.filter((t=>t.left===e.left&&"pulse"===t.origin.type)).length>1&&(e.leftLine&&k.value.remove(e.leftLine),e.rightLine&&k.value.remove(e.rightLine))}}(t,e)}))}))}))}function ue(e,t){return"pain"===e&&0==t}function ce(e,t="moving"){const{title:i,unit:n,type:o,data:l}=e.origin;A.point={x:e.left,y:e.top},A.list=[function(){const{drugReduce:s,physicsReduce:r}=l||{},a="hover"===t?l.value:C(o,e.top);if(p(s))return`药物降${"pain"==o?"痛":"温"} ${a}—>${s}${n||""}`;if(p(r))return`物理降${"pain"==o?"痛":"温"} ${a}—>${r}${n||""}`;return`${i} ${a}${n||""}`}(),`时间 ${((null==l?void 0:l.time)||O(e.left)).slice(-5)}`],A.show=!0}function de(e,t){const i="pain"===t.type?K:J;if(!h(e)||!function(e){const[t]=z,i=z.at(-1),n=t.start,o=i.end,l=v(e);return l>=n&&l<=o}(e.time))return;const n=M(e.time),o=$(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}function pe(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=v(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=v(`${O(e)}:00`);return N&&l<v(N)?(T("exceedMin"),!1):!(l>o)||(T("exceedMax"),!1)}function fe(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=le.find((e=>e.type===i));if("add"===t){const e=a(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=g(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;he()}function he(){var e;oe.size&&(null==(e=k.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...oe]))),te.clear(),oe.clear(),ie.clear(),ne.clear(),le.forEach((e=>{e.dataList.forEach(((t,i)=>{a(e.type)&&!t.enable||ae(t,i,e)}))})),se(),re()}return te.clear(),ie.clear(),ne.clear(),le.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const t=$(e.type,e.list,e.positionLine.value),n=i([H,t,_,t],e.positionLine);k.value.add(n)}(e),e.dataList.forEach(((t,i)=>{!t.show||a(e.type)&&!t.enable||ae(t,i,e)}))})),se(),re(),k.value.on("mouse:up",(e=>{const{button:t,target:i,pointer:n={}}=e;if(3===t){if(!Y.event.evented)return;const{x:e=0,y:t=0}=n;if(e>=H&&e<=_&&t>=W&&t<=q){I.point={x:e,y:t},I.show=!0;const{type:o}=(null==i?void 0:i.origin)||{};if(i&&["temperature","pain"].includes(o))"temperature"===o&&(I.list=[...j]),"pain"===o&&(I.list=[...w]),I.target=i;else{I.target=null,I.list=["新增节点"],G.forEach((i=>{if(!R([...oe],e,"_type").includes(i.bigType)){const e=["pain"].includes(i.bigType)?K:J;t>=e.originY&&t<=e.endY&&I.list.push({renderItem:P?P(i):()=>i.title,origin:{title:i.title,unit:i.unit,type:u(i.bigType),dataIndex:i.dataIndex,key:i.key},pointer:n})}}));const i=pe(e);i&&1!==I.list.length||(I.show=!1,1===I.list.length&&i&&T("repeat"))}}}if(1===t){if(i)return;const{x:e=0,y:t=0}=n;e>=H&&e<=_&&t>0&&t<U&&E("click:grid",{x:e,y:t,time:O(e)})}})),{clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=y(i,[...j,...w]);s[`${e.type}`]=e.value,a(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};E("change",r),fe(r,"change")}else{const t={data:{time:O(e.pointer.x),value:C(e.origin.type,e.pointer.y),...a(e.origin.type)?{key:e.origin.key}:{}},...e.origin};E("add",t),fe(t)}},setPopup:ce,isAddPoint:pe,updateData:fe,redrawPoints:he,gridPoints:oe}}function S(e){return"fixed"===e.position}export{k as useCenter};
1
+ import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useShadow as t}from"./useShadow.js";import{drawLine as i,defaultStyle as n,drawPoint as o,drawText as l,drawArrow as s}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import"date-fns";import{isOneLine as u,getType as a,isOverlapPoint as c,getFloorNumber as d,isValidValue as p,setOtherType as f,isEffectiveNode as h,getTime as v,getIndex as g,deleteProperty as y}from"../../utils/index.js";import{cloneDeep as m,flatten as x,last as b}from"lodash-es";import"../useEvent.js";import{useCommon as j}from"../useCommon.js";import"vue";import"naive-ui";import"@vueuse/core";import{TEMPERATURE_MENU as w,PAIN_MENU as L,OVERLAP as k}from"../../constants/index.js";function S(S,E,M,$,O,C,P,A,I,R){r(S,E);const{getEqualXTypes:T,handleAddPrevent:V}=j(S,M,E),{createShadowLines:X}=t(),{left:z,xScaleList:D,xCellWidth:F,yCellHeight:H,originX:_,endX:W,originY:q,endY:G,itemList:B,event:J,vitalSignsOriginY:K,painOriginY:N,hospitalizationDate:Q,config:U,canvasHeight:Z}=E,ee=new Set,te=["xinmai","mai"],ie=new Map,ne=new Set,oe=new Set,le=new Set,se=m(z.yScaleValue);function re(t){var o;const l=se.find((e=>"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(ee.size&&S.value.remove(...ee),ee.clear(),ie.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=ie.get(i),n=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(n,1,[t.left,t.top])}}const o=function(){const e=[],t=[],i=[];for(const e of ie)t.push(e[1]),e[0]===te[0]&&e[1].forEach((e=>{(ie.get(te[1])||[]).findIndex((t=>t[0]===e[0]))>-1&&i.push(e[0])}));const[n,o]=t;let l=[],s=[];return i.forEach((t=>{const i=n.findIndex((e=>e[0]===t)),r=o.findIndex((e=>e[0]===t)),u=n[i],a=o[r],c=n[i-1],d=n[i+1],p=o[r-1],f=o[r+1];if(c&&p){if(c[0]!==p[0]){const e=Math.max(c[0],p[0]);l.push([c,p].find((t=>t[0]===e)))}}else c?l.push(c):p&&s.push(p);const h=Math.min(u[1],a[1]);l.push([u,a].find((e=>e[1]===h)));const v=Math.max(u[1],a[1]);s.push([u,a].find((e=>e[1]===v)));const g=()=>{const t=[...l,...s.reverse()],[i]=t,n=b(t);i[0]===n[0]&&i[1]===n[1]&&t.splice(-1,1),e.push(t),l=[],s=[]};if(d&&f){if(d[0]!==f[0]){const e=Math.min(d[0],f[0]);l.push([d,f].find((t=>t[0]===e))),g()}}else d?(l.push(d),g()):f?(s.push(f),g()):g()})),e}(),{mode:s,style:r={}}=l.shadow||{};o.forEach((t=>{const o=t.map((e=>({x:e[0],y:e[1]}))),l=new e.Polygon(o,{...n,...r,strokeWidth:1});if(["slash","line"].includes(s)){l.set({fill:"transparent",stroke:r.stroke||"#f00"});const e=[];if(["slash"].includes(s))e.push(...X(t,r._angle,r.space)),e.forEach((e=>{Object.assign(e,{...n,...r}),ee.add(e)}));else{const n=function(e){const t=e.reduce(((e,t)=>{const i=Math.trunc(t[0]);return e[i]=e[i]?e[i].concat([t]):[t],e}),{}),i=Object.values(t).filter((e=>2===e.length&&Math.trunc(e[0][1])!==Math.trunc(e[1][1])));return i}(t);n.forEach((t=>{const n=i([...x(t)],{...r,originX:"center"});e.push(n),ee.add(n)}))}S.value.add(...e)}ee.add(l),S.value.add(l)}))}}function ue(){var e;const t=se.find((e=>"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>e.title.includes("脉搏"))))return;const i=Object.assign({},k,z.overlap||{}),l=[];ne.size&&[...ne].forEach((e=>{[...oe].forEach((t=>{if(t.origin&&c(e,t)){const e=t.origin.key;if(e){const s={left:t.left,top:t.top,...n,hoverCursor:"default"};let r="koumai";"yemai"===e&&(r=e),"humai"===e&&(r="circle"),l.push(o(r,{...i[e]||{},...s}))}}}))})),setTimeout((()=>{S.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),le.add(e)}))}))}function ae(e,t,r){var a;const{type:c,riseStyle:h={},noRiseStyle:v={},verifiedStyle:g={},reduceStyle:y={},pacemaker:m={},upArrowStyle:x={},limitValueStyle:b={},nonePainPointStyle:j={},belowMinValueStyle:w={},dataList:L=[],list:k=[]}=r,{type:$,textStyle:C,showConnectLine:A=!1}=j,R=[],T=[],V=[];let X=null;if(null==(a=e.list)||a.forEach(((a,j)=>{const z=u(c)?L.find((e=>e.key===a.key)):e,D=pe(a,r),_=e.list[j+1],W=_?pe(_,r):void 0,q=_?u(c)?L.find((e=>e.key===_.key)):e:{},{title:G=""}=z;if("脉搏"===G&&"脉搏"!==q.title||"脉搏"!==G&&"脉搏"===q.title||!D||!W||d(D[0],1)!==d(W[0],1))D&&X&&(D[0]=X),X=null;else{const e=D[0]-F/2;D[0]=e+F/4,W[0]=X=D[0]+F/2}const B={};B.value=function(e,t,i){if(!(null==e?void 0:e.length)||!U.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=K.originY+H?e[1]+H:e[1]-H,s=l([e[0],o],{value:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return V.push(s),{obj:s,top:-H}}(D,a,z),function(e,t,r,u){var a,d;if(!(null==e?void 0:e.length)||!["temperature","pain"].includes(c))return;const{lineAttr:f={}}=r,{value:m}=u;let x,b,j,w,L;if(t.noRise&&v.show){const t=Y(v)?O(c,k,35):e[1];if(v.text)j=l([e[0],Y(v)?t:t+5],{value:v.text.split("").join("\n"),originY:"top",...v.style});else{const i=t+2*H;j=s([e[0],t,i],{...v.style})}V.push(j)}t.rise&&h.show&&h.text&&(w=l([e[0],e[1]-(m?H:0)-5],{value:h.text.split("").join("\n"),originY:"bottom",...h.style}),V.push(w));t.verified&&(L=l([e[0],e[1]-(m?H:0)-5],{value:"v",originX:"center",originY:"bottom",...g}),V.push(L));if(p(t.physicsReduce)||p(t.drugReduce)){const l=O(c,k,null!=(a=t.physicsReduce)?a:t.drugReduce),s=l<e[1]&&(null==U?void 0:U.hypothermyViewCustom)?e[0]+F/2:e[0];x=i([...e,s,l],{...f,...y.line,...n}),b=o((null==(d=null==y?void 0:y.point)?void 0:d.type)||"circle",{left:s,top:l,...y.point,...n,originY:l===Z?"bottom":"center"}),x&&V.push(x),b&&V.push(b)}Object.assign(u,{reduceLine:{obj:x,type:"line"},noRiseText:{obj:j,top:v.text?5:2*H,isFixed:Y(v)},riseText:{obj:w,top:(m?-H:0)-5},verifiedText:{obj:L,top:(m?-H:0)-5},reducePoint:{obj:b,type:"reduce"}})}(D,a,z,B),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(c))return;const o=Math.max(...k),r=Math.min(...k);let u,a,d;const{upArrowShow:p=!1,limitValueShow:f=!1}=i;if(p&&+t.value>180){let t=e[1]-2.5*H,i=[e[1]-H/2,t];t<K.originY&&(t=e[1]+2.5*H,i=[t,e[1]+H/2]),u=s([e[0],i[0],i[1]],x,"up"),V.push(u)}if(f){const i={value:t.value,originX:"center",originY:"center",...b};if(+t.value>o){const t=u?e[1]+H/2+u.height:e[1]+H;a=l([e[0],t],i),V.push(a)}+t.value<r&&(a=l([e[0],e[1]-H],i),V.push(a))}if(w.show&&+t.value<r){const t=e[1];if(w.text)d=l([e[0],e[1]+5],{value:w.text.split("").join("\n"),originY:"top",...w.style});else{const i=t+2*H;d=s([e[0],t,i],{...w.style})}V.push(d)}Object.assign(n,{upArrow:{obj:u},limitValue:{obj:a,top:-H},belowMinValue:{obj:d,top:w.text?5:2*H,moveHide:!0}})}(D,a,z,B),function(n,l,s,u,a,d){let p,h;const{pointAttr:v={},lineAttr:g={},title:y="",key:x,type:b="circle"}=a,j=e.list[u+1],w=ce(c,e.list[u].value),L=l&&ce(c,j.value);if(n&&l&&!s.breakpoint&&(!w&&!L||A)){h=i([...n,...l],{...g});const{obj:e}=(null==d?void 0:d.reducePoint)||{};if((null==e?void 0:e.top)<n[1]&&(null==U?void 0:U.hypothermyViewCustom)){const t=i([e.left,e.top,...l],{...g});V.unshift(t),Object.assign(d,{reduceRightLine:{obj:t,type:"reduce"}}),h.set("stroke","transparent")}}const k=s.pacemakerShow&&"pulse"==c?m.value:w&&"number"===$?0:b,Y=T[u-1],O={origin:{data:s,title:y,key:x||"",unit:r.unit,type:c,_type:f(y,c),dataIndex:t,index:u},leftLine:Y,rightLine:h,otherObj:d,lockMovementX:!0,...s.pacemakerShow&&"pulse"==c?m.style:v,...E.event.hovered?E.event.evented?{selectable:!0}:{selectable:!0,lockMovementY:!0}:E.event,...w?{selectable:!1,evented:!1,..."number"===$?C:{}}:{}};n&&(Y?O.leftLine.set("x2",n[0]):O.leftLine=null,p=o(k,{left:n[0],top:w?n[1]-5:n[1],...O}));T.push(h),p&&(y.includes("脉搏")?ne.add(p):oe.add(p),function(e){J.hovered&&(e.on("mouseover",(()=>{de(e,"hover")})),e.on("mouseout",(()=>{I.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?N:K;e.top<t.originY&&e.set("top",t.originY);e.top>t.endY&&e.set("top",t.endY)}(e),function(e){var t,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(i=e.rightLine)||i.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:i,type:n="",top:o=0,isFixed:l,moveHide:s=!1}=t||{};"reduce"!==n&&i&&("line"===n?i.setCoords().set({x1:e.left,y1:e.top}):(l||i.setCoords().set({left:e.left,top:e.top+o}),s&&(S.value.remove(i),delete e.otherObj.obj)))})),re(e)}(e),J.hovered&&de(e)})),e.on("mouseup",(t=>{if(I.show=!1,1===t.button){const{type:t}=e.origin,i=P(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};S.value.discardActiveObject(),M("change",n),he(n,"change")}}))}(p),R.push(p),le.add(p))}(D,W,a,j,z,B)})),"pulse"===c){const e={};te.forEach((t=>{e[t]=R.filter((e=>{var i;return(null==(i=e.origin)?void 0:i.key)===t}))}));let t=null;te.forEach((i=>{ie.set(i,e[i].map(((e,i,n)=>{var o,l;const s=n[i+1];if(s&&d(e.left,1)===d(s.left,1)){const i=e.left-F/2;e.set("left",i+F/4),null==(o=e.rightLine)||o.set("x1",e.left),t=e.left+F/2,s.set("left",t)}else t&&(null==(l=e.leftLine)||l.set("x2",t),e.set("left",t)),t=null;return[e.left,e.top]})))}))}Promise.all(R).then((e=>{const t=T.filter((e=>e));Promise.all(V).then((i=>{S.value.add(...t,...e,...i),e.forEach((t=>{null==t||t.bringToFront(),function(e,t){if("pulse"===e.origin.type){t.filter((t=>t.left===e.left&&"pulse"===t.origin.type)).length>1&&(e.leftLine&&S.value.remove(e.leftLine),e.rightLine&&S.value.remove(e.rightLine))}}(t,e)}))}))}))}function ce(e,t){return"pain"===e&&0==t}function de(e,t="moving"){const{title:i,unit:n,type:o,data:l}=e.origin;I.point={x:e.left,y:e.top},I.list=[function(){const{drugReduce:s,physicsReduce:r}=l||{},u="hover"===t?l.value:P(o,e.top);if(p(s))return`药物降${"pain"==o?"痛":"温"} ${u}—>${s}${n||""}`;if(p(r))return`物理降${"pain"==o?"痛":"温"} ${u}—>${r}${n||""}`;return`${i} ${u}${n||""}`}(),`时间 ${((null==l?void 0:l.time)||C(e.left)).slice(-5)}`],I.show=!0}function pe(e,t){const i="pain"===t.type?N:K;if(!h(e)||!function(e){const[t]=D,i=b(D),n=t.start,o=i.end,l=v(e);return l>=n&&l<=o}(e.time))return;const n=$(e.time),o=O(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}function fe(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=v(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=v(`${C(e)}:00`);return Q&&l<v(Q)?(V("exceedMin"),!1):!(l>o)||(V("exceedMax"),!1)}function he(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=se.find((e=>e.type===i));if("add"===t){const e=u(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=g(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;ve()}function ve(){var e;le.size&&(null==(e=S.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...le]))),ie.clear(),le.clear(),ne.clear(),oe.clear(),se.forEach((e=>{e.dataList.forEach(((t,i)=>{u(e.type)&&!t.enable||ae(t,i,e)}))})),re(),ue()}return ie.clear(),ne.clear(),oe.clear(),se.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const t=O(e.type,e.list,e.positionLine.value),n=i([_,t,W,t],e.positionLine);S.value.add(n)}(e),e.dataList.forEach(((t,i)=>{!t.show||u(e.type)&&!t.enable||ae(t,i,e)}))})),re(),ue(),S.value.on("mouse:up",(e=>{const{button:t,target:i,pointer:n={}}=e;if(3===t){if(!E.event.evented)return;const{x:e=0,y:t=0}=n;if(e>=_&&e<=W&&t>=q&&t<=G){R.point={x:e,y:t},R.show=!0;const{type:o}=(null==i?void 0:i.origin)||{};if(i&&["temperature","pain"].includes(o))"temperature"===o&&(R.list=[...w]),"pain"===o&&(R.list=[...L]),R.target=i;else{R.target=null,R.list=["新增节点"],B.forEach((i=>{if(!T([...le],e,"_type").includes(i.bigType)){const e=["pain"].includes(i.bigType)?N:K;t>=e.originY&&t<=e.endY&&R.list.push({renderItem:A?A(i):()=>i.title,origin:{title:i.title,unit:i.unit,type:a(i.bigType),dataIndex:i.dataIndex,key:i.key},pointer:n})}}));const i=fe(e);i&&1!==R.list.length||(R.show=!1,1===R.list.length&&i&&V("repeat"))}}}if(1===t){if(i)return;const{x:e=0,y:t=0}=n;e>=_&&e<=W&&t>0&&t<Z&&M("click:grid",{x:e,y:t,time:C(e)})}})),{clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=y(i,[...w,...L]);s[`${e.type}`]=e.value,u(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};M("change",r),he(r,"change")}else{const t={data:{time:C(e.pointer.x),value:P(e.origin.type,e.pointer.y),...u(e.origin.type)?{key:e.origin.key}:{}},...e.origin};M("add",t),he(t)}},setPopup:de,isAddPoint:fe,updateData:he,redrawPoints:ve,gridPoints:le}}function Y(e){return"fixed"===e.position}export{S as useCenter};
@@ -1 +1 @@
1
- import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,defaultTextStyle as i,defaultStyle as n,drawTextAndIconGroup as o,drawTextGroup as l}from"../useDraw.js";import"date-fns";import{getType as r,isOneLine as s}from"../../utils/index.js";import"../useEvent.js";import{getScaleInfo as u,drawScaleNumber as a,drawScaleLine as h}from"../useScaleColumn.js";import{useCommon as c}from"../useCommon.js";import"vue";import"lodash-es";import"./useShadow.js";import"naive-ui";import"@vueuse/core";function g(g,d,p,f,m,v,y,w,S,Y,b,x){var j,C;const{getEqualXTypes:X,handleAddPrevent:N,isGridLimit:T}=c(g,p,d),{originY:V,endY:L,originX:k,endX:E,xCellWidth:M,yCellHeight:W,left:G,vitalSignsOriginY:O,painOriginY:R,painHeight:A,iconsWidth:H,itemList:I,painIndex:_,right:B,canvasWidth:J,canvasHeight:$,getRightInfo:q,borderStyle:D,surplusCell:P}=d;function z(o){var r;if(!(null==o?void 0:o.length))return;const{layout:s}=o[0];let c=H,d=k;"right"===s&&(c=E,d=E+(null!=(r=null==B?void 0:B.width)?r:0));const p=[],f=A&&"right"!==s?o.length-1:o.length,m=(d-c)/f,v=m+(d-c)%f;o.forEach(((o,r)=>{if("pain"===o.type)return void function(n){const{list:o=[],spaceGridNumber:r=5,showScale:s,showNumber:h,position:c,showMaxMinNumber:d,style:p,title:f}=n,m=l({width:k-H,height:A,...D},{value:`${f}`,...i,...p||{}},{left:H,top:R.originY}),v=e([H,R.originY,k,R.originY],D),y=[];if(s||h){const{lineXMain:e,textLeft:i}=u(c,H,k-H),l=o.length;o.forEach(((o,u)=>{let c=R.endY-u*W*r;if(0===u&&(c=L-5),!h||(0===u||u===l-1)&&!d||y.push(a(o,n,i,c)),s&&0!==u){const[i,n]=e,o=new t.Line([i,c,n,c],{...D,...p});y.push(o)}}))}g.value.add(v,m,...y),m.sendToBack()}(o);const d=[],f=0===r?v:m,y=0===r?c:v+c+(r-1)*m,w="right"===s?0:O.originY,S="right"===s?$:O.endY,Y=r>0?e([y,w,y,S],{objectCaching:!1,...D}):null;Y&&d.push(Y);const b=y+f/2,{list:x=[],spaceGridNumber:j=5,showScale:C,showNumber:X,position:N,showMaxMinNumber:T,detailedList:E=[],showdetailedScale:M,showRange:G=[]}=o;if(C||X){const[t,e]=G,{lineXMain:i,lineXSub:n,textLeft:l}=u(N,y,f),r=(x[1]-x[0])/2,s=M&&!E.length?x.reduce(((t,e,i)=>{const n=t[t.length-1];return 0===i?[e]:t.concat([n+r,n+2*r])}),[]):M&&(null==E?void 0:E.length)?E:x,c=s.length;s.forEach(((r,s)=>{if(t&&+r<t)return;if(e&&+r>e)return;const u=O.endY-s*W*(M?j/2:j);if(X&&(!(0===s||s===c-1)||T)&&t!==+r){const t=0==s?u-5:u,e=a(r,o,l,t),i=O.originY+e.height/2;t<i&&e.set({top:i}),d.push(e)}d.push(...h(o,s,i,n,u,W,O.originY))}))}let I=o.title||"";o.unit&&(I+="\n"+o.unit);let B=O.originY+W;0!==_&&P[0]>1&&(B=V+W*P[0]/2),I&&d.push(new t.Text(String(I),{...i,left:b,top:B,textAlign:"center",...o.style}));const J=new t.Group(d,{...n,objectCaching:!1});p.push(J)}));const y=p.length>0?new t.Group([...p],{...n,objectCaching:!1}):null;y&&g.value.add(y),y&&y.sendToBack()}H&&function(){const t=JSON.parse(JSON.stringify(I));let e=L;const i=H-G.icons.marginRight;t.reverse().forEach((t=>{e-=10;let n=t.title.replace(/(.{2})/g,"$1\n");n.endsWith("\n")&&(n=n.slice(0,n.length-1));const{text:l,icon:u}=o(n,t,{text:{left:i-(t.pointAttr.width||10)-5,top:e,originX:"right"},icon:{originX:"right",left:i,topY:e,origin:{type:r(t.bigType),_type:t.bigType},...d.event}});var a;e-=l.height||30,(a=u).on("moving",(()=>{a.set("originX","center"),function(t){if(t.left>=k&&t.left<=E){t.setCoords();const e="pain"===t.origin.type?R:O;t.top<e.originY&&t.set("top",e.originY),t.top>e.endY&&t.set("top",e.endY)}}(a),T(a)?f(a):m.show=!1})),a.on("mouseup:before",(t=>{if(m.show=!1,0===t.e.button&&T(a)){const t=X([...x],a.left,"_type").includes(a.origin._type),e=Y(a.left);if(!e||t)t&&e&&N("repeat");else{const t={data:{time:w(a.left),value:S(a.origin.type,a.top),...s(a.origin.type)?{key:a.origin.key}:{}},...a.origin};p("add",t),b(t)}}!function(t){t.setCoords().set({originX:"right",left:t.originLeft,top:t.originTop})}(a)})),g.value.add(l,u)}))}();const F=G.yScaleValue.filter((t=>"left"===t.layout&&"pain"!==t.type&&t.show));if((null==B?void 0:B.width)&&"left"===(null==(j=null==B?void 0:B.yScaleValue)?void 0:j.layout)&&(null==(C=null==B?void 0:B.yScaleValue)?void 0:C.show)&&F.push(q),_>0&&G.yScaleValue[_].show){const t=G.yScaleValue[_];0===_&&G.yScaleValue.length>1&&F.unshift(t),_==G.yScaleValue.length-1&&F.push(t)}const K=F.findIndex((t=>"pulse"===t.type&&t.show&&t.doubleShow)),Q=F[K];return K>-1&&F.splice(K,0,{...Q,title:(null==Q?void 0:Q.doubleTitle)||(null==Q?void 0:Q.title)}),z(F),g.value.add(new t.Rect({left:H,top:0,width:J-H-D.strokeWidth,height:$-D.strokeWidth,fill:"transparent",...D})),{drawScaleValue:z}}export{g as useLeft};
1
+ import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,defaultTextStyle as i,defaultStyle as n,drawTextAndIconGroup as o,drawTextGroup as l}from"../useDraw.js";import"date-fns";import{getType as r,isOneLine as s}from"../../utils/index.js";import"lodash-es";import"../useEvent.js";import{getScaleInfo as u,drawScaleNumber as a,drawScaleLine as h}from"../useScaleColumn.js";import{useCommon as c}from"../useCommon.js";import"vue";import"./useShadow.js";import"naive-ui";import"@vueuse/core";function g(g,d,p,f,m,v,y,w,S,Y,b,x){var j,C;const{getEqualXTypes:X,handleAddPrevent:N,isGridLimit:T}=c(g,p,d),{originY:V,endY:L,originX:k,endX:E,xCellWidth:M,yCellHeight:W,left:G,vitalSignsOriginY:O,painOriginY:R,painHeight:A,iconsWidth:H,itemList:I,painIndex:_,right:B,canvasWidth:J,canvasHeight:$,getRightInfo:q,borderStyle:D,surplusCell:P}=d;function z(o){var r;if(!(null==o?void 0:o.length))return;const{layout:s}=o[0];let c=H,d=k;"right"===s&&(c=E,d=E+(null!=(r=null==B?void 0:B.width)?r:0));const p=[],f=A&&"right"!==s?o.length-1:o.length,m=(d-c)/f,v=m+(d-c)%f;o.forEach(((o,r)=>{if("pain"===o.type)return void function(n){const{list:o=[],spaceGridNumber:r=5,showScale:s,showNumber:h,position:c,showMaxMinNumber:d,style:p,title:f}=n,m=l({width:k-H,height:A,...D},{value:`${f}`,...i,...p||{}},{left:H,top:R.originY}),v=e([H,R.originY,k,R.originY],D),y=[];if(s||h){const{lineXMain:e,textLeft:i}=u(c,H,k-H),l=o.length;o.forEach(((o,u)=>{let c=R.endY-u*W*r;if(0===u&&(c=L-5),!h||(0===u||u===l-1)&&!d||y.push(a(o,n,i,c)),s&&0!==u){const[i,n]=e,o=new t.Line([i,c,n,c],{...D,...p});y.push(o)}}))}g.value.add(v,m,...y),m.sendToBack()}(o);const d=[],f=0===r?v:m,y=0===r?c:v+c+(r-1)*m,w="right"===s?0:O.originY,S="right"===s?$:O.endY,Y=r>0?e([y,w,y,S],{objectCaching:!1,...D}):null;Y&&d.push(Y);const b=y+f/2,{list:x=[],spaceGridNumber:j=5,showScale:C,showNumber:X,position:N,showMaxMinNumber:T,detailedList:E=[],showdetailedScale:M,showRange:G=[]}=o;if(C||X){const[t,e]=G,{lineXMain:i,lineXSub:n,textLeft:l}=u(N,y,f),r=(x[1]-x[0])/2,s=M&&!E.length?x.reduce(((t,e,i)=>{const n=t[t.length-1];return 0===i?[e]:t.concat([n+r,n+2*r])}),[]):M&&(null==E?void 0:E.length)?E:x,c=s.length;s.forEach(((r,s)=>{if(t&&+r<t)return;if(e&&+r>e)return;const u=O.endY-s*W*(M?j/2:j);if(X&&(!(0===s||s===c-1)||T)&&t!==+r){const t=0==s?u-5:u,e=a(r,o,l,t),i=O.originY+e.height/2;t<i&&e.set({top:i}),d.push(e)}d.push(...h(o,s,i,n,u,W,O.originY))}))}let I=o.title||"";o.unit&&(I+="\n"+o.unit);let B=O.originY+W;0!==_&&P[0]>1&&(B=V+W*P[0]/2),I&&d.push(new t.Text(String(I),{...i,left:b,top:B,textAlign:"center",...o.style}));const J=new t.Group(d,{...n,objectCaching:!1});p.push(J)}));const y=p.length>0?new t.Group([...p],{...n,objectCaching:!1}):null;y&&g.value.add(y),y&&y.sendToBack()}H&&function(){const t=JSON.parse(JSON.stringify(I));let e=L;const i=H-G.icons.marginRight;t.reverse().forEach((t=>{e-=10;let n=t.title.replace(/(.{2})/g,"$1\n");n.endsWith("\n")&&(n=n.slice(0,n.length-1));const{text:l,icon:u}=o(n,t,{text:{left:i-(t.pointAttr.width||10)-5,top:e,originX:"right"},icon:{originX:"right",left:i,topY:e,origin:{type:r(t.bigType),_type:t.bigType},...d.event}});var a;e-=l.height||30,(a=u).on("moving",(()=>{a.set("originX","center"),function(t){if(t.left>=k&&t.left<=E){t.setCoords();const e="pain"===t.origin.type?R:O;t.top<e.originY&&t.set("top",e.originY),t.top>e.endY&&t.set("top",e.endY)}}(a),T(a)?f(a):m.show=!1})),a.on("mouseup:before",(t=>{if(m.show=!1,0===t.e.button&&T(a)){const t=X([...x],a.left,"_type").includes(a.origin._type),e=Y(a.left);if(!e||t)t&&e&&N("repeat");else{const t={data:{time:w(a.left),value:S(a.origin.type,a.top),...s(a.origin.type)?{key:a.origin.key}:{}},...a.origin};p("add",t),b(t)}}!function(t){t.setCoords().set({originX:"right",left:t.originLeft,top:t.originTop})}(a)})),g.value.add(l,u)}))}();const F=G.yScaleValue.filter((t=>"left"===t.layout&&"pain"!==t.type&&t.show));if((null==B?void 0:B.width)&&"left"===(null==(j=null==B?void 0:B.yScaleValue)?void 0:j.layout)&&(null==(C=null==B?void 0:B.yScaleValue)?void 0:C.show)&&F.push(q),_>0&&G.yScaleValue[_].show){const t=G.yScaleValue[_];0===_&&G.yScaleValue.length>1&&F.unshift(t),_==G.yScaleValue.length-1&&F.push(t)}const K=F.findIndex((t=>"pulse"===t.type&&t.show&&t.doubleShow)),Q=F[K];return K>-1&&F.splice(K,0,{...Q,title:(null==Q?void 0:Q.doubleTitle)||(null==Q?void 0:Q.title)}),z(F),g.value.add(new t.Rect({left:H,top:0,width:J-H-D.strokeWidth,height:$-D.strokeWidth,fill:"transparent",...D})),{drawScaleValue:z}}export{g as useLeft};
@@ -1 +1 @@
1
- import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as e}from"../useDraw.js";import"date-fns";import"lodash-es";import"../useEvent.js";import"vue";import"./useShadow.js";import"naive-ui";import"@vueuse/core";function i(i,n,o,l){const{other:r,vitalSignsOriginY:s,xCellWidth:h,yCellHeight:a,endX:u}=n;let c=0;function f(n,l,s){const u=[];String(n.value).split("").forEach(((i,o)=>{const l=new t.Text(i,{left:0,top:a*o,originX:"center",...e,objectCaching:!1,...n.style||{}});c=(a-(l.height||0))/2,u.push(l)}));const f=new t.Rect({left:0,top:0,width:h,height:a*u.length,fill:"transparent",originX:"center",...e}),{eventHighlight:g=!1}=r||{},p={originX:"center",left:l,top:s+c,baseTop:(n.baseTop||0)*a,trueLeft:l,trueHeight:u.length*a,objectCaching:!1,hoverCursor:"pointer",highlightObject:f,originData:n,selectable:!1,evented:g},v=new t.Group([f,...u],p);return function(t){const{highlightColor:e="#ffff00"}=r||{};t.on("mouseover",(()=>{t.highlightObject.set("fill",e),i.value.requestRenderAll()})),t.on("mouseout",(()=>{t.highlightObject.set("fill","transparent"),i.value.requestRenderAll()})),t.on("mousedown",(function(){o("eventClick",t.originData)}))}(v),i.value.add(v),v}!function(){if(!(null==r?void 0:r.list))return!1;const t=[],e=[];r.list.forEach(((t,i)=>{const n=0===i?"vertical":t.align||"vertical",o=l(t.time,!0);if(o>u)return;const r=e.find((t=>t.left==o));if(r)r[n].push(t);else{const i={left:o,vertical:[],horizontal:[]};i[n].push(t),e.push(i)}})),e.forEach((e=>{let i=s.originY,n=e.left;e.vertical.forEach(((o,l)=>{var r,u;const c=(o.baseTop||0)*a,g=(null==(r=t.at(-1))?void 0:r.left)||0;0===l&&e.left<=g&&(n=g+h);if(t.filter((t=>t.trueLeft===n)).length){const e=String(o.value).length*a,l=(null==(u=t.at(-1))?void 0:u.trueHeight)||0;i+=l,i+e+c>s.endY&&(i=s.originY,n+=h)}i+=c,String(o.value).length&&t.push(f(o,n,i))})),e.horizontal.forEach(((i,o)=>{var l;const r=s.originY+(i.baseTop||0)*a,u=(null==(l=t.at(-1))?void 0:l.left)||0;e.left<=u&&(n=u+h),String(i.value).length&&t.push(f(i,n,r))}))}))}()}export{i as useOther};
1
+ import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as e}from"../useDraw.js";import"date-fns";import{last as i}from"lodash-es";import"../useEvent.js";import"vue";import"./useShadow.js";import"naive-ui";import"@vueuse/core";function n(n,o,r,l){const{other:s,vitalSignsOriginY:h,xCellWidth:a,yCellHeight:u,endX:c}=o;let f=0;function g(i,o,l){const h=[];String(i.value).split("").forEach(((n,o)=>{const r=new t.Text(n,{left:0,top:u*o,originX:"center",...e,objectCaching:!1,...i.style||{}});f=(u-(r.height||0))/2,h.push(r)}));const c=new t.Rect({left:0,top:0,width:a,height:u*h.length,fill:"transparent",originX:"center",...e}),{eventHighlight:g=!1}=s||{},p={originX:"center",left:o,top:l+f,baseTop:(i.baseTop||0)*u,trueLeft:o,trueHeight:h.length*u,objectCaching:!1,hoverCursor:"pointer",highlightObject:c,originData:i,selectable:!1,evented:g},v=new t.Group([c,...h],p);return function(t){const{highlightColor:e="#ffff00"}=s||{};t.on("mouseover",(()=>{t.highlightObject.set("fill",e),n.value.requestRenderAll()})),t.on("mouseout",(()=>{t.highlightObject.set("fill","transparent"),n.value.requestRenderAll()})),t.on("mousedown",(function(){r("eventClick",t.originData)}))}(v),n.value.add(v),v}!function(){if(!(null==s?void 0:s.list))return!1;const t=[],e=[];s.list.forEach(((t,i)=>{const n=0===i?"vertical":t.align||"vertical",o=l(t.time,!0);if(o>c)return;const r=e.find((t=>t.left==o));if(r)r[n].push(t);else{const i={left:o,vertical:[],horizontal:[]};i[n].push(t),e.push(i)}})),e.forEach((e=>{let n=h.originY,o=e.left;e.vertical.forEach(((r,l)=>{var s,c;const f=(r.baseTop||0)*u,p=(null==(s=i(t))?void 0:s.left)||0;0===l&&e.left<=p&&(o=p+a);if(t.filter((t=>t.trueLeft===o)).length){const e=String(r.value).length*u,l=(null==(c=i(t))?void 0:c.trueHeight)||0;n+=l,n+e+f>h.endY&&(n=h.originY,o+=a)}n+=f,String(r.value).length&&t.push(g(r,o,n))})),e.horizontal.forEach(((n,r)=>{var l;const s=h.originY+(n.baseTop||0)*u,c=(null==(l=i(t))?void 0:l.left)||0;e.left<=c&&(o=c+a),String(n.value).length&&t.push(g(n,o,s))}))}))}()}export{n as useOther};
@@ -1 +1 @@
1
- import{format as n}from"date-fns";import{getTime as t,getFloorNumber as e}from"../utils/index.js";function i(i){const{xScaleList:u,xCellWidth:l,left:r,vitalSignsOriginY:o,painOriginY:c,canvasWidth:a}=i;return{computedX:function(n,e=!1){const i=t(n),[l]=u,r=u.at(-1);if(i<l.start)return 0;if(i>r.end)return a;const o=u.findIndex((n=>n.end>=i));if(o>-1){return u[o].center}},computedY:function(n,t,e){const u=i[`${n}YCell`],l=+e-Math.min(...t);return("pain"===n?c.endY:o.endY)-u*l},getXValue:function(t){const e=u.findIndex((n=>n.left+l>=t));if(e>-1){const i=u[e],l=t-i.left,r=i.scaleCell*l,o=i.start+r;return n(new Date(o),"yyyy-MM-dd HH:mm")}},getYValue:function(n,t){var u;const l=i[`${n}YCell`],a=(null==(u=r.yScaleValue.find((t=>t.type===n)))?void 0:u.list)||[],d=a.length?Math.min(...a):0,f="pain"===n?c.endY:o.endY;return e((f-t)/l+d)}}}function u(i){const{xAxis:u,originX:l,originY:r,xCellWidth:o,endY:c,timeXCell:a,startTime:d,scaleValues:f}=i;return{computedX:function(n){return(t(n)-d)/a+l},computedY:function(n,t,e){const[u]=t;return c-(+e-u)*i[`${n}YCell`]},getXValue:function(t){return n(new Date((t-l)*a+d),"yyyy-MM-dd HH:mm")},getYValue:function(n,t){const u=f.find((t=>[t.key,t.type||""].includes(n))),[l]=(null==u?void 0:u.range)||[0],r=(c-t)/i[`${n}YCell`]+l;return e(r)}}}function l(n){const{config:t,xCellWidth:i,yCellHeight:u}=n,{hz:l,mainXCellValue:r,valueUnit:o,mainYCellValue:c}=t;return{computedX:function(n){return n/l/r*i},computedY:function(n){return("uv"===o?.001*n:"v"===o?1e3*n:n)/c*u},getXValue:function(n){return e(r/i*n)},getYValue:function(n){return e(c/u*n)}}}export{u as useBirthProcessCumputedPoint,i as useCumputedPoint,l as useElectrocardiogramCumputedPoint};
1
+ import{format as n}from"date-fns";import{getTime as e,getFloorNumber as t}from"../utils/index.js";import{last as i}from"lodash-es";function u(u){const{xScaleList:l,xCellWidth:r,left:o,vitalSignsOriginY:c,painOriginY:a,canvasWidth:d}=u;return{computedX:function(n,t=!1){const u=e(n),[r]=l,o=i(l);if(u<r.start)return 0;if(u>o.end)return d;const c=l.findIndex((n=>n.end>=u));if(c>-1){return l[c].center}},computedY:function(n,e,t){const i=u[`${n}YCell`],l=+t-Math.min(...e);return("pain"===n?a.endY:c.endY)-i*l},getXValue:function(e){const t=l.findIndex((n=>n.left+r>=e));if(t>-1){const i=l[t],u=e-i.left,r=i.scaleCell*u,o=i.start+r;return n(new Date(o),"yyyy-MM-dd HH:mm")}},getYValue:function(n,e){var i;const l=u[`${n}YCell`],r=(null==(i=o.yScaleValue.find((e=>e.type===n)))?void 0:i.list)||[],d=r.length?Math.min(...r):0,f="pain"===n?a.endY:c.endY;return t((f-e)/l+d)}}}function l(i){const{xAxis:u,originX:l,originY:r,xCellWidth:o,endY:c,timeXCell:a,startTime:d,scaleValues:f}=i;return{computedX:function(n){return(e(n)-d)/a+l},computedY:function(n,e,t){const[u]=e;return c-(+t-u)*i[`${n}YCell`]},getXValue:function(e){return n(new Date((e-l)*a+d),"yyyy-MM-dd HH:mm")},getYValue:function(n,e){const u=f.find((e=>[e.key,e.type||""].includes(n))),[l]=(null==u?void 0:u.range)||[0],r=(c-e)/i[`${n}YCell`]+l;return t(r)}}}function r(n){const{config:e,xCellWidth:i,yCellHeight:u}=n,{hz:l,mainXCellValue:r,valueUnit:o,mainYCellValue:c}=e;return{computedX:function(n){return n/l/r*i},computedY:function(n){return("uv"===o?.001*n:"v"===o?1e3*n:n)/c*u},getXValue:function(n){return t(r/i*n)},getYValue:function(n){return t(c/u*n)}}}export{l as useBirthProcessCumputedPoint,u as useCumputedPoint,r as useElectrocardiogramCumputedPoint};
@@ -1 +1 @@
1
- import{findAncestor as e,traverse as o}from"../../../../shared/utils/index.js";import{isFunction as t}from"lodash-es";import{unref as s}from"vue";import{FORM_CONFIG_GROUP as i}from"../constants/index.js";function a({group:a,hooks:r={},fieldList:n,materialList:c}={}){let l,m=null;return{move:function({to:i,from:a,dragged:m}){const{type:f,required:d,extra:u,key:g}=m.dataset||{};if("LINE_BAR"===f&&e(i,(e=>"LINE_BAR"===e.dataset.type)))return!1;const y=e(i,(e=>e.classList.contains("form-config__materialContent"))),h=e(a,(e=>e.classList.contains("form-config__materialContent")));if("true"===d&&"true"!==u&&y)return!1;if(t(r.beforeMove)){const e=[...s(n||[]),...s(c||[])];let t,l,m;o(e,((e,o)=>{t||e.key!==g||(t=e),l||e.key!==a.dataset.key||(l=e),m||e.key!==i.dataset.key||(m=e),t&&l&&m&&o()}));if(!1===r.beforeMove({fromType:h?"material":"layout",toType:y?"material":"layout",dragField:t,fromField:l,toField:m,from:a,to:i}))return!1}null==l||l.classList.remove("is-choosing-area"),l=i,i!==a&&a.classList.remove("is-choosing-area"),i.classList.add("is-choosing-area")},onChoose:function({target:e,item:o}){m=setTimeout((()=>{e.classList.add("is-choosing-area"),o.classList.add("is-choosing")}),200)},onUnchoose:function({from:e,to:o,target:t,item:s}){clearTimeout(m),[e,o,t].forEach((e=>{e.classList.remove("is-choosing-area")})),s.classList.remove("is-choosing")},tag:"section",forceFallback:!1,animation:"150","item-key":"key",group:a||i}}export{a as useSortableConfig};
1
+ import{findAncestor as e,traverse as o}from"../../../../shared/utils/index.js";import{isFunction as t}from"lodash-es";import{unref as s}from"vue";import{FORM_CONFIG_GROUP as i}from"../constants/index.js";function a({group:a,hooks:r={},fieldList:n,materialList:c}={}){let l,m=null;return{move:function({to:i,from:a,dragged:m}){const{type:f,required:d,extra:u,key:g}=m.dataset||{};if("LINE_BAR"===f&&e(i,(e=>"LINE_BAR"===e.dataset.type)))return!1;const y=e(i,(e=>e.classList.contains("form-config__materialContent"))),h=e(a,(e=>e.classList.contains("form-config__materialContent")));if(t(r.beforeMove)){const e=[...s(n||[]),...s(c||[])];let t,l,m;o(e,((e,o)=>{t||e.key!==g||(t=e),l||e.key!==a.dataset.key||(l=e),m||e.key!==i.dataset.key||(m=e),t&&l&&m&&o()}));if(!1===r.beforeMove({fromType:h?"material":"layout",toType:y?"material":"layout",dragField:t,fromField:l,toField:m,from:a,to:i}))return!1}if("true"===d&&"true"!==u&&y)return!1;null==l||l.classList.remove("is-choosing-area"),l=i,i!==a&&a.classList.remove("is-choosing-area"),i.classList.add("is-choosing-area")},onChoose:function({target:e,item:o}){m=setTimeout((()=>{e.classList.add("is-choosing-area"),o.classList.add("is-choosing")}),200)},onUnchoose:function({from:e,to:o,target:t,item:s}){clearTimeout(m),[e,o,t].forEach((e=>{e.classList.remove("is-choosing-area")})),s.classList.remove("is-choosing")},tag:"section",forceFallback:!1,animation:"150","item-key":"key",group:a||i}}export{a as useSortableConfig};