workflow-editor 0.0.81-up → 0.0.81-up-tmp1

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 (175) hide show
  1. package/dist/index.full.min.js +3237 -0
  2. package/dist/style.css +1 -0
  3. package/es/_virtual/FileSaver.min.mjs +4 -0
  4. package/es/_virtual/___vite-browser-external.mjs +6 -0
  5. package/es/_virtual/__vite-browser-external.mjs +4 -0
  6. package/es/_virtual/_commonjsHelpers.mjs +30 -0
  7. package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
  8. package/es/_virtual/clipboard.mjs +4 -0
  9. package/es/_virtual/dayjs.min.mjs +4 -0
  10. package/es/_virtual/index.mjs +4 -0
  11. package/es/_virtual/nprogress.mjs +4 -0
  12. package/es/_virtual/prism.mjs +4 -0
  13. package/es/_virtual/sax.mjs +4 -0
  14. package/es/_virtual/string_decoder.mjs +4 -0
  15. package/es/_virtual/tinymce.mjs +4 -0
  16. package/es/_virtual/weekOfYear.mjs +4 -0
  17. package/es/index.mjs +20 -0
  18. package/es/plugins/formValidatorUtil.mjs +391 -0
  19. package/es/plugins/index.mjs +9 -0
  20. package/es/style.css +1 -0
  21. package/es/vite.svg +1 -0
  22. package/es/workflow-editor/index.mjs +14 -0
  23. package/lib/_virtual/FileSaver.min.cjs +1 -0
  24. package/lib/_virtual/___vite-browser-external.cjs +1 -0
  25. package/lib/_virtual/__vite-browser-external.cjs +1 -0
  26. package/lib/_virtual/_commonjsHelpers.cjs +1 -0
  27. package/lib/_virtual/_plugin-vue_export-helper.cjs +1 -0
  28. package/lib/_virtual/clipboard.cjs +1 -0
  29. package/lib/_virtual/dayjs.min.cjs +1 -0
  30. package/lib/_virtual/index.cjs +1 -0
  31. package/lib/_virtual/nprogress.cjs +1 -0
  32. package/lib/_virtual/prism.cjs +1 -0
  33. package/lib/_virtual/sax.cjs +1 -0
  34. package/lib/_virtual/string_decoder.cjs +1 -0
  35. package/lib/_virtual/tinymce.cjs +1 -0
  36. package/lib/_virtual/weekOfYear.cjs +1 -0
  37. package/lib/index.cjs +1 -0
  38. package/lib/plugins/formValidatorUtil.cjs +1 -0
  39. package/lib/plugins/index.cjs +1 -0
  40. package/lib/style.css +1 -0
  41. package/lib/workflow-editor/index.cjs +1 -0
  42. package/package.json +5 -3
  43. package/vite.config.js +44 -10
  44. package/lib/401-5a92e011.js +0 -101
  45. package/lib/404-2e472acc.js +0 -26
  46. package/lib/authredirect-ae6e75b4.js +0 -10
  47. package/lib/iframe-page-4e84c0f8.js +0 -33
  48. package/lib/index-27119bd2.js +0 -31464
  49. package/lib/index-369eae4a.js +0 -13
  50. package/lib/tab-content-iframe-index-e9146736.js +0 -33
  51. package/lib/tab-content-index-bbc6792b.js +0 -1241
  52. package/lib/tache-subprocess-history-d51d6a50.js +0 -56
  53. package/lib/workflow-editor.css +0 -1
  54. package/lib/workflow-editor.js +0 -5
  55. package/lib/workflow-editor.umd.cjs +0 -85
  56. package/packages/index.js +0 -34
  57. package/packages/plugins/formValidatorUtil.js +0 -723
  58. package/packages/plugins/index.js +0 -8
  59. package/packages/workflow-editor/index.js +0 -14
  60. package/packages/workflow-editor/src/api.js +0 -7
  61. package/packages/workflow-editor/src/assets/tab-select.png +0 -0
  62. package/packages/workflow-editor/src/assets/tab-selectWhite.png +0 -0
  63. package/packages/workflow-editor/src/assets/wf-editor-icons.js +0 -2
  64. package/packages/workflow-editor/src/constant.js +0 -8
  65. package/packages/workflow-editor/src/json-object-templates/auto-task.js +0 -70
  66. package/packages/workflow-editor/src/json-object-templates/copy-task.js +0 -72
  67. package/packages/workflow-editor/src/json-object-templates/decision.js +0 -11
  68. package/packages/workflow-editor/src/json-object-templates/end.js +0 -14
  69. package/packages/workflow-editor/src/json-object-templates/fork.js +0 -10
  70. package/packages/workflow-editor/src/json-object-templates/human-decision.js +0 -9
  71. package/packages/workflow-editor/src/json-object-templates/human-task.js +0 -208
  72. package/packages/workflow-editor/src/json-object-templates/join.js +0 -10
  73. package/packages/workflow-editor/src/json-object-templates/process.js +0 -99
  74. package/packages/workflow-editor/src/json-object-templates/start.js +0 -13
  75. package/packages/workflow-editor/src/json-object-templates/subprocess.js +0 -31
  76. package/packages/workflow-editor/src/json-object-templates/transition.js +0 -26
  77. package/packages/workflow-editor/src/main/admin-save-dialog.vue +0 -67
  78. package/packages/workflow-editor/src/main/canvas.vue +0 -493
  79. package/packages/workflow-editor/src/main/context-menu.vue +0 -147
  80. package/packages/workflow-editor/src/main/icon-svg.vue +0 -32
  81. package/packages/workflow-editor/src/main/selection-region.vue +0 -66
  82. package/packages/workflow-editor/src/main/tache-history-tooltip.vue +0 -38
  83. package/packages/workflow-editor/src/main/tache-name-input.vue +0 -19
  84. package/packages/workflow-editor/src/main/tache-subprocess-history-dialog.vue +0 -40
  85. package/packages/workflow-editor/src/main/toolbox.vue +0 -60
  86. package/packages/workflow-editor/src/main/wf-history-canvas.vue +0 -309
  87. package/packages/workflow-editor/src/process-json.js +0 -624
  88. package/packages/workflow-editor/src/process-service.js +0 -69
  89. package/packages/workflow-editor/src/properties-editors/auto-task/basic-properties.vue +0 -81
  90. package/packages/workflow-editor/src/properties-editors/auto-task/permission-settings.vue +0 -155
  91. package/packages/workflow-editor/src/properties-editors/auto-task.vue +0 -74
  92. package/packages/workflow-editor/src/properties-editors/common/additional-condition-utils.js +0 -568
  93. package/packages/workflow-editor/src/properties-editors/common/additional-condition.vue +0 -320
  94. package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields-utils.js +0 -34
  95. package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields.vue +0 -268
  96. package/packages/workflow-editor/src/properties-editors/common/common-notice-tool.vue +0 -81
  97. package/packages/workflow-editor/src/properties-editors/common/common-user-condition.vue +0 -242
  98. package/packages/workflow-editor/src/properties-editors/common/form-fields-utils.js +0 -23
  99. package/packages/workflow-editor/src/properties-editors/common/form-fields.vue +0 -117
  100. package/packages/workflow-editor/src/properties-editors/common/i18n-input.vue +0 -88
  101. package/packages/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue +0 -143
  102. package/packages/workflow-editor/src/properties-editors/common/notice-reminder.vue +0 -149
  103. package/packages/workflow-editor/src/properties-editors/common/notice.vue +0 -108
  104. package/packages/workflow-editor/src/properties-editors/common/reminder.vue +0 -272
  105. package/packages/workflow-editor/src/properties-editors/common/select-mail-template.vue +0 -92
  106. package/packages/workflow-editor/src/properties-editors/common/standard-fields.vue +0 -66
  107. package/packages/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue +0 -354
  108. package/packages/workflow-editor/src/properties-editors/common/system-role-tree.vue +0 -68
  109. package/packages/workflow-editor/src/properties-editors/common/task-title.vue +0 -165
  110. package/packages/workflow-editor/src/properties-editors/common/transactor-settings.vue +0 -275
  111. package/packages/workflow-editor/src/properties-editors/common/user-selection.vue +0 -426
  112. package/packages/workflow-editor/src/properties-editors/common/value-selection-dialog.vue +0 -272
  113. package/packages/workflow-editor/src/properties-editors/common/variables.vue +0 -139
  114. package/packages/workflow-editor/src/properties-editors/copy-task/basic-properties.vue +0 -90
  115. package/packages/workflow-editor/src/properties-editors/copy-task/permission-settings.vue +0 -155
  116. package/packages/workflow-editor/src/properties-editors/copy-task.vue +0 -95
  117. package/packages/workflow-editor/src/properties-editors/decision.vue +0 -95
  118. package/packages/workflow-editor/src/properties-editors/fork.vue +0 -77
  119. package/packages/workflow-editor/src/properties-editors/human-decision.vue +0 -49
  120. package/packages/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue +0 -62
  121. package/packages/workflow-editor/src/properties-editors/human-task/basic-properties.vue +0 -184
  122. package/packages/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.js +0 -359
  123. package/packages/workflow-editor/src/properties-editors/human-task/custom-actions.vue +0 -256
  124. package/packages/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue +0 -405
  125. package/packages/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue +0 -257
  126. package/packages/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue +0 -430
  127. package/packages/workflow-editor/src/properties-editors/human-task/editable-fields.vue +0 -206
  128. package/packages/workflow-editor/src/properties-editors/human-task/events.vue +0 -60
  129. package/packages/workflow-editor/src/properties-editors/human-task/permission-settings.vue +0 -224
  130. package/packages/workflow-editor/src/properties-editors/human-task/selection-conditions.vue +0 -499
  131. package/packages/workflow-editor/src/properties-editors/human-task.vue +0 -107
  132. package/packages/workflow-editor/src/properties-editors/join.vue +0 -49
  133. package/packages/workflow-editor/src/properties-editors/process/basic-properties.vue +0 -336
  134. package/packages/workflow-editor/src/properties-editors/process/events.vue +0 -79
  135. package/packages/workflow-editor/src/properties-editors/process/notice-settings.vue +0 -68
  136. package/packages/workflow-editor/src/properties-editors/process/parameter-settings.vue +0 -106
  137. package/packages/workflow-editor/src/properties-editors/process/permission-settings.vue +0 -28
  138. package/packages/workflow-editor/src/properties-editors/process/selectPage.vue +0 -88
  139. package/packages/workflow-editor/src/properties-editors/process.vue +0 -115
  140. package/packages/workflow-editor/src/properties-editors/subprocess/basic-properties.vue +0 -201
  141. package/packages/workflow-editor/src/properties-editors/subprocess/events.vue +0 -26
  142. package/packages/workflow-editor/src/properties-editors/subprocess/field-mappings.vue +0 -216
  143. package/packages/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue +0 -66
  144. package/packages/workflow-editor/src/properties-editors/subprocess.vue +0 -80
  145. package/packages/workflow-editor/src/properties-editors/transition/basic-properties.vue +0 -53
  146. package/packages/workflow-editor/src/properties-editors/transition.vue +0 -75
  147. package/packages/workflow-editor/src/properties-editors/user-condition.js +0 -183
  148. package/packages/workflow-editor/src/store/getters.js +0 -33
  149. package/packages/workflow-editor/src/store/workflow-editor.js +0 -153
  150. package/packages/workflow-editor/src/taches/auto-task.vue +0 -99
  151. package/packages/workflow-editor/src/taches/common-methods.js +0 -21
  152. package/packages/workflow-editor/src/taches/copy-task.vue +0 -99
  153. package/packages/workflow-editor/src/taches/custom-task.vue +0 -88
  154. package/packages/workflow-editor/src/taches/decision.vue +0 -102
  155. package/packages/workflow-editor/src/taches/end.vue +0 -76
  156. package/packages/workflow-editor/src/taches/fork.vue +0 -102
  157. package/packages/workflow-editor/src/taches/human-decision.vue +0 -102
  158. package/packages/workflow-editor/src/taches/human-task.vue +0 -113
  159. package/packages/workflow-editor/src/taches/join.vue +0 -91
  160. package/packages/workflow-editor/src/taches/joint.vue +0 -177
  161. package/packages/workflow-editor/src/taches/start.vue +0 -76
  162. package/packages/workflow-editor/src/taches/subprocess.vue +0 -99
  163. package/packages/workflow-editor/src/taches/tache-resizer.vue +0 -80
  164. package/packages/workflow-editor/src/transitions/broken-line.vue +0 -91
  165. package/packages/workflow-editor/src/transitions/curve-line.vue +0 -91
  166. package/packages/workflow-editor/src/transitions/straight-line.vue +0 -26
  167. package/packages/workflow-editor/src/transitions/transition.vue +0 -209
  168. package/packages/workflow-editor/src/transitions/virtual-transition.vue +0 -43
  169. package/packages/workflow-editor/src/util.js +0 -499
  170. package/packages/workflow-editor/src/workflow-editor.vue +0 -852
  171. package/packages/workflow-editor/src/workflow-history.vue +0 -153
  172. package/src/i18n/i18n.js +0 -16
  173. package/src/i18n/langs/cn.js +0 -521
  174. package/src/i18n/langs/en.js +0 -529
  175. /package/{public → dist}/vite.svg +0 -0
@@ -1,1241 +0,0 @@
1
- import { _ as w, p as ie, i as K, g as D, m as U, b as $, E as Q, c as L, d as z, e as se, f as ae, s as I, h as oe } from "./index-27119bd2.js";
2
- import { resolveComponent as m, openBlock as c, createBlock as p, normalizeProps as re, guardReactiveProps as le, withCtx as _, renderSlot as W, createElementBlock as g, createVNode as v, normalizeClass as k, createCommentVNode as x, Fragment as T, renderList as R, createElementVNode as S, defineComponent as j, ref as G, resolveDynamicComponent as ue, h as y, createTextVNode as ce, toDisplayString as q, TransitionGroup as de } from "vue";
3
- function X(e) {
4
- return /^(https?:|mailto:|tel:)/.test(e);
5
- }
6
- function fe(e, t) {
7
- const n = {
8
- ...t,
9
- props: e,
10
- data: t.attr,
11
- children: t.slots
12
- }, { icon: a, title: s, hasChildren: i } = n.props, o = [];
13
- let u = [h("i", { class: "amb-iconfont amb-icon-meun_post" })];
14
- return a && (u = [h(SuperIcon, { iconValue: a })]), o.push(/* @__PURE__ */ React.createElement("div", { class: "smb-sidebar-menu-item-icon" }, u)), s && o.push(
15
- /* @__PURE__ */ React.createElement("template", { slot: "title" }, /* @__PURE__ */ React.createElement(
16
- "div",
17
- {
18
- title: s,
19
- class: "smb-sidebar-menu-item-title"
20
- },
21
- s
22
- ))
23
- ), o;
24
- }
25
- const me = {
26
- props: {
27
- to: {
28
- type: String,
29
- required: !0
30
- }
31
- },
32
- methods: {
33
- isExternalLink(e) {
34
- return X(e);
35
- },
36
- linkProps(e) {
37
- return this.isExternalLink(e) ? {
38
- is: "a",
39
- href: e,
40
- target: "_blank",
41
- rel: "noopener"
42
- } : {
43
- is: "router-link",
44
- to: e
45
- };
46
- }
47
- }
48
- };
49
- function he(e, t, n, a, s, i) {
50
- const o = m("component");
51
- return c(), p(o, re(le(i.linkProps(n.to))), {
52
- default: _(() => [
53
- W(e.$slots, "default")
54
- ]),
55
- _: 3
56
- }, 16);
57
- }
58
- const pe = /* @__PURE__ */ w(me, [["render", he]]);
59
- const _e = {
60
- name: "SidebarItem",
61
- components: { Item: fe, AppLink: pe },
62
- props: {
63
- // route object
64
- item: {
65
- type: Object,
66
- required: !0
67
- },
68
- isNest: {
69
- type: Boolean,
70
- default: !1
71
- },
72
- basePath: {
73
- type: String,
74
- default: ""
75
- }
76
- },
77
- data() {
78
- return {
79
- onlyOneChild: null
80
- };
81
- },
82
- computed: {
83
- visibleChildren() {
84
- return this.item.children.filter((e) => !e.hidden);
85
- }
86
- },
87
- methods: {
88
- hasOneShowingChild(e, t) {
89
- const n = e.filter((a) => a.hidden ? !1 : (this.onlyOneChild = a, !0));
90
- return n.length === 1 ? !0 : n.length === 0 ? (this.onlyOneChild = { ...t, path: "", noShowingChildren: !0 }, !0) : !1;
91
- },
92
- resolvePath(e) {
93
- return this.isExternalLink(e) ? e : ie.resolve(this.basePath, e);
94
- },
95
- isExternalLink(e) {
96
- return X(e);
97
- }
98
- }
99
- }, ge = {
100
- key: 0,
101
- class: "menu-wrapper"
102
- };
103
- function be(e, t, n, a, s, i) {
104
- const o = m("item"), u = m("el-menu-item"), l = m("app-link"), d = m("sidebar-item", !0), f = m("el-sub-menu");
105
- return !n.item.hidden && n.item.children ? (c(), g("div", ge, [
106
- i.hasOneShowingChild(n.item.children, n.item) && (!s.onlyOneChild.children || s.onlyOneChild.noShowingChildren) && !n.item.alwaysShow ? (c(), p(l, {
107
- key: 0,
108
- to: i.resolvePath(s.onlyOneChild.path)
109
- }, {
110
- default: _(() => [
111
- v(u, {
112
- index: i.resolvePath(s.onlyOneChild.path) + "~~" + s.onlyOneChild.meta.title,
113
- class: k(["smb-sidebar-menu-item", { "submenu-title-noDropdown": !n.isNest }])
114
- }, {
115
- default: _(() => [
116
- s.onlyOneChild.meta ? (c(), p(o, {
117
- key: 0,
118
- icon: s.onlyOneChild.meta.icon || n.item.meta.icon,
119
- title: e.$t(s.onlyOneChild.meta.title)
120
- }, null, 8, ["icon", "title"])) : x("", !0)
121
- ]),
122
- _: 1
123
- }, 8, ["index", "class"])
124
- ]),
125
- _: 1
126
- }, 8, ["to"])) : (c(), p(f, {
127
- key: 1,
128
- index: i.resolvePath(n.item.path) + "~~" + n.item.meta.title,
129
- class: "smb-sidebar-menu-item"
130
- }, {
131
- title: _(() => [
132
- n.item.meta ? (c(), p(o, {
133
- key: 0,
134
- icon: n.item.meta.icon,
135
- title: e.$t(n.item.meta.title),
136
- "has-children": n.item.children.length > 0
137
- }, null, 8, ["icon", "title", "has-children"])) : x("", !0)
138
- ]),
139
- default: _(() => [
140
- (c(!0), g(T, null, R(i.visibleChildren, (r) => (c(), g(T, null, [
141
- r.children && r.children.length > 0 ? (c(), p(d, {
142
- key: 0,
143
- "is-nest": !0,
144
- item: r,
145
- "base-path": i.resolvePath(r.path),
146
- class: "nest-menu smb-sidebar-menu-item"
147
- }, null, 8, ["item", "base-path"])) : (c(), p(l, {
148
- key: 1,
149
- to: i.resolvePath(r.path)
150
- }, {
151
- default: _(() => [
152
- v(u, {
153
- index: i.resolvePath(r.path) + "~~" + r.meta.title,
154
- class: "smb-sidebar-menu-item"
155
- }, {
156
- default: _(() => [
157
- r.meta ? (c(), p(o, {
158
- key: 0,
159
- icon: r.meta.icon,
160
- title: e.$t(r.meta.title)
161
- }, null, 8, ["icon", "title"])) : x("", !0)
162
- ]),
163
- _: 2
164
- }, 1032, ["index"])
165
- ]),
166
- _: 2
167
- }, 1032, ["to"]))
168
- ], 64))), 256))
169
- ]),
170
- _: 1
171
- }, 8, ["index"]))
172
- ])) : x("", !0);
173
- }
174
- const ye = /* @__PURE__ */ w(_e, [["render", be], ["__scopeId", "data-v-11a5e054"]]);
175
- ({
176
- ...U(["sidebar", "protectedRouters"])
177
- });
178
- const ve = {
179
- name: "SvgIcon",
180
- props: {
181
- iconClass: {
182
- type: String,
183
- required: !0
184
- },
185
- className: {
186
- type: String,
187
- default: ""
188
- }
189
- },
190
- computed: {
191
- iconName() {
192
- return `#icon-${this.iconClass}`;
193
- },
194
- svgClass() {
195
- return this.className ? "svg-icon " + this.className : "svg-icon";
196
- }
197
- }
198
- }, Ce = ["xlink:href"];
199
- function we(e, t, n, a, s, i) {
200
- return c(), g("svg", {
201
- class: k(i.svgClass),
202
- "aria-hidden": "true"
203
- }, [
204
- S("use", { "xlink:href": i.iconName }, null, 8, Ce)
205
- ], 2);
206
- }
207
- const xe = /* @__PURE__ */ w(ve, [["render", we], ["__scopeId", "data-v-4497e2cb"]]), Me = ["src"], Se = ["src"], ke = {
208
- name: "SuperIcon"
209
- }, Te = /* @__PURE__ */ j({
210
- ...ke,
211
- props: {
212
- // 值为:ElementUI、custom
213
- iconType: {
214
- type: String,
215
- default: "custom"
216
- },
217
- iconValue: {
218
- type: String,
219
- required: !0,
220
- default: ""
221
- }
222
- },
223
- setup(e) {
224
- G(
225
- window.$vueApp.config.globalProperties.baseAPI + "/component/super-form/show-image?serverPath="
226
- );
227
- const t = G(
228
- window.$vueApp.config.globalProperties.baseAPI + "/component/super-form/show-svg?svgName="
229
- );
230
- return (n, a) => {
231
- const s = m("el-icon");
232
- return e.iconValue.indexOf("amb-icon-") === 0 ? (c(), g("i", {
233
- key: 0,
234
- class: k(["amb-iconfont", e.iconValue])
235
- }, null, 2)) : e.iconValue.indexOf("amb-color-icon-") === 0 ? (c(), g("i", {
236
- key: 1,
237
- class: k(["amb-color-iconfont super-icon", e.iconValue])
238
- }, null, 2)) : e.iconValue.indexOf("fa-") === 0 ? (c(), g("i", {
239
- key: 2,
240
- class: k("fa " + e.iconValue)
241
- }, null, 2)) : e.iconValue.indexOf("svg-img-") === 0 ? (c(), g("img", {
242
- key: 3,
243
- src: t.value + e.iconValue,
244
- style: { width: "1em", height: "1em" }
245
- }, null, 8, Me)) : e.iconValue.indexOf("svg-") === 0 ? (c(), p(xe, {
246
- key: 4,
247
- "icon-class": e.iconValue.substring(4)
248
- }, null, 8, ["icon-class"])) : e.iconValue.indexOf("http") === 0 || e.iconValue.indexOf("//") === 0 || e.iconValue.indexOf("data:") === 0 ? (c(), g("img", {
249
- key: 5,
250
- src: e.iconValue,
251
- style: { width: "1em", height: "1em" }
252
- }, null, 8, Se)) : (c(), p(s, { key: 6 }, {
253
- default: _(() => [
254
- (c(), p(ue(e.iconValue)))
255
- ]),
256
- _: 1
257
- }));
258
- };
259
- }
260
- });
261
- const B = /* @__PURE__ */ w(Te, [["__scopeId", "data-v-9724c62c"]]);
262
- B.install = function(e) {
263
- e.component("SuperIcon", B);
264
- };
265
- const Ae = j({
266
- name: "MenuItem",
267
- functional: !0,
268
- props: {
269
- icon: {
270
- type: String,
271
- default: ""
272
- },
273
- title: {
274
- type: String,
275
- default: ""
276
- },
277
- hasChildren: {
278
- type: Boolean,
279
- default: !1
280
- },
281
- isRoot: {
282
- type: Boolean,
283
- default: !1
284
- },
285
- code: {
286
- type: Boolean,
287
- default: !1
288
- },
289
- undoneTaskCount: {
290
- type: Number,
291
- default: 0
292
- },
293
- unreadTaskCount: {
294
- type: Number,
295
- default: 0
296
- },
297
- menuLayer: {
298
- type: Number,
299
- default: null
300
- }
301
- },
302
- render(e) {
303
- const { title: t, hasChildren: n, isRoot: a, code: s } = e, i = e.icon, o = e.menuLayer, u = [];
304
- let l = [y("i", { class: "amb-iconfont amb-icon-meun_post" })];
305
- i && (l = [y(B, { iconValue: i })]);
306
- let d = ["smb-sidebar-menu-item-title"];
307
- return !o || o <= 2 ? u.push(y("div", { class: ["smb-sidebar-menu-item-icon"] }, l)) : (u.push(y("div", { class: ["smb-sidebar-menu-item-no-icon"] })), d.push("smb-sidebar-menu-item-no-icon-title")), t && (a ? u.push(
308
- y("div", { class: d }, [
309
- y(
310
- "div",
311
- {
312
- title: t
313
- },
314
- t
315
- )
316
- ])
317
- ) : s === "undoneTask" ? u.push(
318
- y("div", { class: d }, [
319
- y(
320
- "div",
321
- {
322
- title: t
323
- },
324
- [y(Q, { value: this.undoneTaskCount, style: { display: "inline" } }, t)]
325
- )
326
- ])
327
- ) : s === "unreadTask" ? u.push(
328
- y("div", { class: d }, [
329
- y(
330
- "div",
331
- {
332
- title: t
333
- },
334
- [y(Q, { value: this.unreadTaskCount, style: { display: "inline" } }, t)]
335
- )
336
- ])
337
- ) : u.push(
338
- y("div", { class: d }, [
339
- y(
340
- "div",
341
- {
342
- title: t
343
- },
344
- t
345
- )
346
- ])
347
- )), u;
348
- }
349
- });
350
- const Ne = /* @__PURE__ */ w(Ae, [["__scopeId", "data-v-b68ec1ee"]]), Ee = {
351
- props: {
352
- to: {
353
- type: Object,
354
- required: !0
355
- }
356
- },
357
- data() {
358
- const e = this.to.isExternal, t = this.to.openWay;
359
- let n = !1;
360
- return t && t === "NEW_PAGE_OPEN" && (n = !0), {
361
- isExter: e,
362
- isOpenNewTab: n
363
- };
364
- }
365
- }, Oe = { key: 1 };
366
- function Ie(e, t, n, a, s, i) {
367
- const o = m("router-link");
368
- return c(), g("div", null, [
369
- s.isOpenNewTab ? (c(), g("div", Oe, [
370
- W(e.$slots, "default")
371
- ])) : (c(), p(o, {
372
- key: 0,
373
- to: n.to
374
- }, {
375
- default: _(() => [
376
- W(e.$slots, "default")
377
- ]),
378
- _: 3
379
- }, 8, ["to"]))
380
- ]);
381
- }
382
- const Le = /* @__PURE__ */ w(Ee, [["render", Ie]]);
383
- function P(e) {
384
- if (e) {
385
- if (e.i18Names) {
386
- const t = D(), n = JSON.parse(e.i18Names);
387
- if (n[t])
388
- return n[t];
389
- }
390
- return e.i18nValue ? e.i18nValue : e.name;
391
- }
392
- }
393
- const Y = {
394
- addTabs(e, t, n, a) {
395
- let s = !1, i, o;
396
- if (e && (i = e._menuCode, o = e._menuName), t && i)
397
- for (let u = 0; u < t.length; u++) {
398
- const l = t[u];
399
- if (console.log("item.name", l.name), i && l.code === i) {
400
- console.log("to.path--menuCode1=", i), this.$store.commit("set_active_index", i), s = !0;
401
- break;
402
- }
403
- }
404
- !s && i && (console.log("to.path--menuCode2=", i), this.$store.commit("add_tabs", {
405
- code: i,
406
- name: o,
407
- routePath: n,
408
- routeQuery: e,
409
- fullpath: a
410
- }), this.$store.commit("set_active_index", i));
411
- }
412
- };
413
- const Pe = {
414
- name: "SidebarItem",
415
- components: { Item: Ne, AppLink: Le },
416
- props: {
417
- // route object
418
- item: {
419
- type: Object,
420
- required: !0
421
- },
422
- isNest: {
423
- type: Boolean,
424
- default: !1
425
- },
426
- basePath: {
427
- type: String,
428
- default: ""
429
- }
430
- },
431
- data() {
432
- let e = "_PLAT_FORM_FRONTEND_URL", t = "_devpJWT", n = "_CURRENT_ROLE", a = L.isDevpSystem(), s, i, o;
433
- return a && (s = L.getSessionCache(e), i = L.getSessionCache(t), o = L.getSessionCache(n)), {
434
- onlyOneChild: null,
435
- platFrontUrl: s,
436
- devpJWT: i,
437
- currentRole: o,
438
- devpJWTKey: t,
439
- currentRoleKey: n,
440
- frontendUrlKey: e,
441
- isDevp: a,
442
- hasLoad: !1,
443
- undoneTaskCount: 0,
444
- unreadTaskCount: 0
445
- };
446
- },
447
- created() {
448
- this.item.code === "myTask" ? window.$vueApp.config.globalProperties.$http.get(window.$vueApp.config.globalProperties.baseAPI + "/task/tasks/to-do-task-nums").then((e) => {
449
- this.undoneTaskCount = e.undoneTaskCount, this.unreadTaskCount = e.unreadCount, this.hasLoad = !0;
450
- }).finally(() => {
451
- this.hasLoad = !0;
452
- }) : this.hasLoad = !0;
453
- },
454
- methods: {
455
- ...Y,
456
- hasOneShowingChild(e, t) {
457
- return e && e.length > 0 && (this.onlyOneChild = e[0]), e.length === 1 ? !0 : !e || e.length === 0 ? (this.onlyOneChild = { ...t, path: "", noShowingChildren: !0 }, !0) : !1;
458
- },
459
- toPath(e) {
460
- const t = {};
461
- let n;
462
- if (t.openWay = e.openWay, this.isExternalLink(e.pageType))
463
- n = e.path, n || (n = ""), n.indexOf("http:") < 0 && n.indexOf("https:") < 0 && this.platFrontUrl ? (this.platFrontUrl.lastIndexOf("/") === this.platFrontUrl.length - 1 && (this.platFrontUrl = this.platFrontUrl.substring(0, this.platFrontUrl.length - 1)), n = this.platFrontUrl + n) : (n = e.fullPath, n || (n = "")), n = this.getRoutePath(n), t.path = "/tab-content-index", this.isDevp && (t.path = "/devp-project/setting"), t.tabPath = n, t.query = {}, t.isExternal = !0, t.query.customSystem = z(), t.query._menuCode = e.code, t.query._menuName = P(e);
464
- else if (e.openWay && e.openWay === "NEW_PAGE_OPEN") {
465
- if (n = e.fullPath, n.indexOf("http:") < 0 && n.indexOf("https:") < 0) {
466
- let a = se(window.$vueApp.config.globalProperties.frontUrl);
467
- a.lastIndexOf("/") < a.length - 1 && (a = a + "/"), n = a + "#" + n;
468
- }
469
- t.query = {}, t.query._menuCode = e.code, t.path = n;
470
- } else
471
- n = e.fullPath, n || (n = ""), n.indexOf("?") > 0 ? n += "&" : n += "?", n = n + "_isNeedMenu_=false", t.path = "/tab-content-index", this.isDevp && (t.path = "/devp-project/setting"), t.tabPath = n, t.query = {}, t.query.customSystem = z(), t.query._menuCode = e.code, t.query._menuName = P(e);
472
- return t;
473
- },
474
- getRoutePath(e) {
475
- return e.indexOf("?") > 0 ? e += "&" : e += "?", e = e + "_isNeedMenu_=false", this.devpJWT && (e.indexOf("?") > 0 ? e += "&" : e += "?", e = e + this.devpJWTKey + "=" + this.devpJWT), this.currentRole && (e.indexOf("?") > 0 ? e += "&" : e += "?", e = e + this.currentRoleKey + "=" + this.currentRole), e;
476
- },
477
- isExternalLink(e) {
478
- return !!(e && e === "iframe");
479
- },
480
- clickMenu(e) {
481
- if (e.openWay && e.openWay === "NEW_PAGE_OPEN")
482
- if (e.query && e.query.src) {
483
- let t = e.query.src;
484
- t && t.indexOf("?") > 0 ? t += "&" : t += "?", e.query.customSystem && (t += "customSystem=" + e.query.customSystem), e.query._menuCode && (t += "_menuCode=" + e.query._menuCode), e.query._menuCode && (t += "_menuName=" + e.query._menuName), window.open(t, e.query._menuCode);
485
- } else {
486
- const t = e.path;
487
- window.open(t, e.query._menuCode);
488
- }
489
- else
490
- this.addTabs(
491
- e.query,
492
- this.$store.state.tabContent.openTab,
493
- e.tabPath
494
- );
495
- },
496
- getI18nName(e) {
497
- return P(e);
498
- }
499
- }
500
- }, $e = { class: "menu-wrapper" };
501
- function Re(e, t, n, a, s, i) {
502
- const o = m("item"), u = m("el-menu-item"), l = m("app-link"), d = m("sidebar-item", !0), f = m("el-sub-menu");
503
- return c(), g("div", $e, [
504
- !n.item.children || n.item.children.length === 0 ? (c(), p(l, {
505
- key: 0,
506
- to: i.toPath(n.item),
507
- onClick: t[0] || (t[0] = (r) => i.clickMenu(i.toPath(n.item)))
508
- }, {
509
- default: _(() => [
510
- v(u, {
511
- index: n.item.code + "~~" + n.item.i18nValue,
512
- class: k(["smb-sidebar-menu-item", { "submenu-title-noDropdown": !n.isNest }])
513
- }, {
514
- default: _(() => [
515
- v(o, {
516
- "menu-layer": n.item.layer,
517
- icon: n.item.iconName,
518
- title: i.getI18nName(n.item),
519
- "is-root": !0
520
- }, null, 8, ["menu-layer", "icon", "title"])
521
- ]),
522
- _: 1
523
- }, 8, ["index", "class"])
524
- ]),
525
- _: 1
526
- }, 8, ["to"])) : (c(), p(f, {
527
- key: 1,
528
- index: n.item.code + "~~" + n.item.i18nValue,
529
- class: "smb-sidebar-menu-item"
530
- }, {
531
- title: _(() => [
532
- v(o, {
533
- "menu-layer": n.item.layer,
534
- icon: n.item.iconName,
535
- title: i.getI18nName(n.item),
536
- "has-children": n.item.children.length > 0
537
- }, null, 8, ["menu-layer", "icon", "title", "has-children"])
538
- ]),
539
- default: _(() => [
540
- (c(!0), g(T, null, R(n.item.children, (r) => (c(), g(T, null, [
541
- r.children && r.children.length > 0 ? (c(), p(d, {
542
- key: r.code,
543
- "is-nest": !0,
544
- item: r,
545
- class: "nest-menu smb-sidebar-menu-item"
546
- }, null, 8, ["item"])) : s.hasLoad ? (c(), p(l, {
547
- key: r.code,
548
- to: i.toPath(r),
549
- onClick: (C) => i.clickMenu(i.toPath(r))
550
- }, {
551
- default: _(() => [
552
- v(u, {
553
- index: r.code + "~~" + r.i18nValue,
554
- class: "smb-sidebar-menu-item"
555
- }, {
556
- default: _(() => [
557
- v(o, {
558
- "menu-layer": r.layer,
559
- "undone-task-count": s.undoneTaskCount,
560
- "unread-task-count": s.unreadTaskCount,
561
- code: r.code,
562
- icon: r.iconName,
563
- title: i.getI18nName(r)
564
- }, null, 8, ["menu-layer", "undone-task-count", "unread-task-count", "code", "icon", "title"])
565
- ]),
566
- _: 2
567
- }, 1032, ["index"])
568
- ]),
569
- _: 2
570
- }, 1032, ["to", "onClick"])) : x("", !0)
571
- ], 64))), 256))
572
- ]),
573
- _: 1
574
- }, 8, ["index"]))
575
- ]);
576
- }
577
- const Fe = /* @__PURE__ */ w(Pe, [["render", Re], ["__scopeId", "data-v-ea3b506d"]]), qe = {
578
- name: "Menubar",
579
- components: {
580
- SidebarItem: Fe
581
- },
582
- props: {
583
- systemCode: {
584
- type: String,
585
- default: null
586
- },
587
- collapse: {
588
- type: Boolean,
589
- default: !1
590
- }
591
- },
592
- data() {
593
- let e;
594
- if (K() === !0) {
595
- const s = D(), i = window.$vueApp.config.globalProperties.systemNameObj;
596
- i && (e = i[s]);
597
- }
598
- const t = window.$vueApp.config.globalProperties.showFirstMenu === void 0 || window.$vueApp.config.globalProperties.showFirstMenu === null ? !0 : window.$vueApp.config.globalProperties.showFirstMenu;
599
- let n = L.isDevpSystem();
600
- const a = ae();
601
- return {
602
- firstLeafMenu: null,
603
- // 第一个有权限的叶子菜单,用于默认展开第一个父菜单
604
- systemName: e,
605
- defaultActive: "",
606
- menus: a,
607
- isSelectFirst: t,
608
- isDevp: n
609
- // backlogTotal: 0
610
- };
611
- },
612
- computed: {
613
- ...U(["sidebar"]),
614
- isCollapse() {
615
- return this.collapse === !1 ? !this.sidebar.opened : !0;
616
- }
617
- },
618
- watch: {
619
- $route() {
620
- this.firstLeafMenu = this.getFirstMenu(this.menus), this.firstLeafMenu && (this.defaultActive = this.firstLeafMenu.code + "~~" + this.firstLeafMenu.i18nValue, window.$vueApp.config.globalProperties._selectMenu = this.defaultActive);
621
- }
622
- },
623
- created() {
624
- if (this.firstLeafMenu = this.getFirstMenu(this.menus), console.log("ffff", this.firstLeafMenu), this.firstLeafMenu && (this.defaultActive = this.firstLeafMenu.code + "~~" + this.firstLeafMenu.i18nValue, window.$vueApp.config.globalProperties._selectMenu = this.defaultActive), console.log("getFirstMenu=====firstLeafMenu333=", this.firstLeafMenu), this.firstLeafMenu && this.firstLeafMenu.fullPath)
625
- if (this.firstLeafMenu.pageType && this.firstLeafMenu.pageType === "iframe") {
626
- const t = {
627
- src: this.firstLeafMenu.fullPath,
628
- customSystem: this.systemCode,
629
- _menuCode: this.firstLeafMenu.code,
630
- _menuName: P(this.firstLeafMenu)
631
- };
632
- this.addTabs(
633
- t,
634
- this.$store.state.tabContent.openTab,
635
- "/iframe-page/page",
636
- "/iframe-page/page"
637
- );
638
- let n = "/tab-content-iframe-index";
639
- this.isDevp && (n = "/devp-project/setting"), this.$router.push({ path: n, query: t });
640
- } else {
641
- const e = {
642
- customSystem: this.systemCode,
643
- _menuCode: this.firstLeafMenu.code,
644
- _menuName: P(this.firstLeafMenu)
645
- }, t = this.firstLeafMenu.fullPath;
646
- this.addTabs(e, this.$store.state.tabContent.openTab, t, t);
647
- let n = "/tab-content-index";
648
- this.isDevp && (n = "/devp-project/setting"), this.$router.push({ path: n, query: e });
649
- }
650
- },
651
- methods: {
652
- ...Y,
653
- toggleSideBar() {
654
- this.$store.dispatch("toggleSidebar");
655
- },
656
- selectMenu(e, t) {
657
- window.$vueApp.config.globalProperties._selectMenu = e, $.set("selectMenu", e);
658
- },
659
- getFirstMenu(e) {
660
- const t = this.$route.query ? this.$route.query._menuCode : null;
661
- let n;
662
- if (t ? this.isSelectFirst = !0 : this.isDevp || (n = this.getFirstMenuWithCookie(e)), console.log("getFirstMenu=====shouldSelectMenu111=", n), this.isSelectFirst && !n && e && e.length > 0)
663
- for (let a = 0; a < e.length; a++) {
664
- const s = e[a];
665
- if (n = this.getShouldSelectMenu(s, t), n)
666
- break;
667
- }
668
- return console.log("getFirstMenu=====shouldSelectMenu222=", n), n;
669
- },
670
- getShouldSelectMenu(e, t) {
671
- if (e) {
672
- let n;
673
- if (t) {
674
- const a = e.children;
675
- a && a.length > 0 ? n = this.getFirstMenu(a) : e.code && e.code === t && (n = e);
676
- } else {
677
- const a = e.children;
678
- a && a.length > 0 ? n = this.getFirstMenu(a) : n = e;
679
- }
680
- return n;
681
- }
682
- },
683
- getFirstMenuWithCookie(e) {
684
- if (e && e.length > 0) {
685
- const t = $.get("selectMenu");
686
- if (t) {
687
- const a = t.split("~~")[0];
688
- let s;
689
- for (let i = 0; i < e.length; i++) {
690
- const o = e[i];
691
- if (s = this.getShouldSelectMenuWithCookie(
692
- o,
693
- a
694
- ), s)
695
- break;
696
- }
697
- return s;
698
- }
699
- }
700
- },
701
- getShouldSelectMenuWithCookie(e, t) {
702
- if (e) {
703
- let n;
704
- const a = e.children;
705
- return a && a.length > 0 ? n = this.getFirstMenuWithCookie(a) : e.code && e.code === t && (n = e), n;
706
- }
707
- }
708
- }
709
- };
710
- function De(e, t, n, a, s, i) {
711
- const o = m("el-menu-item"), u = m("sidebar-item"), l = m("el-menu"), d = m("el-scrollbar"), f = m("hamburger");
712
- return c(), g("div", null, [
713
- v(d, { "wrap-class": "scrollbar-wrapper" }, {
714
- default: _(() => [
715
- v(l, {
716
- collapse: i.isCollapse,
717
- "default-active": s.defaultActive ? s.defaultActive : "",
718
- "show-timeout": 200,
719
- mode: "vertical",
720
- onSelect: i.selectMenu
721
- }, {
722
- default: _(() => [
723
- s.systemName ? (c(), p(o, {
724
- key: 0,
725
- title: s.systemName,
726
- class: "system-item smb-sidebar-menu-item",
727
- disabled: "",
728
- index: "1",
729
- style: { "padding-left": "10px" }
730
- }, {
731
- default: _(() => [
732
- ce(q(s.systemName), 1)
733
- ]),
734
- _: 1
735
- }, 8, ["title"])) : x("", !0),
736
- (c(!0), g(T, null, R(s.menus, (r) => (c(), p(u, {
737
- key: r.code,
738
- item: r
739
- }, null, 8, ["item"]))), 128))
740
- ]),
741
- _: 1
742
- }, 8, ["collapse", "default-active", "onSelect"])
743
- ]),
744
- _: 1
745
- }),
746
- v(f, {
747
- "is-active": e.sidebar.opened,
748
- class: "hamburger-container",
749
- onToggleClick: i.toggleSideBar
750
- }, null, 8, ["is-active", "onToggleClick"])
751
- ]);
752
- }
753
- const Ve = /* @__PURE__ */ w(qe, [["render", De]]);
754
- function We(e) {
755
- for (var t = [], n = 0; n < e.length; ) {
756
- var a = e[n];
757
- if (a === "*" || a === "+" || a === "?") {
758
- t.push({ type: "MODIFIER", index: n, value: e[n++] });
759
- continue;
760
- }
761
- if (a === "\\") {
762
- t.push({ type: "ESCAPED_CHAR", index: n++, value: e[n++] });
763
- continue;
764
- }
765
- if (a === "{") {
766
- t.push({ type: "OPEN", index: n, value: e[n++] });
767
- continue;
768
- }
769
- if (a === "}") {
770
- t.push({ type: "CLOSE", index: n, value: e[n++] });
771
- continue;
772
- }
773
- if (a === ":") {
774
- for (var s = "", i = n + 1; i < e.length; ) {
775
- var o = e.charCodeAt(i);
776
- if (
777
- // `0-9`
778
- o >= 48 && o <= 57 || // `A-Z`
779
- o >= 65 && o <= 90 || // `a-z`
780
- o >= 97 && o <= 122 || // `_`
781
- o === 95
782
- ) {
783
- s += e[i++];
784
- continue;
785
- }
786
- break;
787
- }
788
- if (!s)
789
- throw new TypeError("Missing parameter name at ".concat(n));
790
- t.push({ type: "NAME", index: n, value: s }), n = i;
791
- continue;
792
- }
793
- if (a === "(") {
794
- var u = 1, l = "", i = n + 1;
795
- if (e[i] === "?")
796
- throw new TypeError('Pattern cannot start with "?" at '.concat(i));
797
- for (; i < e.length; ) {
798
- if (e[i] === "\\") {
799
- l += e[i++] + e[i++];
800
- continue;
801
- }
802
- if (e[i] === ")") {
803
- if (u--, u === 0) {
804
- i++;
805
- break;
806
- }
807
- } else if (e[i] === "(" && (u++, e[i + 1] !== "?"))
808
- throw new TypeError("Capturing groups are not allowed at ".concat(i));
809
- l += e[i++];
810
- }
811
- if (u)
812
- throw new TypeError("Unbalanced pattern at ".concat(n));
813
- if (!l)
814
- throw new TypeError("Missing pattern at ".concat(n));
815
- t.push({ type: "PATTERN", index: n, value: l }), n = i;
816
- continue;
817
- }
818
- t.push({ type: "CHAR", index: n, value: e[n++] });
819
- }
820
- return t.push({ type: "END", index: n, value: "" }), t;
821
- }
822
- function Be(e, t) {
823
- t === void 0 && (t = {});
824
- for (var n = We(e), a = t.prefixes, s = a === void 0 ? "./" : a, i = "[^".concat(He(t.delimiter || "/#?"), "]+?"), o = [], u = 0, l = 0, d = "", f = function(M) {
825
- if (l < n.length && n[l].type === M)
826
- return n[l++].value;
827
- }, r = function(M) {
828
- var O = f(M);
829
- if (O !== void 0)
830
- return O;
831
- var H = n[l], te = H.type, ne = H.index;
832
- throw new TypeError("Unexpected ".concat(te, " at ").concat(ne, ", expected ").concat(M));
833
- }, C = function() {
834
- for (var M = "", O; O = f("CHAR") || f("ESCAPED_CHAR"); )
835
- M += O;
836
- return M;
837
- }; l < n.length; ) {
838
- var N = f("CHAR"), E = f("NAME"), A = f("PATTERN");
839
- if (E || A) {
840
- var b = N || "";
841
- s.indexOf(b) === -1 && (d += b, b = ""), d && (o.push(d), d = ""), o.push({
842
- name: E || u++,
843
- prefix: b,
844
- suffix: "",
845
- pattern: A || i,
846
- modifier: f("MODIFIER") || ""
847
- });
848
- continue;
849
- }
850
- var F = N || f("ESCAPED_CHAR");
851
- if (F) {
852
- d += F;
853
- continue;
854
- }
855
- d && (o.push(d), d = "");
856
- var Z = f("OPEN");
857
- if (Z) {
858
- var b = C(), J = f("NAME") || "", V = f("PATTERN") || "", ee = C();
859
- r("CLOSE"), o.push({
860
- name: J || (V ? u++ : ""),
861
- pattern: J && !V ? i : V,
862
- prefix: b,
863
- suffix: ee,
864
- modifier: f("MODIFIER") || ""
865
- });
866
- continue;
867
- }
868
- r("END");
869
- }
870
- return o;
871
- }
872
- function Ue(e, t) {
873
- return Je(Be(e, t), t);
874
- }
875
- function Je(e, t) {
876
- t === void 0 && (t = {});
877
- var n = Qe(t), a = t.encode, s = a === void 0 ? function(l) {
878
- return l;
879
- } : a, i = t.validate, o = i === void 0 ? !0 : i, u = e.map(function(l) {
880
- if (typeof l == "object")
881
- return new RegExp("^(?:".concat(l.pattern, ")$"), n);
882
- });
883
- return function(l) {
884
- for (var d = "", f = 0; f < e.length; f++) {
885
- var r = e[f];
886
- if (typeof r == "string") {
887
- d += r;
888
- continue;
889
- }
890
- var C = l ? l[r.name] : void 0, N = r.modifier === "?" || r.modifier === "*", E = r.modifier === "*" || r.modifier === "+";
891
- if (Array.isArray(C)) {
892
- if (!E)
893
- throw new TypeError('Expected "'.concat(r.name, '" to not repeat, but got an array'));
894
- if (C.length === 0) {
895
- if (N)
896
- continue;
897
- throw new TypeError('Expected "'.concat(r.name, '" to not be empty'));
898
- }
899
- for (var A = 0; A < C.length; A++) {
900
- var b = s(C[A], r);
901
- if (o && !u[f].test(b))
902
- throw new TypeError('Expected all "'.concat(r.name, '" to match "').concat(r.pattern, '", but got "').concat(b, '"'));
903
- d += r.prefix + b + r.suffix;
904
- }
905
- continue;
906
- }
907
- if (typeof C == "string" || typeof C == "number") {
908
- var b = s(String(C), r);
909
- if (o && !u[f].test(b))
910
- throw new TypeError('Expected "'.concat(r.name, '" to match "').concat(r.pattern, '", but got "').concat(b, '"'));
911
- d += r.prefix + b + r.suffix;
912
- continue;
913
- }
914
- if (!N) {
915
- var F = E ? "an array" : "a string";
916
- throw new TypeError('Expected "'.concat(r.name, '" to be ').concat(F));
917
- }
918
- }
919
- return d;
920
- };
921
- }
922
- function He(e) {
923
- return e.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
924
- }
925
- function Qe(e) {
926
- return e && e.sensitive ? "" : "i";
927
- }
928
- const ze = {
929
- name: "Breadcrumb",
930
- data() {
931
- return {
932
- levelList: null
933
- };
934
- },
935
- computed: {
936
- levelListWithTitle() {
937
- return this.levelList.filter(
938
- (e) => e.meta.title !== void 0 && e.meta.title !== null
939
- );
940
- }
941
- },
942
- watch: {
943
- $route() {
944
- this.getBreadcrumb();
945
- }
946
- },
947
- created() {
948
- this.getBreadcrumb();
949
- },
950
- methods: {
951
- getBreadcrumb() {
952
- const { params: e } = this.$route;
953
- console.log("this.$route.matched==", this.$route.matched);
954
- let t = this.$route.matched.filter((n) => {
955
- if (n.name) {
956
- var a = Ue(n.path);
957
- return n.path = a(e), !0;
958
- }
959
- });
960
- if (t) {
961
- let n;
962
- const a = D(), s = window.$vueApp.config.globalProperties.systemNameObj;
963
- s && (n = s[a]), t = [
964
- { path: "/", redirect: "noredirect", meta: { title: n } }
965
- ].concat(t);
966
- const i = $.get("selectMenu"), o = window.$vueApp.config.globalProperties._selectMenu;
967
- let u;
968
- if (o ? u = o : i && (u = i), u) {
969
- const l = u.substring(0, u.indexOf("~~")), d = u.substring(u.indexOf("~~") + 2);
970
- if (t && t.length > 0) {
971
- const f = t[t.length - 1];
972
- this.isShouldConcatLastMenu(d, l, f) && t.push({ path: l, meta: { title: d } });
973
- } else
974
- t.push({ path: l, meta: { title: d } });
975
- }
976
- }
977
- this.levelList = t;
978
- },
979
- // 新建页面时会把列表页面路由刷没,导致菜单路径缺少最后一层菜单问题
980
- isShouldConcatLastMenu(e, t, n) {
981
- return !!(this.isTitleNotEqual(e, n) && this.isPathNotEqual(t, n));
982
- },
983
- /**
984
- * window.$vueApp.config.globalProperties._selectMenu的菜单标题是否与最后的路由页面标题一致
985
- * 返回true表示不一样,返回false表示一样
986
- */
987
- isTitleNotEqual(e, t) {
988
- return !!(e && t.meta && e !== t.meta.title && e !== this.$t(t.meta.title));
989
- },
990
- /**
991
- * window.$vueApp.config.globalProperties._selectMenu的菜单的访问路径是否与最后的路由页面的路径一致
992
- * 返回true表示不一样,返回false表示一样
993
- */
994
- isPathNotEqual(e, t) {
995
- return !!(e && t.path && e !== t.path);
996
- }
997
- }
998
- }, Ge = { class: "no-redirect" };
999
- function Ke(e, t, n, a, s, i) {
1000
- const o = m("el-breadcrumb-item"), u = m("el-breadcrumb");
1001
- return c(), p(u, {
1002
- class: "app-breadcrumb",
1003
- separator: ">"
1004
- }, {
1005
- default: _(() => [
1006
- v(de, {
1007
- name: "breadcrumb",
1008
- tag: "span"
1009
- }, {
1010
- default: _(() => [
1011
- (c(!0), g(T, null, R(i.levelListWithTitle, (l, d) => (c(), p(o, {
1012
- key: l.path + "-" + d
1013
- }, {
1014
- default: _(() => [
1015
- S("span", Ge, q(e.$t(l.meta.title)), 1)
1016
- ]),
1017
- _: 2
1018
- }, 1024))), 128))
1019
- ]),
1020
- _: 1
1021
- })
1022
- ]),
1023
- _: 1
1024
- });
1025
- }
1026
- const je = /* @__PURE__ */ w(ze, [["render", Ke], ["__scopeId", "data-v-7ae796e7"]]), { body: Xe } = document, Ye = 1024, Ze = 3, et = {
1027
- watch: {
1028
- $route(e) {
1029
- this.device === "mobile" && this.sidebar.opened && I.dispatch("closeSidebar", { withoutAnimation: !1 });
1030
- }
1031
- },
1032
- beforeMount() {
1033
- window.addEventListener("resize", this.resizeHandler);
1034
- },
1035
- mounted() {
1036
- this.isMobile() && (I.dispatch("toggelDevice", "mobile"), I.dispatch("closeSidebar", { withoutAnimation: !0 }));
1037
- },
1038
- methods: {
1039
- isMobile() {
1040
- return Xe.getBoundingClientRect().width - Ze < Ye;
1041
- },
1042
- resizeHandler() {
1043
- if (!document.hidden) {
1044
- const e = this.isMobile();
1045
- I.dispatch("toggelDevice", e ? "mobile" : "desktop"), e && I.dispatch("closeSidebar", { withoutAnimation: !0 });
1046
- }
1047
- }
1048
- }
1049
- };
1050
- const tt = {
1051
- name: "TabContent",
1052
- data() {
1053
- let e = window.$vueApp.config.globalProperties.defaultPageTip;
1054
- e || (e = "欢迎访问Agile Builder/Welcome to Agile Builder");
1055
- let t = e, n;
1056
- return e && e.indexOf("/") > 0 && (t = e.substring(
1057
- 0,
1058
- e.lastIndexOf("/")
1059
- ), n = e.substring(
1060
- e.lastIndexOf("/") + 1
1061
- )), {
1062
- defaultPageTipCn: t,
1063
- defaultPageTipEn: n
1064
- };
1065
- },
1066
- computed: {
1067
- ...U(["openTab"]),
1068
- activeIndex: {
1069
- get() {
1070
- return this.$store.state.tabContent.activeIndex;
1071
- },
1072
- set(e) {
1073
- this.$store.commit("set_active_index", e);
1074
- }
1075
- }
1076
- },
1077
- created() {
1078
- window.addEventListener("message", this.recieveMessage);
1079
- },
1080
- mounted() {
1081
- },
1082
- unmounted() {
1083
- window.removeEventListener("message", this.recieveMessage);
1084
- },
1085
- methods: {
1086
- closeSelectedTag(e) {
1087
- const t = this.$store.state.tabContent.openTab.findIndex(
1088
- (a) => a.code === e
1089
- ), n = this.$store.state.tabContent.openTab[t];
1090
- this.$store.commit("delete_tabs", n), e === this.activeIndex && this.toLastView(
1091
- this.$store.state.tabContent.openTab,
1092
- t > 0 ? t - 1 : 0
1093
- );
1094
- },
1095
- toLastView(e, t) {
1096
- if (e && e.length > 0 && e.length > t) {
1097
- const n = e[t];
1098
- n && this.$store.commit("set_active_index", n.code);
1099
- }
1100
- },
1101
- getFullPath(e) {
1102
- let t = "";
1103
- if (e.routePath === "/iframe-page/page") {
1104
- let n, a = "";
1105
- if (e.routeQuery)
1106
- for (const s in e.routeQuery)
1107
- s === "src" ? n = e.routeQuery[s] : a += s + "=" + e.routeQuery[s] + "&";
1108
- n && (t = n), a && (t += "?" + a);
1109
- } else if (e.routePath.indexOf("http:") < 0 && e.routePath.indexOf("https:") < 0 && (t = "#"), e.routePath.indexOf("?") >= 0 ? t = t + e.routePath + "&" : t = t + e.routePath + "?", e.routeQuery)
1110
- for (const n in e.routeQuery)
1111
- t += n + "=" + e.routeQuery[n] + "&";
1112
- return t && t.length > 0 && t.lastIndexOf("&") === t.length - 1 && (t = t.substring(0, t.lastIndexOf("&"))), t;
1113
- },
1114
- recieveMessage(e) {
1115
- if (e && typeof e.data == "string" && e.data === "refreshTabContent")
1116
- window.location.reload();
1117
- else if (e && typeof e.data == "string" && e.data.indexOf("loginTimeout") >= 0) {
1118
- console.log(
1119
- "tab-content-接收到登录超时的信息---event.data=",
1120
- e.data
1121
- );
1122
- try {
1123
- const t = JSON.parse(e.data);
1124
- t.isInTab = "true", window.parent.postMessage(JSON.stringify(t), "*");
1125
- } catch {
1126
- console.error("平台 tab-content.vue中登录超时,json转换失败,event.data=", e.data);
1127
- }
1128
- } else if (e && typeof e.data == "string" && e.data === "return-to-system-list") {
1129
- this.$store.commit("clear_tabs");
1130
- let t = "_IS_APP_LIST";
1131
- const n = window.sessionStorage.getItem(t);
1132
- n !== void 0 && n === "true" ? this.$router.push({ path: "/mms/apps/list" }) : this.$router.push({ path: "/mms/systems/list" });
1133
- }
1134
- }
1135
- }
1136
- }, nt = ["src"], it = {
1137
- key: 1,
1138
- class: "default-page-tip"
1139
- }, st = { class: "default-page-tip-msg" }, at = { class: "default-page-tip-item" }, ot = { class: "default-page-tip-item" };
1140
- function rt(e, t, n, a, s, i) {
1141
- const o = m("el-tab-pane"), u = m("el-tabs");
1142
- return e.openTab && e.openTab.length > 0 ? (c(), p(u, {
1143
- key: 0,
1144
- modelValue: i.activeIndex,
1145
- "onUpdate:modelValue": t[0] || (t[0] = (l) => i.activeIndex = l),
1146
- class: "nav-tab menu-tab-container",
1147
- closable: "",
1148
- onTabRemove: i.closeSelectedTag
1149
- }, {
1150
- default: _(() => [
1151
- (c(!0), g(T, null, R(e.openTab, (l) => (c(), p(o, {
1152
- key: l.code,
1153
- label: l.name,
1154
- name: l.code
1155
- }, {
1156
- default: _(() => [
1157
- S("iframe", {
1158
- ref_for: !0,
1159
- ref: "tabMainContent",
1160
- src: i.getFullPath(l),
1161
- class: "tab-main-content",
1162
- name: "tab-main-content",
1163
- frameborder: "0"
1164
- }, null, 8, nt)
1165
- ]),
1166
- _: 2
1167
- }, 1032, ["label", "name"]))), 128))
1168
- ]),
1169
- _: 1
1170
- }, 8, ["modelValue", "onTabRemove"])) : (c(), g("div", it, [
1171
- S("div", st, [
1172
- S("div", at, q(s.defaultPageTipCn), 1),
1173
- S("div", ot, q(s.defaultPageTipEn), 1)
1174
- ])
1175
- ]));
1176
- }
1177
- const lt = /* @__PURE__ */ w(tt, [["render", rt], ["__scopeId", "data-v-f22ed8ae"]]);
1178
- const ut = {
1179
- name: "Layout",
1180
- components: {
1181
- Menubar: Ve,
1182
- Breadcrumb: je,
1183
- TabContent: lt
1184
- },
1185
- mixins: [et],
1186
- data() {
1187
- return {
1188
- showMenuRoute: oe(),
1189
- systemCode: null
1190
- };
1191
- },
1192
- computed: {
1193
- sidebar() {
1194
- return this.$store.state.app.sidebar;
1195
- },
1196
- device() {
1197
- return this.$store.state.app.device;
1198
- },
1199
- classObj() {
1200
- return {
1201
- hideSidebar: !this.sidebar.opened,
1202
- openSidebar: this.sidebar.opened,
1203
- withoutAnimation: this.sidebar.withoutAnimation,
1204
- mobile: this.device === "mobile"
1205
- };
1206
- }
1207
- },
1208
- created() {
1209
- this.systemCode = window.$vueApp.config.globalProperties.customSystem, console.log("新菜单组件-----systemCode====", this.systemCode);
1210
- },
1211
- methods: {
1212
- handleClickOutside() {
1213
- this.$store.dispatch("closeSidebar", { withoutAnimation: !1 });
1214
- }
1215
- }
1216
- }, ct = { class: "main-container" };
1217
- function dt(e, t, n, a, s, i) {
1218
- const o = m("menubar"), u = m("breadcrumb"), l = m("tab-content");
1219
- return c(), g("div", {
1220
- class: k([i.classObj, "app-wrapper"])
1221
- }, [
1222
- i.device === "mobile" && i.sidebar.opened ? (c(), g("div", {
1223
- key: 0,
1224
- class: "drawer-bg",
1225
- onClick: t[0] || (t[0] = (...d) => i.handleClickOutside && i.handleClickOutside(...d))
1226
- })) : x("", !0),
1227
- v(o, {
1228
- "system-code": s.systemCode,
1229
- collapse: !0,
1230
- class: "sidebar-container"
1231
- }, null, 8, ["system-code"]),
1232
- S("div", ct, [
1233
- s.showMenuRoute ? (c(), p(u, { key: 0 })) : x("", !0),
1234
- v(l)
1235
- ])
1236
- ], 2);
1237
- }
1238
- const ht = /* @__PURE__ */ w(ut, [["render", dt], ["__scopeId", "data-v-11180c5c"]]);
1239
- export {
1240
- ht as default
1241
- };