super-page-runtime 2.3.46 → 2.3.47-sit2

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 (177) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +136 -136
  2. package/dist/es/components/runtime/utils/events/event-util.js +145 -137
  3. package/dist/es/components/runtime/utils/events/print-label.js +33 -34
  4. package/dist/es/components/runtime/utils/events/standard-event.js +33 -33
  5. package/dist/es/components/runtime/utils/events/validator-util.js +260 -241
  6. package/dist/es/components/runtime/utils/page-init-util.js +45 -47
  7. package/dist/es/components/runtime/utils/table-utils.js +1 -1
  8. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +1 -1
  9. package/dist/es/components/runtime/views/assemblys/button/button/{button-runtime.vue2.js → button-runtime2.vue.js} +2 -2
  10. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +1 -1
  11. package/dist/es/components/runtime/views/assemblys/button/button-group/{buttongroup-runtime.vue2.js → buttongroup-runtime2.vue.js} +2 -2
  12. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +1 -1
  13. package/dist/es/components/runtime/views/assemblys/button/dropdown/{dropdown-runtime.vue2.js → dropdown-runtime2.vue.js} +2 -2
  14. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +1 -1
  15. package/dist/es/components/runtime/views/assemblys/button/export-pdf/{exportpdf-runtime.vue2.js → exportpdf-runtime2.vue.js} +3 -3
  16. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +1 -1
  17. package/dist/es/components/runtime/views/assemblys/button/print-label/{printlabel-runtime.vue2.js → printlabel-runtime2.vue.js} +3 -3
  18. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +1 -1
  19. package/dist/es/components/runtime/views/assemblys/chart/column-line/{column-line-runtime.vue2.js → column-line-runtime2.vue.js} +2 -2
  20. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +2 -2
  21. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +6 -10
  22. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +7 -9
  23. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +1 -1
  24. package/dist/es/components/runtime/views/assemblys/chart/common/{common-homepage-search.vue2.js → common-homepage-search2.vue.js} +2 -2
  25. package/dist/es/components/runtime/views/assemblys/chart/common/home-chart-condition-render.vue.js +9 -9
  26. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +1 -1
  27. package/dist/es/components/runtime/views/assemblys/chart/gauge/{gauge-runtime.vue2.js → gauge-runtime2.vue.js} +2 -2
  28. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +1 -1
  29. package/dist/es/components/runtime/views/assemblys/chart/pie/{pie-runtime.vue2.js → pie-runtime2.vue.js} +2 -2
  30. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +1 -1
  31. package/dist/es/components/runtime/views/assemblys/chart/radar/{radar-runtime.vue2.js → radar-runtime2.vue.js} +2 -2
  32. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +1 -1
  33. package/dist/es/components/runtime/views/assemblys/chart/scatter/{scatter-runtime.vue2.js → scatter-runtime2.vue.js} +2 -2
  34. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +99 -104
  35. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +2 -2
  36. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +2 -2
  37. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +2 -2
  38. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +2 -2
  39. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +1 -1
  40. package/dist/es/components/runtime/views/assemblys/chart/table/{table-runtime.vue2.js → table-runtime2.vue.js} +9 -9
  41. package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.js +13 -13
  42. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +9 -11
  43. package/dist/es/components/runtime/views/assemblys/common/file-task-notice.vue.js +2 -2
  44. package/dist/es/components/runtime/views/assemblys/common/format-file-task-notice-message.vue.js +2 -2
  45. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +2 -2
  46. package/dist/es/components/runtime/views/assemblys/common/remove-signer-table.vue.js +2 -2
  47. package/dist/es/components/runtime/views/assemblys/common/remove-transactor-dialog.vue.js +2 -2
  48. package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +2 -2
  49. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +2 -2
  50. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +1 -1
  51. package/dist/es/components/runtime/views/assemblys/container/card/{card-runtime.vue2.js → card-runtime2.vue.js} +2 -2
  52. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +1 -1
  53. package/dist/es/components/runtime/views/assemblys/container/collapse/{collapse-runtime.vue2.js → collapse-runtime2.vue.js} +2 -2
  54. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +1 -1
  55. package/dist/es/components/runtime/views/assemblys/container/container/{container-runtime.vue2.js → container-runtime2.vue.js} +2 -2
  56. package/dist/es/components/runtime/views/assemblys/container/fixed/FixedBox.vue.js +1 -1
  57. package/dist/es/components/runtime/views/assemblys/container/fixed/{FixedBox.vue2.js → FixedBox2.vue.js} +2 -2
  58. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue.js +1 -1
  59. package/dist/es/components/runtime/views/assemblys/container/fixed/{YxAffix.vue2.js → YxAffix2.vue.js} +2 -4
  60. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +1 -1
  61. package/dist/es/components/runtime/views/assemblys/container/flex/{flex-runtime.vue2.js → flex-runtime2.vue.js} +2 -2
  62. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +1 -1
  63. package/dist/es/components/runtime/views/assemblys/container/form/{form-runtime.vue2.js → form-runtime2.vue.js} +2 -2
  64. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +1 -1
  65. package/dist/es/components/runtime/views/assemblys/container/iframe/{iframe-runtime.vue2.js → iframe-runtime2.vue.js} +5 -5
  66. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
  67. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime2.vue.js +96 -0
  68. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +1 -1
  69. package/dist/es/components/runtime/views/assemblys/container/tools/{tools-runtime.vue2.js → tools-runtime2.vue.js} +2 -2
  70. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +1 -1
  71. package/dist/es/components/runtime/views/assemblys/data/bar-code/{barcode-runtime.vue2.js → barcode-runtime2.vue.js} +9 -11
  72. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +3 -3
  73. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +2 -2
  74. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +1 -1
  75. package/dist/es/components/runtime/views/assemblys/data/table/{table-runtime.vue2.js → table-runtime2.vue.js} +2 -2
  76. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
  77. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime2.vue.js +135 -0
  78. package/dist/es/components/runtime/views/assemblys/error-render.vue.js +2 -2
  79. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +1 -1
  80. package/dist/es/components/runtime/views/assemblys/form/checkbox/{checkbox-runtime.vue2.js → checkbox-runtime2.vue.js} +2 -2
  81. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +2 -2
  82. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +1 -1
  83. package/dist/es/components/runtime/views/assemblys/form/custom/{custom-runtime.vue2.js → custom-runtime2.vue.js} +4 -4
  84. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +1 -1
  85. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime2.vue.js +102 -0
  86. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +1 -1
  87. package/dist/es/components/runtime/views/assemblys/form/dept-tree/{depttree-runtime.vue2.js → depttree-runtime2.vue.js} +2 -2
  88. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +1 -1
  89. package/dist/es/components/runtime/views/assemblys/form/divider/{divider-runtime.vue2.js → divider-runtime2.vue.js} +2 -2
  90. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +1 -1
  91. package/dist/es/components/runtime/views/assemblys/form/file-upload/{fileupload-runtime.vue2.js → fileupload-runtime2.vue.js} +5 -7
  92. package/dist/es/components/runtime/views/assemblys/form/image-upload/imageupload-runtime.vue.js +1 -1
  93. package/dist/es/components/runtime/views/assemblys/form/image-upload/{imageupload-runtime.vue2.js → imageupload-runtime2.vue.js} +4 -5
  94. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +1 -1
  95. package/dist/es/components/runtime/views/assemblys/form/input-number/{input-number-runtime.vue2.js → input-number-runtime2.vue.js} +2 -2
  96. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +1 -1
  97. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime2.vue.js +80 -0
  98. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +1 -1
  99. package/dist/es/components/runtime/views/assemblys/form/label/{label-runtime.vue2.js → label-runtime2.vue.js} +3 -5
  100. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +1 -1
  101. package/dist/es/components/runtime/views/assemblys/form/link/{link-runtime.vue2.js → link-runtime2.vue.js} +6 -8
  102. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +1 -1
  103. package/dist/es/components/runtime/views/assemblys/form/placeholder/{placeholder-runtime.vue2.js → placeholder-runtime2.vue.js} +2 -2
  104. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +1 -1
  105. package/dist/es/components/runtime/views/assemblys/form/radio/{radio-runtime.vue2.js → radio-runtime2.vue.js} +2 -2
  106. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
  107. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime2.vue.js +218 -0
  108. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
  109. package/dist/es/components/runtime/views/assemblys/form/select/{select-runtime.vue2.js → select-runtime2.vue.js} +7 -8
  110. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +1 -1
  111. package/dist/es/components/runtime/views/assemblys/form/separatelabel/{separatelabel-runtime.vue2.js → separatelabel-runtime2.vue.js} +2 -2
  112. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +1 -1
  113. package/dist/es/components/runtime/views/assemblys/form/switch/{switch-runtime.vue2.js → switch-runtime2.vue.js} +2 -2
  114. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +1 -1
  115. package/dist/es/components/runtime/views/assemblys/form/tag/{tag-runtime.vue2.js → tag-runtime2.vue.js} +3 -3
  116. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
  117. package/dist/es/components/runtime/views/assemblys/form/textarea/{textarea-runtime.vue2.js → textarea-runtime2.vue.js} +2 -2
  118. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +2 -2
  119. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +10 -12
  120. package/dist/es/components/runtime/views/assemblys/page-bottom.vue.js +2 -2
  121. package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue.js +3 -3
  122. package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box2.vue.js +56 -0
  123. package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog.vue.js +2 -2
  124. package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog2.vue.js +29 -0
  125. package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue.js +2 -2
  126. package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime2.vue.js +45 -0
  127. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +1 -1
  128. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/{pictureflow-runtime.vue2.js → pictureflow-runtime2.vue.js} +2 -2
  129. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +1 -1
  130. package/dist/es/components/runtime/views/assemblys/workflow/text-history/{textflow-runtime.vue2.js → textflow-runtime2.vue.js} +2 -2
  131. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +1 -1
  132. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/{workflowbutton-runtime.vue2.js → workflowbutton-runtime2.vue.js} +2 -2
  133. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +1 -1
  134. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/{workflownode-runtime.vue2.js → workflownode-runtime2.vue.js} +2 -2
  135. package/dist/es/components/runtime/views/home-chart.vue.js +8 -8
  136. package/dist/es/components/runtime/views/super-page-dialog.vue.js +16 -16
  137. package/dist/es/components/runtime/views/super-page.vue.d.ts +2 -2
  138. package/dist/es/components/runtime/views/super-page.vue.js +1 -1
  139. package/dist/es/components/runtime/views/{super-page.vue2.js → super-page2.vue.js} +98 -99
  140. package/dist/es/i18n/langs/cn.js +1 -1
  141. package/dist/es/i18n/langs/en.js +1 -1
  142. package/dist/es/style.css +85 -85
  143. package/package.json +2 -2
  144. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +0 -96
  145. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +0 -134
  146. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +0 -102
  147. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +0 -83
  148. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +0 -218
  149. package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +0 -55
  150. package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog.vue2.js +0 -28
  151. package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.js +0 -45
  152. /package/dist/es/components/runtime/views/assemblys/chart/common/{common-chart-header-breadcrumb.vue2.js → common-chart-header-breadcrumb2.vue.js} +0 -0
  153. /package/dist/es/components/runtime/views/assemblys/chart/common/{common-chart-header-group.vue2.js → common-chart-header-group2.vue.js} +0 -0
  154. /package/dist/es/components/runtime/views/assemblys/chart/common/{common-chart-header.vue2.js → common-chart-header2.vue.js} +0 -0
  155. /package/dist/es/components/runtime/views/assemblys/chart/common/{home-chart-condition-render.vue2.js → home-chart-condition-render2.vue.js} +0 -0
  156. /package/dist/es/components/runtime/views/assemblys/chart/table/{group-column-item.vue2.js → group-column-item2.vue.js} +0 -0
  157. /package/dist/es/components/runtime/views/assemblys/chart/table/{group-column.vue2.js → group-column2.vue.js} +0 -0
  158. /package/dist/es/components/runtime/views/assemblys/chart/table/{normal-column.vue2.js → normal-column2.vue.js} +0 -0
  159. /package/dist/es/components/runtime/views/assemblys/chart/table/{table-pageination.vue2.js → table-pageination2.vue.js} +0 -0
  160. /package/dist/es/components/runtime/views/assemblys/common/{event-call-component.vue2.js → event-call-component2.vue.js} +0 -0
  161. /package/dist/es/components/runtime/views/assemblys/common/{export-form-report-dialog.vue2.js → export-form-report-dialog2.vue.js} +0 -0
  162. /package/dist/es/components/runtime/views/assemblys/common/{file-task-notice.vue2.js → file-task-notice2.vue.js} +0 -0
  163. /package/dist/es/components/runtime/views/assemblys/common/{format-file-task-notice-message.vue2.js → format-file-task-notice-message2.vue.js} +0 -0
  164. /package/dist/es/components/runtime/views/assemblys/common/{remove-signer-dialog.vue2.js → remove-signer-dialog2.vue.js} +0 -0
  165. /package/dist/es/components/runtime/views/assemblys/common/{remove-signer-table.vue2.js → remove-signer-table2.vue.js} +0 -0
  166. /package/dist/es/components/runtime/views/assemblys/common/{remove-transactor-dialog.vue2.js → remove-transactor-dialog2.vue.js} +0 -0
  167. /package/dist/es/components/runtime/views/assemblys/common/{save-chart-condition-dialog.vue2.js → save-chart-condition-dialog2.vue.js} +0 -0
  168. /package/dist/es/components/runtime/views/assemblys/common/{task-informition-dialog.vue2.js → task-informition-dialog2.vue.js} +0 -0
  169. /package/dist/es/components/runtime/views/assemblys/data/table/{main-table-runtime.vue2.js → main-table-runtime2.vue.js} +0 -0
  170. /package/dist/es/components/runtime/views/assemblys/data/table/{sub-table-runtime.vue2.js → sub-table-runtime2.vue.js} +0 -0
  171. /package/dist/es/components/runtime/views/assemblys/{error-render.vue2.js → error-render2.vue.js} +0 -0
  172. /package/dist/es/components/runtime/views/assemblys/form/common/{title-suffix-element.vue2.js → title-suffix-element2.vue.js} +0 -0
  173. /package/dist/es/components/runtime/views/assemblys/{home-chart-render.vue2.js → home-chart-render2.vue.js} +0 -0
  174. /package/dist/es/components/runtime/views/assemblys/{object-render.vue2.js → object-render2.vue.js} +0 -0
  175. /package/dist/es/components/runtime/views/assemblys/{page-bottom.vue2.js → page-bottom2.vue.js} +0 -0
  176. /package/dist/es/components/runtime/views/{home-chart.vue2.js → home-chart2.vue.js} +0 -0
  177. /package/dist/es/components/runtime/views/{super-page-dialog.vue3.js → super-page-dialog3.vue.js} +0 -0
@@ -1,134 +0,0 @@
1
- import { defineComponent as e, ref as t, computed as a, onMounted as n, nextTick as l, watch as o, resolveComponent as d, createElementBlock as u, openBlock as i, normalizeClass as s, unref as r, createBlock as c, createCommentVNode as p, withDirectives as v, normalizeStyle as f, withCtx as g, createVNode as m, createElementVNode as h, createTextVNode as y, Fragment as C, toDisplayString as x, renderList as k, vShow as N } from "vue";
2
- import T from "../../../../../../assets/folder.png.js";
3
- import I from "../../../../../../assets/file.png.js";
4
- import { getFormModelFields as V } from "../../../../utils/page-init-util.js";
5
- import { setVariableValue as b, getVariableValue as L } from "../../../../utils/page-helper-util.js";
6
- import { getMenuTreeData as M, createTreeNode as w, updateTreeNode as E, deleteNode as K } from "../../../../utils/tree-utils.js";
7
- import { handleAfterInitEvent as _, handleFormEvent as j } from "../../../../utils/events/event-util.js";
8
- import { ElMessageBox as S, ElMessage as z } from "element-plus";
9
- import { checkPermission as B } from "agilebuilder-ui/src/utils/permission";
10
- const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, class: "item-row" }, D = { class: "item-side" }, H = { key: 1, class: "item-side", style: { display: "flex", "align-items": "center" } }, O = ["onClick"], U = e({ __name: "tree-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: U2 }) {
11
- var _a, _b, _c;
12
- const $ = t(), A = t(false), X = e2, Y = X.pageContext.entity ? X.pageContext.entity : {}, q = t([]);
13
- ((_a = X.configure.props) == null ? void 0 : _a.contextMenus) && (X.pageContext && X.configure && !X.pageContext.isTest ? X.configure.props.contextMenus.forEach((e3) => {
14
- if (e3.functionCodes && e3.functionCodes.length > 0) for (let t2 = 0; t2 < e3.functionCodes.length; t2++) {
15
- const a2 = e3.functionCodes[t2];
16
- if (B(a2, X.pageContext.systemCode)) return void q.value.push(e3);
17
- }
18
- else q.value.push(e3);
19
- }) : q.value = X.configure.props.contextMenus);
20
- let F = V(X.pageContext, X.configure);
21
- const G = a({ get: () => L(Y, F), set(e3) {
22
- b(Y, F, e3);
23
- } }), J = t(!!((_c = (_b = X.configure.props) == null ? void 0 : _b.base) == null ? void 0 : _c.lazy)), Q = X.configure.runtime ? X.configure.runtime : {}, Z = Q.style, ee = Q.class, te = t(), ae = t(Q.props ? Q.props : {}), ne = t({ id: "nodeId", label: "name", children: "children", isLeaf: "leaf", disabled: "disabled", nodeType: "nodeType", iconType: "iconType", iconValue: "iconValue" }), le = t(false), oe = t([]), de = t(null), ue = t(""), ie = t(false), se = t(""), re = t(""), ce = t("");
24
- n(() => {
25
- l(() => {
26
- const e3 = G.value;
27
- _(e3, X.pageContext, X.configure, { componentRef: te.value, value: e3, entity: X.pageContext.entity.data, pageData: X.pageContext.entity.page });
28
- });
29
- }), J.value ? le.value = true : M(X.pageContext, X.configure).then((e3) => {
30
- oe.value = e3, le.value = true;
31
- }), o(ue, (e3) => {
32
- ie.value = true, te.value.filter(e3);
33
- });
34
- const pe = (e3, t2) => !e3 || t2.name.includes(e3);
35
- function ve(e3, t2, a2) {
36
- de.value = t2, j(null, X.pageContext, X.configure, "node-click", { data: e3, node: t2, nodeTree: a2 });
37
- }
38
- function fe(e3, t2) {
39
- let a2 = "0";
40
- a2 = 0 === e3.level ? "0" : e3.data.nodeId, function(e4, t3, a3) {
41
- const n2 = { parentNodeId: e4, data: t3.data, searchValue: ue, isSearch: ie.value };
42
- M(X.pageContext, X.configure, e4, t3, n2).then((n3) => {
43
- if (ie.value = false, a3(n3), "0" === e4) {
44
- !function(e5, t4) {
45
- const a4 = { parentNodeId: e5, data: t4.data, searchValue: ue, isSearch: ie.value };
46
- M(X.pageContext, X.configure, e5, t4, a4).then((t5) => {
47
- ie.value = false, te.value.updateKeyChildren(e5, t5), te.value.store.nodesMap[e5] && (te.value.store.nodesMap[e5].expanded = true);
48
- });
49
- }(n3[0].nodeId, t3);
50
- }
51
- });
52
- }(a2, e3, t2);
53
- }
54
- const ge = t({}), me = (e3, t2, a2, n2) => {
55
- if (se.value) return void z.warning("请先保存当前编辑节点!");
56
- document.removeEventListener("click", he), ge.value = a2, A.value = true;
57
- const { clientX: l2, clientY: o2 } = e3, d2 = $.value;
58
- if (d2) {
59
- const { innerWidth: e4, innerHeight: t3 } = window, { offsetWidth: a3, offsetHeight: n3 } = d2, u2 = l2 + a3 > e4 ? l2 - a3 : l2, i2 = o2 + n3 > t3 ? o2 - n3 : o2;
60
- d2.style.left = `${u2}px`, d2.style.top = `${i2}px`, d2.style.display = "block";
61
- }
62
- document.addEventListener("click", he);
63
- }, he = () => {
64
- A.value = false, document.removeEventListener("click", he);
65
- }, ye = (e3, t2) => {
66
- if (e3.parent && e3.parent.level > 0) {
67
- const a2 = e3.parent.data.children.findIndex((t3) => t3.nodeId === e3.data.nodeId);
68
- e3.parent.data.children[a2] = t2, e3.data = t2;
69
- } else {
70
- const a2 = e3.parent.data.findIndex((t3) => t3.nodeId === e3.data.nodeId);
71
- e3.parent.data[a2] = t2, e3.data = t2;
72
- }
73
- }, Ce = () => {
74
- se.value = "", ce.value = "", re.value = "";
75
- }, xe = () => ({ nodeId: "primary" + (/* @__PURE__ */ new Date()).getTime(), name: "新增节点", disabled: false, iconType: "custom", isLeaf: true });
76
- function ke(e3) {
77
- e3.tipMessage ? S.confirm(e3.tipMessage, { confirmButtonText: "确定", cancelButtonText: "取消", type: "error" }).then(() => {
78
- K(ge.value, X.configure, X.pageContext).then(() => {
79
- z.success("删除成功!"), Ne(), ge.value = null;
80
- });
81
- }).catch(() => {
82
- ge.value = null;
83
- }) : K(ge.value, X.configure, X.pageContext).then(() => {
84
- z.success("删除成功!"), Ne(), ge.value = null;
85
- });
86
- }
87
- const Ne = () => {
88
- const e3 = ge.value.parent;
89
- te.value.remove(ge.value), e3.childNodes && 0 === e3.childNodes.length && (e3.data.isLeaf = true), e3.data.children && e3.data.children.length > 0 && (e3.data.children = e3.data.children.filter((e4) => e4.nodeId !== ge.value.data.nodeId));
90
- };
91
- return U2({ getSelectNode: function() {
92
- return de.value;
93
- }, expandNode: function(e3) {
94
- e3.loaded = false, e3.expand();
95
- }, loadTreeNodes: function() {
96
- M(X.pageContext, X.configure).then((e3) => {
97
- ie.value = false, oe.value = e3;
98
- });
99
- }, getNode: function(e3) {
100
- te.value.getNode(e3);
101
- }, getCheckedNodes: (e3, t2) => te.value.getCheckedNodes(e3, t2), setCheckedNodes: (e3) => {
102
- te.value.setCheckedNodes(e3);
103
- }, getCheckedKeys: (e3) => te.value.getCheckedKeysleafOnly(), setCheckedKeys: (e3, t2) => {
104
- te.value.setCheckedKeys(e3, t2);
105
- }, setChecked: (e3, t2, a2) => {
106
- te.value.setChecked(e3, t2, a2);
107
- }, getCurrentKey: () => te.value.getCurrentKey(), getCurrentNode: () => te.value.getCurrentNode(), setCurrentKey: (e3, t2 = true) => te.value.setCurrentKey(e3, t2), setCurrentNode: (e3, t2 = true) => te.value.setCurrentNode(e3, t2) }), (t2, a2) => {
108
- var _a2;
109
- const n2 = d("el-input"), l2 = d("el-button"), o2 = d("SuperIcon"), V2 = d("el-tree");
110
- return i(), u("div", { class: s(["amb-tree-runtime-main", r(ee)]) }, [ae.value.filter ? (i(), c(n2, { key: 0, modelValue: ue.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e3) => ue.value = e3), style: { width: "100%" }, placeholder: "请输入查询条件" }, null, 8, ["modelValue"])) : p("", true), le.value ? (i(), c(V2, { key: 1, ref_key: "menuTreeRef", ref: te, style: f(r(Z)), load: fe, data: oe.value, "node-key": "nodeId", props: ne.value, "default-expand-all": ae.value.defaultExpandAll, "expand-on-click-node": ae.value.expandOnClickNode, indent: ae.value.retractWidth ? ae.value.retractWidth : 18, accordion: ae.value.accordion, "show-checkbox": !!ae.value.showCheckbox, "highlight-current": "", lazy: J.value, "filter-node-method": pe, onNodeClick: ve, onNodeContextmenu: me }, { default: g(({ node: t3, data: d2 }) => [d2.nodeId === se.value ? (i(), u("div", P, [m(n2, { modelValue: ce.value, "onUpdate:modelValue": a2[1] || (a2[1] = (e3) => ce.value = e3), size: "small" }, null, 8, ["modelValue"]), h("div", null, [m(l2, { type: "primary", link: "", onClick: (e3) => ((e4) => {
111
- "" !== ce.value ? (e4.data.name = ce.value, re.value && e4.data.nodeId === re.value ? w(e4, X.configure, X.pageContext).then((t4) => {
112
- ye(e4, t4.currentNode), Ce(), z.success("保存成功!");
113
- }) : E(e4, X.configure, X.pageContext).then((t4) => {
114
- ye(e4, t4.currentNode), Ce(), z.success("保存成功!");
115
- })) : z.warning("请输入节点名称");
116
- })(t3) }, { default: g(() => [...a2[2] || (a2[2] = [y(" 保存 ", -1)])]), _: 1 }, 8, ["onClick"]), m(l2, { style: { "margin-left": "4px" }, type: "primary", link: "", onClick: (a3) => ((e3) => {
117
- re.value && e3.data.nodeId === re.value && te.value.remove(e3), Ce();
118
- })(t3, e2.configure, e2.pageContext) }, { default: g(() => [...a2[3] || (a2[3] = [y(" 撤销 ", -1)])]), _: 1 }, 8, ["onClick"])])])) : (i(), u("span", { key: 1, title: t3.label, class: "ellipsis" }, [d2.iconValue ? (i(), c(o2, { key: 0, iconType: d2.iconType, iconValue: d2.iconValue }, null, 8, ["iconType", "iconValue"])) : ae.value.iconValue ? (i(), c(o2, { key: 1, iconType: ae.value.iconType, iconValue: ae.value.iconValue }, null, 8, ["iconType", "iconValue"])) : (i(), u(C, { key: 2 }, [d2.isLeaf ? (i(), u("div", H, [a2[5] || (a2[5] = h("img", { src: I, class: "file" }, null, -1)), h("span", null, x(d2.name), 1)])) : (i(), u("div", R, [h("div", D, [a2[4] || (a2[4] = h("img", { src: T, class: "file" }, null, -1)), h("span", null, x(d2.name), 1)])]))], 64))], 8, W))]), _: 1 }, 8, ["style", "data", "props", "default-expand-all", "expand-on-click-node", "indent", "accordion", "show-checkbox", "lazy"])) : p("", true), v(h("div", null, [h("ul", { ref_key: "contxtMenuRef", ref: $, class: "context-menu" }, [(i(true), u(C, null, k(q.value, (e3, t3) => (i(), u("li", { key: t3, tabindex: "-1", class: "menu__item", onClick: (t4) => ((e4) => {
119
- if (ge.value && "standard" === e4.type && e4.standardEvent) if ("edit" === e4.standardEvent) se.value = ge.value.data.nodeId, ce.value = ge.value.data.name;
120
- else if ("delete" === e4.standardEvent) ge.value.childNodes && ge.value.childNodes.length > 0 && e4.deleteParentNodeTip ? (e4.deleteParentNodeTipMessage || (e4.deleteParentNodeTipMessage = "当前节点下有子节点,确认删除?"), S.confirm(e4.deleteParentNodeTipMessage, { confirmButtonText: "确定", cancelButtonText: "取消", type: "error" }).then(() => {
121
- ke(e4);
122
- }).catch(() => {
123
- ge.value = null;
124
- })) : ke(e4);
125
- else {
126
- const t5 = xe();
127
- se.value = t5.nodeId, re.value = t5.nodeId, ce.value = t5.name, "addSiblingNode" === e4.standardEvent ? (t5.isLeaf = ge.value.data.isLeaf, ge.value.parent && ge.value.parent.level > 0 ? te.value.append(t5, ge.value.parent) : oe.value.push(t5)) : "addChildNode" === e4.standardEvent && (t5.isLeaf = true, ge.value.data.isLeaf = false, te.value.append(t5, ge.value), te.value.setCurrentKey(t5.nodeId, true));
128
- }
129
- })(e3) }, [h("span", null, x(e3.name), 1)], 8, O))), 128))], 512)], 512), [[N, A.value && ((_a2 = q.value) == null ? void 0 : _a2.length) > 0]])], 2);
130
- };
131
- } });
132
- export {
133
- U as default
134
- };
@@ -1,102 +0,0 @@
1
- import { defineComponent as e, ref as a, onMounted as l, nextTick as t, computed as o, resolveComponent as r, createBlock as u, openBlock as n, normalizeStyle as i, normalizeClass as d, unref as c, createSlots as p, withCtx as s, createElementVNode as v, createElementBlock as f, Fragment as g, createTextVNode as m, toDisplayString as h } from "vue";
2
- import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
3
- import { getDateShortCuts as C } from "../../../../utils/form/date-shortcuts.js";
4
- import { getModelFieldFromPageContext as x, getValueFromVariable as b, setVariableValue as F, getVariableValue as V, isDateDataType as k } from "../../../../utils/page-helper-util.js";
5
- import { handleAfterInitEvent as T, getCustomFunc as z, handleFormEvent as P } from "../../../../utils/events/event-util.js";
6
- import j from "../common/title-suffix-element.vue.js";
7
- import R from "dayjs";
8
- import { $t as Y } from "../../../../utils/i18n-util.js";
9
- import { addRequiredClassUtil as _ } from "../../../../utils/common-util.js";
10
- import { DatePickerRange as D, DateQuarterPicker as S } from "agilebuilder-ui";
11
- const q = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: q2 }) {
12
- var _a;
13
- const w = e2, A = a(null), B = w.pageContext.entity ? w.pageContext.entity : {}, M = w.configure.runtime ? w.configure.runtime : {}, U = M.style, $ = M.class, I = M.headerStyle, N = M.titleExceedStyle, W = a(M.props ? M.props : {});
14
- let E = y(w.pageContext, w.configure, W.value.prop);
15
- if (w.pageContext.modelFieldsMap && E && E.length > 0 && "data" === E[0]) {
16
- const e3 = x(E, w.pageContext);
17
- e3 && function(e4) {
18
- const a2 = e4.dataType;
19
- k(a2) && ("year" === W.value.dateType && "YYYY" === W.value.valueFormat || "month" === W.value.dateType && "YYYY-MM" === W.value.valueFormat) && (W.value.valueFormat = "x");
20
- }(e3);
21
- }
22
- let O = null, G = false;
23
- if (W.value.dateType && W.value.dateType.includes("range")) {
24
- G = true;
25
- let e3 = W.value.prop2;
26
- e3 && e3.startsWith("${") || (e3 = "${page." + w.configure.uuid + "-2}");
27
- const a2 = b(B, e3, null);
28
- if (e3 = e3.substring(2, e3.length - 1), O = e3.split("."), !(a2 || B.data && (B.data.id || B.data.ID)) && W.value.defaultValue2) {
29
- const e4 = b(B, W.value.defaultValue2);
30
- if (null != e4 && "" !== e4) F(B, O, e4);
31
- else if (((_a = W.value.moreDefaultValue2) == null ? void 0 : _a.length) > 0) {
32
- const e5 = W.value.moreDefaultValue2;
33
- for (let a3 = 0; a3 < e5.length; a3++) {
34
- const l2 = b(B, e5[a3]);
35
- if (null != l2 && "" !== l2) {
36
- F(B, O, l2);
37
- break;
38
- }
39
- }
40
- }
41
- }
42
- }
43
- const H = a(null), J = a(null), K = a(null);
44
- function L(e3, a2) {
45
- if (!e3) return e3;
46
- if (a2) {
47
- "number" != typeof e3 || isNaN(e3) || 4 !== e3.toString().length || (e3 = e3.toString());
48
- try {
49
- const l2 = R(e3);
50
- let t2 = null;
51
- return t2 = "x" === a2 ? l2.toDate().getTime() : R(e3).format(a2), t2;
52
- } catch (a3) {
53
- return console.error("日期值格式化错误", a3), console.error(`value: ${e3} ,valueFormat: ${W.value.valueFormat}`), e3;
54
- }
55
- }
56
- return e3;
57
- }
58
- if (l(() => {
59
- t(() => {
60
- const e3 = Q.value;
61
- T(e3, w.pageContext, w.configure, { formItemRef: H.value, componentRef: J.value, titleRef: K.value, value: e3, entity: w.pageContext.entity.data, pageData: w.pageContext.entity.page });
62
- });
63
- }), E) {
64
- const e3 = V(B, E), a2 = L(e3, W.value.valueFormat);
65
- e3 !== a2 && F(B, E, a2);
66
- }
67
- if (O) {
68
- const e3 = V(B, O), a2 = L(e3, W.value.valueFormat);
69
- e3 !== a2 && F(B, O, a2);
70
- }
71
- const Q = o({ get() {
72
- if (G) {
73
- const e3 = [];
74
- let a2 = V(B, E);
75
- e3.push(L(a2, W.value.valueFormat));
76
- let l2 = V(B, O);
77
- return e3.push(L(l2, W.value.valueFormat)), e3;
78
- }
79
- return L(V(B, E), W.value.valueFormat);
80
- }, set(e3) {
81
- G ? Array.isArray(e3) ? (F(B, E, e3[0]), F(B, O, e3[1]), A.value = "") : null === e3 && (F(B, E, null), F(B, O, null)) : (F(B, E, e3), null != e3 && (A.value = ""));
82
- } }), X = a(C(W.value.dateScopeDetails, W.value.sourceType, W.value.dateType));
83
- if (W.value.shortcutsFunc) {
84
- const e3 = z(w.pageContext, W.value.shortcutsFunc);
85
- if (e3) {
86
- let a2 = e3.apply(e3, [{ pageContext: w.pageContext, configureObj: w.configure }]);
87
- if (a2) {
88
- Array.isArray(a2) || (a2 = [a2]), X.value || (X.value = []);
89
- for (let e4 of a2) e4.text && e4.value && X.value.push(e4);
90
- }
91
- }
92
- }
93
- return q2({ addRequiredClass: function() {
94
- A.value = _();
95
- } }), (a2, l2) => {
96
- const t2 = r("el-time-picker"), o2 = r("el-date-picker"), y2 = r("el-form-item");
97
- return n(), u(y2, { ref_key: "formItemRef", ref: H, required: W.value.required, class: d(c($) + (A.value ? " " + A.value : "")), "label-width": W.value.labelWidth, style: i(c(U)) }, p({ default: s(() => ["time" == W.value.dateType || "timerange" == W.value.dateType ? (n(), u(t2, { key: 0, ref_key: "componentRef", ref: J, "is-range": "timerange" == W.value.dateType, style: { width: "100%" }, "range-separator": "-", clearable: W.value.clearable, disabled: "disabled" === W.value.state, readonly: "readonly" === W.value.state, size: W.value.size, placeholder: W.value.placeholder, "start-placeholder": W.value.placeholder, "end-placeholder": W.value.endPlaceholder ? W.value.endPlaceholder : W.value.placeholder, "unlink-panels": true, format: W.value.format, "value-format": W.value.valueFormat, modelValue: Q.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => Q.value = e3), shortcuts: X.value, type: W.value.dateType, onChange: l2[1] || (l2[1] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "change")), onBlur: l2[2] || (l2[2] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "blur")), onFocus: l2[3] || (l2[3] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "focus")), onVisibleChange: l2[4] || (l2[4] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "visible-change")), onPanelChange: l2[5] || (l2[5] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "panel-change")), onClear: l2[6] || (l2[6] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "clear")) }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : "combined" !== W.value.dateRangePickerMode && ["daterange", "datetimerange", "monthrange", "yearrange"].includes(W.value.dateType) ? (n(), u(c(D), { key: 1, modelValue: Q.value, "onUpdate:modelValue": l2[7] || (l2[7] = (e3) => Q.value = e3), type: W.value.dateType, disabled: "disabled" === W.value.state, readonly: "readonly" === W.value.state, clearable: W.value.clearable, format: W.value.format, "value-format": W.value.valueFormat, placeholder: W.value.placeholder, "start-placeholder": W.value.placeholder, "end-placeholder": W.value.endPlaceholder ? W.value.endPlaceholder : W.value.placeholder, size: W.value.size, shortcuts: X.value, onChange: l2[8] || (l2[8] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "change")), onBlur: l2[9] || (l2[9] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "blur")), onFocus: l2[10] || (l2[10] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "focus")), onVisibleChange: l2[11] || (l2[11] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "visible-change")), onPanelChange: l2[12] || (l2[12] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "panel-change")), onClear: l2[13] || (l2[13] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "clear")) }, null, 8, ["modelValue", "type", "disabled", "readonly", "clearable", "format", "value-format", "placeholder", "start-placeholder", "end-placeholder", "size", "shortcuts"])) : "quarter" === W.value.dateType ? (n(), u(c(S), { key: 2, modelValue: Q.value, "onUpdate:modelValue": l2[14] || (l2[14] = (e3) => Q.value = e3), type: W.value.dateType, disabled: "disabled" === W.value.state, readonly: "readonly" === W.value.state, clearable: W.value.clearable, format: W.value.format, "value-format": W.value.valueFormat, placeholder: W.value.placeholder, size: W.value.size, onChange: l2[15] || (l2[15] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "change")), onBlur: l2[16] || (l2[16] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "blur")), onFocus: l2[17] || (l2[17] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "focus")), onClear: l2[18] || (l2[18] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "clear")) }, null, 8, ["modelValue", "type", "disabled", "readonly", "clearable", "format", "value-format", "placeholder", "size"])) : (n(), u(o2, { key: 3, ref_key: "componentRef", ref: J, clearable: W.value.clearable, style: { width: "100%" }, "unlink-panels": true, disabled: "disabled" === W.value.state, readonly: "readonly" === W.value.state, size: W.value.size, placeholder: W.value.placeholder, "start-placeholder": W.value.placeholder, "end-placeholder": W.value.endPlaceholder ? W.value.endPlaceholder : W.value.placeholder, format: W.value.format, "value-format": W.value.valueFormat, modelValue: Q.value, "onUpdate:modelValue": l2[19] || (l2[19] = (e3) => Q.value = e3), shortcuts: X.value, type: W.value.dateType, onChange: l2[20] || (l2[20] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "change")), onBlur: l2[21] || (l2[21] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "blur")), onFocus: l2[22] || (l2[22] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "focus")), onVisibleChange: l2[23] || (l2[23] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "visible-change")), onPanelChange: l2[24] || (l2[24] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "panel-change")), onClear: l2[25] || (l2[25] = (a3) => c(P)(a3, e2.pageContext, e2.configure, "clear")) }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"]))]), _: 2 }, [W.value.tittleShow ? { name: "label", fn: s(() => [v("div", { ref_key: "titleRef", ref: K, style: i({ ...c(I), ...c(N) }) }, [W.value.prefixType ? (n(), u(j, { key: 0, pageContext: e2.pageContext, property: W.value }, null, 8, ["pageContext", "property"])) : (n(), f(g, { key: 1 }, [m(h(c(Y)(W.value.title)), 1)], 64))], 4)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]);
98
- };
99
- } });
100
- export {
101
- q as default
102
- };
@@ -1,83 +0,0 @@
1
- import { defineComponent as e, ref as n, computed as t, onMounted as l, nextTick as o, onUnmounted as a, watch as u, resolveComponent as i, createBlock as r, openBlock as p, normalizeStyle as s, normalizeClass as c, unref as f, createSlots as v, withCtx as g, createVNode as y, createCommentVNode as m, createTextVNode as d, toDisplayString as x, createElementVNode as C, createElementBlock as k, Fragment as T } from "vue";
2
- import { SuperIcon as I } from "agilebuilder-ui";
3
- import { getFormModelFields as w } from "../../../../utils/page-init-util.js";
4
- import { getModelFieldFromPageContext as V, isNumberDataType as h, setVariableValue as b, getVariableValue as _ } from "../../../../utils/page-helper-util.js";
5
- import { handleFormEvent as S, handleAfterInitEvent as j, doSuffixOrPrefixClickEvent as P } from "../../../../utils/events/event-util.js";
6
- import { formatScanRuleSets as R, analysisScanValue as O, setScanAnalysisValue as L } from "../../../../utils/form/scan-util.js";
7
- import N from "../common/title-suffix-element.vue.js";
8
- import { isMobileBrowser as q, isDingTalkEnv as D } from "agilebuilder-ui/src/utils/common-util";
9
- import J from "../../../../utils/eventBus.js";
10
- import { $t as M } from "../../../../utils/i18n-util.js";
11
- import { addRequiredClassUtil as z } from "../../../../utils/common-util.js";
12
- const B = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: B2 }) {
13
- var _a, _b, _c;
14
- const F = e2, $ = F.pageContext.entity ? F.pageContext.entity : {}, A = n("text");
15
- let E = w(F.pageContext, F.configure);
16
- if (F.pageContext.modelFieldsMap) {
17
- const e3 = V(E, F.pageContext);
18
- e3 && (A.value = h(e3.dataType) ? "number" : "text");
19
- }
20
- const H = n(q()), U = F.pageContext.code, W = n(E && E.length > 0 ? U + "__" + E.join("__") : null), G = n(null), K = t({ get: () => _($, E), set(e3) {
21
- b($, E, e3), null != e3 && "" !== e3 && (G.value = "");
22
- } }), Q = n(null), X = n(null), Y = n(null);
23
- F.configure.props.suffixLinkPage && !F.configure.props.linkPage && (F.configure.props.linkPage = F.configure.props.suffixLinkPage);
24
- const Z = F.configure.runtime ? F.configure.runtime : {}, ee = n(Z.props ? Z.props : {}), ne = n(!!((_a = ee.value.scan) == null ? void 0 : _a.enable));
25
- let te = false;
26
- D() && (te = true);
27
- let le = "";
28
- const oe = navigator.userAgent;
29
- le = oe.indexOf("Html5Plus") > 0 ? "app" : "browser";
30
- const ae = !(!H.value || !le || "app" !== le), ue = n(!!((ae || te) && ne.value || H.value && ne.value && "https:" === window.location.protocol));
31
- let ie = {};
32
- ((_b = ee.value.scan) == null ? void 0 : _b.enable) && ((_c = ee.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (R(ee.value.scan.ruleList).then((e3) => {
33
- ie = e3;
34
- }), u(() => K.value, (e3) => {
35
- e3 = e3.trim();
36
- const n2 = O(e3, ie);
37
- n2 && L(F.pageContext, n2.scanSet, n2.params);
38
- }));
39
- const re = Z.style, pe = Z.class, se = Z.headerStyle, ce = Z.titleExceedStyle;
40
- function fe(e3) {
41
- return b($, E, e3);
42
- }
43
- l(() => {
44
- J.$on(W.value + "-scanDone", (e3) => {
45
- W.value, JSON.stringify(e3), fe(e3.result), S(e3.result, F.pageContext, F.configure, "afterScanDone");
46
- }), o(() => {
47
- var _a2;
48
- const e3 = K.value;
49
- j(e3, F.pageContext, F.configure, { formItemRef: Q.value, componentRef: X.value, titleRef: Y.value, value: e3, entity: F.pageContext.entity.data, pageData: F.pageContext.entity.page }), ue.value && ((_a2 = ee.value.scan) == null ? void 0 : _a2.autoOpen) && ge();
50
- });
51
- }), a(() => {
52
- J.$off(W.value + "-scanDone");
53
- });
54
- const ve = n(false);
55
- function ge() {
56
- if (ae || te) {
57
- const e3 = { type: "scan", componentId: W.value, systemCode: F.pageContext.systemCode };
58
- te && (e3.type = "dingTalkScan"), window.parent.parent ? (window.parent.parent, window.parent.parent.postMessage(JSON.stringify(e3), "*")) : window.parent && (window.parent, window.parent.postMessage(JSON.stringify(e3), "*"));
59
- } else if (H.value) if ("https:" === window.location.protocol) ve.value = true;
60
- else {
61
- const e3 = { type: "scan", componentId: W.value, systemCode: F.pageContext.systemCode };
62
- window.parent.postMessage(JSON.stringify(e3), "*");
63
- }
64
- else ve.value = true;
65
- }
66
- function ye(e3) {
67
- ve.value = false, fe(e3);
68
- }
69
- return B2({ getValue: function() {
70
- return _($, E);
71
- }, setValue: fe, scanClick: ge, addRequiredClass: function() {
72
- G.value = z();
73
- } }), (n2, t2) => {
74
- const l2 = i("el-input"), o2 = i("scan-code-input-browser"), a2 = i("el-form-item");
75
- return p(), r(a2, { ref_key: "formItemRef", ref: Q, required: !!ee.value.required, class: c(f(pe) + (G.value ? " " + G.value : "")), "label-width": ee.value.labelWidth, style: s(f(re)) }, v({ default: g(() => [y(l2, { ref_key: "componentRef", ref: X, disabled: "disabled" === ee.value.state, readonly: "readonly" === ee.value.state, size: ee.value.size, clearable: ee.value.clearable, placeholder: ee.value.placeholder, maxlength: ee.value.maxLength, "show-word-limit": ee.value.showInputNum, type: A.value, modelValue: K.value, "onUpdate:modelValue": t2[5] || (t2[5] = (e3) => K.value = e3), onInput: t2[6] || (t2[6] = (n3) => f(S)(n3, e2.pageContext, e2.configure, "input")), onChange: t2[7] || (t2[7] = (n3) => f(S)(n3, e2.pageContext, e2.configure, "change")), onBlur: t2[8] || (t2[8] = (e3) => function(e4) {
76
- let n3 = _($, E);
77
- null != n3 && (n3 = n3.trim()), b($, E, n3), S(e4, F.pageContext, F.configure, "blur");
78
- }(e3)), onFocus: t2[9] || (t2[9] = (n3) => f(S)(n3, e2.pageContext, e2.configure, "focus")), onClick: t2[10] || (t2[10] = (n3) => f(S)(n3, e2.pageContext, e2.configure, "click")), onClear: t2[11] || (t2[11] = (n3) => f(S)(n3, e2.pageContext, e2.configure, "clear")) }, v({ _: 2 }, ["outer" != ee.value.iconPosition && (ee.value.preIconType && ee.value.preIconValue || ee.value.preText) ? { name: "prefix", fn: g(() => [ee.value.preIconType && ee.value.preIconValue ? (p(), r(f(I), { key: 0, style: { cursor: "pointer" }, iconType: ee.value.preIconType, iconValue: ee.value.preIconValue, onClick: t2[0] || (t2[0] = (n3) => f(P)(K.value, e2.pageContext, e2.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : m("", true), d(" " + x(f(M)(ee.value.preText)), 1)]), key: "0" } : void 0, "outer" == ee.value.iconPosition && (ee.value.preIconType && ee.value.preIconValue || ee.value.preText) ? { name: "prepend", fn: g(() => [ee.value.preIconType && ee.value.preIconValue ? (p(), r(f(I), { key: 0, style: { cursor: "pointer" }, iconType: ee.value.preIconType, iconValue: ee.value.preIconValue, onClick: t2[1] || (t2[1] = (n3) => f(P)(K.value, e2.pageContext, e2.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : m("", true), d(" " + x(f(M)(ee.value.preText)), 1)]), key: "1" } : void 0, "outer" != ee.value.iconPosition && (ee.value.sufIconType && ee.value.sufIconValue || ee.value.sufText) ? { name: "suffix", fn: g(() => [ee.value.sufIconType && ee.value.sufIconValue ? (p(), r(f(I), { key: 0, style: { cursor: "pointer" }, iconType: ee.value.sufIconType, iconValue: ee.value.sufIconValue, onClick: t2[2] || (t2[2] = (n3) => f(P)(K.value, e2.pageContext, e2.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : m("", true), d(" " + x(f(M)(ee.value.sufText)), 1)]), key: "2" } : void 0, ue.value || "outer" == ee.value.iconPosition && (ee.value.sufIconType && ee.value.sufIconValue || ee.value.sufText) ? { name: "append", fn: g(() => [ue.value ? (p(), r(f(I), { key: 0, style: { cursor: "pointer" }, iconValue: "fa-barcode", onClick: t2[3] || (t2[3] = (e3) => ge()) })) : m("", true), ee.value.sufIconType && ee.value.sufIconValue ? (p(), r(f(I), { key: 1, style: { cursor: "pointer" }, iconType: ee.value.sufIconType, iconValue: ee.value.sufIconValue, onClick: t2[4] || (t2[4] = (n3) => f(P)(K.value, e2.pageContext, e2.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : m("", true), d(" " + x(f(M)(ee.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), ve.value ? (p(), r(o2, { key: 0, onClose: ye })) : m("", true)]), _: 2 }, [ee.value.tittleShow ? { name: "label", fn: g(() => [C("div", { ref_key: "titleRef", ref: Y, class: "amb-form-item-label", style: s({ ...f(se), ...f(ce) }) }, [ee.value.prefixType ? (p(), r(N, { key: 0, pageContext: e2.pageContext, property: ee.value }, null, 8, ["pageContext", "property"])) : (p(), k(T, { key: 1 }, [d(x(f(M)(ee.value.title)), 1)], 64))], 4)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]);
79
- };
80
- } });
81
- export {
82
- B as default
83
- };
@@ -1,218 +0,0 @@
1
- import { defineComponent as e, ref as t, watch as l, onMounted as n, nextTick as o, onBeforeUnmount as r, resolveComponent as i, createElementBlock as a, openBlock as u, Fragment as s, createVNode as c, createBlock as d, createCommentVNode as f, normalizeStyle as p, normalizeClass as m, unref as g, createSlots as v, withCtx as h, createElementVNode as b, toDisplayString as y } from "vue";
2
- import { getFormModelFields as x } from "../../../../utils/page-init-util.js";
3
- import { getSizeConfig as k, formatVariableValue as q, getVariableValue as w, setVariableValue as C } from "../../../../utils/page-helper-util.js";
4
- import { handleAfterInitEvent as S, handleFormEvent as A } from "../../../../utils/events/event-util.js";
5
- import E from "agilebuilder-ui/src/utils/request";
6
- import { $t as T } from "../../../../utils/i18n-util.js";
7
- import { getBaseUrl as L, addRequiredClassUtil as H } from "../../../../utils/common-util.js";
8
- import M from "quill";
9
- import "quill/dist/quill.snow.css";
10
- import { ElMessage as N } from "element-plus";
11
- const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext-statusbar" }, F = { class: "word-count" }, V = { key: 0, class: "upload-loading" }, W = ["innerHTML"], z = e({ __name: "richtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: z2 }) {
12
- const B = ["12px", "14px", "16px", "18px", "20px", "24px", "28px", "32px", "36px", "48px"], D = M.import("attributors/style/size");
13
- D.whitelist = B, M.register(D, true);
14
- const U = [false, "Source Han Sans CN", "SimSun", "SimHei", "Microsoft YaHei", "KaiTi", "FangSong", "Arial", "Times New Roman", "Verdana", "Georgia", "Courier New"], $ = M.import("attributors/style/font");
15
- $.whitelist = U, M.register($, true);
16
- const P = e2, O = t(""), G = P.pageContext.entity ? P.pageContext.entity : {}, I = x(P.pageContext, P.configure), K = P.configure.runtime ? P.configure.runtime : {}, Y = K.style, J = K.class, Q = K.headerStyle, X = K.titleExceedStyle, Z = t(K.props ? K.props : {});
17
- let ee = k(P.pageContext, P.configure);
18
- ee && ee.fixHeight && (Y.height || (Y.height = ee.fixHeight + "px"));
19
- let te = Z.value.value;
20
- const le = q(P.pageContext, te), ne = t(null);
21
- let oe = null;
22
- const re = t(false), ie = t(0), ae = t(false), ue = t(false), se = t("");
23
- let ce = null, de = Z.value.state;
24
- function fe(e3) {
25
- return "readonly" == e3 || "disabled" == e3;
26
- }
27
- const pe = fe(de), me = t({ modules: { toolbar: [["bold", "italic", "underline", "strike"], ["blockquote", "code-block"], [{ list: "ordered" }, { list: "bullet" }], [{ script: "sub" }, { script: "super" }], [{ indent: "-1" }, { indent: "+1" }], [{ direction: "rtl" }], [{ size: B }], [{ header: [1, 2, 3, 4, 5, 6, false] }], [{ color: [] }, { background: [] }], [{ font: U }], [{ align: [] }], ["clean"], ["link", "image"]] }, theme: "snow", placeholder: pe ? "" : Z.value.placeholder, readOnly: pe });
28
- function ge() {
29
- if (!(oe == null ? void 0 : oe.container)) return;
30
- const e3 = oe.container.parentNode;
31
- if (!e3) return;
32
- const t2 = e3.getBoundingClientRect(), l2 = oe.container.getBoundingClientRect();
33
- let n2 = t2.height - (l2.top - t2.top);
34
- n2 -= 24, oe.container.style.height = Math.max(n2, 100) + "px";
35
- }
36
- l(Z.value, () => {
37
- const e3 = Z.value.state;
38
- if (null != e3 && e3 !== de) {
39
- de = e3;
40
- const t2 = fe(de);
41
- oe && (oe.enable(!t2), oe.root.dataset.placeholder = t2 ? "" : Z.value.placeholder);
42
- }
43
- });
44
- const ve = t([]), he = t(false), be = t(null), ye = t(null), xe = t(null);
45
- let ke = null;
46
- function qe(e3) {
47
- const t2 = e3.match(/serverPath=([^&"]+)/);
48
- return t2 ? t2[1] : "";
49
- }
50
- function we(e3) {
51
- if (!oe) return;
52
- const t2 = function(e4) {
53
- if (!e4) return e4;
54
- const t3 = new DOMParser().parseFromString(e4, "text/html"), l3 = P.pageContext.backendUrl, n2 = L(l3, P.pageContext.isTest);
55
- t3.querySelectorAll("th").forEach((e5) => {
56
- const l4 = t3.createElement("td");
57
- for (const t4 of Array.from(e5.attributes)) l4.setAttribute(t4.name, t4.value);
58
- l4.style.fontWeight = "bold", l4.innerHTML = e5.innerHTML, e5.replaceWith(l4);
59
- }), t3.querySelectorAll("img[data-uuid]").forEach((e5) => {
60
- const t4 = e5, l4 = t4.getAttribute("data-uuid");
61
- l4 && t4.setAttribute("src", `${n2}/common/fs-upload/download?serverPath=${l4}&isShowWatermark=false`);
62
- });
63
- let o2 = t3.body.innerHTML;
64
- return o2 = o2.replace(/\t/g, "    "), o2 = o2.replace(/ {2}/g, "  "), o2;
65
- }(e3), l2 = oe.clipboard.convertHTML(t2);
66
- oe.setContents(l2.ops), o(() => {
67
- if (!oe) return;
68
- oe.root.querySelectorAll("img").forEach((e4) => {
69
- if (!e4.getAttribute("data-uuid")) {
70
- const t3 = qe(e4.src);
71
- t3 && e4.setAttribute("data-uuid", t3);
72
- }
73
- }), oe && oe.root.querySelectorAll("table").forEach((e4) => {
74
- const t3 = e4.querySelector("tr");
75
- t3 && t3.querySelectorAll("td").forEach((e5) => {
76
- e5.querySelector("strong, b") && (e5.style.backgroundColor = "#f5f7fa");
77
- });
78
- });
79
- });
80
- }
81
- const Ce = { bold: "加粗", italic: "斜体", underline: "下划线", strike: "删除线", blockquote: "引用", "code-block": "代码块", 'list[value="ordered"]': "有序列表", 'list[value="bullet"]': "无序列表", 'script[value="sub"]': "下标", 'script[value="super"]': "上标", 'indent[value="-1"]': "减少缩进", 'indent[value="+1"]': "增加缩进", 'direction[value="rtl"]': "文字方向", size: "字体大小", header: "标题", color: "字体颜色", background: "背景颜色", font: "字体", align: "对齐方式", clean: "清除格式", link: "链接", image: "图片" };
82
- function Se() {
83
- re.value = !re.value, o(() => {
84
- !re.value && (oe == null ? void 0 : oe.container) && (oe.container.style.height = ""), ge();
85
- });
86
- }
87
- function Ae() {
88
- oe && (se.value = oe.root.innerHTML, ue.value = true);
89
- }
90
- function Ee() {
91
- if (!oe) return void (ie.value = 0);
92
- const e3 = oe.getText().trim();
93
- ie.value = e3.length;
94
- }
95
- function Te() {
96
- if (!oe) return "";
97
- const e3 = oe.root.cloneNode(true);
98
- return e3.querySelectorAll("img[data-uuid]").forEach((e4) => {
99
- e4.getAttribute("data-uuid") && e4.removeAttribute("src");
100
- }), e3.innerHTML;
101
- }
102
- function Le() {
103
- N.error({ message: "图片上传失败,请重试", duration: 3e3 });
104
- }
105
- function He(e3) {
106
- "Escape" === e3.key && re.value && (re.value = false, o(() => {
107
- (oe == null ? void 0 : oe.container) && (oe.container.style.height = ""), ge();
108
- }));
109
- }
110
- function Me(e3) {
111
- var _a;
112
- oe && (null !== e3.relatedTarget && ((_a = ne.value) == null ? void 0 : _a.contains(e3.relatedTarget)) || A(Te(), P.pageContext, P.configure, "change", { entity: G }));
113
- }
114
- function Ne(e3) {
115
- if ("img" === e3.target.localName) {
116
- ve.value = [];
117
- let t2 = e3.target.src;
118
- ve.value.push(t2), he.value = true;
119
- }
120
- }
121
- function Re(e3) {
122
- const t2 = new FormData();
123
- t2.append("file", e3);
124
- const l2 = P.pageContext.backendUrl, n2 = L(l2, P.pageContext.isTest);
125
- return E.post(n2 + "/common/fs-upload/rich-editor-image", t2, { headers: { "Content-Type": "multipart/form-data" } });
126
- }
127
- function _e(e3, t2) {
128
- const l2 = e3.split(","), n2 = l2[0].match(/:(.*?);/), o2 = n2 ? n2[1] : "image/png", r2 = atob(l2[1]);
129
- let i2 = r2.length;
130
- const a2 = new Uint8Array(i2);
131
- for (; i2--; ) a2[i2] = r2.charCodeAt(i2);
132
- return new File([a2], t2, { type: o2 });
133
- }
134
- return n(() => {
135
- var _a;
136
- ne.value && (oe = new M(ne.value, me.value), oe.root.style.fontSize = "16px", function() {
137
- var _a2, _b;
138
- const e3 = (_b = (_a2 = ne.value) == null ? void 0 : _a2.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
139
- if (!e3) return;
140
- e3.querySelectorAll("button").forEach((e4) => {
141
- const t2 = e4.className.match(/ql-([\w-]+)/);
142
- if (t2) {
143
- const l2 = t2[1], n2 = `${l2}[value="${e4.value}"]`;
144
- Ce[n2] ? e4.setAttribute("data-tooltip", Ce[n2]) : Ce[l2] && e4.setAttribute("data-tooltip", Ce[l2]);
145
- }
146
- }), e3.querySelectorAll(".ql-picker").forEach((e4) => {
147
- const t2 = e4.className.match(/ql-(\w+)/);
148
- if (t2) {
149
- const l2 = t2[1];
150
- if (Ce[l2]) {
151
- const t3 = e4.querySelector(".ql-picker-label");
152
- t3 && t3.setAttribute("data-tooltip", Ce[l2]);
153
- }
154
- }
155
- });
156
- }(), function() {
157
- var _a2, _b;
158
- const e3 = (_b = (_a2 = ne.value) == null ? void 0 : _a2.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
159
- e3 && e3.addEventListener("mousedown", (e4) => {
160
- e4.preventDefault();
161
- });
162
- }(), we(le), (_a = ne.value) == null ? void 0 : _a.addEventListener("focusout", Me), oe.on("text-change", async function(e3) {
163
- if (!oe) return;
164
- const t2 = oe.root.getElementsByTagName("img");
165
- for (const e4 of t2) if (!e4.getAttribute("data-uuid")) {
166
- const t3 = qe(e4.src);
167
- e4.setAttribute("data-uuid", t3);
168
- }
169
- if (e3.ops && e3.ops.length > 0) for (const t3 of e3.ops) {
170
- const e4 = t3.insert;
171
- if (e4 == null ? void 0 : e4.image) {
172
- const t4 = e4.image;
173
- if (!t4.startsWith("data:image")) continue;
174
- try {
175
- ae.value = true;
176
- const e5 = _e(t4, "image.png"), l2 = await Re(e5);
177
- if (!oe) return;
178
- const n2 = oe.root.getElementsByTagName("img");
179
- for (const e6 of n2) e6.src === t4 && (e6.width = 300, e6.src = l2.url, e6.setAttribute("data-uuid", l2.uuid));
180
- } catch (e5) {
181
- console.error("上传图片失败", e5), Le();
182
- } finally {
183
- ae.value = false;
184
- }
185
- }
186
- }
187
- !function() {
188
- ce && clearTimeout(ce);
189
- ce = setTimeout(() => {
190
- if (!oe) return;
191
- const e4 = Te();
192
- C(G, I, e4), e4 && (O.value = "");
193
- }, 300);
194
- }(), Ee();
195
- }), Ee(), ke = oe.container, ke.addEventListener("click", Ne), ge(), o(() => {
196
- const e3 = w(G, I);
197
- S(e3, P.pageContext, P.configure, { formItemRef: be.value, componentRef: ye.value, titleRef: xe.value, value: e3, entity: P.pageContext.entity.data, pageData: P.pageContext.entity.page });
198
- }));
199
- }), n(() => {
200
- document.addEventListener("keydown", He);
201
- }), r(() => {
202
- document.removeEventListener("keydown", He), ce && clearTimeout(ce), ne.value && ne.value.removeEventListener("focusout", Me), ke && ke.removeEventListener("click", Ne);
203
- }), z2({ addRequiredClass: function() {
204
- O.value = H();
205
- }, setContent: function(e3) {
206
- we(e3), Ee();
207
- }, getContent: function() {
208
- return oe ? oe.root.innerHTML : "";
209
- } }), (e3, t2) => {
210
- const l2 = i("View"), n2 = i("el-icon"), o2 = i("FullScreen"), r2 = i("Close"), x2 = i("el-form-item"), k2 = i("el-image-viewer"), q2 = i("el-dialog");
211
- return u(), a(s, null, [c(x2, { required: Z.value.required, class: m(g(J) + (O.value ? " " + O.value : "")), "label-width": Z.value.labelWidth, style: p(g(Y)) }, v({ default: h(() => [b("div", { class: m(["richtext-wrapper", { "is-fullscreen": re.value }]) }, [b("div", { ref_key: "quillEditorRef", ref: ne, style: { width: "100%" } }, null, 512), b("div", R, [b("button", { type: "button", class: "toolbar-btn", onClick: Ae, title: "预览" }, [c(n2, null, { default: h(() => [c(l2)]), _: 1 })]), b("button", { type: "button", class: "toolbar-btn", onClick: Se, title: re.value ? "退出全屏" : "全屏编辑" }, [re.value ? (u(), d(n2, { key: 1 }, { default: h(() => [c(r2)]), _: 1 })) : (u(), d(n2, { key: 0 }, { default: h(() => [c(o2)]), _: 1 }))], 8, _)]), b("div", j, [b("span", F, "字数:" + y(ie.value), 1)]), ae.value ? (u(), a("div", V, [...t2[2] || (t2[2] = [b("div", { class: "loading-spinner" }, null, -1), b("span", null, "图片上传中...", -1)])])) : f("", true)], 2)]), _: 2 }, [Z.value.tittleShow ? { name: "label", fn: h(() => [b("div", { style: p({ ...g(Q), ...g(X) }), class: "amb-form-item-label" }, y(g(T)(Z.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]), he.value ? (u(), d(k2, { key: 0, "hide-on-click-modal": "", onClose: t2[0] || (t2[0] = () => {
212
- he.value = false;
213
- }), "url-list": ve.value }, null, 8, ["url-list"])) : f("", true), c(q2, { modelValue: ue.value, "onUpdate:modelValue": t2[1] || (t2[1] = (e4) => ue.value = e4), title: "内容预览", width: "80%", "close-on-click-modal": true, "append-to-body": true, class: "richtext-preview-dialog" }, { default: h(() => [b("div", { class: "richtext-preview-content ql-editor", innerHTML: se.value }, null, 8, W)]), _: 1 }, 8, ["modelValue"])], 64);
214
- };
215
- } });
216
- export {
217
- z as default
218
- };
@@ -1,55 +0,0 @@
1
- import { defineComponent as e, ref as n, computed as o, onMounted as l, onUnmounted as t, watch as i, nextTick as a, resolveComponent as u, createElementBlock as r, openBlock as s, Fragment as p, createElementVNode as w, createCommentVNode as f, createBlock as v, normalizeStyle as c, Teleport as d, withDirectives as x, createTextVNode as g, normalizeClass as m, createVNode as k, vShow as b } from "vue";
2
- import { addRequiredClassUtil as O } from "../../../../utils/common-util.js";
3
- const h = { class: "opinion-box-table-wrapper" }, C = { class: "opinion-table" }, y = { class: "opinion-label" }, R = { key: 0, class: "required-star" }, E = e({ __name: "workflow-opinion-box", props: { pageContext: {} }, setup(e2, { expose: E2 }) {
4
- const I = e2, z = n(""), L = n(), _ = n(""), B = n(null), H = n(null), V = n(0), q = n(null), j = n(null);
5
- let S = null, U = null;
6
- const W = n(true), A = o(() => {
7
- const e3 = j.value;
8
- return e3 ? { left: e3.left + "px", right: window.innerWidth - e3.right + "px", bottom: window.innerHeight - e3.bottom + "px" } : { left: "0", right: "0", bottom: "0" };
9
- });
10
- function D() {
11
- q.value && (j.value = q.value.getBoundingClientRect());
12
- }
13
- function F(e3) {
14
- q.value = e3, D(), U = new ResizeObserver(D), U.observe(e3), window.addEventListener("scroll", D, true), window.addEventListener("resize", D);
15
- }
16
- l(() => {
17
- var _a;
18
- let e3 = ((_a = B.value) == null ? void 0 : _a.parentElement) ?? null;
19
- for (; e3; ) {
20
- if (e3.classList.contains("el-dialog")) return void F(e3);
21
- e3 = e3.parentElement;
22
- }
23
- I.pageContext.workflowOpinion && (I.pageContext.workflowOpinion.boxInstance = G);
24
- }), t(() => {
25
- var _a;
26
- S == null ? void 0 : S.disconnect(), S = null, U == null ? void 0 : U.disconnect(), U = null, window.removeEventListener("scroll", D, true), window.removeEventListener("resize", D), q.value = null, j.value = null, ((_a = I.pageContext.workflowOpinion) == null ? void 0 : _a.boxInstance) && (I.pageContext.workflowOpinion.boxInstance = null);
27
- }), i(H, (e3) => {
28
- S == null ? void 0 : S.disconnect(), S = null, e3 ? (V.value = e3.offsetHeight, S = new ResizeObserver(() => {
29
- V.value = e3.offsetHeight;
30
- }), S.observe(e3)) : V.value = 0;
31
- }), i(() => {
32
- var _a;
33
- return (_a = I.pageContext.workflowOpinion) == null ? void 0 : _a.focusOpinionInput;
34
- }, (e3) => {
35
- e3 ? (_.value = O(), a(() => {
36
- var _a;
37
- ((_a = L.value) == null ? void 0 : _a.focus) && L.value.focus();
38
- })) : _.value = "";
39
- }, { immediate: true });
40
- const G = { show: function() {
41
- I.pageContext.workflowOpinion && (W.value = true);
42
- }, hide: function() {
43
- I.pageContext.workflowOpinion && (W.value = false);
44
- } };
45
- return E2(G), (n2, o2) => {
46
- var _a, _b, _c;
47
- const l2 = u("el-input");
48
- return s(), r(p, null, [w("div", { ref_key: "sentinelRef", ref: B, style: { display: "none" } }, null, 512), ((_a = e2.pageContext.workflowOpinion) == null ? void 0 : _a.showOpinionBox) ? (s(), r("div", { key: 0, style: c({ height: V.value + "px", width: "100%", flexShrink: 0 }) }, null, 4)) : f("", true), (s(), v(d, { to: "body" }, [((_b = e2.pageContext.workflowOpinion) == null ? void 0 : _b.showOpinionBox) ? x((s(), r("div", { key: 0, ref_key: "opinionBarRef", ref: H, class: "opinion-fixed-bar", style: c(A.value) }, [w("div", h, [w("table", C, [w("tbody", null, [w("tr", null, [w("td", y, [((_c = e2.pageContext.workflowOpinion) == null ? void 0 : _c.isRequired) ? (s(), r("span", R, "*")) : f("", true), o2[2] || (o2[2] = g(" 处理意见 ", -1))]), w("td", { class: m(["opinion-input-cell", _.value]) }, [k(l2, { ref_key: "opinionInputRef", ref: L, modelValue: z.value, "onUpdate:modelValue": o2[0] || (o2[0] = (e3) => z.value = e3), autosize: { minRows: 2, maxRows: 4 }, type: "textarea", placeholder: "请输入处理意见", onChange: o2[1] || (o2[1] = (e3) => {
49
- I.pageContext.workflowOpinion && (I.pageContext.workflowOpinion.opinion = z.value.trim(), I.pageContext.workflowOpinion.focusOpinionInput = false);
50
- }), class: "opinion-input" }, null, 8, ["modelValue"])], 2)])])])])], 4)), [[b, W.value]]) : f("", true)]))], 64);
51
- };
52
- } });
53
- export {
54
- E as default
55
- };