@ibiz-template/vue3-components 0.7.41-alpha.17 → 0.7.41-alpha.19

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 (247) hide show
  1. package/dist/chart-q7pMKjYo.js +1 -0
  2. package/dist/ibiz-markdown-editor-e33m6ees.js +1 -0
  3. package/dist/index-BoV5htv9.js +11 -0
  4. package/dist/{index-swminiXb.js → index-Bt6TkADL.js} +1 -1
  5. package/dist/{index-AOFxMmyX.js → index-K6B-Odyq.js} +1 -1
  6. package/dist/index.min.css +1 -1
  7. package/dist/index.system.min.js +1 -1
  8. package/dist/map-chart-user-NYROZ-6g.js +1 -0
  9. package/dist/wang-editor-exnzt_I1.js +1 -0
  10. package/dist/{xlsx-util-jYyM8alm.js → xlsx-util-fuTLwrKA.js} +1 -1
  11. package/es/common/control-navigation/provider/calendar-navigation.provider.mjs +3 -1
  12. package/es/common/control-navigation/provider/index.mjs +1 -1
  13. package/es/common/control-navigation/provider/map-navigation.provider.d.ts +8 -2
  14. package/es/common/control-navigation/provider/map-navigation.provider.mjs +20 -1
  15. package/es/common/map-chart-user/map-chart-user.css +1 -1
  16. package/es/common/map-chart-user/map-chart-user.d.ts +11 -1
  17. package/es/common/map-chart-user/map-chart-user.mjs +82 -6
  18. package/es/common/map-chart-user/map-chart-user.util.d.ts +2 -0
  19. package/es/common/map-chart-user/map-chart-user.util.mjs +54 -3
  20. package/es/common/map-chart-user/map-user-manager.d.ts +2 -0
  21. package/es/common/map-chart-user/map-user-manager.mjs +46 -10
  22. package/es/control/calendar/components/calendar-daily/calendar-daily.css +1 -1
  23. package/es/control/calendar/components/calendar-daily/calendar-daily.mjs +30 -43
  24. package/es/control/calendar/components/calendar-daily/use-calendar-daily.d.ts +6 -2
  25. package/es/control/calendar/components/calendar-daily/use-calendar-daily.mjs +37 -4
  26. package/es/control/calendar/components/calendar-user/calendar-user.css +1 -1
  27. package/es/control/calendar/components/calendar-user/calendar-user.mjs +1 -0
  28. package/es/control/calendar/components/calendar-week/calendar-week.css +1 -1
  29. package/es/control/calendar/components/calendar-week/calendar-week.mjs +30 -45
  30. package/es/control/calendar/components/calendar-week/use-calendar-week.d.ts +6 -2
  31. package/es/control/calendar/components/calendar-week/use-calendar-week.mjs +37 -4
  32. package/es/control/calendar/components/custom-calendar/custom-calendar.css +1 -1
  33. package/es/control/calendar/components/util/index.mjs +1 -1
  34. package/es/control/calendar/components/util/util.d.ts +30 -2
  35. package/es/control/calendar/components/util/util.mjs +32 -2
  36. package/es/control/chart/chart.mjs +1 -0
  37. package/es/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.css +1 -1
  38. package/es/control/data-view/data-view.d.ts +1 -1
  39. package/es/control/data-view/index.d.ts +1 -1
  40. package/es/control/drtab/drtab-control.util.mjs +1 -1
  41. package/es/control/drtab/drtab.controller.d.ts +5 -0
  42. package/es/control/drtab/drtab.controller.mjs +19 -0
  43. package/es/control/drtab/flow-drtab.css +1 -1
  44. package/es/control/drtab/flow-drtab.mjs +18 -5
  45. package/es/control/exp-bar/render-util.mjs +1 -12
  46. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +8 -4
  47. package/es/control/form/form-detail/form-tab-panel/form-tab-panel.css +1 -1
  48. package/es/control/form/form-detail/form-tab-panel/form-tab-panel.mjs +2 -1
  49. package/es/control/gantt/gantt.css +1 -1
  50. package/es/control/gantt/gantt.d.ts +4 -2
  51. package/es/control/gantt/gantt.mjs +130 -5
  52. package/es/control/gantt/index.d.ts +4 -2
  53. package/es/control/grid/grid/grid.d.ts +1 -1
  54. package/es/control/grid/grid/index.d.ts +1 -1
  55. package/es/control/grid/grid-column/grid-field-column/attachment-column/attachment-column.mjs +11 -2
  56. package/es/control/grid/grid-column/grid-field-column/attachment-column/file-util.d.ts +1 -1
  57. package/es/control/grid/grid-column/grid-field-column/attachment-column/file-util.mjs +39 -24
  58. package/es/control/grid/grid-column/grid-field-column/grid-field-column.css +1 -1
  59. package/es/control/grid/virtualized-table/index.d.ts +1 -1
  60. package/es/control/grid/virtualized-table/virtualized-table.d.ts +1 -1
  61. package/es/control/kanban/index.d.ts +1 -1
  62. package/es/control/kanban/kanban.d.ts +1 -1
  63. package/es/control/list/index.d.ts +1 -1
  64. package/es/control/list/list.d.ts +1 -1
  65. package/es/control/list/list.mjs +1 -1
  66. package/es/control/map/map.mjs +1 -1
  67. package/es/control/tree/index.d.ts +1 -1
  68. package/es/control/tree/tree.d.ts +5 -5
  69. package/es/control/tree/tree.mjs +5 -13
  70. package/es/control/tree-grid/index.d.ts +7 -1
  71. package/es/control/tree-grid/tree-grid.d.ts +7 -1
  72. package/es/control/tree-grid/tree-grid.mjs +62 -55
  73. package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-edit-column/all-edit.mjs +3 -1
  74. package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.css +1 -1
  75. package/es/control/tree-grid-ex/tree-grid-ex.css +1 -1
  76. package/es/control/tree-grid-ex/tree-grid-ex.mjs +32 -28
  77. package/es/editor/carousel/ibiz-carousel/ibiz-carousel.d.ts +2 -75
  78. package/es/editor/carousel/ibiz-carousel/ibiz-carousel.mjs +24 -12
  79. package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +17 -1
  80. package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.mjs +4 -2
  81. package/es/editor/html/wang-editor/wang-editor.mjs +29 -7
  82. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.d.ts +3 -0
  83. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +36 -5
  84. package/es/editor/upload/use/use-iview-upload.d.ts +0 -1
  85. package/es/editor/upload/use/use-iview-upload.mjs +50 -25
  86. package/es/index.mjs +1 -0
  87. package/es/locale/en/index.d.ts +9 -0
  88. package/es/locale/en/index.mjs +4 -0
  89. package/es/locale/zh-CN/index.d.ts +9 -0
  90. package/es/locale/zh-CN/index.mjs +4 -0
  91. package/es/panel-component/app-extend-menu/bottom-side-menu/bottom-side-menu.d.ts +1 -1
  92. package/es/panel-component/app-extend-menu/left-side-menu/left-side-menu.d.ts +1 -1
  93. package/es/panel-component/app-extend-menu/right-side-menu/right-side-menu.d.ts +1 -1
  94. package/es/panel-component/app-extend-menu/top-side-menu/top-side-menu.d.ts +1 -1
  95. package/es/panel-component/app-switch/app-switch.controller.mjs +4 -1
  96. package/es/panel-component/app-switch/app-switch.d.ts +1 -1
  97. package/es/panel-component/auth-userinfo/auth-userinfo.controller.d.ts +31 -0
  98. package/es/panel-component/auth-userinfo/auth-userinfo.controller.mjs +51 -0
  99. package/es/panel-component/auth-userinfo/auth-userinfo.css +1 -1
  100. package/es/panel-component/auth-userinfo/auth-userinfo.d.ts +7 -4
  101. package/es/panel-component/auth-userinfo/auth-userinfo.mjs +20 -5
  102. package/es/panel-component/auth-userinfo/auth-userinfo.provider.d.ts +2 -1
  103. package/es/panel-component/auth-userinfo/auth-userinfo.provider.mjs +2 -2
  104. package/es/panel-component/auth-userinfo/index.d.ts +4 -3
  105. package/es/panel-component/global-search/global-search.controller.d.ts +10 -3
  106. package/es/panel-component/global-search/global-search.controller.mjs +39 -18
  107. package/es/panel-component/global-search/global-search.d.ts +3 -1
  108. package/es/panel-component/global-search/global-search.mjs +8 -1
  109. package/es/panel-component/global-search/index.d.ts +1 -0
  110. package/es/panel-component/index-blank-placeholder/index-blank-placeholder.controller.mjs +0 -2
  111. package/es/panel-component/nav-breadcrumb/index.d.ts +1 -0
  112. package/es/panel-component/nav-breadcrumb/nav-breadcrumb.controller.d.ts +8 -1
  113. package/es/panel-component/nav-breadcrumb/nav-breadcrumb.controller.mjs +64 -18
  114. package/es/panel-component/nav-breadcrumb/nav-breadcrumb.css +1 -1
  115. package/es/panel-component/nav-breadcrumb/nav-breadcrumb.d.ts +3 -1
  116. package/es/panel-component/nav-breadcrumb/nav-breadcrumb.mjs +14 -3
  117. package/es/panel-component/nav-breadcrumb/nav-breadcrumb.service.d.ts +1 -1
  118. package/es/panel-component/nav-breadcrumb/nav-breadcrumb.service.mjs +5 -6
  119. package/es/panel-component/nav-breadcrumb/nav-breadcrumb.state.d.ts +8 -0
  120. package/es/panel-component/nav-breadcrumb/nav-breadcrumb.state.mjs +6 -0
  121. package/es/panel-component/nav-breadcrumb/nav-breadcrumb.util.d.ts +26 -1
  122. package/es/panel-component/nav-breadcrumb/nav-breadcrumb.util.mjs +50 -6
  123. package/es/panel-component/panel-app-title/panel-app-title.controller.mjs +5 -2
  124. package/es/panel-component/panel-app-title/panel-app-title.d.ts +1 -0
  125. package/es/panel-component/panel-app-title/panel-app-title.mjs +6 -0
  126. package/es/panel-component/panel-index-view-search/index.d.ts +4 -3
  127. package/es/panel-component/panel-index-view-search/panel-index-view-search.controller.d.ts +31 -0
  128. package/es/panel-component/panel-index-view-search/panel-index-view-search.controller.mjs +51 -0
  129. package/es/panel-component/panel-index-view-search/panel-index-view-search.d.ts +8 -5
  130. package/es/panel-component/panel-index-view-search/panel-index-view-search.mjs +17 -3
  131. package/es/panel-component/panel-index-view-search/panel-index-view-search.provider.d.ts +2 -1
  132. package/es/panel-component/panel-index-view-search/panel-index-view-search.provider.mjs +2 -2
  133. package/es/panel-component/panel-tab-panel/panel-tab-panel.mjs +2 -2
  134. package/es/panel-component/user-action/user-action.d.ts +1 -1
  135. package/es/panel-component/user-message/async-action/async-data-export/async-data-export.d.ts +1 -0
  136. package/es/panel-component/user-message/async-action/async-data-export/async-data-export.mjs +3 -1
  137. package/es/panel-component/view-msg-pos/view-msg-pos.d.ts +2 -1
  138. package/es/util/app-modal/app-modal-component.css +1 -1
  139. package/es/util/app-modal/app-modal-component.d.ts +6 -1
  140. package/es/util/app-modal/app-modal-component.mjs +45 -4
  141. package/es/util/fullscreen/fullscreen-util.mjs +1 -1
  142. package/es/util/icon/icon.d.ts +3 -0
  143. package/es/util/icon/icon.mjs +25 -0
  144. package/es/util/index.d.ts +1 -0
  145. package/es/util/index.mjs +1 -0
  146. package/es/view-engine/calendar-exp-view.engine.d.ts +6 -7
  147. package/es/view-engine/calendar-exp-view.engine.mjs +6 -24
  148. package/es/view-engine/edit-view.engine.d.ts +11 -0
  149. package/es/view-engine/edit-view.engine.mjs +12 -0
  150. package/es/view-engine/login-view.engine.d.ts +11 -1
  151. package/es/view-engine/login-view.engine.mjs +9 -5
  152. package/es/view-engine/mpickup-view-engine.d.ts +8 -1
  153. package/es/view-engine/mpickup-view-engine.mjs +14 -8
  154. package/es/view-engine/pickup-view.engine.d.ts +8 -1
  155. package/es/view-engine/pickup-view.engine.mjs +15 -0
  156. package/lib/common/control-navigation/provider/calendar-navigation.provider.cjs +3 -1
  157. package/lib/common/control-navigation/provider/index.cjs +1 -1
  158. package/lib/common/control-navigation/provider/map-navigation.provider.cjs +20 -1
  159. package/lib/common/map-chart-user/map-chart-user.cjs +81 -5
  160. package/lib/common/map-chart-user/map-chart-user.css +1 -1
  161. package/lib/common/map-chart-user/map-chart-user.util.cjs +54 -3
  162. package/lib/common/map-chart-user/map-user-manager.cjs +46 -10
  163. package/lib/control/calendar/components/calendar-daily/calendar-daily.cjs +29 -42
  164. package/lib/control/calendar/components/calendar-daily/calendar-daily.css +1 -1
  165. package/lib/control/calendar/components/calendar-daily/use-calendar-daily.cjs +35 -2
  166. package/lib/control/calendar/components/calendar-user/calendar-user.cjs +1 -0
  167. package/lib/control/calendar/components/calendar-user/calendar-user.css +1 -1
  168. package/lib/control/calendar/components/calendar-week/calendar-week.cjs +29 -44
  169. package/lib/control/calendar/components/calendar-week/calendar-week.css +1 -1
  170. package/lib/control/calendar/components/calendar-week/use-calendar-week.cjs +35 -2
  171. package/lib/control/calendar/components/custom-calendar/custom-calendar.css +1 -1
  172. package/lib/control/calendar/components/util/index.cjs +4 -0
  173. package/lib/control/calendar/components/util/util.cjs +34 -0
  174. package/lib/control/chart/chart.cjs +1 -0
  175. package/lib/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.css +1 -1
  176. package/lib/control/drtab/drtab-control.util.cjs +1 -1
  177. package/lib/control/drtab/drtab.controller.cjs +19 -0
  178. package/lib/control/drtab/flow-drtab.cjs +17 -4
  179. package/lib/control/drtab/flow-drtab.css +1 -1
  180. package/lib/control/exp-bar/render-util.cjs +1 -12
  181. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +7 -3
  182. package/lib/control/form/form-detail/form-tab-panel/form-tab-panel.cjs +2 -1
  183. package/lib/control/form/form-detail/form-tab-panel/form-tab-panel.css +1 -1
  184. package/lib/control/gantt/gantt.cjs +129 -4
  185. package/lib/control/gantt/gantt.css +1 -1
  186. package/lib/control/grid/grid-column/grid-field-column/attachment-column/attachment-column.cjs +11 -2
  187. package/lib/control/grid/grid-column/grid-field-column/attachment-column/file-util.cjs +39 -24
  188. package/lib/control/grid/grid-column/grid-field-column/grid-field-column.css +1 -1
  189. package/lib/control/list/list.cjs +1 -1
  190. package/lib/control/map/map.cjs +1 -1
  191. package/lib/control/tree/tree.cjs +5 -13
  192. package/lib/control/tree-grid/tree-grid.cjs +62 -55
  193. package/lib/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-edit-column/all-edit.cjs +3 -1
  194. package/lib/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.css +1 -1
  195. package/lib/control/tree-grid-ex/tree-grid-ex.cjs +32 -28
  196. package/lib/control/tree-grid-ex/tree-grid-ex.css +1 -1
  197. package/lib/editor/carousel/ibiz-carousel/ibiz-carousel.cjs +24 -12
  198. package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +17 -1
  199. package/lib/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.cjs +4 -2
  200. package/lib/editor/html/wang-editor/wang-editor.cjs +29 -7
  201. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +36 -5
  202. package/lib/editor/upload/use/use-iview-upload.cjs +50 -25
  203. package/lib/index.cjs +3 -0
  204. package/lib/locale/en/index.cjs +4 -0
  205. package/lib/locale/zh-CN/index.cjs +4 -0
  206. package/lib/panel-component/app-switch/app-switch.controller.cjs +4 -1
  207. package/lib/panel-component/auth-userinfo/auth-userinfo.cjs +20 -5
  208. package/lib/panel-component/auth-userinfo/auth-userinfo.controller.cjs +53 -0
  209. package/lib/panel-component/auth-userinfo/auth-userinfo.css +1 -1
  210. package/lib/panel-component/auth-userinfo/auth-userinfo.provider.cjs +2 -2
  211. package/lib/panel-component/global-search/global-search.cjs +8 -1
  212. package/lib/panel-component/global-search/global-search.controller.cjs +39 -18
  213. package/lib/panel-component/index-blank-placeholder/index-blank-placeholder.controller.cjs +0 -2
  214. package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.cjs +14 -3
  215. package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.controller.cjs +63 -17
  216. package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.css +1 -1
  217. package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.service.cjs +4 -5
  218. package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.state.cjs +6 -0
  219. package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.util.cjs +52 -5
  220. package/lib/panel-component/panel-app-title/panel-app-title.cjs +6 -0
  221. package/lib/panel-component/panel-app-title/panel-app-title.controller.cjs +5 -2
  222. package/lib/panel-component/panel-index-view-search/panel-index-view-search.cjs +16 -2
  223. package/lib/panel-component/panel-index-view-search/panel-index-view-search.controller.cjs +53 -0
  224. package/lib/panel-component/panel-index-view-search/panel-index-view-search.provider.cjs +2 -2
  225. package/lib/panel-component/panel-tab-panel/panel-tab-panel.cjs +2 -2
  226. package/lib/panel-component/user-message/async-action/async-data-export/async-data-export.cjs +3 -1
  227. package/lib/util/app-modal/app-modal-component.cjs +43 -2
  228. package/lib/util/app-modal/app-modal-component.css +1 -1
  229. package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
  230. package/lib/util/icon/icon.cjs +28 -0
  231. package/lib/util/index.cjs +3 -0
  232. package/lib/view-engine/calendar-exp-view.engine.cjs +6 -24
  233. package/lib/view-engine/edit-view.engine.cjs +12 -0
  234. package/lib/view-engine/login-view.engine.cjs +9 -5
  235. package/lib/view-engine/mpickup-view-engine.cjs +14 -8
  236. package/lib/view-engine/pickup-view.engine.cjs +15 -0
  237. package/package.json +6 -6
  238. package/dist/chart-8QfxarWf.js +0 -1
  239. package/dist/ibiz-markdown-editor-0VHzFa2l.js +0 -1
  240. package/dist/index-t1aZ8OJE.js +0 -11
  241. package/dist/map-chart-user-xOSZGbF2.js +0 -1
  242. package/dist/wang-editor-Y8puaTx2.js +0 -1
  243. package/es/editor/upload/use/use-ibiz-upload.d.ts +0 -95
  244. package/es/editor/upload/use/use-ibiz-upload.mjs +0 -170
  245. package/lib/editor/upload/use/use-ibiz-upload.cjs +0 -175
  246. /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.17_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.18_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
  247. /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.17_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.18_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
@@ -9,7 +9,6 @@ function useIViewUpload(props, valueChange, c) {
9
9
  const uploadHeaders = ibiz.util.file.getUploadHeaders();
10
10
  const headers = vue.ref({ ...uploadHeaders });
11
11
  const uploadUrl = vue.ref("");
12
- const downloadUrl = vue.ref("");
13
12
  const uploadCache = {
14
13
  count: 0,
15
14
  cacheFiles: []
@@ -23,6 +22,22 @@ function useIViewUpload(props, valueChange, c) {
23
22
  },
24
23
  { immediate: true }
25
24
  );
25
+ const getDownloadUrl = (data, file) => {
26
+ const editorParams = { ...c.editorParams };
27
+ if (editorParams.exportparams) {
28
+ editorParams.exportParams = JSON.parse(editorParams.exportparams);
29
+ }
30
+ if (file && file.folder) {
31
+ editorParams.osscat = file.folder;
32
+ }
33
+ const urls = ibiz.util.file.calcFileUpDownUrl(
34
+ c.context,
35
+ c.params,
36
+ data,
37
+ editorParams
38
+ );
39
+ return urls.downloadUrl;
40
+ };
26
41
  vue.watch(
27
42
  () => props.data,
28
43
  (newVal) => {
@@ -31,9 +46,6 @@ function useIViewUpload(props, valueChange, c) {
31
46
  if (editorParams.uploadparams) {
32
47
  editorParams.uploadParams = JSON.parse(editorParams.uploadparams);
33
48
  }
34
- if (editorParams.exportparams) {
35
- editorParams.exportParams = JSON.parse(editorParams.exportparams);
36
- }
37
49
  const urls = ibiz.util.file.calcFileUpDownUrl(
38
50
  c.context,
39
51
  c.params,
@@ -41,7 +53,6 @@ function useIViewUpload(props, valueChange, c) {
41
53
  editorParams
42
54
  );
43
55
  uploadUrl.value = urls.uploadUrl;
44
- downloadUrl.value = urls.downloadUrl;
45
56
  }
46
57
  },
47
58
  { immediate: true, deep: true }
@@ -86,24 +97,23 @@ function useIViewUpload(props, valueChange, c) {
86
97
  vue.watch(
87
98
  files,
88
99
  (newVal) => {
89
- if ((newVal == null ? void 0 : newVal.length) && downloadUrl.value) {
100
+ if (newVal == null ? void 0 : newVal.length) {
90
101
  newVal.forEach((file) => {
91
- file.url = file.url || downloadUrl.value.replace("%fileId%", file.id);
92
- if (file.name.split(".").pop() === "svg") {
93
- calcSvgPreview(file);
94
- }
95
- });
96
- }
97
- },
98
- { immediate: true }
99
- );
100
- vue.watch(
101
- downloadUrl,
102
- (newVal) => {
103
- if (newVal && files.value.length) {
104
- files.value.forEach((file) => {
105
- file.url = downloadUrl.value.replace("%fileId%", file.id);
106
- if (file.name.split(".").pop() === "svg") {
102
+ const downloadUrl = getDownloadUrl(props.data, file);
103
+ file.url = file.url || downloadUrl.replace("%fileId%", file.id);
104
+ if (ibiz.config.common.enableDownloadTicket) {
105
+ ibiz.util.file.getDownloadTicket(c.context, { fileId: file.id }).then((downloadTicket) => {
106
+ if (downloadTicket && downloadTicket.ticket) {
107
+ file.url = downloadUrl.replace(
108
+ "%fileId%",
109
+ downloadTicket.ticket
110
+ );
111
+ if (file.name.split(".").pop() === "svg") {
112
+ calcSvgPreview(file);
113
+ }
114
+ }
115
+ });
116
+ } else if (file.name.split(".").pop() === "svg") {
107
117
  calcSvgPreview(file);
108
118
  }
109
119
  });
@@ -117,6 +127,7 @@ function useIViewUpload(props, valueChange, c) {
117
127
  _files.map((file) => ({
118
128
  name: file.name,
119
129
  id: file.id,
130
+ folder: file.folder,
120
131
  ...c.transformInfoMap(file, c.infoMap, true)
121
132
  }))
122
133
  ) : null;
@@ -142,9 +153,13 @@ function useIViewUpload(props, valueChange, c) {
142
153
  if (!response) {
143
154
  return;
144
155
  }
156
+ if (ibiz.config.common.enableDownloadTicket) {
157
+ ibiz.util.file.setDownloadTicket(response.id, response.ticket);
158
+ }
145
159
  uploadCache.cacheFiles.push({
146
160
  name: response.filename,
147
161
  id: response.fileid,
162
+ folder: response.folder,
148
163
  ...c.transformInfoMap(response, c.infoMap)
149
164
  });
150
165
  if (response.name.split(".").pop() === "svg") {
@@ -177,15 +192,25 @@ function useIViewUpload(props, valueChange, c) {
177
192
  emitValue();
178
193
  };
179
194
  const onDownload = (file) => {
180
- const url = file.url || downloadUrl.value.replace("%fileId%", file.id);
181
- ibiz.util.file.fileDownload(url, file.name);
195
+ const downloadUrl = getDownloadUrl(props.data, file);
196
+ const url = file.url || downloadUrl.replace("%fileId%", file.id);
197
+ const editorParams = { ...c.editorParams };
198
+ if (editorParams.exportparams) {
199
+ editorParams.exportParams = JSON.parse(editorParams.exportparams);
200
+ }
201
+ ibiz.util.file.fileDownload(url, file.name, {
202
+ context: c.context,
203
+ params: c.params,
204
+ data: props.data,
205
+ file: { fileId: file.id, ...file },
206
+ extraParams: editorParams
207
+ });
182
208
  };
183
209
  const limit = vue.computed(() => {
184
210
  return c.multiple ? 9999 : 1;
185
211
  });
186
212
  return {
187
213
  uploadUrl,
188
- downloadUrl,
189
214
  headers,
190
215
  files,
191
216
  limit,
package/lib/index.cjs CHANGED
@@ -183,6 +183,7 @@ var keydownUtil = require('./util/keydown-util/keydown-util.cjs');
183
183
  var aiUtil = require('./util/ai-util/ai-util.cjs');
184
184
  var buttonUtil = require('./util/button-util/button-util.cjs');
185
185
  var wangEditorUtil = require('./util/wang-editor-util/wang-editor-util.cjs');
186
+ var icon = require('./util/icon/icon.cjs');
186
187
  var authGuard = require('./web-app/guard/auth-guard/auth-guard.cjs');
187
188
  var main = require('./web-app/main.cjs');
188
189
  var index$1e = require('./web-app/router/index.cjs');
@@ -372,6 +373,8 @@ exports.useFocusByEnter = keydownUtil.useFocusByEnter;
372
373
  exports.calcAiToolbarItemsByAc = aiUtil.calcAiToolbarItemsByAc;
373
374
  exports.convertBtnType = buttonUtil.convertBtnType;
374
375
  exports.parseHtml = wangEditorUtil.parseHtml;
376
+ exports.ArrowLeftBold = icon.ArrowLeftBold;
377
+ exports.ArrowRightBold = icon.ArrowRightBold;
375
378
  exports.AuthGuard = authGuard.AuthGuard;
376
379
  exports.runApp = main.runApp;
377
380
  exports.AppRouter = index$1e.AppRouter;
@@ -808,6 +808,10 @@ var index = {
808
808
  aiDesc: "After deletion, the conversation will not be recoverable. Are you sure to delete?",
809
809
  clearTopic: "Clear conversation",
810
810
  clearTopicDesc: "Are you sure to clear all conversation data except for the current activation item?"
811
+ },
812
+ appModal: {
813
+ prev: "Previous record",
814
+ next: "Next record"
811
815
  }
812
816
  },
813
817
  // runTime
@@ -804,6 +804,10 @@ var index = {
804
804
  aiDesc: "\u5220\u9664\u540E\uFF0C\u8BE5\u5BF9\u8BDD\u5C06\u4E0D\u53EF\u6062\u590D\u3002\u786E\u8BA4\u5220\u9664\u5417\uFF1F",
805
805
  clearTopic: "\u6E05\u7A7A\u4F1A\u8BDD",
806
806
  clearTopicDesc: "\u786E\u8BA4\u6E05\u7A7A\u9664\u5F53\u524D\u6FC0\u6D3B\u9879\u5916\u7684\u6240\u6709\u4F1A\u8BDD\u6570\u636E\uFF1F"
807
+ },
808
+ appModal: {
809
+ prev: "\u4E0A\u4E00\u4E2A\u8BB0\u5F55",
810
+ next: "\u4E0B\u4E00\u4E2A\u8BB0\u5F55"
807
811
  }
808
812
  },
809
813
  // runTime
@@ -261,7 +261,10 @@ class AppSwitchController extends runtime.PanelItemController {
261
261
  await ibiz.hub.getAppAsync(tempKey);
262
262
  }
263
263
  const targetAppModel = ibiz.hub.getAppSourceModel(tempKey);
264
- if (targetAppModel.getDefaultPSAppIndexView) {
264
+ const defaultApp = ibiz.hub.getApp();
265
+ if (defaultApp.model.appId === tempKey && window.Environment.AppTitle) {
266
+ ibiz.env.AppTitle = window.Environment.AppTitle;
267
+ } else if (targetAppModel.getDefaultPSAppIndexView) {
265
268
  const view = targetAppModel.getDefaultPSAppIndexView;
266
269
  if (targetAppModel.caption) {
267
270
  ibiz.env.AppTitle = targetAppModel.caption;
@@ -4,7 +4,7 @@ var vue = require('vue');
4
4
  var vueRouter = require('vue-router');
5
5
  var vue3Util = require('@ibiz-template/vue3-util');
6
6
  require('./auth-userinfo.css');
7
- var runtime = require('@ibiz-template/runtime');
7
+ var authUserinfo_controller = require('./auth-userinfo.controller.cjs');
8
8
 
9
9
  "use strict";
10
10
  const AuthUserinfo = /* @__PURE__ */ vue.defineComponent({
@@ -21,7 +21,7 @@ const AuthUserinfo = /* @__PURE__ */ vue.defineComponent({
21
21
  * @description 用户信息控件控制器
22
22
  */
23
23
  controller: {
24
- type: runtime.PanelItemController,
24
+ type: authUserinfo_controller.AuthUserinfoController,
25
25
  required: true
26
26
  }
27
27
  },
@@ -45,8 +45,20 @@ const AuthUserinfo = /* @__PURE__ */ vue.defineComponent({
45
45
  ibiz.hub.controller.logout();
46
46
  };
47
47
  const isCollapse = vue.computed(() => {
48
+ const {
49
+ strictly
50
+ } = c.rawItemParams;
51
+ if (strictly && strictly === "true") {
52
+ return false;
53
+ }
48
54
  return c.panel.view.state.isCollapse;
49
55
  });
56
+ const isReadonly = vue.computed(() => {
57
+ const {
58
+ readonly
59
+ } = c.rawItemParams;
60
+ return readonly === "true";
61
+ });
50
62
  return {
51
63
  ns,
52
64
  c,
@@ -55,13 +67,16 @@ const AuthUserinfo = /* @__PURE__ */ vue.defineComponent({
55
67
  loginname,
56
68
  router,
57
69
  menuAlign,
58
- isCollapse
70
+ isCollapse,
71
+ isReadonly
59
72
  };
60
73
  },
61
74
  render() {
62
75
  return vue.createVNode("div", {
63
- "class": [this.ns.b(), this.ns.m(this.modelData.id), ...this.controller.containerClass, this.ns.is("left", this.menuAlign === "LEFT"), this.ns.is("top", this.menuAlign === "TOP"), this.ns.is("collapse", this.isCollapse)]
64
- }, [vue.createVNode(vue.resolveComponent("el-dropdown"), null, {
76
+ "class": [this.ns.b(), this.ns.m(this.modelData.id), ...this.controller.containerClass, this.ns.is("left", this.menuAlign === "LEFT"), this.ns.is("top", this.menuAlign === "TOP"), this.ns.is("collapse", this.isCollapse), this.ns.is("readonly", this.isReadonly)]
77
+ }, [vue.createVNode(vue.resolveComponent("el-dropdown"), {
78
+ "disabled": this.isReadonly
79
+ }, {
65
80
  default: () => vue.createVNode("div", {
66
81
  "class": [this.ns.b("info"), this.ns.is("collapse", this.isCollapse)]
67
82
  }, [vue.createVNode("div", {
@@ -0,0 +1,53 @@
1
+ 'use strict';
2
+
3
+ var runtime = require('@ibiz-template/runtime');
4
+
5
+ "use strict";
6
+ var __defProp = Object.defineProperty;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __publicField = (obj, key, value) => {
9
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
10
+ return value;
11
+ };
12
+ class AuthUserinfoController extends runtime.PanelItemController {
13
+ constructor() {
14
+ super(...arguments);
15
+ /**
16
+ * @description 自定义补充参数
17
+ * @exposedoc
18
+ * @type {IData}
19
+ * @memberof AuthUserinfoController
20
+ */
21
+ __publicField(this, "rawItemParams", {});
22
+ }
23
+ /**
24
+ * 初始化
25
+ *
26
+ * @return {*} {Promise<void>}
27
+ * @memberof AuthUserinfoController
28
+ */
29
+ async onInit() {
30
+ await super.onInit();
31
+ this.handleRawItemParams();
32
+ }
33
+ /**
34
+ * @description 处理自定义补充参数 [{key:'name',value:'data'}] => {name:'data'}
35
+ * @protected
36
+ * @memberof AuthUserinfoController
37
+ */
38
+ handleRawItemParams() {
39
+ var _a;
40
+ const rawItemParams = (_a = this.model.rawItem) == null ? void 0 : _a.rawItemParams;
41
+ if (Array.isArray(rawItemParams)) {
42
+ rawItemParams.forEach((item) => {
43
+ const key = item.key;
44
+ const value = item.value;
45
+ if (key && value) {
46
+ this.rawItemParams[key.toLowerCase()] = value;
47
+ }
48
+ });
49
+ }
50
+ }
51
+ }
52
+
53
+ exports.AuthUserinfoController = AuthUserinfoController;
@@ -1 +1 @@
1
- .ibiz-user-info{--ibiz-user-info-padding:0 var(--ibiz-spacing-loose);--ibiz-user-info-color:var(--ibiz-color-text-0);--ibiz-user-info-font-size:var(--ibiz-font-size-header-5);--ibiz-user-info-height:44px;display:flex;align-items:center;justify-content:flex-start;width:100%;height:100%}.ibiz-user-info .el-dropdown{width:100%;height:var(--ibiz-user-info-height);padding:var(--ibiz-user-info-padding);cursor:pointer}.ibiz-user-info.is-left .ibiz-user-info__down{display:none}.ibiz-user-info.is-top .ibiz-user-info__down{margin-left:12px;font-size:var(--ibiz-user-info-font-size)}.ibiz-user-info.is-top .ibiz-user-info-avatar{max-width:32px;max-height:32px;margin-right:var(--ibiz-spacing-base)}.ibiz-user-info.is-collapse .el-dropdown{padding:0 var(--ibiz-spacing-base-tight)}.ibiz-user-info.is-collapse .ibiz-user-info-avatar{max-width:32px;max-height:32px;margin:0}.ibiz-user-info-avatar{width:var(--ibiz-user-info-height);height:var(--ibiz-user-info-height);margin-right:10px}.ibiz-user-info-info{width:100%;display:flex;align-items:center;justify-content:space-between;color:var(--ibiz-user-info-color)}.ibiz-user-info-info.is-collapse{justify-content:center}.ibiz-user-info-name__user-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:130px;font-size:var(--ibiz-user-info-font-size);line-height:1.3}.ibiz-user-info-name__person-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:130px;margin-top:4px;font-size:var(--ibiz-font-size-small);line-height:1.2}.ibiz-user-info-name.is-collapse{display:none}.ibiz-user-info-label{display:flex;align-items:center;justify-content:flex-start;font-size:var(--ibiz-user-info-font-size);color:var(--ibiz-user-info-color);outline:0}
1
+ .ibiz-user-info{--ibiz-user-info-padding:0 var(--ibiz-spacing-loose);--ibiz-user-info-color:var(--ibiz-color-text-0);--ibiz-user-info-font-size:var(--ibiz-font-size-header-5);--ibiz-user-info-height:44px;display:flex;align-items:center;justify-content:flex-start;width:100%;height:100%}.ibiz-user-info .el-dropdown{width:100%;height:var(--ibiz-user-info-height);padding:var(--ibiz-user-info-padding);cursor:pointer}.ibiz-user-info.is-left .ibiz-user-info__down{display:none}.ibiz-user-info.is-top .ibiz-user-info__down{margin-left:12px;font-size:var(--ibiz-user-info-font-size)}.ibiz-user-info.is-top .ibiz-user-info-avatar{max-width:32px;max-height:32px;margin-right:var(--ibiz-spacing-base)}.ibiz-user-info.is-collapse .el-dropdown{padding:0 var(--ibiz-spacing-base-tight)}.ibiz-user-info.is-collapse .ibiz-user-info-avatar{max-width:32px;max-height:32px;margin:0}.ibiz-user-info.is-readonly .el-dropdown{cursor:default}.ibiz-user-info-avatar{width:var(--ibiz-user-info-height);height:var(--ibiz-user-info-height);margin-right:10px}.ibiz-user-info-info{width:100%;display:flex;align-items:center;justify-content:space-between;color:var(--ibiz-user-info-color)}.ibiz-user-info-info.is-collapse{justify-content:center}.ibiz-user-info-name__user-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:130px;font-size:var(--ibiz-user-info-font-size);line-height:1.3}.ibiz-user-info-name__person-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:130px;margin-top:4px;font-size:var(--ibiz-font-size-small);line-height:1.2}.ibiz-user-info-name.is-collapse{display:none}.ibiz-user-info-label{display:flex;align-items:center;justify-content:flex-start;font-size:var(--ibiz-user-info-font-size);color:var(--ibiz-user-info-color);outline:0}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var runtime = require('@ibiz-template/runtime');
3
+ var authUserinfo_controller = require('./auth-userinfo.controller.cjs');
4
4
 
5
5
  "use strict";
6
6
  var __defProp = Object.defineProperty;
@@ -14,7 +14,7 @@ class AuthUserinfoProvider {
14
14
  __publicField(this, "component", "IBizAuthUserinfo");
15
15
  }
16
16
  async createController(panelItem, panel, parent) {
17
- const c = new runtime.PanelItemController(panelItem, panel, parent);
17
+ const c = new authUserinfo_controller.AuthUserinfoController(panelItem, panel, parent);
18
18
  await c.init();
19
19
  return c;
20
20
  }
@@ -48,6 +48,12 @@ const GlobalSearch = /* @__PURE__ */ vue.defineComponent({
48
48
  const showEmpty = histories.includes(query) && list.length === 0;
49
49
  return (showSearch || showEmpty || showHistory || loading) && activated.value;
50
50
  });
51
+ const curPlaceholder = vue.computed(() => {
52
+ const {
53
+ placeholder
54
+ } = c.rawItemParams;
55
+ return placeholder || ibiz.i18n.t("panelComponent.globalSearch.placeholder");
56
+ });
51
57
  const handleEnter = (event) => {
52
58
  if (event.key === "Enter") {
53
59
  activated.value = true;
@@ -190,6 +196,7 @@ const GlobalSearch = /* @__PURE__ */ vue.defineComponent({
190
196
  visible,
191
197
  editorRef,
192
198
  searchValue,
199
+ curPlaceholder,
193
200
  handleFocus,
194
201
  handleEnter,
195
202
  renderAction,
@@ -214,7 +221,7 @@ const GlobalSearch = /* @__PURE__ */ vue.defineComponent({
214
221
  "ref": "editorRef",
215
222
  "modelValue": this.searchValue,
216
223
  "onUpdate:modelValue": ($event) => this.searchValue = $event,
217
- "placeholder": ibiz.i18n.t("panelComponent.globalSearch.placeholder"),
224
+ "placeholder": this.curPlaceholder,
218
225
  "class": [this.ns.e("search"), this.ns.is("search", this.visible)],
219
226
  "onFocus": this.handleFocus,
220
227
  "onKeyup": this.handleEnter,
@@ -2,7 +2,6 @@
2
2
 
3
3
  var runtime = require('@ibiz-template/runtime');
4
4
  var qxUtil = require('qx-util');
5
- var core = require('@ibiz-template/core');
6
5
  var globalSearch_state = require('./global-search.state.cjs');
7
6
 
8
7
  "use strict";
@@ -32,7 +31,7 @@ class GlobalSearchController extends runtime.PanelItemController {
32
31
  /**
33
32
  * @description 自定义参数
34
33
  * @exposedoc
35
- * @protected
34
+ * @public
36
35
  * @type {IData}
37
36
  * @memberof GlobalSearchController
38
37
  */
@@ -127,6 +126,38 @@ class GlobalSearchController extends runtime.PanelItemController {
127
126
  if (cache)
128
127
  this.state.histories = JSON.parse(cache);
129
128
  }
129
+ /**
130
+ * @description 获取全局搜索应用功能
131
+ * @param {IAppMenuItem[]} appMenuItems
132
+ * @returns {*} {Promise<IAppFunc[]>}
133
+ * @memberof GlobalSearchController
134
+ */
135
+ async getSearchFunc(appMenuItems) {
136
+ const result = [];
137
+ const promises = appMenuItems.map(async (menuItem) => {
138
+ try {
139
+ if (menuItem.appMenuItems) {
140
+ const subFuncs = await this.getSearchFunc(menuItem.appMenuItems);
141
+ result.push(...subFuncs);
142
+ return;
143
+ }
144
+ if (menuItem.appFuncId) {
145
+ let app = ibiz.hub.getApp(menuItem.appId);
146
+ if (!app) {
147
+ app = await ibiz.hub.getAppAsync(menuItem.appId);
148
+ }
149
+ const appFunc = app.getAppFunc(menuItem.appFuncId);
150
+ if (appFunc && appFunc.appFuncType === "SEARCH" && appFunc.appDEACModeId && appFunc.appDataEntityId) {
151
+ result.push(appFunc);
152
+ }
153
+ }
154
+ } catch (err) {
155
+ console.error("\u8BA1\u7B97\u83DC\u5355\u5E94\u7528\u529F\u80FD\u5F02\u5E38: ".concat(menuItem.appFuncId), err);
156
+ }
157
+ });
158
+ await Promise.all(promises);
159
+ return result;
160
+ }
130
161
  /**
131
162
  * 初始化全局搜索项
132
163
  *
@@ -134,24 +165,14 @@ class GlobalSearchController extends runtime.PanelItemController {
134
165
  * @memberof GlobalSearchController
135
166
  */
136
167
  async initGlobalSearchItem() {
137
- const appMenu = runtime.getControl(this.panel.view.model, "appmenu");
168
+ const appMenu = runtime.getControl(
169
+ this.panel.view.model,
170
+ "appmenu"
171
+ );
138
172
  if (!appMenu)
139
173
  return;
140
- const appFuncs = [];
141
- core.recursiveIterate(
142
- appMenu,
143
- (menuItem) => {
144
- if (menuItem.appFuncId) {
145
- const app = ibiz.hub.getApp(menuItem.appId);
146
- const appFunc = app.getAppFunc(menuItem.appFuncId);
147
- if (appFunc && appFunc.appFuncType === "SEARCH" && appFunc.appDEACModeId && appFunc.appDataEntityId)
148
- appFuncs.push(appFunc);
149
- }
150
- },
151
- {
152
- childrenFields: ["appMenuItems"]
153
- }
154
- );
174
+ const appMenuItems = appMenu.appMenuItems || [];
175
+ const appFuncs = await this.getSearchFunc(appMenuItems);
155
176
  await Promise.all(
156
177
  appFuncs.map(async (func) => {
157
178
  const deACMode = await runtime.getDeACMode(
@@ -59,8 +59,6 @@ class IndexBlankPlaceholderController extends runtime.PanelItemController {
59
59
  const appView = await ibiz.hub.config.view.get(appViewId);
60
60
  const { openMode = "INDEXVIEWTAB" } = appView;
61
61
  this.state.visible = !openMode.startsWith("INDEXVIEWTAB");
62
- } else {
63
- this.state.visible = true;
64
62
  }
65
63
  });
66
64
  }
@@ -4,6 +4,7 @@ var vue = require('vue');
4
4
  var vue3Util = require('@ibiz-template/vue3-util');
5
5
  var vueRouter = require('vue-router');
6
6
  var navBreadcrumb_controller = require('./nav-breadcrumb.controller.cjs');
7
+ var navBreadcrumb_util = require('./nav-breadcrumb.util.cjs');
7
8
  require('./nav-breadcrumb.css');
8
9
 
9
10
  "use strict";
@@ -44,15 +45,23 @@ const NavBreadcrumb = /* @__PURE__ */ vue.defineComponent({
44
45
  breadcrumbItems
45
46
  } = c.state;
46
47
  let result = breadcrumbItems.filter((x) => x.caption);
48
+ const indexViewName = navBreadcrumb_util.getAppIndexViewName(c.panel.context);
47
49
  if (!c.showHome) {
48
- result = result.filter((x) => x.viewName !== ibiz.hub.defaultAppIndexViewName);
50
+ result = result.filter((x) => x.viewName !== indexViewName);
49
51
  }
50
52
  return result;
51
53
  });
54
+ const onClick = (event, item) => {
55
+ if (item.type === "menuItem") {
56
+ event.stopPropagation();
57
+ c.openMenuItemView(item, event);
58
+ }
59
+ };
52
60
  return {
53
61
  ns,
54
62
  c,
55
- items
63
+ items,
64
+ onClick
56
65
  };
57
66
  },
58
67
  render() {
@@ -67,7 +76,9 @@ const NavBreadcrumb = /* @__PURE__ */ vue.defineComponent({
67
76
  label += " - ".concat(item.dataInfo);
68
77
  }
69
78
  return vue.createVNode(vue.resolveComponent("el-breadcrumb-item"), {
70
- "to": item.fullPath
79
+ "class": this.ns.is("link", item.type === "menuItem"),
80
+ "to": item.fullPath,
81
+ "onClick": (event) => this.onClick(event, item)
71
82
  }, _isSlot(label) ? label : {
72
83
  default: () => [label]
73
84
  });
@@ -110,24 +110,33 @@ class NavBreadcrumbController extends runtime.PanelItemController {
110
110
  }
111
111
  if (this.navMode === "store") {
112
112
  const { currentRoute } = router;
113
+ const routePath = vue3Util.route2routePath(currentRoute.value);
113
114
  const fullPath = currentRoute.value.fullPath;
114
115
  const viewName = navBreadcrumb_util.getCurViewName(router);
116
+ const menuTag = navBreadcrumb_util.getMenuTag(routePath.pathNodes);
115
117
  const chacheItem = this.service.getItem({ fullPath, viewName });
118
+ const indexViewName = navBreadcrumb_util.getAppIndexViewName(this.panel.context);
116
119
  if (chacheItem) {
117
- if (chacheItem.viewName === ibiz.hub.defaultAppIndexViewName) {
120
+ if (chacheItem.viewName === indexViewName) {
118
121
  this.service.setChache([
119
122
  { ...navBreadcrumb_util.getIndexBreadcrumb(this.panel.context), fullPath }
120
123
  ]);
121
124
  this.resetBreadcrumbs();
122
125
  return;
123
126
  }
127
+ this.service.update({ ...chacheItem, fullPath });
124
128
  const removeItems = this.service.removeAfter(fullPath);
125
129
  removeItems.forEach((item) => {
126
130
  var _a;
127
131
  (_a = this.navPos) == null ? void 0 : _a.removeCache(item.fullPath);
128
132
  });
129
133
  this.resetBreadcrumbs();
134
+ } else if (this.state.menuTag !== menuTag) {
135
+ this.setBreadcrumbByRouter(router);
136
+ } else {
137
+ this.service.add({ viewName, fullPath, type: "default" });
130
138
  }
139
+ this.state.menuTag = menuTag;
131
140
  }
132
141
  }
133
142
  /**
@@ -148,7 +157,7 @@ class NavBreadcrumbController extends runtime.PanelItemController {
148
157
  if (this.navMode === "menu") {
149
158
  return;
150
159
  }
151
- this.service.updateOrAdd({ fullPath, ...info });
160
+ this.service.update({ fullPath, type: "default", ...info });
152
161
  this.resetBreadcrumbs();
153
162
  }
154
163
  /**
@@ -164,19 +173,30 @@ class NavBreadcrumbController extends runtime.PanelItemController {
164
173
  * @param {Router} router
165
174
  * @memberof NavBreadcrumbController
166
175
  */
167
- setBreadcrumbByRouter(router) {
176
+ async setBreadcrumbByRouter(router) {
168
177
  const { currentRoute } = router;
169
178
  const routePath = vue3Util.route2routePath(currentRoute.value);
170
- const items = routePath.pathNodes.map(
171
- (node, index) => {
172
- const { appContext, pathNodes } = routePath;
179
+ const { appContext = {}, pathNodes } = routePath;
180
+ const menuTag = navBreadcrumb_util.getMenuTag(pathNodes);
181
+ let hasMenuItem = false;
182
+ const menuData = await navBreadcrumb_util.getMenuItemByTag(
183
+ menuTag,
184
+ this.appmenu,
185
+ this.panel.context
186
+ );
187
+ const calcPathNodes = routePath.pathNodes.map(
188
+ async (node, index) => {
189
+ if (this.appmenu && menuData && menuData.viewName === node.viewName) {
190
+ hasMenuItem = true;
191
+ }
173
192
  const fullPath = vue3Util.routePath2string({
174
193
  appContext,
175
194
  pathNodes: pathNodes.slice(0, index + 1)
176
195
  });
177
196
  const result = {
178
197
  viewName: node.viewName,
179
- fullPath
198
+ fullPath,
199
+ type: "default"
180
200
  };
181
201
  const chacheItem = this.service.getItem({ viewName: node.viewName });
182
202
  if (chacheItem) {
@@ -185,13 +205,28 @@ class NavBreadcrumbController extends runtime.PanelItemController {
185
205
  }
186
206
  Object.assign(result, chacheItem);
187
207
  }
188
- const viewInfo = navBreadcrumb_util.getViewInfoByViewStack(node.viewName);
208
+ const viewInfo = navBreadcrumb_util.getViewInfoByViewStack(
209
+ node.viewName,
210
+ this.panel.context
211
+ );
189
212
  if (viewInfo) {
190
213
  Object.assign(result, ramda.reject(ramda.isNil, viewInfo));
191
214
  }
192
215
  return result;
193
216
  }
194
217
  );
218
+ const items = await Promise.all(calcPathNodes);
219
+ if (!hasMenuItem && menuData) {
220
+ this.state.menuTag = menuData.tag;
221
+ const item = {
222
+ viewName: menuData.viewName,
223
+ caption: menuData.menuItem.caption,
224
+ fullPath: "",
225
+ type: "menuItem",
226
+ menuTag: menuData.tag
227
+ };
228
+ items.splice(1, 0, item);
229
+ }
195
230
  this.service.setChache(items);
196
231
  this.resetBreadcrumbs();
197
232
  }
@@ -225,6 +260,7 @@ class NavBreadcrumbController extends runtime.PanelItemController {
225
260
  return {
226
261
  caption: item.caption,
227
262
  fullPath: "",
263
+ type: "default",
228
264
  viewName: item.id
229
265
  };
230
266
  });
@@ -267,16 +303,14 @@ class NavBreadcrumbController extends runtime.PanelItemController {
267
303
  }
268
304
  if (this.appmenu) {
269
305
  this.appmenu.evt.on("onClick", async (data) => {
270
- var _a;
271
306
  const { eventArg } = data;
272
- const menuItem = this.appmenu.allAppMenuItems.find(
273
- (x) => x.id === eventArg
307
+ const menuData = await navBreadcrumb_util.getMenuItemByTag(
308
+ eventArg,
309
+ this.appmenu,
310
+ this.panel.context
274
311
  );
275
- if (menuItem) {
276
- const app = ibiz.hub.getApp(this.panel.context.srfappid);
277
- const appFunc = app.getAppFunc(menuItem.appFuncId);
278
- const viewName = ((_a = appFunc.appViewId) == null ? void 0 : _a.split(".").pop()) || "";
279
- const viewConfig = await ibiz.hub.config.view.get(viewName);
312
+ if (menuData) {
313
+ const { viewName, appFunc, viewConfig } = menuData;
280
314
  if (appFunc.openMode !== "INDEXVIEWTAB" || viewConfig && viewConfig.openMode && viewConfig.openMode !== "INDEXVIEWTAB") {
281
315
  return;
282
316
  }
@@ -287,7 +321,8 @@ class NavBreadcrumbController extends runtime.PanelItemController {
287
321
  } else {
288
322
  items.push({
289
323
  viewName,
290
- fullPath: ""
324
+ fullPath: "",
325
+ type: "default"
291
326
  });
292
327
  }
293
328
  items.unshift(navBreadcrumb_util.getIndexBreadcrumb(this.panel.context));
@@ -314,6 +349,17 @@ class NavBreadcrumbController extends runtime.PanelItemController {
314
349
  }
315
350
  Object.assign(this.rawItemParams, params);
316
351
  }
352
+ /**
353
+ * @description 打开菜单项视图
354
+ * @param {IData} item
355
+ * @param {MouseEvent} event
356
+ * @memberof NavBreadcrumbController
357
+ */
358
+ openMenuItemView(item, event) {
359
+ if (this.appmenu) {
360
+ this.appmenu.onClickMenuItem(item.menuTag, event);
361
+ }
362
+ }
317
363
  }
318
364
 
319
365
  exports.NavBreadcrumbController = NavBreadcrumbController;