@jzg223/design-runtime 0.0.0-stage → 0.0.1

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 (229) hide show
  1. package/CHANGELOG.md +176 -0
  2. package/README.md +275 -2
  3. package/dist/_virtual/_plugin-vue_export-helper.js +10 -0
  4. package/dist/api.js +149 -0
  5. package/dist/comb/design-comb.vue.js +7 -0
  6. package/dist/comb/design-comb2.vue.js +591 -0
  7. package/dist/compat.js +74 -0
  8. package/dist/components/ApiSwitch.vue.js +7 -0
  9. package/dist/components/ApiSwitch2.vue.js +98 -0
  10. package/dist/components/design-debug/dev-mode-toggle.vue.js +7 -0
  11. package/dist/components/design-debug/dev-mode-toggle2.vue.js +41 -0
  12. package/dist/components/design-debug/dev-mode.js +45 -0
  13. package/dist/components/design-debug/dev-state-button.vue.js +7 -0
  14. package/dist/components/design-debug/dev-state-button2.vue.js +447 -0
  15. package/dist/components/design-debug/expr-eval.js +81 -0
  16. package/dist/components/design-shared/host-api.js +47 -0
  17. package/dist/components/design-shared/popup-host.js +11 -0
  18. package/dist/components/design-table/design-table-inner.vue.js +7 -0
  19. package/dist/components/design-table/design-table-inner2.vue.js +39 -0
  20. package/dist/components/design-table/design-table.vue.js +7 -0
  21. package/dist/components/design-table/design-table2.vue.js +937 -0
  22. package/dist/components/design-table/row-actions/delete-action.vue.js +4 -0
  23. package/dist/components/design-table/row-actions/delete-action2.vue.js +42 -0
  24. package/dist/components/design-table/row-actions/edit-action.vue.js +4 -0
  25. package/dist/components/design-table/row-actions/edit-action2.vue.js +145 -0
  26. package/dist/components/design-table/row-actions/index.js +36 -0
  27. package/dist/components/design-table/row-actions/modal-comb-action.vue.js +4 -0
  28. package/dist/components/design-table/row-actions/modal-comb-action2.vue.js +66 -0
  29. package/dist/components/design-table/row-actions/modal-custom-action.vue.js +7 -0
  30. package/dist/components/design-table/row-actions/modal-custom-action2.vue.js +105 -0
  31. package/dist/components/design-table/row-actions/modal-form-action.vue.js +4 -0
  32. package/dist/components/design-table/row-actions/modal-form-action2.vue.js +82 -0
  33. package/dist/components/design-table/row-actions/modal-table-action.vue.js +4 -0
  34. package/dist/components/design-table/row-actions/modal-table-action2.vue.js +67 -0
  35. package/dist/components/design-table/row-actions/modal-tree-action.vue.js +4 -0
  36. package/dist/components/design-table/row-actions/modal-tree-action2.vue.js +70 -0
  37. package/dist/components/design-table/row-actions/navigate-comb-action.vue.js +4 -0
  38. package/dist/components/design-table/row-actions/navigate-comb-action2.vue.js +47 -0
  39. package/dist/components/design-table/row-actions/navigate-form-action.vue.js +4 -0
  40. package/dist/components/design-table/row-actions/navigate-form-action2.vue.js +47 -0
  41. package/dist/components/design-table/row-actions/navigate-table-action.vue.js +4 -0
  42. package/dist/components/design-table/row-actions/navigate-table-action2.vue.js +47 -0
  43. package/dist/components/design-table/row-actions/navigate-tree-action.vue.js +4 -0
  44. package/dist/components/design-table/row-actions/navigate-tree-action2.vue.js +47 -0
  45. package/dist/components/design-table/row-actions/other-action.vue.js +4 -0
  46. package/dist/components/design-table/row-actions/other-action2.vue.js +44 -0
  47. package/dist/components/design-tools/add-tool.vue.js +4 -0
  48. package/dist/components/design-tools/add-tool2.vue.js +136 -0
  49. package/dist/components/design-tools/command-executor.js +135 -0
  50. package/dist/components/design-tools/export-tool.vue.js +4 -0
  51. package/dist/components/design-tools/export-tool2.vue.js +46 -0
  52. package/dist/components/design-tools/import-tool.vue.js +4 -0
  53. package/dist/components/design-tools/import-tool2.vue.js +101 -0
  54. package/dist/components/design-tools/index.js +36 -0
  55. package/dist/components/design-tools/modal-comb-tool.vue.js +4 -0
  56. package/dist/components/design-tools/modal-comb-tool2.vue.js +56 -0
  57. package/dist/components/design-tools/modal-form-tool.vue.js +4 -0
  58. package/dist/components/design-tools/modal-form-tool2.vue.js +66 -0
  59. package/dist/components/design-tools/modal-hcm-tool.vue.js +7 -0
  60. package/dist/components/design-tools/modal-hcm-tool2.vue.js +85 -0
  61. package/dist/components/design-tools/modal-table-tool.vue.js +4 -0
  62. package/dist/components/design-tools/modal-table-tool2.vue.js +54 -0
  63. package/dist/components/design-tools/modal-tree-tool.vue.js +4 -0
  64. package/dist/components/design-tools/modal-tree-tool2.vue.js +57 -0
  65. package/dist/components/design-tools/navigate-comb-tool.vue.js +4 -0
  66. package/dist/components/design-tools/navigate-comb-tool2.vue.js +34 -0
  67. package/dist/components/design-tools/navigate-form-tool.vue.js +4 -0
  68. package/dist/components/design-tools/navigate-form-tool2.vue.js +34 -0
  69. package/dist/components/design-tools/navigate-table-tool.vue.js +4 -0
  70. package/dist/components/design-tools/navigate-table-tool2.vue.js +33 -0
  71. package/dist/components/design-tools/other-tool.vue.js +4 -0
  72. package/dist/components/design-tools/other-tool2.vue.js +34 -0
  73. package/dist/components/flow-status-cell/flow-status-cell.vue.js +7 -0
  74. package/dist/components/flow-status-cell/flow-status-cell2.vue.js +124 -0
  75. package/dist/flow.js +22 -0
  76. package/dist/form/cell-condition.js +122 -0
  77. package/dist/form/derived-express.js +34 -0
  78. package/dist/form/design-form-inner.vue.js +7 -0
  79. package/dist/form/design-form-inner2.vue.js +449 -0
  80. package/dist/form/design-form.vue.js +7 -0
  81. package/dist/form/design-form2.vue.js +681 -0
  82. package/dist/form/fields/checkbox-field.vue.js +88 -0
  83. package/dist/form/fields/checkbox-field2.vue.js +4 -0
  84. package/dist/form/fields/custom-field.vue.js +36 -0
  85. package/dist/form/fields/custom-field2.vue.js +4 -0
  86. package/dist/form/fields/date-field.vue.js +64 -0
  87. package/dist/form/fields/date-field2.vue.js +4 -0
  88. package/dist/form/fields/embedded-list-field.vue.js +7 -0
  89. package/dist/form/fields/embedded-list-field2.vue.js +437 -0
  90. package/dist/form/fields/file-field.vue.js +88 -0
  91. package/dist/form/fields/file-field2.vue.js +4 -0
  92. package/dist/form/fields/image-field.vue.js +90 -0
  93. package/dist/form/fields/image-field2.vue.js +4 -0
  94. package/dist/form/fields/index.js +106 -0
  95. package/dist/form/fields/month-field.vue.js +51 -0
  96. package/dist/form/fields/month-field2.vue.js +4 -0
  97. package/dist/form/fields/org-select-field.vue.js +7 -0
  98. package/dist/form/fields/org-select-field2.vue.js +187 -0
  99. package/dist/form/fields/orgs-select-field.vue.js +182 -0
  100. package/dist/form/fields/orgs-select-field2.vue.js +4 -0
  101. package/dist/form/fields/radio-field.vue.js +91 -0
  102. package/dist/form/fields/radio-field2.vue.js +4 -0
  103. package/dist/form/fields/select-field.vue.js +7 -0
  104. package/dist/form/fields/select-field2.vue.js +317 -0
  105. package/dist/form/fields/splitline-field.vue.js +7 -0
  106. package/dist/form/fields/splitline-field2.vue.js +50 -0
  107. package/dist/form/fields/switch-field.vue.js +32 -0
  108. package/dist/form/fields/switch-field2.vue.js +4 -0
  109. package/dist/form/fields/text-field.vue.js +78 -0
  110. package/dist/form/fields/text-field2.vue.js +4 -0
  111. package/dist/form/fields/time-field.vue.js +50 -0
  112. package/dist/form/fields/time-field2.vue.js +4 -0
  113. package/dist/form/fields/tree-field.vue.js +157 -0
  114. package/dist/form/fields/tree-field2.vue.js +4 -0
  115. package/dist/form/number-precision.js +18 -0
  116. package/dist/form/transformer.js +162 -0
  117. package/dist/host.js +76 -0
  118. package/dist/http.js +19 -0
  119. package/dist/index.js +166 -0
  120. package/dist/mapping.js +44 -0
  121. package/dist/org/dept-api.js +30 -0
  122. package/dist/org/dept-tree-source.js +53 -0
  123. package/dist/org/dept-tree.js +122 -0
  124. package/dist/registry.js +77 -0
  125. package/dist/search/design-search.vue.js +7 -0
  126. package/dist/search/design-search2.vue.js +232 -0
  127. package/dist/search/transformer.js +115 -0
  128. package/dist/style.css +1220 -0
  129. package/dist/table/data.js +18 -0
  130. package/dist/table/load-gate.js +19 -0
  131. package/dist/table/query-body.js +59 -0
  132. package/dist/table/query-dedupe.js +54 -0
  133. package/dist/table/query-search.js +9 -0
  134. package/dist/table/row-action-mapping.js +34 -0
  135. package/dist/table/transformer.js +328 -0
  136. package/dist/tree/design-tree.vue.js +7 -0
  137. package/dist/tree/design-tree2.vue.js +783 -0
  138. package/dist/types/api.d.ts +83 -0
  139. package/dist/types/comb/design-comb.vue.d.ts +38 -0
  140. package/dist/types/compat.d.ts +46 -0
  141. package/dist/types/components/ApiSwitch.vue.d.ts +31 -0
  142. package/dist/types/components/design-debug/dev-mode-toggle.vue.d.ts +2 -0
  143. package/dist/types/components/design-debug/dev-mode.d.ts +8 -0
  144. package/dist/types/components/design-debug/dev-state-button.vue.d.ts +55 -0
  145. package/dist/types/components/design-debug/expr-eval.d.ts +55 -0
  146. package/dist/types/components/design-shared/host-api.d.ts +60 -0
  147. package/dist/types/components/design-shared/popup-host.d.ts +13 -0
  148. package/dist/types/components/design-table/design-table-inner.vue.d.ts +19 -0
  149. package/dist/types/components/design-table/design-table.vue.d.ts +70 -0
  150. package/dist/types/components/design-table/row-actions/delete-action.vue.d.ts +12 -0
  151. package/dist/types/components/design-table/row-actions/edit-action.vue.d.ts +14 -0
  152. package/dist/types/components/design-table/row-actions/index.d.ts +25 -0
  153. package/dist/types/components/design-table/row-actions/modal-comb-action.vue.d.ts +10 -0
  154. package/dist/types/components/design-table/row-actions/modal-custom-action.vue.d.ts +15 -0
  155. package/dist/types/components/design-table/row-actions/modal-form-action.vue.d.ts +10 -0
  156. package/dist/types/components/design-table/row-actions/modal-table-action.vue.d.ts +10 -0
  157. package/dist/types/components/design-table/row-actions/modal-tree-action.vue.d.ts +10 -0
  158. package/dist/types/components/design-table/row-actions/navigate-comb-action.vue.d.ts +10 -0
  159. package/dist/types/components/design-table/row-actions/navigate-form-action.vue.d.ts +10 -0
  160. package/dist/types/components/design-table/row-actions/navigate-table-action.vue.d.ts +10 -0
  161. package/dist/types/components/design-table/row-actions/navigate-tree-action.vue.d.ts +10 -0
  162. package/dist/types/components/design-table/row-actions/other-action.vue.d.ts +14 -0
  163. package/dist/types/components/design-tools/add-tool.vue.d.ts +23 -0
  164. package/dist/types/components/design-tools/command-executor.d.ts +80 -0
  165. package/dist/types/components/design-tools/export-tool.vue.d.ts +9 -0
  166. package/dist/types/components/design-tools/import-tool.vue.d.ts +14 -0
  167. package/dist/types/components/design-tools/index.d.ts +23 -0
  168. package/dist/types/components/design-tools/modal-comb-tool.vue.d.ts +12 -0
  169. package/dist/types/components/design-tools/modal-form-tool.vue.d.ts +12 -0
  170. package/dist/types/components/design-tools/modal-hcm-tool.vue.d.ts +23 -0
  171. package/dist/types/components/design-tools/modal-table-tool.vue.d.ts +12 -0
  172. package/dist/types/components/design-tools/modal-tree-tool.vue.d.ts +12 -0
  173. package/dist/types/components/design-tools/navigate-comb-tool.vue.d.ts +12 -0
  174. package/dist/types/components/design-tools/navigate-form-tool.vue.d.ts +11 -0
  175. package/dist/types/components/design-tools/navigate-table-tool.vue.d.ts +12 -0
  176. package/dist/types/components/design-tools/other-tool.vue.d.ts +16 -0
  177. package/dist/types/components/flow-status-cell/flow-status-cell.vue.d.ts +14 -0
  178. package/dist/types/components/index.d.ts +33 -0
  179. package/dist/types/flow.d.ts +50 -0
  180. package/dist/types/form/cell-condition.d.ts +35 -0
  181. package/dist/types/form/derived-express.d.ts +28 -0
  182. package/dist/types/form/design-form-inner.vue.d.ts +55 -0
  183. package/dist/types/form/design-form.vue.d.ts +96 -0
  184. package/dist/types/form/fields/checkbox-field.vue.d.ts +14 -0
  185. package/dist/types/form/fields/custom-field.vue.d.ts +22 -0
  186. package/dist/types/form/fields/date-field.vue.d.ts +12 -0
  187. package/dist/types/form/fields/embedded-list-field.vue.d.ts +26 -0
  188. package/dist/types/form/fields/file-field.vue.d.ts +12 -0
  189. package/dist/types/form/fields/image-field.vue.d.ts +12 -0
  190. package/dist/types/form/fields/index.d.ts +34 -0
  191. package/dist/types/form/fields/month-field.vue.d.ts +12 -0
  192. package/dist/types/form/fields/org-select-field.vue.d.ts +14 -0
  193. package/dist/types/form/fields/orgs-select-field.vue.d.ts +12 -0
  194. package/dist/types/form/fields/radio-field.vue.d.ts +14 -0
  195. package/dist/types/form/fields/select-field.vue.d.ts +14 -0
  196. package/dist/types/form/fields/splitline-field.vue.d.ts +7 -0
  197. package/dist/types/form/fields/switch-field.vue.d.ts +12 -0
  198. package/dist/types/form/fields/text-field.vue.d.ts +12 -0
  199. package/dist/types/form/fields/time-field.vue.d.ts +12 -0
  200. package/dist/types/form/fields/tree-field.vue.d.ts +12 -0
  201. package/dist/types/form/number-precision.d.ts +15 -0
  202. package/dist/types/form/transformer.d.ts +27 -0
  203. package/dist/types/host.d.ts +182 -0
  204. package/dist/types/http.d.ts +59 -0
  205. package/dist/types/index.d.ts +41 -0
  206. package/dist/types/mapping.d.ts +39 -0
  207. package/dist/types/org/dept-api.d.ts +12 -0
  208. package/dist/types/org/dept-tree-source.d.ts +15 -0
  209. package/dist/types/org/dept-tree.d.ts +62 -0
  210. package/dist/types/registry.d.ts +79 -0
  211. package/dist/types/search/design-search.vue.d.ts +46 -0
  212. package/dist/types/search/transformer.d.ts +36 -0
  213. package/dist/types/table/data.d.ts +30 -0
  214. package/dist/types/table/index.d.ts +20 -0
  215. package/dist/types/table/load-gate.d.ts +24 -0
  216. package/dist/types/table/query-body.d.ts +46 -0
  217. package/dist/types/table/query-dedupe.d.ts +42 -0
  218. package/dist/types/table/query-search.d.ts +21 -0
  219. package/dist/types/table/row-action-mapping.d.ts +36 -0
  220. package/dist/types/table/transformer.d.ts +59 -0
  221. package/dist/types/tree/design-tree.vue.d.ts +33 -0
  222. package/dist/types/types.d.ts +525 -0
  223. package/dist/types/utils/default-value.d.ts +16 -0
  224. package/dist/types/utils/download.d.ts +9 -0
  225. package/dist/types/utils/popup-width.d.ts +21 -0
  226. package/dist/utils/default-value.js +38 -0
  227. package/dist/utils/download.js +19 -0
  228. package/dist/utils/popup-width.js +19 -0
  229. package/package.json +73 -4
@@ -0,0 +1,101 @@
1
+ import { defineComponent, ref, unref, openBlock, createBlock, resolveDynamicComponent, withCtx, createElementVNode, createVNode, createCommentVNode } from "vue";
2
+ import { InboxOutlined } from "@antdv-next/icons";
3
+ import { Upload } from "antdv-next";
4
+ import { getHostPopup, requireHttp } from "../../host.js";
5
+ import { platformMessage } from "../design-shared/host-api.js";
6
+ const _hoisted_1 = { class: "flex flex-col gap-4" };
7
+ const _hoisted_2 = { class: "ant-upload-drag-icon flex items-center justify-center" };
8
+ const _sfc_main = /* @__PURE__ */ defineComponent({
9
+ ...{ name: "DesignTableImportTool" },
10
+ __name: "import-tool",
11
+ props: {
12
+ tool: {},
13
+ gridApi: {}
14
+ },
15
+ emits: ["imported"],
16
+ setup(__props, { expose: __expose, emit: __emit }) {
17
+ const UploadDragger = Upload.Dragger;
18
+ const props = __props;
19
+ const emit = __emit;
20
+ const fileList = ref([]);
21
+ const importing = ref(false);
22
+ const message = platformMessage();
23
+ const useVbenModal = getHostPopup("modal");
24
+ const [ImportModal, importModalApi] = useVbenModal ? useVbenModal({ onCancel: handleCancel, onConfirm: handleSubmit }) : [null, null];
25
+ let warnedMissingModal = false;
26
+ function open() {
27
+ if (!useVbenModal) {
28
+ if (!warnedMissingModal) {
29
+ warnedMissingModal = true;
30
+ console.warn(
31
+ "[design-runtime] 未注入 host.ui.useVbenModal:导入按钮不可用。请在 installDesignPlatform({ ui: { useVbenModal } }) 里注入"
32
+ );
33
+ }
34
+ return;
35
+ }
36
+ fileList.value = [];
37
+ importModalApi.open();
38
+ }
39
+ async function handleSubmit() {
40
+ var _a, _b;
41
+ if (!props.tool.url) return;
42
+ if (fileList.value.length === 0) {
43
+ message.warning("请选择要上传的文件");
44
+ return;
45
+ }
46
+ importing.value = true;
47
+ importModalApi.modalLoading(true);
48
+ try {
49
+ const formData = new FormData();
50
+ formData.append("file", fileList.value[0].originFileObj);
51
+ await requireHttp().post(props.tool.url, formData, {
52
+ headers: { "Content-Type": "multipart/form-data;charset=UTF-8" }
53
+ });
54
+ importModalApi.close();
55
+ fileList.value = [];
56
+ (_b = (_a = props.gridApi) == null ? void 0 : _a.query) == null ? void 0 : _b.call(_a);
57
+ emit("imported");
58
+ } catch (err) {
59
+ console.error("导入失败:", err);
60
+ } finally {
61
+ importing.value = false;
62
+ importModalApi.modalLoading(false);
63
+ }
64
+ }
65
+ function handleCancel() {
66
+ importModalApi.close();
67
+ fileList.value = [];
68
+ }
69
+ __expose({ trigger: open });
70
+ return (_ctx, _cache) => {
71
+ return unref(ImportModal) ? (openBlock(), createBlock(resolveDynamicComponent(unref(ImportModal)), {
72
+ key: 0,
73
+ title: "导入"
74
+ }, {
75
+ default: withCtx(() => [
76
+ createElementVNode("div", _hoisted_1, [
77
+ createVNode(unref(UploadDragger), {
78
+ "file-list": fileList.value,
79
+ "onUpdate:fileList": _cache[0] || (_cache[0] = ($event) => fileList.value = $event),
80
+ "before-upload": () => false,
81
+ "max-count": 1,
82
+ accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
83
+ }, {
84
+ default: withCtx(() => [
85
+ createElementVNode("p", _hoisted_2, [
86
+ createVNode(unref(InboxOutlined), { class: "size-[48px] text-primary" })
87
+ ]),
88
+ _cache[1] || (_cache[1] = createElementVNode("p", { class: "ant-upload-text" }, "点击或者拖拽到此处上传文件", -1))
89
+ ]),
90
+ _: 1
91
+ }, 8, ["file-list"])
92
+ ])
93
+ ]),
94
+ _: 1
95
+ })) : createCommentVNode("", true);
96
+ };
97
+ }
98
+ });
99
+ export {
100
+ _sfc_main as default
101
+ };
@@ -0,0 +1,36 @@
1
+ import { defineAsyncComponent } from "vue";
2
+ const toolComponentMap = {
3
+ add: defineAsyncComponent(() => import("./add-tool.vue.js")),
4
+ export: defineAsyncComponent(() => import("./export-tool.vue.js")),
5
+ "hcm-tool": defineAsyncComponent(() => import("./modal-hcm-tool.vue.js")),
6
+ import: defineAsyncComponent(() => import("./import-tool.vue.js")),
7
+ "modal-combo": defineAsyncComponent(() => import("./modal-comb-tool.vue.js")),
8
+ "modal-form": defineAsyncComponent(() => import("./modal-form-tool.vue.js")),
9
+ "modal-table": defineAsyncComponent(() => import("./modal-table-tool.vue.js")),
10
+ "modal-tree": defineAsyncComponent(() => import("./modal-tree-tool.vue.js")),
11
+ "navigate-combo": defineAsyncComponent(() => import("./navigate-comb-tool.vue.js")),
12
+ "navigate-form": defineAsyncComponent(() => import("./navigate-form-tool.vue.js")),
13
+ "navigate-table": defineAsyncComponent(() => import("./navigate-table-tool.vue.js")),
14
+ other: defineAsyncComponent(() => import("./other-tool.vue.js"))
15
+ };
16
+ const pendingToolTypes = [];
17
+ const toolTypes = Object.keys(toolComponentMap).sort();
18
+ const warnedTypes = /* @__PURE__ */ new Set();
19
+ function resolveToolComponent(type) {
20
+ const key = String(type ?? "").trim();
21
+ const comp = toolComponentMap[key];
22
+ if (comp) return comp;
23
+ if (!warnedTypes.has(key)) {
24
+ warnedTypes.add(key);
25
+ console.warn(
26
+ `[design-runtime] 工具类型「${key || "(空)"}」不可用:未知的工具类型`
27
+ );
28
+ }
29
+ return void 0;
30
+ }
31
+ export {
32
+ pendingToolTypes,
33
+ resolveToolComponent,
34
+ toolComponentMap,
35
+ toolTypes
36
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./modal-comb-tool2.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,56 @@
1
+ import { defineComponent, provide, ref, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode } from "vue";
2
+ import { Modal } from "antdv-next";
3
+ import DesignComb from "../../comb/design-comb.vue.js";
4
+ import { DESIGN_POPUP_HOST_KEY } from "../design-shared/popup-host.js";
5
+ import { buildMappedParams, buildExpressId } from "../../mapping.js";
6
+ const _hoisted_1 = { style: { "height": "70vh" } };
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ ...{ name: "DesignTableModalCombTool" },
9
+ __name: "modal-comb-tool",
10
+ props: {
11
+ tool: {},
12
+ category: {},
13
+ mappingScope: {}
14
+ },
15
+ setup(__props, { expose: __expose }) {
16
+ const props = __props;
17
+ provide(DESIGN_POPUP_HOST_KEY, "antd");
18
+ const open = ref(false);
19
+ const query = computed(() => {
20
+ const result = buildMappedParams(props.tool, props.mappingScope ?? {});
21
+ const id = buildExpressId(props.tool, props.mappingScope ?? {});
22
+ if (id !== void 0) result.id = id;
23
+ return result;
24
+ });
25
+ const category = computed(() => props.tool.targetComboCategory || props.category || "");
26
+ const name = computed(() => props.tool.targetComboName);
27
+ function trigger() {
28
+ if (!category.value || !name.value) return;
29
+ open.value = true;
30
+ }
31
+ __expose({ trigger });
32
+ return (_ctx, _cache) => {
33
+ return openBlock(), createBlock(unref(Modal), {
34
+ open: open.value,
35
+ title: __props.tool.title,
36
+ width: 1200,
37
+ footer: null,
38
+ onCancel: _cache[0] || (_cache[0] = ($event) => open.value = false)
39
+ }, {
40
+ default: withCtx(() => [
41
+ createElementVNode("div", _hoisted_1, [
42
+ createVNode(DesignComb, {
43
+ category: category.value,
44
+ name: name.value,
45
+ "parent-params": query.value
46
+ }, null, 8, ["category", "name", "parent-params"])
47
+ ])
48
+ ]),
49
+ _: 1
50
+ }, 8, ["open", "title"]);
51
+ };
52
+ }
53
+ });
54
+ export {
55
+ _sfc_main as default
56
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./modal-form-tool2.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,66 @@
1
+ import { defineComponent, provide, ref, computed, openBlock, createBlock, unref, withCtx } from "vue";
2
+ import { Modal } from "antdv-next";
3
+ import DesignForm from "../../form/design-form.vue.js";
4
+ import { DESIGN_POPUP_HOST_KEY } from "../design-shared/popup-host.js";
5
+ import { buildMappedParams, buildExpressId } from "../../mapping.js";
6
+ const _sfc_main = /* @__PURE__ */ defineComponent({
7
+ ...{ name: "DesignTableModalFormTool" },
8
+ __name: "modal-form-tool",
9
+ props: {
10
+ tool: {},
11
+ category: {},
12
+ mappingScope: {}
13
+ },
14
+ setup(__props, { expose: __expose }) {
15
+ const props = __props;
16
+ provide(DESIGN_POPUP_HOST_KEY, "antd");
17
+ const open = ref(false);
18
+ const openSeq = ref(0);
19
+ const query = computed(
20
+ () => buildMappedParams(props.tool, props.mappingScope ?? {})
21
+ );
22
+ const sourceId = computed(() => {
23
+ var _a;
24
+ const expressId = buildExpressId(props.tool, props.mappingScope ?? {});
25
+ const id = expressId !== void 0 ? expressId : (_a = query.value) == null ? void 0 : _a.id;
26
+ return id == null ? void 0 : String(id);
27
+ });
28
+ const extraParams = computed(() => {
29
+ const rest = { ...query.value };
30
+ delete rest.id;
31
+ return rest;
32
+ });
33
+ const category = computed(() => props.tool.targetFormCategory || props.category || "");
34
+ const name = computed(() => props.tool.targetFormName);
35
+ function trigger() {
36
+ if (!category.value || !name.value) return;
37
+ openSeq.value += 1;
38
+ open.value = true;
39
+ }
40
+ __expose({ trigger });
41
+ return (_ctx, _cache) => {
42
+ return openBlock(), createBlock(unref(Modal), {
43
+ open: open.value,
44
+ title: __props.tool.title,
45
+ width: 700,
46
+ footer: null,
47
+ onCancel: _cache[0] || (_cache[0] = ($event) => open.value = false)
48
+ }, {
49
+ default: withCtx(() => [
50
+ (openBlock(), createBlock(DesignForm, {
51
+ key: `${category.value}-${name.value}-${sourceId.value ?? "new"}-${openSeq.value}`,
52
+ category: category.value,
53
+ name: name.value,
54
+ "source-id": sourceId.value,
55
+ "parent-params": extraParams.value,
56
+ mode: "standalone"
57
+ }, null, 8, ["category", "name", "source-id", "parent-params"]))
58
+ ]),
59
+ _: 1
60
+ }, 8, ["open", "title"]);
61
+ };
62
+ }
63
+ });
64
+ export {
65
+ _sfc_main as default
66
+ };
@@ -0,0 +1,7 @@
1
+ import _sfc_main from "./modal-hcm-tool2.vue.js";
2
+ /* empty css */
3
+ import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const modalHcmTool = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4b3c6924"]]);
5
+ export {
6
+ modalHcmTool as default
7
+ };
@@ -0,0 +1,85 @@
1
+ import { defineComponent, ref, computed, openBlock, createBlock, unref, withCtx, createElementVNode, resolveDynamicComponent } from "vue";
2
+ import { Modal } from "antdv-next";
3
+ import { resolveCellComponent } from "../../form/fields/index.js";
4
+ import { buildHostApi } from "../design-shared/host-api.js";
5
+ const _hoisted_1 = { class: "modal-hcm-body" };
6
+ const _sfc_main = /* @__PURE__ */ defineComponent({
7
+ ...{ name: "DesignTableModalHcmTool" },
8
+ __name: "modal-hcm-tool",
9
+ props: {
10
+ tool: {},
11
+ category: {},
12
+ mappingScope: {},
13
+ gridApi: {}
14
+ },
15
+ setup(__props, { expose: __expose }) {
16
+ const props = __props;
17
+ const open = ref(false);
18
+ const openSeq = ref(0);
19
+ const rows = ref([]);
20
+ const comname = computed(() => (props.tool.comname ?? "").trim());
21
+ const modalWidth = computed(() => {
22
+ const w = Number(props.tool.modalWidth);
23
+ return Number.isFinite(w) && w > 0 ? w : 800;
24
+ });
25
+ const cell = computed(() => ({
26
+ comname: comname.value,
27
+ title: props.tool.title || props.tool.label,
28
+ type: "hcm-tool"
29
+ }));
30
+ const hostApi = computed(
31
+ () => buildHostApi({
32
+ close: () => {
33
+ open.value = false;
34
+ },
35
+ reload: () => {
36
+ var _a, _b;
37
+ (_b = (_a = props.gridApi) == null ? void 0 : _a.query) == null ? void 0 : _b.call(_a);
38
+ }
39
+ })
40
+ );
41
+ const comp = computed(() => {
42
+ if (!comname.value) {
43
+ console.warn("[design-table] 「工具条自定义组件」没配组件名(comname),显示占位");
44
+ }
45
+ return resolveCellComponent({ type: "my", comname: comname.value });
46
+ });
47
+ function trigger() {
48
+ var _a, _b, _c;
49
+ rows.value = ((_c = (_b = (_a = props.gridApi) == null ? void 0 : _a.grid) == null ? void 0 : _b.getCheckboxRecords) == null ? void 0 : _c.call(_b)) ?? [];
50
+ openSeq.value += 1;
51
+ open.value = true;
52
+ }
53
+ __expose({ trigger });
54
+ return (_ctx, _cache) => {
55
+ return openBlock(), createBlock(unref(Modal), {
56
+ open: open.value,
57
+ title: __props.tool.title || __props.tool.label || "自定义组件",
58
+ width: modalWidth.value,
59
+ footer: null,
60
+ onCancel: _cache[0] || (_cache[0] = ($event) => open.value = false)
61
+ }, {
62
+ default: withCtx(() => {
63
+ var _a;
64
+ return [
65
+ createElementVNode("div", _hoisted_1, [
66
+ (openBlock(), createBlock(resolveDynamicComponent(comp.value), {
67
+ key: openSeq.value,
68
+ api: hostApi.value,
69
+ cell: cell.value,
70
+ comname: comname.value,
71
+ host: "toolbar",
72
+ params: ((_a = __props.mappingScope) == null ? void 0 : _a.params) ?? {},
73
+ rows: rows.value
74
+ }, null, 8, ["api", "cell", "comname", "params", "rows"]))
75
+ ])
76
+ ];
77
+ }),
78
+ _: 1
79
+ }, 8, ["open", "title", "width"]);
80
+ };
81
+ }
82
+ });
83
+ export {
84
+ _sfc_main as default
85
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./modal-table-tool2.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,54 @@
1
+ import { defineComponent, provide, ref, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode } from "vue";
2
+ import { Modal } from "antdv-next";
3
+ import DesignTable from "../design-table/design-table.vue.js";
4
+ import { DESIGN_POPUP_HOST_KEY } from "../design-shared/popup-host.js";
5
+ import { buildMappedParams } from "../../mapping.js";
6
+ const _hoisted_1 = { style: { "height": "70vh" } };
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ ...{ name: "DesignTableModalTableTool" },
9
+ __name: "modal-table-tool",
10
+ props: {
11
+ tool: {},
12
+ category: {},
13
+ mappingScope: {}
14
+ },
15
+ setup(__props, { expose: __expose }) {
16
+ const props = __props;
17
+ provide(DESIGN_POPUP_HOST_KEY, "antd");
18
+ const open = ref(false);
19
+ const query = computed(
20
+ () => buildMappedParams(props.tool, props.mappingScope ?? {})
21
+ );
22
+ const category = computed(() => props.tool.targetTableCategory || props.category || "");
23
+ const name = computed(() => props.tool.targetTableName);
24
+ function trigger() {
25
+ if (!category.value || !name.value) return;
26
+ open.value = true;
27
+ }
28
+ __expose({ trigger });
29
+ return (_ctx, _cache) => {
30
+ return openBlock(), createBlock(unref(Modal), {
31
+ open: open.value,
32
+ title: __props.tool.title,
33
+ width: 1200,
34
+ footer: null,
35
+ onCancel: _cache[0] || (_cache[0] = ($event) => open.value = false)
36
+ }, {
37
+ default: withCtx(() => [
38
+ createElementVNode("div", _hoisted_1, [
39
+ createVNode(DesignTable, {
40
+ category: category.value,
41
+ name: name.value,
42
+ "parent-params": query.value,
43
+ "no-page": true
44
+ }, null, 8, ["category", "name", "parent-params"])
45
+ ])
46
+ ]),
47
+ _: 1
48
+ }, 8, ["open", "title"]);
49
+ };
50
+ }
51
+ });
52
+ export {
53
+ _sfc_main as default
54
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./modal-tree-tool2.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,57 @@
1
+ import { defineComponent, provide, ref, computed, openBlock, createBlock, unref, withCtx, createElementBlock, createVNode, createCommentVNode } from "vue";
2
+ import { Modal } from "antdv-next";
3
+ import DesignTree from "../../tree/design-tree.vue.js";
4
+ import { DESIGN_POPUP_HOST_KEY } from "../design-shared/popup-host.js";
5
+ import { buildMappedParams } from "../../mapping.js";
6
+ const _hoisted_1 = {
7
+ key: 0,
8
+ style: { "height": "70vh" }
9
+ };
10
+ const _sfc_main = /* @__PURE__ */ defineComponent({
11
+ ...{ name: "DesignTableModalTreeTool" },
12
+ __name: "modal-tree-tool",
13
+ props: {
14
+ tool: {},
15
+ category: {},
16
+ mappingScope: {}
17
+ },
18
+ setup(__props, { expose: __expose }) {
19
+ const props = __props;
20
+ provide(DESIGN_POPUP_HOST_KEY, "antd");
21
+ const open = ref(false);
22
+ const query = computed(
23
+ () => buildMappedParams(props.tool, props.mappingScope ?? {})
24
+ );
25
+ const category = computed(() => props.tool.targetTreeCategory || props.category || "");
26
+ const name = computed(() => props.tool.targetTreeName);
27
+ function trigger() {
28
+ if (!category.value || !name.value) return;
29
+ open.value = true;
30
+ }
31
+ __expose({ trigger });
32
+ return (_ctx, _cache) => {
33
+ return openBlock(), createBlock(unref(Modal), {
34
+ open: open.value,
35
+ title: __props.tool.title,
36
+ width: 1200,
37
+ footer: null,
38
+ "body-style": { background: "#f5f7fa", padding: 0 },
39
+ onCancel: _cache[0] || (_cache[0] = ($event) => open.value = false)
40
+ }, {
41
+ default: withCtx(() => [
42
+ open.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
43
+ createVNode(DesignTree, {
44
+ category: category.value,
45
+ name: name.value,
46
+ "parent-params": query.value
47
+ }, null, 8, ["category", "name", "parent-params"])
48
+ ])) : createCommentVNode("", true)
49
+ ]),
50
+ _: 1
51
+ }, 8, ["open", "title"]);
52
+ };
53
+ }
54
+ });
55
+ export {
56
+ _sfc_main as default
57
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./navigate-comb-tool2.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,34 @@
1
+ import { defineComponent, createCommentVNode } from "vue";
2
+ import { useRouter } from "vue-router";
3
+ import { buildMappedParams, buildExpressId } from "../../mapping.js";
4
+ const _sfc_main = /* @__PURE__ */ defineComponent({
5
+ ...{ name: "DesignTableNavigateCombTool" },
6
+ __name: "navigate-comb-tool",
7
+ props: {
8
+ category: {},
9
+ mappingScope: {},
10
+ tool: {}
11
+ },
12
+ setup(__props, { expose: __expose }) {
13
+ const props = __props;
14
+ const router = useRouter();
15
+ function execute() {
16
+ const category = props.tool.targetComboCategory || props.category || "";
17
+ const name = props.tool.targetComboName;
18
+ if (!category || !name) return;
19
+ const scope = props.mappingScope ?? {};
20
+ const query = buildMappedParams(props.tool, scope);
21
+ const id = buildExpressId(props.tool, scope);
22
+ if (id !== void 0) query.id = id;
23
+ router.push({ path: `/design/comb/${category}/${name}`, query }).catch(() => {
24
+ });
25
+ }
26
+ __expose({ trigger: execute });
27
+ return (_ctx, _cache) => {
28
+ return createCommentVNode("", true);
29
+ };
30
+ }
31
+ });
32
+ export {
33
+ _sfc_main as default
34
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./navigate-form-tool2.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,34 @@
1
+ import { defineComponent, createCommentVNode } from "vue";
2
+ import { useRouter } from "vue-router";
3
+ import { buildMappedParams, buildExpressId } from "../../mapping.js";
4
+ const _sfc_main = /* @__PURE__ */ defineComponent({
5
+ ...{ name: "DesignTableNavigateFormTool" },
6
+ __name: "navigate-form-tool",
7
+ props: {
8
+ category: {},
9
+ mappingScope: {},
10
+ tool: {}
11
+ },
12
+ setup(__props, { expose: __expose }) {
13
+ const props = __props;
14
+ const router = useRouter();
15
+ function execute() {
16
+ const category = props.tool.targetFormCategory || props.category || "";
17
+ const name = props.tool.targetFormName;
18
+ if (!category || !name) return;
19
+ const scope = props.mappingScope ?? {};
20
+ const query = buildMappedParams(props.tool, scope);
21
+ const id = buildExpressId(props.tool, scope);
22
+ if (id !== void 0) query.id = id;
23
+ router.push({ path: `/design/form/${category}/${name}`, query }).catch(() => {
24
+ });
25
+ }
26
+ __expose({ trigger: execute });
27
+ return (_ctx, _cache) => {
28
+ return createCommentVNode("", true);
29
+ };
30
+ }
31
+ });
32
+ export {
33
+ _sfc_main as default
34
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./navigate-table-tool2.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,33 @@
1
+ import { defineComponent, createCommentVNode } from "vue";
2
+ import { useRouter } from "vue-router";
3
+ import { buildMappedParams } from "../../mapping.js";
4
+ const _sfc_main = /* @__PURE__ */ defineComponent({
5
+ ...{ name: "DesignTableNavigateTableTool" },
6
+ __name: "navigate-table-tool",
7
+ props: {
8
+ category: {},
9
+ mappingScope: {},
10
+ tool: {}
11
+ },
12
+ setup(__props, { expose: __expose }) {
13
+ const props = __props;
14
+ const router = useRouter();
15
+ function execute() {
16
+ const category = props.tool.targetTableCategory || props.category || "";
17
+ const name = props.tool.targetTableName;
18
+ if (!category || !name) return;
19
+ router.push({
20
+ path: `/design/table/${category}/${name}`,
21
+ query: buildMappedParams(props.tool, props.mappingScope ?? {})
22
+ }).catch(() => {
23
+ });
24
+ }
25
+ __expose({ trigger: execute });
26
+ return (_ctx, _cache) => {
27
+ return createCommentVNode("", true);
28
+ };
29
+ }
30
+ });
31
+ export {
32
+ _sfc_main as default
33
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./other-tool2.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,34 @@
1
+ import { defineComponent, createCommentVNode } from "vue";
2
+ import { executeCommand } from "./command-executor.js";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ ...{ name: "DesignTableOtherTool" },
5
+ __name: "other-tool",
6
+ props: {
7
+ category: {},
8
+ gridApi: {},
9
+ pfield: {},
10
+ tool: {}
11
+ },
12
+ emits: ["command"],
13
+ setup(__props, { expose: __expose, emit: __emit }) {
14
+ const props = __props;
15
+ const emit = __emit;
16
+ function execute() {
17
+ emit("command", props.tool);
18
+ executeCommand(props.tool.command, {
19
+ action: props.tool,
20
+ category: props.category,
21
+ gridApi: props.gridApi,
22
+ pfield: props.pfield,
23
+ row: {}
24
+ });
25
+ }
26
+ __expose({ trigger: execute });
27
+ return (_ctx, _cache) => {
28
+ return createCommentVNode("", true);
29
+ };
30
+ }
31
+ });
32
+ export {
33
+ _sfc_main as default
34
+ };
@@ -0,0 +1,7 @@
1
+ import _sfc_main from "./flow-status-cell2.vue.js";
2
+ /* empty css */
3
+ import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const FlowStatusCell = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ddccf2b2"]]);
5
+ export {
6
+ FlowStatusCell as default
7
+ };