cnhis-design-vue 3.2.14-release.1 → 3.2.15-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/es/components/ai-chat/index.d.ts +1 -0
  2. package/es/components/ai-chat/src/Index.vue.d.ts +1 -0
  3. package/es/components/ai-chat/src/components/ChatCard.js +1 -1
  4. package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +1 -0
  5. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  6. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  7. package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -1
  8. package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +1 -1
  9. package/es/components/ai-chat/style/index.css +1 -1
  10. package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
  11. package/es/components/base-search/index.d.ts +8 -3
  12. package/es/components/base-search/src/index.vue.d.ts +8 -3
  13. package/es/components/base-search/src/index.vue2.js +1 -1
  14. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  15. package/es/components/big-table/src/components/NoData.vue2.js +1 -1
  16. package/es/components/big-table/src/components/edit-form/edit-date.js +1 -1
  17. package/es/components/big-table/src/components/edit-form/edit-input.js +1 -1
  18. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
  19. package/es/components/big-table/src/components/edit-form/edit-time.js +1 -1
  20. package/es/components/big-table/src/components/input-button.vue2.js +1 -1
  21. package/es/components/big-table/src/hooks/useNestTable.js +1 -1
  22. package/es/components/big-table/src/hooks/useTableParse.js +1 -1
  23. package/es/components/body-select/src/index.vue2.js +1 -1
  24. package/es/components/branch-notice/index.d.ts +63 -0
  25. package/es/components/branch-notice/index.js +1 -0
  26. package/es/components/branch-notice/src/BranchNotice.vue.d.ts +64 -0
  27. package/es/components/branch-notice/src/BranchNotice.vue.js +1 -0
  28. package/es/components/branch-notice/src/BranchNotice.vue2.js +1 -0
  29. package/es/components/branch-notice/src/canstants.d.ts +7 -0
  30. package/es/components/branch-notice/src/canstants.js +1 -0
  31. package/es/components/branch-notice/src/components/NoticeItem.vue.d.ts +151 -0
  32. package/es/components/branch-notice/src/components/NoticeItemAside.vue.d.ts +35 -0
  33. package/es/components/branch-notice/src/components/NoticeOperationList.vue.d.ts +49 -0
  34. package/es/components/branch-notice/src/drawLine.d.ts +2 -0
  35. package/es/components/branch-notice/src/drawLine.js +1 -0
  36. package/es/components/branch-notice/src/types.d.ts +14 -0
  37. package/es/components/branch-notice/src/types.js +1 -0
  38. package/es/components/branch-notice/style/index.css +1 -0
  39. package/es/components/button-print/index.d.ts +4 -0
  40. package/es/components/button-print/src/ButtonPrint.vue.d.ts +4 -0
  41. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  42. package/es/components/button-print/src/components/EditFormat.vue2.js +1 -1
  43. package/es/components/button-print/src/components/IdentityVerification.vue2.js +1 -1
  44. package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +4 -0
  45. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  46. package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
  47. package/es/components/button-print/src/components/Preview.vue2.js +1 -1
  48. package/es/components/button-print/src/utils/dialog.js +1 -1
  49. package/es/components/button-print/src/utils/print.js +1 -1
  50. package/es/components/calendar/index.d.ts +4 -4
  51. package/es/components/calendar/src/Calendar.vue.d.ts +4 -4
  52. package/es/components/card-reader-sdk/src/components/readCardDialog.vue2.js +1 -1
  53. package/es/components/card-reader-sdk/src/utils/readHealthCard.js +1 -1
  54. package/es/components/classification/index.d.ts +1 -0
  55. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  56. package/es/components/classification/src/components/set-classification/index.vue2.js +1 -1
  57. package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
  58. package/es/components/classification/src/index.vue.d.ts +1 -0
  59. package/es/components/classification/src/index.vue2.js +1 -1
  60. package/es/components/classification/style/index.css +1 -1
  61. package/es/components/default-page/src/constants/index.js +1 -1
  62. package/es/components/default-page/src/index.vue2.js +1 -1
  63. package/es/components/expand-field/src/components/FormBatchOptionsModal.vue2.js +1 -1
  64. package/es/components/expand-field/src/components/FormItemPerson.vue2.js +1 -1
  65. package/es/components/expand-field/src/components/PersonModal.vue2.js +1 -1
  66. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  67. package/es/components/expand-field/src/index.vue2.js +1 -1
  68. package/es/components/expand-field/src/utils/constant.js +1 -1
  69. package/es/components/fabric-chart/index.d.ts +23 -4
  70. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +23 -4
  71. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  72. package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
  73. package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +13 -0
  74. package/es/components/fabric-chart/src/components/PopupTip.vue2.js +1 -1
  75. package/es/components/fabric-chart/src/components/useStyle.js +1 -1
  76. package/es/components/fabric-chart/src/constants/index.d.ts +1 -1
  77. package/es/components/fabric-chart/src/constants/index.js +1 -1
  78. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  79. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.d.ts +1 -0
  80. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
  81. package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +1 -1
  82. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  83. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +1 -0
  84. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  85. package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
  86. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +1 -1
  87. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +1 -1
  88. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +1 -1
  89. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  90. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  91. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  92. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +1 -0
  93. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  94. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.d.ts +7 -1
  95. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  96. package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -1
  97. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  98. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  99. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  100. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.d.ts +1 -0
  101. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  102. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
  103. package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
  104. package/es/components/fabric-chart/src/interface.d.ts +3 -0
  105. package/es/components/fabric-chart/src/utils/index.d.ts +1 -1
  106. package/es/components/fabric-chart/src/utils/index.js +1 -1
  107. package/es/components/field-set/src/FieldColor.vue.d.ts +3 -3
  108. package/es/components/field-set/src/FieldColor.vue2.js +1 -1
  109. package/es/components/field-set/src/FieldFilter.vue.d.ts +5 -4
  110. package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
  111. package/es/components/field-set/src/FieldSet.vue.d.ts +2 -2
  112. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  113. package/es/components/field-set/src/Index.vue2.js +1 -1
  114. package/es/components/field-set/src/TableStyle.vue2.js +1 -1
  115. package/es/components/field-set/src/components/condition.vue2.js +1 -1
  116. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1 -1
  117. package/es/components/field-set/src/components/edit-dialog.vue2.js +1 -1
  118. package/es/components/field-set/src/components/edit-filter.vue2.js +1 -1
  119. package/es/components/field-set/src/components/table-row.vue.d.ts +2 -2
  120. package/es/components/field-set/src/components/table-row.vue2.js +1 -1
  121. package/es/components/field-set/src/constants/filter.d.ts +21 -12
  122. package/es/components/field-set/src/constants/filter.js +1 -1
  123. package/es/components/field-set/src/constants/index.js +1 -1
  124. package/es/components/field-set/src/types/index.d.ts +1 -1
  125. package/es/components/form-config/index.d.ts +108 -3
  126. package/es/components/form-config/src/FormConfig.vue.d.ts +108 -3
  127. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  128. package/es/components/form-config/src/components/FormConfigEventSetting.vue.js +1 -0
  129. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -0
  130. package/es/components/form-config/src/constants/index.js +1 -1
  131. package/es/components/form-config/src/hooks/useLocale.js +1 -1
  132. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +1 -1
  133. package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -1
  134. package/es/components/form-render/src/components/renderer/combination/tableCombination.js +1 -1
  135. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  136. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
  137. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  138. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  139. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  140. package/es/components/form-render/src/hooks/usePresetScope.d.ts +1 -1
  141. package/es/components/form-render/src/hooks/usePresetScope.js +1 -1
  142. package/es/components/iho-chat/index.d.ts +635 -54
  143. package/es/components/iho-chat/src/Index.vue.d.ts +638 -61
  144. package/es/components/iho-chat/src/Index.vue2.js +1 -1
  145. package/es/components/iho-chat/src/api/index.d.ts +1 -0
  146. package/es/components/iho-chat/src/api/index.js +1 -1
  147. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +32 -1
  148. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  149. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +52 -3
  150. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  151. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +52 -2
  152. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  153. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +221 -11
  154. package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
  155. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +82 -6
  156. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  157. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +19 -1
  158. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
  159. package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +49 -10
  160. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
  161. package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +71 -4
  162. package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
  163. package/es/components/iho-chat/src/components/ContextMenu.d.ts +11 -2
  164. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  165. package/es/components/iho-chat/src/components/MessageTemplate.vue.d.ts +1 -1
  166. package/es/components/iho-chat/src/components/MessageTemplate.vue2.js +1 -1
  167. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +51 -2
  168. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
  169. package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +19 -1
  170. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  171. package/es/components/iho-chat/src/components/SiderList.vue.d.ts +69 -1
  172. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  173. package/es/components/iho-chat/src/components/Video.vue.d.ts +19 -1
  174. package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
  175. package/es/components/iho-chat/src/constants/index.d.ts +12 -3
  176. package/es/components/iho-chat/src/constants/index.js +1 -1
  177. package/es/components/iho-chat/src/hooks/index.d.ts +2 -2
  178. package/es/components/iho-chat/src/hooks/index.js +1 -1
  179. package/es/components/iho-chat/src/hooks/useData.d.ts +94 -0
  180. package/es/components/iho-chat/src/hooks/useData.js +1 -0
  181. package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
  182. package/es/components/iho-chat/src/hooks/useVideo.d.ts +19 -1
  183. package/es/components/iho-chat/src/hooks/useVideo.js +1 -1
  184. package/es/components/iho-chat/src/hooks/useWebSocket.d.ts +3 -0
  185. package/es/components/iho-chat/src/hooks/useWebSocket.js +1 -0
  186. package/es/components/iho-chat/src/types/index.d.ts +0 -6
  187. package/es/components/iho-chat/src/types/index.js +1 -1
  188. package/es/components/iho-chat/src/utils/chatSock.js +1 -1
  189. package/es/components/iho-chat/src/utils/index.d.ts +2 -0
  190. package/es/components/iho-chat/src/utils/index.js +1 -1
  191. package/es/components/iho-chat/style/index.css +1 -1
  192. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
  193. package/es/components/iho-table/src/plugins/dynamicFilterRenderPlugin/dynamicFilter.vue2.js +1 -1
  194. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  195. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  196. package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue2.js +1 -1
  197. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
  198. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  199. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  200. package/es/components/iho-table/src/utils/index.js +1 -1
  201. package/es/components/index.css +1 -1
  202. package/es/components/index.d.ts +2 -1
  203. package/es/components/index.js +1 -1
  204. package/es/components/info-header/src/components/patientInfo/index.vue2.js +1 -1
  205. package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
  206. package/es/components/keyboard/src/components/NumberPanel.vue2.js +1 -1
  207. package/es/components/map/src/Map.vue2.js +1 -1
  208. package/es/components/picture-clipper/src/PictureClipper.vue2.js +1 -1
  209. package/es/components/quick-search/index.d.ts +3 -1
  210. package/es/components/quick-search/src/index.vue.d.ts +3 -1
  211. package/es/components/quick-search/src/index.vue2.js +1 -1
  212. package/es/components/quick-search/style/index.css +1 -1
  213. package/es/components/recommend-search/src/components/BaseSearch.js +1 -1
  214. package/es/components/recommend-search/src/components/RecommendInput.vue2.js +1 -1
  215. package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +1 -1
  216. package/es/components/scale-view/index.d.ts +31 -0
  217. package/es/components/scale-view/src/ScaleView.vue.d.ts +13 -0
  218. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  219. package/es/components/scale-view/src/components/NoData.vue2.js +1 -1
  220. package/es/components/scale-view/src/components/composables/choose-common.js +1 -1
  221. package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -1
  222. package/es/components/scale-view/src/components/formitem/r-checkbox.d.ts +9 -0
  223. package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
  224. package/es/components/scale-view/src/components/formitem/r-input.d.ts +9 -0
  225. package/es/components/scale-view/src/components/formitem/r-input.js +1 -1
  226. package/es/components/scale-view/src/components/formitem/r-map.js +1 -1
  227. package/es/components/scale-view/src/components/formitem/r-radio.d.ts +9 -0
  228. package/es/components/scale-view/src/components/formitem/r-radio.js +1 -1
  229. package/es/components/scale-view/src/components/formitem/r-select.js +1 -1
  230. package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
  231. package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
  232. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  233. package/es/components/scale-view/src/hooks/scaleview-methods.js +1 -1
  234. package/es/components/scale-view/src/hooks/scaleview-props.d.ts +4 -0
  235. package/es/components/scale-view/src/hooks/scaleview-props.js +1 -1
  236. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
  237. package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -1
  238. package/es/components/scale-view/src/hooks/use-component.d.ts +72 -0
  239. package/es/components/scale-view/style/index.css +1 -1
  240. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  241. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  242. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  243. package/es/components/select-label/src/components/label-classify.vue2.js +1 -1
  244. package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +1 -1
  245. package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -1
  246. package/es/components/select-label/src/ihoLabel/iho-label-classify.vue2.js +1 -1
  247. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  248. package/es/components/select-person/src/SelectPersonType.vue2.js +1 -1
  249. package/es/components/select-person/src/components/SearchOrgAndStaff.vue2.js +1 -1
  250. package/es/components/select-person/src/index.vue2.js +1 -1
  251. package/es/components/slider-tree/src/index.vue2.js +1 -1
  252. package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
  253. package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +1 -1
  254. package/es/components/table-export-field/src/index.vue2.js +1 -1
  255. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue2.js +1 -1
  256. package/es/components/table-filter/src/components/bi-filter/helpers/options.js +1 -1
  257. package/es/components/table-filter/src/components/bi-filter/index.vue2.js +1 -1
  258. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -1
  259. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
  260. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
  261. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +1 -1
  262. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue2.js +1 -1
  263. package/es/components/table-filter/src/components/classify-filter/helpers/options.js +1 -1
  264. package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +1 -1
  265. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
  266. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +1 -1
  267. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +1 -1
  268. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -1
  269. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +1 -1
  270. package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue2.js +1 -1
  271. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue2.js +1 -1
  272. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +1 -1
  273. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +1 -1
  274. package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +1 -1
  275. package/es/components/table-filter/src/components/render-widget/helpers/selectExtraMap.js +1 -1
  276. package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +3 -1
  277. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  278. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  279. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  280. package/es/components/tooth-bitmap/src/ToothBitmap.vue2.js +1 -1
  281. package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +1 -1
  282. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +1 -1
  283. package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -1
  284. package/es/shared/package.json.js +1 -1
  285. package/package.json +2 -2
  286. package/es/components/iho-chat/src/hooks/useSession.d.ts +0 -12
  287. package/es/components/iho-chat/src/hooks/useSession.js +0 -1
  288. package/es/components/iho-chat/src/hooks/useState.d.ts +0 -18
  289. package/es/components/iho-chat/src/hooks/useState.js +0 -1
@@ -0,0 +1,151 @@
1
+ import { widthAppend } from '../../../../shared/utils';
2
+ import { PropType } from 'vue';
3
+ import { StepNotice } from '../../../../components/step-notice/src/types';
4
+ import { parseRender, parseTitle } from '../../../../components/step-notice/src/utils';
5
+ declare const _default: import("vue").DefineComponent<{
6
+ item: {
7
+ type: PropType<StepNotice.InternalItem>;
8
+ required: true;
9
+ };
10
+ }, {
11
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
12
+ item: {
13
+ type: PropType<StepNotice.InternalItem>;
14
+ required: true;
15
+ };
16
+ }>> & {}>>;
17
+ itemRef: import("vue").Ref<StepNotice.InternalItem>;
18
+ classList: import("vue").ComputedRef<string[]>;
19
+ frontStyle: import("vue").ComputedRef<{
20
+ minHeight: string;
21
+ }>;
22
+ popperDisabled: import("vue").ComputedRef<boolean>;
23
+ renderIcon: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
24
+ [key: string]: any;
25
+ }> | import("../../../../shared/types").AnyFn | null;
26
+ NoticeConnection: import("vue").DefineComponent<{
27
+ item: {
28
+ type: PropType<StepNotice.InternalItem>;
29
+ required: true;
30
+ };
31
+ }, {
32
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
33
+ item: {
34
+ type: PropType<StepNotice.InternalItem>;
35
+ required: true;
36
+ };
37
+ }>> & {}>>;
38
+ itemRef: import("vue").Ref<StepNotice.InternalItem>;
39
+ pointStyle: import("vue").ComputedRef<{
40
+ opacity: number;
41
+ }>;
42
+ verticalLineHeight: import("vue").Ref<number>;
43
+ horizonLineWidth: import("vue").Ref<number>;
44
+ subHorizonWidth: import("vue").Ref<number>;
45
+ wrapperRef: import("vue").Ref<HTMLElement | undefined>;
46
+ calculatePositionRect: () => void;
47
+ lineStyles: import("vue").ComputedRef<{
48
+ width: string;
49
+ height: string;
50
+ }>;
51
+ iconStyle: import("vue").ComputedRef<{
52
+ top: string;
53
+ }>;
54
+ widthAppend: typeof widthAppend;
55
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
56
+ item: {
57
+ type: PropType<StepNotice.InternalItem>;
58
+ required: true;
59
+ };
60
+ }>>, {}>;
61
+ NoticeItemAside: import("vue").DefineComponent<{
62
+ item: {
63
+ type: PropType<StepNotice.InternalItem>;
64
+ required: true;
65
+ };
66
+ }, {
67
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
68
+ item: {
69
+ type: PropType<StepNotice.InternalItem>;
70
+ required: true;
71
+ };
72
+ }>> & {}>>;
73
+ getPositionInList: (index: number) => "center" | "first" | "last";
74
+ placementMap: {
75
+ first: string;
76
+ center: string;
77
+ last: string;
78
+ };
79
+ getPlacement: (index: number) => string;
80
+ getAsideClassList: (noticeItem: Partial<{
81
+ header: string | import("../../../../shared/types").AnyFn;
82
+ content: string | import("../../../../shared/types").AnyFn;
83
+ subContent: string | import("../../../../shared/types").AnyFn;
84
+ }>, index: number) => (string | {
85
+ 'is-active': string | import("../../../../shared/types").AnyFn | undefined;
86
+ })[];
87
+ theme: import("vue").ComputedRef<import("../../../../shared/types").AnyObject>;
88
+ NPopover: any;
89
+ parseRender: typeof parseRender;
90
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
91
+ item: {
92
+ type: PropType<StepNotice.InternalItem>;
93
+ required: true;
94
+ };
95
+ }>>, {}>;
96
+ NoticeOperationList: import("vue").DefineComponent<{
97
+ operationList: {
98
+ type: PropType<Partial<Partial<{
99
+ header: string | import("../../../../shared/types").AnyFn;
100
+ content: string | import("../../../../shared/types").AnyFn;
101
+ subContent: string | import("../../../../shared/types").AnyFn;
102
+ }> & {
103
+ type: "warning" | "primary";
104
+ subHeader: string | import("../../../../shared/types").AnyFn;
105
+ remark: string | import("../../../../shared/types").AnyFn;
106
+ }>[] | undefined>;
107
+ required: true;
108
+ };
109
+ }, {
110
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
111
+ operationList: {
112
+ type: PropType<Partial<Partial<{
113
+ header: string | import("../../../../shared/types").AnyFn;
114
+ content: string | import("../../../../shared/types").AnyFn;
115
+ subContent: string | import("../../../../shared/types").AnyFn;
116
+ }> & {
117
+ type: "warning" | "primary";
118
+ subHeader: string | import("../../../../shared/types").AnyFn;
119
+ remark: string | import("../../../../shared/types").AnyFn;
120
+ }>[] | undefined>;
121
+ required: true;
122
+ };
123
+ }>> & {}>>;
124
+ theme: import("vue").ComputedRef<import("../../../../shared/types").AnyObject>;
125
+ CheckmarkCircle: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
126
+ CloseCircle: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
127
+ parseRender: typeof parseRender;
128
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
129
+ operationList: {
130
+ type: PropType<Partial<Partial<{
131
+ header: string | import("../../../../shared/types").AnyFn;
132
+ content: string | import("../../../../shared/types").AnyFn;
133
+ subContent: string | import("../../../../shared/types").AnyFn;
134
+ }> & {
135
+ type: "warning" | "primary";
136
+ subHeader: string | import("../../../../shared/types").AnyFn;
137
+ remark: string | import("../../../../shared/types").AnyFn;
138
+ }>[] | undefined>;
139
+ required: true;
140
+ };
141
+ }>>, {}>;
142
+ NPopover: any;
143
+ parseRender: typeof parseRender;
144
+ parseTitle: typeof parseTitle;
145
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
146
+ item: {
147
+ type: PropType<StepNotice.InternalItem>;
148
+ required: true;
149
+ };
150
+ }>>, {}>;
151
+ export default _default;
@@ -0,0 +1,35 @@
1
+ import { PropType } from 'vue';
2
+ import { StepNotice } from '../../../../components/step-notice';
3
+ import { parseRender } from '../../../../components/step-notice/src/utils';
4
+ declare const _default: import("vue").DefineComponent<{
5
+ item: {
6
+ type: PropType<StepNotice.InternalItem>;
7
+ required: true;
8
+ };
9
+ }, {
10
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
11
+ item: {
12
+ type: PropType<StepNotice.InternalItem>;
13
+ required: true;
14
+ };
15
+ }>> & {}>>;
16
+ getPositionInList: (index: number) => "center" | "first" | "last";
17
+ placementMap: {
18
+ first: string;
19
+ center: string;
20
+ last: string;
21
+ };
22
+ getPlacement: (index: number) => string;
23
+ getAsideClassList: (noticeItem: StepNotice.NoticeItem, index: number) => (string | {
24
+ 'is-active': string | import("../../../../shared/types").AnyFn | undefined;
25
+ })[];
26
+ theme: import("vue").ComputedRef<import("../../../../shared/types").AnyObject>;
27
+ NPopover: any;
28
+ parseRender: typeof parseRender;
29
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
30
+ item: {
31
+ type: PropType<StepNotice.InternalItem>;
32
+ required: true;
33
+ };
34
+ }>>, {}>;
35
+ export default _default;
@@ -0,0 +1,49 @@
1
+ import { PropType } from 'vue';
2
+ import { parseRender } from '../../../../components/step-notice/src/utils';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ operationList: {
5
+ type: PropType<Partial<Partial<{
6
+ header: string | import("../../../../shared/types").AnyFn;
7
+ content: string | import("../../../../shared/types").AnyFn;
8
+ subContent: string | import("../../../../shared/types").AnyFn;
9
+ }> & {
10
+ type: "warning" | "primary";
11
+ subHeader: string | import("../../../../shared/types").AnyFn;
12
+ remark: string | import("../../../../shared/types").AnyFn;
13
+ }>[] | undefined>;
14
+ required: true;
15
+ };
16
+ }, {
17
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
18
+ operationList: {
19
+ type: PropType<Partial<Partial<{
20
+ header: string | import("../../../../shared/types").AnyFn;
21
+ content: string | import("../../../../shared/types").AnyFn;
22
+ subContent: string | import("../../../../shared/types").AnyFn;
23
+ }> & {
24
+ type: "warning" | "primary";
25
+ subHeader: string | import("../../../../shared/types").AnyFn;
26
+ remark: string | import("../../../../shared/types").AnyFn;
27
+ }>[] | undefined>;
28
+ required: true;
29
+ };
30
+ }>> & {}>>;
31
+ theme: import("vue").ComputedRef<import("../../../../shared/types").AnyObject>;
32
+ CheckmarkCircle: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
33
+ CloseCircle: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
34
+ parseRender: typeof parseRender;
35
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
36
+ operationList: {
37
+ type: PropType<Partial<Partial<{
38
+ header: string | import("../../../../shared/types").AnyFn;
39
+ content: string | import("../../../../shared/types").AnyFn;
40
+ subContent: string | import("../../../../shared/types").AnyFn;
41
+ }> & {
42
+ type: "warning" | "primary";
43
+ subHeader: string | import("../../../../shared/types").AnyFn;
44
+ remark: string | import("../../../../shared/types").AnyFn;
45
+ }>[] | undefined>;
46
+ required: true;
47
+ };
48
+ }>>, {}>;
49
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import { BranchNotice } from '../../../components/branch-notice';
2
+ export declare function lineToNextCard(card1: BranchNotice.PositionedItem, card2: BranchNotice.PositionedItem, content?: string): BranchNotice.PositionedItem[];
@@ -0,0 +1 @@
1
+ import{widthAppend as t}from"../../../shared/utils/index.js";import{BRANCH_NOTICE_CONSTANTS as e}from"./canstants.js";function _(_,x,c=""){const i=_.x<x.x?"left":_.x>x.x?"right":"center",n=_.y<x.y?"top":_.y>x.y?"bottom":"center";let D=[];switch(!0){case"center"===i&&"center"===n:D=[{x:0,y:0,class:"branch-notice__line"}];break;case"left"===i&&"center"===n:D=[{x:0,y:0,class:"branch-notice__line",style:{width:`${e.CARD_SPACE}px`,height:t(e.LINE_WIDTH),left:`${_.x+e.CARD_WIDTH}px`,top:`${_.y+e.CARD_HEIGHT/2}px`}}];break;case"center"===i&&"top"===n:D=[{x:0,y:0,class:"branch-notice__line",style:{width:t(e.LINE_WIDTH),height:`${e.CARD_SPACE}px`,left:`${_.x+e.CARD_WIDTH/2}px`,top:`${_.y+e.CARD_HEIGHT}px`}}];break;case"right"===i&&"top"===n:D=[{x:0,y:0,class:"branch-notice__line",style:{width:t(e.LINE_WIDTH),height:e.CARD_SPACE/2+"px",left:`${_.x+e.CARD_WIDTH/2}px`,top:`${_.y+e.CARD_HEIGHT}px`}},{x:0,y:0,class:"branch-notice__line",style:{width:`${_.x-x.x+e.LINE_WIDTH}px`,height:t(e.LINE_WIDTH),left:`${x.x+e.CARD_WIDTH/2}px`,top:`${_.y+e.CARD_HEIGHT+e.CARD_SPACE/2}px`}},{x:0,y:0,class:"branch-notice__line",style:{width:t(e.LINE_WIDTH),height:e.CARD_SPACE/2+"px",left:`${x.x+e.CARD_WIDTH/2}px`,top:`${_.y+e.CARD_HEIGHT+e.CARD_SPACE/2}px`}}];break;case"right"===i&&"center"===n:D=[{x:0,y:0,class:"branch-notice__line",style:{width:`${e.CARD_SPACE}px`,height:t(e.LINE_WIDTH),left:`${_.x}px`,top:`${_.y+e.CARD_HEIGHT/2}px`}}];break;case"right"===i&&"bottom"===n:D=[{x:0,y:0,class:"branch-notice__line",style:{width:t(e.LINE_WIDTH),height:e.CARD_SPACE/2+"px",left:`${_.x+e.CARD_WIDTH/2}px`,top:`${_.y}px`}},{x:0,y:0,class:"branch-notice__line",style:{width:_.x-x.x+"px",height:t(e.LINE_WIDTH),left:`${x.x+e.CARD_WIDTH/2}px`,top:_.y-e.CARD_SPACE/2+"px"}},{x:0,y:0,class:"branch-notice__line",style:{width:t(e.LINE_WIDTH),height:e.CARD_SPACE/2+"px",left:`${x.x+e.CARD_WIDTH/2}px`,top:_.y-e.CARD_SPACE/2+"px"}}];break;case"center"===i&&"bottom"===n:D=[{x:0,y:0,class:"branch-notice__line",style:{width:t(e.LINE_WIDTH),height:`${e.CARD_SPACE}px`,left:`${_.x+e.CARD_WIDTH/2}px`,top:`${_.y}px`}}];break;case"left"===i&&"top"===n:D=[{x:0,y:0,class:"branch-notice__line",style:{width:e.CARD_SPACE/2+"px",height:t(e.LINE_WIDTH),left:`${_.x+e.CARD_WIDTH}px`,top:`${_.y+e.CARD_HEIGHT/2}px`}},{x:0,y:0,class:"branch-notice__line",style:{width:t(e.LINE_WIDTH),height:x.y-_.y+"px",left:`${_.x+e.CARD_WIDTH+e.CARD_SPACE/2}px`,top:`${_.y+e.CARD_HEIGHT/2}px`}},{x:0,y:0,class:"branch-notice__line",style:{width:e.CARD_SPACE/2+"px",height:t(e.LINE_WIDTH),left:`${_.x+e.CARD_WIDTH+e.CARD_SPACE/2}px`,top:`${x.y+e.CARD_HEIGHT/2}px`}},{x:0,y:0,item:{content:c},class:"branch-notice__branchIndex",style:{}}]}return D}export{_ as lineToNextCard};
@@ -0,0 +1,14 @@
1
+ export declare namespace BranchNotice {
2
+ type Item = {
3
+ type?: 'normal' | 'primary' | 'warning';
4
+ content: string | string[];
5
+ children?: Item[][];
6
+ };
7
+ type PositionedItem = {
8
+ item?: Item;
9
+ class?: string | string[] | Record<string, boolean>;
10
+ style?: Record<string, string>;
11
+ x: number;
12
+ y: number;
13
+ };
14
+ }
@@ -0,0 +1 @@
1
+ .branch-notice__item{border-radius:8px;color:#333;font-size:12px;font-weight:500;height:70px;padding:4px 8px;position:absolute;width:110px}.branch-notice__itemContent{line-height:17px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.branch-notice__item--primary{background:#238cff;color:#fff}.branch-notice__item--warning{background:#ffcbcb;border:1.4px solid red;color:#000}.branch-notice__item--normal{background:#e6e6e6}.branch-notice__line{background:#bfc6ca;position:absolute}
@@ -335,6 +335,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
335
335
  outerPrintKeys: never[];
336
336
  defaultFormatId: string;
337
337
  shortcut: {};
338
+ buttonProps: {};
338
339
  };
339
340
  };
340
341
  svrUpdateIp: {
@@ -452,6 +453,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
452
453
  outerPrintKeys: never[];
453
454
  defaultFormatId: string;
454
455
  shortcut: {};
456
+ buttonProps: {};
455
457
  };
456
458
  };
457
459
  svrUpdateIp: {
@@ -479,6 +481,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
479
481
  defaultPrintFormatId: import("vue").ComputedRef<any>;
480
482
  isPrintAllType: import("vue").ComputedRef<any>;
481
483
  shortcutSettings: import("vue").ComputedRef<any>;
484
+ buttonProps: import("vue").ComputedRef<any>;
482
485
  printAllShortcut: import("vue").ComputedRef<any>;
483
486
  showSettingItems: import("vue").ComputedRef<import("../../shared/types").AnyObject[]>;
484
487
  isSelectedAll: import("vue").WritableComputedRef<boolean>;
@@ -821,6 +824,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
821
824
  outerPrintKeys: never[];
822
825
  defaultFormatId: string;
823
826
  shortcut: {};
827
+ buttonProps: {};
824
828
  };
825
829
  };
826
830
  svrUpdateIp: {
@@ -341,6 +341,7 @@ declare const _default: import("vue").DefineComponent<{
341
341
  outerPrintKeys: never[];
342
342
  defaultFormatId: string;
343
343
  shortcut: {};
344
+ buttonProps: {};
344
345
  };
345
346
  };
346
347
  svrUpdateIp: {
@@ -458,6 +459,7 @@ declare const _default: import("vue").DefineComponent<{
458
459
  outerPrintKeys: never[];
459
460
  defaultFormatId: string;
460
461
  shortcut: {};
462
+ buttonProps: {};
461
463
  };
462
464
  };
463
465
  svrUpdateIp: {
@@ -485,6 +487,7 @@ declare const _default: import("vue").DefineComponent<{
485
487
  defaultPrintFormatId: import("vue").ComputedRef<any>;
486
488
  isPrintAllType: import("vue").ComputedRef<any>;
487
489
  shortcutSettings: import("vue").ComputedRef<any>;
490
+ buttonProps: import("vue").ComputedRef<any>;
488
491
  printAllShortcut: import("vue").ComputedRef<any>;
489
492
  showSettingItems: import("vue").ComputedRef<AnyObject[]>;
490
493
  isSelectedAll: import("vue").WritableComputedRef<boolean>;
@@ -827,6 +830,7 @@ declare const _default: import("vue").DefineComponent<{
827
830
  outerPrintKeys: never[];
828
831
  defaultFormatId: string;
829
832
  shortcut: {};
833
+ buttonProps: {};
830
834
  };
831
835
  };
832
836
  svrUpdateIp: {
@@ -1 +1 @@
1
- import{defineComponent as t,useAttrs as e,ref as r,computed as n,provide as o,openBlock as i,createBlock as p,resolveDynamicComponent as a,unref as u,mergeProps as s,withCtx as l,createCommentVNode as d,renderSlot as y,normalizeProps as f,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},printCustomProps:{type:Object,default:()=>({})},resolution:{type:Number},placement:{type:String,default:"bottom-start"},newPrintSetting:{type:Object,default:()=>({})},svrUpdateIp:{type:String}},emits:["success","error","cancel","clickoutside","saveOuterPrint"],setup(t,{expose:v,emit:S}){const b=t,x=e(),j=r(),F=n((()=>{var t;return(null==(t=Object.keys(b.newPrintSetting))?void 0:t.length)>0?g:P})),O=n((()=>Object.assign({},b,x)));o(c,(function(t,...e){S(t,...e)}));return v({directPrint:async()=>{var t;null==(t=j.value)||t.directPrint()}}),(t,e)=>(i(),p(a(u(F)),s({ref_key:"printComponentRef",ref:j},u(O)),{button:l((e=>[d(" 自定义按钮样式 "),y(t.$slots,"button",f(m(e)))])),_:3},16))}});export{v as default};
1
+ import{defineComponent as t,useAttrs as e,ref as n,computed as r,provide as o,openBlock as i,createBlock as a,resolveDynamicComponent as l,unref as u,mergeProps as d,withCtx as p,createCommentVNode as s,renderSlot as y,normalizeProps as g,guardReactiveProps as f}from"vue";import{InjectionButtonPrintEmits as c}from"./constants/index.js";import m from"./components/NewPrintComponent.vue.js";import w from"./components/OldPrintComponent.vue.js";var v,P,S,b,C,B,x=t({__name:"ButtonPrint",props:{printParams:{type:Array},params:{default:()=>[],type:Array},btnText:{default:(null==(v=window.getLanguageByCode)?void 0:v.call(window,"10010.1.478"))||"打印",type:String},printText:{default:(null==(P=window.getLanguageByCode)?void 0:P.call(window,"10010.1.479"))||"直接打印",type:String},previewText:{default:(null==(S=window.getLanguageByCode)?void 0:S.call(window,"10010.1.480"))||"打印预览",type:String},pdfLoadText:{default:(null==(b=window.getLanguageByCode)?void 0:b.call(window,"10010.1.481"))||"下载pdf",type:String},formatEditText:{default:(null==(C=window.getLanguageByCode)?void 0:C.call(window,"10010.1.482"))||"格式编辑",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:(null==(B=window.getLanguageByCode)?void 0:B.call(window,"10010.1.483"))||"请选中需要打印的数据",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},printCustomProps:{type:Object,default:()=>({})},resolution:{type:Number},placement:{type:String,default:"bottom-start"},newPrintSetting:{type:Object,default:()=>({})},svrUpdateIp:{type:String}},emits:["success","error","cancel","clickoutside","saveOuterPrint"],setup(t,{expose:v,emit:P}){const S=t,b=e(),C=n(),B=r((()=>{var t;return(null==(t=Object.keys(S.newPrintSetting))?void 0:t.length)>0?m:w})),x=r((()=>Object.assign({},S,b)));o(c,(function(t,...e){P(t,...e)}));return v({directPrint:async()=>{var t;null==(t=C.value)||t.directPrint()}}),(t,e)=>(i(),a(l(u(B)),d({ref_key:"printComponentRef",ref:C},u(x)),{button:p((e=>[s(" 自定义按钮样式 "),y(t.$slots,"button",g(f(e)))])),_:3},16))}});export{x as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,openBlock as o,createBlock as l,unref as n,withCtx as r,createVNode as i,createElementVNode as a,createTextVNode as s}from"vue";import{useMessage as u,NForm as p,NFormItem as d,NSpace as f,NUpload as m,NUploadDragger as c,NIcon as v,NText as h,NP as w}from"naive-ui";import{Archive as $}from"@vicons/ionicons5";import g from"axios";const x={style:{"margin-bottom":"12px"}};var S=e({__name:"EditFormat",props:{formatId:null,token:null},setup(e,{expose:S}){const _=e,C=`${window.location.protocol}//${window.location.host}/bi-api`,E=`${C}/reprot/print/open/client/saveIReportFormat`,y=`${C}/reprot/print/open/client/getIReportFiles`,I=`${C}/reprot/print/open/client/delIReportFiles`,b=g.create({}),j=u(),z=t([]);var F;function R(e){return new Promise(((t,o)=>{var l;b.get(`${I}?formatId=${null==(l=_.formatId)?void 0:l.split("_")[1]}&authorizationKey=${_.token}&fileName=${e.file.name}`).then((({data:e})=>{"SUCCESS"!==(null==e?void 0:e.result)?(j.error((null==e?void 0:e.resultMsg)||"删除文件失败,请重试!"),o()):(j.success("删除文件成功!"),t("SUCCESS"))}))}))}return b.get(`${y}?formatId=${null==(F=_.formatId)?void 0:F.split("_")[1]}&authorizationKey=${_.token}`).then((({data:e})=>{(e.list||[]).forEach((e=>{z.value.push({id:Date.now().toString(),name:e,status:"finished"})}))})),S({submit:function(e){return new Promise(((t,o)=>{if(!function(){if(z.value.length<2)return!1;let e=!1,t=!1;const o=/\.([^.]+)$/;return z.value.forEach((l=>{var n;const r=(null==(n=l.file)?void 0:n.name)||l.name||"",i=o.exec(r)?RegExp.$1.toLowerCase():"";i&&".jrxml".includes(i)&&(e=!0),i&&".jasper".includes(i)&&(t=!0)})),!(!e||!t)}())return void j.warning("请至少上传一个jrxml文件和一个jasper文件!");if(0===z.value.filter((e=>e.file)).length)return void j.warning("本次无新文件增加,请先添加新文件!");const l=new FormData;Object.keys(e).forEach((t=>{l.append(t,e[t])})),z.value.forEach((e=>{e.file&&l.append("files",e.file)})),b.post(E,l,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then((({data:e})=>{"SUCCESS"!==(null==e?void 0:e.result)?(j.error((null==e?void 0:e.resultMsg)||"上传文件失败,请重试!"),o()):t("SUCCESS")}))}))}}),(e,t)=>(o(),l(n(p),{"label-placement":"left","label-width":75},{default:r((()=>[i(n(d),{label:"格式文件:",path:"file"},{default:r((()=>[i(n(f),{vertical:""},{default:r((()=>[i(n(m),{multiple:"","directory-dnd":"","file-list":z.value,"onUpdate:file-list":t[0]||(t[0]=e=>z.value=e),onRemove:R},{default:r((()=>[i(n(c),null,{default:r((()=>[a("div",x,[i(n(v),{size:"36",depth:3,component:n($)},null,8,["component"])]),i(n(h),{style:{"font-size":"12px"}},{default:r((()=>[s("点击或者拖动文件到该区域来上传")])),_:1}),i(n(w),{depth:"3",style:{margin:"5px 0 0 0","font-size":"13px"}},{default:r((()=>[s("至少包含一个jxml文件和一个jasper文件")])),_:1})])),_:1})])),_:1},8,["file-list"])])),_:1})])),_:1})])),_:1}))}});export{S as default};
1
+ import{defineComponent as e,ref as t,openBlock as o,createBlock as n,unref as l,withCtx as r,createVNode as i,createElementVNode as a,createTextVNode as u}from"vue";import{useMessage as d,NForm as s,NFormItem as p,NSpace as f,NUpload as m,NUploadDragger as c,NIcon as v,NText as w,NP as g}from"naive-ui";import{Archive as h}from"@vicons/ionicons5";import $ from"axios";const x={style:{"margin-bottom":"12px"}};var S=e({__name:"EditFormat",props:{formatId:null,token:null},setup(e,{expose:S}){const C=e,_=`${window.location.protocol}//${window.location.host}/bi-api`,y=`${_}/reprot/print/open/client/saveIReportFormat`,E=`${_}/reprot/print/open/client/getIReportFiles`,I=`${_}/reprot/print/open/client/delIReportFiles`,b=$.create({}),j=d(),z=t([]);var F;function R(e){return new Promise(((t,o)=>{var n;b.get(`${I}?formatId=${null==(n=C.formatId)?void 0:n.split("_")[1]}&authorizationKey=${C.token}&fileName=${e.file.name}`).then((({data:e})=>{"SUCCESS"!==(null==e?void 0:e.result)?(j.error((null==e?void 0:e.resultMsg)||"删除文件失败,请重试!"),o()):(j.success("删除文件成功!"),t("SUCCESS"))}))}))}return b.get(`${E}?formatId=${null==(F=C.formatId)?void 0:F.split("_")[1]}&authorizationKey=${C.token}`).then((({data:e})=>{(e.list||[]).forEach((e=>{z.value.push({id:Date.now().toString(),name:e,status:"finished"})}))})),S({submit:function(e){return new Promise(((t,o)=>{if(!function(){if(z.value.length<2)return!1;let e=!1,t=!1;const o=/\.([^.]+)$/;return z.value.forEach((n=>{var l;const r=(null==(l=n.file)?void 0:l.name)||n.name||"",i=o.exec(r)?RegExp.$1.toLowerCase():"";i&&".jrxml".includes(i)&&(e=!0),i&&".jasper".includes(i)&&(t=!0)})),!(!e||!t)}())return void j.warning("请至少上传一个jrxml文件和一个jasper文件!");if(0===z.value.filter((e=>e.file)).length)return void j.warning("本次无新文件增加,请先添加新文件!");const n=new FormData;Object.keys(e).forEach((t=>{n.append(t,e[t])})),z.value.forEach((e=>{e.file&&n.append("files",e.file)})),b.post(y,n,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then((({data:e})=>{"SUCCESS"!==(null==e?void 0:e.result)?(j.error((null==e?void 0:e.resultMsg)||"上传文件失败,请重试!"),o()):t("SUCCESS")}))}))}}),(e,t)=>(o(),n(l(s),{"label-placement":"left","label-width":75},{default:r((()=>[i(l(p),{label:"格式文件:",path:"file"},{default:r((()=>[i(l(f),{vertical:""},{default:r((()=>[i(l(m),{multiple:"","directory-dnd":"","file-list":z.value,"onUpdate:file-list":t[0]||(t[0]=e=>z.value=e),onRemove:R},{default:r((()=>[i(l(c),null,{default:r((()=>[a("div",x,[i(l(v),{size:"36",depth:3,component:l(h)},null,8,["component"])]),i(l(w),{style:{"font-size":"12px"}},{default:r((()=>{var e;return[u((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.461"))||"点击或者拖动文件到该区域来上传")]})),_:1}),i(l(g),{depth:"3",style:{margin:"5px 0 0 0","font-size":"13px"}},{default:r((()=>{var e;return[u((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.462"))||"至少包含一个jxml文件和一个jasper文件")]})),_:1})])),_:1})])),_:1},8,["file-list"])])),_:1})])),_:1})])),_:1}))}});export{S as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,reactive as a,watch as l,openBlock as o,createBlock as u,unref as n,normalizeStyle as r,withCtx as s,createElementVNode as i,mergeProps as d,createVNode as c,withKeys as p,createTextVNode as m}from"vue";import{useMessage as v,NModal as f,NForm as y,NFormItem as w,NInput as g,NButton as h}from"naive-ui";import _ from"./EditFormat.vue.js";const k={class:"content"};var I=e({__name:"IdentityVerification",props:{verifyUser:{type:Function,default:()=>Promise.resolve()},identityVerificationTitle:{default:"打印服务身份校验"},modelValue:{type:Boolean},formatId:null,templateId:null},emits:["update:modelValue","success","close"],setup(e,{emit:I}){const V=e,x=v(),C={account:"",password:""},b=t(null),K=t(!1),U=t("");let S=a({...C});const F={account:{required:!0,message:"请输入账号"},password:{required:!0,message:"请输入密码"}},j="416px",q=t(null),E=()=>{I("update:modelValue",!1),I("close")},N=t(!1),P=()=>{var e;null==(e=q.value)||e.validate((e=>{if(e)return console.log(e),!1;(async()=>{var e;try{N.value=!0;const{data:t={}}=await V.verifyUser(S)||{};if("SUCCESS"!==t.result)return x.error(t.resultMsg||"身份校验失败,请重试!"),!1;I("success",null==(e=t.map)?void 0:e.token)}finally{N.value=!1}})()}))},R=async()=>{var e,t;try{N.value=!0;if(!await(null==(t=b.value)?void 0:t.submit({authorizationKey:U.value,id:null==(e=V.formatId)?void 0:e.split("_")[1],templateId:V.templateId,datasourceName:null,dataSourceId:null})))return!1;I("success",U.value)}finally{N.value=!1}};return l((()=>V.modelValue),(e=>{e||Object.assign(S,C)})),(t,a)=>(o(),u(n(f),{preset:"dialog",title:K.value?"编辑":e.identityVerificationTitle,class:"standard-modal standard-modal-white authentication-modal c-button-print-modal",show:e.modelValue,"close-on-esc":!1,"show-icon":!1,style:r({width:j,overflowY:"auto"}),"positive-text":K.value?"确认":"","negative-text":K.value?"取消":"",onClose:E,onNegativeClick:E,onPositiveClick:R},{default:s((()=>[i("div",k,[K.value?(o(),u(_,d({key:0,ref_key:"editFormRef",ref:b},t.$attrs,{formatId:e.formatId,token:U.value}),null,16,["formatId","token"])):(o(),u(n(y),{key:1,class:"login-form-button-print",ref_key:"formRef",ref:q,model:n(S),rules:F},{default:s((()=>[c(n(w),{path:"account"},{default:s((()=>[c(n(g),{value:n(S).account,"onUpdate:value":a[0]||(a[0]=e=>n(S).account=e),placeholder:"请输入账号",onKeyup:p(P,["enter"])},null,8,["value","onKeyup"])])),_:1}),c(n(w),{path:"password"},{default:s((()=>[c(n(g),{type:"password","input-props":{autocomplete:"on",name:"password"},value:n(S).password,"onUpdate:value":a[1]||(a[1]=e=>n(S).password=e),placeholder:"请输入密码",onKeyup:p(P,["enter"])},null,8,["value","onKeyup"])])),_:1}),c(n(w),null,{default:s((()=>[c(n(h),{loading:N.value,type:"primary",class:"login-form-button",onClick:P},{default:s((()=>[m("登录")])),_:1},8,["loading"])])),_:1})])),_:1},8,["model"]))])])),_:1},8,["title","show","style","positive-text","negative-text"]))}});export{I as default};
1
+ import{defineComponent as e,ref as a,reactive as l,watch as o,openBlock as t,createBlock as n,unref as u,normalizeStyle as i,withCtx as d,createElementVNode as r,mergeProps as s,createVNode as c,withKeys as v,createTextVNode as w}from"vue";import{useMessage as p,NModal as m,NForm as g,NFormItem as f,NInput as y,NButton as C}from"naive-ui";import h from"./EditFormat.vue.js";var _;const k={class:"content"};var B=e({__name:"IdentityVerification",props:{verifyUser:{type:Function,default:()=>Promise.resolve()},identityVerificationTitle:{default:(null==(_=window.getLanguageByCode)?void 0:_.call(window,"10010.1.471"))||"打印服务身份校验"},modelValue:{type:Boolean},formatId:null,templateId:null},emits:["update:modelValue","success","close"],setup(e,{emit:_}){var B,I;const L=e,V=p(),x={account:"",password:""},b=a(null),K=a(!1),U=a("");let S=l({...x});const F={account:{required:!0,message:(null==(B=window.getLanguageByCode)?void 0:B.call(window,"10010.1.468"))||"请输入账号"},password:{required:!0,message:(null==(I=window.getLanguageByCode)?void 0:I.call(window,"10010.1.469"))||"请输入密码"}},j="416px",q=a(null),E=()=>{_("update:modelValue",!1),_("close")},N=a(!1),P=()=>{var e;null==(e=q.value)||e.validate((e=>{if(e)return console.log(e),!1;(async()=>{var e;try{N.value=!0;const{data:a={}}=await L.verifyUser(S)||{};if("SUCCESS"!==a.result)return V.error(a.resultMsg||"身份校验失败,请重试!"),!1;_("success",null==(e=a.map)?void 0:e.token)}finally{N.value=!1}})()}))},R=async()=>{var e,a;try{N.value=!0;if(!await(null==(a=b.value)?void 0:a.submit({authorizationKey:U.value,id:null==(e=L.formatId)?void 0:e.split("_")[1],templateId:L.templateId,datasourceName:null,dataSourceId:null})))return!1;_("success",U.value)}finally{N.value=!1}};return o((()=>L.modelValue),(e=>{e||Object.assign(S,x)})),(a,l)=>{var o,p,_;return t(),n(u(m),{preset:"dialog",title:K.value?(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.284"))||"编辑":e.identityVerificationTitle,class:"standard-modal standard-modal-white authentication-modal c-button-print-modal",show:e.modelValue,"close-on-esc":!1,"show-icon":!1,style:i({width:j,overflowY:"auto"}),"positive-text":K.value?(null==(p=window.getLanguageByCode)?void 0:p.call(window,"10010.1.428"))||"确认":"","negative-text":K.value?(null==(_=window.getLanguageByCode)?void 0:_.call(window,"10010.1.32"))||"取消":"",onClose:E,onNegativeClick:E,onPositiveClick:R},{default:d((()=>[r("div",k,[K.value?(t(),n(h,s({key:0,ref_key:"editFormRef",ref:b},a.$attrs,{formatId:e.formatId,token:U.value}),null,16,["formatId","token"])):(t(),n(u(g),{key:1,class:"login-form-button-print",ref_key:"formRef",ref:q,model:u(S),rules:F},{default:d((()=>[c(u(f),{path:"account"},{default:d((()=>{var e;return[c(u(y),{value:u(S).account,"onUpdate:value":l[0]||(l[0]=e=>u(S).account=e),placeholder:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.468"))||"请输入账号",onKeyup:v(P,["enter"])},null,8,["value","onKeyup"])]})),_:1}),c(u(f),{path:"password"},{default:d((()=>{var e;return[c(u(y),{type:"password","input-props":{autocomplete:"on",name:"password"},value:u(S).password,"onUpdate:value":l[1]||(l[1]=e=>u(S).password=e),placeholder:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.469"))||"请输入密码",onKeyup:v(P,["enter"])},null,8,["value","onKeyup"])]})),_:1}),c(u(f),null,{default:d((()=>[c(u(C),{loading:N.value,type:"primary",class:"login-form-button",onClick:P},{default:d((()=>{var e;return[w((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.470"))||"登录")]})),_:1},8,["loading"])])),_:1})])),_:1},8,["model"]))])])),_:1},8,["title","show","style","positive-text","negative-text"])}}});export{B as default};
@@ -106,6 +106,7 @@ declare const _default: import("vue").DefineComponent<{
106
106
  outerPrintKeys: never[];
107
107
  defaultFormatId: string;
108
108
  shortcut: {};
109
+ buttonProps: {};
109
110
  };
110
111
  };
111
112
  svrUpdateIp: {
@@ -226,6 +227,7 @@ declare const _default: import("vue").DefineComponent<{
226
227
  outerPrintKeys: never[];
227
228
  defaultFormatId: string;
228
229
  shortcut: {};
230
+ buttonProps: {};
229
231
  };
230
232
  };
231
233
  svrUpdateIp: {
@@ -253,6 +255,7 @@ declare const _default: import("vue").DefineComponent<{
253
255
  defaultPrintFormatId: import("vue").ComputedRef<any>;
254
256
  isPrintAllType: import("vue").ComputedRef<any>;
255
257
  shortcutSettings: import("vue").ComputedRef<any>;
258
+ buttonProps: import("vue").ComputedRef<any>;
256
259
  printAllShortcut: import("vue").ComputedRef<any>;
257
260
  showSettingItems: import("vue").ComputedRef<AnyObject[]>;
258
261
  isSelectedAll: import("vue").WritableComputedRef<boolean>;
@@ -598,6 +601,7 @@ declare const _default: import("vue").DefineComponent<{
598
601
  outerPrintKeys: never[];
599
602
  defaultFormatId: string;
600
603
  shortcut: {};
604
+ buttonProps: {};
601
605
  };
602
606
  };
603
607
  svrUpdateIp: {
@@ -1 +1 @@
1
- import{defineComponent as e,inject as t,ref as n,reactive as i,computed as r,onMounted as a,onBeforeUnmount as l,watch as o,openBlock as s,createElementBlock as u,Fragment as c,createElementVNode as d,createCommentVNode as p,createVNode as m,unref as v,withCtx as f,renderList as y,createBlock as g,normalizeClass as h,createTextVNode as k,toDisplayString as b,isRef as P,renderSlot as w,withModifiers as S,mergeProps as I}from"vue";import{isObject as O}from"@vue/shared";import{useMessage as C,NButtonGroup as L,NDropdown as T,NButton as j,NIcon as M,NPopover as x,NCheckbox as E,NDivider as F}from"naive-ui";import{PrintOutline as N,SettingsOutline as _,ChevronDownSharp as D,ArrowForwardOutline as R}from"@vicons/ionicons5";import{InjectionButtonPrintEmits as J}from"../constants/index.js";import{Print as U}from"../utils/print.js";import{isIReport as z}from"../utils/browserPrint.js";import A from"./IdentityVerification.vue.js";import{format as K}from"date-fns";import"../api.js";import"../../../shortcut-provider/index.js";import{encapBrowserLog as V}from"../../../../shared/utils/index.js";import{useShortcuts as B}from"../../../shortcut-provider/src/hooks/useShortcuts.js";const G={class:"newprint-button-outer"},q={key:0,class:"newprint-button-outer__shortcut"},Y=d("span",{class:"label bold"},"外显设置",-1),H={class:"newprint-button-poperOver"},$={class:"print-lite"},Q={class:"label bold"},W={class:"print-li"},X={class:"print-lite"},Z={key:0,class:"newprint-button-outer__shortcut"},ee={class:"newprint-button-poperOver"},te=["onMouseenter","onClick"],ne={class:"label bold"},ie={class:"newprint-button-poperOver"},re={class:"print-lite"},ae={class:"label bold"},le={class:"print-li"},oe={class:"print-lite"},se=["onClick"],ue={key:0,class:"newprint-button-outer__shortcut"},ce={class:"newprint-button-poperOver"},de=["onMouseenter"],pe={class:"print-lite"},me=["onClick"];var ve=e({__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},resolution:{type:Number},newPrintSetting:{type:Object,default:()=>({isShowPrintAll:!0,printAllType:1,isShowOutSetting:!0,customProps:{},outerPrintKeys:[],defaultFormatId:"",shortcut:{}})},svrUpdateIp:{type:String}},setup(e,{expose:ve}){const fe=e,ye=String(navigator.platform).toLowerCase().includes("linux"),ge=[{label:"分割线",key:"divider"},{label:"外显设置",key:"outSetting"}],he=C();let ke;const be=t(J),Pe=n(""),we=i({spinning:!1,visible:!1,formatList:[],templateParams:[],printParams:[],originParams:{},currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null,isClickOuterPrint:!1,curPrintParamList:[],iReportExecuteMode:1}),Se=n({});let Ie=n([]),Oe=n([{label:fe.previewText,key:"previewText"},{label:fe.pdfLoadText,key:"downloadPdf"},{label:fe.formatEditText,key:"formatEditText"},{label:"重置打印机",key:"resetPrinter"}]);const Ce=i({oneMouseType:"",oneClickType:"",twoMouseType:""}),Le=i({oneShow:!1,isOperation:!1,isOutSetting:!1}),Te=n([]),je=n([]),Me=r((()=>{if(!we.currentFormatId)return{};let e=we.currentFormatId;return we.formatList.find((t=>t.id===e))}));r((()=>{var e;return(null==(e=Me.value)?void 0:e.name)||"格式选择"}));const xe=r((()=>{let e=we.formatList.find((e=>e.id===we.currentFormatId));return null==e?void 0:e.templateId})),Ee=r((()=>{let e=we.formatList.find((e=>e.id===we.currentFormatId));return null==e?void 0:e.number})),Fe=r((()=>{var e;return null==(e=fe.newPrintSetting)?void 0:e.isShowPrintAll})),Ne=r((()=>{var e;return null==(e=fe.newPrintSetting)?void 0:e.isShowOutSetting})),_e=r((()=>{var e;return(null==(e=fe.newPrintSetting)?void 0:e.customProps)||{}})),De=r((()=>{var e;return(null==(e=fe.newPrintSetting)?void 0:e.defaultFormatId)||""})),Re=r((()=>{var e;return(null==(e=fe.newPrintSetting)?void 0:e.printAllType)||1})),Je=r((()=>{var e;return(null==(e=fe.newPrintSetting)?void 0:e.shortcut)||{}})),Ue=r((()=>{var e,t;const n=Object.keys(Je.value);if(n.length>0){if(De.value&&n.includes(De.value))return(null==(e=Je.value[De.value])?void 0:e.shortcutLabel)||"";if(n.includes("all"))return(null==(t=Je.value.all)?void 0:t.shortcutLabel)||""}return""})),ze=r((()=>{const e=ge.map((e=>e.key));return Ie.value.filter((t=>!e.includes(t.key)))})),Ae=r({get:()=>ze.value.every((e=>e.selected)),set(e){ze.value.forEach((t=>{t.selected=e}))}}),Ke=async()=>{var e,t;(null==(t=null==(e=fe.newPrintSetting)?void 0:e.outerPrintKeys)?void 0:t.length)||await yt(),Le.oneShow=!0},Ve=async e=>{if(fe.directPrint){if(we.spinning)return;return"button"===e?void(Fe.value?await kt():De.value?async function(e){await yt(!1);const t=Te.value.find((t=>t.key==e));t&&it(t.templateCode,t.templateId,t.key,!1)}(De.value):Ke()):Ke()}return Ke()},Be=(e,t)=>we.printParams[t.templateCode]?z(t.key)&&(ye||2==we.iReportExecuteMode)?e.filter((e=>"formatEditText"!=e.key)):e:[],Ge=(e,t)=>{Ce[e]=t},qe=()=>{Te.value=Ie.value.filter((e=>!e.selected)),je.value=ze.value.filter((e=>e.selected)),He("oneShow"),He("isOutSetting"),be("saveOuterPrint",je.value)},Ye=e=>{Le[e]=!0},He=e=>{Ce.oneClickType="",Le[e]=!1,"isOutSetting"==e&&(Le.isOutSetting=!1)},$e=(e,t)=>{tt(!1);let n={type:t,formatId:we.currentFormatId,templateId:(null==e?void 0:e.templateId)||xe.value,templateCode:(null==e?void 0:e.templateCode)||Ee.value};V({type:"进入成功的回调",info:n},"PRINT-SDK"),be("success",e,n)},Qe=e=>{tt(!1),V({type:"进入失败的回调",res:e},"PRINT-SDK"),be("error",e),O(e)&&"notInstalledApp"===e.type&&he.error(e.message)},We=e=>{tt(!1),be("cancel",e)},Xe=e=>{be("error",{message:"前置条件执行错误",type:e,preExecution:!0})},Ze=()=>JSON.stringify({...fe.token?{token:fe.token}:{}}),et=(e=[],t)=>{var n,i;let r={},a={};if((null==(n=we.templateParams[t].customizeDataset)?void 0:n.length)>0){const t=(null==(i=Object.keys(e[0].datasetData||{}))?void 0:i[0])||"",n=JSON.stringify(e.map((e=>JSON.parse(e.datasetData[t]))));a={datasetData:{}},a.datasetData[t]=n}else Object.keys(e[0]).forEach((t=>{a[t]=[],e.forEach((e=>{a[t].includes(e[t])||a[t].push(e[t])})),a[t]=a[t].join(",")}));return r=Object.assign({},JSON.parse(Ze()),_e.value,a),JSON.stringify(r)},tt=(e,t)=>{if(we.isClickOuterPrint){if(e&&t){const n=je.value.find((e=>e.key==t));return void(n&&(n.isLoading=e))}je.value.forEach((e=>{e.isLoading=!1}))}else we.spinning=e},nt=()=>we.isClickOuterPrint?je.value.some((e=>e.isLoading)):we.spinning,it=(e,t,n,i)=>{const r=we.printParams[e];if(!r)return;we.isClickOuterPrint=i,we.currentFormatId=n;const a=we.originParams[e]||[];rt(r,e,t,n,a)},rt=async(e=[],t,n,i,r=[],a)=>{let l=e.length;const o=async e=>{try{--l<=0&&$e(e,"print")}catch(e){console.log("error",e)}};fe.showLoading&&nt()&&!a||(tt(!0,i),fe.prevFn("print",{formatId:i,templateId:n}).then((()=>{we.curPrintParamList=e;const a={formatId:i,iReportExecuteMode:we.iReportExecuteMode,templateId:n,authorizationKey:Pe.value,printdlgshow:fe.printdlgshow,signature:fe.signature,copies:fe.printCopies,svrUpdateIp:fe.svrUpdateIp};if("MULTI"===fe.strategy)for(let t=0;t<e.length;t++){t>0&&(a.printdlgshow="0");const n=JSON.stringify(Object.assign({},JSON.parse(Ze()),_e.value,e[t]));ke.printDirect({...a,params:n},o,Qe,We)}else ke.printDirect({...a,params:et(e,t)},(e=>{e.params=r,e.templateCode=t,e.templateId=n,$e(e,"print")}),Qe,We)})).catch((()=>{Xe("print"),tt(!1)})).finally((()=>{we.visible=!1})))},at=async(e,{templateCode:t,templateId:n,key:i},r)=>{const a=we.printParams[t];if(a)switch(we.isClickOuterPrint=r,we.currentFormatId=i,e){case"previewText":(async(e=[],t,n,i)=>{fe.showLoading&&nt()||(tt(!0,i),fe.prevFn("preview",{formatId:i,templateId:n}).then((()=>{we.curPrintParamList=e;const r=JSON.stringify(Object.assign({},JSON.parse(Ze()),_e.value,e[0])),a="MULTI"===fe.strategy?r:et(e,t),l={formatId:i,templateId:n,iReportExecuteMode:we.iReportExecuteMode,authorizationKey:Pe.value,params:a,btnprint:fe.btnprint,signature:fe.signature};ke.preview(l,(e=>{$e(e,"preview")}),Qe)})).catch((()=>{Xe("preview"),tt(!1)})).finally((()=>{we.visible=!1})))})(a,t,n,i);break;case"formatEditText":((e=[],t,n,i)=>{fe.showLoading&&nt()||(tt(!0,i),fe.prevFn("edit",{formatId:i,templateId:n}).then((()=>{we.curPrintParamList=e,we.currentFormatId=i,we.identityVerification.visible=!0})).catch((()=>{Xe("edit")})).finally((()=>{tt(!1)})))})(a,0,n,i);break;case"downloadPdf":(async(e=[],t,n,i)=>{fe.showLoading&&nt()||(tt(!0,i),fe.prevFn("download",{formatId:i,templateId:n}).then((()=>{we.curPrintParamList=e;const r=JSON.stringify(Object.assign({},JSON.parse(Ze()),_e.value,e[0])),a="MULTI"===fe.strategy?r:et(e,t),l={formatId:i,templateId:n,iReportExecuteMode:we.iReportExecuteMode,authorizationKey:Pe.value,print:{print:"1",type:"1",resolution:null==fe?void 0:fe.resolution},params:a,signature:fe.signature};ke.downloadPDF(l,(e=>$e(e,"preview")),Qe)})).catch((()=>{Xe("download"),tt(!1)})).finally((()=>{we.visible=!1})))})(a,t,n,i);break;case"resetPrinter":(async(e=[],t,n,i)=>{if(!fe.showLoading||!nt()){tt(!0,i);try{const e=await ke.resetPrinter(i,we.iReportExecuteMode);if(tt(!1),"success"==(null==e?void 0:e.result))return void he.success((null==e?void 0:e.message)||"重置打印机成功");he.warning((null==e?void 0:e.message)||"重置打印机失败")}catch(e){tt(!1),he.warning((null==e?void 0:e.message)||"重置打印机失败")}}})(a,0,0,i)}},lt=()=>{},ot=(e,t=[])=>{let n={};return(t=t||[]).forEach((t=>{n=Object.assign({},dt(n,t,e))})),n},st=(e,t=[])=>{let n={};return(t=t||[]).forEach((t=>{n=Object.assign({},pt(n,t,e))})),n},ut=(e,t,n)=>{const i={};return t.forEach((t=>{let r=((e,t)=>{const n={DATE:"yyyy-MM-dd",DATETIME:"yyyy-MM-dd HH:mm:ss"};let i=t;return Object.keys(n).includes(e.type)&&t&&t instanceof Date&&(i=K(t,n[e.type])),(null==e?void 0:e.defaultValue)||i})(t,e[t[n]]);e[t[n]]&&r&&(i[t[n]]=r)})),i},ct=({customizeDataset:e=[],param:t=[]},n={})=>{let i={};return e.forEach((e=>{const t=e.dataSetting[0].selectFieldList;i.datasetData||(i.datasetData={}),i.datasetData[e.name]=JSON.stringify(ut(n,t,"fieldName"))})),i=Object.assign({},i,ut(n,t,"key")),i},dt=(e,t,n)=>{if(t.templateNumbers){for(let i=0;i<t.templateNumbers.length;i++){const r=t.templateNumbers[i],a=n[r];if(!a)return e;e[r]||(e[r]=[]),e[r].push(ct(a,t))}return e}const i=Object.keys(n);for(let r=0;r<i.length;r++){const a=i[r],l=n[a];if(!l)return e;e[a]||(e[a]=[]),e[a].push(ct(l,t))}return e},pt=(e,t,n)=>{if(t.templateNumbers){for(let i=0;i<t.templateNumbers.length;i++){const r=t.templateNumbers[i];if(!n[r])return e;e[r]||(e[r]=[]),e[r].push(t)}return e}const i=Object.keys(n);for(let r=0;r<i.length;r++){const a=i[r];if(!n[a])return e;e[a]||(e[a]=[]),e[a].push(t)}return e},mt=async e=>{var t;we.formatList=e?(e=>{let t=[];return e&&e.forEach((e=>{if(!e.format)return!1;t.push(...e.format.map((t=>Object.assign({},t,{templateName:e.name}))))})),t})(e.obj):[],we.iReportExecuteMode=(null==(t=null==e?void 0:e.obj)?void 0:t.length)>0&&e.obj[0].iReportExecuteMode||1,(()=>{var e,t,n;const i=Object.keys(Je.value),r=we.formatList.map((e=>{const t={templateCode:e.number,templateId:e.templateId,label:e.name,key:e.id,selected:!1,isLoading:!1};if(i.includes(e.id)){const n=Je.value[e.id];n&&(t.shortcutLabel=n.shortcutLabel)}return t}));Ie.value.unshift(...r),Ne.value&&Ie.value.push(...ge),(null==(t=null==(e=fe.newPrintSetting)?void 0:e.outerPrintKeys)?void 0:t.length)>0&&(Ie.value.forEach((e=>{var t;(null==(t=fe.newPrintSetting)?void 0:t.outerPrintKeys.includes(e.key))&&(e.selected=!0)})),je.value=Ie.value.filter((e=>e.selected))),Te.value=Ie.value.filter((e=>!e.selected)),fe.hideButtons.length>0&&(Oe.value=Oe.value.filter((e=>!fe.hideButtons.includes(e.key))));const a=sessionStorage.getItem("portal");if(a){const e=JSON.parse(a),t=(null==(n=null==e?void 0:e.user)?void 0:n.currentRoleResourceObj)||{},i=Object.keys(t);i.includes("RY7.2.21.1.M2.G94181E")||(Oe.value=Oe.value.filter((e=>"downloadPdf"!=e.key))),i.includes("RY7.2.21.1.M2.G33633A")||(Oe.value=Oe.value.filter((e=>"formatEditText"!=e.key))),i.includes("RY7.2.21.1.M2.G99314S")||(Oe.value=Oe.value.filter((e=>"resetPrinter"!=e.key)))}})(),we.templateParams=(e=>{let t={};return e&&e.forEach((e=>{if(!e.templateConfig)return!1;t[e.number]=e.templateConfig})),t})(e.obj),we.printParams=ot(we.templateParams,fe.params),we.originParams=st(we.templateParams,fe.params),ft()},vt=async()=>{var e;if(we.isInited)return!0;we.isInited=!0,we.spinning=!0,(()=>{if(ke)return!1;ke=new U})();const t=await fe.queryPrintFormatByNumber();return await mt(t),(null==(e=t.obj)?void 0:e.length)>0&&(Pe.value=t.obj[0].authorizationKey||""),we.spinning=!1,!0},ft=async()=>{const e=Object.keys(Je.value);if(e.length>0)for(let t=0;t<e.length;t++){const n=e[t],i=Je.value[n],{stop:r,signature:a}=B().register({label:i.code,shortcutSignature:i.shortcutKey,operation:["state","reset"],callback(){"all"==n&&Ve("button");const e=ze.value.map((e=>e.key)),t=we.originParams;if(e.includes(n)){const e=ze.value.find((e=>e.key==n));if(e){const n=we.printParams[null==e?void 0:e.templateCode],i=t[null==e?void 0:e.templateCode]||[];rt(n,e.templateCode,e.templateId,e.key,i)}}}});Se.value[n]=r}},yt=async(e=!0)=>{if(await fe.clickPrevFn()){if(!we.visible){if(!await vt())return!1}e&&(we.visible=!we.visible)}},gt=e=>{if(we.identityVerification.visible=!1,z(we.currentFormatId))return $e({result:"success",message:""},"edit");const t=JSON.stringify(Object.assign({},JSON.parse(Ze()),_e.value,we.curPrintParamList[0])),n="MULTI"===fe.strategy?t:et(we.curPrintParamList,Ee.value),i={formatId:we.currentFormatId,templateId:xe.value,params:n,token:e};ke.editPrintFormat(i,(e=>{$e(e,"edit")}),Qe)},ht=(e,t)=>{const n=je.value[t+1];return t<je.value.length-1&&!we.printParams[e.templateCode]&&we.printParams[n.templateCode]};async function kt(){await yt(!1),(()=>{const e=Object.keys(we.printParams);we.isClickOuterPrint=!1;const t=we.originParams;if(1==Re.value)for(let n=0;n<e.length;n++){const i=e[n],r=we.printParams[i],a=t[i]||[],l=we.formatList.filter((e=>e.number==i));l&&l.length>0&&l.forEach((e=>{we.currentFormatId=e.id,rt(r,e.number,e.templateId,e.id,a,!0)}))}2==Re.value&&je.value.forEach((e=>{const n=we.printParams[e.templateCode],i=t[e.templateCode]||[];we.currentFormatId=e.key,rt(n,e.templateCode,e.templateId,e.key,i,!0)}))})()}return a((()=>{we.isInited=!1})),l((()=>{const e=Object.keys(Se.value);e.length>0&&e.forEach((e=>{Se.value[e]&&Se.value[e]()}))})),o((()=>fe.params),(e=>{Object.keys(we.templateParams).length>0&&(we.printParams=ot(we.templateParams,fe.params),we.originParams=st(we.templateParams,fe.params))}),{deep:!0}),o((()=>{var e;return null==(e=fe.newPrintSetting)?void 0:e.outerPrintKeys}),(async e=>{(null==e?void 0:e.length)>0&&await yt(!1)}),{deep:!0,immediate:!0}),ve({directPrint:kt}),(t,n)=>(s(),u(c,null,[d("div",G,[p(" 外显按钮集合 "),m(v(L),{class:"outButtonGroup"},{default:f((()=>[(s(!0),u(c,null,y(je.value,((t,n)=>(s(),g(v(T),{key:t.key,class:"c-dropdown",placement:"bottom-start",trigger:"hover",onClickoutside:lt,options:Be(v(Oe),t),onSelect:e=>at(e,t,!0)},{default:f((()=>[m(v(j),{disabled:!we.printParams[t.templateCode],loading:e.showLoading&&t.isLoading,onClick:e=>it(t.templateCode,t.templateId,t.key,!0),class:h(n==je.value.length-1?"outerLastButton":ht(t,n)?"isPrintDisabled":"")},{icon:f((()=>[m(v(M),{component:v(N),size:"18"},null,8,["component"])])),default:f((()=>[k(" "+b(t.label)+" ",1),t.shortcutLabel?(s(),u("span",q,b(t.shortcutLabel),1)):p("v-if",!0)])),_:2},1032,["disabled","loading","onClick","class"])])),_:2},1032,["options","onSelect"])))),128))])),_:1}),p(" 外显设置按钮 "),je.value.length>0&&je.value.length==v(ze).length&&v(Ne)&&2!=v(Re)?(s(),g(v(x),{key:0,trigger:"click","show-arrow":!1,show:Le.isOutSetting,onClickoutside:n[2]||(n[2]=e=>He("isOutSetting"))},{trigger:f((()=>[m(v(j),{class:h(je.value.length>0?"printAllLeftCls":""),onClick:n[0]||(n[0]=e=>Ye("isOutSetting"))},{default:f((()=>[Y,m(v(M),{style:{"margin-left":"8px"},component:v(_),size:"18"},null,8,["component"])])),_:1},8,["class"])])),default:f((()=>[d("div",H,[(s(!0),u(c,null,y(v(ze),(e=>(s(),u("div",{class:"print-li",key:e.key},[d("div",$,[d("span",Q,b(e.label),1),m(v(E),{checked:e.selected,"onUpdate:checked":t=>e.selected=t},{default:f((()=>[k("外显")])),_:2},1032,["checked","onUpdate:checked"])])])))),128)),d("div",W,[m(v(F)),d("div",X,[m(v(j),{type:"primary",size:"small",onClick:qe},{default:f((()=>[k("保存")])),_:1}),v(ze)&&v(ze).length>1?(s(),g(v(E),{key:0,checked:v(Ae),"onUpdate:checked":n[1]||(n[1]=e=>P(Ae)?Ae.value=e:null)},{default:f((()=>[k("全选")])),_:1},8,["checked"])):p("v-if",!0)])])])])),_:1},8,["show"])):(s(),u(c,{key:1},[p(" 打印全部按钮 "),m(v(x),{trigger:"click","show-arrow":!1,show:Le.oneShow,onClickoutside:n[10]||(n[10]=e=>He("oneShow"))},{trigger:f((()=>[w(t.$slots,"button",{handleClickPrintBtn:Ke,printSpinning:we.spinning,printbtnText:e.btnText,printVisible:we.visible},(()=>[m(v(L),{class:"newprint-button-component",onClick:n[4]||(n[4]=S((()=>Ve("icon")),["stop"]))},{default:f((()=>[m(v(j),{loading:e.showLoading&&we.spinning,onClick:n[3]||(n[3]=S((()=>Ve("button")),["stop"])),class:h(je.value.length>0?"printAllLeftCls":"")},{icon:f((()=>[m(v(M),{component:v(N),size:"18"},null,8,["component"])])),default:f((()=>[k(" "+b(v(Fe)?"打印全部":e.btnText)+" ",1),v(Ue)?(s(),u("span",Z,b(v(Ue)),1)):p("v-if",!0)])),_:1},8,["loading","class"]),m(v(j),{class:"icon-select"},{icon:f((()=>[m(v(M),{component:v(D),size:"18"},null,8,["component"])])),_:1})])),_:1})]))])),default:f((()=>[d("div",ee,[(s(!0),u(c,null,y(Te.value,(e=>(s(),u("div",{class:h(["print-li",Ce.oneMouseType==e.key||Ce.oneClickType==e.key?"active":""]),key:e.key,onMouseenter:t=>Ge("oneMouseType",e.key),onMouseleave:n[9]||(n[9]=e=>Ge("oneMouseType","")),onClick:t=>((e,t,n)=>{if(!we.printParams[n.templateCode])return[];Ge(e,t)})("oneClickType",e.key,e)},["divider"==e.key?(s(),g(v(F),{key:0})):"outSetting"==e.key?(s(),u(c,{key:1},[p(" 第二层外显设置 "),m(v(x),{trigger:"click","show-arrow":!1,placement:"right-start",show:Le.isOutSetting,onClickoutside:n[7]||(n[7]=e=>He("isOutSetting"))},{trigger:f((()=>[d("div",{class:"print-lite",onClick:n[5]||(n[5]=e=>Ye("isOutSetting"))},[d("span",ne,b(e.label),1),m(v(M),{color:je.value.length>0?"#2563F4":"",component:v(_),size:"18"},null,8,["color","component"])])])),default:f((()=>[d("div",ie,[(s(!0),u(c,null,y(v(ze),(e=>(s(),u("div",{class:"print-li",key:e.key},[d("div",re,[d("span",ae,b(e.label),1),m(v(E),{checked:e.selected,"onUpdate:checked":t=>e.selected=t},{default:f((()=>[k("外显")])),_:2},1032,["checked","onUpdate:checked"])])])))),128)),d("div",le,[m(v(F)),d("div",oe,[m(v(j),{type:"primary",size:"small",onClick:qe},{default:f((()=>[k("保存")])),_:1}),v(ze)&&v(ze).length>1?(s(),g(v(E),{key:0,checked:v(Ae),"onUpdate:checked":n[6]||(n[6]=e=>P(Ae)?Ae.value=e:null)},{default:f((()=>[k("全选")])),_:1},8,["checked"])):p("v-if",!0)])])])])),_:2},1032,["show"])],2112)):(s(),u(c,{key:2},[p(" 第二层功能操作 "),d("div",{class:h(["print-lite",we.printParams[e.templateCode]?"":"isDisabled"])},[d("span",{class:"label bold",onClick:t=>it(e.templateCode,e.templateId,e.key,!1)},[k(b(e.label)+" ",1),e.shortcutLabel?(s(),u("span",ue,b(e.shortcutLabel),1)):p("v-if",!0)],8,se),we.printParams[e.templateCode]?(s(),g(v(x),{key:0,trigger:"click","show-arrow":!1,placement:"right-start",show:Le[e.key],onClickoutside:t=>He(e.key)},{trigger:f((()=>[m(v(M),{component:v(R),size:"18",onClick:t=>Ye(e.key)},null,8,["component","onClick"])])),default:f((()=>[d("div",ce,[(s(!0),u(c,null,y(Be(v(Oe),e),(t=>(s(),u("div",{class:h(["print-li",Ce.twoMouseType==t.key?"active":""]),key:t.key,onMouseenter:e=>Ge("twoMouseType",t.key),onMouseleave:n[8]||(n[8]=e=>Ge("twoMouseType",""))},[d("div",pe,[d("span",{class:"label",onClick:n=>at(t.key,e,!1)},b(t.label),9,me)])],42,de)))),128))])])),_:2},1032,["show","onClickoutside"])):p("v-if",!0)],2)],2112))],42,te)))),128))])])),_:3},8,["show"])],2112))]),m(A,I(t.$attrs,{modelValue:we.identityVerification.visible,"onUpdate:modelValue":n[11]||(n[11]=e=>we.identityVerification.visible=e),formatId:we.currentFormatId,templateId:v(xe),onSuccess:gt}),null,16,["modelValue","formatId","templateId"])],64))}});export{ve as default};
1
+ import{createElementVNode as e,defineComponent as t,inject as n,ref as i,reactive as a,computed as r,onMounted as l,onBeforeUnmount as o,watch as s,openBlock as u,createElementBlock as d,Fragment as c,createCommentVNode as p,createVNode as m,unref as v,withCtx as g,renderList as y,createBlock as f,mergeProps as w,createTextVNode as h,toDisplayString as k,isRef as b,renderSlot as P,withModifiers as C,normalizeClass as S}from"vue";import{isObject as L}from"@vue/shared";import{useMessage as I,NButtonGroup as O,NDropdown as T,NButton as j,NIcon as M,NPopover as x,NCheckbox as E,NDivider as F}from"naive-ui";import{PrintOutline as B,SettingsOutline as N,ChevronDownSharp as _,ArrowForwardOutline as D}from"@vicons/ionicons5";import{InjectionButtonPrintEmits as R}from"../constants/index.js";import{Print as J}from"../utils/print.js";import{isIReport as U}from"../utils/browserPrint.js";import z from"./IdentityVerification.vue.js";import{format as A}from"date-fns";import"../api.js";import"../../../shortcut-provider/index.js";import{encapBrowserLog as K}from"../../../../shared/utils/index.js";import{useShortcuts as V}from"../../../shortcut-provider/src/hooks/useShortcuts.js";var G,q,Y,H,$,Q,W;const X={class:"newprint-button-outer"},Z={key:0,class:"newprint-button-outer__shortcut"},ee=e("span",{class:"label bold"},(null==(G=window.getLanguageByCode)?void 0:G.call(window,"10010.1.477"))||"外显设置",-1),te={class:"newprint-button-poperOver"},ne={class:"print-lite"},ie={class:"label bold"},ae={class:"print-li"},re={class:"print-lite"},le={key:0,class:"newprint-button-outer__shortcut"},oe={class:"newprint-button-poperOver"},se=["onMouseenter","onClick"],ue={class:"label bold"},de={class:"newprint-button-poperOver"},ce={class:"print-lite"},pe={class:"label bold"},me={class:"print-li"},ve={class:"print-lite"},ge=["onClick"],ye={key:0,class:"newprint-button-outer__shortcut"},fe={class:"newprint-button-poperOver"},we=["onMouseenter"],he={class:"print-lite"},ke=["onClick"];var be=t({__name:"NewPrintComponent",props:{printParams:{type:Array},params:{default:()=>[],type:Array},btnText:{default:(null==(q=window.getLanguageByCode)?void 0:q.call(window,"10010.1.478"))||"打印",type:String},printText:{default:(null==(Y=window.getLanguageByCode)?void 0:Y.call(window,"10010.1.479"))||"直接打印",type:String},previewText:{default:(null==(H=window.getLanguageByCode)?void 0:H.call(window,"10010.1.480"))||"打印预览",type:String},pdfLoadText:{default:(null==($=window.getLanguageByCode)?void 0:$.call(window,"10010.1.481"))||"下载pdf",type:String},formatEditText:{default:(null==(Q=window.getLanguageByCode)?void 0:Q.call(window,"10010.1.482"))||"格式编辑",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:(null==(W=window.getLanguageByCode)?void 0:W.call(window,"10010.1.483"))||"请选中需要打印的数据",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},resolution:{type:Number},newPrintSetting:{type:Object,default:()=>({isShowPrintAll:!0,printAllType:1,isShowOutSetting:!0,customProps:{},outerPrintKeys:[],defaultFormatId:"",shortcut:{},buttonProps:{}})},svrUpdateIp:{type:String}},setup(t,{expose:G}){var q,Y,H;const $=t,Q=String(navigator.platform).toLowerCase().includes("linux"),W=[{label:(null==(q=window.getLanguageByCode)?void 0:q.call(window,"10010.1.476"))||"分割线",key:"divider"},{label:(null==(Y=window.getLanguageByCode)?void 0:Y.call(window,"10010.1.477"))||"外显设置",key:"outSetting"}],be=I();let Pe;const Ce=n(R),Se=i(""),Le=a({spinning:!1,visible:!1,formatList:[],templateParams:[],printParams:[],originParams:{},currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null,isClickOuterPrint:!1,curPrintParamList:[],iReportExecuteMode:1}),Ie=i({});let Oe=i([]),Te=i([{label:$.previewText,key:"previewText"},{label:$.pdfLoadText,key:"downloadPdf"},{label:$.formatEditText,key:"formatEditText"},{label:(null==(H=window.getLanguageByCode)?void 0:H.call(window,"10010.1.484"))||"重置打印机",key:"resetPrinter"}]);const je=a({oneMouseType:"",oneClickType:"",twoMouseType:""}),Me=a({oneShow:!1,isOperation:!1,isOutSetting:!1}),xe=i([]),Ee=i([]),Fe=r((()=>{if(!Le.currentFormatId)return{};let e=Le.currentFormatId;return Le.formatList.find((t=>t.id===e))}));r((()=>{var e,t;return(null==(e=Fe.value)?void 0:e.name)||(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.485"))||"格式选择"}));const Be=r((()=>{let e=Le.formatList.find((e=>e.id===Le.currentFormatId));return null==e?void 0:e.templateId})),Ne=r((()=>{let e=Le.formatList.find((e=>e.id===Le.currentFormatId));return null==e?void 0:e.number})),_e=r((()=>{var e;return null==(e=$.newPrintSetting)?void 0:e.isShowPrintAll})),De=r((()=>{var e;return null==(e=$.newPrintSetting)?void 0:e.isShowOutSetting})),Re=r((()=>{var e;return(null==(e=$.newPrintSetting)?void 0:e.customProps)||{}})),Je=r((()=>{var e;return(null==(e=$.newPrintSetting)?void 0:e.defaultFormatId)||""})),Ue=r((()=>{var e;return(null==(e=$.newPrintSetting)?void 0:e.printAllType)||1})),ze=r((()=>{var e;return(null==(e=$.newPrintSetting)?void 0:e.shortcut)||{}})),Ae=r((()=>{var e;return(null==(e=$.newPrintSetting)?void 0:e.buttonProps)||{}})),Ke=r((()=>{var e,t;const n=Object.keys(ze.value);if(n.length>0){if(Je.value&&n.includes(Je.value))return(null==(e=ze.value[Je.value])?void 0:e.shortcutLabel)||"";if(n.includes("all"))return(null==(t=ze.value.all)?void 0:t.shortcutLabel)||""}return""})),Ve=r((()=>{const e=W.map((e=>e.key));return Oe.value.filter((t=>!e.includes(t.key)))})),Ge=r({get:()=>Ve.value.every((e=>e.selected)),set(e){Ve.value.forEach((t=>{t.selected=e}))}}),qe=async()=>{var e,t;(null==(t=null==(e=$.newPrintSetting)?void 0:e.outerPrintKeys)?void 0:t.length)||await kt(),Me.oneShow=!0},Ye=async e=>{if($.directPrint){if(Le.spinning)return;return"button"===e?void(_e.value?await Ct():Je.value?async function(e){await kt(!1);const t=xe.value.find((t=>t.key==e));t&&ot(t.templateCode,t.templateId,t.key,!1)}(Je.value):qe()):qe()}return qe()},He=(e,t)=>Le.printParams[t.templateCode]?U(t.key)&&(Q||2==Le.iReportExecuteMode)?e.filter((e=>"formatEditText"!=e.key)):e:[],$e=(e,t)=>{je[e]=t},Qe=()=>{xe.value=Oe.value.filter((e=>!e.selected)),Ee.value=Ve.value.filter((e=>e.selected)),Xe("oneShow"),Xe("isOutSetting"),Ce("saveOuterPrint",Ee.value)},We=e=>{Me[e]=!0},Xe=e=>{je.oneClickType="",Me[e]=!1,"isOutSetting"==e&&(Me.isOutSetting=!1)},Ze=(e,t)=>{rt(!1);let n={type:t,formatId:Le.currentFormatId,templateId:(null==e?void 0:e.templateId)||Be.value,templateCode:(null==e?void 0:e.templateCode)||Ne.value};K({type:"进入成功的回调",info:n},"PRINT-SDK"),Ce("success",e,n)},et=e=>{rt(!1),K({type:"进入失败的回调",res:e},"PRINT-SDK"),Ce("error",e),L(e)&&"notInstalledApp"===e.type&&be.error(e.message)},tt=e=>{rt(!1),Ce("cancel",e)},nt=e=>{var t;const n={message:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.486"))||"前置条件执行错误",type:e,preExecution:!0};Ce("error",n)},it=()=>JSON.stringify({...$.token?{token:$.token}:{}}),at=(e=[],t)=>{var n,i;let a={},r={};if((null==(n=Le.templateParams[t].customizeDataset)?void 0:n.length)>0){const t=(null==(i=Object.keys(e[0].datasetData||{}))?void 0:i[0])||"",n=JSON.stringify(e.map((e=>JSON.parse(e.datasetData[t]))));r={datasetData:{}},r.datasetData[t]=n}else Object.keys(e[0]).forEach((t=>{r[t]=[],e.forEach((e=>{r[t].includes(e[t])||r[t].push(e[t])})),r[t]=r[t].join(",")}));return a=Object.assign({},JSON.parse(it()),Re.value,r),JSON.stringify(a)},rt=(e,t)=>{if(Le.isClickOuterPrint){if(e&&t){const n=Ee.value.find((e=>e.key==t));return void(n&&(n.isLoading=e))}Ee.value.forEach((e=>{e.isLoading=!1}))}else Le.spinning=e},lt=()=>Le.isClickOuterPrint?Ee.value.some((e=>e.isLoading)):Le.spinning,ot=(e,t,n,i)=>{const a=Le.printParams[e];if(!a)return;Le.isClickOuterPrint=i,Le.currentFormatId=n;const r=Le.originParams[e]||[];st(a,e,t,n,r)},st=async(e=[],t,n,i,a=[],r)=>{let l=e.length;const o=async e=>{try{--l<=0&&Ze(e,"print")}catch(e){console.log("error",e)}};$.showLoading&&lt()&&!r||(rt(!0,i),$.prevFn("print",{formatId:i,templateId:n}).then((()=>{Le.curPrintParamList=e;const r={formatId:i,iReportExecuteMode:Le.iReportExecuteMode,templateId:n,authorizationKey:Se.value,printdlgshow:$.printdlgshow,signature:$.signature,copies:$.printCopies,svrUpdateIp:$.svrUpdateIp};if("MULTI"===$.strategy)for(let t=0;t<e.length;t++){t>0&&(r.printdlgshow="0");const n=JSON.stringify(Object.assign({},JSON.parse(it()),Re.value,e[t]));Pe.printDirect({...r,params:n},o,et,tt)}else Pe.printDirect({...r,params:at(e,t)},(e=>{e.params=a,e.templateCode=t,e.templateId=n,Ze(e,"print")}),et,tt)})).catch((()=>{nt("print"),rt(!1)})).finally((()=>{Le.visible=!1})))},ut=async(e,{templateCode:t,templateId:n,key:i},a)=>{const r=Le.printParams[t];if(r)switch(Le.isClickOuterPrint=a,Le.currentFormatId=i,e){case"previewText":(async(e=[],t,n,i)=>{$.showLoading&&lt()||(rt(!0,i),$.prevFn("preview",{formatId:i,templateId:n}).then((()=>{Le.curPrintParamList=e;const a=JSON.stringify(Object.assign({},JSON.parse(it()),Re.value,e[0])),r="MULTI"===$.strategy?a:at(e,t),l={formatId:i,templateId:n,iReportExecuteMode:Le.iReportExecuteMode,authorizationKey:Se.value,params:r,btnprint:$.btnprint,signature:$.signature};Pe.preview(l,(e=>{Ze(e,"preview")}),et)})).catch((()=>{nt("preview"),rt(!1)})).finally((()=>{Le.visible=!1})))})(r,t,n,i);break;case"formatEditText":((e=[],t,n,i)=>{$.showLoading&&lt()||(rt(!0,i),$.prevFn("edit",{formatId:i,templateId:n}).then((()=>{Le.curPrintParamList=e,Le.currentFormatId=i,Le.identityVerification.visible=!0})).catch((()=>{nt("edit")})).finally((()=>{rt(!1)})))})(r,0,n,i);break;case"downloadPdf":(async(e=[],t,n,i)=>{$.showLoading&&lt()||(rt(!0,i),$.prevFn("download",{formatId:i,templateId:n}).then((()=>{Le.curPrintParamList=e;const a=JSON.stringify(Object.assign({},JSON.parse(it()),Re.value,e[0])),r="MULTI"===$.strategy?a:at(e,t),l={formatId:i,templateId:n,iReportExecuteMode:Le.iReportExecuteMode,authorizationKey:Se.value,print:{print:"1",type:"1",resolution:null==$?void 0:$.resolution},params:r,signature:$.signature};Pe.downloadPDF(l,(e=>Ze(e,"preview")),et)})).catch((()=>{nt("download"),rt(!1)})).finally((()=>{Le.visible=!1})))})(r,t,n,i);break;case"resetPrinter":(async(e=[],t,n,i)=>{var a,r,l;if(!$.showLoading||!lt()){rt(!0,i);try{const e=await Pe.resetPrinter(i,Le.iReportExecuteMode);if(rt(!1),"success"==(null==e?void 0:e.result))return void be.success((null==e?void 0:e.message)||(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.487"))||"重置打印机成功");be.warning((null==e?void 0:e.message)||(null==(r=window.getLanguageByCode)?void 0:r.call(window,"10010.1.488"))||"重置打印机失败")}catch(e){rt(!1),be.warning((null==e?void 0:e.message)||(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.488"))||"重置打印机失败")}}})(r,0,0,i)}},dt=()=>{},ct=(e,t=[])=>{let n={};return(t=t||[]).forEach((t=>{n=Object.assign({},gt(n,t,e))})),n},pt=(e,t=[])=>{let n={};return(t=t||[]).forEach((t=>{n=Object.assign({},yt(n,t,e))})),n},mt=(e,t,n)=>{const i={};return t.forEach((t=>{let a=((e,t)=>{const n={DATE:"yyyy-MM-dd",DATETIME:"yyyy-MM-dd HH:mm:ss"};let i=t;return Object.keys(n).includes(e.type)&&t&&t instanceof Date&&(i=A(t,n[e.type])),(null==e?void 0:e.defaultValue)||i})(t,e[t[n]]);e[t[n]]&&a&&(i[t[n]]=a)})),i},vt=({customizeDataset:e=[],param:t=[]},n={})=>{let i={};return e.forEach((e=>{const t=e.dataSetting[0].selectFieldList;i.datasetData||(i.datasetData={}),i.datasetData[e.name]=JSON.stringify(mt(n,t,"fieldName"))})),i=Object.assign({},i,mt(n,t,"key")),i},gt=(e,t,n)=>{if(t.templateNumbers){for(let i=0;i<t.templateNumbers.length;i++){const a=t.templateNumbers[i],r=n[a];if(!r)return e;e[a]||(e[a]=[]),e[a].push(vt(r,t))}return e}const i=Object.keys(n);for(let a=0;a<i.length;a++){const r=i[a],l=n[r];if(!l)return e;e[r]||(e[r]=[]),e[r].push(vt(l,t))}return e},yt=(e,t,n)=>{if(t.templateNumbers){for(let i=0;i<t.templateNumbers.length;i++){const a=t.templateNumbers[i];if(!n[a])return e;e[a]||(e[a]=[]),e[a].push(t)}return e}const i=Object.keys(n);for(let a=0;a<i.length;a++){const r=i[a];if(!n[r])return e;e[r]||(e[r]=[]),e[r].push(t)}return e},ft=async e=>{var t;Le.formatList=e?(e=>{let t=[];return e&&e.forEach((e=>{if(!e.format)return!1;t.push(...e.format.map((t=>Object.assign({},t,{templateName:e.name}))))})),t})(e.obj):[],Le.iReportExecuteMode=(null==(t=null==e?void 0:e.obj)?void 0:t.length)>0&&e.obj[0].iReportExecuteMode||1,(()=>{var e,t,n;const i=Object.keys(ze.value),a=Le.formatList.map((e=>{const t={templateCode:e.number,templateId:e.templateId,label:e.name,key:e.id,selected:!1,isLoading:!1};if(i.includes(e.id)){const n=ze.value[e.id];n&&(t.shortcutLabel=n.shortcutLabel)}return t}));Oe.value.unshift(...a),De.value&&Oe.value.push(...W),(null==(t=null==(e=$.newPrintSetting)?void 0:e.outerPrintKeys)?void 0:t.length)>0&&(Oe.value.forEach((e=>{var t;(null==(t=$.newPrintSetting)?void 0:t.outerPrintKeys.includes(e.key))&&(e.selected=!0)})),Ee.value=Oe.value.filter((e=>e.selected))),xe.value=Oe.value.filter((e=>!e.selected)),$.hideButtons.length>0&&(Te.value=Te.value.filter((e=>!$.hideButtons.includes(e.key))));const r=sessionStorage.getItem("portal");if(r){const e=JSON.parse(r),t=(null==(n=null==e?void 0:e.user)?void 0:n.currentRoleResourceObj)||{},i=Object.keys(t);i.includes("RY7.2.21.1.M2.G94181E")||(Te.value=Te.value.filter((e=>"downloadPdf"!=e.key))),i.includes("RY7.2.21.1.M2.G33633A")||(Te.value=Te.value.filter((e=>"formatEditText"!=e.key))),i.includes("RY7.2.21.1.M2.G99314S")||(Te.value=Te.value.filter((e=>"resetPrinter"!=e.key)))}})(),Le.templateParams=(e=>{let t={};return e&&e.forEach((e=>{if(!e.templateConfig)return!1;t[e.number]=e.templateConfig})),t})(e.obj),Le.printParams=ct(Le.templateParams,$.params),Le.originParams=pt(Le.templateParams,$.params),ht()},wt=async()=>{var e;if(Le.isInited)return!0;Le.isInited=!0,Le.spinning=!0,(()=>{if(Pe)return!1;Pe=new J})();const t=await $.queryPrintFormatByNumber();return await ft(t),(null==(e=t.obj)?void 0:e.length)>0&&(Se.value=t.obj[0].authorizationKey||""),Le.spinning=!1,!0},ht=async()=>{const e=Object.keys(ze.value);if(e.length>0)for(let t=0;t<e.length;t++){const n=e[t],i=ze.value[n],{stop:a,signature:r}=V().register({label:i.code,shortcutSignature:i.shortcutKey,operation:["state","reset"],callback(){"all"==n&&Ye("button");const e=Ve.value.map((e=>e.key)),t=Le.originParams;if(e.includes(n)){const e=Ve.value.find((e=>e.key==n));if(e){const n=Le.printParams[null==e?void 0:e.templateCode],i=t[null==e?void 0:e.templateCode]||[];st(n,e.templateCode,e.templateId,e.key,i)}}}});Ie.value[n]=a}},kt=async(e=!0)=>{if(await $.clickPrevFn()){if(!Le.visible){if(!await wt())return!1}e&&(Le.visible=!Le.visible)}},bt=e=>{if(Le.identityVerification.visible=!1,U(Le.currentFormatId))return Ze({result:"success",message:""},"edit");const t=JSON.stringify(Object.assign({},JSON.parse(it()),Re.value,Le.curPrintParamList[0])),n="MULTI"===$.strategy?t:at(Le.curPrintParamList,Ne.value),i={formatId:Le.currentFormatId,templateId:Be.value,params:n,token:e};Pe.editPrintFormat(i,(e=>{Ze(e,"edit")}),et)},Pt=(e,t)=>{const n=Ee.value[t+1];return t<Ee.value.length-1&&!Le.printParams[e.templateCode]&&Le.printParams[n.templateCode]};async function Ct(){await kt(!1),(()=>{const e=Object.keys(Le.printParams);Le.isClickOuterPrint=!1;const t=Le.originParams;if(1==Ue.value)for(let n=0;n<e.length;n++){const i=e[n],a=Le.printParams[i],r=t[i]||[],l=Le.formatList.filter((e=>e.number==i));l&&l.length>0&&l.forEach((e=>{Le.currentFormatId=e.id,st(a,e.number,e.templateId,e.id,r,!0)}))}2==Ue.value&&Ee.value.forEach((e=>{const n=Le.printParams[e.templateCode],i=t[e.templateCode]||[];Le.currentFormatId=e.key,st(n,e.templateCode,e.templateId,e.key,i,!0)}))})()}return l((()=>{Le.isInited=!1})),o((()=>{const e=Object.keys(Ie.value);e.length>0&&e.forEach((e=>{Ie.value[e]&&Ie.value[e]()}))})),s((()=>$.params),(e=>{Object.keys(Le.templateParams).length>0&&(Le.printParams=ct(Le.templateParams,$.params),Le.originParams=pt(Le.templateParams,$.params))}),{deep:!0}),s((()=>{var e;return null==(e=$.newPrintSetting)?void 0:e.outerPrintKeys}),(async e=>{(null==e?void 0:e.length)>0&&await kt(!1)}),{deep:!0,immediate:!0}),G({directPrint:Ct}),(n,i)=>(u(),d(c,null,[e("div",X,[p(" 外显按钮集合 "),m(v(O),{class:"outButtonGroup"},{default:g((()=>[(u(!0),d(c,null,y(Ee.value,((e,n)=>(u(),f(v(T),{key:e.key,class:"c-dropdown",placement:"bottom-start",trigger:"hover",onClickoutside:dt,options:He(v(Te),e),onSelect:t=>ut(t,e,!0)},{default:g((()=>[m(v(j),w(v(Ae),{disabled:!Le.printParams[e.templateCode],loading:t.showLoading&&e.isLoading,onClick:t=>ot(e.templateCode,e.templateId,e.key,!0),class:n==Ee.value.length-1?"outerLastButton":Pt(e,n)?"isPrintDisabled":""}),{icon:g((()=>[m(v(M),{component:v(B),size:"18"},null,8,["component"])])),default:g((()=>[h(" "+k(e.label)+" ",1),e.shortcutLabel?(u(),d("span",Z,k(e.shortcutLabel),1)):p("v-if",!0)])),_:2},1040,["disabled","loading","onClick","class"])])),_:2},1032,["options","onSelect"])))),128))])),_:1}),p(" 外显设置按钮 "),Ee.value.length>0&&Ee.value.length==v(Ve).length&&v(De)&&2!=v(Ue)?(u(),f(v(x),{key:0,trigger:"click","show-arrow":!1,show:Me.isOutSetting,onClickoutside:i[2]||(i[2]=e=>Xe("isOutSetting"))},{trigger:g((()=>[m(v(j),w(v(Ae),{class:Ee.value.length>0?"printAllLeftCls":"",onClick:i[0]||(i[0]=e=>We("isOutSetting"))}),{default:g((()=>[ee,m(v(M),{style:{"margin-left":"8px"},component:v(N),size:"18"},null,8,["component"])])),_:1},16,["class"])])),default:g((()=>[e("div",te,[(u(!0),d(c,null,y(v(Ve),(t=>(u(),d("div",{class:"print-li",key:t.key},[e("div",ne,[e("span",ie,k(t.label),1),m(v(E),{checked:t.selected,"onUpdate:checked":e=>t.selected=e},{default:g((()=>{var e;return[h((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.474"))||"外显")]})),_:2},1032,["checked","onUpdate:checked"])])])))),128)),e("div",ae,[m(v(F)),e("div",re,[m(v(j),{type:"primary",size:"small",onClick:Qe},{default:g((()=>{var e;return[h((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.244"))||"保存")]})),_:1}),v(Ve)&&v(Ve).length>1?(u(),f(v(E),{key:0,checked:v(Ge),"onUpdate:checked":i[1]||(i[1]=e=>b(Ge)?Ge.value=e:null)},{default:g((()=>{var e;return[h((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.37"))||"全选")]})),_:1},8,["checked"])):p("v-if",!0)])])])])),_:1},8,["show"])):(u(),d(c,{key:1},[p(" 打印全部按钮 "),m(v(x),{trigger:"click","show-arrow":!1,show:Me.oneShow,onClickoutside:i[10]||(i[10]=e=>Xe("oneShow"))},{trigger:g((()=>[P(n.$slots,"button",{handleClickPrintBtn:qe,handlePrintBySetting:()=>Ye("button"),printSpinning:Le.spinning,printbtnText:t.btnText,printVisible:Le.visible},(()=>[m(v(O),{class:"newprint-button-component",onClick:i[4]||(i[4]=C((()=>Ye("icon")),["stop"]))},{default:g((()=>[m(v(j),w({loading:t.showLoading&&Le.spinning},v(Ae),{onClick:i[3]||(i[3]=C((()=>Ye("button")),["stop"])),class:Ee.value.length>0?"printAllLeftCls":""}),{icon:g((()=>[m(v(M),{component:v(B),size:"18"},null,8,["component"])])),default:g((()=>{var e;return[h(" "+k(v(_e)?(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.475"))||"打印全部":t.btnText)+" ",1),v(Ke)?(u(),d("span",le,k(v(Ke)),1)):p("v-if",!0)]})),_:1},16,["loading","class"]),m(v(j),w({class:"icon-select"},v(Ae)),{icon:g((()=>[m(v(M),{component:v(_),size:"18"},null,8,["component"])])),_:1},16)])),_:1})]))])),default:g((()=>[e("div",oe,[(u(!0),d(c,null,y(xe.value,(t=>(u(),d("div",{class:S(["print-li",je.oneMouseType==t.key||je.oneClickType==t.key?"active":""]),key:t.key,onMouseenter:e=>$e("oneMouseType",t.key),onMouseleave:i[9]||(i[9]=e=>$e("oneMouseType","")),onClick:e=>((e,t,n)=>{if(!Le.printParams[n.templateCode])return[];$e(e,t)})("oneClickType",t.key,t)},["divider"==t.key?(u(),f(v(F),{key:0})):"outSetting"==t.key?(u(),d(c,{key:1},[p(" 第二层外显设置 "),m(v(x),{trigger:"click","show-arrow":!1,placement:"right-start",show:Me.isOutSetting,onClickoutside:i[7]||(i[7]=e=>Xe("isOutSetting"))},{trigger:g((()=>[e("div",{class:"print-lite",onClick:i[5]||(i[5]=e=>We("isOutSetting"))},[e("span",ue,k(t.label),1),m(v(M),{color:Ee.value.length>0?"#2563F4":"",component:v(N),size:"18"},null,8,["color","component"])])])),default:g((()=>[e("div",de,[(u(!0),d(c,null,y(v(Ve),(t=>(u(),d("div",{class:"print-li",key:t.key},[e("div",ce,[e("span",pe,k(t.label),1),m(v(E),{checked:t.selected,"onUpdate:checked":e=>t.selected=e},{default:g((()=>{var e;return[h((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.474"))||"外显")]})),_:2},1032,["checked","onUpdate:checked"])])])))),128)),e("div",me,[m(v(F)),e("div",ve,[m(v(j),{type:"primary",size:"small",onClick:Qe},{default:g((()=>{var e;return[h((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.244"))||"保存")]})),_:1}),v(Ve)&&v(Ve).length>1?(u(),f(v(E),{key:0,checked:v(Ge),"onUpdate:checked":i[6]||(i[6]=e=>b(Ge)?Ge.value=e:null)},{default:g((()=>{var e;return[h((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.37"))||"全选")]})),_:1},8,["checked"])):p("v-if",!0)])])])])),_:2},1032,["show"])],2112)):(u(),d(c,{key:2},[p(" 第二层功能操作 "),e("div",{class:S(["print-lite",Le.printParams[t.templateCode]?"":"isDisabled"])},[e("span",{class:"label bold",onClick:e=>ot(t.templateCode,t.templateId,t.key,!1)},[h(k(t.label)+" ",1),t.shortcutLabel?(u(),d("span",ye,k(t.shortcutLabel),1)):p("v-if",!0)],8,ge),Le.printParams[t.templateCode]?(u(),f(v(x),{key:0,trigger:"click","show-arrow":!1,placement:"right-start",show:Me[t.key],onClickoutside:e=>Xe(t.key)},{trigger:g((()=>[m(v(M),{component:v(D),size:"18",onClick:e=>We(t.key)},null,8,["component","onClick"])])),default:g((()=>[e("div",fe,[(u(!0),d(c,null,y(He(v(Te),t),(n=>(u(),d("div",{class:S(["print-li",je.twoMouseType==n.key?"active":""]),key:n.key,onMouseenter:e=>$e("twoMouseType",n.key),onMouseleave:i[8]||(i[8]=e=>$e("twoMouseType",""))},[e("div",he,[e("span",{class:"label",onClick:e=>ut(n.key,t,!1)},k(n.label),9,ke)])],42,we)))),128))])])),_:2},1032,["show","onClickoutside"])):p("v-if",!0)],2)],2112))],42,se)))),128))])])),_:3},8,["show"])],2112))]),m(z,w(n.$attrs,{modelValue:Le.identityVerification.visible,"onUpdate:modelValue":i[11]||(i[11]=e=>Le.identityVerification.visible=e),formatId:Le.currentFormatId,templateId:v(Be),onSuccess:bt}),null,16,["modelValue","formatId","templateId"])],64))}});export{be as default};