@jeecg/online 3.6.2-beta → 3.7.1-RC

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 (127) hide show
  1. package/AiModal-6de335e3.mjs +84 -0
  2. package/AuthButtonConfig-89763932.mjs +154 -0
  3. package/{AuthButtonTree-3aa0ed49.mjs → AuthButtonTree-2d87d0b3.mjs} +6 -5
  4. package/AuthDataConfig-5c3a8e6b.mjs +238 -0
  5. package/{AuthDataTree-94e026e3.mjs → AuthDataTree-dd7a1240.mjs} +6 -6
  6. package/AuthFieldConfig-9f6fa06c.mjs +245 -0
  7. package/{AuthFieldTree-69864163.mjs → AuthFieldTree-e326fc38.mjs} +2 -2
  8. package/AuthManagerDrawer-76f15e8d.mjs +119 -0
  9. package/AuthSetterModal-f5d2e87f.mjs +274 -0
  10. package/{CgformCopyList-14b76108.mjs → CgformCopyList-365b3e8f.mjs} +49 -46
  11. package/CgformModal-21c5c387.mjs +671 -0
  12. package/{CgreportModal.vue_vue_type_script_setup_true_lang-c89d9222.mjs → CgreportModal-edefa8e3.mjs} +153 -129
  13. package/CheckDictTable-1bc8322d.mjs +229 -0
  14. package/{CodeFileListModal-a6d3290d.mjs → CodeFileListModal-24601898.mjs} +5 -4
  15. package/CodeFileViewModal-2fe911f4.mjs +253 -0
  16. package/CodeGeneratorModal-f09fe903.mjs +282 -0
  17. package/CustomButtonList-f07bc695.mjs +397 -0
  18. package/{DBAttributeTable-370de07b.mjs → DBAttributeTable-285d40db.mjs} +118 -89
  19. package/DbToOnlineModal-5dcb67c3.mjs +169 -0
  20. package/DetailForm-deecbf3d.mjs +486 -0
  21. package/{EnhanceJavaModal-f63aa2d3.mjs → EnhanceJavaModal-45c66cd5.mjs} +3 -3
  22. package/{EnhanceJsHistory-352b46b1.mjs → EnhanceJsHistory-fab3102e.mjs} +2 -2
  23. package/EnhanceJsModal-175357a1.mjs +548 -0
  24. package/{EnhanceSqlModal-5e4ae84f.mjs → EnhanceSqlModal-7ea1b300.mjs} +3 -3
  25. package/ExtendConfigModal-a89ae052.mjs +117 -0
  26. package/FieldExtendJsonModal-32135634.mjs +277 -0
  27. package/{FileSelectModal-9a02560b.mjs → FileSelectModal-1643c8b9.mjs} +1 -1
  28. package/{ForeignKeyTable-6a843c4b.mjs → ForeignKeyTable-7f7e28a7.mjs} +3 -3
  29. package/{IndexTable-f8af9d44.mjs → IndexTable-cdcc2b48.mjs} +28 -20
  30. package/{JModalTip-33c7dc44.mjs → JModalTip-b055ab60.mjs} +1 -1
  31. package/JOnlineSearchSelect-22aae934.mjs +128 -0
  32. package/{LeftDepart-fa85523d.mjs → LeftDepart-d5615ed9.mjs} +1 -1
  33. package/{LeftRole-8b8dfe21.mjs → LeftRole-2ed8a2bf.mjs} +1 -1
  34. package/{LeftUser-dc24ef2f.mjs → LeftUser-22baa378.mjs} +3 -3
  35. package/LinkTableConfigModal-9242d750.mjs +240 -0
  36. package/{LinkTableFieldConfigModal-787bc55c.mjs → LinkTableFieldConfigModal-24adc50c.mjs} +41 -41
  37. package/{LinkTableListPiece-8499a318.mjs → LinkTableListPiece-f3a8e0d7.mjs} +1 -1
  38. package/{ModalFormDemo-977a49eb.mjs → ModalFormDemo-711418db.mjs} +1 -1
  39. package/OnlCgformErpList-58acdfa0.mjs +470 -0
  40. package/OnlCgformErpSubTable-9b1e1938.mjs +426 -0
  41. package/OnlCgformInnerSubTable-6c23781f.mjs +265 -0
  42. package/OnlCgformInnerTableList-4b5e14ed.mjs +458 -0
  43. package/OnlCgformTabList-019ad753.mjs +408 -0
  44. package/OnlineAutoList-48589d09.mjs +493 -0
  45. package/OnlineAutoModal-c2928847.mjs +239 -0
  46. package/{OnlineAutoTreeList-89265688.mjs → OnlineAutoTreeList-3baa1d00.mjs} +207 -204
  47. package/{OnlineCustomModal-518ad33c.mjs → OnlineCustomModal-9e17b6ce.mjs} +16 -12
  48. package/{OnlineDetailModal-9675390d.mjs → OnlineDetailModal-d5895734.mjs} +74 -64
  49. package/OnlineForm-9f1153ba.mjs +985 -0
  50. package/OnlineForm.vue_vue_type_style_index_0_scoped_4657b304_lang-4ed993c7.mjs +1 -0
  51. package/OnlineFormDetail-022ca117.mjs +342 -0
  52. package/OnlineFormUrlAdd-9715d70a.mjs +115 -0
  53. package/OnlineFormUrlDetail-8f864b1a.mjs +119 -0
  54. package/OnlineFormUrlEdit-ac985b36.mjs +113 -0
  55. package/OnlineFormUrlSuccess-3dfc54ab.mjs +59 -0
  56. package/OnlineQueryForm-eedb9a60.mjs +466 -0
  57. package/{OnlineSearchFormItem-0cc85a8a.mjs → OnlineSearchFormItem-6c557343.mjs} +2 -2
  58. package/{OnlineSelectCascade-4265c95d.mjs → OnlineSelectCascade-05c40fef.mjs} +1 -1
  59. package/{OnlineSubFormDetail-f0d2c016.mjs → OnlineSubFormDetail-58e896ce.mjs} +30 -28
  60. package/OnlineTabAutoModal-47b18ad6.mjs +306 -0
  61. package/{OnlineTabDetailModal-7356d3a8.mjs → OnlineTabDetailModal-82de1465.mjs} +22 -20
  62. package/OnlineTabForm-27655c83.mjs +817 -0
  63. package/OnlineTabFormDetail-8d0c40c0.mjs +327 -0
  64. package/PageAttributeTable-25e3b7da.mjs +466 -0
  65. package/{ProcessOnlineForm-67558898.mjs → ProcessOnlineForm-148632fe.mjs} +66 -56
  66. package/QueryTable-f7bfca7f.mjs +147 -0
  67. package/SetSwitchOptions-b2af757f.mjs +62 -0
  68. package/SuperQuery-a8592995.mjs +967 -0
  69. package/auth.api-ea1d33d4.mjs +41 -0
  70. package/auth.data-511e5197.mjs +217 -0
  71. package/{cgform.data-cbdd88c3.mjs → cgform.data-475d4984.mjs} +5 -1
  72. package/constant-fa63bd66.mjs +10 -0
  73. package/{enhance.data-efc7e155.mjs → enhance.data-a67572e1.mjs} +11 -10
  74. package/index-1d1a6e56.mjs +57 -0
  75. package/{index-b7a05eef.mjs → index-30e0e923.mjs} +396 -362
  76. package/{index-49508cad.mjs → index-f30613d1.mjs} +29 -27
  77. package/main.index.js +1 -1
  78. package/package.json +1 -1
  79. package/style.css +1 -1
  80. package/useCgformList-f41d4dc1.mjs +426 -0
  81. package/useExtendComponent-dcae5c78.mjs +4399 -0
  82. package/useFormUrl-2ee1a82d.mjs +24 -0
  83. package/useListButton-bfac4ecf.mjs +697 -0
  84. package/{useSchemas-0433a403.mjs → useSchemas-a9c75b0f.mjs} +191 -101
  85. package/useTableSync-d7e9f18d.mjs +89 -0
  86. package/AuthButtonConfig-244ec09f.mjs +0 -125
  87. package/AuthDataConfig-83891eea.mjs +0 -212
  88. package/AuthFieldConfig-6b21915c.mjs +0 -139
  89. package/AuthManagerDrawer-300dd4e4.mjs +0 -114
  90. package/AuthSetterModal-a414fb35.mjs +0 -267
  91. package/CgformModal-eccfc38e.mjs +0 -611
  92. package/CgreportModal-2065f5a9.mjs +0 -13
  93. package/CheckDictTable-134cbb83.mjs +0 -211
  94. package/CodeFileViewModal-373e8058.mjs +0 -244
  95. package/CodeGeneratorModal-f08a89cd.mjs +0 -233
  96. package/CustomButtonList-02e3d897.mjs +0 -363
  97. package/DbToOnlineModal-9f13956f.mjs +0 -160
  98. package/DetailForm-424638eb.mjs +0 -462
  99. package/EnhanceJsModal-05c73a59.mjs +0 -311
  100. package/ExtendConfigModal-1dde390a.mjs +0 -111
  101. package/FieldExtendJsonModal-a70a9ccd.mjs +0 -219
  102. package/JOnlineSearchSelect-c287af12.mjs +0 -95
  103. package/LinkTableConfigModal-d4fbdef2.mjs +0 -230
  104. package/OnlCgformErpList-db45e22b.mjs +0 -454
  105. package/OnlCgformErpSubTable-54b50eec.mjs +0 -403
  106. package/OnlCgformInnerSubTable-fbca73e0.mjs +0 -253
  107. package/OnlCgformInnerTableList-782eaf04.mjs +0 -444
  108. package/OnlCgformTabList-a9e1e36a.mjs +0 -395
  109. package/OnlineAutoList-0583a910.mjs +0 -479
  110. package/OnlineAutoModal-510991eb.mjs +0 -207
  111. package/OnlineForm-1fa2d893.mjs +0 -750
  112. package/OnlineFormDetail-0e7294ca.mjs +0 -297
  113. package/OnlineQueryForm-1bfc8320.mjs +0 -386
  114. package/OnlineTabAutoModal-6f636ee2.mjs +0 -254
  115. package/OnlineTabForm-512d3951.mjs +0 -766
  116. package/OnlineTabFormDetail-5a70219d.mjs +0 -324
  117. package/PageAttributeTable-965dc58e.mjs +0 -404
  118. package/QueryTable-eb9a5b21.mjs +0 -115
  119. package/SuperQuery-5d1ca957.mjs +0 -843
  120. package/auth.api-d3a6c4b3.mjs +0 -39
  121. package/auth.data-8be5c9e3.mjs +0 -141
  122. package/constant-754f1a9d.mjs +0 -9
  123. package/index-0e3ab3af.mjs +0 -56
  124. package/useCgformList-423282b7.mjs +0 -400
  125. package/useExtendComponent-325fe3f1.mjs +0 -3926
  126. package/useListButton-cdbab702.mjs +0 -676
  127. package/useTableSync-774c3774.mjs +0 -87
@@ -0,0 +1,89 @@
1
+ var w = (f, m, e) => new Promise((d, u) => {
2
+ var n = (t) => {
3
+ try {
4
+ s(e.next(t));
5
+ } catch (b) {
6
+ u(b);
7
+ }
8
+ }, T = (t) => {
9
+ try {
10
+ s(e.throw(t));
11
+ } catch (b) {
12
+ u(b);
13
+ }
14
+ }, s = (t) => t.done ? d(t.value) : Promise.resolve(t.value).then(n, T);
15
+ s((e = e.apply(f, m)).next());
16
+ });
17
+ import { inject as h, ref as y, computed as g, nextTick as v } from "vue";
18
+ import { V as N } from "./cgform.data-475d4984.mjs";
19
+ import { pick as R } from "lodash-es";
20
+ function L(f) {
21
+ const m = h("tables"), e = h("fullScreenRef"), d = y(), u = y(!1), n = y([]), T = g(() => ({
22
+ // 正常表格高度
23
+ normal: e != null && e.value ? 430 : 260,
24
+ // 没有 toolbar 的表格高度
25
+ noToolbar: e != null && e.value ? 480 : 320
26
+ })), s = g(() => ["id"].concat(f.value.map((l) => l.key))), t = g(() => ({
27
+ // 针对Online表单对虚拟滚动做出优化
28
+ // 虚拟滚动配置,y轴(行数)大于xx条数据时启用虚拟滚动
29
+ // update-begin--author:liaozhiyang---date:20231025---for:【QQYUN-6808】online编辑字段多了卡顿
30
+ scrollY: {
31
+ enabled: !0,
32
+ gt: 15
33
+ },
34
+ // 列数
35
+ scrollX: {
36
+ enabled: !0,
37
+ gt: 20
38
+ }
39
+ // update-begin--author:liaozhiyang---date:20231025---for:【QQYUN-6808】online编辑字段多了卡顿
40
+ }));
41
+ function b(l) {
42
+ return w(this, null, function* () {
43
+ let a = d.value;
44
+ if (yield a.fullValidateTable())
45
+ throw { code: N, activeKey: l };
46
+ let D = a.getTableData().map((c) => R(c, s.value)), F = a.getDeleteData().map((c) => c.id);
47
+ return { tableData: D, deleteIds: F };
48
+ });
49
+ }
50
+ function k(l, a = !1) {
51
+ return w(this, null, function* () {
52
+ a ? (n.value = [], yield v(), yield d.value.addOrInsert(l, 0, null, { setActive: !1 }), yield v(), d.value.recalcDisableRows()) : (n.value = l, yield v(), d.value.recalcDisableRows());
53
+ });
54
+ }
55
+ function E(l) {
56
+ let a = d.value, x = l.value.tableRef, D = l.value.getRemoveIds(), F = x.getXTable().internalData.tableFullData, c = a.getXTable().internalData.tableFullData;
57
+ return F.forEach((r) => {
58
+ let p = !1;
59
+ if (c.forEach((o) => {
60
+ if (r.id === o.id) {
61
+ let i = o.dbFieldName, I = o.dbFieldTxt;
62
+ (r.dbFieldName !== i || r.dbFieldTxt !== I) && a.setValues([
63
+ {
64
+ rowKey: o.id,
65
+ values: {
66
+ dbFieldName: r.dbFieldName,
67
+ dbFieldTxt: r.dbFieldTxt
68
+ }
69
+ }
70
+ ]), p = !0;
71
+ } else
72
+ D.forEach((i) => {
73
+ i === o.id && (setTimeout(() => {
74
+ a.removeRowsById(i);
75
+ }, 0), p = !0);
76
+ });
77
+ }), !p) {
78
+ let o = Object.assign({}, r);
79
+ f.value.forEach((i) => {
80
+ i.key !== "dbFieldName" && i.key !== "dbFieldTxt" && (o[i.key] = i.defaultValue);
81
+ }), a.addRows(o);
82
+ }
83
+ }), v();
84
+ }
85
+ return { tables: m, tableRef: d, loading: u, dataSource: n, columnKeys: s, tableHeight: T, tableProps: t, syncTable: E, validateData: b, setDataSource: k };
86
+ }
87
+ export {
88
+ L as u
89
+ };
@@ -1,125 +0,0 @@
1
- var f = (u, i, n) => new Promise((l, r) => {
2
- var h = (e) => {
3
- try {
4
- s(n.next(e));
5
- } catch (o) {
6
- r(o);
7
- }
8
- }, d = (e) => {
9
- try {
10
- s(n.throw(e));
11
- } catch (o) {
12
- r(o);
13
- }
14
- }, s = (e) => e.done ? l(e.value) : Promise.resolve(e.value).then(h, d);
15
- s((n = n.apply(u, i)).next());
16
- });
17
- import { defineComponent as D, ref as g, watch as I, resolveComponent as _, openBlock as L, createElementBlock as k, createVNode as w, withCtx as v, createTextVNode as A } from "vue";
18
- import { cloneDeep as E } from "lodash-es";
19
- import { BasicTable as S, useTable as $ } from "/@/components/Table";
20
- import { d as F, e as N, f as j } from "./auth.api-d3a6c4b3.mjs";
21
- import { b as O, c as R } from "./auth.data-8be5c9e3.mjs";
22
- import { _ as U } from "./index-0e3ab3af.mjs";
23
- import "/@/utils/http/axios";
24
- import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
25
- import "/@/hooks/web/useMessage";
26
- import "vue-router";
27
- const V = D({
28
- name: "AuthButtonConfig",
29
- components: { BasicTable: S },
30
- props: {
31
- headId: {
32
- type: String,
33
- default: "",
34
- required: !0
35
- }
36
- },
37
- setup(u) {
38
- const i = g(""), n = g(2), l = g(3), r = g(5), [h, { reload: d }] = $({
39
- api: s,
40
- rowKey: "code",
41
- bordered: !0,
42
- columns: O,
43
- showIndexColumn: !1
44
- });
45
- I(
46
- () => u.headId,
47
- (t) => {
48
- i.value = t.split("?")[0], d().catch(() => null);
49
- },
50
- { immediate: !0 }
51
- );
52
- function s(t) {
53
- return f(this, null, function* () {
54
- let a = yield F(i.value, t), { authList: p, buttonList: c } = a, b = [];
55
- for (let m of E(R)) {
56
- let C = {
57
- status: 0,
58
- page: l.value
59
- }, T = p.find((x) => x.code == m.code);
60
- Object.assign(m, C, T), b.push(m);
61
- }
62
- return e(p, c, b);
63
- });
64
- }
65
- function e(t, a, p) {
66
- for (let c of a) {
67
- let b = t.find((C) => C.code == c.buttonCode), m = {
68
- code: c.buttonCode,
69
- title: c.buttonName,
70
- status: 0,
71
- page: c.buttonStyle == "form" ? r.value : l.value
72
- };
73
- p.push(Object.assign(m, b));
74
- }
75
- return p;
76
- }
77
- function o(t, a) {
78
- return f(this, null, function* () {
79
- t ? B(a) : y(a);
80
- });
81
- }
82
- function B(t) {
83
- return f(this, null, function* () {
84
- let a = yield N({
85
- id: t.id,
86
- code: t.code,
87
- page: t.page,
88
- cgformId: i.value,
89
- type: n.value,
90
- control: 5,
91
- status: 1
92
- });
93
- t.id = a.id, t.status = 1;
94
- });
95
- }
96
- function y(t) {
97
- return f(this, null, function* () {
98
- yield j(t.id), t.status = 0;
99
- });
100
- }
101
- return { registerTable: h, onUpdateStatus: o };
102
- }
103
- }), q = { class: "auth-field-config" };
104
- function z(u, i, n, l, r, h) {
105
- const d = _("a-switch"), s = _("BasicTable");
106
- return L(), k("div", q, [
107
- w(s, { onRegister: u.registerTable }, {
108
- switch: v(({ text: e, record: o }) => [
109
- w(d, {
110
- size: "small",
111
- checked: o.status === 1,
112
- onChange: (B) => u.onUpdateStatus(B, o)
113
- }, null, 8, ["checked", "onChange"])
114
- ]),
115
- control: v(() => [
116
- A(" 可见 ")
117
- ]),
118
- _: 1
119
- }, 8, ["onRegister"])
120
- ]);
121
- }
122
- const tt = /* @__PURE__ */ U(V, [["render", z]]);
123
- export {
124
- tt as default
125
- };
@@ -1,212 +0,0 @@
1
- var P = Object.defineProperty, $ = Object.defineProperties;
2
- var j = Object.getOwnPropertyDescriptors;
3
- var T = Object.getOwnPropertySymbols;
4
- var V = Object.prototype.hasOwnProperty, q = Object.prototype.propertyIsEnumerable;
5
- var B = (e, o, a) => o in e ? P(e, o, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[o] = a, y = (e, o) => {
6
- for (var a in o || (o = {}))
7
- V.call(o, a) && B(e, a, o[a]);
8
- if (T)
9
- for (var a of T(o))
10
- q.call(o, a) && B(e, a, o[a]);
11
- return e;
12
- }, M = (e, o) => $(e, j(o));
13
- var C = (e, o, a) => new Promise((c, m) => {
14
- var d = (n) => {
15
- try {
16
- i(a.next(n));
17
- } catch (s) {
18
- m(s);
19
- }
20
- }, f = (n) => {
21
- try {
22
- i(a.throw(n));
23
- } catch (s) {
24
- m(s);
25
- }
26
- }, i = (n) => n.done ? c(n.value) : Promise.resolve(n.value).then(d, f);
27
- i((a = a.apply(e, o)).next());
28
- });
29
- import { defineComponent as z, ref as N, watch as k, reactive as x, nextTick as G, resolveComponent as r, openBlock as K, createElementBlock as Q, createVNode as l, withCtx as u, createTextVNode as H, normalizeProps as J, guardReactiveProps as W } from "vue";
30
- import { BasicTable as X, TableAction as Y, useTable as Z } from "/@/components/Table";
31
- import { BasicModal as tt, useModal as et } from "/@/components/Modal";
32
- import { BasicForm as ot, useForm as at } from "/@/components/Form";
33
- import { g as nt, h as it, i as st, j as rt } from "./auth.api-d3a6c4b3.mjs";
34
- import { d as lt, u as ct, U as F } from "./auth.data-8be5c9e3.mjs";
35
- import { _ as ut } from "./index-0e3ab3af.mjs";
36
- import "/@/utils/http/axios";
37
- import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
38
- import "/@/hooks/web/useMessage";
39
- import "vue-router";
40
- const mt = z({
41
- name: "AuthDataConfig",
42
- components: { BasicTable: X, TableAction: Y, BasicModal: tt, BasicForm: ot },
43
- props: {
44
- cgformId: { type: String, required: !0 },
45
- authFields: { type: Array, required: !0 }
46
- },
47
- setup(e) {
48
- const o = N(!1), [a, { reload: c, setLoading: m }] = Z({
49
- api: (t) => nt(e.cgformId, t),
50
- rowKey: "id",
51
- bordered: !0,
52
- columns: lt,
53
- showIndexColumn: !1,
54
- // 操作列
55
- actionColumn: {
56
- width: 120,
57
- title: "操作",
58
- fixed: !1,
59
- dataIndex: "action",
60
- slots: { customRender: "action" }
61
- }
62
- });
63
- k(o, (t) => m(t));
64
- const [d, { openModal: f, closeModal: i }] = et(), n = x({
65
- title: "",
66
- width: 800,
67
- confirmLoading: !1,
68
- onOk: U,
69
- onCancel: i,
70
- onRegister: d
71
- });
72
- let s = !1, p = {};
73
- const { formSchemas: b } = ct(e, {
74
- onRuleOperatorChange: L
75
- }), [w, { validate: g, resetFields: _, setFieldsValue: D }] = at({
76
- schemas: b,
77
- showActionButtonGroup: !1,
78
- labelAlign: "right"
79
- });
80
- k(
81
- () => e.cgformId,
82
- () => {
83
- c().catch(() => null);
84
- },
85
- { immediate: !0 }
86
- );
87
- function A(t) {
88
- return C(this, null, function* () {
89
- var h;
90
- s = (h = t.isUpdate) != null ? h : !1, n.title = t.title, f(), yield G(), yield _(), p = Object.assign({}, t.record), yield D(p);
91
- });
92
- }
93
- function S() {
94
- A({ title: "新增" });
95
- }
96
- function v(t) {
97
- A({ title: "编辑", record: t, isUpdate: !0 });
98
- }
99
- function R(t) {
100
- o.value = !0, rt(t).then(c).finally(() => o.value = !1);
101
- }
102
- function U() {
103
- return C(this, null, function* () {
104
- try {
105
- n.confirmLoading = !0;
106
- let t = yield g();
107
- t = Object.assign({}, p, t), t.ruleOperator == F && (t.ruleColumn = ""), t.cgformId = e.cgformId, yield it(t, s), c(), i();
108
- } finally {
109
- n.confirmLoading = !1;
110
- }
111
- });
112
- }
113
- function I(t) {
114
- o.value = !0;
115
- let h = Math.abs(t.status - 1);
116
- st(M(y({}, t), { status: h })).then(() => {
117
- t.status = h;
118
- }).finally(() => {
119
- o.value = !1;
120
- });
121
- }
122
- function L(t) {
123
- t == F && D({
124
- ruleColumn: ""
125
- });
126
- }
127
- function O(t) {
128
- return [
129
- {
130
- label: "编辑",
131
- onClick: () => v(t)
132
- }
133
- ];
134
- }
135
- function E(t) {
136
- return [
137
- {
138
- label: "删除",
139
- popConfirm: {
140
- title: "确定删除吗?",
141
- placement: "left",
142
- confirm: () => R(t.id)
143
- }
144
- }
145
- ];
146
- }
147
- return {
148
- loading: o,
149
- formModalProps: n,
150
- onAdd: S,
151
- onUpdateStatus: I,
152
- getTableAction: O,
153
- getDropDownAction: E,
154
- registerTable: a,
155
- registerModal: d,
156
- registerForm: w
157
- };
158
- }
159
- });
160
- function dt(e, o, a, c, m, d) {
161
- const f = r("a-button"), i = r("a-switch"), n = r("TableAction"), s = r("BasicTable"), p = r("BasicForm"), b = r("a-spin"), w = r("BasicModal");
162
- return K(), Q("div", null, [
163
- l(s, {
164
- onRegister: e.registerTable,
165
- loading: e.loading
166
- }, {
167
- tableTitle: u(() => [
168
- l(f, {
169
- onClick: e.onAdd,
170
- type: "primary",
171
- preIcon: "ant-design:plus"
172
- }, {
173
- default: u(() => [
174
- H("新增")
175
- ]),
176
- _: 1
177
- }, 8, ["onClick"])
178
- ]),
179
- switch: u(({ text: g, record: _ }) => [
180
- l(i, {
181
- size: "small",
182
- checked: _.status === 1,
183
- onClick: () => e.onUpdateStatus(_)
184
- }, null, 8, ["checked", "onClick"])
185
- ]),
186
- action: u(({ record: g }) => [
187
- l(n, {
188
- actions: e.getTableAction(g),
189
- dropDownActions: e.getDropDownAction(g)
190
- }, null, 8, ["actions", "dropDownActions"])
191
- ]),
192
- _: 1
193
- }, 8, ["onRegister", "loading"]),
194
- l(w, J(W(e.formModalProps)), {
195
- default: u(() => [
196
- l(b, {
197
- spinning: e.formModalProps.confirmLoading
198
- }, {
199
- default: u(() => [
200
- l(p, { onRegister: e.registerForm }, null, 8, ["onRegister"])
201
- ]),
202
- _: 1
203
- }, 8, ["spinning"])
204
- ]),
205
- _: 1
206
- }, 16)
207
- ]);
208
- }
209
- const yt = /* @__PURE__ */ ut(mt, [["render", dt]]);
210
- export {
211
- yt as default
212
- };
@@ -1,139 +0,0 @@
1
- var r = (n, f, s) => new Promise((m, u) => {
2
- var p = (a) => {
3
- try {
4
- i(s.next(a));
5
- } catch (e) {
6
- u(e);
7
- }
8
- }, c = (a) => {
9
- try {
10
- i(s.throw(a));
11
- } catch (e) {
12
- u(e);
13
- }
14
- }, i = (a) => a.done ? m(a.value) : Promise.resolve(a.value).then(p, c);
15
- i((s = s.apply(n, f)).next());
16
- });
17
- import { defineComponent as g, ref as k, watch as w, resolveComponent as _, openBlock as S, createElementBlock as x, createVNode as h, withCtx as l, createTextVNode as b } from "vue";
18
- import { BasicTable as F, useTable as v } from "/@/components/Table";
19
- import { a as E, b as I, c as y } from "./auth.api-d3a6c4b3.mjs";
20
- import { a as T } from "./auth.data-8be5c9e3.mjs";
21
- import { _ as B } from "./index-0e3ab3af.mjs";
22
- import "/@/utils/http/axios";
23
- import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
24
- import "/@/hooks/web/useMessage";
25
- import "vue-router";
26
- const U = g({
27
- name: "AuthFieldConfig",
28
- components: { BasicTable: F },
29
- props: {
30
- headId: {
31
- type: String,
32
- default: "",
33
- required: !0
34
- }
35
- },
36
- emits: ["update:authFields"],
37
- setup(n, { emit: f }) {
38
- const s = k(""), [m, { reload: u }] = v({
39
- api: p,
40
- rowKey: "code",
41
- bordered: !0,
42
- columns: T,
43
- showIndexColumn: !1
44
- });
45
- w(
46
- () => n.headId,
47
- (a) => {
48
- s.value = a.split("?")[0], u().catch(() => null);
49
- },
50
- { immediate: !0 }
51
- );
52
- function p(a) {
53
- return r(this, null, function* () {
54
- const e = ["id"];
55
- let t = yield E(s.value, a), o = [], C = [];
56
- return t.forEach((d) => {
57
- e.indexOf(d.code) < 0 && ((d.isShowForm == 1 || d.isShowList == 1) && C.push(d), d.dbIsPersist == 1 && o.push({ text: d.title, value: d.code }));
58
- }), f("update:authFields", o), C;
59
- });
60
- }
61
- function c(a, e) {
62
- return r(this, null, function* () {
63
- yield I({
64
- cgformId: s.value,
65
- code: e.code,
66
- status: a ? 1 : 0
67
- }), e.formEditable || e.formShow || e.listShow || (e.formEditable = !0, e.formShow = !0, e.listShow = !0), e.status = Math.abs(e.status - 1);
68
- });
69
- }
70
- function i(a, e, t) {
71
- return r(this, null, function* () {
72
- let o = a.target.checked;
73
- yield y({
74
- cgformId: s.value,
75
- code: e.code,
76
- switchFlag: t,
77
- listShow: o,
78
- formShow: o,
79
- formEditable: o
80
- }), t == 1 ? e.listShow = o : t == 2 ? e.formShow = o : t == 3 && (e.formEditable = o);
81
- });
82
- }
83
- return { registerTable: m, onUpdateStatus: c, onCheckboxChange: i };
84
- }
85
- });
86
- const $ = { class: "auth-field-config" };
87
- function A(n, f, s, m, u, p) {
88
- const c = _("a-switch"), i = _("a-checkbox"), a = _("BasicTable");
89
- return S(), x("div", $, [
90
- h(a, { onRegister: n.registerTable }, {
91
- switch: l(({ text: e, record: t }) => [
92
- h(c, {
93
- size: "small",
94
- checked: t.status === 1,
95
- onChange: (o) => n.onUpdateStatus(o, t)
96
- }, null, 8, ["checked", "onChange"])
97
- ]),
98
- list: l(({ text: e, record: t }) => [
99
- h(i, {
100
- checked: t.listShow,
101
- disabled: t.status === 0,
102
- onChange: (o) => n.onCheckboxChange(o, t, 1)
103
- }, {
104
- default: l(() => [
105
- b(" 可见 ")
106
- ]),
107
- _: 2
108
- }, 1032, ["checked", "disabled", "onChange"])
109
- ]),
110
- form: l(({ text: e, record: t }) => [
111
- h(i, {
112
- checked: t.formShow,
113
- disabled: t.status === 0,
114
- onChange: (o) => n.onCheckboxChange(o, t, 2)
115
- }, {
116
- default: l(() => [
117
- b(" 可见 ")
118
- ]),
119
- _: 2
120
- }, 1032, ["checked", "disabled", "onChange"]),
121
- h(i, {
122
- checked: t.formEditable,
123
- disabled: t.status === 0,
124
- onChange: (o) => n.onCheckboxChange(o, t, 3)
125
- }, {
126
- default: l(() => [
127
- b(" 可编辑 ")
128
- ]),
129
- _: 2
130
- }, 1032, ["checked", "disabled", "onChange"])
131
- ]),
132
- _: 1
133
- }, 8, ["onRegister"])
134
- ]);
135
- }
136
- const P = /* @__PURE__ */ B(U, [["render", A], ["__scopeId", "data-v-d597c946"]]);
137
- export {
138
- P as default
139
- };
@@ -1,114 +0,0 @@
1
- import { defineComponent as A, ref as u, computed as D, resolveComponent as a, openBlock as h, createBlock as y, withCtx as r, createVNode as o, createElementBlock as _, Fragment as B, createCommentVNode as F } from "vue";
2
- import { BasicDrawer as I, useDrawerInner as b } from "/@/components/Drawer";
3
- import w from "./AuthFieldConfig-6b21915c.mjs";
4
- import v from "./AuthButtonConfig-244ec09f.mjs";
5
- import k from "./AuthDataConfig-83891eea.mjs";
6
- import { _ as K } from "./index-0e3ab3af.mjs";
7
- import "/@/components/Table";
8
- import "./auth.api-d3a6c4b3.mjs";
9
- import "/@/utils/http/axios";
10
- import "./auth.data-8be5c9e3.mjs";
11
- import "lodash-es";
12
- import "/@/components/Modal";
13
- import "/@/components/Form";
14
- import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
15
- import "/@/hooks/web/useMessage";
16
- import "vue-router";
17
- const R = A({
18
- name: "AuthManagerDrawer",
19
- components: {
20
- BasicDrawer: I,
21
- AuthFieldConfig: w,
22
- AuthButtonConfig: v,
23
- AuthDataConfig: k
24
- },
25
- props: {
26
- // 1单表 2主表 3附表
27
- tableType: {
28
- type: Number,
29
- default: 1
30
- }
31
- },
32
- emits: ["register"],
33
- setup(e) {
34
- const t = u(""), i = u(""), f = u([]), d = u("field"), c = D(() => e.tableType == 1 || e.tableType == 2), [s, { closeDrawer: n }] = b((m) => {
35
- t.value = m.cgformId, i.value = t.value + "?" + (/* @__PURE__ */ new Date()).getTime(), d.value = "field";
36
- });
37
- function l() {
38
- n();
39
- }
40
- return {
41
- activeKey: d,
42
- cgformId: t,
43
- headId: i,
44
- authFields: f,
45
- hasDataAuth: c,
46
- onClose: l,
47
- registerDrawer: s
48
- };
49
- }
50
- });
51
- function T(e, t, i, f, d, c) {
52
- const s = a("AuthFieldConfig"), n = a("a-tab-pane"), l = a("AuthButtonConfig"), m = a("AuthDataConfig"), g = a("a-tabs"), C = a("BasicDrawer");
53
- return h(), y(C, {
54
- onRegister: e.registerDrawer,
55
- title: "权限管理",
56
- width: 800,
57
- onClose: e.onClose
58
- }, {
59
- default: r(() => [
60
- o(g, {
61
- activeKey: e.activeKey,
62
- "onUpdate:activeKey": t[1] || (t[1] = (p) => e.activeKey = p)
63
- }, {
64
- default: r(() => [
65
- o(n, {
66
- tab: "字段权限",
67
- key: "field",
68
- forceRender: ""
69
- }, {
70
- default: r(() => [
71
- o(s, {
72
- headId: e.headId,
73
- authFields: e.authFields,
74
- "onUpdate:authFields": t[0] || (t[0] = (p) => e.authFields = p)
75
- }, null, 8, ["headId", "authFields"])
76
- ]),
77
- _: 1
78
- }),
79
- e.hasDataAuth ? (h(), _(B, { key: 0 }, [
80
- o(n, {
81
- tab: "按钮权限",
82
- key: "button",
83
- forceRender: ""
84
- }, {
85
- default: r(() => [
86
- o(l, { headId: e.headId }, null, 8, ["headId"])
87
- ]),
88
- _: 1
89
- }),
90
- o(n, {
91
- tab: "数据权限",
92
- key: "data",
93
- forceRender: ""
94
- }, {
95
- default: r(() => [
96
- o(m, {
97
- cgformId: e.cgformId,
98
- authFields: e.authFields
99
- }, null, 8, ["cgformId", "authFields"])
100
- ]),
101
- _: 1
102
- })
103
- ], 64)) : F("", !0)
104
- ]),
105
- _: 1
106
- }, 8, ["activeKey"])
107
- ]),
108
- _: 1
109
- }, 8, ["onRegister", "onClose"]);
110
- }
111
- const S = /* @__PURE__ */ K(R, [["render", T]]);
112
- export {
113
- S as default
114
- };