cnhis-design-vue 3.2.5-release.2 → 3.2.5-release.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -87
- package/es/components/biunique-chat/index.d.ts +13 -5
- package/es/components/biunique-chat/src/Index.vue.d.ts +13 -5
- package/es/components/biunique-chat/src/components/ChatFooter.vue.d.ts +5 -3
- package/es/components/biunique-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/biunique-chat/src/components/ChatHeader.vue.d.ts +4 -1
- package/es/components/biunique-chat/src/components/ChatMain.vue.d.ts +4 -1
- package/es/components/biunique-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/biunique-chat/src/components/ChatRecord.vue.d.ts +4 -1
- package/es/components/biunique-chat/src/components/ChatRecord.vue2.js +1 -1
- package/es/components/biunique-chat/src/utils/emoji.d.ts +4 -2
- package/es/components/biunique-chat/src/utils/emoji.js +1 -1
- package/es/components/biunique-chat/src/utils/index.js +1 -1
- package/es/components/button-print/index.d.ts +11 -3
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +11 -3
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +5 -2
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +81 -2
- package/es/components/classification/index.d.ts +13 -0
- package/es/components/classification/src/index.vue.d.ts +13 -3
- package/es/components/classification/src/index.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/useGrid.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +0 -1
- package/es/components/form-config/index.d.ts +154 -4
- package/es/components/form-config/src/FormConfig.vue.d.ts +154 -4
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +77 -2
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +77 -2
- package/es/components/form-render/index.d.ts +77 -2
- package/es/components/form-render/src/FormRender.vue.d.ts +77 -2
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +77 -2
- package/es/components/form-render/src/hooks/useFormEvent.d.ts +2 -1
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
- package/es/components/form-render/src/types/index.d.ts +10 -7
- package/es/components/iho-table/index.d.ts +4 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +5 -1
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/forceArrowKeyPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rowDragPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/stickyFixedPlugin.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +1 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +154 -4
- package/es/components/info-header/src/InfoHeader.vue.d.ts +154 -4
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +77 -2
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +77 -2
- package/es/components/scale-view/src/ScaleView.vue2.js +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/components/shortcut-setter/index.d.ts +77 -2
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +77 -2
- package/es/components/tooth-bitmap/index.d.ts +1 -3
- package/es/components/tooth-bitmap/src/ToothBitmap.vue.d.ts +1 -3
- package/es/components/tooth-bitmap/src/ToothBitmap.vue2.js +1 -1
- 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/emoji.png.d.ts +4 -0
- package/es/shared/assets/img/emoji/emoji.png.js +1 -0
- 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/tooth.png.d.ts +37 -0
- package/es/shared/assets/img/tooth/tooth.png.js +1 -0
- 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/hooks/index.js +1 -1
- package/es/shared/hooks/selectHooks/index.d.ts +1 -0
- package/es/shared/hooks/selectHooks/index.js +1 -1
- package/es/shared/hooks/selectHooks/useMenuWidthAuto.d.ts +12 -0
- package/es/shared/hooks/selectHooks/useMenuWidthAuto.js +1 -0
- 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/assets/img/emoji/666.gif.js +0 -1
- package/es/shared/assets/img/emoji/emotion_001.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_002.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_003.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_004.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_005.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_006.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_007.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_008.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_009.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_010.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_011.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_012.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_013.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_014.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_015.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_016.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_017.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_018.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_019.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_020.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_021.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_022.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_023.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_024.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_025.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_026.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_027.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_028.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_029.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_030.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_031.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_032.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_033.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_034.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_035.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_036.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_037.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_038.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_039.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_040.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_041.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_042.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_043.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_044.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_045.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_046.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_047.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_048.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_049.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_050.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_051.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_052.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_053.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_054.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_055.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_056.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_057.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_058.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_059.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_060.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_061.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_062.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_063.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_064.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_065.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_066.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_067.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_068.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_069.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_070.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_071.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_072.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_073.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_074.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_075.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_076.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_077.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_078.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_079.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_080.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_081.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_082.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_083.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_084.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_085.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_086.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_087.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_088.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_089.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_090.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_091.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_092.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_093.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_094.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_095.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_096.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_097.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_098.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_099.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_100.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_101.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_102.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_103.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_104.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_105.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_106.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_107.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_108.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_109.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_110.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_111.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_112.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_113.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_114.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_115.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_116.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_117.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_118.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_119.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_120.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_121.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_122.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_123.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_124.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_125.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_126.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_127.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_128.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_129.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_130.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_131.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_132.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_133.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_134.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_135.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_136.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_137.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_138.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_139.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_140.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_141.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_142.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_143.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_144.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_145.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_146.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_147.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_148.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_149.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_150.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_151.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_152.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_153.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_154.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_155.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_156.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_157.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_158.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_159.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_160.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_161.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_162.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_163.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_164.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_165.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_166.png.js +0 -1
- package/es/shared/assets/img/emoji/emotion_167.png.js +0 -1
- package/es/shared/assets/img/tooth/l-b-1.png.js +0 -1
- package/es/shared/assets/img/tooth/l-b-2.png.js +0 -1
- package/es/shared/assets/img/tooth/l-b-3.png.js +0 -1
- package/es/shared/assets/img/tooth/l-b-4.png.js +0 -1
- package/es/shared/assets/img/tooth/l-b-5.png.js +0 -1
- package/es/shared/assets/img/tooth/l-b-6.png.js +0 -1
- package/es/shared/assets/img/tooth/l-b-7.png.js +0 -1
- package/es/shared/assets/img/tooth/l-b-8.png.js +0 -1
- package/es/shared/assets/img/tooth/l-t-1.png.js +0 -1
- package/es/shared/assets/img/tooth/l-t-2.png.js +0 -1
- package/es/shared/assets/img/tooth/l-t-3.png.js +0 -1
- package/es/shared/assets/img/tooth/l-t-4.png.js +0 -1
- package/es/shared/assets/img/tooth/l-t-5.png.js +0 -1
- package/es/shared/assets/img/tooth/l-t-6.png.js +0 -1
- package/es/shared/assets/img/tooth/l-t-7.png.js +0 -1
- package/es/shared/assets/img/tooth/l-t-8.png.js +0 -1
- package/es/shared/assets/img/tooth/r-b-1.png.js +0 -1
- package/es/shared/assets/img/tooth/r-b-2.png.js +0 -1
- package/es/shared/assets/img/tooth/r-b-3.png.js +0 -1
- package/es/shared/assets/img/tooth/r-b-4.png.js +0 -1
- package/es/shared/assets/img/tooth/r-b-5.png.js +0 -1
- package/es/shared/assets/img/tooth/r-b-6.png.js +0 -1
- package/es/shared/assets/img/tooth/r-b-7.png.js +0 -1
- package/es/shared/assets/img/tooth/r-b-8.png.js +0 -1
- package/es/shared/assets/img/tooth/r-t-1.png.js +0 -1
- package/es/shared/assets/img/tooth/r-t-2.png.js +0 -1
- package/es/shared/assets/img/tooth/r-t-3.png.js +0 -1
- package/es/shared/assets/img/tooth/r-t-4.png.js +0 -1
- package/es/shared/assets/img/tooth/r-t-5.png.js +0 -1
- package/es/shared/assets/img/tooth/r-t-6.png.js +0 -1
- package/es/shared/assets/img/tooth/r-t-7.png.js +0 -1
- package/es/shared/assets/img/tooth/r-t-8.png.js +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
|
@@ -102,6 +102,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
102
102
|
default: () => {};
|
|
103
103
|
};
|
|
104
104
|
}, {
|
|
105
|
+
$attrs: {
|
|
106
|
+
[x: string]: unknown;
|
|
107
|
+
};
|
|
105
108
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
106
109
|
printParams: {
|
|
107
110
|
type: PropType<AnyObject[]>;
|
|
@@ -2368,6 +2371,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2368
2371
|
default: number;
|
|
2369
2372
|
};
|
|
2370
2373
|
}, {
|
|
2374
|
+
$attrs: {
|
|
2375
|
+
[x: string]: unknown;
|
|
2376
|
+
};
|
|
2371
2377
|
$message: import("naive-ui").MessageApi;
|
|
2372
2378
|
printInstance: import("./utils").Print | null;
|
|
2373
2379
|
downloadPdfCode: string;
|
|
@@ -2489,7 +2495,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2489
2495
|
getTemplateIdByFormatId: import("vue").ComputedRef<any>;
|
|
2490
2496
|
buttonClick: (origin: string) => Promise<false | undefined>;
|
|
2491
2497
|
renderLabel: (option: AnyObject) => JSX.Element;
|
|
2492
|
-
debounce: (fn: any, delay: number, immediate?: boolean) => (...args: any
|
|
2498
|
+
debounce: (fn: any, delay: number, immediate?: boolean) => (...args: any) => void;
|
|
2493
2499
|
callLocalServicesSuccessCb: (res: any, type: any) => void;
|
|
2494
2500
|
callLocalServicesErrorCb: (res: unknown) => void;
|
|
2495
2501
|
callLocalServicesCancelCb: (res: unknown) => void;
|
|
@@ -2497,7 +2503,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2497
2503
|
getPrintParams: (index?: number) => string;
|
|
2498
2504
|
getOnceParams: () => string;
|
|
2499
2505
|
handleClickPrint: () => void;
|
|
2500
|
-
handleDebounceClickPrint: (...args: any
|
|
2506
|
+
handleDebounceClickPrint: (...args: any) => void;
|
|
2501
2507
|
handleClickPreview: () => Promise<void>;
|
|
2502
2508
|
handleClickPdf: () => Promise<void>;
|
|
2503
2509
|
handleClickEdit: () => void;
|
|
@@ -4377,7 +4383,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4377
4383
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
4378
4384
|
onClickoutside?: ((...args: any[]) => any) | undefined;
|
|
4379
4385
|
onSaveOuterPrint?: ((...args: any[]) => any) | undefined;
|
|
4380
|
-
}
|
|
4386
|
+
}>> & {
|
|
4387
|
+
[x: string]: unknown;
|
|
4388
|
+
}>;
|
|
4381
4389
|
emits: (event: "success" | "error" | "cancel" | "clickoutside" | "saveOuterPrint", ...args: any[]) => void;
|
|
4382
4390
|
directPrint: () => Promise<void>;
|
|
4383
4391
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("success" | "error" | "cancel" | "clickoutside" | "saveOuterPrint")[], "success" | "error" | "cancel" | "clickoutside" | "saveOuterPrint", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as t,
|
|
1
|
+
import{defineComponent as t,useAttrs as e,ref as r,computed as n,provide as i,openBlock as o,createBlock as a,resolveDynamicComponent as p,unref as u,mergeProps as l,withCtx as s,createCommentVNode as d,renderSlot as f,normalizeProps as y,guardReactiveProps as m}from"vue";import{InjectionButtonPrintEmits as c}from"./constants/index.js";import g from"./components/NewPrintComponent.vue.js";import P from"./components/OldPrintComponent.vue.js";var v=t({__name:"ButtonPrint",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},noDefaultFormatMsg:{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},newPrintSetting:{type:Object,default:()=>({})}},emits:["success","error","cancel","clickoutside","saveOuterPrint"],setup(t,{expose:v,emit:S}){const b=t,x=e(),F=r(),j=n((()=>{var t;return(null==(t=Object.keys(b.newPrintSetting))?void 0:t.length)>0?g:P})),O=n((()=>Object.assign({},b,x)));i(c,(function(t,...e){S(t,...e)}));return v({directPrint:async()=>{var t;null==(t=F.value)||t.directPrint()}}),(t,e)=>(o(),a(p(u(j)),l({ref_key:"printComponentRef",ref:F},u(O)),{button:s((e=>[d(" 自定义按钮样式 "),f(t.$slots,"button",y(m(e)))])),_:3},16))}});export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as t,inject as e,ref as n,reactive as r,computed as i,onMounted as a,watch as l,openBlock as o,createElementBlock as s,Fragment as u,createElementVNode as c,createCommentVNode as d,createVNode as p,unref as m,withCtx as y,renderList as v,createBlock as f,createTextVNode as g,toDisplayString as k,isRef as h,renderSlot as b,withModifiers as w,normalizeClass as P,mergeProps as O}from"vue";import{isObject as S}from"@vue/shared";import{useMessage as C,NButtonGroup as I,NDropdown as T,NButton as L,NIcon as F,NPopover as j,NCheckbox as M,NDivider as N}from"naive-ui";import{PrintOutline as x,SettingsOutline as E,ChevronDownSharp as _,ArrowForwardOutline as D}from"@vicons/ionicons5";import{InjectionButtonPrintEmits as z}from"../constants/index.js";import{Print as J}from"../utils/print.js";import{isIReport as U}from"../utils/browserPrint.js";import V from"./IdentityVerification.vue.js";import{format as A}from"date-fns";import"../api.js";const K={class:"newprint-button-outer"},B=c("span",{class:"label bold"},"外显设置",-1),R={class:"newprint-button-poperOver"},H={class:"print-lite"},q={class:"label bold"},G={class:"print-li"},Y={class:"print-lite"},$={class:"newprint-button-poperOver"},Q=["onMouseenter","onClick"],W={class:"label bold"},X={class:"newprint-button-poperOver"},Z={class:"print-lite"},tt={class:"label bold"},et={class:"print-li"},nt={class:"print-lite"},rt=["onClick"],it={class:"newprint-button-poperOver"},at=["onMouseenter"],lt={class:"print-lite"},ot=["onClick"];var st=t({__name:"NewPrintComponent",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},newPrintSetting:{type:Object,default:()=>({isShowPrintAll:!0,isShowOutSetting:!0,customProps:{},outerPrintKeys:[],defaultFormatId:""})}},setup(t,{expose:st}){const ut=t,ct=[{label:"分割线",key:"divider"},{label:"外显设置",key:"outSetting"}],dt=C();let pt;const mt=e(z),yt=n(""),vt=r({spinning:!1,visible:!1,formatList:[],templateParams:[],printParams:[],originParams:{},currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null,isClickOuterPrint:!1,curPrintParamList:[]});let ft=n([]),gt=n([{label:ut.pdfLoadText,key:"downloadPdf"},{label:ut.previewText,key:"previewText"},{label:ut.formatEditText,key:"formatEditText"},{label:"重置打印机",key:"resetPrinter"}]);const kt=r({oneMouseType:"",oneClickType:"",twoMouseType:""}),ht=r({oneShow:!1,isOperation:!1,isOutSetting:!1}),bt=n([]),wt=n([]),Pt=i((()=>{if(!vt.currentFormatId)return{};let t=vt.currentFormatId;return vt.formatList.find((e=>e.id===t))}));i((()=>{var t;return(null==(t=Pt.value)?void 0:t.name)||"格式选择"}));const Ot=i((()=>{let t=vt.formatList.find((t=>t.id===vt.currentFormatId));return null==t?void 0:t.templateId})),St=i((()=>{let t=vt.formatList.find((t=>t.id===vt.currentFormatId));return null==t?void 0:t.number})),Ct=i((()=>{var t;return null==(t=ut.newPrintSetting)?void 0:t.isShowPrintAll})),It=i((()=>{var t;return null==(t=ut.newPrintSetting)?void 0:t.isShowOutSetting})),Tt=i((()=>{var t;return(null==(t=ut.newPrintSetting)?void 0:t.customProps)||{}})),Lt=i((()=>{var t;return(null==(t=ut.newPrintSetting)?void 0:t.defaultFormatId)||""})),Ft=i((()=>{const t=ct.map((t=>t.key));return ft.value.filter((e=>!t.includes(e.key)))})),jt=i({get:()=>Ft.value.every((t=>t.selected)),set(t){Ft.value.forEach((e=>{e.selected=t}))}}),Mt=async()=>{var t,e;(null==(e=null==(t=ut.newPrintSetting)?void 0:t.outerPrintKeys)?void 0:e.length)||await re(),ht.oneShow=!0},Nt=async t=>{if(ut.directPrint){if(vt.spinning)return;return"button"===t?void(Ct.value?await ae():Lt.value?async function(t){await re(!1);const e=bt.value.find((e=>e.key==t));e&&Ht(e.templateCode,e.templateId,e.key,!1)}(Lt.value):Mt()):Mt()}return Mt()},xt=(t,e)=>{kt[t]=e},Et=()=>{bt.value=ft.value.filter((t=>!t.selected)),wt.value=Ft.value.filter((t=>t.selected)),Dt("oneShow"),Dt("isOutSetting"),mt("saveOuterPrint",wt.value)},_t=t=>{ht[t]=!0},Dt=t=>{kt.oneClickType="",ht[t]=!1,"isOutSetting"==t&&(ht.isOutSetting=!1)},zt=(t,e)=>{Bt(!1);let n={type:e,formatId:vt.currentFormatId,templateId:(null==t?void 0:t.templateId)||Ot.value,templateCode:(null==t?void 0:t.templateCode)||St.value};mt("success",t,n)},Jt=t=>{Bt(!1),mt("error",t),S(t)&&"notInstalledApp"===t.type&&dt.error(t.message)},Ut=t=>{Bt(!1),mt("cancel",t)},Vt=t=>{mt("error",{message:"前置条件执行错误",type:t,preExecution:!0})},At=()=>JSON.stringify({...ut.token?{token:ut.token}:{}}),Kt=(t=[],e)=>{var n,r;let i={},a={};if((null==(n=vt.templateParams[e].customizeDataset)?void 0:n.length)>0){const e=(null==(r=Object.keys(t[0].datasetData||{}))?void 0:r[0])||"",n=JSON.stringify(t.map((t=>JSON.parse(t.datasetData[e]))));a={datasetData:{}},a.datasetData[e]=n}else Object.keys(t[0]).forEach((e=>{a[e]=[],t.forEach((t=>{a[e].includes(t[e])||a[e].push(t[e])})),a[e]=a[e].join(",")}));return i=Object.assign({},JSON.parse(At()),Tt.value,a),JSON.stringify(i)},Bt=(t,e)=>{if(vt.isClickOuterPrint){if(t&&e){const n=wt.value.find((t=>t.key==e));return void(n&&(n.isLoading=t))}wt.value.forEach((t=>{t.isLoading=!1}))}else vt.spinning=t},Rt=()=>vt.isClickOuterPrint?wt.value.some((t=>t.isLoading)):vt.spinning,Ht=(t,e,n,r)=>{const i=vt.printParams[t];if(!i)return;vt.isClickOuterPrint=r,vt.currentFormatId=n;const a=vt.originParams[t]||[];qt(i,t,e,n,a)},qt=async(t=[],e,n,r,i=[],a)=>{let l=t.length;const o=async t=>{try{--l<=0&&zt(t,"print")}catch(t){console.log("error",t)}};ut.showLoading&&Rt()&&!a||(Bt(!0,r),ut.prevFn("print").then((()=>{vt.curPrintParamList=t;const a={formatId:r,templateId:n,authorizationKey:yt.value,printdlgshow:ut.printdlgshow,signature:ut.signature,copies:ut.printCopies};if("MULTI"===ut.strategy)for(let e=0;e<t.length;e++){e>0&&(a.printdlgshow="0");const n=JSON.stringify(Object.assign({},JSON.parse(At()),Tt.value,t[e]));pt.printDirect({...a,params:n},o,Jt,Ut)}else pt.printDirect({...a,params:Kt(t,e)},(t=>{t.params=i,t.templateCode=e,t.templateId=n,zt(t,"print")}),Jt,Ut)})).catch((()=>{Vt("print"),Bt(!1)})).finally((()=>{vt.visible=!1})))},Gt=async(t,{templateCode:e,templateId:n,key:r},i)=>{const a=vt.printParams[e];if(a)switch(vt.isClickOuterPrint=i,vt.currentFormatId=r,t){case"previewText":(async(t=[],e,n,r)=>{ut.showLoading&&Rt()||(Bt(!0,r),ut.prevFn("preview").then((()=>{vt.curPrintParamList=t;const i=JSON.stringify(Object.assign({},JSON.parse(At()),Tt.value,t[0])),a="MULTI"===ut.strategy?i:Kt(t,e),l={formatId:r,templateId:n,authorizationKey:yt.value,params:a,btnprint:ut.btnprint,signature:ut.signature};pt.preview(l,(t=>{zt(t,"preview")}),Jt)})).catch((()=>{Vt("preview"),Bt(!1)})).finally((()=>{vt.visible=!1})))})(a,e,n,r);break;case"formatEditText":((t=[],e,n,r)=>{ut.showLoading&&Rt()||(Bt(!0,r),ut.prevFn("edit").then((()=>{vt.curPrintParamList=t,vt.currentFormatId=r,vt.identityVerification.visible=!0})).catch((()=>{Vt("edit")})).finally((()=>{Bt(!1)})))})(a,0,0,r);break;case"downloadPdf":(async(t=[],e,n,r)=>{ut.showLoading&&Rt()||(Bt(!0,r),ut.prevFn("download").then((()=>{vt.curPrintParamList=t;const i=JSON.stringify(Object.assign({},JSON.parse(At()),Tt.value,t[0])),a="MULTI"===ut.strategy?i:Kt(t,e),l={formatId:r,templateId:n,authorizationKey:yt.value,print:{print:"1",type:"1"},params:a,signature:ut.signature};pt.downloadPDF(l,(t=>zt(t,"preview")),Jt)})).catch((()=>{Vt("download"),Bt(!1)})).finally((()=>{vt.visible=!1})))})(a,e,n,r);break;case"resetPrinter":(async(t=[],e,n,r)=>{if(ut.showLoading&&Rt())return;Bt(!0,r);const i=await pt.resetPrinter(r);Bt(!1),"success"!=(null==i?void 0:i.result)?dt.warning("重置打印机失败"):dt.success(i.message||"重置打印机成功")})(a,0,0,r)}},Yt=()=>{},$t=(t,e=[])=>{let n={};return(e=e||[]).forEach((e=>{n=Object.assign({},Zt(n,e,t))})),n},Qt=(t,e=[])=>{let n={};return(e=e||[]).forEach((e=>{n=Object.assign({},te(n,e,t))})),n},Wt=(t,e,n)=>{const r={};return e.forEach((e=>{let i=((t,e)=>{const n={DATE:"yyyy-MM-dd",DATETIME:"yyyy-MM-dd HH:mm:ss"};let r=e;return Object.keys(n).includes(t.type)&&e&&e instanceof Date&&(r=A(e,n[t.type])),(null==t?void 0:t.defaultValue)||r})(e,t[e[n]]);t[e[n]]&&i&&(r[e[n]]=i)})),r},Xt=({customizeDataset:t=[],param:e=[]},n={})=>{let r={};return t.forEach((t=>{const e=t.dataSetting[0].selectFieldList;r.datasetData||(r.datasetData={}),r.datasetData[t.name]=JSON.stringify(Wt(n,e,"fieldName"))})),r=Object.assign({},r,Wt(n,e,"key")),r},Zt=(t,e,n)=>{if(e.templateNumbers){for(let r=0;r<e.templateNumbers.length;r++){const i=e.templateNumbers[r],a=n[i];if(!a)return dt.error("当前勾选的数据没有匹配的模板"),t;t[i]||(t[i]=[]),t[i].push(Xt(a,e))}return t}const r=Object.keys(n);for(let i=0;i<r.length;i++){const a=r[i],l=n[a];if(!l)return dt.error("当前勾选的数据没有匹配的模板"),t;t[a]||(t[a]=[]),t[a].push(Xt(l,e))}return t},te=(t,e,n)=>{if(e.templateNumbers){for(let r=0;r<e.templateNumbers.length;r++){const i=e.templateNumbers[r];if(!n[i])return dt.error("当前勾选的数据没有匹配的模板"),t;t[i]||(t[i]=[]),t[i].push(e)}return t}const r=Object.keys(n);for(let i=0;i<r.length;i++){const a=r[i];if(!n[a])return dt.error("当前勾选的数据没有匹配的模板"),t;t[a]||(t[a]=[]),t[a].push(e)}return t},ee=async t=>{vt.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):[],(()=>{var t,e,n;const r=vt.formatList.map((t=>({templateCode:t.number,templateId:t.templateId,label:t.name,key:t.id,selected:!1,isLoading:!1})));ft.value.unshift(...r),It.value&&ft.value.push(...ct),(null==(e=null==(t=ut.newPrintSetting)?void 0:t.outerPrintKeys)?void 0:e.length)>0&&(ft.value.forEach((t=>{var e;(null==(e=ut.newPrintSetting)?void 0:e.outerPrintKeys.includes(t.key))&&(t.selected=!0)})),wt.value=ft.value.filter((t=>t.selected))),bt.value=ft.value.filter((t=>!t.selected)),ut.hideButtons.length>0&&(gt.value=gt.value.filter((t=>!ut.hideButtons.includes(t.key))));const i=sessionStorage.getItem("portal");if(i){const t=JSON.parse(i),e=(null==(n=null==t?void 0:t.user)?void 0:n.currentRoleResourceObj)||{},r=Object.keys(e);r.includes("RY7.2.21.1.M2.G94181E")||(gt.value=gt.value.filter((t=>"downloadPdf"!=t.key))),r.includes("RY7.2.21.1.M2.G33633A")||(gt.value=gt.value.filter((t=>"formatEditText"!=t.key)))}})(),vt.templateParams=(t=>{let e={};return t&&t.forEach((t=>{if(!t.templateConfig)return!1;e[t.number]=t.templateConfig})),e})(t.obj),vt.printParams=$t(vt.templateParams,ut.params),vt.originParams=Qt(vt.templateParams,ut.params)},ne=async()=>{var t;if(vt.isInited)return!0;vt.isInited=!0,vt.spinning=!0,(()=>{if(pt)return!1;pt=new J})();const e=await ut.queryPrintFormatByNumber();return await ee(e),(null==(t=e.obj)?void 0:t.length)>0&&(yt.value=e.obj[0].authorizationKey||""),vt.spinning=!1,!0},re=async(t=!0)=>{if(await ut.clickPrevFn()){if(!vt.visible){if(!await ne())return!1}t&&(vt.visible=!vt.visible)}},ie=t=>{if(vt.identityVerification.visible=!1,U(vt.currentFormatId))return zt(null,"edit");const e=JSON.stringify(Object.assign({},JSON.parse(At()),Tt.value,vt.curPrintParamList[0])),n="MULTI"===ut.strategy?e:Kt(vt.curPrintParamList,St.value),r={formatId:vt.currentFormatId,templateId:Ot.value,params:n,token:t};pt.editPrintFormat(r,(t=>{zt(t,"edit")}),Jt)};async function ae(){await re(!1),(()=>{const t=Object.keys(vt.printParams);vt.isClickOuterPrint=!1;const e=vt.originParams;for(let n=0;n<t.length;n++){const r=t[n],i=vt.printParams[r],a=e[r]||[],l=vt.formatList.filter((t=>t.number==r));l&&l.length>0&&l.forEach((t=>{vt.currentFormatId=t.id,qt(i,t.number,t.templateId,t.id,a,!0)}))}})()}return a((()=>{vt.isInited=!1})),l((()=>ut.params),(t=>{Object.keys(vt.templateParams).length>0&&(vt.printParams=$t(vt.templateParams,ut.params),vt.originParams=Qt(vt.templateParams,ut.params))}),{deep:!0}),l((()=>{var t;return null==(t=ut.newPrintSetting)?void 0:t.outerPrintKeys}),(async t=>{(null==t?void 0:t.length)>0&&await re(!1)}),{deep:!0,immediate:!0}),st({directPrint:ae}),(e,n)=>(o(),s(u,null,[c("div",K,[d(" 外显按钮集合 "),p(m(I),null,{default:y((()=>[(o(!0),s(u,null,v(wt.value,(e=>{return o(),f(m(T),{key:e.key,class:"c-dropdown",placement:"bottom-start",trigger:"hover",onClickoutside:Yt,options:(n=m(gt),r=e,vt.printParams[r.templateCode]?n:[]),onSelect:t=>Gt(t,e,!0)},{default:y((()=>[p(m(L),{disabled:!vt.printParams[e.templateCode],loading:t.showLoading&&e.isLoading,onClick:t=>Ht(e.templateCode,e.templateId,e.key,!0)},{icon:y((()=>[p(m(F),{component:m(x),size:"18"},null,8,["component"])])),default:y((()=>[g(" "+k(e.label),1)])),_:2},1032,["disabled","loading","onClick"])])),_:2},1032,["options","onSelect"]);var n,r})),128))])),_:1}),d(' <n-button-group>\r\n\t\t\t<n-popover\r\n\t\t\t\tv-for="outer in outerPrintItems"\r\n :key="outer.key"\r\n\t\t\t\ttrigger="hover"\r\n\t\t\t\t:show-arrow="false"\r\n\t\t\t\t:show="downlistPopover.isOperation"\r\n\t\t\t\t@clickoutside="handleClickOutHide(\'isOperation\')"\r\n\t\t\t>\r\n\t\t\t\t<template #trigger>\r\n\t\t\t\t\t<n-button\r\n\t\t\t\t\t\t@mouseenter="delayShowPopover(\'isOperation\')"\r\n\t\t\t\t\t\t@mouseleave="handleClickOutHide(\'isOperation\')"\r\n\t\t\t\t\t\t@click="console.log(33)"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<template #icon>\r\n\t\t\t\t\t\t\t<n-icon :component="PrintOutline" size="18"></n-icon>\r\n\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t<span class="label bold">{{ outer.label }}</span>\r\n\t\t\t\t\t</n-button>\r\n\t\t\t\t</template>\r\n\t\t\t\t<div class="newprint-button-poperOver">\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\tclass="print-li"\r\n\t\t\t\t\t\tv-for="operation in operations"\r\n\t\t\t\t\t\t:key="operation.key"\r\n\t\t\t\t\t\t:class="downlistOperation.twoMouseType==operation.key ? \'active\' : \'\' "\r\n\t\t\t\t\t\t@mouseenter="handleTypeChange(\'twoMouseType\', operation.key)"\r\n\t\t\t\t\t\t@mouseleave="handleTypeChange(\'twoMouseType\', \'\')"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<div class="print-lite">\r\n\t\t\t\t\t\t\t<span class="label"> {{ operation.label }} </span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</n-popover>\r\n\t\t</n-button-group> '),d(" 外显设置按钮 "),wt.value.length>0&&wt.value.length==m(Ft).length&&m(It)?(o(),f(m(j),{key:0,trigger:"click","show-arrow":!1,show:ht.isOutSetting,onClickoutside:n[2]||(n[2]=t=>Dt("isOutSetting"))},{trigger:y((()=>[p(m(L),{onClick:n[0]||(n[0]=t=>_t("isOutSetting"))},{default:y((()=>[B,p(m(F),{style:{"margin-left":"8px"},component:m(E),size:"18"},null,8,["component"])])),_:1})])),default:y((()=>{var t;return[c("div",R,[(o(!0),s(u,null,v(m(Ft),(t=>(o(),s("div",{class:"print-li",key:t.key},[c("div",H,[c("span",q,k(t.label),1),p(m(M),{checked:t.selected,"onUpdate:checked":e=>t.selected=e},{default:y((()=>[g("外显")])),_:2},1032,["checked","onUpdate:checked"])])])))),128)),c("div",G,[p(m(N)),c("div",Y,[p(m(L),{type:"primary",size:"small",onClick:Et},{default:y((()=>[g("保存")])),_:1}),(null==(t=m(Ft))?void 0:t.length)>1?(o(),f(m(M),{key:0,checked:m(jt),"onUpdate:checked":n[1]||(n[1]=t=>h(jt)?jt.value=t:null)},{default:y((()=>[g("全选")])),_:1},8,["checked"])):d("v-if",!0)])])])]})),_:1},8,["show"])):(o(),s(u,{key:1},[d(" 打印全部按钮 "),p(m(j),{trigger:"click","show-arrow":!1,show:ht.oneShow,onClickoutside:n[10]||(n[10]=t=>Dt("oneShow"))},{trigger:y((()=>[b(e.$slots,"button",{handleClickPrintBtn:re,printSpinning:vt.spinning,printbtnText:t.btnText,printVisible:vt.visible},(()=>[p(m(I),{class:"newprint-button-component",onClick:n[4]||(n[4]=w((()=>Nt("icon")),["stop"]))},{default:y((()=>[p(m(L),{loading:t.showLoading&&vt.spinning,onClick:n[3]||(n[3]=w((()=>Nt("button")),["stop"]))},{icon:y((()=>[p(m(F),{component:m(x),size:"18"},null,8,["component"])])),default:y((()=>[g(" "+k(m(Ct)?"打印全部":t.btnText),1)])),_:1},8,["loading"]),p(m(L),{class:"icon-select"},{icon:y((()=>[p(m(F),{component:m(_),size:"18"},null,8,["component"])])),_:1})])),_:1})]))])),default:y((()=>[c("div",$,[(o(!0),s(u,null,v(bt.value,(t=>(o(),s("div",{class:P(["print-li",kt.oneMouseType==t.key||kt.oneClickType==t.key?"active":""]),key:t.key,onMouseenter:e=>xt("oneMouseType",t.key),onMouseleave:n[9]||(n[9]=t=>xt("oneMouseType","")),onClick:e=>((t,e,n)=>{if(!vt.printParams[n.templateCode])return[];xt(t,e)})("oneClickType",t.key,t)},["divider"==t.key?(o(),f(m(N),{key:0})):"outSetting"==t.key?(o(),s(u,{key:1},[d(" 第二层外显设置 "),p(m(j),{trigger:"click","show-arrow":!1,placement:"right-start",show:ht.isOutSetting,onClickoutside:n[7]||(n[7]=t=>Dt("isOutSetting"))},{trigger:y((()=>[c("div",{class:"print-lite",onClick:n[5]||(n[5]=t=>_t("isOutSetting"))},[c("span",W,k(t.label),1),p(m(F),{style:{background:"transparent"},component:m(E),size:"18"},null,8,["component"])])])),default:y((()=>{var t;return[c("div",X,[(o(!0),s(u,null,v(m(Ft),(t=>(o(),s("div",{class:"print-li",key:t.key},[c("div",Z,[c("span",tt,k(t.label),1),p(m(M),{checked:t.selected,"onUpdate:checked":e=>t.selected=e},{default:y((()=>[g("外显")])),_:2},1032,["checked","onUpdate:checked"])])])))),128)),c("div",et,[p(m(N)),c("div",nt,[p(m(L),{type:"primary",size:"small",onClick:Et},{default:y((()=>[g("保存")])),_:1}),(null==(t=m(Ft))?void 0:t.length)>1?(o(),f(m(M),{key:0,checked:m(jt),"onUpdate:checked":n[6]||(n[6]=t=>h(jt)?jt.value=t:null)},{default:y((()=>[g("全选")])),_:1},8,["checked"])):d("v-if",!0)])])])]})),_:2},1032,["show"])],2112)):(o(),s(u,{key:2},[d(" 第二层功能操作 "),c("div",{class:P(["print-lite",vt.printParams[t.templateCode]?"":"isDisabled"])},[c("span",{class:"label bold",onClick:e=>Ht(t.templateCode,t.templateId,t.key,!1)},k(t.label),9,rt),vt.printParams[t.templateCode]?(o(),f(m(j),{key:0,trigger:"click","show-arrow":!1,placement:"right-start",show:ht[t.key],onClickoutside:e=>Dt(t.key)},{trigger:y((()=>[p(m(F),{component:m(D),size:"18",onClick:e=>_t(t.key)},null,8,["component","onClick"])])),default:y((()=>[c("div",it,[(o(!0),s(u,null,v(m(gt),(e=>(o(),s("div",{class:P(["print-li",kt.twoMouseType==e.key?"active":""]),key:e.key,onMouseenter:t=>xt("twoMouseType",e.key),onMouseleave:n[8]||(n[8]=t=>xt("twoMouseType",""))},[c("div",lt,[c("span",{class:"label",onClick:n=>Gt(e.key,t,!1)},k(e.label),9,ot)])],42,at)))),128))])])),_:2},1032,["show","onClickoutside"])):d("v-if",!0)],2)],2112))],42,Q)))),128))])])),_:3},8,["show"])],2112))]),p(V,O(e.$attrs,{modelValue:vt.identityVerification.visible,"onUpdate:modelValue":n[11]||(n[11]=t=>vt.identityVerification.visible=t),formatId:vt.currentFormatId,templateId:m(Ot),onSuccess:ie}),null,16,["modelValue","formatId","templateId"])],64))}});export{st as default};
|
|
1
|
+
import{defineComponent as t,inject as e,ref as n,reactive as r,computed as i,onMounted as a,watch as l,openBlock as o,createElementBlock as s,Fragment as u,createElementVNode as c,createCommentVNode as d,createVNode as p,unref as m,withCtx as y,renderList as v,createBlock as f,createTextVNode as g,toDisplayString as k,isRef as h,renderSlot as b,withModifiers as w,normalizeClass as P,mergeProps as O}from"vue";import{isObject as S}from"@vue/shared";import{useMessage as C,NButtonGroup as I,NDropdown as T,NButton as L,NIcon as F,NPopover as j,NCheckbox as M,NDivider as N}from"naive-ui";import{PrintOutline as x,SettingsOutline as E,ChevronDownSharp as _,ArrowForwardOutline as D}from"@vicons/ionicons5";import{InjectionButtonPrintEmits as z}from"../constants/index.js";import{Print as J}from"../utils/print.js";import{isIReport as U}from"../utils/browserPrint.js";import V from"./IdentityVerification.vue.js";import{format as A}from"date-fns";import"../api.js";const K={class:"newprint-button-outer"},B=c("span",{class:"label bold"},"外显设置",-1),R={class:"newprint-button-poperOver"},H={class:"print-lite"},q={class:"label bold"},G={class:"print-li"},Y={class:"print-lite"},$={class:"newprint-button-poperOver"},Q=["onMouseenter","onClick"],W={class:"label bold"},X={class:"newprint-button-poperOver"},Z={class:"print-lite"},tt={class:"label bold"},et={class:"print-li"},nt={class:"print-lite"},rt=["onClick"],it={class:"newprint-button-poperOver"},at=["onMouseenter"],lt={class:"print-lite"},ot=["onClick"];var st=t({__name:"NewPrintComponent",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},newPrintSetting:{type:Object,default:()=>({isShowPrintAll:!0,isShowOutSetting:!0,customProps:{},outerPrintKeys:[],defaultFormatId:""})}},setup(t,{expose:st}){const ut=t,ct=[{label:"分割线",key:"divider"},{label:"外显设置",key:"outSetting"}],dt=C();let pt;const mt=e(z),yt=n(""),vt=r({spinning:!1,visible:!1,formatList:[],templateParams:[],printParams:[],originParams:{},currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null,isClickOuterPrint:!1,curPrintParamList:[]});let ft=n([]),gt=n([{label:ut.previewText,key:"previewText"},{label:ut.pdfLoadText,key:"downloadPdf"},{label:ut.formatEditText,key:"formatEditText"},{label:"重置打印机",key:"resetPrinter"}]);const kt=r({oneMouseType:"",oneClickType:"",twoMouseType:""}),ht=r({oneShow:!1,isOperation:!1,isOutSetting:!1}),bt=n([]),wt=n([]),Pt=i((()=>{if(!vt.currentFormatId)return{};let t=vt.currentFormatId;return vt.formatList.find((e=>e.id===t))}));i((()=>{var t;return(null==(t=Pt.value)?void 0:t.name)||"格式选择"}));const Ot=i((()=>{let t=vt.formatList.find((t=>t.id===vt.currentFormatId));return null==t?void 0:t.templateId})),St=i((()=>{let t=vt.formatList.find((t=>t.id===vt.currentFormatId));return null==t?void 0:t.number})),Ct=i((()=>{var t;return null==(t=ut.newPrintSetting)?void 0:t.isShowPrintAll})),It=i((()=>{var t;return null==(t=ut.newPrintSetting)?void 0:t.isShowOutSetting})),Tt=i((()=>{var t;return(null==(t=ut.newPrintSetting)?void 0:t.customProps)||{}})),Lt=i((()=>{var t;return(null==(t=ut.newPrintSetting)?void 0:t.defaultFormatId)||""})),Ft=i((()=>{const t=ct.map((t=>t.key));return ft.value.filter((e=>!t.includes(e.key)))})),jt=i({get:()=>Ft.value.every((t=>t.selected)),set(t){Ft.value.forEach((e=>{e.selected=t}))}}),Mt=async()=>{var t,e;(null==(e=null==(t=ut.newPrintSetting)?void 0:t.outerPrintKeys)?void 0:e.length)||await re(),ht.oneShow=!0},Nt=async t=>{if(ut.directPrint){if(vt.spinning)return;return"button"===t?void(Ct.value?await ae():Lt.value?async function(t){await re(!1);const e=bt.value.find((e=>e.key==t));e&&Ht(e.templateCode,e.templateId,e.key,!1)}(Lt.value):Mt()):Mt()}return Mt()},xt=(t,e)=>{kt[t]=e},Et=()=>{bt.value=ft.value.filter((t=>!t.selected)),wt.value=Ft.value.filter((t=>t.selected)),Dt("oneShow"),Dt("isOutSetting"),mt("saveOuterPrint",wt.value)},_t=t=>{ht[t]=!0},Dt=t=>{kt.oneClickType="",ht[t]=!1,"isOutSetting"==t&&(ht.isOutSetting=!1)},zt=(t,e)=>{Bt(!1);let n={type:e,formatId:vt.currentFormatId,templateId:(null==t?void 0:t.templateId)||Ot.value,templateCode:(null==t?void 0:t.templateCode)||St.value};mt("success",t,n)},Jt=t=>{Bt(!1),mt("error",t),S(t)&&"notInstalledApp"===t.type&&dt.error(t.message)},Ut=t=>{Bt(!1),mt("cancel",t)},Vt=t=>{mt("error",{message:"前置条件执行错误",type:t,preExecution:!0})},At=()=>JSON.stringify({...ut.token?{token:ut.token}:{}}),Kt=(t=[],e)=>{var n,r;let i={},a={};if((null==(n=vt.templateParams[e].customizeDataset)?void 0:n.length)>0){const e=(null==(r=Object.keys(t[0].datasetData||{}))?void 0:r[0])||"",n=JSON.stringify(t.map((t=>JSON.parse(t.datasetData[e]))));a={datasetData:{}},a.datasetData[e]=n}else Object.keys(t[0]).forEach((e=>{a[e]=[],t.forEach((t=>{a[e].includes(t[e])||a[e].push(t[e])})),a[e]=a[e].join(",")}));return i=Object.assign({},JSON.parse(At()),Tt.value,a),JSON.stringify(i)},Bt=(t,e)=>{if(vt.isClickOuterPrint){if(t&&e){const n=wt.value.find((t=>t.key==e));return void(n&&(n.isLoading=t))}wt.value.forEach((t=>{t.isLoading=!1}))}else vt.spinning=t},Rt=()=>vt.isClickOuterPrint?wt.value.some((t=>t.isLoading)):vt.spinning,Ht=(t,e,n,r)=>{const i=vt.printParams[t];if(!i)return;vt.isClickOuterPrint=r,vt.currentFormatId=n;const a=vt.originParams[t]||[];qt(i,t,e,n,a)},qt=async(t=[],e,n,r,i=[],a)=>{let l=t.length;const o=async t=>{try{--l<=0&&zt(t,"print")}catch(t){console.log("error",t)}};ut.showLoading&&Rt()&&!a||(Bt(!0,r),ut.prevFn("print").then((()=>{vt.curPrintParamList=t;const a={formatId:r,templateId:n,authorizationKey:yt.value,printdlgshow:ut.printdlgshow,signature:ut.signature,copies:ut.printCopies};if("MULTI"===ut.strategy)for(let e=0;e<t.length;e++){e>0&&(a.printdlgshow="0");const n=JSON.stringify(Object.assign({},JSON.parse(At()),Tt.value,t[e]));pt.printDirect({...a,params:n},o,Jt,Ut)}else pt.printDirect({...a,params:Kt(t,e)},(t=>{t.params=i,t.templateCode=e,t.templateId=n,zt(t,"print")}),Jt,Ut)})).catch((()=>{Vt("print"),Bt(!1)})).finally((()=>{vt.visible=!1})))},Gt=async(t,{templateCode:e,templateId:n,key:r},i)=>{const a=vt.printParams[e];if(a)switch(vt.isClickOuterPrint=i,vt.currentFormatId=r,t){case"previewText":(async(t=[],e,n,r)=>{ut.showLoading&&Rt()||(Bt(!0,r),ut.prevFn("preview").then((()=>{vt.curPrintParamList=t;const i=JSON.stringify(Object.assign({},JSON.parse(At()),Tt.value,t[0])),a="MULTI"===ut.strategy?i:Kt(t,e),l={formatId:r,templateId:n,authorizationKey:yt.value,params:a,btnprint:ut.btnprint,signature:ut.signature};pt.preview(l,(t=>{zt(t,"preview")}),Jt)})).catch((()=>{Vt("preview"),Bt(!1)})).finally((()=>{vt.visible=!1})))})(a,e,n,r);break;case"formatEditText":((t=[],e,n,r)=>{ut.showLoading&&Rt()||(Bt(!0,r),ut.prevFn("edit").then((()=>{vt.curPrintParamList=t,vt.currentFormatId=r,vt.identityVerification.visible=!0})).catch((()=>{Vt("edit")})).finally((()=>{Bt(!1)})))})(a,0,0,r);break;case"downloadPdf":(async(t=[],e,n,r)=>{ut.showLoading&&Rt()||(Bt(!0,r),ut.prevFn("download").then((()=>{vt.curPrintParamList=t;const i=JSON.stringify(Object.assign({},JSON.parse(At()),Tt.value,t[0])),a="MULTI"===ut.strategy?i:Kt(t,e),l={formatId:r,templateId:n,authorizationKey:yt.value,print:{print:"1",type:"1"},params:a,signature:ut.signature};pt.downloadPDF(l,(t=>zt(t,"preview")),Jt)})).catch((()=>{Vt("download"),Bt(!1)})).finally((()=>{vt.visible=!1})))})(a,e,n,r);break;case"resetPrinter":(async(t=[],e,n,r)=>{if(ut.showLoading&&Rt())return;Bt(!0,r);const i=await pt.resetPrinter(r);Bt(!1),"success"!=(null==i?void 0:i.result)?dt.warning("重置打印机失败"):dt.success(i.message||"重置打印机成功")})(a,0,0,r)}},Yt=()=>{},$t=(t,e=[])=>{let n={};return(e=e||[]).forEach((e=>{n=Object.assign({},Zt(n,e,t))})),n},Qt=(t,e=[])=>{let n={};return(e=e||[]).forEach((e=>{n=Object.assign({},te(n,e,t))})),n},Wt=(t,e,n)=>{const r={};return e.forEach((e=>{let i=((t,e)=>{const n={DATE:"yyyy-MM-dd",DATETIME:"yyyy-MM-dd HH:mm:ss"};let r=e;return Object.keys(n).includes(t.type)&&e&&e instanceof Date&&(r=A(e,n[t.type])),(null==t?void 0:t.defaultValue)||r})(e,t[e[n]]);t[e[n]]&&i&&(r[e[n]]=i)})),r},Xt=({customizeDataset:t=[],param:e=[]},n={})=>{let r={};return t.forEach((t=>{const e=t.dataSetting[0].selectFieldList;r.datasetData||(r.datasetData={}),r.datasetData[t.name]=JSON.stringify(Wt(n,e,"fieldName"))})),r=Object.assign({},r,Wt(n,e,"key")),r},Zt=(t,e,n)=>{if(e.templateNumbers){for(let r=0;r<e.templateNumbers.length;r++){const i=e.templateNumbers[r],a=n[i];if(!a)return dt.error("当前勾选的数据没有匹配的模板"),t;t[i]||(t[i]=[]),t[i].push(Xt(a,e))}return t}const r=Object.keys(n);for(let i=0;i<r.length;i++){const a=r[i],l=n[a];if(!l)return dt.error("当前勾选的数据没有匹配的模板"),t;t[a]||(t[a]=[]),t[a].push(Xt(l,e))}return t},te=(t,e,n)=>{if(e.templateNumbers){for(let r=0;r<e.templateNumbers.length;r++){const i=e.templateNumbers[r];if(!n[i])return dt.error("当前勾选的数据没有匹配的模板"),t;t[i]||(t[i]=[]),t[i].push(e)}return t}const r=Object.keys(n);for(let i=0;i<r.length;i++){const a=r[i];if(!n[a])return dt.error("当前勾选的数据没有匹配的模板"),t;t[a]||(t[a]=[]),t[a].push(e)}return t},ee=async t=>{vt.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):[],(()=>{var t,e,n;const r=vt.formatList.map((t=>({templateCode:t.number,templateId:t.templateId,label:t.name,key:t.id,selected:!1,isLoading:!1})));ft.value.unshift(...r),It.value&&ft.value.push(...ct),(null==(e=null==(t=ut.newPrintSetting)?void 0:t.outerPrintKeys)?void 0:e.length)>0&&(ft.value.forEach((t=>{var e;(null==(e=ut.newPrintSetting)?void 0:e.outerPrintKeys.includes(t.key))&&(t.selected=!0)})),wt.value=ft.value.filter((t=>t.selected))),bt.value=ft.value.filter((t=>!t.selected)),ut.hideButtons.length>0&&(gt.value=gt.value.filter((t=>!ut.hideButtons.includes(t.key))));const i=sessionStorage.getItem("portal");if(i){const t=JSON.parse(i),e=(null==(n=null==t?void 0:t.user)?void 0:n.currentRoleResourceObj)||{},r=Object.keys(e);r.includes("RY7.2.21.1.M2.G94181E")||(gt.value=gt.value.filter((t=>"downloadPdf"!=t.key))),r.includes("RY7.2.21.1.M2.G33633A")||(gt.value=gt.value.filter((t=>"formatEditText"!=t.key)))}})(),vt.templateParams=(t=>{let e={};return t&&t.forEach((t=>{if(!t.templateConfig)return!1;e[t.number]=t.templateConfig})),e})(t.obj),vt.printParams=$t(vt.templateParams,ut.params),vt.originParams=Qt(vt.templateParams,ut.params)},ne=async()=>{var t;if(vt.isInited)return!0;vt.isInited=!0,vt.spinning=!0,(()=>{if(pt)return!1;pt=new J})();const e=await ut.queryPrintFormatByNumber();return await ee(e),(null==(t=e.obj)?void 0:t.length)>0&&(yt.value=e.obj[0].authorizationKey||""),vt.spinning=!1,!0},re=async(t=!0)=>{if(await ut.clickPrevFn()){if(!vt.visible){if(!await ne())return!1}t&&(vt.visible=!vt.visible)}},ie=t=>{if(vt.identityVerification.visible=!1,U(vt.currentFormatId))return zt(null,"edit");const e=JSON.stringify(Object.assign({},JSON.parse(At()),Tt.value,vt.curPrintParamList[0])),n="MULTI"===ut.strategy?e:Kt(vt.curPrintParamList,St.value),r={formatId:vt.currentFormatId,templateId:Ot.value,params:n,token:t};pt.editPrintFormat(r,(t=>{zt(t,"edit")}),Jt)};async function ae(){await re(!1),(()=>{const t=Object.keys(vt.printParams);vt.isClickOuterPrint=!1;const e=vt.originParams;for(let n=0;n<t.length;n++){const r=t[n],i=vt.printParams[r],a=e[r]||[],l=vt.formatList.filter((t=>t.number==r));l&&l.length>0&&l.forEach((t=>{vt.currentFormatId=t.id,qt(i,t.number,t.templateId,t.id,a,!0)}))}})()}return a((()=>{vt.isInited=!1})),l((()=>ut.params),(t=>{Object.keys(vt.templateParams).length>0&&(vt.printParams=$t(vt.templateParams,ut.params),vt.originParams=Qt(vt.templateParams,ut.params))}),{deep:!0}),l((()=>{var t;return null==(t=ut.newPrintSetting)?void 0:t.outerPrintKeys}),(async t=>{(null==t?void 0:t.length)>0&&await re(!1)}),{deep:!0,immediate:!0}),st({directPrint:ae}),(e,n)=>(o(),s(u,null,[c("div",K,[d(" 外显按钮集合 "),p(m(I),null,{default:y((()=>[(o(!0),s(u,null,v(wt.value,(e=>{return o(),f(m(T),{key:e.key,class:"c-dropdown",placement:"bottom-start",trigger:"hover",onClickoutside:Yt,options:(n=m(gt),r=e,vt.printParams[r.templateCode]?n:[]),onSelect:t=>Gt(t,e,!0)},{default:y((()=>[p(m(L),{disabled:!vt.printParams[e.templateCode],loading:t.showLoading&&e.isLoading,onClick:t=>Ht(e.templateCode,e.templateId,e.key,!0)},{icon:y((()=>[p(m(F),{component:m(x),size:"18"},null,8,["component"])])),default:y((()=>[g(" "+k(e.label),1)])),_:2},1032,["disabled","loading","onClick"])])),_:2},1032,["options","onSelect"]);var n,r})),128))])),_:1}),d(' <n-button-group>\r\n\t\t\t<n-popover\r\n\t\t\t\tv-for="outer in outerPrintItems"\r\n :key="outer.key"\r\n\t\t\t\ttrigger="hover"\r\n\t\t\t\t:show-arrow="false"\r\n\t\t\t\t:show="downlistPopover.isOperation"\r\n\t\t\t\t@clickoutside="handleClickOutHide(\'isOperation\')"\r\n\t\t\t>\r\n\t\t\t\t<template #trigger>\r\n\t\t\t\t\t<n-button\r\n\t\t\t\t\t\t@mouseenter="delayShowPopover(\'isOperation\')"\r\n\t\t\t\t\t\t@mouseleave="handleClickOutHide(\'isOperation\')"\r\n\t\t\t\t\t\t@click="console.log(33)"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<template #icon>\r\n\t\t\t\t\t\t\t<n-icon :component="PrintOutline" size="18"></n-icon>\r\n\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t<span class="label bold">{{ outer.label }}</span>\r\n\t\t\t\t\t</n-button>\r\n\t\t\t\t</template>\r\n\t\t\t\t<div class="newprint-button-poperOver">\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\tclass="print-li"\r\n\t\t\t\t\t\tv-for="operation in operations"\r\n\t\t\t\t\t\t:key="operation.key"\r\n\t\t\t\t\t\t:class="downlistOperation.twoMouseType==operation.key ? \'active\' : \'\' "\r\n\t\t\t\t\t\t@mouseenter="handleTypeChange(\'twoMouseType\', operation.key)"\r\n\t\t\t\t\t\t@mouseleave="handleTypeChange(\'twoMouseType\', \'\')"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<div class="print-lite">\r\n\t\t\t\t\t\t\t<span class="label"> {{ operation.label }} </span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</n-popover>\r\n\t\t</n-button-group> '),d(" 外显设置按钮 "),wt.value.length>0&&wt.value.length==m(Ft).length&&m(It)?(o(),f(m(j),{key:0,trigger:"click","show-arrow":!1,show:ht.isOutSetting,onClickoutside:n[2]||(n[2]=t=>Dt("isOutSetting"))},{trigger:y((()=>[p(m(L),{onClick:n[0]||(n[0]=t=>_t("isOutSetting"))},{default:y((()=>[B,p(m(F),{style:{"margin-left":"8px"},component:m(E),size:"18"},null,8,["component"])])),_:1})])),default:y((()=>[c("div",R,[(o(!0),s(u,null,v(m(Ft),(t=>(o(),s("div",{class:"print-li",key:t.key},[c("div",H,[c("span",q,k(t.label),1),p(m(M),{checked:t.selected,"onUpdate:checked":e=>t.selected=e},{default:y((()=>[g("外显")])),_:2},1032,["checked","onUpdate:checked"])])])))),128)),c("div",G,[p(m(N)),c("div",Y,[p(m(L),{type:"primary",size:"small",onClick:Et},{default:y((()=>[g("保存")])),_:1}),m(Ft)&&m(Ft).length>1?(o(),f(m(M),{key:0,checked:m(jt),"onUpdate:checked":n[1]||(n[1]=t=>h(jt)?jt.value=t:null)},{default:y((()=>[g("全选")])),_:1},8,["checked"])):d("v-if",!0)])])])])),_:1},8,["show"])):(o(),s(u,{key:1},[d(" 打印全部按钮 "),p(m(j),{trigger:"click","show-arrow":!1,show:ht.oneShow,onClickoutside:n[10]||(n[10]=t=>Dt("oneShow"))},{trigger:y((()=>[b(e.$slots,"button",{handleClickPrintBtn:re,printSpinning:vt.spinning,printbtnText:t.btnText,printVisible:vt.visible},(()=>[p(m(I),{class:"newprint-button-component",onClick:n[4]||(n[4]=w((()=>Nt("icon")),["stop"]))},{default:y((()=>[p(m(L),{loading:t.showLoading&&vt.spinning,onClick:n[3]||(n[3]=w((()=>Nt("button")),["stop"]))},{icon:y((()=>[p(m(F),{component:m(x),size:"18"},null,8,["component"])])),default:y((()=>[g(" "+k(m(Ct)?"打印全部":t.btnText),1)])),_:1},8,["loading"]),p(m(L),{class:"icon-select"},{icon:y((()=>[p(m(F),{component:m(_),size:"18"},null,8,["component"])])),_:1})])),_:1})]))])),default:y((()=>[c("div",$,[(o(!0),s(u,null,v(bt.value,(t=>(o(),s("div",{class:P(["print-li",kt.oneMouseType==t.key||kt.oneClickType==t.key?"active":""]),key:t.key,onMouseenter:e=>xt("oneMouseType",t.key),onMouseleave:n[9]||(n[9]=t=>xt("oneMouseType","")),onClick:e=>((t,e,n)=>{if(!vt.printParams[n.templateCode])return[];xt(t,e)})("oneClickType",t.key,t)},["divider"==t.key?(o(),f(m(N),{key:0})):"outSetting"==t.key?(o(),s(u,{key:1},[d(" 第二层外显设置 "),p(m(j),{trigger:"click","show-arrow":!1,placement:"right-start",show:ht.isOutSetting,onClickoutside:n[7]||(n[7]=t=>Dt("isOutSetting"))},{trigger:y((()=>[c("div",{class:"print-lite",onClick:n[5]||(n[5]=t=>_t("isOutSetting"))},[c("span",W,k(t.label),1),p(m(F),{color:wt.value.length>0?"#2563F4":"",component:m(E),size:"18"},null,8,["color","component"])])])),default:y((()=>[c("div",X,[(o(!0),s(u,null,v(m(Ft),(t=>(o(),s("div",{class:"print-li",key:t.key},[c("div",Z,[c("span",tt,k(t.label),1),p(m(M),{checked:t.selected,"onUpdate:checked":e=>t.selected=e},{default:y((()=>[g("外显")])),_:2},1032,["checked","onUpdate:checked"])])])))),128)),c("div",et,[p(m(N)),c("div",nt,[p(m(L),{type:"primary",size:"small",onClick:Et},{default:y((()=>[g("保存")])),_:1}),m(Ft)&&m(Ft).length>1?(o(),f(m(M),{key:0,checked:m(jt),"onUpdate:checked":n[6]||(n[6]=t=>h(jt)?jt.value=t:null)},{default:y((()=>[g("全选")])),_:1},8,["checked"])):d("v-if",!0)])])])])),_:2},1032,["show"])],2112)):(o(),s(u,{key:2},[d(" 第二层功能操作 "),c("div",{class:P(["print-lite",vt.printParams[t.templateCode]?"":"isDisabled"])},[c("span",{class:"label bold",onClick:e=>Ht(t.templateCode,t.templateId,t.key,!1)},k(t.label),9,rt),vt.printParams[t.templateCode]?(o(),f(m(j),{key:0,trigger:"click","show-arrow":!1,placement:"right-start",show:ht[t.key],onClickoutside:e=>Dt(t.key)},{trigger:y((()=>[p(m(F),{component:m(D),size:"18",onClick:e=>_t(t.key)},null,8,["component","onClick"])])),default:y((()=>[c("div",it,[(o(!0),s(u,null,v(m(gt),(e=>(o(),s("div",{class:P(["print-li",kt.twoMouseType==e.key?"active":""]),key:e.key,onMouseenter:t=>xt("twoMouseType",e.key),onMouseleave:n[8]||(n[8]=t=>xt("twoMouseType",""))},[c("div",lt,[c("span",{class:"label",onClick:n=>Gt(e.key,t,!1)},k(e.label),9,ot)])],42,at)))),128))])])),_:2},1032,["show","onClickoutside"])):d("v-if",!0)],2)],2112))],42,Q)))),128))])])),_:3},8,["show"])],2112))]),p(V,O(e.$attrs,{modelValue:vt.identityVerification.visible,"onUpdate:modelValue":n[11]||(n[11]=t=>vt.identityVerification.visible=t),formatId:vt.currentFormatId,templateId:m(Ot),onSuccess:ie}),null,16,["modelValue","formatId","templateId"])],64))}});export{st as default};
|
|
@@ -99,6 +99,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
99
99
|
default: number;
|
|
100
100
|
};
|
|
101
101
|
}, {
|
|
102
|
+
$attrs: {
|
|
103
|
+
[x: string]: unknown;
|
|
104
|
+
};
|
|
102
105
|
$message: import("naive-ui").MessageApi;
|
|
103
106
|
printInstance: Print | null;
|
|
104
107
|
downloadPdfCode: string;
|
|
@@ -223,7 +226,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
223
226
|
getTemplateIdByFormatId: import("vue").ComputedRef<any>;
|
|
224
227
|
buttonClick: (origin: string) => Promise<false | undefined>;
|
|
225
228
|
renderLabel: (option: AnyObject) => JSX.Element;
|
|
226
|
-
debounce: (fn: any, delay: number, immediate?: boolean) => (...args: any
|
|
229
|
+
debounce: (fn: any, delay: number, immediate?: boolean) => (...args: any) => void;
|
|
227
230
|
callLocalServicesSuccessCb: (res: any, type: any) => void;
|
|
228
231
|
callLocalServicesErrorCb: (res: unknown) => void;
|
|
229
232
|
callLocalServicesCancelCb: (res: unknown) => void;
|
|
@@ -231,7 +234,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
231
234
|
getPrintParams: (index?: number) => string;
|
|
232
235
|
getOnceParams: () => string;
|
|
233
236
|
handleClickPrint: () => void;
|
|
234
|
-
handleDebounceClickPrint: (...args: any
|
|
237
|
+
handleDebounceClickPrint: (...args: any) => void;
|
|
235
238
|
handleClickPreview: () => Promise<void>;
|
|
236
239
|
handleClickPdf: () => Promise<void>;
|
|
237
240
|
handleClickEdit: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as t,
|
|
1
|
+
import{defineComponent as t,useAttrs as e,inject as n,ref as i,reactive as a,computed as r,onMounted as l,watch as o,openBlock as s,createElementBlock as p,Fragment as d,createVNode as u,unref as m,withCtx as c,renderSlot as f,withModifiers as y,createTextVNode as v,toDisplayString as g,mergeProps as b}from"vue";import{isObject as h}from"@vue/shared";import{useMessage as I,NDropdown as P,NButton as w,NIcon as F}from"naive-ui";import{ChevronDown as k}from"@vicons/ionicons5";import{InjectionButtonPrintEmits as T}from"../constants/index.js";import{Print as S}from"../utils/print.js";import{isIReport as x}from"../utils/browserPrint.js";import O from"./IdentityVerification.vue.js";import{format as j}from"date-fns";import{savePrivateFormatApi as L,getPrivateFormatApi as D}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},noDefaultFormatMsg:{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 M;const N=t,C=e(),V=I();let B;const R=n(T),z={},A=i(""),J=a({spinning:!1,visible:!1,formatList:[],templateParams:{},printParams:[],currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null});let U=i([{label:N.printText,key:"printText"},{label:N.previewText,key:"previewText"},{label:N.pdfLoadText,key:"downloadPdf"},{label:N.formatEditText,key:"formatEditText"},...(null==(M=N.externalOptionConfig)?void 0:M.options)||[]]);const q=r((()=>{if(!J.currentFormatId)return{};let t=J.currentFormatId;return J.formatList.find((e=>e.id===t))})),K=r((()=>{var t;return(null==(t=q.value)?void 0:t.name)||"格式选择"})),_=r((()=>{let t=J.formatList.find((t=>t.id===J.currentFormatId));return null==t?void 0:t.templateId})),G=async t=>{if(N.directPrint){if(J.spinning)return;return"button"===t?void await ut():st()}return st()},H=t=>u("span",{class:{active:t.key===J.currentFormatId}},[t.label]),Y=(t,e)=>{J.spinning=!1;let n={type:e,formatId:J.currentFormatId,templateId:_.value};R("success",t,n)},$=t=>{J.spinning=!1,R("error",t),h(t)&&"notInstalledApp"===t.type&&V.error(t.message)},Q=t=>{J.spinning=!1,R("cancel",t)},W=t=>{R("error",{message:"前置条件执行错误",type:t,preExecution:!0})},X=(t=0)=>{var e;const n=(null==(e=N.printParams)?void 0:e.length)?N.printParams[t]:J.printParams[t];return JSON.stringify({...n||{},...N.token?{token:N.token}:{}})},Z=()=>{var t,e;let n={},i={};if(null==(t=J.templateParams.customizeDataset)?void 0:t.length){const t=(null==(e=Object.keys(J.printParams[0].datasetData||{}))?void 0:e[0])||"",n=JSON.stringify(J.printParams.map((e=>JSON.parse(e.datasetData[t]))));i={datasetData:{}},i.datasetData[t]=n}else Object.keys(J.printParams[0]).forEach((t=>{i[t]=[],J.printParams.forEach((e=>{i[t].includes(e[t])||i[t].push(e[t])})),i[t]=i[t].join(",")}));return n=Object.assign({},JSON.parse(X(0)),i),JSON.stringify(n)},tt=((t,e,n=!0)=>{let i=null;return function(...a){i&&clearTimeout(i),n&&!i&&t.apply(null,a),i=setTimeout((()=>{i=null,!n&&t.apply(null,a)}),e)}})((()=>{let t=J.printParams.length;const e=async e=>{try{--t<=0&&Y(e,"print")}catch(t){console.log("error",t)}};N.showLoading&&J.spinning||(J.spinning=!0,N.prevFn("print").then((()=>{const t={formatId:J.currentFormatId,templateId:_.value,authorizationKey:A.value,printdlgshow:N.printdlgshow,signature:N.signature,copies:N.printCopies};if("MULTI"===N.strategy)for(let n=0;n<J.printParams.length;n++)n>0&&(t.printdlgshow="0"),B.printDirect({...t,params:X(n)},e,$,Q);else B.printDirect({...t,params:Z()},(t=>{Y(t,"print")}),$,Q)})).catch((()=>{W("print"),J.spinning=!1})).finally((()=>{J.visible=!1})))}),800,!0),et=async(t,e)=>{var n,i;switch(t){case"printText":tt();break;case"previewText":(async()=>{N.showLoading&&J.spinning||(J.spinning=!0,N.prevFn("preview").then((()=>{const t="MULTI"===N.strategy?X():Z(),e={formatId:J.currentFormatId,templateId:_.value,authorizationKey:A.value,params:t,btnprint:N.btnprint,signature:N.signature};B.preview(e,(t=>{Y(t,"preview")}),$)})).catch((()=>{W("preview"),J.spinning=!1})).finally((()=>{J.visible=!1})))})();break;case"formatEditText":N.showLoading&&J.spinning||(J.spinning=!0,N.prevFn("edit").then((()=>{J.identityVerification.visible=!0})).catch((()=>{W("edit")})).finally((()=>{J.visible=!1,J.spinning=!1})));break;case"downloadPdf":(async()=>{N.showLoading&&J.spinning||(J.spinning=!0,N.prevFn("download").then((()=>{const t="MULTI"===N.strategy?X():Z(),e={formatId:J.currentFormatId,templateId:_.value,authorizationKey:A.value,print:{print:"1",type:"1"},params:t,signature:N.signature};B.downloadPDF(e,(t=>Y(t,"preview")),$)})).catch((()=>{W("download"),J.spinning=!1})).finally((()=>{J.visible=!1})))})();break;default:{J.visible=!1;const a=J.formatList.find((e=>e.id===t))||{};if(Object.keys(a).length>0){J.currentFormatId=t;const[e]=U.value;e.label=(null==a?void 0:a.name)||e.label,await L({formatForms:[{...a}],name:z.name||a.templateName,number:z.number||a.number,templateId:z.templateId||a.templateId,...z.id?{id:z.id}:{}},{token:N.token})}else null==(i=null==(n=N.externalOptionConfig)?void 0:n.onSelect)||i.call(n,t,e);break}}},nt=()=>{J.visible=!1,R("clickoutside")},it=()=>(J.isInited=!1,J.spinning=!1,setTimeout((()=>{J.visible=!1}),0),!1),at=(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=j(e,n[t.type])),(null==t?void 0:t.defaultValue)||i})(e,t[e[n]]);t[e[n]]&&a&&(i[e[n]]=a)})),i},rt=({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(at(n,e,"fieldName"))}})),i=Object.assign({},i,at(n,e,"key")),i})),lt=async t=>{var e;if(J.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):[],J.currentFormatId=await(async(t,e)=>{var n;if(!(null==t?void 0:t.length))return"";if(!C.isDoc){const{data:e}=await D({templateId:t[0].templateId},{token:N.token});if("SUCCESS"===e.result){const{formatForms:i=[]}=e.map||{};Object.assign(z,e.map||{});const a=null==(n=null==i?void 0:i[0])?void 0:n.id;if(a&&t.map((t=>t.id)).includes(a))return a}}const i=t.find((t=>1==t[e]));return(null==i?void 0:i.id)||t[0].id})(J.formatList,"defaultFlag"),!J.currentFormatId)return U.value=[],V.error(N.noDefaultFormatMsg),it();(()=>{var t;const e=J.formatList.map((t=>({label:t.name,key:t.id})));U.value.unshift({label:K.value,key:"format",children:e}),N.hideButtons.length>0&&(U.value=U.value.filter((t=>!N.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")||(U.value=U.value.filter((t=>"downloadPdf"!=t.key))),a.includes("RY7.2.21.1.M2.G33633A")||(U.value=U.value.filter((t=>"formatEditText"!=t.key)))}})();let n=null==(e=await N.queryTemplateParams())?void 0:e.obj;if(!n||!_.value)return V.error("获取打印模板失败,请联系管理员!"),it();J.templateParams=n,J.printParams=rt(J.templateParams,N.params)},ot=async()=>{var t;if(J.isInited)return!0;J.isInited=!0,J.spinning=!0,(()=>{if(B)return!1;B=new S})();const e=await N.queryPrintFormatByNumber();return await lt(e),(null==(t=e.obj)?void 0:t.length)>0&&(A.value=e.obj[0].authorizationKey||""),J.spinning=!1,!0},st=async(t=!0)=>{var e,n;if(await N.clickPrevFn())if((null==(e=N.params)?void 0:e.length)||(null==(n=N.printParams)?void 0:n.length)){if(!J.visible){if(!await ot())return!1}t&&(J.visible=!J.visible)}else V.warning(N.noDataMsg)},pt=()=>{J.watchPrintParamsReformatFn&&J.watchPrintParamsReformatFn(),J.isInited?J.printParams=rt(J.templateParams,N.params):J.watchPrintParamsReformatFn=()=>o((()=>J.isInited),(t=>{if(!t)return!1;pt()}))},dt=t=>{if(J.identityVerification.visible=!1,x(J.currentFormatId))return Y(null,"edit");const e={formatId:J.currentFormatId,templateId:_.value,params:X(),token:t};B.editPrintFormat(e,(t=>{Y(t,"edit")}),$)};async function ut(){await st(!1),tt()}return l((()=>{J.isInited=!1})),o((()=>N.params),(t=>{if(!(null==t?void 0:t.length))return!1;pt()}),{deep:!0}),E({directPrint:ut}),(e,n)=>(s(),p(d,null,[u(m(P),{class:"c-dropdown",placement:"bottom-start",trigger:"click",show:J.visible,onClickoutside:nt,options:m(U),onSelect:et,"render-label":H},{default:c((()=>[f(e.$slots,"button",{handleClickPrintBtn:st,printSpinning:J.spinning,printbtnText:t.btnText,printVisible:J.visible},(()=>[u(m(w),{class:"dropdown-button",loading:t.showLoading&&J.spinning,onClick:n[1]||(n[1]=y((()=>G("button")),["stop"]))},{default:c((()=>[v(g(t.btnText)+" ",1),u(m(F),{component:m(k),size:"18",style:{"margin-left":"5px"},onClick:n[0]||(n[0]=y((()=>G("icon")),["stop"]))},null,8,["component"])])),_:1},8,["loading"])]))])),_:3},8,["show","options"]),u(O,b(m(C),{modelValue:J.identityVerification.visible,"onUpdate:modelValue":n[2]||(n[2]=t=>J.identityVerification.visible=t),formatId:J.currentFormatId,templateId:m(_),onSuccess:dt}),null,16,["modelValue","formatId","templateId"])],64))}});export{E as default};
|
|
@@ -195,6 +195,10 @@ export declare const CallbackMaps: Map<string, {
|
|
|
195
195
|
type: (BooleanConstructor | NumberConstructor)[];
|
|
196
196
|
default: boolean;
|
|
197
197
|
};
|
|
198
|
+
incrementalRender: {
|
|
199
|
+
type: BooleanConstructor;
|
|
200
|
+
default: boolean;
|
|
201
|
+
};
|
|
198
202
|
}, {
|
|
199
203
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
200
204
|
fieldList: {
|
|
@@ -386,14 +390,19 @@ export declare const CallbackMaps: Map<string, {
|
|
|
386
390
|
type: (BooleanConstructor | NumberConstructor)[];
|
|
387
391
|
default: boolean;
|
|
388
392
|
};
|
|
393
|
+
incrementalRender: {
|
|
394
|
+
type: BooleanConstructor;
|
|
395
|
+
default: boolean;
|
|
396
|
+
};
|
|
389
397
|
}>> & {
|
|
390
398
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
391
399
|
onScroll?: ((...args: any[]) => any) | undefined;
|
|
392
400
|
onAnnotationChange?: ((...args: any[]) => any) | undefined;
|
|
393
401
|
"onUpdate:selectedFields"?: ((...args: any[]) => any) | undefined;
|
|
394
402
|
onLinebarChange?: ((...args: any[]) => any) | undefined;
|
|
403
|
+
onReady?: ((...args: any[]) => any) | undefined;
|
|
395
404
|
}>>;
|
|
396
|
-
emit: (event: "scroll" | "formChange" | "annotationChange" | "update:selectedFields" | "linebarChange", ...args: any[]) => void;
|
|
405
|
+
emit: (event: "scroll" | "formChange" | "annotationChange" | "update:selectedFields" | "linebarChange" | "ready", ...args: any[]) => void;
|
|
397
406
|
cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
398
407
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
399
408
|
formRenderRef: import("vue").Ref<HTMLElement | undefined>;
|
|
@@ -449,6 +458,8 @@ export declare const CallbackMaps: Map<string, {
|
|
|
449
458
|
setGraph: (field: import("@formily/core").GeneralField) => void;
|
|
450
459
|
removeGraph: (field: import("@formily/core").GeneralField) => void;
|
|
451
460
|
lowCodeEventTrigger: (field: import("@formily/core").GeneralField) => void;
|
|
461
|
+
emitFormChange: import("vue").Ref<boolean>;
|
|
462
|
+
isReady: boolean;
|
|
452
463
|
formModel: import("@formily/core").Form<{
|
|
453
464
|
[x: string]: any;
|
|
454
465
|
}>;
|
|
@@ -621,6 +632,63 @@ export declare const CallbackMaps: Map<string, {
|
|
|
621
632
|
"x-compile-omitted"?: string[] | undefined;
|
|
622
633
|
}>>;
|
|
623
634
|
_fieldList: import("../../../../../components/form-render").FieldItem[];
|
|
635
|
+
incrementalRenderList: import("@formily/json-schema").Stringify<{
|
|
636
|
+
[key: symbol]: any;
|
|
637
|
+
[key: `x-${string}`]: any;
|
|
638
|
+
[key: `x-${number}`]: any;
|
|
639
|
+
version?: string | undefined;
|
|
640
|
+
name?: import("@formily/json-schema").SchemaKey | undefined;
|
|
641
|
+
title?: any;
|
|
642
|
+
description?: any;
|
|
643
|
+
default?: any;
|
|
644
|
+
readOnly?: boolean | undefined;
|
|
645
|
+
writeOnly?: boolean | undefined;
|
|
646
|
+
type?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
647
|
+
enum?: import("@formily/json-schema").SchemaEnum<any> | undefined;
|
|
648
|
+
const?: any;
|
|
649
|
+
multipleOf?: number | undefined;
|
|
650
|
+
maximum?: number | undefined;
|
|
651
|
+
exclusiveMaximum?: number | undefined;
|
|
652
|
+
minimum?: number | undefined;
|
|
653
|
+
exclusiveMinimum?: number | undefined;
|
|
654
|
+
maxLength?: number | undefined;
|
|
655
|
+
minLength?: number | undefined;
|
|
656
|
+
pattern?: string | RegExp | undefined;
|
|
657
|
+
maxItems?: number | undefined;
|
|
658
|
+
minItems?: number | undefined;
|
|
659
|
+
uniqueItems?: boolean | undefined;
|
|
660
|
+
maxProperties?: number | undefined;
|
|
661
|
+
minProperties?: number | undefined;
|
|
662
|
+
required?: string | boolean | string[] | undefined;
|
|
663
|
+
format?: string | undefined;
|
|
664
|
+
$ref?: string | undefined;
|
|
665
|
+
$namespace?: string | undefined;
|
|
666
|
+
definitions?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
|
|
667
|
+
properties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
|
|
668
|
+
items?: import("@formily/json-schema").SchemaItems<any, any, any, any, any, any, any, any> | undefined;
|
|
669
|
+
additionalItems?: import("@formily/json-schema").Stringify<any> | undefined;
|
|
670
|
+
patternProperties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
|
|
671
|
+
additionalProperties?: import("@formily/json-schema").Stringify<any> | undefined;
|
|
672
|
+
"x-value"?: any;
|
|
673
|
+
"x-index"?: number | undefined;
|
|
674
|
+
"x-pattern"?: any;
|
|
675
|
+
"x-display"?: any;
|
|
676
|
+
"x-validator"?: any;
|
|
677
|
+
"x-decorator"?: any;
|
|
678
|
+
"x-decorator-props"?: any;
|
|
679
|
+
"x-component"?: any;
|
|
680
|
+
"x-component-props"?: any;
|
|
681
|
+
"x-reactions"?: import("@formily/json-schema").SchemaReactions<any> | undefined;
|
|
682
|
+
"x-content"?: any;
|
|
683
|
+
"x-data"?: any;
|
|
684
|
+
"x-visible"?: boolean | undefined;
|
|
685
|
+
"x-hidden"?: boolean | undefined;
|
|
686
|
+
"x-disabled"?: boolean | undefined;
|
|
687
|
+
"x-editable"?: boolean | undefined;
|
|
688
|
+
"x-read-only"?: boolean | undefined;
|
|
689
|
+
"x-read-pretty"?: boolean | undefined;
|
|
690
|
+
"x-compile-omitted"?: string[] | undefined;
|
|
691
|
+
}>[];
|
|
624
692
|
parsedSchema: import("vue").ComputedRef<import("@formily/json-schema").Stringify<{
|
|
625
693
|
[key: symbol]: any;
|
|
626
694
|
[key: `x-${string}`]: any;
|
|
@@ -678,6 +746,7 @@ export declare const CallbackMaps: Map<string, {
|
|
|
678
746
|
"x-read-pretty"?: boolean | undefined;
|
|
679
747
|
"x-compile-omitted"?: string[] | undefined;
|
|
680
748
|
}>>;
|
|
749
|
+
startIncrementalRender: () => void;
|
|
681
750
|
onKeydown: (event: KeyboardEvent) => Promise<void>;
|
|
682
751
|
clearSpan: (uuid: string) => void;
|
|
683
752
|
exposeEvent: Omit<import("../../../../../components/form-render").FormRenderExpose, "getFieldList" | "formModel" | "reload">;
|
|
@@ -740,7 +809,7 @@ export declare const CallbackMaps: Map<string, {
|
|
|
740
809
|
readonly displayDirective: "if" | "show" | "show:lazy";
|
|
741
810
|
}>;
|
|
742
811
|
NTabs: any;
|
|
743
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange" | "annotationChange" | "update:selectedFields" | "linebarChange")[], "scroll" | "formChange" | "annotationChange" | "update:selectedFields" | "linebarChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
812
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange" | "annotationChange" | "update:selectedFields" | "linebarChange" | "ready")[], "scroll" | "formChange" | "annotationChange" | "update:selectedFields" | "linebarChange" | "ready", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
744
813
|
fieldList: {
|
|
745
814
|
type: import("vue").PropType<import("../../../../../components/form-render").FieldItem[]>;
|
|
746
815
|
};
|
|
@@ -930,12 +999,17 @@ export declare const CallbackMaps: Map<string, {
|
|
|
930
999
|
type: (BooleanConstructor | NumberConstructor)[];
|
|
931
1000
|
default: boolean;
|
|
932
1001
|
};
|
|
1002
|
+
incrementalRender: {
|
|
1003
|
+
type: BooleanConstructor;
|
|
1004
|
+
default: boolean;
|
|
1005
|
+
};
|
|
933
1006
|
}>> & {
|
|
934
1007
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
935
1008
|
onScroll?: ((...args: any[]) => any) | undefined;
|
|
936
1009
|
onAnnotationChange?: ((...args: any[]) => any) | undefined;
|
|
937
1010
|
"onUpdate:selectedFields"?: ((...args: any[]) => any) | undefined;
|
|
938
1011
|
onLinebarChange?: ((...args: any[]) => any) | undefined;
|
|
1012
|
+
onReady?: ((...args: any[]) => any) | undefined;
|
|
939
1013
|
}, {
|
|
940
1014
|
anchor: boolean;
|
|
941
1015
|
maxHeight: string | number;
|
|
@@ -960,6 +1034,7 @@ export declare const CallbackMaps: Map<string, {
|
|
|
960
1034
|
linebarTextDirection: "horizontal" | "vertical";
|
|
961
1035
|
autoWidth: number | boolean;
|
|
962
1036
|
operationalFormInit: boolean;
|
|
1037
|
+
incrementalRender: boolean;
|
|
963
1038
|
}>;
|
|
964
1039
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
965
1040
|
props: {
|
|
@@ -1096,6 +1171,7 @@ export declare const CallbackMaps: Map<string, {
|
|
|
1096
1171
|
__emits: (event: "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd" | "pageChange", ...args: any[]) => void;
|
|
1097
1172
|
$xeTable: import("vue").Ref<import("../../../../../components/iho-table").$VxeTable | undefined>;
|
|
1098
1173
|
loading: import("vue").Ref<boolean>;
|
|
1174
|
+
finalLoading: import("vue").ComputedRef<boolean>;
|
|
1099
1175
|
themCSSVars: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
1100
1176
|
CSSVars: import("vue").ComputedRef<{
|
|
1101
1177
|
[x: `--${string}`]: string | number | undefined;
|
|
@@ -6089,6 +6165,9 @@ export declare const CallbackMaps: Map<string, {
|
|
|
6089
6165
|
updateFieldListRefDebounced: () => void;
|
|
6090
6166
|
updateFieldListRef: () => void;
|
|
6091
6167
|
dataTransfer: (data: import("../../../..").AnyObject[]) => Promise<import("../../../..").AnyObject[]>;
|
|
6168
|
+
tableDataResolved: null;
|
|
6169
|
+
setTableDataResolved: (resolve: import("../../../..").AnyFn<any[], any>) => void;
|
|
6170
|
+
resolveTableData: () => Promise<void>;
|
|
6092
6171
|
tableDataRef: import("vue").Ref<import("../../../..").AnyObject[]>;
|
|
6093
6172
|
updateTableDataRefDebounced: () => Promise<void>;
|
|
6094
6173
|
updateTableDataRef: () => Promise<void>;
|
|
@@ -20,6 +20,10 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
20
20
|
type: NumberConstructor;
|
|
21
21
|
default: number;
|
|
22
22
|
};
|
|
23
|
+
showClassificationIndexs: {
|
|
24
|
+
type: import("vue").PropType<number[]>;
|
|
25
|
+
default: () => number[];
|
|
26
|
+
};
|
|
23
27
|
curClassificationWidth: {
|
|
24
28
|
type: NumberConstructor;
|
|
25
29
|
};
|
|
@@ -77,6 +81,10 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
77
81
|
type: NumberConstructor;
|
|
78
82
|
default: number;
|
|
79
83
|
};
|
|
84
|
+
showClassificationIndexs: {
|
|
85
|
+
type: import("vue").PropType<number[]>;
|
|
86
|
+
default: () => number[];
|
|
87
|
+
};
|
|
80
88
|
curClassificationWidth: {
|
|
81
89
|
type: NumberConstructor;
|
|
82
90
|
};
|
|
@@ -2257,6 +2265,10 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2257
2265
|
type: NumberConstructor;
|
|
2258
2266
|
default: number;
|
|
2259
2267
|
};
|
|
2268
|
+
showClassificationIndexs: {
|
|
2269
|
+
type: import("vue").PropType<number[]>;
|
|
2270
|
+
default: () => number[];
|
|
2271
|
+
};
|
|
2260
2272
|
curClassificationWidth: {
|
|
2261
2273
|
type: NumberConstructor;
|
|
2262
2274
|
};
|
|
@@ -2299,6 +2311,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2299
2311
|
conditionMap: import("..").IConditionMapType;
|
|
2300
2312
|
conditionSid: string[];
|
|
2301
2313
|
curClassificationIndex: number;
|
|
2314
|
+
showClassificationIndexs: number[];
|
|
2302
2315
|
hideConditionChangeBtn: number;
|
|
2303
2316
|
hideConditionChangeSetting: number;
|
|
2304
2317
|
hideClearConditionChange: number;
|
|
@@ -22,6 +22,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
22
22
|
type: NumberConstructor;
|
|
23
23
|
default: number;
|
|
24
24
|
};
|
|
25
|
+
showClassificationIndexs: {
|
|
26
|
+
type: PropType<number[]>;
|
|
27
|
+
default: () => number[];
|
|
28
|
+
};
|
|
25
29
|
curClassificationWidth: {
|
|
26
30
|
type: NumberConstructor;
|
|
27
31
|
};
|
|
@@ -79,6 +83,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
79
83
|
type: NumberConstructor;
|
|
80
84
|
default: number;
|
|
81
85
|
};
|
|
86
|
+
showClassificationIndexs: {
|
|
87
|
+
type: PropType<number[]>;
|
|
88
|
+
default: () => number[];
|
|
89
|
+
};
|
|
82
90
|
curClassificationWidth: {
|
|
83
91
|
type: NumberConstructor;
|
|
84
92
|
};
|
|
@@ -1449,9 +1457,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1449
1457
|
isSecondDisabled(second: number, minute: number | null, hour: number | null): boolean | 0;
|
|
1450
1458
|
};
|
|
1451
1459
|
NSelect: any;
|
|
1452
|
-
/**
|
|
1453
|
-
* 改变展示方式
|
|
1454
|
-
*/
|
|
1455
1460
|
NPopover: any;
|
|
1456
1461
|
CDatePicker: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
|
|
1457
1462
|
updateUnchangedValue: {
|
|
@@ -2262,6 +2267,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2262
2267
|
type: NumberConstructor;
|
|
2263
2268
|
default: number;
|
|
2264
2269
|
};
|
|
2270
|
+
showClassificationIndexs: {
|
|
2271
|
+
type: PropType<number[]>;
|
|
2272
|
+
default: () => number[];
|
|
2273
|
+
};
|
|
2265
2274
|
curClassificationWidth: {
|
|
2266
2275
|
type: NumberConstructor;
|
|
2267
2276
|
};
|
|
@@ -2304,6 +2313,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2304
2313
|
conditionMap: IConditionMapType;
|
|
2305
2314
|
conditionSid: string[];
|
|
2306
2315
|
curClassificationIndex: number;
|
|
2316
|
+
showClassificationIndexs: number[];
|
|
2307
2317
|
hideConditionChangeBtn: number;
|
|
2308
2318
|
hideConditionChangeSetting: number;
|
|
2309
2319
|
hideClearConditionChange: number;
|