@since2006/pages 2025.8.2 → 2025.8.4

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 (111) hide show
  1. package/dist/es/index.js +18 -8
  2. package/dist/es/src/app/attachment/AttachmentEdit.vue.js +181 -0
  3. package/dist/es/src/app/attachment/AttachmentEdit.vue2.js +4 -0
  4. package/dist/es/src/app/attachment/AttachmentList.vue.js +178 -0
  5. package/dist/es/src/app/attachment/AttachmentList.vue2.js +4 -0
  6. package/dist/es/src/app/attachment/api.js +28 -0
  7. package/dist/es/src/app/attachment/index.js +7 -0
  8. package/dist/es/src/app/dict/DictEdit.vue.js +159 -0
  9. package/dist/es/src/app/dict/DictEdit.vue2.js +4 -0
  10. package/dist/es/src/app/dict/DictIndex.vue.js +7 -0
  11. package/dist/es/src/app/dict/DictIndex.vue2.js +202 -0
  12. package/dist/es/src/app/dict/DictIndex.vue3.js +1 -0
  13. package/dist/es/src/app/dict/DictItemEdit.vue.js +7 -0
  14. package/dist/es/src/app/dict/DictItemEdit.vue2.js +180 -0
  15. package/dist/es/src/app/dict/DictPanel.vue.js +7 -0
  16. package/dist/es/src/app/dict/DictPanel.vue2.js +261 -0
  17. package/dist/es/src/app/dict/api.js +47 -0
  18. package/dist/es/src/app/dict/index.js +9 -0
  19. package/dist/es/src/app/log/LogIndex.vue.js +238 -0
  20. package/dist/es/src/app/log/LogIndex.vue2.js +4 -0
  21. package/dist/es/src/app/log/LogView.vue.js +7 -0
  22. package/dist/es/src/app/log/LogView.vue2.js +164 -0
  23. package/dist/es/src/app/log/api.js +11 -0
  24. package/dist/es/src/app/log/index.js +7 -0
  25. package/dist/es/src/app/log/ua-icons.vue.js +7 -0
  26. package/dist/es/src/app/log/ua-icons.vue2.js +61 -0
  27. package/dist/es/src/app/metadata/MetadataCreate.vue.js +115 -0
  28. package/dist/es/src/app/metadata/MetadataCreate.vue2.js +4 -0
  29. package/dist/es/src/app/metadata/MetadataIndex.vue.js +179 -0
  30. package/dist/es/src/app/metadata/MetadataIndex.vue2.js +4 -0
  31. package/dist/es/src/app/metadata/MetadataUpdate.vue.js +128 -0
  32. package/dist/es/src/app/metadata/MetadataUpdate.vue2.js +4 -0
  33. package/dist/es/src/app/metadata/api.js +23 -0
  34. package/dist/es/src/app/metadata/index.js +7 -0
  35. package/dist/es/src/app/module/ModuleIndex.vue.js +5 -216
  36. package/dist/es/src/app/module/ModuleIndex.vue2.js +219 -2
  37. package/dist/es/src/app/module/index.js +5 -7
  38. package/dist/es/src/app/schedule/CronTypeSelect.vue.js +513 -0
  39. package/dist/es/src/app/schedule/CronTypeSelect.vue2.js +4 -0
  40. package/dist/es/src/app/schedule/ScheduleAdd.vue.js +7 -0
  41. package/dist/es/src/app/schedule/ScheduleAdd.vue2.js +191 -0
  42. package/dist/es/src/app/schedule/ScheduleEdit.vue.js +7 -0
  43. package/dist/es/src/app/schedule/ScheduleEdit.vue2.js +203 -0
  44. package/dist/es/src/app/schedule/ScheduleIndex.vue.js +279 -0
  45. package/dist/es/src/app/schedule/ScheduleIndex.vue2.js +4 -0
  46. package/dist/es/src/app/schedule/ScheduleLogList.vue.js +153 -0
  47. package/dist/es/src/app/schedule/ScheduleLogList.vue2.js +4 -0
  48. package/dist/es/src/app/schedule/ScheduleLogView.vue.js +7 -0
  49. package/dist/es/src/app/schedule/ScheduleLogView.vue2.js +116 -0
  50. package/dist/es/src/app/schedule/api.js +38 -0
  51. package/dist/es/src/app/schedule/index.js +7 -0
  52. package/dist/es/src/app/schedule/schedule.js +58 -0
  53. package/dist/es/src/app/system/index.js +3 -5
  54. package/dist/es/src/index.js +13 -2
  55. package/dist/es/style.css +1 -1
  56. package/dist/lib/index.js +1 -1
  57. package/dist/lib/src/app/attachment/AttachmentEdit.vue.js +1 -0
  58. package/dist/lib/src/app/attachment/AttachmentEdit.vue2.js +1 -0
  59. package/dist/lib/src/app/attachment/AttachmentList.vue.js +1 -0
  60. package/dist/lib/src/app/attachment/AttachmentList.vue2.js +1 -0
  61. package/dist/lib/src/app/attachment/api.js +1 -0
  62. package/dist/lib/src/app/attachment/index.js +1 -0
  63. package/dist/lib/src/app/dict/DictEdit.vue.js +1 -0
  64. package/dist/lib/src/app/dict/DictEdit.vue2.js +1 -0
  65. package/dist/lib/src/app/dict/DictIndex.vue.js +1 -0
  66. package/dist/lib/src/app/dict/DictIndex.vue2.js +1 -0
  67. package/dist/lib/src/app/dict/DictIndex.vue3.js +1 -0
  68. package/dist/lib/src/app/dict/DictItemEdit.vue.js +1 -0
  69. package/dist/lib/src/app/dict/DictItemEdit.vue2.js +1 -0
  70. package/dist/lib/src/app/dict/DictPanel.vue.js +1 -0
  71. package/dist/lib/src/app/dict/DictPanel.vue2.js +1 -0
  72. package/dist/lib/src/app/dict/api.js +1 -0
  73. package/dist/lib/src/app/dict/index.js +1 -0
  74. package/dist/lib/src/app/log/LogIndex.vue.js +1 -0
  75. package/dist/lib/src/app/log/LogIndex.vue2.js +1 -0
  76. package/dist/lib/src/app/log/LogView.vue.js +1 -0
  77. package/dist/lib/src/app/log/LogView.vue2.js +1 -0
  78. package/dist/lib/src/app/log/api.js +1 -0
  79. package/dist/lib/src/app/log/index.js +1 -0
  80. package/dist/lib/src/app/log/ua-icons.vue.js +1 -0
  81. package/dist/lib/src/app/log/ua-icons.vue2.js +1 -0
  82. package/dist/lib/src/app/metadata/MetadataCreate.vue.js +1 -0
  83. package/dist/lib/src/app/metadata/MetadataCreate.vue2.js +1 -0
  84. package/dist/lib/src/app/metadata/MetadataIndex.vue.js +1 -0
  85. package/dist/lib/src/app/metadata/MetadataIndex.vue2.js +1 -0
  86. package/dist/lib/src/app/metadata/MetadataUpdate.vue.js +1 -0
  87. package/dist/lib/src/app/metadata/MetadataUpdate.vue2.js +1 -0
  88. package/dist/lib/src/app/metadata/api.js +1 -0
  89. package/dist/lib/src/app/metadata/index.js +1 -0
  90. package/dist/lib/src/app/module/ModuleIndex.vue.js +1 -1
  91. package/dist/lib/src/app/module/ModuleIndex.vue2.js +1 -1
  92. package/dist/lib/src/app/module/index.js +1 -1
  93. package/dist/lib/src/app/schedule/CronTypeSelect.vue.js +1 -0
  94. package/dist/lib/src/app/schedule/CronTypeSelect.vue2.js +1 -0
  95. package/dist/lib/src/app/schedule/ScheduleAdd.vue.js +1 -0
  96. package/dist/lib/src/app/schedule/ScheduleAdd.vue2.js +1 -0
  97. package/dist/lib/src/app/schedule/ScheduleEdit.vue.js +1 -0
  98. package/dist/lib/src/app/schedule/ScheduleEdit.vue2.js +1 -0
  99. package/dist/lib/src/app/schedule/ScheduleIndex.vue.js +1 -0
  100. package/dist/lib/src/app/schedule/ScheduleIndex.vue2.js +1 -0
  101. package/dist/lib/src/app/schedule/ScheduleLogList.vue.js +1 -0
  102. package/dist/lib/src/app/schedule/ScheduleLogList.vue2.js +1 -0
  103. package/dist/lib/src/app/schedule/ScheduleLogView.vue.js +1 -0
  104. package/dist/lib/src/app/schedule/ScheduleLogView.vue2.js +1 -0
  105. package/dist/lib/src/app/schedule/api.js +1 -0
  106. package/dist/lib/src/app/schedule/index.js +1 -0
  107. package/dist/lib/src/app/schedule/schedule.js +1 -0
  108. package/dist/lib/src/app/system/index.js +1 -1
  109. package/dist/lib/src/index.js +1 -1
  110. package/dist/lib/style.css +1 -1
  111. package/package.json +1 -1
@@ -0,0 +1,202 @@
1
+ import { defineComponent as H, ref as I, reactive as h, resolveComponent as a, openBlock as p, createElementBlock as f, createElementVNode as _, createVNode as t, withCtx as o, createTextVNode as l, unref as i, toDisplayString as w, createCommentVNode as y, Fragment as U } from "vue";
2
+ import G from "./DictEdit.vue.js";
3
+ import { queryDictionaries as J, refreshDictionaries as K, removeDictionary as L } from "./api.js";
4
+ import { HddTwoTone as M, PlusOutlined as Q, SyncOutlined as W } from "@ant-design/icons-vue";
5
+ import { message as C } from "ant-design-vue";
6
+ import { useRouter as X } from "vue-router";
7
+ import { FxCardTable as Y, ClickCopy as Z } from "@since2006/components";
8
+ const ee = { class: "ant-pro-table" }, te = { class: "ant-pro-table-search" }, oe = ["onClick"], ne = { key: 2 }, ae = ["onClick"], pe = /* @__PURE__ */ H({
9
+ __name: "DictIndex",
10
+ setup(re) {
11
+ const s = I(), q = [
12
+ {
13
+ title: "字典名称",
14
+ dataIndex: "name",
15
+ scopedSlots: { customRender: "name" }
16
+ },
17
+ {
18
+ title: "字典标识",
19
+ dataIndex: "keyword"
20
+ },
21
+ {
22
+ title: "备注",
23
+ dataIndex: "remark"
24
+ },
25
+ {
26
+ title: "操作",
27
+ width: "150px",
28
+ dataIndex: "action"
29
+ }
30
+ ], u = h({
31
+ query: void 0
32
+ }), k = () => {
33
+ s.value.refresh();
34
+ }, D = () => {
35
+ u.query = void 0, s.value.refresh();
36
+ }, R = X(), v = I(!1), n = h({
37
+ open: !1,
38
+ mode: "add",
39
+ dictId: ""
40
+ }), S = () => {
41
+ n.open = !0, n.mode = "add", n.dictId = "";
42
+ }, E = () => {
43
+ v.value = !0, K().then(() => {
44
+ v.value = !1, C.success("刷新字典成功");
45
+ });
46
+ }, V = (r) => {
47
+ R.push({ path: "/dict/panel", query: { id: r.id } });
48
+ }, $ = (r) => {
49
+ n.open = !0, n.mode = "edit", n.dictId = r.id;
50
+ }, N = (r) => {
51
+ L(r.id).then(() => {
52
+ C.success("删除字典成功"), s.value.refresh();
53
+ });
54
+ }, T = (r) => {
55
+ let e;
56
+ r === "add" ? e = "添加字典成功" : e = "编辑字典成功", n.open = !1, C.success(e), s.value.refresh();
57
+ };
58
+ return (r, e) => {
59
+ const P = a("a-input"), B = a("a-form-item"), x = a("a-col"), m = a("a-button"), F = a("a-row"), O = a("a-form"), j = a("a-button-group"), z = a("a-divider"), A = a("a-popconfirm");
60
+ return p(), f("div", null, [
61
+ _("div", ee, [
62
+ _("div", te, [
63
+ t(O, { layout: "horizontal" }, {
64
+ default: o(() => [
65
+ t(F, {
66
+ gutter: 16,
67
+ type: "flex",
68
+ justify: "start"
69
+ }, {
70
+ default: o(() => [
71
+ t(x, {
72
+ xs: 24,
73
+ sm: 24,
74
+ md: 12,
75
+ lg: 7
76
+ }, {
77
+ default: o(() => [
78
+ t(B, { label: "搜索" }, {
79
+ default: o(() => [
80
+ t(P, {
81
+ value: u.query,
82
+ "onUpdate:value": e[0] || (e[0] = (d) => u.query = d),
83
+ placeholder: "字典名称、字典标识",
84
+ onPressEnter: k
85
+ }, null, 8, ["value"])
86
+ ]),
87
+ _: 1
88
+ })
89
+ ]),
90
+ _: 1
91
+ }),
92
+ t(x, null, {
93
+ default: o(() => [
94
+ t(m, {
95
+ onClick: k,
96
+ type: "primary"
97
+ }, {
98
+ default: o(() => e[2] || (e[2] = [
99
+ l("搜索")
100
+ ])),
101
+ _: 1
102
+ }),
103
+ t(m, {
104
+ onClick: D,
105
+ style: { "margin-left": "16px" }
106
+ }, {
107
+ default: o(() => e[3] || (e[3] = [
108
+ l("重置")
109
+ ])),
110
+ _: 1
111
+ })
112
+ ]),
113
+ _: 1
114
+ })
115
+ ]),
116
+ _: 1
117
+ })
118
+ ]),
119
+ _: 1
120
+ })
121
+ ]),
122
+ t(i(Y), {
123
+ columns: q,
124
+ "load-data": i(J),
125
+ params: u,
126
+ ref_key: "tableRef",
127
+ ref: s
128
+ }, {
129
+ title: o(() => [
130
+ t(i(M)),
131
+ e[4] || (e[4] = l(" 数据字典 "))
132
+ ]),
133
+ toolbar: o(() => [
134
+ t(j, null, {
135
+ default: o(() => [
136
+ t(m, {
137
+ type: "primary",
138
+ onClick: S
139
+ }, {
140
+ default: o(() => [
141
+ t(i(Q)),
142
+ e[5] || (e[5] = l(" 添加字典 "))
143
+ ]),
144
+ _: 1
145
+ }),
146
+ t(m, {
147
+ onClick: E,
148
+ loading: v.value
149
+ }, {
150
+ default: o(() => [
151
+ t(i(W)),
152
+ e[6] || (e[6] = l(" 刷新字典 "))
153
+ ]),
154
+ _: 1
155
+ }, 8, ["loading"])
156
+ ]),
157
+ _: 1
158
+ })
159
+ ]),
160
+ bodyCell: o(({ column: d, record: c, text: b }) => [
161
+ d.dataIndex === "name" ? (p(), f("a", {
162
+ key: 0,
163
+ onClick: (g) => V(c)
164
+ }, w(c.name), 9, oe)) : y("", !0),
165
+ d.dataIndex === "keyword" ? (p(), f(U, { key: 1 }, [
166
+ l(w(b) + " ", 1),
167
+ t(i(Z), { value: b }, null, 8, ["value"])
168
+ ], 64)) : y("", !0),
169
+ d.dataIndex === "action" ? (p(), f("span", ne, [
170
+ _("a", {
171
+ onClick: (g) => $(c)
172
+ }, "编辑", 8, ae),
173
+ t(z, { type: "vertical" }),
174
+ t(A, {
175
+ title: "是否确认删除?",
176
+ onConfirm: (g) => N(c)
177
+ }, {
178
+ default: o(() => e[7] || (e[7] = [
179
+ _("a", { href: "#" }, "删除", -1)
180
+ ])),
181
+ _: 2
182
+ }, 1032, ["onConfirm"])
183
+ ])) : y("", !0)
184
+ ]),
185
+ _: 1
186
+ }, 8, ["load-data", "params"])
187
+ ]),
188
+ t(G, {
189
+ ref: "dictEdit",
190
+ open: n.open,
191
+ mode: n.mode,
192
+ "dict-id": n.dictId,
193
+ onCancel: e[1] || (e[1] = (d) => n.open = !1),
194
+ onSuccess: T
195
+ }, null, 8, ["open", "mode", "dict-id"])
196
+ ]);
197
+ };
198
+ }
199
+ });
200
+ export {
201
+ pe as default
202
+ };
@@ -0,0 +1,7 @@
1
+ import t from "./DictItemEdit.vue2.js";
2
+ /* empty css */
3
+ import o from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const i = /* @__PURE__ */ o(t, [["__scopeId", "data-v-112d54e0"]]);
5
+ export {
6
+ i as default
7
+ };
@@ -0,0 +1,180 @@
1
+ import { defineComponent as B, ref as m, watch as R, resolveComponent as r, openBlock as g, createBlock as h, withCtx as d, createVNode as a, createTextVNode as V, toDisplayString as F, createCommentVNode as L } from "vue";
2
+ import { getDictItem as p, addDictItem as A, updateDictItem as M } from "./api.js";
3
+ import { message as O } from "ant-design-vue";
4
+ const G = /* @__PURE__ */ B({
5
+ __name: "DictItemEdit",
6
+ props: {
7
+ open: {
8
+ type: Boolean,
9
+ default: !1
10
+ },
11
+ mode: {
12
+ type: String,
13
+ default: "add"
14
+ },
15
+ dictId: {
16
+ type: String,
17
+ default: null
18
+ },
19
+ itemId: {
20
+ type: String,
21
+ default: null
22
+ }
23
+ },
24
+ emits: ["success", "cancel"],
25
+ setup(f, { emit: b }) {
26
+ const i = m(""), c = m(!1), o = m(null), _ = m(), n = f, I = b, k = {
27
+ id: null,
28
+ name: null,
29
+ value: null,
30
+ seqNo: null,
31
+ state: !0,
32
+ remark: null
33
+ }, e = m({ ...k }), q = {
34
+ name: [{ required: !0, message: "请填写字典项名称" }],
35
+ value: [{ required: !0, message: "请填写字典项取值" }],
36
+ seqNo: [{ required: !0, message: "请填写数字类型顺序号" }],
37
+ state: [{ required: !0, message: "请选择字典项状态" }]
38
+ }, y = () => {
39
+ e.value = { ...k };
40
+ };
41
+ R(
42
+ () => n.open,
43
+ (t) => {
44
+ t && (y(), n.mode === "add" ? N() : S());
45
+ }
46
+ );
47
+ const N = () => {
48
+ i.value = "添加字典项", n.itemId !== null ? p(n.itemId).then((t) => {
49
+ o.value = t.result;
50
+ }) : o.value = null;
51
+ }, S = () => {
52
+ i.value = "修改字典项", e.value.id = n.itemId, p(n.itemId).then((t) => {
53
+ e.value = t.result, e.value.state = t.result.state === "E", e.value.parentId != null ? p(e.value.parentId).then((l) => {
54
+ o.value = l.result;
55
+ }) : o.value = null;
56
+ });
57
+ }, w = () => {
58
+ _.value.validateFields().then(() => {
59
+ const t = { ...e.value, dictId: n.dictId };
60
+ o.value !== null && (t.parentId = o.value.id), t.state = t.state ? "E" : "D";
61
+ let l = null;
62
+ if (n.mode === "add")
63
+ l = A;
64
+ else if (n.mode === "edit")
65
+ l = M;
66
+ else
67
+ return !1;
68
+ c.value = !0, l(t).then((s) => {
69
+ O.success("操作成功"), I("success", s.result.parentId);
70
+ }).finally(() => c.value = !1);
71
+ });
72
+ }, D = () => {
73
+ I("cancel");
74
+ };
75
+ return (t, l) => {
76
+ const s = r("a-form-item"), v = r("a-input"), C = r("a-input-number"), U = r("a-switch"), x = r("a-form"), E = r("a-modal");
77
+ return g(), h(E, {
78
+ open: f.open,
79
+ title: i.value,
80
+ width: 800,
81
+ confirmLoading: c.value,
82
+ "mask-closable": !1,
83
+ onOk: w,
84
+ onCancel: D
85
+ }, {
86
+ default: d(() => [
87
+ a(x, {
88
+ ref_key: "formRef",
89
+ ref: _,
90
+ model: e.value,
91
+ rules: q,
92
+ "label-col": { span: 5 },
93
+ "wrapper-col": { span: 12 }
94
+ }, {
95
+ default: d(() => [
96
+ o.value ? (g(), h(s, {
97
+ key: 0,
98
+ label: "所属上级",
99
+ class: "notice"
100
+ }, {
101
+ default: d(() => [
102
+ V(F(o.value.name), 1)
103
+ ]),
104
+ _: 1
105
+ })) : L("", !0),
106
+ a(s, {
107
+ label: "字典项名称",
108
+ name: "name"
109
+ }, {
110
+ default: d(() => [
111
+ a(v, {
112
+ value: e.value.name,
113
+ "onUpdate:value": l[0] || (l[0] = (u) => e.value.name = u),
114
+ placeholder: "字典项名称"
115
+ }, null, 8, ["value"])
116
+ ]),
117
+ _: 1
118
+ }),
119
+ a(s, {
120
+ label: "字典项取值",
121
+ name: "value"
122
+ }, {
123
+ default: d(() => [
124
+ a(v, {
125
+ value: e.value.value,
126
+ "onUpdate:value": l[1] || (l[1] = (u) => e.value.value = u),
127
+ placeholder: "字典项取值"
128
+ }, null, 8, ["value"])
129
+ ]),
130
+ _: 1
131
+ }),
132
+ a(s, {
133
+ label: "顺序号",
134
+ name: "seqNo"
135
+ }, {
136
+ default: d(() => [
137
+ a(C, {
138
+ value: e.value.seqNo,
139
+ "onUpdate:value": l[2] || (l[2] = (u) => e.value.seqNo = u),
140
+ placeholder: "顺序号"
141
+ }, null, 8, ["value"])
142
+ ]),
143
+ _: 1
144
+ }),
145
+ a(s, {
146
+ label: "状态",
147
+ name: "state"
148
+ }, {
149
+ default: d(() => [
150
+ a(U, {
151
+ checked: e.value.state,
152
+ "onUpdate:checked": l[3] || (l[3] = (u) => e.value.state = u),
153
+ "checked-children": "启用",
154
+ "un-checked-children": "禁用"
155
+ }, null, 8, ["checked"])
156
+ ]),
157
+ _: 1
158
+ }),
159
+ a(s, { label: "描述" }, {
160
+ default: d(() => [
161
+ a(v, {
162
+ value: e.value.remark,
163
+ "onUpdate:value": l[4] || (l[4] = (u) => e.value.remark = u),
164
+ placeholder: "字典描述"
165
+ }, null, 8, ["value"])
166
+ ]),
167
+ _: 1
168
+ })
169
+ ]),
170
+ _: 1
171
+ }, 8, ["model"])
172
+ ]),
173
+ _: 1
174
+ }, 8, ["open", "title", "confirmLoading"]);
175
+ };
176
+ }
177
+ });
178
+ export {
179
+ G as default
180
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./DictPanel.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fa4d106d"]]);
5
+ export {
6
+ f as default
7
+ };
@@ -0,0 +1,261 @@
1
+ import { defineComponent as W, ref as c, onBeforeMount as X, resolveComponent as s, openBlock as D, createBlock as I, withCtx as a, createVNode as o, createTextVNode as d, toDisplayString as m, createElementVNode as q, h as C, unref as h, createCommentVNode as x } from "vue";
2
+ import Y from "./DictItemEdit.vue.js";
3
+ import { getDictionary as Z, getAdminDictItems as V, getDictItem as ee, deleteDictItem as te } from "./api.js";
4
+ import { useRoute as le } from "vue-router";
5
+ import { message as ae } from "ant-design-vue";
6
+ import { PlusCircleOutlined as oe, EditOutlined as ne, DeleteOutlined as ue } from "@ant-design/icons-vue";
7
+ const de = { class: "table-operator" }, _e = /* @__PURE__ */ W({
8
+ __name: "DictPanel",
9
+ setup(se) {
10
+ const B = le(), p = c(), y = c({}), M = c(!1), r = c(null), u = c({}), i = c([]), b = c([]), _ = c([]), v = c({
11
+ open: !1,
12
+ mode: "add",
13
+ dictId: "",
14
+ itemId: ""
15
+ }), O = (e) => {
16
+ i.value = e;
17
+ }, P = (e) => (r.value = e, e.dataRef.children ? new Promise((t) => {
18
+ t("");
19
+ }) : E(e.dataRef.key)), z = () => {
20
+ Z(p.value).then((e) => {
21
+ y.value = e.result;
22
+ });
23
+ }, E = async (e) => V(p.value, e).then((t) => {
24
+ r.value == null ? _.value = g(t.result) : (r.value.dataRef.children = g(t.result), _.value = [..._.value]);
25
+ }), A = (e, t) => {
26
+ const l = t.node.dataRef, n = i.value.includes(l.key);
27
+ l.isLeaf || (t.selected ? n || i.value.push(l.key) : n && (i.value = i.value.filter((f) => f !== l.key))), e.length === 0 ? (console.log("清空选中"), r.value = null) : r.value = t.node, T(l.key);
28
+ }, T = (e) => {
29
+ M.value = !0, ee(e).then((t) => {
30
+ u.value = K(t.result);
31
+ });
32
+ }, $ = () => {
33
+ v.value = {
34
+ open: !0,
35
+ mode: "add",
36
+ dictId: p.value,
37
+ itemId: r.value !== null ? u.value.key : null
38
+ };
39
+ }, j = () => {
40
+ v.value = {
41
+ open: !0,
42
+ mode: "edit",
43
+ dictId: p.value,
44
+ itemId: u.value.key
45
+ };
46
+ }, F = (e) => {
47
+ v.value.open = !1, w(e), u.value.key ? T(u.value.key) : u.value = {};
48
+ }, G = () => {
49
+ te(u.value.key).then((e) => {
50
+ ae.success("删除字典项成功"), w(e.result.parentId), r.value = null, u.value = {};
51
+ });
52
+ }, g = (e) => e.map((t) => K(t)), K = (e) => ({
53
+ key: e.id,
54
+ title: e.name,
55
+ isLeaf: !e.hasChildren,
56
+ value: e.value,
57
+ seqNo: e.seqNo,
58
+ state: e.state,
59
+ remark: e.remark
60
+ }), w = (e) => {
61
+ V(p.value, e).then((t) => {
62
+ e ? L(_.value, e, g(t.result)) : _.value = g(t.result);
63
+ });
64
+ }, L = (e, t, l) => {
65
+ e.forEach((n) => {
66
+ if (n.key === t) {
67
+ n.isLeaf = l.length === 0;
68
+ const f = N([n], 0);
69
+ b.value = b.value.filter((k) => !f.includes(k)), i.value = i.value.filter((k) => !f.includes(k)), n.children = l;
70
+ } else
71
+ n.children && L(n.children, t, l);
72
+ });
73
+ }, N = (e, t) => {
74
+ let l = [];
75
+ return e.forEach((n) => {
76
+ t > 0 && l.push(n.key), n.children && (l = l.concat(N(n.children, ++t)));
77
+ }), l;
78
+ };
79
+ return X(() => {
80
+ p.value = B.query.id, z(), E("");
81
+ }), (e, t) => {
82
+ const l = s("a-descriptions-item"), n = s("a-descriptions"), f = s("a-button"), k = s("a-popconfirm"), H = s("a-space"), J = s("a-tree"), R = s("a-col"), S = s("a-tag"), Q = s("a-row"), U = s("a-card");
83
+ return D(), I(U, null, {
84
+ default: a(() => [
85
+ o(n, {
86
+ column: 2,
87
+ size: "small"
88
+ }, {
89
+ default: a(() => [
90
+ o(l, { label: "字典名称" }, {
91
+ default: a(() => [
92
+ d(m(y.value.name), 1)
93
+ ]),
94
+ _: 1
95
+ }),
96
+ o(l, { label: "字典标识" }, {
97
+ default: a(() => [
98
+ d(m(y.value.keyword), 1)
99
+ ]),
100
+ _: 1
101
+ }),
102
+ o(l, { label: "是否缓存" }, {
103
+ default: a(() => [
104
+ d(m(y.value.enableCache === 1 ? "是" : "否"), 1)
105
+ ]),
106
+ _: 1
107
+ }),
108
+ o(l, { label: "描述" }, {
109
+ default: a(() => [
110
+ d(m(y.value.remark), 1)
111
+ ]),
112
+ _: 1
113
+ })
114
+ ]),
115
+ _: 1
116
+ }),
117
+ q("div", de, [
118
+ o(H, { wrap: "" }, {
119
+ default: a(() => [
120
+ o(f, {
121
+ type: "primary",
122
+ icon: C(h(oe)),
123
+ onClick: $
124
+ }, {
125
+ default: a(() => t[1] || (t[1] = [
126
+ d("添加字典项")
127
+ ])),
128
+ _: 1
129
+ }, 8, ["icon"]),
130
+ r.value ? (D(), I(f, {
131
+ key: 0,
132
+ icon: C(h(ne)),
133
+ onClick: j
134
+ }, {
135
+ default: a(() => t[2] || (t[2] = [
136
+ d(" 修改字典项 ")
137
+ ])),
138
+ _: 1
139
+ }, 8, ["icon"])) : x("", !0),
140
+ o(k, {
141
+ title: "是否确认删除?",
142
+ onConfirm: G
143
+ }, {
144
+ default: a(() => [
145
+ r.value ? (D(), I(f, {
146
+ key: 0,
147
+ danger: "",
148
+ icon: C(h(ue))
149
+ }, {
150
+ default: a(() => t[3] || (t[3] = [
151
+ d(" 删除字典项 ")
152
+ ])),
153
+ _: 1
154
+ }, 8, ["icon"])) : x("", !0)
155
+ ]),
156
+ _: 1
157
+ })
158
+ ]),
159
+ _: 1
160
+ })
161
+ ]),
162
+ o(Q, { class: "tree-container" }, {
163
+ default: a(() => [
164
+ o(R, { span: 7 }, {
165
+ default: a(() => [
166
+ t[4] || (t[4] = q("div", null, "字典项:", -1)),
167
+ o(J, {
168
+ showLine: "",
169
+ expandedKeys: i.value,
170
+ loadedKeys: b.value,
171
+ treeData: _.value,
172
+ onExpand: O,
173
+ loadData: P,
174
+ onSelect: A
175
+ }, null, 8, ["expandedKeys", "loadedKeys", "treeData"])
176
+ ]),
177
+ _: 1
178
+ }),
179
+ o(R, {
180
+ span: 17,
181
+ class: "tree-detail"
182
+ }, {
183
+ default: a(() => [
184
+ o(n, {
185
+ column: 1,
186
+ bordered: "",
187
+ size: "small"
188
+ }, {
189
+ default: a(() => [
190
+ o(l, { label: "字典名称" }, {
191
+ default: a(() => [
192
+ d(m(u.value.title), 1)
193
+ ]),
194
+ _: 1
195
+ }),
196
+ o(l, { label: "字典取值" }, {
197
+ default: a(() => [
198
+ d(m(u.value.value), 1)
199
+ ]),
200
+ _: 1
201
+ }),
202
+ o(l, { label: "排序号" }, {
203
+ default: a(() => [
204
+ d(m(u.value.seqNo), 1)
205
+ ]),
206
+ _: 1
207
+ }),
208
+ o(l, { label: "状态" }, {
209
+ default: a(() => [
210
+ u.value.state === "E" ? (D(), I(S, {
211
+ key: 0,
212
+ color: "green"
213
+ }, {
214
+ default: a(() => t[5] || (t[5] = [
215
+ d("启用")
216
+ ])),
217
+ _: 1
218
+ })) : u.value.state === "D" ? (D(), I(S, {
219
+ key: 1,
220
+ color: "red"
221
+ }, {
222
+ default: a(() => t[6] || (t[6] = [
223
+ d("禁用")
224
+ ])),
225
+ _: 1
226
+ })) : x("", !0)
227
+ ]),
228
+ _: 1
229
+ }),
230
+ o(l, { label: "描述" }, {
231
+ default: a(() => [
232
+ d(m(u.value.remark), 1)
233
+ ]),
234
+ _: 1
235
+ })
236
+ ]),
237
+ _: 1
238
+ })
239
+ ]),
240
+ _: 1
241
+ })
242
+ ]),
243
+ _: 1
244
+ }),
245
+ o(Y, {
246
+ open: v.value.open,
247
+ "dict-id": v.value.dictId,
248
+ "item-id": v.value.itemId,
249
+ mode: v.value.mode,
250
+ onSuccess: F,
251
+ onCancel: t[0] || (t[0] = (re) => v.value.open = !1)
252
+ }, null, 8, ["open", "dict-id", "item-id", "mode"])
253
+ ]),
254
+ _: 1
255
+ });
256
+ };
257
+ }
258
+ });
259
+ export {
260
+ _e as default
261
+ };