@jeecg/online 3.6.2-GA → 3.7.0-beta

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 (118) hide show
  1. package/AiModal-fe3988fb.mjs +84 -0
  2. package/AuthButtonConfig-d50a0a65.mjs +134 -0
  3. package/{AuthButtonTree-c2602a7c.mjs → AuthButtonTree-589395ed.mjs} +2 -2
  4. package/AuthDataConfig-7bb0cd85.mjs +237 -0
  5. package/{AuthDataTree-9dc58b20.mjs → AuthDataTree-6e3bb86f.mjs} +1 -1
  6. package/AuthFieldConfig-490fc0ab.mjs +139 -0
  7. package/{AuthFieldTree-d836be59.mjs → AuthFieldTree-b7cd091e.mjs} +1 -1
  8. package/AuthManagerDrawer-5e2ed5ce.mjs +118 -0
  9. package/AuthSetterModal-6f74449c.mjs +273 -0
  10. package/{CgformCopyList-86157923.mjs → CgformCopyList-8077ccc6.mjs} +47 -45
  11. package/{CgformModal-5cf02d51.mjs → CgformModal-36faf29a.mjs} +256 -246
  12. package/{CgreportModal.vue_vue_type_script_setup_true_lang-c2ceb064.mjs → CgreportModal-5a23d089.mjs} +140 -117
  13. package/CheckDictTable-b5cb0e2b.mjs +226 -0
  14. package/{CodeFileListModal-f747daae.mjs → CodeFileListModal-0e26b7e0.mjs} +2 -2
  15. package/{CodeFileViewModal-a9fb2900.mjs → CodeFileViewModal-9d4a5b5f.mjs} +36 -32
  16. package/CodeGeneratorModal-b722d976.mjs +238 -0
  17. package/{CustomButtonList-b9b27a93.mjs → CustomButtonList-37639061.mjs} +118 -100
  18. package/{DBAttributeTable-6bdcb1e8.mjs → DBAttributeTable-95dc66c1.mjs} +110 -89
  19. package/{DbToOnlineModal-3705e91a.mjs → DbToOnlineModal-f49b9530.mjs} +56 -50
  20. package/DetailForm-4aa2570b.mjs +485 -0
  21. package/{EnhanceJavaModal-c13de6e0.mjs → EnhanceJavaModal-98934198.mjs} +3 -3
  22. package/{EnhanceJsHistory-154101f0.mjs → EnhanceJsHistory-9c4acdaf.mjs} +2 -2
  23. package/EnhanceJsModal-247f640d.mjs +532 -0
  24. package/{EnhanceSqlModal-221c22dc.mjs → EnhanceSqlModal-65b74b0f.mjs} +3 -3
  25. package/ExtendConfigModal-00f2fb55.mjs +117 -0
  26. package/FieldExtendJsonModal-cc7fce26.mjs +277 -0
  27. package/{FileSelectModal-de40a706.mjs → FileSelectModal-38660e3c.mjs} +1 -1
  28. package/{ForeignKeyTable-22989042.mjs → ForeignKeyTable-a78cb5ad.mjs} +3 -3
  29. package/{IndexTable-833d34ff.mjs → IndexTable-1b496559.mjs} +10 -10
  30. package/{JModalTip-0413ad6a.mjs → JModalTip-4a83aaed.mjs} +1 -1
  31. package/{JOnlineSearchSelect-9ea89e13.mjs → JOnlineSearchSelect-34a37ec9.mjs} +1 -1
  32. package/{LeftDepart-b0a535c0.mjs → LeftDepart-8ade4bf7.mjs} +1 -1
  33. package/{LeftRole-22c90d6b.mjs → LeftRole-7d8c5acc.mjs} +1 -1
  34. package/{LeftUser-a44d63dd.mjs → LeftUser-b4d1372a.mjs} +3 -3
  35. package/LinkTableConfigModal-a138c85e.mjs +240 -0
  36. package/{LinkTableFieldConfigModal-06693eaa.mjs → LinkTableFieldConfigModal-17b413b0.mjs} +41 -41
  37. package/{LinkTableListPiece-46e8af51.mjs → LinkTableListPiece-2660d709.mjs} +1 -1
  38. package/{ModalFormDemo-d107fa87.mjs → ModalFormDemo-0544737d.mjs} +1 -1
  39. package/OnlCgformErpList-30e416c8.mjs +470 -0
  40. package/OnlCgformErpSubTable-9a876058.mjs +427 -0
  41. package/OnlCgformInnerSubTable-290ace5d.mjs +266 -0
  42. package/OnlCgformInnerTableList-f89b6687.mjs +458 -0
  43. package/OnlCgformTabList-7a2f2c03.mjs +408 -0
  44. package/OnlineAutoList-46c6c8b9.mjs +493 -0
  45. package/OnlineAutoModal-971bef13.mjs +236 -0
  46. package/{OnlineAutoTreeList-ec27d271.mjs → OnlineAutoTreeList-3b92454c.mjs} +206 -204
  47. package/{OnlineCustomModal-3e6792d3.mjs → OnlineCustomModal-594244f3.mjs} +15 -11
  48. package/{OnlineDetailModal-f40e37e1.mjs → OnlineDetailModal-2a271e0b.mjs} +74 -64
  49. package/OnlineForm-018981b2.mjs +924 -0
  50. package/OnlineForm.vue_vue_type_style_index_0_scoped_0f9f2964_lang-4ed993c7.mjs +1 -0
  51. package/OnlineFormDetail-e036cd11.mjs +342 -0
  52. package/OnlineFormUrlAdd-7fb3dcca.mjs +115 -0
  53. package/OnlineFormUrlDetail-b2292137.mjs +119 -0
  54. package/OnlineFormUrlEdit-44080fb3.mjs +113 -0
  55. package/OnlineFormUrlSuccess-af285b02.mjs +59 -0
  56. package/OnlineQueryForm-998c12a4.mjs +444 -0
  57. package/{OnlineSearchFormItem-fe308194.mjs → OnlineSearchFormItem-6feacae6.mjs} +2 -2
  58. package/{OnlineSelectCascade-abc345f9.mjs → OnlineSelectCascade-471fcc76.mjs} +1 -1
  59. package/{OnlineSubFormDetail-02326a8c.mjs → OnlineSubFormDetail-03f8ee5c.mjs} +29 -27
  60. package/OnlineTabAutoModal-7b9bcd0b.mjs +306 -0
  61. package/{OnlineTabDetailModal-d23bd4c9.mjs → OnlineTabDetailModal-88143301.mjs} +22 -20
  62. package/OnlineTabForm-9ad7d29a.mjs +805 -0
  63. package/OnlineTabFormDetail-bbf23caa.mjs +327 -0
  64. package/PageAttributeTable-6c23547b.mjs +446 -0
  65. package/{ProcessOnlineForm-84f4d02d.mjs → ProcessOnlineForm-b42198f5.mjs} +32 -28
  66. package/QueryTable-96b3dbd0.mjs +144 -0
  67. package/SetSwitchOptions-a452fa0f.mjs +62 -0
  68. package/SuperQuery-cbfba908.mjs +975 -0
  69. package/{auth.data-8be5c9e3.mjs → auth.data-22948e87.mjs} +56 -14
  70. package/{cgform.data-cbdd88c3.mjs → cgform.data-475d4984.mjs} +5 -1
  71. package/constant-fa63bd66.mjs +10 -0
  72. package/{enhance.data-efc7e155.mjs → enhance.data-3304d553.mjs} +3 -3
  73. package/index-173949bb.mjs +57 -0
  74. package/{index-0a93652b.mjs → index-581bef24.mjs} +29 -27
  75. package/{index-e1bda35b.mjs → index-d2abb8a0.mjs} +394 -361
  76. package/main.index.js +1 -1
  77. package/package.json +1 -1
  78. package/style.css +1 -1
  79. package/useCgformList-8755a94e.mjs +426 -0
  80. package/useExtendComponent-bb7cca20.mjs +4295 -0
  81. package/useFormUrl-2ee1a82d.mjs +24 -0
  82. package/useListButton-7ddb9a46.mjs +697 -0
  83. package/{useSchemas-0433a403.mjs → useSchemas-47e45edc.mjs} +167 -86
  84. package/{useTableSync-774c3774.mjs → useTableSync-f6089e8a.mjs} +1 -1
  85. package/AuthButtonConfig-f142147a.mjs +0 -125
  86. package/AuthDataConfig-8e5c7b0c.mjs +0 -212
  87. package/AuthFieldConfig-e9a45f94.mjs +0 -139
  88. package/AuthManagerDrawer-5b558c23.mjs +0 -114
  89. package/AuthSetterModal-0cc557cf.mjs +0 -267
  90. package/CgreportModal-2eb9c9e1.mjs +0 -13
  91. package/CheckDictTable-27102064.mjs +0 -211
  92. package/CodeGeneratorModal-3a0e9f0e.mjs +0 -233
  93. package/DetailForm-cdeb54e3.mjs +0 -462
  94. package/EnhanceJsModal-6158804c.mjs +0 -311
  95. package/ExtendConfigModal-0564ef83.mjs +0 -111
  96. package/FieldExtendJsonModal-40d961c1.mjs +0 -219
  97. package/LinkTableConfigModal-5edaa08d.mjs +0 -230
  98. package/OnlCgformErpList-4c51cdb3.mjs +0 -454
  99. package/OnlCgformErpSubTable-d7081b9f.mjs +0 -403
  100. package/OnlCgformInnerSubTable-4c3925bb.mjs +0 -253
  101. package/OnlCgformInnerTableList-1e5014fa.mjs +0 -444
  102. package/OnlCgformTabList-c59c7cc7.mjs +0 -395
  103. package/OnlineAutoList-a7a9de5d.mjs +0 -479
  104. package/OnlineAutoModal-a33f1a63.mjs +0 -207
  105. package/OnlineForm-fb3a2379.mjs +0 -750
  106. package/OnlineFormDetail-52b1c303.mjs +0 -297
  107. package/OnlineQueryForm-7c70734e.mjs +0 -386
  108. package/OnlineTabAutoModal-6d9da8b0.mjs +0 -254
  109. package/OnlineTabForm-29ca07f7.mjs +0 -766
  110. package/OnlineTabFormDetail-aa7e1144.mjs +0 -324
  111. package/PageAttributeTable-d82946c5.mjs +0 -404
  112. package/QueryTable-d4599fca.mjs +0 -115
  113. package/SuperQuery-07162778.mjs +0 -843
  114. package/constant-754f1a9d.mjs +0 -9
  115. package/index-73993b18.mjs +0 -56
  116. package/useCgformList-b135794d.mjs +0 -400
  117. package/useExtendComponent-f4e29152.mjs +0 -3926
  118. package/useListButton-4dd33e7a.mjs +0 -676
@@ -1,233 +0,0 @@
1
- var C = (t, c, n) => new Promise((u, b) => {
2
- var h = (a) => {
3
- try {
4
- i(n.next(a));
5
- } catch (o) {
6
- b(o);
7
- }
8
- }, s = (a) => {
9
- try {
10
- i(n.throw(a));
11
- } catch (o) {
12
- b(o);
13
- }
14
- }, i = (a) => a.done ? u(a.value) : Promise.resolve(a.value).then(h, s);
15
- i((n = n.apply(t, c)).next());
16
- });
17
- import { defineComponent as ee, ref as f, computed as P, reactive as S, nextTick as te, resolveComponent as m, openBlock as R, createElementBlock as oe, Fragment as ae, createVNode as g, withCtx as F, createBlock as le, mergeProps as ne, createCommentVNode as ie } from "vue";
18
- import { defHttp as k } from "/@/utils/http/axios";
19
- import { BasicForm as re, useForm as se } from "/@/components/Form";
20
- import { BasicModal as ce, useModalInner as me, useModal as B } from "/@/components/Modal";
21
- import { JVxeTypes as N } from "/@/components/jeecg/JVxeTable/types";
22
- import { b as ue } from "./useSchemas-0433a403.mjs";
23
- import { underLine2CamelCase as O } from "/@/utils/common/compUtils";
24
- import pe from "./CodeFileListModal-f747daae.mjs";
25
- import de from "./FileSelectModal-de40a706.mjs";
26
- import { _ as fe } from "./index-73993b18.mjs";
27
- import "ant-design-vue";
28
- import "@ant-design/icons-vue";
29
- import "/@/hooks/web/usePermission";
30
- import "/@/utils/helper/validator";
31
- import "./CodeFileViewModal-a9fb2900.mjs";
32
- import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
33
- import "/@/hooks/web/useMessage";
34
- import "vue-router";
35
- import "/@/utils/file/download";
36
- const ge = ee({
37
- name: "CodeGenerator",
38
- components: { BasicForm: re, BasicModal: ce, FileSelectModal: de, CodeFileListModal: pe },
39
- emits: ["register"],
40
- setup(t) {
41
- const c = "JEECG_ONL_PROJECT_PATH", n = f(!0), u = f(), b = P(() => n.value ? 800 : 1200), h = f("代码生成"), s = f(!1), i = f(""), a = S({
42
- projectPath: "",
43
- packageStyle: "service",
44
- jspMode: "",
45
- jformType: "1",
46
- tableName_tmp: "",
47
- ftlDescription: "",
48
- entityName: "",
49
- codeTypes: "controller,service,dao,mapper,entity,vue"
50
- }), o = S({}), M = f([]), p = S({
51
- dataSource: [],
52
- columns: [
53
- {
54
- title: "子表名",
55
- key: "tableName",
56
- type: N.input,
57
- disabled: !0,
58
- validateRules: [{ required: !0, message: "请输入${title}" }]
59
- },
60
- {
61
- title: "子表实体",
62
- key: "entityName",
63
- type: N.input,
64
- validateRules: [{ required: !0, message: "请输入${title}" }]
65
- },
66
- {
67
- title: "功能说明",
68
- key: "ftlDescription",
69
- type: N.input,
70
- validateRules: [{ required: !0, message: "请输入${title}" }]
71
- }
72
- ]
73
- }), T = P(() => p.dataSource.length > 0), { formSchemas: D } = ue(
74
- t,
75
- {
76
- onProjectPathChange: X,
77
- onProjectPathSearch: z,
78
- jspModeOptions: M
79
- },
80
- n
81
- ), [E, { resetFields: G, setFieldsValue: w, validate: $ }] = se({
82
- schemas: D,
83
- showActionButtonGroup: !1,
84
- labelAlign: "right"
85
- }), [J, { closeModal: j }] = me((e) => C(this, null, function* () {
86
- yield G(), i.value = e.code, s.value = !1, p.dataSource = [], M.value = [], Q(), Object.assign(o, a), V();
87
- }));
88
- function V() {
89
- return C(this, null, function* () {
90
- let { main: e, sub: l, jspModeList: d, projectPath: r } = yield k.get({
91
- url: "/online/cgform/head/tableInfo",
92
- params: { code: i.value }
93
- }), v = [];
94
- for (let y of d) {
95
- const { code: L, note: Z } = y;
96
- L == "many" || v.push({
97
- label: Z,
98
- value: L
99
- });
100
- }
101
- M.value = v, e.isTree == "Y" ? o.jspMode = "tree" : o.jspMode = v[0].value, n.value = e.tableType == 1, h.value = "代码生成【" + e.tableName + "】", o.projectPath || (o.projectPath = r, window.localStorage.setItem(c, r)), o.jformType = e.tableType + "", o.tableName_tmp = e.tableName, o.ftlDescription = e.tableTxt;
102
- let _ = O(e.tableName);
103
- o.entityName = _.substring(0, 1).toUpperCase() + _.substring(1), yield te(), w(o), l && l.length > 0 && (p.dataSource = l.map((y) => ({
104
- tableName: y.tableName,
105
- entityName: x(y.tableName),
106
- ftlDescription: y.tableTxt
107
- })));
108
- });
109
- }
110
- const [I, { openModal: A }] = B();
111
- function H() {
112
- return C(this, null, function* () {
113
- try {
114
- const e = yield $();
115
- let l = Object.assign({}, e, { code: i.value, tableName: e.tableName_tmp });
116
- if (T.value) {
117
- if (yield u.value.validateTable())
118
- return;
119
- l.subList = u.value.getTableData();
120
- }
121
- s.value = !0;
122
- let d = yield q(l);
123
- A(!0, {
124
- codeList: d.codeList,
125
- pathKey: d.pathKey,
126
- tableName: e.tableName_tmp
127
- }), j();
128
- } catch (e) {
129
- } finally {
130
- s.value = !1;
131
- }
132
- });
133
- }
134
- function q(e) {
135
- return new Promise((l, d) => {
136
- k.post({ url: "/online/cgform/api/codeGenerate", params: e }, { isTransformResponse: !1 }).then((r) => {
137
- if (r.success) {
138
- let v = r.result, _ = r.message;
139
- l({
140
- codeList: v,
141
- pathKey: _
142
- });
143
- } else
144
- this.$message.error(r.message), d(r.message);
145
- });
146
- });
147
- }
148
- function K() {
149
- j();
150
- }
151
- const [U, W] = B();
152
- function z() {
153
- W.openModal(!0, {});
154
- }
155
- function Y(e) {
156
- window.localStorage.setItem(c, e), w({ projectPath: e });
157
- }
158
- function x(e) {
159
- let l = O(e);
160
- return l.substring(0, 1).toUpperCase() + l.substring(1);
161
- }
162
- function Q() {
163
- let e = window.localStorage.getItem(c);
164
- e && (a.projectPath = e);
165
- }
166
- function X(e) {
167
- e.target.value && window.localStorage.setItem(c, e.target.value);
168
- }
169
- return {
170
- title: h,
171
- modalWidth: b,
172
- confirmLoading: s,
173
- subTable: p,
174
- showSubTable: T,
175
- onSubmit: H,
176
- onCancel: K,
177
- onFileSelect: Y,
178
- registerFileSelectModal: U,
179
- subTableRef: u,
180
- registerForm: E,
181
- registerModal: J,
182
- registerCodeFileListModal: I
183
- };
184
- }
185
- });
186
- function be(t, c, n, u, b, h) {
187
- const s = m("BasicForm"), i = m("JVxeTable"), a = m("a-card"), o = m("a-spin"), M = m("BasicModal"), p = m("FileSelectModal"), T = m("code-file-list-modal");
188
- return R(), oe(ae, null, [
189
- g(M, {
190
- onRegister: t.registerModal,
191
- title: t.title,
192
- width: t.modalWidth,
193
- confirmLoading: t.confirmLoading,
194
- okText: "开始生成",
195
- cancelText: "取消",
196
- onOk: t.onSubmit,
197
- onCancel: t.onCancel
198
- }, {
199
- default: F(() => [
200
- g(o, { spinning: t.confirmLoading }, {
201
- default: F(() => [
202
- g(s, { onRegister: t.registerForm }, null, 8, ["onRegister"]),
203
- t.showSubTable ? (R(), le(a, {
204
- key: 0,
205
- title: "子表信息",
206
- size: "small"
207
- }, {
208
- default: F(() => [
209
- g(i, ne({
210
- ref: "subTableRef",
211
- rowNumber: "",
212
- maxHeight: 580
213
- }, t.subTable), null, 16)
214
- ]),
215
- _: 1
216
- })) : ie("", !0)
217
- ]),
218
- _: 1
219
- }, 8, ["spinning"])
220
- ]),
221
- _: 1
222
- }, 8, ["onRegister", "title", "width", "confirmLoading", "onOk", "onCancel"]),
223
- g(p, {
224
- onRegister: t.registerFileSelectModal,
225
- onSelect: t.onFileSelect
226
- }, null, 8, ["onRegister", "onSelect"]),
227
- g(T, { onRegister: t.registerCodeFileListModal }, null, 8, ["onRegister"])
228
- ], 64);
229
- }
230
- const Ge = /* @__PURE__ */ fe(ge, [["render", be]]);
231
- export {
232
- Ge as default
233
- };
@@ -1,462 +0,0 @@
1
- var le = Object.defineProperty;
2
- var H = Object.getOwnPropertySymbols;
3
- var ie = Object.prototype.hasOwnProperty, ne = Object.prototype.propertyIsEnumerable;
4
- var q = (a, o, d) => o in a ? le(a, o, { enumerable: !0, configurable: !0, writable: !0, value: d }) : a[o] = d, R = (a, o) => {
5
- for (var d in o || (o = {}))
6
- ie.call(o, d) && q(a, d, o[d]);
7
- if (H)
8
- for (var d of H(o))
9
- ne.call(o, d) && q(a, d, o[d]);
10
- return a;
11
- };
12
- var _ = (a, o, d) => new Promise((w, y) => {
13
- var C = (f) => {
14
- try {
15
- v(d.next(f));
16
- } catch (p) {
17
- y(p);
18
- }
19
- }, D = (f) => {
20
- try {
21
- v(d.throw(f));
22
- } catch (p) {
23
- y(p);
24
- }
25
- }, v = (f) => f.done ? w(f.value) : Promise.resolve(f.value).then(C, D);
26
- v((d = d.apply(a, o)).next());
27
- });
28
- import { ref as ae, computed as oe, watch as re, defineComponent as se, resolveComponent as k, openBlock as u, createElementBlock as m, normalizeClass as N, createVNode as x, withCtx as W, Fragment as V, renderList as J, createBlock as P, createElementVNode as c, toDisplayString as B } from "vue";
29
- import { propTypes as O } from "/@/utils/propTypes";
30
- import { getDictItemsByCode as de } from "/@/utils/dict";
31
- import { filterMultiDictText as T, filterDictText as ce } from "/@/utils/dict/JDictSelectUtil";
32
- import { initDictOptions as U } from "/@/utils/dict/index";
33
- import { loadDictItem as ue, queryDepartTreeSync as fe, getUserList as pe } from "/@/api/common/api";
34
- import { defHttp as me } from "/@/utils/http/axios";
35
- import { getAreaTextByCode as _e } from "/@/components/Form/src/utils/Area";
36
- import { getFileAccessHttpUrl as he } from "/@/utils/common/compUtils";
37
- import { createImgPreview as ge } from "/@/components/Preview/index";
38
- import { useMessage as ve } from "/@/hooks/web/useMessage";
39
- import { DownloadOutlined as we, EyeOutlined as ye, PaperClipOutlined as De } from "@ant-design/icons-vue";
40
- import { q as Fe } from "./useExtendComponent-f4e29152.mjs";
41
- import { MarkdownViewer as ke } from "/@/components/Markdown";
42
- import { _ as Ce } from "./index-73993b18.mjs";
43
- import "/@/components/Form/src/componentMap";
44
- import "/@/components/Modal";
45
- import "/@/components/Form/index";
46
- import "lodash-es";
47
- import "./constant-754f1a9d.mjs";
48
- import "/@/components/Form/src/jeecg/components/JUpload";
49
- import "/@/views/system/user/user.api";
50
- import "/@/store/modules/user";
51
- import "/@/utils";
52
- import "/@/utils/desform/customExpression";
53
- import "/@/store/modules/permission";
54
- import "/@/components/Table";
55
- import "/@/hooks/system/useListPage";
56
- import "vue-router";
57
- import "./LinkTableListPiece-46e8af51.mjs";
58
- import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
59
- import "./OnlineSelectCascade-abc345f9.mjs";
60
- import "/@/components/Loading";
61
- import "/@/utils/auth";
62
- import "./JModalTip-0413ad6a.mjs";
63
- import "/@/hooks/web/useAppInject";
64
- import "ant-design-vue";
65
- import "@vueuse/core";
66
- function be(a) {
67
- const o = {}, d = [], w = ae({}), { createMessage: y } = ve(), C = oe(() => a.containerClass ? `jeecg-detail-form ${a.containerClass}` : "jeecg-detail-form");
68
- re(
69
- () => a.data,
70
- (e) => _(this, null, function* () {
71
- if (e) {
72
- let n = a.schemas, i = {};
73
- if (n && n.length > 0)
74
- for (let l of n) {
75
- let t = l.field;
76
- try {
77
- i[t] = yield D(l);
78
- } catch (r) {
79
- }
80
- }
81
- w.value = i;
82
- }
83
- }),
84
- { deep: !0, immediate: !0 }
85
- );
86
- function D(e) {
87
- return _(this, null, function* () {
88
- let n = a.data;
89
- if (n) {
90
- let i = n[e.field];
91
- if (!i && i !== "0" && i !== 0)
92
- return "";
93
- let l = i, t = e.view;
94
- if (t == "list" || t == "radio" || t == "checkbox" || t == "list_multi")
95
- l = yield v(e, n);
96
- else if (t == "sel_search")
97
- l = yield p(e, n);
98
- else if (t == "cat_tree")
99
- l = yield b(e, n);
100
- else if (t == "link_table")
101
- l = yield ee(e, n);
102
- else if (t == "sel_depart")
103
- l = yield S(e, n);
104
- else if (t == "sel_user")
105
- l = yield j(e, n);
106
- else if (t == "pca")
107
- l = _e(i);
108
- else if (t == "link_down")
109
- l = yield E(e, n);
110
- else if (t == "sel_tree")
111
- l = yield h(e, n);
112
- else if (t == "switch")
113
- l = yield L(e, n);
114
- else if (t == "image" || t == "file")
115
- l = K(e, n);
116
- else if (d.indexOf(e.field) >= 0) {
117
- let r = o[e.field];
118
- r && r.length > 0 && (l = T(r, i));
119
- }
120
- return l;
121
- }
122
- return "";
123
- });
124
- }
125
- function v(e, n) {
126
- return _(this, null, function* () {
127
- let i = f(e), l = n[e.field];
128
- if (!i)
129
- return l;
130
- let t = de(i);
131
- if (t && t.length > 0)
132
- return T(t, l);
133
- {
134
- let r = [];
135
- if (o[i] ? r = o[i] : r = (yield U(i)) || [], r && r.length > 0)
136
- return o[i] = r, T(r, l);
137
- }
138
- return "";
139
- });
140
- }
141
- function f(e) {
142
- let n = "", { dictCode: i, dictTable: l, dictText: t } = e;
143
- return l ? n = encodeURI(`${l},${t},${i}`) : n = i, n;
144
- }
145
- function p(e, n) {
146
- return _(this, null, function* () {
147
- let i = f(e), l = n[e.field];
148
- if (!l)
149
- return "";
150
- let t = [];
151
- return o[i + l] ? t = o[i + l] : t = (yield me.get({ url: `/sys/dict/loadDictItem/${i}`, params: { key: l } })) || [], t && t.length > 0 ? (o[i + l] = t, t.join(",")) : "";
152
- });
153
- }
154
- function b(e, n) {
155
- return _(this, null, function* () {
156
- let i = n[e.field];
157
- if (!i)
158
- return "";
159
- let l = (yield ue({ ids: i })) || [];
160
- return l && l.length > 0 ? l.join(",") : "";
161
- });
162
- }
163
- function S(e, n) {
164
- return _(this, null, function* () {
165
- let i = n[e.field];
166
- if (!i)
167
- return "";
168
- let t = s(e).store || "id", r = (yield fe({ ids: i, primaryKey: t })) || [];
169
- if (r && r.length > 0) {
170
- let g = [];
171
- for (let F of r)
172
- g.push(F.title);
173
- return g.join(",");
174
- }
175
- return "";
176
- });
177
- }
178
- function j(e, n) {
179
- return _(this, null, function* () {
180
- let i = n[e.field];
181
- if (!i)
182
- return "";
183
- let l = s(e), r = {
184
- [l.store || "username"]: i
185
- }, F = ((yield pe(r)) || {}).records || [];
186
- if (F && F.length > 0) {
187
- let I = [], $ = l.text || "realname";
188
- for (let M of F)
189
- I.push(M[$]);
190
- return I.join(",");
191
- }
192
- return "";
193
- });
194
- }
195
- function s(e) {
196
- let n = {}, { fieldExtendJson: i } = e;
197
- if (i && typeof i == "string")
198
- try {
199
- let l = JSON.parse(i);
200
- n = R({}, l);
201
- } catch (l) {
202
- }
203
- return n;
204
- }
205
- function E(e, n) {
206
- return _(this, null, function* () {
207
- let { dictTable: i, field: l } = e, t = [];
208
- if (o[l])
209
- t = o[l];
210
- else if (i) {
211
- let r = JSON.parse(i);
212
- if (r) {
213
- let { table: g, txt: F, key: I, linkField: $ } = r, M = `${g},${F},${I}`;
214
- if (t = [...(yield U(M)) || []], t && t.length > 0 && (o[l] = t, $)) {
215
- let te = $.split(",");
216
- for (let A of te)
217
- o[A] = t, d.push(A);
218
- }
219
- }
220
- }
221
- if (t && t.length > 0) {
222
- let r = n[l];
223
- return T(t, r);
224
- }
225
- return "";
226
- });
227
- }
228
- function h(e, n) {
229
- return _(this, null, function* () {
230
- let { dict: i, field: l } = e, t = [];
231
- if (o[l] ? t = o[l] : i && (t = yield U(i)), t && t.length > 0) {
232
- let r = n[l];
233
- return T(t, r);
234
- }
235
- return "";
236
- });
237
- }
238
- function L(e, n) {
239
- return _(this, null, function* () {
240
- let { fieldExtendJson: i, field: l } = e, t = ["Y", "N"];
241
- i && (t = JSON.parse(i));
242
- let r = [
243
- { value: t[0], text: "是" },
244
- { value: t[1], text: "否" },
245
- { value: t[0] + "", text: "是" },
246
- { value: t[1] + "", text: "否" }
247
- ], g = n[l];
248
- return ce(r, g);
249
- });
250
- }
251
- function z(e) {
252
- return e.span ? e.span : a.span;
253
- }
254
- function K(e, n) {
255
- let i = n[e.field];
256
- if (!i)
257
- return [];
258
- let l = i.split(","), t = [];
259
- for (let r of l) {
260
- let g = he(r) || "";
261
- g && t.push(g);
262
- }
263
- return t;
264
- }
265
- function Y(e) {
266
- e && window.open(e);
267
- }
268
- function G(e) {
269
- let n = w.value[e];
270
- if (!n || n.length == 0) {
271
- y.warning("无图片!");
272
- return;
273
- }
274
- ge({ imageList: n });
275
- }
276
- function Q(e) {
277
- return e ? e.substring(e.lastIndexOf("/") + 1) : "";
278
- }
279
- const X = ["file", "image", "markdown", "umeditor"];
280
- function Z(e) {
281
- return X.indexOf(e.view) >= 0 ? a.span == 12 ? "span12" : a.span == 8 ? "span8" : a.span == 6 ? "span6" : "span24" : "";
282
- }
283
- function ee(e, n) {
284
- return _(this, null, function* () {
285
- let i = n[e.field];
286
- return s(e).showType == "select" ? i ? n[e.field + "_dictText"] : "" : i ? n[e.field] : "";
287
- });
288
- }
289
- return {
290
- formContainerClass: C,
291
- detailFormData: w,
292
- getItemSpan: z,
293
- handleDownloadFile: Y,
294
- handleViewImage: G,
295
- getFilename: Q,
296
- getLabelWidthClass: Z
297
- };
298
- }
299
- const xe = se({
300
- name: "DetailForm",
301
- components: {
302
- DownloadOutlined: we,
303
- EyeOutlined: ye,
304
- PaperClipOutlined: De,
305
- LinkTableCard: Fe,
306
- MarkdownViewer: ke
307
- },
308
- props: {
309
- span: O.number.def(24),
310
- //表单配置
311
- schemas: O.array.def([]),
312
- //表单数据
313
- data: O.object.def({}),
314
- containerClass: O.string.def("")
315
- },
316
- setup(a) {
317
- const { formContainerClass: o, detailFormData: d, getItemSpan: w, handleDownloadFile: y, handleViewImage: C, getFilename: D, getLabelWidthClass: v } = be(a);
318
- return {
319
- formContainerClass: o,
320
- detailFormData: d,
321
- getItemSpan: w,
322
- handleDownloadFile: y,
323
- handleViewImage: C,
324
- getFilename: D,
325
- getLabelWidthClass: v,
326
- filterLable: (p) => {
327
- if (p.fieldExtendJson) {
328
- const b = JSON.parse(p.fieldExtendJson);
329
- if (b.labelLength && p.label.length > 4)
330
- return p.label.substr(0, b.labelLength);
331
- }
332
- return p.label;
333
- }
334
- };
335
- }
336
- });
337
- const Te = { class: "detail-item" }, Le = ["title"], Ie = {
338
- key: 0,
339
- class: "item-content"
340
- }, $e = ["innerHTML"], Oe = {
341
- key: 2,
342
- class: "item-content",
343
- style: { display: "block", "padding-top": "10px" }
344
- }, Se = { key: 0 }, je = {
345
- key: 3,
346
- class: "item-content"
347
- }, Ee = { class: "ant-upload-list ant-upload-list-picture-card" }, Me = {
348
- class: "ant-upload-list-picture-card-container",
349
- style: { "margin-top": "8px" }
350
- }, Ne = {
351
- class: "ant-upload-list-item ant-upload-list-item-done ant-upload-list-item-list-type-picture-card",
352
- "data-has-actions": "true"
353
- }, Ve = { class: "ant-upload-list-item-info" }, Je = ["src"], Be = { class: "ant-upload-list-item-actions" }, Ue = {
354
- key: 4,
355
- class: "item-content"
356
- }, Ae = { class: "ant-upload-list ant-upload-list-text" }, He = { class: "" }, qe = { class: "ant-upload-list-item ant-upload-list-item-done ant-upload-list-item-list-type-text" }, Re = { class: "ant-upload-list-item-info" }, We = { class: "ant-upload-span" }, Pe = { class: "ant-upload-text-icon" }, ze = ["href"], Ke = { class: "ant-upload-list-item-card-actions" }, Ye = {
357
- key: 5,
358
- class: "item-content"
359
- };
360
- function Ge(a, o, d, w, y, C) {
361
- const D = k("MarkdownViewer"), v = k("link-table-card"), f = k("download-outlined"), p = k("eye-outlined"), b = k("paper-clip-outlined"), S = k("a-col"), j = k("a-row");
362
- return u(), m("div", {
363
- class: N(a.formContainerClass)
364
- }, [
365
- x(j, null, {
366
- default: W(() => [
367
- (u(!0), m(V, null, J(a.schemas, (s, E) => (u(), P(S, {
368
- key: E,
369
- span: a.getItemSpan(s)
370
- }, {
371
- default: W(() => [
372
- c("div", Te, [
373
- c("div", {
374
- class: N(["item-title", a.getLabelWidthClass(s)]),
375
- title: s.label
376
- }, B(a.filterLable(s)) + ": ", 11, Le),
377
- s.view === "markdown" ? (u(), m("div", Ie, [
378
- x(D, {
379
- value: a.detailFormData[s.field],
380
- "onUpdate:value": (h) => a.detailFormData[s.field] = h,
381
- placeholder: ""
382
- }, null, 8, ["value", "onUpdate:value"])
383
- ])) : s.isHtml ? (u(), m("div", {
384
- key: 1,
385
- class: N(["item-content", s.view]),
386
- innerHTML: a.detailFormData[s.field]
387
- }, null, 10, $e)) : s.isCard ? (u(), m("div", Oe, [
388
- a.detailFormData[s.field] ? (u(), P(v, {
389
- key: 1,
390
- disabled: "",
391
- detail: "",
392
- value: a.detailFormData[s.field],
393
- valueField: s.dictCode,
394
- textField: s.dictText,
395
- tableName: s.dictTable,
396
- multi: s.multi
397
- }, null, 8, ["value", "valueField", "textField", "tableName", "multi"])) : (u(), m("span", Se))
398
- ])) : s.isImage ? (u(), m("div", je, [
399
- c("div", Ee, [
400
- (u(!0), m(V, null, J(a.detailFormData[s.field], (h) => (u(), m("div", Me, [
401
- c("span", null, [
402
- c("div", Ne, [
403
- c("div", Ve, [
404
- c("img", {
405
- src: h,
406
- alt: "图片不存在",
407
- class: "ant-upload-list-item-image"
408
- }, null, 8, Je)
409
- ]),
410
- c("span", Be, [
411
- x(f, {
412
- onClick: (L) => a.handleDownloadFile(h)
413
- }, null, 8, ["onClick"]),
414
- x(p, {
415
- onClick: (L) => a.handleViewImage(s.field)
416
- }, null, 8, ["onClick"])
417
- ])
418
- ])
419
- ])
420
- ]))), 256))
421
- ])
422
- ])) : s.isFile ? (u(), m("div", Ue, [
423
- c("div", Ae, [
424
- (u(!0), m(V, null, J(a.detailFormData[s.field], (h) => (u(), m("div", He, [
425
- c("span", null, [
426
- c("div", qe, [
427
- c("div", Re, [
428
- c("span", We, [
429
- c("div", Pe, [
430
- x(b)
431
- ]),
432
- c("a", {
433
- href: h,
434
- target: "_blank",
435
- rel: "noopener noreferrer",
436
- class: "ant-upload-list-item-name"
437
- }, B(a.getFilename(h)), 9, ze),
438
- c("span", Ke, [
439
- x(f, {
440
- onClick: (L) => a.handleDownloadFile(h)
441
- }, null, 8, ["onClick"])
442
- ])
443
- ])
444
- ])
445
- ])
446
- ])
447
- ]))), 256))
448
- ])
449
- ])) : (u(), m("div", Ye, B(a.detailFormData[s.field]), 1))
450
- ])
451
- ]),
452
- _: 2
453
- }, 1032, ["span"]))), 128))
454
- ]),
455
- _: 1
456
- })
457
- ], 2);
458
- }
459
- const Vt = /* @__PURE__ */ Ce(xe, [["render", Ge], ["__scopeId", "data-v-fce737d0"]]);
460
- export {
461
- Vt as default
462
- };