cnhis-design-vue 3.2.2-beta.2 → 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 (103) hide show
  1. package/README.md +87 -87
  2. package/es/components/biunique-chat/index.d.ts +738 -562
  3. package/es/components/biunique-chat/index.js +1 -1
  4. package/es/components/biunique-chat/src/Index.vue.d.ts +1201 -0
  5. package/es/components/biunique-chat/src/Index.vue.js +1 -0
  6. package/es/components/biunique-chat/src/Index.vue2.js +1 -0
  7. package/es/components/biunique-chat/src/api/index.d.ts +2 -5
  8. package/es/components/biunique-chat/src/api/index.js +1 -1
  9. package/es/components/biunique-chat/src/components/ChatFile.vue.d.ts +241 -0
  10. package/es/components/biunique-chat/src/components/ChatFile.vue.js +1 -0
  11. package/es/components/biunique-chat/src/components/ChatFile.vue2.js +1 -0
  12. package/es/components/biunique-chat/src/components/ChatFooter.vue.d.ts +3 -5
  13. package/es/components/biunique-chat/src/components/ChatFooter.vue2.js +1 -1
  14. package/es/components/biunique-chat/src/components/ChatHeader.vue.d.ts +639 -0
  15. package/es/components/biunique-chat/src/components/ChatHeader.vue2.js +1 -1
  16. package/es/components/biunique-chat/src/components/ChatMain.vue.d.ts +61 -5
  17. package/es/components/biunique-chat/src/components/ChatMain.vue2.js +1 -1
  18. package/es/components/biunique-chat/src/components/ChatRecord.vue.d.ts +101 -0
  19. package/es/components/biunique-chat/src/components/ChatRecord.vue.js +1 -0
  20. package/es/components/biunique-chat/src/components/ChatRecord.vue2.js +1 -0
  21. package/es/components/biunique-chat/src/components/ChatSet.vue.d.ts +246 -0
  22. package/es/components/biunique-chat/src/components/ChatSet.vue.js +1 -0
  23. package/es/components/biunique-chat/src/components/ChatSet.vue2.js +1 -0
  24. package/es/components/biunique-chat/src/components/PersonProfile.vue.d.ts +59 -0
  25. package/es/components/biunique-chat/src/components/PersonProfile.vue.js +1 -0
  26. package/es/components/biunique-chat/src/components/PersonProfile.vue2.js +1 -0
  27. package/es/components/biunique-chat/src/components/SiderList.vue.d.ts +18 -28
  28. package/es/components/biunique-chat/src/components/SiderList.vue2.js +1 -1
  29. package/es/components/biunique-chat/src/hooks/useState.d.ts +7 -0
  30. package/es/components/biunique-chat/src/hooks/useState.js +1 -0
  31. package/es/components/biunique-chat/src/types/index.d.ts +10 -0
  32. package/es/components/biunique-chat/src/types/index.js +1 -0
  33. package/es/components/biunique-chat/src/utils/index.d.ts +6 -0
  34. package/es/components/biunique-chat/src/utils/index.js +1 -0
  35. package/es/components/biunique-chat/style/iconfont.ttf +0 -0
  36. package/es/components/biunique-chat/style/index.css +1 -1
  37. package/es/components/button-print/src/utils/print.d.ts +1 -0
  38. package/es/components/button-print/src/utils/print.js +1 -1
  39. package/es/components/calendar/index.d.ts +1 -11
  40. package/es/components/calendar/src/Calendar.vue.d.ts +1 -11
  41. package/es/components/callback/src/components/render/popupMaps.d.ts +2 -0
  42. package/es/components/classification/src/index.vue.d.ts +0 -3
  43. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  44. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  45. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
  46. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  47. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  48. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  49. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  50. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  51. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  52. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  53. package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
  54. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1 -1
  55. package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -1
  56. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  57. package/es/components/form-render/src/hooks/useSelectedSetting.d.ts +3 -4
  58. package/es/components/form-render/src/hooks/useSelectedSetting.js +1 -1
  59. package/es/components/iho-table/index.d.ts +2 -0
  60. package/es/components/iho-table/src/IhoTable.vue.d.ts +2 -0
  61. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -0
  62. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  63. package/es/components/iho-table/src/plugins/headerPlugin.js +1 -1
  64. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/index.d.ts +5 -0
  65. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useHeaderCSS.js +1 -1
  66. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useHoverColumn.js +1 -1
  67. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/renderer.js +1 -1
  68. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/types.d.ts +1 -0
  69. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.d.ts +1 -0
  70. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +1 -1
  71. package/es/components/iho-table/src/types/index.d.ts +1 -0
  72. package/es/components/iho-table/src/utils/index.d.ts +1 -1
  73. package/es/components/iho-table/src/utils/index.js +1 -1
  74. package/es/components/index.css +1 -1
  75. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  76. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  77. package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
  78. package/es/components/step-notice/index.d.ts +1 -0
  79. package/es/components/step-notice/src/StepNotice.vue.d.ts +2 -0
  80. package/es/components/step-notice/src/StepNotice.vue2.js +1 -1
  81. package/es/shared/assets/img/failure.png.js +1 -1
  82. package/es/shared/assets/img/no-permission.png.js +1 -1
  83. package/es/shared/assets/img/nodata.png.js +1 -1
  84. package/es/shared/assets/img/notfound.png.js +1 -1
  85. package/es/shared/assets/img/qr.png.js +1 -1
  86. package/es/shared/assets/img/success.png.js +1 -1
  87. package/es/shared/assets/img/table_style_2.png.js +1 -1
  88. package/es/shared/assets/img/video.png.js +1 -1
  89. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  90. package/es/shared/assets/img/xb_big.png.js +1 -1
  91. package/es/shared/assets/img/xb_small.png.js +1 -1
  92. package/es/shared/package.json.js +1 -1
  93. package/package.json +2 -2
  94. package/es/components/biunique-chat/src/BiuniqueChat.vue.d.ts +0 -1005
  95. package/es/components/biunique-chat/src/BiuniqueChat.vue.js +0 -1
  96. package/es/components/biunique-chat/src/BiuniqueChat.vue2.js +0 -1
  97. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  98. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  99. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  100. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  101. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  102. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  103. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -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+1ywetPXxyOjFL577pv0tyPV1NjCFGYEGSRuM3TaoEA8w/McD0F9flQvjvmnwtTvLjtKjJ9P4/DCUC19/hpU3bHKxae1xmbj0xt5hcf2LWw82m35tn4SrODaZLYXUCcbZVME0wbI43XacTN20txk5m3nRBPv0eQjCF0iombERO/L5ph6tV+9VvtfYnP2rtqyetHZ209nTd2oHGgJnE4EnsImyEK4wfxJ1CGuaBATtjGFPCpAgm5oQxYp59ek9ae3wwPZMY+LE0Wr6WxuKZEAK6VL8jgC5tJkED8yJENI7WleeP50nhhNDRd55T1/n9EGZBk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t3BOs+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};
@@ -228,17 +228,7 @@ declare const Calendar: SFCWithInstall<import("vue").DefineComponent<{
228
228
  NIcon: any;
229
229
  ChevronBackOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
230
230
  ChevronForwardOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
231
- FullCalendar: import("vue").DefineComponent<{
232
- options: import("vue").PropType<import("@fullcalendar/core/internal-common").a>;
233
- }, unknown, {
234
- renderId: number;
235
- customRenderingMap: Map<string, import("@fullcalendar/core/internal-common").eF<any>>;
236
- }, {}, {
237
- getApi(): import("@fullcalendar/core").Calendar;
238
- buildOptions(suppliedOptions: import("@fullcalendar/core/internal-common").a | undefined): import("@fullcalendar/core/internal-common").a;
239
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
240
- options: import("vue").PropType<import("@fullcalendar/core/internal-common").a>;
241
- }>>, {}>;
231
+ FullCalendar: any;
242
232
  isSameDay: typeof import("date-fns").isSameDay;
243
233
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "eventClick" | "eventDrag" | "eventResize" | "dateChange")[], "select" | "eventClick" | "eventDrag" | "eventResize" | "dateChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
244
234
  showDateNavigation: {
@@ -221,17 +221,7 @@ declare const _default: import("vue").DefineComponent<{
221
221
  NIcon: any;
222
222
  ChevronBackOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
223
223
  ChevronForwardOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
224
- FullCalendar: import("vue").DefineComponent<{
225
- options: PropType<import("@fullcalendar/core/internal-common").a>;
226
- }, unknown, {
227
- renderId: number;
228
- customRenderingMap: Map<string, import("@fullcalendar/core/internal-common").eF<any>>;
229
- }, {}, {
230
- getApi(): import("@fullcalendar/core").Calendar;
231
- buildOptions(suppliedOptions: import("@fullcalendar/core/internal-common").a | undefined): import("@fullcalendar/core/internal-common").a;
232
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
233
- options: PropType<import("@fullcalendar/core/internal-common").a>;
234
- }>>, {}>;
224
+ FullCalendar: any;
235
225
  isSameDay: typeof isSameDay;
236
226
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "eventClick" | "eventDrag" | "eventResize" | "dateChange")[], "select" | "eventClick" | "eventDrag" | "eventResize" | "dateChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
237
227
  showDateNavigation: {
@@ -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;
@@ -1447,9 +1447,6 @@ declare const _default: import("vue").DefineComponent<{
1447
1447
  isSecondDisabled(second: number, minute: number | null, hour: number | null): boolean | 0;
1448
1448
  };
1449
1449
  NSelect: any;
1450
- /**
1451
- * 改变展示方式
1452
- */
1453
1450
  NPopover: any;
1454
1451
  CDatePicker: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
1455
1452
  updateUnchangedValue: {
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,inject as a,computed as t,watch as u,openBlock as n,createBlock as i,unref as o,normalizeClass as v,isRef as d,withCtx as r,createVNode as s,normalizeStyle as p,createElementVNode as f,createTextVNode as m,createCommentVNode as c,createElementBlock as y,Fragment as h,renderList as _,withDirectives as g,withKeys as b,withModifiers as x,vShow as k,toDisplayString as M}from"vue";import{useMessage as w,NModal as H,NCard as C,NButton as U,NForm as S,NFormItem as j,NInput as O,NTooltip as I,NSelect as z,NGrid as T,NGridItem as N,NIcon as Y,NInputNumber as $,NPopover as L,NDatePicker as V,NTimePicker as B,NSwitch as D}from"naive-ui";import{isMulti as F,isShowOptions as P,isNumber as q,isDate as A,isCandidate as E,isTextarea as J}from"../utils/index.js";import K from"moment";import{InjectionExpandFieldApiConfig as R}from"../constants/index.js";import W from"../hooks/useAsyncData.js";import{HtmlTypeList as X}from"../utils/constant.js";import{isJSON as G,isValidDate as Q}from"../utils/tool.js";import Z from"./FormBatchOptionsModal.vue.js";import ee from"./FormItemPerson.vue.js";const le={class:"svg-wrap"},ae={class:"flex_right"},te={class:"options-title"},ue=f("span",null,"字段键名",-1),ne=f("i",{class:"iconfont-expand-field icon-expand-field-help"},null,-1),ie={class:"options-title"},oe=f("span",null,"字段问号提示",-1),ve=f("i",{class:"iconfont-expand-field icon-expand-field-help"},null,-1),de={class:"options-title"},re=f("span",null,"选项值",-1),se=f("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[f("path",{d:"M12 12h2v12h-2z",fill:"currentColor"}),f("path",{d:"M18 12h2v12h-2z",fill:"currentColor"}),f("path",{d:"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z",fill:"currentColor"}),f("path",{d:"M12 2h8v2h-8z",fill:"currentColor"})],-1),pe={class:"options-title"},fe=f("span",null,"默认值",-1),me=f("i",{class:"iconfont-expand-field icon-expand-field-help"},null,-1),ce={style:{display:"flex","align-items":"center"}},ye=f("span",null,"选择",-1),he={style:{width:"100%"}},_e={key:0,class:"validate_tip"};var ge=e({__name:"form",props:{visible:{type:Boolean,default:!1},formOntype:{type:String,default:"add"},formItemData:{type:Object,default:()=>({})},id:{type:String,default:""},orgId:{type:String,default:""},conditionList:{type:Array,default:()=>[]},searchFieldList:{type:Array,default:()=>[]}},emits:["cancelModal"],setup(e,{emit:ge}){const be=e,xe=w(),ke="请输入默认值",Me={name:[{required:!0,message:"请输入字段标题",trigger:["input","blur"]}],html_type:[{required:!0,message:"请选择字段类型",trigger:["input","blur"]}]},we=[{value:"yyyy-MM-dd HH:mm:ss",label:"年-月-日 时:分:秒"},{value:"yyyy-MM-dd HH:mm",label:"年-月-日 时:分"},{value:"yyyy-MM-dd",label:"年-月-日"},{value:"yyyy-MM",label:"年-月"},{value:"MM-dd HH:mm",label:"月-日 时:分"},{value:"MM-dd",label:"月-日"},{value:"HH:mm:ss",label:"时:分:秒"},{value:"HH:mm",label:"时:分"}],He=[{value:"12",label:"整行"},{value:"6",label:"半行"},{value:"4",label:"1/3行"},{value:"8",label:"2/3行"},{value:"3",label:"1/4行"},{value:"9",label:"3/4行"},{value:"2",label:"1/6行"},{value:"10",label:"5/6行"},{value:"1.5",label:"1/8行"},{value:"10.5",label:"7/8行"}],Ce=l(!1),Ue=l("860px");let Se=l({maxHeight:"496px",height:"496px"});const{saveOrUpdateExtendField:je}=W(),Oe=a(R),Ie=l(null),ze=l({name:void 0,remark:void 0,is_edit:"1",is_null:"1",is_show:"1",key:"",val_key:void 0,validate:{},html_type:"INPUT",name_i18n:void 0,elem_width:"12",default_val:void 0,label_type:void 0,isMultiSelect:"0",decimal_length:void 0,date_format:""}),Te=l([{text:void 0,value:void 0}]),Ne=l({format:"yyyy-MM-dd HH:mm:ss",dateType:"date",mode:"date",value:null,showTime:!0,open:!1,componentType:"datetime"}),Ye=l({obj_type:"",vali_obj:"",event_obj:"",max_length:"",min_length:"",min_value:"",max_value:""}),$e=l({value_key:"",levelSetting:[],search_key:[],level_num:void 0,render_key:[],name:"",level_key:"",id:"",type:"",primary_key:"",sqlExpression:"",conObj:"",add_btn:"",setting:{cascading:[]}}),Le=l(!1),Ve=l(!1),Be=l(void 0),De=l(!1),Fe=l(!1);l(!1);const Pe=l(!1),qe=l(""),Ae=t((()=>"edit"===be.formOntype)),Ee=t((()=>ze.value.html_type||""));t((()=>"TEXTAREA"===Ee.value?1e3:255));const Je=t((()=>Te.value.filter((e=>e.value&&e.text)))),Ke=t((()=>F(Ee.value))),Re=t((()=>"date"===Ne.value.dateType));function We(e){Pe.value=e}function Xe(e){let l=e;"string"!=typeof e&&(l=JSON.stringify(e)),ze.value.default_val=l}function Ge(e){Ne.value.value=null,ze.value.default_val=void 0,il(e)}function Qe(){Ce.value=!Ce.value;let e=document.body.clientHeight;"860px"===Ue.value?(Ue.value="100%",Se.value.maxHeight=`${e}px`,Se.value.height=`${e}px`):(Ue.value="860px",Se.value.maxHeight="496px",Se.value.height="")}function Ze(e){return["HH:mm:ss","HH:mm"].includes(e)}function el(e,l){switch(e){case"isNull":Le.value=l,ze.value.is_null=l?"0":"1";break;case"isMultiSelect":Ve.value=l,ze.value.isMultiSelect=l?"1":"0"}}function ll(){if("add"===be.formOntype)return;let e=Object.assign({},be.formItemData),l=e.setting;l&&G(l)&&(l=JSON.parse(l),delete e.setting,Object.assign(e,{...l})),e.key=e.code,delete e.code,A(e.html_type)&&function(e){il(e.date_format);let l=e.default_val;l&&!l.startsWith("${")&&(Ze(e.date_format)&&(l=`${K().format("YYYY-MM-dd")} ${l}`),Q(new Date(l))&&(Ne.value.value=K(l)))}(e),F(e.html_type)&&(e.default_val=function(e){let l=e.default_val;return l?l.split(",").filter(Boolean):[]}(e)),Le.value="0"==e.is_null,Ve.value="1"==e.isMultiSelect,Ye.value=Object.assign(Ye.value,e.validate||{}),$e.value=Object.assign($e.value,e.wordbook||{}),ze.value=Object.assign(ze.value,e||{}),P(e.html_type)&&function(e){let l=(null==e?void 0:e.optionValue)||[];l.length||l.push({text:void 0,value:void 0}),Te.value=[...l],delete e.optionValue}(e)}function al(e){ze.value.html_type=e,Te.value=[{text:void 0,value:void 0}];let l=function(){if(F(Ee.value))return[]}();ze.value.default_val=l,A(e)?ze.value.date_format="yyyy-MM-dd HH:mm:ss":ze.value.date_format=""}function tl(){Te.value.push({value:"",text:""})}function ul(e){let l=e;(e<0||0===e)&&(l=0),e>5&&(l=5),Be.value=0===l?l:l||void 0}function nl(e){Te.value=e}function il(e){let l=e||"yyyy-MM-dd HH:mm:ss",a=Ze(l)?"time":"date",t="yyyy-MM"===l?"month":"date";let u=function(e){return["yyyy-MM-dd HH:mm:ss","yyyy-MM-dd HH:mm","MM-dd HH:mm"].includes(e)}(l),n="";["yyyy-MM-dd HH:mm:ss","yyyy-MM-dd HH:mm","MM-dd HH:mm"].includes(e)&&(n="datetime"),["yyyy-MM-dd","MM-dd"].includes(e)&&(n="date"),Object.assign(Ne.value,{format:l,dateType:a,mode:t,showTime:u,componentType:n})}function ol(e,l){if(e)return l&&(l.includes("yyyy")&&(l=l.replace("yyyy","YYYY")),l.includes("dd")&&(l=l.replace("dd","DD"))),K(e).format(l)}function vl(){Ne.value.open=!Ne.value.open}function dl(e){let l=ol(e,Ne.value.format);ze.value.default_val=l}function rl(e){let l=ol(e,Ne.value.format);ze.value.default_val=l,Ne.value.format.includes("HH:mm")||vl()}function sl(e){let l=ol(e,Ne.value.format);ze.value.default_val=l}function pl(){ge("cancelModal"),Ue.value="860px",Se.value={height:"496px",maxHeight:"496px"},Ce.value=!1,ze.value={name:void 0,remark:void 0,is_edit:"1",is_null:"1",is_show:"1",key:"",val_key:void 0,validate:{},html_type:"INPUT",name_i18n:void 0,elem_width:"12",default_val:void 0,label_type:void 0,isMultiSelect:"0",decimal_length:void 0,date_format:""}}function fl(){var e;null==(e=Ie.value)||e.validate((async e=>{if(e)return;let l=Object.assign({},ze.value);if(l.validate={...Ye.value},l.extendId=be.id,P(Ee.value)){let e=function(){let e={validate:!1,message:"请完善选项配置"};if(!Te.value||!Te.value.length)return e;let l,a,t,u=0,n=Te.value.length,i=!1;for(;u<n;u++){if(l=Te.value[u],a=l.value?l.value.trim():l.value,t=l.text?l.text.trim():l.text,!a||!t){i=!0;break}l.value=a,l.text=t}return[...new Set(Te.value.map((e=>e.value)))].length!==Te.value.length?(e.message="选项值不能重复",e):(!i&&(e.validate=!0),e)}();if(!e.validate)return De.value=!0,void xe.warning(e.message);De.value=!1,l.option=[...Te.value]}if(q(Ee.value)?l.default_val=function(e){let l=e.default_val;if(void 0===Be.value)return l;if(!l)return l;let a=String(l).split(".")[1];return a&&a.length!==Be.value?Number(l.toFixed(Be.value)):l}(l):F(Ee.value)&&(l.default_val=l.default_val.join(",")),!E(Ee.value)||function(e){let{default_val:l}=e;qe.value="",l&&G(l)&&(l=JSON.parse(l));let a=function(e,l){if(!e)return;if("string"!=typeof e)return;if(!(e=e.trim()))return!0;if(!e.startsWith("${"))return ml(l,"请输入有效系统变量"),"error";let a=/\${sys.(.*?)\}/g.exec(e);if(!a||!a[1])return ml(l,"请输入有效系统变量"),"error";return!0}(l,e);if(a)return"error"!==a;if(console.log("saveOjb.isMultiSelect>>>",e.isMultiSelect),console.log("default_val?.length>>>",null==l?void 0:l.length),"0"===e.isMultiSelect&&(null==l?void 0:l.length)>1)return console.log("进入到判断里面了>>>>>"),ml(e,"选人组件为单选"),!1;return!0}(l)){for(let e in l){let a=l[e];"string"==typeof a&&(l[e]=null==a?void 0:a.trim())}console.log("saveOjb>>>",l),await async function(e={}){Fe.value=!0;try{const l=await je(e,Oe);if(Fe.value=!1,"SUCCESS"!==(null==l?void 0:l.result))return void xe.error((null==l?void 0:l.resultMsg)||"保存失败");pl()}catch(e){Fe.value=!1}}(l)}}))}function ml(e,l){qe.value=l}return u((()=>be.visible),(e=>{e&&ll()})),(l,a)=>(n(),i(o(H),{class:v(["expand-field-modal-block",{"modal-screen":Ce.value}]),show:e.visible,"onUpdate:show":a[22]||(a[22]=e=>d(visible)?visible.value=e:null),maskClosable:!1,width:Ue.value,bodyStyle:o(Se),closable:!1,centered:"",onPositiveClick:fl,onNegativeClick:pl},{default:r((()=>[s(o(C),{style:p({width:Ue.value,...o(Se)}),title:"add"===be.formOntype?"新增拓展字段":"编辑拓展字段",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":r((()=>[f("div",le,[f("i",{onClick:Qe,class:v(["iconfont-expand-field",Ce.value?"icon-expand-field-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-expand-field-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),f("i",{onClick:pl,class:"iconfont-expand-field icon-expand-field-menzhenyishengzhanxitongtubiaoguanbi"})])])),footer:r((()=>[f("div",ae,[s(o(U),{onClick:pl},{default:r((()=>[m("取消")])),_:1}),s(o(U),{type:"info",onClick:fl},{default:r((()=>[m("保存")])),_:1})])])),default:r((()=>[s(o(S),{ref_key:"formRef",ref:Ie,model:ze.value,rules:Me},{default:r((()=>[s(o(j),{path:"name",label:"字段标题","require-mark-placement":"left"},{default:r((()=>[s(o(O),{value:ze.value.name,"onUpdate:value":a[0]||(a[0]=e=>ze.value.name=e),maxlength:100,clearable:"",placeholder:"请输入"},null,8,["value"])])),_:1}),s(o(j),{path:"key"},{label:r((()=>[f("div",te,[ue,s(o(I),{duration:0},{trigger:r((()=>[ne])),default:r((()=>[m(" 数据库字段键名,不填写时由系统生成,填写则以填写为准 ")])),_:1})])])),default:r((()=>[s(o(O),{value:ze.value.key,"onUpdate:value":a[1]||(a[1]=e=>ze.value.key=e),maxlength:32,disabled:o(Ae),clearable:"",placeholder:"数据库字段键名,不填写时由系统生成,填写则以填写为准"},null,8,["value","disabled"])])),_:1}),s(o(j),{path:"html_type",label:"字段类型","require-mark-placement":"left"},{default:r((()=>[s(o(z),{value:ze.value.html_type,"onUpdate:value":[a[2]||(a[2]=e=>ze.value.html_type=e),al],placeholder:"请选择字段类型",clearable:"",filterable:"",options:o(X)},null,8,["value","options"])])),_:1}),s(o(j),{path:"remark",label:"字段问号提示"},{label:r((()=>[f("div",ie,[oe,s(o(I),{duration:0},{trigger:r((()=>[ve])),default:r((()=>[m(" 设置后该字段旁会有问号图标,鼠标悬浮展示“问号提示”内容,常用于告诉用户该字段的含义 ")])),_:1})])])),default:r((()=>[s(o(O),{value:ze.value.remark,"onUpdate:value":a[3]||(a[3]=e=>ze.value.remark=e),placeholder:"请输入",type:"textarea",clearable:"",maxlength:255,rows:3},null,8,["value"])])),_:1}),c(" 选项值>>>>>类型对应关系 "),o(P)(o(Ee))?(n(),i(o(j),{key:0},{label:r((()=>[f("div",de,[re,f("span",{class:"batch-span",onClick:tl},"添加选项"),f("span",{class:"batch-span",onClick:a[4]||(a[4]=()=>We(!0))},"批量编辑")])])),default:r((()=>[f("div",{class:v(["options-item",{"options-item-err":De.value}])},[(n(!0),y(h,null,_(Te.value,((e,l)=>(n(),i(o(T),{class:"mgb-10",key:l,cols:24,"x-gap":8,"y-gap":8},{default:r((()=>[s(o(N),{span:11},{default:r((()=>[s(o(O),{value:e.value,"onUpdate:value":l=>e.value=l,maxLength:100,allowClear:"",placeholder:"选项值"},null,8,["value","onUpdate:value"])])),_:2},1024),s(o(N),{span:11},{default:r((()=>[s(o(O),{value:e.text,"onUpdate:value":l=>e.text=l,maxLength:100,allowClear:"",placeholder:"选项文本"},null,8,["value","onUpdate:value"])])),_:2},1024),s(o(N),{span:2,class:"flex-center"},{default:r((()=>[Te.value.length>1?(n(),i(o(Y),{key:0,onClick:a=>function(e,l){Te.value.splice(l,1);let a=ze.value.default_val;if(F(Ee.value)){if(!a||!a.length)return;let l=a.findIndex((l=>l===e.value));l||a.splice(l,1)}else{if(!a)return;a===e.value&&(a=void 0)}ze.value.default_val=a}(e,l)},{default:r((()=>[se])),_:2},1032,["onClick"])):c("v-if",!0)])),_:2},1024)])),_:2},1024)))),128))],2)])),_:1})):c("v-if",!0),o(q)(o(Ee))?(n(),i(o(j),{key:1,path:"decimal_length",label:"小数位"},{default:r((()=>[s(o($),{style:{width:"100%"},min:0,max:5,placeholder:"请输入",precision:0,clearable:"",value:ze.value.decimal_length,"onUpdate:value":[a[5]||(a[5]=e=>ze.value.decimal_length=e),ul]},null,8,["value"])])),_:1})):c("v-if",!0),o(A)(o(Ee))?(n(),i(o(j),{key:2,path:"date_format",label:"日期格式"},{default:r((()=>[s(o(z),{style:{width:"100%"},value:ze.value.date_format,"onUpdate:value":[a[6]||(a[6]=e=>ze.value.date_format=e),Ge],placeholder:"请选择",options:we},null,8,["value"])])),_:1})):c("v-if",!0),c(" 默认值>>>>>类型对应关系 "),s(o(j),{path:"default_val",label:"默认值"},{label:r((()=>[f("div",pe,[fe,o(E)(o(Ee))?(n(),i(o(I),{key:0,duration:0},{trigger:r((()=>[me])),default:r((()=>[m(" 支持输入系统变量当前操作人${sys.userId},也支持选择一个人 ")])),_:1})):c("v-if",!0)])])),default:r((()=>[o(J)(o(Ee))?(n(),i(o(O),{key:0,value:ze.value.default_val,"onUpdate:value":a[7]||(a[7]=e=>ze.value.default_val=e),placeholder:ke,type:"textarea",clearable:"",maxlength:1e3,rows:3},null,8,["value"])):o(q)(o(Ee))?(n(),y(h,{key:1},[c(" 数字框 "),s(o($),{style:{width:"100%"},clearable:"",placeholder:ke,precision:Be.value,value:ze.value.default_val,"onUpdate:value":a[8]||(a[8]=e=>ze.value.default_val=e)},null,8,["precision","value"])],2112)):o(P)(o(Ee))?(n(),y(h,{key:2},[c(" 下拉框、横向单选、纵向单选、横向多选、纵向多选、下拉多选框 "),s(o(z),{style:{width:"100%"},multiple:o(Ke),clearable:"",value:ze.value.default_val,"onUpdate:value":a[9]||(a[9]=e=>ze.value.default_val=e),"label-field":"text",placeholder:ke,options:o(Je)},null,8,["multiple","value","options"])],2112)):o(A)(o(Ee))?(n(),y(h,{key:3},[c(" 日期 "),f("div",ce,[s(o(O),{clearable:"",maxLength:255,value:ze.value.default_val,"onUpdate:value":a[10]||(a[10]=e=>ze.value.default_val=e),placeholder:ke},null,8,["value"]),o(Re)?(n(),y(h,{key:0},["month"===Ne.value.mode?(n(),i(o(L),{key:0,trigger:"click",show:Ne.value.open},{trigger:r((()=>[s(o(U),{type:"info",onClick:vl},{default:r((()=>[m("选择")])),_:1})])),default:r((()=>[s(o(V),{panel:"",value:Ne.value.value,"onUpdate:value":[a[11]||(a[11]=e=>Ne.value.value=e),dl],type:"month","input-readonly":"",clearable:"",onConfirm:vl},null,8,["value"])])),_:1},8,["show"])):(n(),i(o(L),{key:1,trigger:"click",show:Ne.value.open},{trigger:r((()=>[s(o(U),{type:"info",onClick:vl},{default:r((()=>[m("选择")])),_:1})])),default:r((()=>[s(o(V),{panel:"",value:Ne.value.value,"onUpdate:value":[a[12]||(a[12]=e=>Ne.value.value=e),rl],format:Ne.value.format,type:Ne.value.componentType,"input-readonly":"",clearable:"",onConfirm:vl},null,8,["value","format","type"])])),_:1},8,["show"]))],64)):(n(),y(h,{key:1},[c(' <n-input\n allowClear\n :maxLength="255"\n v-model:value="dateInfo.value"\n @keydown.enter.prevent\n :placeholder="defaultPlaceholder"\n /> '),s(o(U),{type:"info",class:"date-time-button"},{default:r((()=>[ye,s(o(B),{value:Ne.value.value,"onUpdate:value":[a[13]||(a[13]=e=>Ne.value.value=e),sl],format:Ne.value.format,"input-readonly":"",clearable:""},null,8,["value","format"])])),_:1}),c(' <n-popover trigger="click">\n <template #trigger>\n <n-button type="info">选择</n-button>\n </template>\n <n-time-picker\n panel\n v-model:value="dateInfo.value"\n :format="dateInfo.format"\n input-readonly\n clearable\n @update:value="timeChange"\n >\n <template v-slot:icon>111</template>\n\n </n-time-picker>\n </n-popover> ')],64))])],2112)):o(E)(o(Ee))?(n(),y(h,{key:4},[c(" 选人组件(增加一个选人组件) "),f("div",he,[g(s(o(O),{allowClear:"",maxLength:255,value:ze.value.default_val,"onUpdate:value":a[14]||(a[14]=e=>ze.value.default_val=e),onKeydown:a[15]||(a[15]=b(x((()=>{}),["prevent"]),["enter"])),placeholder:ke},null,8,["value"]),[[k,!1]]),c(' 点击弹出选人组件弹窗 :mainForm="this" '),s(ee,{orgId:e.orgId,defaultValue:ze.value.default_val,onCheckPerson:Xe},null,8,["orgId","defaultValue"]),qe.value?(n(),y("span",_e,M(qe.value),1)):c("v-if",!0),c(' <n-button type="info">选择</n-button> ')])],2112)):(n(),y(h,{key:5},[c(" 其他 "),s(o(O),{value:ze.value.default_val,"onUpdate:value":a[16]||(a[16]=e=>ze.value.default_val=e),onKeydown:a[17]||(a[17]=b(x((()=>{}),["prevent"]),["enter"])),placeholder:"请输入默认值"},null,8,["value"])],2112))])),_:1}),s(o(j),{path:"elem_width",label:"宽度"},{default:r((()=>[s(o(z),{value:ze.value.elem_width,"onUpdate:value":a[18]||(a[18]=e=>ze.value.elem_width=e),placeholder:"请选择宽度",options:He},null,8,["value"])])),_:1}),s(o(j),{path:"isNull",label:"是否必填","label-placement":"left"},{default:r((()=>[s(o(D),{value:Le.value,"onUpdate:value":[a[19]||(a[19]=e=>Le.value=e),a[20]||(a[20]=e=>el("isNull",e))]},null,8,["value"])])),_:1}),o(E)(o(Ee))?(n(),i(o(j),{key:3,"label-placement":"left",path:"isMultiSelect",label:"是否多选"},{default:r((()=>[s(o(D),{value:Ve.value,"onUpdate:value":a[21]||(a[21]=e=>el("isMultiSelect",e))},null,8,["value"])])),_:1})):c("v-if",!0)])),_:1},8,["model"]),s(Z,{visible:Pe.value,options:Te.value,onHandleSaveBatch:nl,onTriggerBatch:We},null,8,["visible","options"])])),_:1},8,["style","title"])])),_:1},8,["class","show","width","bodyStyle"]))}});export{ge as default};
1
+ import{defineComponent as e,ref as l,inject as a,computed as t,watch as u,openBlock as n,createBlock as i,unref as o,normalizeClass as v,isRef as d,withCtx as r,createVNode as s,normalizeStyle as p,createElementVNode as f,createTextVNode as m,createCommentVNode as c,createElementBlock as y,Fragment as h,renderList as _,withDirectives as g,withKeys as b,withModifiers as x,vShow as k,toDisplayString as M}from"vue";import{useMessage as w,NModal as H,NCard as C,NButton as U,NForm as S,NFormItem as j,NInput as O,NTooltip as I,NSelect as z,NGrid as T,NGridItem as N,NIcon as Y,NInputNumber as $,NPopover as L,NDatePicker as V,NTimePicker as B,NSwitch as D}from"naive-ui";import{isMulti as F,isShowOptions as P,isNumber as q,isDate as A,isCandidate as E,isTextarea as J}from"../utils/index.js";import K from"moment";import{InjectionExpandFieldApiConfig as R}from"../constants/index.js";import W from"../hooks/useAsyncData.js";import{HtmlTypeList as X}from"../utils/constant.js";import{isJSON as G,isValidDate as Q}from"../utils/tool.js";import Z from"./FormBatchOptionsModal.vue.js";import ee from"./FormItemPerson.vue.js";const le={class:"svg-wrap"},ae={class:"flex_right"},te={class:"options-title"},ue=f("span",null,"字段键名",-1),ne=f("i",{class:"iconfont-expand-field icon-expand-field-help"},null,-1),ie={class:"options-title"},oe=f("span",null,"字段问号提示",-1),ve=f("i",{class:"iconfont-expand-field icon-expand-field-help"},null,-1),de={class:"options-title"},re=f("span",null,"选项值",-1),se=f("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[f("path",{d:"M12 12h2v12h-2z",fill:"currentColor"}),f("path",{d:"M18 12h2v12h-2z",fill:"currentColor"}),f("path",{d:"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z",fill:"currentColor"}),f("path",{d:"M12 2h8v2h-8z",fill:"currentColor"})],-1),pe={class:"options-title"},fe=f("span",null,"默认值",-1),me=f("i",{class:"iconfont-expand-field icon-expand-field-help"},null,-1),ce={style:{display:"flex","align-items":"center"}},ye=f("span",null,"选择",-1),he={style:{width:"100%"}},_e={key:0,class:"validate_tip"};var ge=e({__name:"form",props:{visible:{type:Boolean,default:!1},formOntype:{type:String,default:"add"},formItemData:{type:Object,default:()=>({})},id:{type:String,default:""},orgId:{type:String,default:""},conditionList:{type:Array,default:()=>[]},searchFieldList:{type:Array,default:()=>[]}},emits:["cancelModal"],setup(e,{emit:ge}){const be=e,xe=w(),ke="请输入默认值",Me={name:[{required:!0,message:"请输入字段标题",trigger:["input","blur"]}],html_type:[{required:!0,message:"请选择字段类型",trigger:["input","blur"]}]},we=[{value:"yyyy-MM-dd HH:mm:ss",label:"年-月-日 时:分:秒"},{value:"yyyy-MM-dd HH:mm",label:"年-月-日 时:分"},{value:"yyyy-MM-dd",label:"年-月-日"},{value:"yyyy-MM",label:"年-月"},{value:"MM-dd HH:mm",label:"月-日 时:分"},{value:"MM-dd",label:"月-日"},{value:"HH:mm:ss",label:"时:分:秒"},{value:"HH:mm",label:"时:分"}],He=[{value:"12",label:"整行"},{value:"6",label:"半行"},{value:"4",label:"1/3行"},{value:"8",label:"2/3行"},{value:"3",label:"1/4行"},{value:"9",label:"3/4行"},{value:"2",label:"1/6行"},{value:"10",label:"5/6行"},{value:"1.5",label:"1/8行"},{value:"10.5",label:"7/8行"}],Ce=l(!1),Ue=l("860px");let Se=l({maxHeight:"496px",height:"496px"});const{saveOrUpdateExtendField:je}=W(),Oe=a(R),Ie=l(null),ze=l({name:void 0,remark:void 0,is_edit:"1",is_null:"1",is_show:"1",key:"",val_key:void 0,validate:{},html_type:"INPUT",name_i18n:void 0,elem_width:"12",default_val:void 0,label_type:void 0,isMultiSelect:"0",decimal_length:void 0,date_format:""}),Te=l([{text:void 0,value:void 0}]),Ne=l({format:"yyyy-MM-dd HH:mm:ss",dateType:"date",mode:"date",value:null,showTime:!0,open:!1,componentType:"datetime"}),Ye=l({obj_type:"",vali_obj:"",event_obj:"",max_length:"",min_length:"",min_value:"",max_value:""}),$e=l({value_key:"",levelSetting:[],search_key:[],level_num:void 0,render_key:[],name:"",level_key:"",id:"",type:"",primary_key:"",sqlExpression:"",conObj:"",add_btn:"",setting:{cascading:[]}}),Le=l(!1),Ve=l(!1),Be=l(void 0),De=l(!1),Fe=l(!1);l(!1);const Pe=l(!1),qe=l(""),Ae=t((()=>"edit"===be.formOntype)),Ee=t((()=>ze.value.html_type||""));t((()=>"TEXTAREA"===Ee.value?1e3:255));const Je=t((()=>Te.value.filter((e=>e.value&&e.text)))),Ke=t((()=>F(Ee.value))),Re=t((()=>"date"===Ne.value.dateType));function We(e){Pe.value=e}function Xe(e){let l=e;"string"!=typeof e&&(l=JSON.stringify(e)),ze.value.default_val=l}function Ge(e){Ne.value.value=null,ze.value.default_val=void 0,il(e)}function Qe(){Ce.value=!Ce.value;let e=document.body.clientHeight;"860px"===Ue.value?(Ue.value="100%",Se.value.maxHeight=`${e}px`,Se.value.height=`${e}px`):(Ue.value="860px",Se.value.maxHeight="496px",Se.value.height="")}function Ze(e){return["HH:mm:ss","HH:mm"].includes(e)}function el(e,l){switch(e){case"isNull":Le.value=l,ze.value.is_null=l?"0":"1";break;case"isMultiSelect":Ve.value=l,ze.value.isMultiSelect=l?"1":"0"}}function ll(){if("add"===be.formOntype)return;let e=Object.assign({},be.formItemData),l=e.setting;l&&G(l)&&(l=JSON.parse(l),delete e.setting,Object.assign(e,{...l})),e.key=e.code,delete e.code,A(e.html_type)&&function(e){il(e.date_format);let l=e.default_val;l&&!l.startsWith("${")&&(Ze(e.date_format)&&(l=`${K().format("YYYY-MM-dd")} ${l}`),Q(new Date(l))&&(Ne.value.value=K(l)))}(e),F(e.html_type)&&(e.default_val=function(e){let l=e.default_val;return l?l.split(",").filter(Boolean):[]}(e)),Le.value="0"==e.is_null,Ve.value="1"==e.isMultiSelect,Ye.value=Object.assign(Ye.value,e.validate||{}),$e.value=Object.assign($e.value,e.wordbook||{}),ze.value=Object.assign(ze.value,e||{}),P(e.html_type)&&function(e){let l=(null==e?void 0:e.optionValue)||[];l.length||l.push({text:void 0,value:void 0}),Te.value=[...l],delete e.optionValue}(e)}function al(e){ze.value.html_type=e,Te.value=[{text:void 0,value:void 0}];let l=function(){if(F(Ee.value))return[]}();ze.value.default_val=l,A(e)?ze.value.date_format="yyyy-MM-dd HH:mm:ss":ze.value.date_format=""}function tl(){Te.value.push({value:"",text:""})}function ul(e){let l=e;(e<0||0===e)&&(l=0),e>5&&(l=5),Be.value=0===l?l:l||void 0}function nl(e){Te.value=e}function il(e){let l=e||"yyyy-MM-dd HH:mm:ss",a=Ze(l)?"time":"date",t="yyyy-MM"===l?"month":"date";let u=function(e){return["yyyy-MM-dd HH:mm:ss","yyyy-MM-dd HH:mm","MM-dd HH:mm"].includes(e)}(l),n="";["yyyy-MM-dd HH:mm:ss","yyyy-MM-dd HH:mm","MM-dd HH:mm"].includes(e)&&(n="datetime"),["yyyy-MM-dd","MM-dd"].includes(e)&&(n="date"),Object.assign(Ne.value,{format:l,dateType:a,mode:t,showTime:u,componentType:n})}function ol(e,l){if(e)return l&&(l.includes("yyyy")&&(l=l.replace("yyyy","YYYY")),l.includes("dd")&&(l=l.replace("dd","DD"))),K(e).format(l)}function vl(){Ne.value.open=!Ne.value.open}function dl(e){let l=ol(e,Ne.value.format);ze.value.default_val=l}function rl(e){let l=ol(e,Ne.value.format);ze.value.default_val=l,Ne.value.format.includes("HH:mm")||vl()}function sl(e){let l=ol(e,Ne.value.format);ze.value.default_val=l}function pl(){ge("cancelModal"),Ue.value="860px",Se.value={height:"496px",maxHeight:"496px"},Ce.value=!1,ze.value={name:void 0,remark:void 0,is_edit:"1",is_null:"1",is_show:"1",key:"",val_key:void 0,validate:{},html_type:"INPUT",name_i18n:void 0,elem_width:"12",default_val:void 0,label_type:void 0,isMultiSelect:"0",decimal_length:void 0,date_format:""}}function fl(){var e;null==(e=Ie.value)||e.validate((async e=>{if(e)return;let l=Object.assign({},ze.value);if(l.validate={...Ye.value},l.extendId=be.id,P(Ee.value)){let e=function(){let e={validate:!1,message:"请完善选项配置"};if(!Te.value||!Te.value.length)return e;let l,a,t,u=0,n=Te.value.length,i=!1;for(;u<n;u++){if(l=Te.value[u],a=l.value?l.value.trim():l.value,t=l.text?l.text.trim():l.text,!a||!t){i=!0;break}l.value=a,l.text=t}return[...new Set(Te.value.map((e=>e.value)))].length!==Te.value.length?(e.message="选项值不能重复",e):(!i&&(e.validate=!0),e)}();if(!e.validate)return De.value=!0,void xe.warning(e.message);De.value=!1,l.option=[...Te.value]}if(q(Ee.value)?l.default_val=function(e){let l=e.default_val;if(void 0===Be.value)return l;if(!l)return l;let a=String(l).split(".")[1];return a&&a.length!==Be.value?Number(l.toFixed(Be.value)):l}(l):F(Ee.value)&&(l.default_val=l.default_val.join(",")),!E(Ee.value)||function(e){let{default_val:l}=e;qe.value="",l&&G(l)&&(l=JSON.parse(l));let a=function(e,l){if(!e)return;if("string"!=typeof e)return;if(!(e=e.trim()))return!0;if(!e.startsWith("${"))return ml(l,"请输入有效系统变量"),"error";let a=/\${sys.(.*?)\}/g.exec(e);if(!a||!a[1])return ml(l,"请输入有效系统变量"),"error";return!0}(l,e);if(a)return"error"!==a;if(console.log("saveOjb.isMultiSelect>>>",e.isMultiSelect),console.log("default_val?.length>>>",null==l?void 0:l.length),"0"===e.isMultiSelect&&(null==l?void 0:l.length)>1)return console.log("进入到判断里面了>>>>>"),ml(e,"选人组件为单选"),!1;return!0}(l)){for(let e in l){let a=l[e];"string"==typeof a&&(l[e]=null==a?void 0:a.trim())}console.log("saveOjb>>>",l),await async function(e={}){Fe.value=!0;try{const l=await je(e,Oe);if(Fe.value=!1,"SUCCESS"!==(null==l?void 0:l.result))return void xe.error((null==l?void 0:l.resultMsg)||"保存失败");pl()}catch(e){Fe.value=!1}}(l)}}))}function ml(e,l){qe.value=l}return u((()=>be.visible),(e=>{e&&ll()})),(l,a)=>(n(),i(o(H),{class:v(["expand-field-modal-block",{"modal-screen":Ce.value}]),show:e.visible,"onUpdate:show":a[22]||(a[22]=e=>d(visible)?visible.value=e:null),maskClosable:!1,width:Ue.value,bodyStyle:o(Se),closable:!1,centered:"",onPositiveClick:fl,onNegativeClick:pl},{default:r((()=>[s(o(C),{style:p({width:Ue.value,...o(Se)}),title:"add"===be.formOntype?"新增拓展字段":"编辑拓展字段",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":r((()=>[f("div",le,[f("i",{onClick:Qe,class:v(["iconfont-expand-field",Ce.value?"icon-expand-field-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-expand-field-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),f("i",{onClick:pl,class:"iconfont-expand-field icon-expand-field-menzhenyishengzhanxitongtubiaoguanbi"})])])),footer:r((()=>[f("div",ae,[s(o(U),{onClick:pl},{default:r((()=>[m("取消")])),_:1}),s(o(U),{type:"info",onClick:fl},{default:r((()=>[m("保存")])),_:1})])])),default:r((()=>[s(o(S),{ref_key:"formRef",ref:Ie,model:ze.value,rules:Me},{default:r((()=>[s(o(j),{path:"name",label:"字段标题","require-mark-placement":"left"},{default:r((()=>[s(o(O),{value:ze.value.name,"onUpdate:value":a[0]||(a[0]=e=>ze.value.name=e),maxlength:100,clearable:"",placeholder:"请输入"},null,8,["value"])])),_:1}),s(o(j),{path:"key"},{label:r((()=>[f("div",te,[ue,s(o(I),{duration:0},{trigger:r((()=>[ne])),default:r((()=>[m(" 数据库字段键名,不填写时由系统生成,填写则以填写为准 ")])),_:1})])])),default:r((()=>[s(o(O),{value:ze.value.key,"onUpdate:value":a[1]||(a[1]=e=>ze.value.key=e),maxlength:32,disabled:o(Ae),clearable:"",placeholder:"数据库字段键名,不填写时由系统生成,填写则以填写为准"},null,8,["value","disabled"])])),_:1}),s(o(j),{path:"html_type",label:"字段类型","require-mark-placement":"left"},{default:r((()=>[s(o(z),{value:ze.value.html_type,"onUpdate:value":[a[2]||(a[2]=e=>ze.value.html_type=e),al],placeholder:"请选择字段类型",clearable:"",filterable:"",options:o(X)},null,8,["value","options"])])),_:1}),s(o(j),{path:"remark",label:"字段问号提示"},{label:r((()=>[f("div",ie,[oe,s(o(I),{duration:0},{trigger:r((()=>[ve])),default:r((()=>[m(" 设置后该字段旁会有问号图标,鼠标悬浮展示“问号提示”内容,常用于告诉用户该字段的含义 ")])),_:1})])])),default:r((()=>[s(o(O),{value:ze.value.remark,"onUpdate:value":a[3]||(a[3]=e=>ze.value.remark=e),placeholder:"请输入",type:"textarea",clearable:"",maxlength:255,rows:3},null,8,["value"])])),_:1}),c(" 选项值>>>>>类型对应关系 "),o(P)(o(Ee))?(n(),i(o(j),{key:0},{label:r((()=>[f("div",de,[re,f("span",{class:"batch-span",onClick:tl},"添加选项"),f("span",{class:"batch-span",onClick:a[4]||(a[4]=()=>We(!0))},"批量编辑")])])),default:r((()=>[f("div",{class:v(["options-item",{"options-item-err":De.value}])},[(n(!0),y(h,null,_(Te.value,((e,l)=>(n(),i(o(T),{class:"mgb-10",key:l,cols:24,"x-gap":8,"y-gap":8},{default:r((()=>[s(o(N),{span:11},{default:r((()=>[s(o(O),{value:e.value,"onUpdate:value":l=>e.value=l,maxLength:100,allowClear:"",placeholder:"选项值"},null,8,["value","onUpdate:value"])])),_:2},1024),s(o(N),{span:11},{default:r((()=>[s(o(O),{value:e.text,"onUpdate:value":l=>e.text=l,maxLength:100,allowClear:"",placeholder:"选项文本"},null,8,["value","onUpdate:value"])])),_:2},1024),s(o(N),{span:2,class:"flex-center"},{default:r((()=>[Te.value.length>1?(n(),i(o(Y),{key:0,onClick:a=>function(e,l){Te.value.splice(l,1);let a=ze.value.default_val;if(F(Ee.value)){if(!a||!a.length)return;let l=a.findIndex((l=>l===e.value));l||a.splice(l,1)}else{if(!a)return;a===e.value&&(a=void 0)}ze.value.default_val=a}(e,l)},{default:r((()=>[se])),_:2},1032,["onClick"])):c("v-if",!0)])),_:2},1024)])),_:2},1024)))),128))],2)])),_:1})):c("v-if",!0),o(q)(o(Ee))?(n(),i(o(j),{key:1,path:"decimal_length",label:"小数位"},{default:r((()=>[s(o($),{style:{width:"100%"},min:0,max:5,placeholder:"请输入",precision:0,clearable:"",value:ze.value.decimal_length,"onUpdate:value":[a[5]||(a[5]=e=>ze.value.decimal_length=e),ul]},null,8,["value"])])),_:1})):c("v-if",!0),o(A)(o(Ee))?(n(),i(o(j),{key:2,path:"date_format",label:"日期格式"},{default:r((()=>[s(o(z),{style:{width:"100%"},value:ze.value.date_format,"onUpdate:value":[a[6]||(a[6]=e=>ze.value.date_format=e),Ge],placeholder:"请选择",options:we},null,8,["value"])])),_:1})):c("v-if",!0),c(" 默认值>>>>>类型对应关系 "),s(o(j),{path:"default_val",label:"默认值"},{label:r((()=>[f("div",pe,[fe,o(E)(o(Ee))?(n(),i(o(I),{key:0,duration:0},{trigger:r((()=>[me])),default:r((()=>[m(" 支持输入系统变量当前操作人${sys.userId},也支持选择一个人 ")])),_:1})):c("v-if",!0)])])),default:r((()=>[o(J)(o(Ee))?(n(),i(o(O),{key:0,value:ze.value.default_val,"onUpdate:value":a[7]||(a[7]=e=>ze.value.default_val=e),placeholder:ke,type:"textarea",clearable:"",maxlength:1e3,rows:3},null,8,["value"])):o(q)(o(Ee))?(n(),y(h,{key:1},[c(" 数字框 "),s(o($),{style:{width:"100%"},clearable:"",placeholder:ke,precision:Be.value,value:ze.value.default_val,"onUpdate:value":a[8]||(a[8]=e=>ze.value.default_val=e)},null,8,["precision","value"])],2112)):o(P)(o(Ee))?(n(),y(h,{key:2},[c(" 下拉框、横向单选、纵向单选、横向多选、纵向多选、下拉多选框 "),s(o(z),{style:{width:"100%"},multiple:o(Ke),clearable:"",value:ze.value.default_val,"onUpdate:value":a[9]||(a[9]=e=>ze.value.default_val=e),"label-field":"text",placeholder:ke,options:o(Je)},null,8,["multiple","value","options"])],2112)):o(A)(o(Ee))?(n(),y(h,{key:3},[c(" 日期 "),f("div",ce,[s(o(O),{clearable:"",maxLength:255,value:ze.value.default_val,"onUpdate:value":a[10]||(a[10]=e=>ze.value.default_val=e),placeholder:ke},null,8,["value"]),o(Re)?(n(),y(h,{key:0},["month"===Ne.value.mode?(n(),i(o(L),{key:0,trigger:"click",show:Ne.value.open},{trigger:r((()=>[s(o(U),{type:"info",onClick:vl},{default:r((()=>[m("选择")])),_:1})])),default:r((()=>[s(o(V),{panel:"",value:Ne.value.value,"onUpdate:value":[a[11]||(a[11]=e=>Ne.value.value=e),dl],type:"month","input-readonly":"",clearable:"",onConfirm:vl},null,8,["value"])])),_:1},8,["show"])):(n(),i(o(L),{key:1,trigger:"click",show:Ne.value.open},{trigger:r((()=>[s(o(U),{type:"info",onClick:vl},{default:r((()=>[m("选择")])),_:1})])),default:r((()=>[s(o(V),{panel:"",value:Ne.value.value,"onUpdate:value":[a[12]||(a[12]=e=>Ne.value.value=e),rl],format:Ne.value.format,type:Ne.value.componentType,"input-readonly":"",clearable:"",onConfirm:vl},null,8,["value","format","type"])])),_:1},8,["show"]))],64)):(n(),y(h,{key:1},[c(' <n-input\r\n allowClear\r\n :maxLength="255"\r\n v-model:value="dateInfo.value"\r\n @keydown.enter.prevent\r\n :placeholder="defaultPlaceholder"\r\n /> '),s(o(U),{type:"info",class:"date-time-button"},{default:r((()=>[ye,s(o(B),{value:Ne.value.value,"onUpdate:value":[a[13]||(a[13]=e=>Ne.value.value=e),sl],format:Ne.value.format,"input-readonly":"",clearable:""},null,8,["value","format"])])),_:1}),c(' <n-popover trigger="click">\r\n <template #trigger>\r\n <n-button type="info">选择</n-button>\r\n </template>\r\n <n-time-picker\r\n panel\r\n v-model:value="dateInfo.value"\r\n :format="dateInfo.format"\r\n input-readonly\r\n clearable\r\n @update:value="timeChange"\r\n >\r\n <template v-slot:icon>111</template>\r\n\r\n </n-time-picker>\r\n </n-popover> ')],64))])],2112)):o(E)(o(Ee))?(n(),y(h,{key:4},[c(" 选人组件(增加一个选人组件) "),f("div",he,[g(s(o(O),{allowClear:"",maxLength:255,value:ze.value.default_val,"onUpdate:value":a[14]||(a[14]=e=>ze.value.default_val=e),onKeydown:a[15]||(a[15]=b(x((()=>{}),["prevent"]),["enter"])),placeholder:ke},null,8,["value"]),[[k,!1]]),c(' 点击弹出选人组件弹窗 :mainForm="this" '),s(ee,{orgId:e.orgId,defaultValue:ze.value.default_val,onCheckPerson:Xe},null,8,["orgId","defaultValue"]),qe.value?(n(),y("span",_e,M(qe.value),1)):c("v-if",!0),c(' <n-button type="info">选择</n-button> ')])],2112)):(n(),y(h,{key:5},[c(" 其他 "),s(o(O),{value:ze.value.default_val,"onUpdate:value":a[16]||(a[16]=e=>ze.value.default_val=e),onKeydown:a[17]||(a[17]=b(x((()=>{}),["prevent"]),["enter"])),placeholder:"请输入默认值"},null,8,["value"])],2112))])),_:1}),s(o(j),{path:"elem_width",label:"宽度"},{default:r((()=>[s(o(z),{value:ze.value.elem_width,"onUpdate:value":a[18]||(a[18]=e=>ze.value.elem_width=e),placeholder:"请选择宽度",options:He},null,8,["value"])])),_:1}),s(o(j),{path:"isNull",label:"是否必填","label-placement":"left"},{default:r((()=>[s(o(D),{value:Le.value,"onUpdate:value":[a[19]||(a[19]=e=>Le.value=e),a[20]||(a[20]=e=>el("isNull",e))]},null,8,["value"])])),_:1}),o(E)(o(Ee))?(n(),i(o(j),{key:3,"label-placement":"left",path:"isMultiSelect",label:"是否多选"},{default:r((()=>[s(o(D),{value:Ve.value,"onUpdate:value":a[21]||(a[21]=e=>el("isMultiSelect",e))},null,8,["value"])])),_:1})):c("v-if",!0)])),_:1},8,["model"]),s(Z,{visible:Pe.value,options:Te.value,onHandleSaveBatch:nl,onTriggerBatch:We},null,8,["visible","options"])])),_:1},8,["style","title"])])),_:1},8,["class","show","width","bodyStyle"]))}});export{ge as default};
@@ -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};