cnhis-design-vue 3.2.4-release.6 → 3.2.4-release.7
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +87 -87
- package/es/components/big-table/src/components/edit-form/edit-select.d.ts +1 -1
- package/es/components/big-table/src/hooks/useEdit.d.ts +1 -1
- package/es/components/biunique-chat/index.d.ts +4 -1
- package/es/components/biunique-chat/src/Index.vue.d.ts +4 -1
- package/es/components/biunique-chat/src/components/ChatFile.vue.d.ts +4 -0
- package/es/components/biunique-chat/src/components/ChatFile.vue2.js +1 -1
- package/es/components/biunique-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/biunique-chat/src/components/ChatHeader.vue.d.ts +3 -0
- package/es/components/biunique-chat/src/components/ChatMain.vue.d.ts +2 -2
- package/es/components/biunique-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/biunique-chat/src/utils/index.d.ts +2 -0
- package/es/components/biunique-chat/src/utils/index.js +1 -1
- package/es/components/biunique-chat/style/index.css +1 -1
- package/es/components/button-print/index.d.ts +3829 -1370
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +3831 -1370
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +2065 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue.js +1 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -0
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +1996 -0
- package/es/components/button-print/src/components/OldPrintComponent.vue.js +1 -0
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -0
- package/es/components/button-print/src/constants/index.d.ts +2 -0
- package/es/components/button-print/src/constants/index.js +1 -0
- package/es/components/button-print/style/index.css +1 -1
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/classification/src/index.vue.d.ts +3 -3
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +1 -0
- package/es/components/field-set/index.d.ts +14 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +6 -26
- package/es/components/field-set/src/FieldFilter.vue.d.ts +488 -0
- package/es/components/field-set/src/FieldFilter.vue.js +1 -0
- package/es/components/field-set/src/FieldFilter.vue2.js +1 -0
- package/es/components/field-set/src/FieldSet.vue.d.ts +6 -26
- package/es/components/field-set/src/Index.vue.d.ts +15 -2
- package/es/components/field-set/src/Index.vue2.js +1 -1
- package/es/components/field-set/src/components/Row.vue.d.ts +7 -10
- package/es/components/field-set/src/components/Row.vue2.js +1 -1
- package/es/components/field-set/src/constants/filter.d.ts +93 -0
- package/es/components/field-set/src/constants/filter.js +1 -0
- package/es/components/field-set/src/types/index.d.ts +14 -1
- package/es/components/field-set/src/utils/index.d.ts +1 -0
- package/es/components/field-set/src/utils/index.js +1 -1
- package/es/components/form-config/index.d.ts +50 -7070
- package/es/components/form-config/src/FormConfig.vue.d.ts +84 -7104
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/index.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowClassName.d.ts +2 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowClassName.js +1 -0
- package/es/components/index.css +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/search-cascader/index.d.ts +1 -1
- package/es/components/search-cascader/src/SearchCascader.vue.d.ts +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
- package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
- package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
- package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
- package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
- package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
- package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
- package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
- package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
- package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
- package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_001.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_002.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_003.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_004.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_005.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_006.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_007.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_008.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_009.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_010.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_011.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_012.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_013.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_014.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_015.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_016.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_017.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_018.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_019.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_020.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_021.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_022.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_023.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_024.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_025.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_026.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_027.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_028.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_029.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_030.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_031.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_032.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_033.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_034.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_035.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_036.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_037.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_038.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_039.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_040.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_041.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_042.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_043.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_044.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_045.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_046.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_047.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_048.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_049.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_050.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_051.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_052.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_053.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_054.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_055.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_056.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_057.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_058.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_059.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_060.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_061.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_062.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_063.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_064.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_065.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_066.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_067.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_068.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_069.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_070.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_071.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_072.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_073.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_074.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_075.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_076.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_077.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_078.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_079.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_080.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_081.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_082.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_083.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_084.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_085.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_086.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_087.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_088.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_089.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_090.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_091.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_092.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_093.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_094.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_095.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_096.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_097.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_098.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_099.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_100.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_101.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_102.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_103.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_104.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_105.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_106.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_107.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_108.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_109.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_110.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_111.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_112.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_113.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_114.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_115.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_116.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_117.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_118.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_119.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_120.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_121.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_122.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_123.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_124.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_125.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_126.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_127.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_128.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_129.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_130.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_131.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_132.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_133.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_134.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_135.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_136.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_137.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_138.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_139.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_140.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_141.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_142.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_143.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_144.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_145.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_146.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_147.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_148.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_149.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_150.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_151.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_152.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_153.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_154.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_155.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_156.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_157.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_158.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_159.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_160.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_161.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_162.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_163.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_164.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_165.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_166.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_167.png.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/table_style_2.png.js +1 -1
- package/es/shared/assets/img/tooth/l-b-1.png.js +1 -1
- package/es/shared/assets/img/tooth/l-b-2.png.js +1 -1
- package/es/shared/assets/img/tooth/l-b-3.png.js +1 -1
- package/es/shared/assets/img/tooth/l-b-4.png.js +1 -1
- package/es/shared/assets/img/tooth/l-b-5.png.js +1 -1
- package/es/shared/assets/img/tooth/l-b-6.png.js +1 -1
- package/es/shared/assets/img/tooth/l-b-7.png.js +1 -1
- package/es/shared/assets/img/tooth/l-b-8.png.js +1 -1
- package/es/shared/assets/img/tooth/l-t-1.png.js +1 -1
- package/es/shared/assets/img/tooth/l-t-2.png.js +1 -1
- package/es/shared/assets/img/tooth/l-t-3.png.js +1 -1
- package/es/shared/assets/img/tooth/l-t-4.png.js +1 -1
- package/es/shared/assets/img/tooth/l-t-5.png.js +1 -1
- package/es/shared/assets/img/tooth/l-t-6.png.js +1 -1
- package/es/shared/assets/img/tooth/l-t-7.png.js +1 -1
- package/es/shared/assets/img/tooth/l-t-8.png.js +1 -1
- package/es/shared/assets/img/tooth/r-b-1.png.js +1 -1
- package/es/shared/assets/img/tooth/r-b-2.png.js +1 -1
- package/es/shared/assets/img/tooth/r-b-3.png.js +1 -1
- package/es/shared/assets/img/tooth/r-b-4.png.js +1 -1
- package/es/shared/assets/img/tooth/r-b-5.png.js +1 -1
- package/es/shared/assets/img/tooth/r-b-6.png.js +1 -1
- package/es/shared/assets/img/tooth/r-b-7.png.js +1 -1
- package/es/shared/assets/img/tooth/r-b-8.png.js +1 -1
- package/es/shared/assets/img/tooth/r-t-1.png.js +1 -1
- package/es/shared/assets/img/tooth/r-t-2.png.js +1 -1
- package/es/shared/assets/img/tooth/r-t-3.png.js +1 -1
- package/es/shared/assets/img/tooth/r-t-4.png.js +1 -1
- package/es/shared/assets/img/tooth/r-t-5.png.js +1 -1
- package/es/shared/assets/img/tooth/r-t-6.png.js +1 -1
- package/es/shared/assets/img/tooth/r-t-7.png.js +1 -1
- package/es/shared/assets/img/tooth/r-t-8.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -0,0 +1 @@
|
|
1
|
+
import e from"./OldPrintComponent.vue2.js";import r from"../../../../_virtual/_plugin-vue_export-helper.js";var o=r(e,[["__file","OldPrintComponent.vue"]]);export{o as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{defineComponent as t,inject as e,ref as n,reactive as i,computed as a,onMounted as r,watch as o,openBlock as s,createElementBlock as l,Fragment as d,createVNode as p,unref as u,withCtx as m,renderSlot as c,withModifiers as f,createTextVNode as v,toDisplayString as y,mergeProps as g}from"vue";import{isObject as b}from"@vue/shared";import{useMessage as h,NDropdown as I,NButton as P,NIcon as w}from"naive-ui";import{ChevronDown as k}from"@vicons/ionicons5";import{InjectionButtonPrintEmits as F}from"../constants/index.js";import{Print as T}from"../utils/print.js";import{isIReport as x}from"../utils/browserPrint.js";import S from"./IdentityVerification.vue.js";import{format as O}from"date-fns";import{savePrivateFormatApi as j,getPrivateFormatApi as L}from"../api.js";var E=t({__name:"OldPrintComponent",props:{printParams:{type:Array},params:{default:()=>[],type:Array},btnText:{default:"打印",type:String},printText:{default:"直接打印",type:String},previewText:{default:"打印预览",type:String},pdfLoadText:{default:"下载pdf",type:String},formatEditText:{default:"格式编辑",type:String},prevFn:{default:()=>Promise.resolve(),type:Function},queryPrintFormatByNumber:{default:()=>Promise.resolve({}),type:Function},queryTemplateParams:{default:()=>Promise.resolve({}),type:Function},strategy:{default:"MULTI",type:String},clickPrevFn:{default:()=>Promise.resolve(!0),type:Function},noDataMsg:{default:"请选中需要打印的数据",type:String},token:{type:String},printdlgshow:{default:"0",type:String},btnprint:{type:String,default:"1"},directPrint:{type:Boolean,default:!1},externalOptionConfig:{type:Object,default:()=>({})},signature:{type:String},showLoading:{type:Boolean,default:!0},hideButtons:{type:Array,default:()=>[]},printCopies:{type:Number,default:1}},setup(t,{expose:E}){var D;const M=t,N=h();let C;const V=e(F),B={},R=n(""),z=i({spinning:!1,visible:!1,formatList:[],templateParams:{},printParams:[],currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null});let A=n([{label:M.printText,key:"printText"},{label:M.previewText,key:"previewText"},{label:M.pdfLoadText,key:"downloadPdf"},{label:M.formatEditText,key:"formatEditText"},...(null==(D=M.externalOptionConfig)?void 0:D.options)||[]]);const J=a((()=>{if(!z.currentFormatId)return{};let t=z.currentFormatId;return z.formatList.find((e=>e.id===t))})),U=a((()=>{var t;return(null==(t=J.value)?void 0:t.name)||"格式选择"})),q=a((()=>{let t=z.formatList.find((t=>t.id===z.currentFormatId));return null==t?void 0:t.templateId})),K=async t=>{if(M.directPrint){if(z.spinning)return;return"button"===t?void await dt():ot()}return ot()},_=t=>p("span",{class:{active:t.key===z.currentFormatId}},[t.label]),G=(t,e)=>{z.spinning=!1;let n={type:e,formatId:z.currentFormatId,templateId:q.value};V("success",t,n)},H=t=>{z.spinning=!1,V("error",t),b(t)&&"notInstalledApp"===t.type&&N.error(t.message)},Y=t=>{z.spinning=!1,V("cancel",t)},$=t=>{V("error",{message:"前置条件执行错误",type:t,preExecution:!0})},Q=(t=0)=>{var e;const n=(null==(e=M.printParams)?void 0:e.length)?M.printParams[t]:z.printParams[t];return JSON.stringify({...n||{},...M.token?{token:M.token}:{}})},W=()=>{var t,e;let n={},i={};if(null==(t=z.templateParams.customizeDataset)?void 0:t.length){const t=(null==(e=Object.keys(z.printParams[0].datasetData||{}))?void 0:e[0])||"",n=JSON.stringify(z.printParams.map((e=>JSON.parse(e.datasetData[t]))));i={datasetData:{}},i.datasetData[t]=n}else Object.keys(z.printParams[0]).forEach((t=>{i[t]=[],z.printParams.forEach((e=>{i[t].includes(e[t])||i[t].push(e[t])})),i[t]=i[t].join(",")}));return n=Object.assign({},JSON.parse(Q(0)),i),JSON.stringify(n)},X=()=>{let t=z.printParams.length;const e=async e=>{try{--t<=0&&G(e,"print")}catch(t){console.log("error",t)}};M.showLoading&&z.spinning||(z.spinning=!0,M.prevFn("print").then((()=>{const t={formatId:z.currentFormatId,templateId:q.value,authorizationKey:R.value,printdlgshow:M.printdlgshow,signature:M.signature,copies:M.printCopies};if("MULTI"===M.strategy)for(let n=0;n<z.printParams.length;n++)n>0&&(t.printdlgshow="0"),C.printDirect({...t,params:Q(n)},e,H,Y);else C.printDirect({...t,params:W()},(t=>{G(t,"print")}),H,Y)})).catch((()=>{$("print"),z.spinning=!1})).finally((()=>{z.visible=!1})))},Z=async(t,e)=>{var n,i;switch(t){case"printText":X();break;case"previewText":(async()=>{M.showLoading&&z.spinning||(z.spinning=!0,M.prevFn("preview").then((()=>{const t="MULTI"===M.strategy?Q():W(),e={formatId:z.currentFormatId,templateId:q.value,authorizationKey:R.value,params:t,btnprint:M.btnprint,signature:M.signature};C.preview(e,(t=>{G(t,"preview")}),H)})).catch((()=>{$("preview"),z.spinning=!1})).finally((()=>{z.visible=!1})))})();break;case"formatEditText":M.showLoading&&z.spinning||(z.spinning=!0,M.prevFn("edit").then((()=>{z.identityVerification.visible=!0})).catch((()=>{$("edit")})).finally((()=>{z.visible=!1,z.spinning=!1})));break;case"downloadPdf":(async()=>{M.showLoading&&z.spinning||(z.spinning=!0,M.prevFn("download").then((()=>{const t="MULTI"===M.strategy?Q():W(),e={formatId:z.currentFormatId,templateId:q.value,authorizationKey:R.value,print:{print:"1",type:"1"},params:t,signature:M.signature};C.downloadPDF(e,(t=>G(t,"preview")),H)})).catch((()=>{$("download"),z.spinning=!1})).finally((()=>{z.visible=!1})))})();break;default:{z.visible=!1;const a=z.formatList.find((e=>e.id===t))||{};if(Object.keys(a).length>0){z.currentFormatId=t;const[e]=A.value;e.label=(null==a?void 0:a.name)||e.label,await j({formatForms:[{...a}],name:B.name||a.templateName,number:B.number||a.number,templateId:B.templateId||a.templateId,...B.id?{id:B.id}:{}},{token:M.token})}else null==(i=null==(n=M.externalOptionConfig)?void 0:n.onSelect)||i.call(n,t,e);break}}},tt=()=>{z.visible=!1,V("clickoutside")},et=()=>(z.isInited=!1,z.spinning=!1,setTimeout((()=>{z.visible=!1}),0),!1),nt=(t,e,n)=>{const i={};return e.forEach((e=>{let a=((t,e)=>{const n={DATE:"yyyy-MM-dd",DATETIME:"yyyy-MM-dd HH:mm:ss"};let i=e;return Object.keys(n).includes(t.type)&&e&&e instanceof Date&&(i=O(e,n[t.type])),(null==t?void 0:t.defaultValue)||i})(e,t[e[n]]);t[e[n]]&&a&&(i[e[n]]=a)})),i},it=({customizeDataset:t=[],param:e=[]},n=[])=>n.map((n=>{let i={};return t.forEach((t=>{const e=t.dataSetting[0].selectFieldList;i.datasetData={[t.name]:JSON.stringify(nt(n,e,"fieldName"))}})),i=Object.assign({},i,nt(n,e,"key")),i})),at=async t=>{var e;if(z.formatList=t?(t=>{let e=[];return t&&t.forEach((t=>{if(!t.format)return!1;e.push(...t.format.map((e=>Object.assign({},e,{templateName:t.name}))))})),e})(t.obj):[],z.currentFormatId=await(async(t,e)=>{var n;if(!(null==t?void 0:t.length))return"";const{data:i}=await L({templateId:t[0].templateId},{token:M.token});if("SUCCESS"===i.result){const{formatForms:e=[]}=i.map||{};Object.assign(B,i.map||{});const a=null==(n=null==e?void 0:e[0])?void 0:n.id;if(a&&t.map((t=>t.id)).includes(a))return a}const a=t.find((t=>1==t[e]));return(null==a?void 0:a.id)||t[0].id})(z.formatList,"defaultFlag"),!z.currentFormatId)return N.error("获取打印格式失败,请联系管理员!"),et();(()=>{var t;const e=z.formatList.map((t=>({label:t.name,key:t.id})));A.value.unshift({label:U.value,key:"format",children:e}),M.hideButtons.length>0&&(A.value=A.value.filter((t=>!M.hideButtons.includes(t.key))));const n=sessionStorage.getItem("portal");if(n){const e=JSON.parse(n),i=(null==(t=null==e?void 0:e.user)?void 0:t.currentRoleResourceObj)||{},a=Object.keys(i);a.includes("RY7.2.21.1.M2.G94181E")||(A.value=A.value.filter((t=>"downloadPdf"!=t.key))),a.includes("RY7.2.21.1.M2.G33633A")||(A.value=A.value.filter((t=>"formatEditText"!=t.key)))}})();let n=null==(e=await M.queryTemplateParams())?void 0:e.obj;if(!n||!q.value)return N.error("获取打印模板失败,请联系管理员!"),et();z.templateParams=n,z.printParams=it(z.templateParams,M.params)},rt=async()=>{var t;if(z.isInited)return!0;z.isInited=!0,z.spinning=!0,(()=>{if(C)return!1;C=new T})();const e=await M.queryPrintFormatByNumber();return await at(e),(null==(t=e.obj)?void 0:t.length)>0&&(R.value=e.obj[0].authorizationKey||""),z.spinning=!1,!0},ot=async(t=!0)=>{var e,n;if(await M.clickPrevFn())if((null==(e=M.params)?void 0:e.length)||(null==(n=M.printParams)?void 0:n.length)){if(!z.visible){if(!await rt())return!1}t&&(z.visible=!z.visible)}else N.warning(M.noDataMsg)},st=()=>{z.watchPrintParamsReformatFn&&z.watchPrintParamsReformatFn(),z.isInited?z.printParams=it(z.templateParams,M.params):z.watchPrintParamsReformatFn=()=>o((()=>z.isInited),(t=>{if(!t)return!1;st()}))},lt=t=>{if(z.identityVerification.visible=!1,x(z.currentFormatId))return G(null,"edit");const e={formatId:z.currentFormatId,templateId:q.value,params:Q(),token:t};C.editPrintFormat(e,(t=>{G(t,"edit")}),H)};async function dt(){await ot(!1),X()}return r((()=>{z.isInited=!1})),o((()=>M.params),(t=>{if(!(null==t?void 0:t.length))return!1;st()}),{deep:!0}),E({directPrint:dt}),(e,n)=>(s(),l(d,null,[p(u(I),{class:"c-dropdown",placement:"bottom-start",trigger:"click",show:z.visible,onClickoutside:tt,options:u(A),onSelect:Z,"render-label":_},{default:m((()=>[c(e.$slots,"button",{handleClickPrintBtn:ot,printSpinning:z.spinning,printbtnText:t.btnText,printVisible:z.visible},(()=>[p(u(P),{class:"dropdown-button",loading:t.showLoading&&z.spinning,onClick:n[1]||(n[1]=f((()=>K("button")),["stop"]))},{default:m((()=>[v(y(t.btnText)+" ",1),p(u(w),{component:u(k),size:"18",style:{"margin-left":"5px"},onClick:n[0]||(n[0]=f((()=>K("icon")),["stop"]))},null,8,["component"])])),_:1},8,["loading"])]))])),_:3},8,["show","options"]),p(S,g(e.$attrs,{modelValue:z.identityVerification.visible,"onUpdate:modelValue":n[2]||(n[2]=t=>z.identityVerification.visible=t),formatId:z.currentFormatId,templateId:u(q),onSuccess:lt}),null,16,["modelValue","formatId","templateId"])],64))}});export{E as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
const t=Symbol("InjectionButtonPrintEmits");export{t as InjectionButtonPrintEmits};
|
@@ -1 +1 @@
|
|
1
|
-
.dropdown-button{border-color:#d5d5d5!important;color:#212121;padding-right:0}.dropdown-button .n-button__content{height:100%}.dropdown-button .n-button__content .n-icon{align-items:center;display:flex;height:100%;justify-content:center;padding-right:10px;width:30px}.c-dropdown .n-dropdown-menu-wrapper span.active{color:#5585f5}.login-form-button{border-radius:24px;color:#fff;font-size:16px;height:50px;width:100%}.login-form-button-print{padding-top:15px}.login-form-button-print .n-input{border-radius:6px;color:#757575;font-size:14px;height:50px;line-height:50px}.c-button-print-modal .n-form-item-feedback-wrapper{display:none}.c-button-preview-modal{max-width:none!important}.c-button-preview-modal .n-dialog__content{height:98%}
|
1
|
+
.dropdown-button{border-color:#d5d5d5!important;color:#212121;padding-right:0}.dropdown-button .n-button__content{height:100%}.dropdown-button .n-button__content .n-icon{align-items:center;display:flex;height:100%;justify-content:center;padding-right:10px;width:30px}.c-dropdown .n-dropdown-menu-wrapper span.active{color:#5585f5}.login-form-button{border-radius:24px;color:#fff;font-size:16px;height:50px;width:100%}.login-form-button-print{padding-top:15px}.login-form-button-print .n-input{border-radius:6px;color:#757575;font-size:14px;height:50px;line-height:50px}.c-button-print-modal .n-form-item-feedback-wrapper{display:none}.c-button-preview-modal{max-width:none!important}.c-button-preview-modal .n-dialog__content{height:98%}.newprint-button-component .icon-select{padding:0 8px!important}.newprint-button-poperOver{border-radius:3px}.newprint-button-poperOver .bold{font-weight:700}.newprint-button-poperOver .print-li{overflow:hidden}.newprint-button-poperOver .print-li .n-divider{margin-bottom:6px;margin-top:6px}.newprint-button-poperOver .print-li .print-lite{align-items:center;border-radius:3px;cursor:pointer;display:flex;height:32px;justify-content:space-between;margin:3px 0}.newprint-button-poperOver .print-li .print-lite .label{padding:0 8px;white-space:nowrap}.newprint-button-poperOver .print-li .print-lite .n-icon{align-items:center;border-radius:0 3px 3px 0;display:flex;height:100%;justify-content:center;width:30px}.newprint-button-poperOver .print-li .print-lite .n-checkbox{white-space:nowrap}.newprint-button-poperOver .print-li.active{color:#2563f4}.newprint-button-poperOver .print-li.active .print-lite{background:rgba(37,99,244,.1)}.newprint-button-poperOver .print-li.active .n-icon{background:rgba(37,99,244,.15)}.newprint-button-outer{align-items:center;display:flex}
|
@@ -699,6 +699,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
699
699
|
handleInitConditions: () => Promise<void>;
|
700
700
|
validate: () => Promise<unknown>;
|
701
701
|
saveAdd: () => void;
|
702
|
+
/**
|
703
|
+
* 改变展示方式
|
704
|
+
*/
|
702
705
|
cancelSaveAdd: () => void;
|
703
706
|
checkActionList: () => boolean;
|
704
707
|
NSpin: any;
|
@@ -1449,9 +1452,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
1449
1452
|
isSecondDisabled(second: number, minute: number | null, hour: number | null): boolean | 0;
|
1450
1453
|
};
|
1451
1454
|
NSelect: any;
|
1452
|
-
/**
|
1453
|
-
* 改变展示方式
|
1454
|
-
*/
|
1455
1455
|
NPopover: any;
|
1456
1456
|
CDatePicker: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
|
1457
1457
|
updateUnchangedValue: {
|
@@ -1 +1 @@
|
|
1
|
-
import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useShadow as t}from"./useShadow.js";import{drawLine as i,defaultStyle as n,drawPoint as o,drawText as l,drawArrow as s}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import"date-fns";import{isOneLine as u,getType as a,isOverlapPoint as c,getFloorNumber as d,isValidValue as p,setOtherType as f,getTime as h,isEffectiveNode as v,getIndex as g,deleteProperty as y}from"../../utils/index.js";import{cloneDeep as m,flatten as x,last as b}from"lodash-es";import"../useEvent.js";import{useCommon as j}from"../useCommon.js";import"vue";import"naive-ui";import"@vueuse/core";import{TEMPERATURE_MENU as w,PAIN_MENU as k,OVERLAP as L}from"../../constants/index.js";import{promiseTimeout as S}from"@vueuse/shared";function E(E,M,$,O,C,P,A,I,R,T){r(E,M);const{getEqualXTypes:V,handleAddPrevent:X,getPointEventProps:z}=j(E,$,M),{createShadowLines:D}=t(),{left:F,xScaleList:H,xCellWidth:_,yCellHeight:W,originX:q,endX:G,originY:B,endY:J,itemList:K,event:N,vitalSignsOriginY:Q,painOriginY:U,hospitalizationDate:Z,config:ee,canvasHeight:te}=M,ie=new Set,ne=["xinmai","mai"],oe=new Map,le=new Set,se=new Set,re=new Set,ue=m(F.yScaleValue);function ae(){[...re].forEach((e=>{null==e||e.bringToFront()}))}function ce(t){var o;const l=ue.find((e=>"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(ie.size&&E.value.remove(...ie),ie.clear(),oe.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=oe.get(i),n=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(n,1,[t.left,t.top])}}const o=function(){const e=[],t=[],i=[];for(const e of oe)t.push(e[1]),e[0]===ne[0]&&e[1].forEach((e=>{(oe.get(ne[1])||[]).findIndex((t=>t[0]===e[0]))>-1&&i.push(e[0])}));const[n,o]=t;let l=[],s=[];return i.forEach((t=>{const i=n.findIndex((e=>e[0]===t)),r=o.findIndex((e=>e[0]===t)),u=n[i],a=o[r],c=n[i-1],d=n[i+1],p=o[r-1],f=o[r+1];if(c&&p){if(c[0]!==p[0]){const e=Math.max(c[0],p[0]);l.push([c,p].find((t=>t[0]===e)))}}else c?l.push(c):p&&s.push(p);const h=Math.min(u[1],a[1]);l.push([u,a].find((e=>e[1]===h)));const v=Math.max(u[1],a[1]);s.push([u,a].find((e=>e[1]===v)));const g=()=>{const t=[...l,...s.reverse()],[i]=t,n=b(t);i[0]===n[0]&&i[1]===n[1]&&t.splice(-1,1),e.push(t),l=[],s=[]};if(d&&f){if(d[0]!==f[0]){const e=Math.min(d[0],f[0]);l.push([d,f].find((t=>t[0]===e))),g()}}else d?(l.push(d),g()):f?(s.push(f),g()):g()})),e}();o.length>0&&function(e){S(0).then((()=>{e.forEach((e=>{const t=[],i=[];Array.from(re).forEach((n=>{var o,l;"pulse"===(null==(o=null==n?void 0:n.origin)?void 0:o.type)&&e.find((e=>Math.abs(n.left-e[0])<=1&&Math.abs(n.top-e[1])<=1))&&((null==(l=null==n?void 0:n.origin)?void 0:l.key)===ne[0]?t.push(n):i.push(n))})),[t,i].forEach((e=>{1!==(null==e?void 0:e.length)&&e.sort(((e,t)=>e.left-t.left)).forEach(((e,t)=>{t>0&&e.leftLine&&E.value.remove(e.leftLine)}))}))}))}))}(o);const{mode:s,style:r={}}=l.shadow||{};o.forEach((t=>{const o=t.map((e=>({x:e[0],y:e[1]}))),l=new e.Polygon(o,{...n,...r,strokeWidth:1});if(["slash","line"].includes(s)){l.set({fill:"transparent",stroke:r.stroke||"#f00"});const e=[];if(["slash"].includes(s))e.push(...D(t,r._angle,r.space)),e.forEach((e=>{Object.assign(e,{...n,...r}),ie.add(e)}));else{const n=function(e){const t=e.reduce(((e,t)=>{const i=Math.trunc(t[0]);return e[i]=e[i]?e[i].concat([t]):[t],e}),{}),i=Object.values(t).filter((e=>2===e.length&&Math.trunc(e[0][1])!==Math.trunc(e[1][1])));return i}(t);n.forEach((t=>{const n=i([...x(t)],{...r,originX:"center"});e.push(n),ie.add(n)}))}E.value.add(...e)}ie.add(l),E.value.add(l)}))}}function de(){var e;const t=ue.find((e=>"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>e.title.includes("脉搏"))))return;const i=Object.assign({},L,F.overlap||{}),l=[];le.size&&[...le].forEach((e=>{[...se].forEach((t=>{if(t.origin&&c(e,t)){const e=t.origin.key;if(e){const s={left:t.left,top:t.top,...n,hoverCursor:"default"};let r="koumai";"yemai"===e&&(r=e),"humai"===e&&(r="circle"),l.push(o(r,{...i[e]||{},...s}))}}}))})),setTimeout((()=>{E.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),re.add(e)}))}))}function pe(e,t,r){var a;const{type:c,riseStyle:h={},noRiseStyle:v={},verifiedStyle:g={},reduceStyle:y={},pacemaker:m={},upArrowStyle:x={},limitValueStyle:b={},nonePainPointStyle:j={},belowMinValueStyle:w={},dataList:k=[],list:L=[]}=r,{type:S,textStyle:M,showConnectLine:P=!1}=j,I=[],T=[],V=[];let X=null;if(null==(a=e.list)||a.forEach(((a,j)=>{const D=u(c)?k.find((e=>e.key===a.key)):e,F=ge(a,r),H=e.list[j+1],q=H?ge(H,r):void 0,G=H?u(c)?k.find((e=>e.key===H.key)):e:{},{title:B=""}=D;if("脉搏"===B&&"脉搏"!==G.title||"脉搏"!==B&&"脉搏"===G.title||!F||!q||d(F[0],1)!==d(q[0],1))F&&X&&(F[0]=X),X=null;else{const e=F[0]-_/2;F[0]=e+_/4,q[0]=X=F[0]+_/2}const J={};J.value=function(e,t,i){if(!(null==e?void 0:e.length)||!ee.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=Q.originY+W?e[1]+W:e[1]-W,s=l([e[0],o],{value:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return V.push(s),{obj:s,top:-W}}(F,a,D),function(e,t,r,u){var a,d;if(!["temperature","pain"].includes(c))return;if(!(null==e?void 0:e.length)&&("pain"===c||"temperature"===c&&!ve(t.time)))return;const{lineAttr:f={}}=r,{value:m}=u,x=O(t.time);let b,j,w,k,S;if(t.noRise&&v.show){const i=Y(v,t)?C(c,L,35):(null==e?void 0:e[1])||0;if(v.text)w=l([x,Y(v,t)?i:i+5],{value:v.text.split("").join("\n"),originY:"top",...v.style}),t.value||re.add(w);else if(t.value){w=s([x,i,i+2*W],{...v.style})}w&&V.push(w)}if((null==e?void 0:e[1])&&(t.rise&&h.show&&h.text&&(k=l([x,e[1]-(m?W:0)-5],{value:h.text.split("").join("\n"),originY:"bottom",...h.style}),V.push(k)),t.verified&&(S=l([x,e[1]-(m?W:0)-5],{value:"v",originX:"center",originY:"bottom",...g}),V.push(S)),p(t.physicsReduce)||p(t.drugReduce))){const l=C(c,L,null!=(a=t.physicsReduce)?a:t.drugReduce),s=l<e[1]&&(null==ee?void 0:ee.hypothermyViewCustom)?x+_/2:x;b=i([...e,s,l],{...f,...y.line,...n}),j=o((null==(d=null==y?void 0:y.point)?void 0:d.type)||"circle",{left:s,top:l,...y.point,...n,originY:l===te?"bottom":"center"}),b&&V.push(b),j&&V.push(j)}Object.assign(u,{reduceLine:{obj:b,type:"line"},noRiseText:{obj:w,top:v.text?5:2*W,isFixed:Y(v,t)},riseText:{obj:k,top:(m?-W:0)-5},verifiedText:{obj:S,top:(m?-W:0)-5},reducePoint:{obj:j,type:"reduce"}})}(F,a,D,J),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(c))return;const o=Math.max(...L),r=Math.min(...L);let u,a,d;const{upArrowShow:p=!1,limitValueShow:f=!1}=i;if(p&&+t.value>180){let t=e[1]-2.5*W,i=[e[1]-W/2,t];t<Q.originY&&(t=e[1]+2.5*W,i=[t,e[1]+W/2]),u=s([e[0],i[0],i[1]],x,"up"),V.push(u)}if(f){const i={value:t.value,originX:"center",originY:"center",...b};if(+t.value>o){const t=u?e[1]+W/2+u.height:e[1]+W;a=l([e[0],t],i),V.push(a)}+t.value<r&&(a=l([e[0],e[1]-W],i),V.push(a))}if(w.show&&+t.value<r){const t=e[1];if(w.text)d=l([e[0],e[1]+5],{value:w.text.split("").join("\n"),originY:"top",...w.style});else{const i=t+2*W;d=s([e[0],t,i],{...w.style})}V.push(d)}Object.assign(n,{upArrow:{obj:u},limitValue:{obj:a,top:-W},belowMinValue:{obj:d,top:w.text?5:2*W,moveHide:!0}})}(F,a,D,J),function(n,l,s,u,a,d){let p,h;const{pointAttr:v={},lineAttr:g={},title:y="",key:x,type:b="circle"}=a,j=e.list[u+1],w=fe(c,e.list[u].value),k=l&&fe(c,j.value);if(n&&l&&!s.breakpoint&&(!w&&!k||P)){h=i([...n,...l],{...g});const{obj:e}=(null==d?void 0:d.reducePoint)||{};if((null==e?void 0:e.top)<n[1]&&(null==ee?void 0:ee.hypothermyViewCustom)){const t=i([e.left,e.top,...l],{...g});V.unshift(t),Object.assign(d,{reduceRightLine:{obj:t,type:"reduce"}}),h.set("stroke","transparent")}}const L=s.pacemakerShow&&"pulse"==c?m.value:w&&"number"===S?0:b,Y=T[u-1],O={origin:{data:s,title:y,key:x||"",unit:r.unit,type:c,_type:f(y,c),dataIndex:t,index:u},leftLine:Y,rightLine:h,otherObj:d,...s.pacemakerShow&&"pulse"==c?m.style:v,lockMovementX:!0,...z(),...w?{selectable:!1,evented:!1,..."number"===S?M:{}}:{}};n&&(Y?O.leftLine.set("x2",n[0]):O.leftLine=null,p=o(L,{left:n[0],top:w?n[1]-5:n[1],...O}));T.push(h),p&&(x===ne[1]?le.add(p):se.add(p),function(e){N.hovered&&(e.on("mouseover",(()=>{he(e,"hover")})),e.on("mouseout",(()=>{R.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?U:Q;e.top<t.originY&&e.set("top",t.originY);e.top>t.endY&&e.set("top",t.endY)}(e),function(e){var t,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(i=e.rightLine)||i.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:i,type:n="",top:o=0,isFixed:l,moveHide:s=!1}=t||{};"reduce"!==n&&i&&("line"===n?i.setCoords().set({x1:e.left,y1:e.top}):(l||i.setCoords().set({left:e.left,top:e.top+o}),s&&(E.value.remove(i),delete e.otherObj.obj)))})),ce(e)}(e),N.hovered&&he(e)})),e.on("mouseup",(t=>{if(R.show=!1,1===t.button){const{type:t}=e.origin,i=A(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};E.value.discardActiveObject(),$("change",n),me(n,"change")}}))}(p),I.push(p),re.add(p))}(F,q,a,j,D,J)})),"pulse"===c){const{key:t}=e;let i=null;oe.set(t,I.map(((e,t,n)=>{var o,l;const s=n[t+1];if(s&&d(e.left,1)===d(s.left,1)){const t=e.left-_/2;e.set("left",t+_/4),null==(o=e.rightLine)||o.set("x1",e.left),i=e.left+_/2,s.set("left",i)}else i&&(null==(l=e.leftLine)||l.set("x2",i),e.set("left",i)),i=null;return[e.left,e.top]})))}const D=T.filter((e=>e));E.value.add(...D,...I,...V)}function fe(e,t){return"pain"===e&&0==t}function he(e,t="moving"){const{title:i,unit:n,type:o,data:l}=e.origin;R.point={x:e.left,y:e.top},R.list=[function(){const{drugReduce:s,physicsReduce:r}=l||{},u="hover"===t?l.value:A(o,e.top);if(p(s))return`药物降${"pain"==o?"痛":"温"} ${u}—>${s}${n||""}`;if(p(r))return`物理降${"pain"==o?"痛":"温"} ${u}—>${r}${n||""}`;return`${i} ${u}${n||""}`}(),`时间 ${((null==l?void 0:l.time)||P(e.left)).slice(-5)}`],R.show=!0}function ve(e){const[t]=H,i=b(H),n=t.start,o=i.end,l=h(e);return l>=n&&l<=o}function ge(e,t){const i="pain"===t.type?U:Q;if(!v(e)||!ve(e.time))return;const n=O(e.time),o=C(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}function ye(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=h(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=h(`${P(e)}:00`);return Z&&l<h(Z)?(X("exceedMin"),!1):!(l>o)||(X("exceedMax"),!1)}function me(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=ue.find((e=>e.type===i));if("add"===t){const e=u(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=g(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;xe()}function xe(){var e;re.size&&(null==(e=E.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...re]))),oe.clear(),re.clear(),le.clear(),se.clear(),ue.forEach((e=>{e.dataList.forEach(((t,i)=>{u(e.type)&&!t.enable||pe(t,i,e)}))})),ce(),ae(),de()}return oe.clear(),le.clear(),se.clear(),ue.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const t=C(e.type,e.list,e.positionLine.value),n=i([q,t,G,t],e.positionLine);E.value.add(n)}(e),e.dataList.forEach(((t,i)=>{!t.show||u(e.type)&&!t.enable||pe(t,i,e)}))})),ce(),ae(),de(),E.value.on("mouse:up",(e=>{const{button:t,target:i,pointer:n={}}=e;if(3===t){if(!M.event.evented)return;const{x:e=0,y:t=0}=n;if(e>=q&&e<=G&&t>=B&&t<=J){T.point={x:e,y:t},T.show=!0;const{type:o}=(null==i?void 0:i.origin)||{};if(i&&["temperature","pain"].includes(o))"temperature"===o&&(T.list=[...w]),"pain"===o&&(T.list=[...k]),T.target=i;else{T.target=null,T.list=["新增节点"],K.forEach((i=>{if(!V([...re],e,"_type").includes(i.bigType)){const e=["pain"].includes(i.bigType)?U:Q;t>=e.originY&&t<=e.endY&&T.list.push({renderItem:I?I(i):()=>i.title,origin:{title:i.title,unit:i.unit,type:a(i.bigType),dataIndex:i.dataIndex,key:i.key},pointer:n})}}));const i=ye(e);i&&1!==T.list.length||(T.show=!1,1===T.list.length&&i&&X("repeat"))}}}if(1===t){if(i)return;const{x:e=0,y:t=0}=n;e>=q&&e<=G&&t>0&&t<te&&$("click:grid",{x:e,y:t,time:P(e)})}})),{clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=y(i,[...w,...k]);s[`${e.type}`]=e.value,u(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};$("change",r),me(r,"change")}else{const t={data:{time:P(e.pointer.x),value:A(e.origin.type,e.pointer.y),...u(e.origin.type)?{key:e.origin.key}:{}},...e.origin};$("add",t),me(t)}},setPopup:he,isAddPoint:ye,updateData:me,redrawPoints:xe,gridPoints:re}}function Y(e,t){return"fixed"===e.position||!t.value&&0!==t.value}export{E as useCenter};
|
1
|
+
import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useShadow as t}from"./useShadow.js";import{drawLine as i,defaultStyle as n,drawPoint as o,drawText as l,drawArrow as s}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import{format as u}from"date-fns";import{isOneLine as a,getType as c,isOverlapPoint as d,getFloorNumber as p,isValidValue as f,setOtherType as h,getTime as v,isEffectiveNode as g,getIndex as m,deleteProperty as y}from"../../utils/index.js";import{cloneDeep as x,flatten as b,last as j}from"lodash-es";import"../useEvent.js";import{useCommon as w}from"../useCommon.js";import"vue";import"naive-ui";import"@vueuse/core";import{TEMPERATURE_MENU as k,PAIN_MENU as L,OVERLAP as S}from"../../constants/index.js";import{promiseTimeout as E}from"@vueuse/shared";function Y(Y,$,O,T,C,P,A,I,R,V){r(Y,$);const{getEqualXTypes:X,handleAddPrevent:D,getPointEventProps:H}=w(Y,O,$),{createShadowLines:z}=t(),{left:F,xScaleList:_,xCellWidth:W,yCellHeight:q,originX:G,endX:B,originY:J,endY:K,itemList:N,event:Q,vitalSignsOriginY:U,painOriginY:Z,hospitalizationDate:ee,config:te,canvasHeight:ie}=$,ne=new Set,oe=["xinmai","mai"],le=new Map,se=new Set,re=new Set,ue=new Set,ae=x(F.yScaleValue);function ce(){[...ue].forEach((e=>{null==e||e.bringToFront()}))}function de(t){var o;const l=ae.find((e=>"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(ne.size&&Y.value.remove(...ne),ne.clear(),le.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=le.get(i),n=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(n,1,[t.left,t.top])}}const o=function(){const e=[],t=[],i=[];for(const e of le)t.push(e[1]),e[0]===oe[0]&&e[1].forEach((e=>{(le.get(oe[1])||[]).findIndex((t=>t[0]===e[0]))>-1&&i.push(e[0])}));const[n,o]=t;let l=[],s=[];return i.forEach((t=>{const i=n.findIndex((e=>e[0]===t)),r=o.findIndex((e=>e[0]===t)),u=n[i],a=o[r],c=n[i-1],d=n[i+1],p=o[r-1],f=o[r+1];if(c&&p){if(c[0]!==p[0]){const e=Math.max(c[0],p[0]);l.push([c,p].find((t=>t[0]===e)))}}else c?l.push(c):p&&s.push(p);const h=Math.min(u[1],a[1]);l.push([u,a].find((e=>e[1]===h)));const v=Math.max(u[1],a[1]);s.push([u,a].find((e=>e[1]===v)));const g=()=>{const t=[...l,...s.reverse()],[i]=t,n=j(t);i[0]===n[0]&&i[1]===n[1]&&t.splice(-1,1),e.push(t),l=[],s=[]};if(d&&f){if(d[0]!==f[0]){const e=Math.min(d[0],f[0]);l.push([d,f].find((t=>t[0]===e))),g()}}else d?(l.push(d),g()):f?(s.push(f),g()):g()})),e}();o.length>0&&function(e){E(0).then((()=>{e.forEach((e=>{const t=[],i=[];Array.from(ue).forEach((n=>{var o,l;"pulse"===(null==(o=null==n?void 0:n.origin)?void 0:o.type)&&e.find((e=>Math.abs(n.left-e[0])<=1&&Math.abs(n.top-e[1])<=1))&&((null==(l=null==n?void 0:n.origin)?void 0:l.key)===oe[0]?t.push(n):i.push(n))})),[t,i].forEach((e=>{1!==(null==e?void 0:e.length)&&e.sort(((e,t)=>e.left-t.left)).forEach(((e,t)=>{t>0&&e.leftLine&&Y.value.remove(e.leftLine)}))}))}))}))}(o);const{mode:s,style:r={}}=l.shadow||{};o.forEach((t=>{const o=t.map((e=>({x:e[0],y:e[1]}))),l=new e.Polygon(o,{...n,...r,strokeWidth:1});if(["slash","line"].includes(s)){l.set({fill:"transparent",stroke:r.stroke||"#f00"});const e=[];if(["slash"].includes(s))e.push(...z(t,r._angle,r.space)),e.forEach((e=>{Object.assign(e,{...n,...r}),ne.add(e)}));else{const n=function(e){const t=e.reduce(((e,t)=>{const i=Math.trunc(t[0]);return e[i]=e[i]?e[i].concat([t]):[t],e}),{}),i=Object.values(t).filter((e=>2===e.length&&Math.trunc(e[0][1])!==Math.trunc(e[1][1])));return i}(t);n.forEach((t=>{const n=i([...b(t)],{...r,originX:"center"});e.push(n),ne.add(n)}))}Y.value.add(...e)}ne.add(l),Y.value.add(l)}))}}function pe(){var e;const t=ae.find((e=>"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>e.title.includes("脉搏"))))return;const i=Object.assign({},S,F.overlap||{}),l=[];se.size&&[...se].forEach((e=>{[...re].forEach((t=>{if(t.origin&&d(e,t)){const e=t.origin.key;if(e){const s={left:t.left,top:t.top,...n,hoverCursor:"default"};let r="koumai";"yemai"===e&&(r=e),"humai"===e&&(r="circle"),l.push(o(r,{...i[e]||{},...s}))}}}))})),setTimeout((()=>{Y.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),ue.add(e)}))}))}function fe(e,t,r){var u;const{type:c,riseStyle:d={},noRiseStyle:v={},verifiedStyle:g={},reduceStyle:m={},pacemaker:y={},upArrowStyle:x={},limitValueStyle:b={},nonePainPointStyle:j={},belowMinValueStyle:w={},dataList:k=[],list:L=[]}=r,{type:S,textStyle:E,showConnectLine:$=!1}=j,P=[],I=[],V=[];let X=null;if(null==(u=e.list)||u.forEach(((u,j)=>{const D=a(c)?k.find((e=>e.key===u.key)):e,z=me(u,r),F=e.list[j+1],_=F?me(F,r):void 0,G=F?a(c)?k.find((e=>e.key===F.key)):e:{},{title:B=""}=D;if("脉搏"===B&&"脉搏"!==G.title||"脉搏"!==B&&"脉搏"===G.title||!z||!_||p(z[0],1)!==p(_[0],1))z&&X&&(z[0]=X),X=null;else{const e=z[0]-W/2;z[0]=e+W/4,_[0]=X=z[0]+W/2}const J={};J.value=function(e,t,i){if(!(null==e?void 0:e.length)||!te.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=U.originY+q?e[1]+q:e[1]-q,s=l([e[0],o],{value:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return V.push(s),{obj:s,top:-q}}(z,u,D),function(e,t,r,u){var a,p;if(!["temperature","pain"].includes(c))return;if(!(null==e?void 0:e.length)&&("pain"===c||"temperature"===c&&!ge(t.time)))return;const{lineAttr:h={}}=r,{value:y}=u,x=T(t.time);let b,j,w,k,S;if(t.noRise&&v.show){const i=M(v,t)?C(c,L,35):(null==e?void 0:e[1])||0;if(v.text)w=l([x,M(v,t)?i:i+5],{value:v.text.split("").join("\n"),originY:"top",...v.style}),t.value||ue.add(w);else if(t.value){w=s([x,i,i+2*q],{...v.style})}w&&V.push(w)}if((null==e?void 0:e[1])&&(t.rise&&d.show&&d.text&&(k=l([x,e[1]-(y?q:0)-5],{value:d.text.split("").join("\n"),originY:"bottom",...d.style}),V.push(k)),t.verified&&(S=l([x,e[1]-(y?q:0)-5],{value:"v",originX:"center",originY:"bottom",...g}),V.push(S)),f(t.physicsReduce)||f(t.drugReduce))){const l=C(c,L,null!=(a=t.physicsReduce)?a:t.drugReduce),s=l<e[1]&&(null==te?void 0:te.hypothermyViewCustom)?x+W/2:x;b=i([...e,s,l],{...h,...m.line,...n}),j=o((null==(p=null==m?void 0:m.point)?void 0:p.type)||"circle",{left:s,top:l,...m.point,...n,originY:l===ie?"bottom":"center"}),b&&V.push(b),j&&V.push(j)}Object.assign(u,{reduceLine:{obj:b,type:"line"},noRiseText:{obj:w,top:v.text?5:2*q,isFixed:M(v,t)},riseText:{obj:k,top:(y?-q:0)-5},verifiedText:{obj:S,top:(y?-q:0)-5},reducePoint:{obj:j,type:"reduce"}})}(z,u,D,J),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(c))return;const o=Math.max(...L),r=Math.min(...L);let u,a,d;const{upArrowShow:p=!1,limitValueShow:f=!1}=i;if(p&&+t.value>180){let t=e[1]-2.5*q,i=[e[1]-q/2,t];t<U.originY&&(t=e[1]+2.5*q,i=[t,e[1]+q/2]),u=s([e[0],i[0],i[1]],x,"up"),V.push(u)}if(f){const i={value:t.value,originX:"center",originY:"center",...b};if(+t.value>o){const t=u?e[1]+q/2+u.height:e[1]+q;a=l([e[0],t],i),V.push(a)}+t.value<r&&(a=l([e[0],e[1]-q],i),V.push(a))}if(w.show&&+t.value<r){const t=e[1];if(w.text)d=l([e[0],e[1]+5],{value:w.text.split("").join("\n"),originY:"top",...w.style});else{const i=t+2*q;d=s([e[0],t,i],{...w.style})}V.push(d)}Object.assign(n,{upArrow:{obj:u},limitValue:{obj:a,top:-q},belowMinValue:{obj:d,top:w.text?5:2*q,moveHide:!0}})}(z,u,D,J),function(n,l,s,u,a,d){let p,f;const{pointAttr:v={},lineAttr:g={},title:m="",key:x,type:b="circle"}=a,j=e.list[u+1],w=he(c,e.list[u].value),k=l&&he(c,j.value);if(n&&l&&!s.breakpoint&&(!w&&!k||$)){f=i([...n,...l],{...g});const{obj:e}=(null==d?void 0:d.reducePoint)||{};if((null==e?void 0:e.top)<n[1]&&(null==te?void 0:te.hypothermyViewCustom)){const t=i([e.left,e.top,...l],{...g});V.unshift(t),Object.assign(d,{reduceRightLine:{obj:t,type:"reduce"}}),f.set("stroke","transparent")}}const L=s.pacemakerShow&&"pulse"==c?y.value:w&&"number"===S?0:b,M=I[u-1],T={origin:{data:s,title:m,key:x||"",unit:r.unit,type:c,_type:h(m,c),dataIndex:t,index:u},leftLine:M,rightLine:f,otherObj:d,...s.pacemakerShow&&"pulse"==c?y.style:v,lockMovementX:!0,...H(),...w?{selectable:!1,evented:!1,..."number"===S?E:{}}:{}};n&&(M?T.leftLine.set("x2",n[0]):T.leftLine=null,p=o(L,{left:n[0],top:w?n[1]-5:n[1],...T}));I.push(f),p&&(x===oe[1]?se.add(p):re.add(p),function(e){Q.hovered&&(e.on("mouseover",(()=>{ve(e,"hover")})),e.on("mouseout",(()=>{R.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?Z:U;e.top<t.originY&&e.set("top",t.originY);e.top>t.endY&&e.set("top",t.endY)}(e),function(e){var t,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(i=e.rightLine)||i.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:i,type:n="",top:o=0,isFixed:l,moveHide:s=!1}=t||{};"reduce"!==n&&i&&("line"===n?i.setCoords().set({x1:e.left,y1:e.top}):(l||i.setCoords().set({left:e.left,top:e.top+o}),s&&(Y.value.remove(i),delete e.otherObj.obj)))})),de(e)}(e),Q.hovered&&ve(e)})),e.on("mouseup",(t=>{if(R.show=!1,1===t.button){const{type:t}=e.origin,i=A(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};Y.value.discardActiveObject(),O("change",n),xe(n,"change")}}))}(p),P.push(p),ue.add(p))}(z,_,u,j,D,J)})),"pulse"===c){const{key:t}=e;let i=null;le.set(t,P.map(((e,t,n)=>{var o,l;const s=n[t+1];if(s&&p(e.left,1)===p(s.left,1)){const t=e.left-W/2;e.set("left",t+W/4),null==(o=e.rightLine)||o.set("x1",e.left),i=e.left+W/2,s.set("left",i)}else i&&(null==(l=e.leftLine)||l.set("x2",i),e.set("left",i)),i=null;return[e.left,e.top]})))}const D=I.filter((e=>e));Y.value.add(...D,...P,...V)}function he(e,t){return"pain"===e&&0==t}function ve(e,t="moving"){const{title:i,unit:n,type:o,data:l}=e.origin;R.point={x:e.left,y:e.top};let s=`时间 ${((null==l?void 0:l.time)||P(e.left)).slice(-5)}`;R.list=[function(){const{drugReduce:r,physicsReduce:u}=l||{},a="hover"===t?l.value:A(o,e.top);if(f(r))return s+=(null==l?void 0:l.changeTime)?"—>"+(null==l?void 0:l.changeTime.slice(-5)):"",`药物降${"pain"==o?"痛":"温"} ${a}—>${r}${n||""}`;if(f(u))return s+=(null==l?void 0:l.changeTime)?"—>"+(null==l?void 0:l.changeTime.slice(-5)):"",`物理降${"pain"==o?"痛":"温"} ${a}—>${u}${n||""}`;return`${i} ${a}${n||""}`}(),s],R.show=!0}function ge(e){const[t]=_,i=j(_),n=t.start,o=i.end,l=v(e);return l>=n&&l<=o}function me(e,t){const i="pain"===t.type?Z:U;if(!g(e)||!ge(e.time))return;const n=T(e.time),o=C(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}function ye(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=v(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=v(`${P(e)}:00`);return ee&&l<v(ee)?(D("exceedMin"),!1):!(l>o)||(D("exceedMax"),!1)}function xe(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=ae.find((e=>e.type===i));if("add"===t){const e=a(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=m(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;be()}function be(){var e;ue.size&&(null==(e=Y.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...ue]))),le.clear(),ue.clear(),se.clear(),re.clear(),ae.forEach((e=>{e.dataList.forEach(((t,i)=>{a(e.type)&&!t.enable||fe(t,i,e)}))})),de(),ce(),pe()}return le.clear(),se.clear(),re.clear(),ae.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const t=C(e.type,e.list,e.positionLine.value),n=i([G,t,B,t],e.positionLine);Y.value.add(n)}(e),e.dataList.forEach(((t,i)=>{!t.show||a(e.type)&&!t.enable||fe(t,i,e)}))})),de(),ce(),pe(),Y.value.on("mouse:up",(e=>{const{button:t,target:i,pointer:n={}}=e;if(3===t){if(!$.event.evented)return;const{x:e=0,y:t=0}=n;if(e>=G&&e<=B&&t>=J&&t<=K){V.point={x:e,y:t},V.show=!0;const{type:o}=(null==i?void 0:i.origin)||{};if(i&&["temperature","pain"].includes(o))"temperature"===o&&(V.list=[...k]),"pain"===o&&(V.list=[...L]),V.target=i;else{V.target=null,V.list=["新增节点"],N.forEach((i=>{if(!X([...ue],e,"_type").includes(i.bigType)){const e=["pain"].includes(i.bigType)?Z:U;t>=e.originY&&t<=e.endY&&V.list.push({renderItem:I?I(i):()=>i.title,origin:{title:i.title,unit:i.unit,type:c(i.bigType),dataIndex:i.dataIndex,key:i.key},pointer:n})}}));const i=ye(e);i&&1!==V.list.length||(V.show=!1,1===V.list.length&&i&&D("repeat"))}}}if(1===t){if(i)return;const{x:e=0,y:t=0}=n;e>=G&&e<=B&&t>0&&t<ie&&O("click:grid",{x:e,y:t,time:P(e)})}})),{clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=y(i,[...k,...L]);s[`${e.type}`]=e.value,s.changeTime=u(new Date,"yyyy-MM-dd HH:mm"),a(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};O("change",r),xe(r,"change")}else{const t={data:{time:P(e.pointer.x),value:A(e.origin.type,e.pointer.y),...a(e.origin.type)?{key:e.origin.key}:{}},...e.origin};O("add",t),xe(t)}},setPopup:ve,isAddPoint:ye,updateData:xe,redrawPoints:be,gridPoints:ue}}function M(e,t){return"fixed"===e.position||!t.value&&0!==t.value}export{Y as useCenter};
|
@@ -1 +1 @@
|
|
1
|
-
import{fabric as
|
1
|
+
import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as t,defaultTextStyle as i,defaultStyle as n,drawTextAndIconGroup as o,drawTextGroup as l}from"../useDraw.js";import"date-fns";import{getType as s,isOneLine as r}from"../../utils/index.js";import"lodash-es";import"../useEvent.js";import{getScaleInfo as u,drawScaleNumber as a,drawScaleLine as h}from"../useScaleColumn.js";import{useCommon as c}from"../useCommon.js";import"vue";import"./useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";function p(p,d,g,f,m,v,y,w,S,b,Y,x){var j,C;const{getEqualXTypes:X,handleAddPrevent:N,isGridLimit:T}=c(p,g,d),{originY:V,endY:L,originX:k,endX:E,xCellWidth:M,yCellHeight:W,left:G,vitalSignsOriginY:O,painOriginY:R,painHeight:A,iconsWidth:H,itemList:I,painIndex:_,right:B,canvasWidth:J,canvasHeight:$,getRightInfo:q,borderStyle:D,surplusCell:P,painSurplusCell:z}=d;function F(o){var s;if(!(null==o?void 0:o.length))return;const{layout:r}=o[0];let c=H,d=k;"right"===r&&(c=E,d=E+(null!=(s=null==B?void 0:B.width)?s:0));const g=[],f=A&&"right"!==r?o.length-1:o.length,m=(d-c)/f,v=m+(d-c)%f;o.forEach(((o,s)=>{if("pain"===o.type)return void function(n){const{list:o=[],spaceGridNumber:s=5,showScale:r,showNumber:h,position:c,showMaxMinNumber:d,style:g,title:f}=n,m=R.originY-z[0]*W,v=l({width:k-H,height:A+(z[0]+z[1])*W,...D},{value:`${f}`,...i,...g||{}},{left:H,top:m}),y=t([H,m,k,m],D),w=[];if(r||h){const{lineXMain:t,textLeft:i}=u(c,H,k-H),l=o.length;o.forEach(((o,u)=>{let c=R.endY-u*W*s;if(0===u&&0===z[1]&&(c=L-5),h&&(!(0===u||u===l-1)||d||0===u&&z[1]>0||u===l-1&&z[0]>0)&&w.push(a(o,n,i,c)),r&&(0!==u||z[1]>0)){const[i,n]=t,o=new e.Line([i,c,n,c],{...D,...g});w.push(o)}}))}p.value.add(y,v,...w),v.sendToBack()}(o);const d=[],f=0===s?v:m,y=0===s?c:v+c+(s-1)*m,w="right"===r?0:O.originY,S="right"===r?$:O.endY,b=s>0?t([y,w,y,S],{objectCaching:!1,...D}):null;b&&d.push(b);const Y=y+f/2,{list:x=[],spaceGridNumber:j=5,showScale:C,showNumber:X,position:N,showMaxMinNumber:T,detailedList:E=[],showdetailedScale:M,showRange:G=[]}=o;if(C||X){const[e,t]=G,{lineXMain:i,lineXSub:n,textLeft:l}=u(N,y,f),s=(x[1]-x[0])/2,r=M&&!E.length?x.reduce(((e,t,i)=>{const n=e[e.length-1];return 0===i?[t]:e.concat([n+s,n+2*s])}),[]):M&&(null==E?void 0:E.length)?E:x,c=r.length;r.forEach(((s,r)=>{if(e&&+s<e)return;if(t&&+s>t)return;const u=O.endY-r*W*(M?j/2:j);if(X&&(!(0===r||r===c-1)||T)&&e!==+s){const e=0==r?u-5:u,t=a(s,o,l,e),i=O.originY+t.height/2;e<i&&t.set({top:i}),d.push(t)}d.push(...h(o,r,i,n,u,W,O.originY))}))}let I=o.title||"";o.unit&&(I+="\n"+o.unit);let B=O.originY+W;0!==_&&P[0]>1&&(B=V+W*P[0]/2),I&&d.push(new e.Text(String(I),{...i,left:Y,top:B,textAlign:"center",...o.style}));const J=new e.Group(d,{...n,objectCaching:!1});g.push(J)}));const y=g.length>0?new e.Group([...g],{...n,objectCaching:!1}):null;y&&p.value.add(y),y&&y.sendToBack()}H&&function(){const e=JSON.parse(JSON.stringify(I));let t=L;const i=H-G.icons.marginRight;e.reverse().forEach((e=>{t-=10;let n=e.title.replace(/(.{2})/g,"$1\n");n.endsWith("\n")&&(n=n.slice(0,n.length-1));const{text:l,icon:u}=o(n,e,{text:{left:i-(e.pointAttr.width||10)-5,top:t,originX:"right"},icon:{originX:"right",left:i,topY:t,origin:{type:s(e.bigType),_type:e.bigType},...d.event}});var a;t-=l.height||30,(a=u).on("moving",(()=>{a.set("originX","center"),function(e){if(e.left>=k&&e.left<=E){e.setCoords();const t="pain"===e.origin.type?R:O;e.top<t.originY&&e.set("top",t.originY),e.top>t.endY&&e.set("top",t.endY)}}(a),T(a)?f(a):m.show=!1})),a.on("mouseup:before",(e=>{if(m.show=!1,0===e.e.button&&T(a)){const e=X([...x],a.left,"_type").includes(a.origin._type),t=b(a.left);if(!t||e)e&&t&&N("repeat");else{const e={data:{time:w(a.left),value:S(a.origin.type,a.top),...r(a.origin.type)?{key:a.origin.key}:{}},...a.origin};g("add",e),Y(e)}}!function(e){e.setCoords().set({originX:"right",left:e.originLeft,top:e.originTop})}(a)})),p.value.add(l,u)}))}();const K=G.yScaleValue.filter((e=>"left"===e.layout&&"pain"!==e.type&&e.show));if((null==B?void 0:B.width)&&"left"===(null==(j=null==B?void 0:B.yScaleValue)?void 0:j.layout)&&(null==(C=null==B?void 0:B.yScaleValue)?void 0:C.show)&&K.push(q),_>0&&G.yScaleValue[_].show){const e=G.yScaleValue[_];0===_&&G.yScaleValue.length>1&&K.unshift(e),_==G.yScaleValue.length-1&&K.push(e)}const Q=K.findIndex((e=>"pulse"===e.type&&e.show&&e.doubleShow)),U=K[Q];return Q>-1&&K.splice(Q,0,{...U,title:(null==U?void 0:U.doubleTitle)||(null==U?void 0:U.title)}),F(K),p.value.add(new e.Rect({left:H,top:0,width:J-H-D.strokeWidth,height:$-D.strokeWidth,fill:"transparent",...D})),{drawScaleValue:F}}export{p as useLeft};
|
@@ -1 +1 @@
|
|
1
|
-
import{ref as e,computed as
|
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{useCumputedPoint as i}from"../useCumputedPoint.js";import{useCanvasEvent as r}from"../useEvent.js";import{setOtherType as n,getFloorNumber as o}from"../../utils/index.js";import{flatten as s}from"lodash-es";import{format as v,addDays as d}from"date-fns";import"naive-ui";import"@vueuse/core";import{useTop as c}from"./useTop.js";import{useLeft as p}from"./useLeft.js";import{useRight as h}from"./useRight.js";import{useCenter as g}from"./useCenter.js";import{useBottom as m}from"./useBottom.js";import{useOther as f}from"./useOther.js";function y(y,S,b,w,Y,C){const x=15,D=e(),j=e(),V=e(),H=a((()=>{const{painSurplusCell:e=[0,0]}=S.data.grid||{};return~ee.value?e:[0,0]})),X=a((()=>{const{surplusCell:e=[0,0,0,0]}=S.data.grid||{};return 0===ee.value?e[0]=e[0]+H.value[0]:ee.value>0&&(e[2]=e[2]+H.value[1]),e})),L=a((()=>{const{top:e}=S.data;return e.date.show&&(e.date.height||x)||0})),I=a((()=>{var e;const{top:a}=S.data;return(null==(e=a.hospitalDays)?void 0:e.show)&&(a.hospitalDays.height||x)||0})),M=a((()=>{var e;const{top:a}=S.data;return(null==(e=a.operationDays)?void 0:e.show)&&(a.operationDays.height||x)||0})),P=a((()=>{var e,a,t;const{top:l}=S.data;return((null==(e=l.xScalevalue)?void 0:e.show)&&(l.xScalevalue.height||x)||0)+((null==(a=l.xScalevalue)?void 0:a.show)&&null!=(t=l.dayHeight)?t:0)})),N=a((()=>{var e;const{bottom:a}=S.data;return(null==(e=null==a?void 0:a.breathing)?void 0:e.show)&&(a.breathing.height||30)||0})),O=a((()=>{const{grid:e}=S.data;return e.mainXCell*e.subXCell+X.value[1]+X.value[3]})),W=a((()=>{const{grid:e}=S.data,a=ee.value>0?H.value[0]:0;return e.mainYCell*e.subYCell+X.value[0]+X.value[2]+a})),$=a((()=>{var e;const{width:a,right:t=null,top:l}=S.data;if(!t)return a;return a-(null!=(e=t.width)?e:0)})),k=a((()=>$.value-X.value[1]*A.value)),G=a((()=>{const{top:e,left:a}=S.data;return e.titleWidth+E.value})),R=a((()=>{const{bottom:e=null,height:a}=S.data;if(!e)return a;return a-(e.height||30)})),q=a((()=>R.value-X.value[2]*B.value)),z=a((()=>{var e;const{top:a}=S.data,t=a.xScalevalue.show&&(null!=(e=a.dayHeight)?e:0)||0,l=a.xScalevalue.show&&(a.xScalevalue.height||x)||0;return L.value+t+l+I.value+M.value})),T=a((()=>z.value+X.value[0]*B.value)),A=a((()=>($.value-G.value)/O.value)),B=a((()=>(R.value-z.value)/W.value)),E=a((()=>{var e,a;const{left:t}=S.data;return(null==(e=t.icons)?void 0:e.show)&&((null==(a=t.icons)?void 0:a.width)||100)||0})),F=a((()=>{var e,a;const{top:t,grid:l}=S.data,u=(null==(a=null==(e=t.date.list)?void 0:e.slice)?void 0:a.call(e,0,l.mainXCell))||[],i=t.xScalevalue.times;let r=G.value-A.value;const n=t.date.startDate||v(new Date,"yyyy-MM-dd"),o=u.reduce(((e,a,t)=>0===t?e.concat(n):e.concat(v(d(new Date(n.replace(/-/g,"/")),t),"yyyy-MM-dd"))),[]).map((e=>i.map((a=>{r+=A.value;const t=Date.parse(`${e} ${a.start}`),l=Date.parse(`${e} ${a.end}`);return{start:t,end:l,left:r,center:r+A.value/2,scaleCell:(l-t)/A.value}}))));return s(o)})),J=a((()=>ne("breathe"))),K=a((()=>ne("pulse"))),Q=a((()=>ne("temperature"))),U=a((()=>ne("pain"))),Z=a((()=>{var e;return(null==(e=S.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),_=a((()=>{const{left:e}=S.data;return s(e.yScaleValue.map((e=>e.dataList.filter((e=>e.show)).map(((a,t)=>({...a,bigType:n(a.title,e.type),unit:e.unit,dataIndex:t}))))))})),ee=a((()=>{var e,a;const{left:t}=S.data,l=t.yScaleValue.findIndex((e=>"pain"===e.type));return l>-1&&(null==(a=null==(e=t.yScaleValue[l].dataList)?void 0:e[0])?void 0:a.show)?l:-1})),ae=a((()=>{const{grid:e}=S.data;return-1===ee.value?0:B.value*e.subYCell})),te=a((()=>{const{left:e}=S.data,a={originY:T.value,endY:q.value};return 0===ee.value&&e.yScaleValue.length>1?a.endY=T.value+ae.value:ee.value===e.yScaleValue.length-1&&(a.originY=q.value-ae.value),a})),le=a((()=>{const{left:e}=S.data,a={originY:T.value,endY:q.value};return 0===ee.value&&e.yScaleValue.length>1?a.originY=T.value+ae.value+H.value[1]*B.value:ee.value===e.yScaleValue.length-1&&(a.endY=q.value-ae.value-H.value[1]*B.value),a})),ue=a((()=>{var e,a;const{top:t,grid:l}=S.data,u=[];for(const i in t)t[i].show&&u.push({...t[i],list:(null==(a=null==(e=t[i].list)?void 0:e.slice)?void 0:a.call(e,0,l.mainXCell))||[],key:i});return u.sort(((e,a)=>e.seq-a.seq))})),ie=a((()=>{var e;const{left:a,right:t}=S.data,l=a.yScaleValue.find((e=>"temperature"===e.type)),u=(null==t?void 0:t.yScaleValue)||{};if(null==(e=null==l?void 0:l.list)?void 0:e.length){const e=(null==u?void 0:u.showdetailedScale)?l.list.reduce((e=>{const a=e[e.length-1];return a?e.concat([a+1,a+2]):e.concat([92])}),[]):[],a=l.list.map((e=>o(1.8*e+32)));Object.assign(u,{list:a,detailedList:e,spaceGridNumber:l.spaceGridNumber})}return u})),re=t({canvasWidth:S.data.width,canvasHeight:S.data.height,borderStyle:{...u,...S.data.borderStyle||{}},selectionStyle:S.data.selectionStyle||{},dateHeight:L.value,hospitalDaysHeight:I.value,operationDaysHeight:M.value,xScalevalueHeight:P.value,topList:ue.value,breathingHeight:N.value,hospitalizationDate:S.data.hospitalizationDate,grid:S.data.grid,top:S.data.top,left:S.data.left,right:S.data.right,bottom:S.data.bottom,other:S.data.other,painIndex:ee.value,painHeight:ae.value,painOriginY:te.value,vitalSignsOriginY:le.value,gridXNumber:O.value,gridYNumber:W.value,iconsWidth:E.value,originX:G.value,originY:z.value,originYLimit:T.value,endX:$.value,endXLimit:k.value,endY:R.value,xCellWidth:A.value,yCellHeight:B.value,xScaleList:F.value,breatheYCell:J.value,pulseYCell:K.value,temperatureYCell:Q.value,painYCell:U.value,event:Z.value,itemList:_.value,getRightInfo:ie.value,config:S.data.config||{},surplusCell:X.value,painSurplusCell:H.value});function ne(e){const{yScaleValue:a}=S.data.left,t=a.find((a=>a.type===e)),l=(null==t?void 0:t.list)||[];return l.length?B.value/((l[1]-l[0])/t.spaceGridNumber):0}const{computedX:oe,computedY:se,getXValue:ve,getYValue:de}=i(re);return l((()=>y.value),(e=>{e&&function(){c(y,re);const{setPopup:e,isAddPoint:a,updateData:t,redrawPoints:l,clickMenu:u,gridPoints:i}=g(y,re,b,oe,se,ve,de,S.addRenderItem,Y,C);j.value=l,V.value=u;const{drawScaleValue:n}=p(y,re,b,e,Y,oe,se,ve,de,a,t,i);h(y,re,n),m(y,re),f(y,re,b,oe);const{select:o}=r(y,re,b);D.value=o}()}),{immediate:!0}),{propItems:re,redrawPoints:j,select:D,clickMenu:V}}export{y as useTemperatureChart};
|
@@ -23,6 +23,10 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
23
23
|
value: string;
|
24
24
|
}[]>>;
|
25
25
|
};
|
26
|
+
fieldFilterList: {
|
27
|
+
type: import("vue").PropType<import("./src/types").FilterSetItem[]>;
|
28
|
+
default: () => never[];
|
29
|
+
};
|
26
30
|
}, {
|
27
31
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
28
32
|
showTabNames: {
|
@@ -47,6 +51,10 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
47
51
|
value: string;
|
48
52
|
}[]>>;
|
49
53
|
};
|
54
|
+
fieldFilterList: {
|
55
|
+
type: import("vue").PropType<import("./src/types").FilterSetItem[]>;
|
56
|
+
default: () => never[];
|
57
|
+
};
|
50
58
|
}>> & {
|
51
59
|
onSave?: ((...args: any[]) => any) | undefined;
|
52
60
|
}>>;
|
@@ -61,7 +69,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
61
69
|
}[]>;
|
62
70
|
onSave: () => void;
|
63
71
|
setRef: (e: any, id: string) => void;
|
64
|
-
getTableFields: (type?: "field" | "fieldColor" | "highlightRow" | "tableStyle" | undefined) => any;
|
72
|
+
getTableFields: (type?: "field" | "fieldColor" | "highlightRow" | "tableStyle" | "fieldFilter" | undefined) => any;
|
65
73
|
NTabs: any;
|
66
74
|
NTabPane: import("vue").DefineComponent<{
|
67
75
|
readonly tab: import("vue").PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
@@ -137,11 +145,16 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
137
145
|
value: string;
|
138
146
|
}[]>>;
|
139
147
|
};
|
148
|
+
fieldFilterList: {
|
149
|
+
type: import("vue").PropType<import("./src/types").FilterSetItem[]>;
|
150
|
+
default: () => never[];
|
151
|
+
};
|
140
152
|
}>> & {
|
141
153
|
onSave?: ((...args: any[]) => any) | undefined;
|
142
154
|
}, {
|
143
155
|
showTabNames: import("./src/types").FieldSetTab[];
|
144
156
|
fieldColorList: import("./src/types").ColorSetItem[];
|
145
157
|
highlightRowColorList: import("./src/types").ColorSetItem[];
|
158
|
+
fieldFilterList: import("./src/types").FilterSetItem[];
|
146
159
|
}>>;
|
147
160
|
export default FieldSet;
|
@@ -305,35 +305,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
305
305
|
emit: (event: "edit" | "updateChecked", ...args: any[]) => void;
|
306
306
|
onRemove: () => void;
|
307
307
|
onEdit: () => void;
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
show: boolean;
|
313
|
-
sort: boolean;
|
314
|
-
sortDirection: "NONE" | "ASC" | "DESC";
|
315
|
-
title: string;
|
316
|
-
alias: string;
|
317
|
-
fixedShow: boolean;
|
318
|
-
fixedWay: "NONE" | "LEFT" | "RIGHT";
|
319
|
-
columnWidth: number | null;
|
320
|
-
editable: boolean;
|
321
|
-
editableDisable: boolean;
|
322
|
-
required: boolean;
|
323
|
-
requiredDisable: boolean;
|
324
|
-
hide: boolean;
|
325
|
-
}>, key: string) => any;
|
308
|
+
getTextValue: (field: string) => any;
|
309
|
+
isMultiple: (field: string) => boolean;
|
310
|
+
isRender: (field: string) => boolean;
|
311
|
+
isShow: (field: string) => any;
|
326
312
|
getSortPriorityOptions: () => {
|
327
313
|
label: string;
|
328
314
|
value: number;
|
329
315
|
}[];
|
330
|
-
getOptions: (column: AnyObject) =>
|
331
|
-
label: string;
|
332
|
-
value: string;
|
333
|
-
}[] | {
|
334
|
-
label: string;
|
335
|
-
value: number;
|
336
|
-
}[];
|
316
|
+
getOptions: (column: AnyObject) => any;
|
337
317
|
setDisabled: (column: AnyObject) => any;
|
338
318
|
getStyle: (column: AnyObject) => import("vue").CSSProperties;
|
339
319
|
onUpdateChecked: (checked: boolean, column: AnyObject) => void;
|
@@ -457,9 +437,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
457
437
|
requiredDisable: boolean;
|
458
438
|
hide: boolean;
|
459
439
|
}>;
|
440
|
+
isHighlightRow: boolean;
|
460
441
|
idx: number;
|
461
442
|
isHighlight: boolean;
|
462
|
-
isHighlightRow: boolean;
|
463
443
|
}>;
|
464
444
|
EditDialog: import("vue").DefineComponent<{
|
465
445
|
visible: {
|