aibox-custom-component-packages 0.0.13 → 0.0.15

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 (88) hide show
  1. package/es/SourcePublish.mjs +1 -1
  2. package/es/assets/SourcePublish.css +1 -1
  3. package/es/chunks/{SourcePublish.BhLjt18i.js → SourcePublish.Dk7O9GzI.js} +2 -6
  4. package/es/index.mjs +1 -1
  5. package/lib/SourcePublish.js +1 -1
  6. package/lib/assets/SourcePublish.css +1 -1
  7. package/lib/chunks/SourcePublish.OeB6i-Iu.js +1 -0
  8. package/lib/index.js +1 -1
  9. package/package.json +2 -2
  10. package/es/chunks/AddOrEditSupplierDialog.BKR0RsiJ.js +0 -721
  11. package/es/chunks/AddOrEditSupplierDialog.CjNRipPe.js +0 -721
  12. package/es/chunks/AddOrEditSupplierDialog.CnsquSx2.js +0 -721
  13. package/es/chunks/AiboxTable.CDqNvRfJ.js +0 -635
  14. package/es/chunks/AiboxTable.CrWMAX84.js +0 -635
  15. package/es/chunks/ApplicationTypeTag.Cbdi0D65.js +0 -47
  16. package/es/chunks/ApplicationTypeTag.Df4BZxds.js +0 -47
  17. package/es/chunks/AuthSection.DFfj5MtZ.js +0 -201
  18. package/es/chunks/AuthSection.DWD_FxtJ.js +0 -201
  19. package/es/chunks/AvailableRangePreview.Bz9QkkAM.js +0 -194
  20. package/es/chunks/AvailableRangePreview.WFzbRasx.js +0 -194
  21. package/es/chunks/AvailableRangeSetting.Bq_K1zar.js +0 -229
  22. package/es/chunks/AvailableRangeSetting.Cty5Cdmh.js +0 -229
  23. package/es/chunks/CodeView.CWuSIL_F.js +0 -148
  24. package/es/chunks/CodeView.Dhxe1PQP.js +0 -148
  25. package/es/chunks/CommonTagsList.DSPdgjc3.js +0 -156
  26. package/es/chunks/CommonTagsList.NbXVfvLW.js +0 -156
  27. package/es/chunks/CommonTagsList.qam_Fp76.js +0 -156
  28. package/es/chunks/CreateMcpForm.BBVVd2RN.js +0 -308
  29. package/es/chunks/CreateMcpForm.BWUyeP01.js +0 -308
  30. package/es/chunks/CreateMcpForm.C8YfDSEM.js +0 -308
  31. package/es/chunks/CreateMcpForm.DSE5jyiW.js +0 -308
  32. package/es/chunks/CustomSidebar.BSGAhmVY.js +0 -585
  33. package/es/chunks/DocSyncSelect.D-WIvZZN.js +0 -2290
  34. package/es/chunks/DocSyncSelect.Kk88o9gO.js +0 -2290
  35. package/es/chunks/FileDisplay.B5laA4uX.js +0 -1649
  36. package/es/chunks/FileDisplay.BCTNdpl9.js +0 -1649
  37. package/es/chunks/FileDisplay.CBNYrdsK.js +0 -1560
  38. package/es/chunks/FilePreview.B9u8ODHp.js +0 -123
  39. package/es/chunks/FileUploader.BaikPGWb.js +0 -216
  40. package/es/chunks/FileUploader.DD-lopf-.js +0 -216
  41. package/es/chunks/McpFormDialog.4HDExbTn.js +0 -297
  42. package/es/chunks/McpFormDialog.CgnC1I7i.js +0 -297
  43. package/es/chunks/McpFormDialog.D3txmoEF.js +0 -297
  44. package/es/chunks/McpFormDialog.DNzqqhaX.js +0 -297
  45. package/es/chunks/McpParamsSet.DlWx6E5S.js +0 -501
  46. package/es/chunks/McpParamsSet.Tlo_lPn-.js +0 -501
  47. package/es/chunks/MdEditor.B9-B9aiy.js +0 -163
  48. package/es/chunks/MdEditor.CeEo0P6j.js +0 -163
  49. package/es/chunks/MdEditor.DtL0Se7T.js +0 -163
  50. package/es/chunks/ParameterTable.BCdnj1gW.js +0 -2010
  51. package/es/chunks/ParameterTable.hUsxEU6F.js +0 -2010
  52. package/es/chunks/PublishRecord.9PLs9yUj.js +0 -133
  53. package/es/chunks/PublishRecord.C0841sJ-.js +0 -133
  54. package/es/chunks/PublishRecord.DEzC7hmP.js +0 -133
  55. package/es/chunks/SourcePublish.C97G36H2.js +0 -972
  56. package/es/chunks/SourcePublish.DkyY1KEk.js +0 -972
  57. package/es/chunks/SourcePublish.Dx-ltk9U.js +0 -956
  58. package/es/chunks/SourcePublish.FiswtYfr.js +0 -972
  59. package/es/chunks/SourcePublish.nfXmrVHm.js +0 -972
  60. package/es/chunks/config.BEZNFeRN.js +0 -35
  61. package/es/chunks/config.LzgBLhTz.js +0 -270
  62. package/es/chunks/config.MfNKPMiA.js +0 -35
  63. package/es/chunks/config.TaUlPTYL.js +0 -270
  64. package/es/chunks/config.l1J_qxeB.js +0 -270
  65. package/es/chunks/i18n.CIjLjyDK.js +0 -418
  66. package/es/chunks/i18n.CxsxtRq_.js +0 -418
  67. package/es/chunks/usePreview.agdxmOk8.js +0 -126
  68. package/lib/chunks/AddOrEditSupplierDialog.D0DSQZiS.js +0 -1
  69. package/lib/chunks/CommonTagsList.DbNcVId5.js +0 -1
  70. package/lib/chunks/CreateMcpForm.Cm9eHXWg.js +0 -1
  71. package/lib/chunks/CreateMcpForm.DNijYbgd.js +0 -1
  72. package/lib/chunks/CustomSidebar.Dojb1xoS.js +0 -1
  73. package/lib/chunks/FileDisplay.B4gn0Jhp.js +0 -59
  74. package/lib/chunks/FileDisplay.B7JWIcFg.js +0 -59
  75. package/lib/chunks/FileDisplay.DjtHza32.js +0 -59
  76. package/lib/chunks/FilePreview.b1Gine59.js +0 -1
  77. package/lib/chunks/McpFormDialog.BgNPOGB-.js +0 -6
  78. package/lib/chunks/McpFormDialog.CL2bInts.js +0 -6
  79. package/lib/chunks/McpFormDialog.DbhQIwYW.js +0 -6
  80. package/lib/chunks/MdEditor.rVQbuxCg.js +0 -1
  81. package/lib/chunks/PublishRecord.B7xYlRKJ.js +0 -5
  82. package/lib/chunks/SourcePublish.BBsNlnp4.js +0 -1
  83. package/lib/chunks/SourcePublish.C9JAqJcV.js +0 -1
  84. package/lib/chunks/SourcePublish.CpeV-UOG.js +0 -1
  85. package/lib/chunks/SourcePublish.K4tntn9l.js +0 -1
  86. package/lib/chunks/SourcePublish.tNsaCp3r.js +0 -1
  87. package/lib/chunks/config.CDNV0bUm.js +0 -1
  88. package/lib/chunks/usePreview.Dmhz8azZ.js +0 -1
@@ -1,194 +0,0 @@
1
- import { t as e } from "./withinstall.dLh4K-0g.js";
2
- import { m as t } from "./i18n.CIjLjyDK.js";
3
- import { t as n } from "./_plugin-vue_export-helper.Ct3qlEzt.js";
4
- import { i as r, n as i, o as a, t as o } from "./config.BEZNFeRN.js";
5
- import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, nextTick as h, normalizeClass as g, onMounted as _, openBlock as v, ref as y, renderList as b, toDisplayString as x, unref as S, watch as C, withCtx as w } from "vue";
6
- import { ElButton as T, ElPopover as E } from "element-plus";
7
- import '../assets/AvailableRangePreview.css';//#region components/AvailableRangePreview/TagList.vue
8
- var D = {
9
- key: 0,
10
- class: "pd-l-16 text-dee0e3 pd-r-16"
11
- }, O = { class: "fz-14 text-646a73 nowrap" }, k = { class: "tag-item nowrap fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe pointer" }, A = { class: "tag-list-popover overflow-y-auto flex gap-4 flex-wrap" }, j = /* @__PURE__ */ n({
12
- __name: "TagList",
13
- props: {
14
- label: {
15
- type: String,
16
- required: !0
17
- },
18
- items: {
19
- type: Array,
20
- default: () => []
21
- },
22
- readonly: {
23
- type: Boolean,
24
- default: !1
25
- }
26
- },
27
- setup(e) {
28
- let t = e, n = c(() => t.readonly ? t.items : t.items.slice(0, o.one)), r = c(() => t.items.length > o.one), i = c(() => t.items.length - o.one), a = c(() => t.items.slice(o.one));
29
- return (t, o) => e.items.length > 0 ? (v(), d(s, { key: 0 }, [
30
- e.readonly ? u("", !0) : (v(), d("span", D, "|")),
31
- f("span", O, x(e.label), 1),
32
- f("div", { class: g(["tag-list", { "flex items-center gap-4": !e.readonly }]) }, [(v(!0), d(s, null, b(n.value, (t) => (v(), d("div", {
33
- key: t.memberId,
34
- class: g(["tag-item fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe nowrap", { "mg-r-4 mg-b-4": e.readonly }])
35
- }, x(t.memberName), 3))), 128)), !e.readonly && r.value ? (v(), l(S(E), {
36
- key: 0,
37
- placement: "top",
38
- trigger: "click",
39
- width: "300",
40
- "popper-class": "tag-list-popover-wrapper"
41
- }, {
42
- reference: w(() => [f("span", k, " +" + x(i.value), 1)]),
43
- default: w(() => [f("div", A, [(v(!0), d(s, null, b(a.value, (e) => (v(), d("span", {
44
- key: e.memberId,
45
- class: "tag-item nowrap fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe"
46
- }, x(e.memberName), 1))), 128))])]),
47
- _: 1
48
- })) : u("", !0)], 2)
49
- ], 64)) : u("", !0);
50
- }
51
- }, [["__scopeId", "data-v-a2c44011"]]), M = (e, t) => e?.filter(t) || [], N = (e, t) => M(e, (e) => e.memberType === t), P = (e, t) => {
52
- if (e.children) for (let n of e.children) n.memberType === i.MEMBER ? t(n) : n.memberType === i.DEPARTMENT && P(n, t);
53
- }, F = (e) => {
54
- let t = [];
55
- return P(e, (e) => t.push(e.memberId)), t;
56
- };
57
- function I(e, t, n = !1) {
58
- let r = c(() => {
59
- if (!e.value) return [];
60
- let n = [...e.value], r = N(n, i.DEPARTMENT);
61
- if (r.length > 0 && t.value && t.value.length > 0) {
62
- let e = /* @__PURE__ */ new Set();
63
- r.forEach((n) => {
64
- let r = (t) => {
65
- for (let a of t) if (a.memberType === i.DEPARTMENT && a.memberId === n.memberId) return P(a, (t) => e.add(t)), !0;
66
- else if (a.children && r(a.children)) return !0;
67
- return !1;
68
- };
69
- r(t.value);
70
- });
71
- let a = new Set(N(n, i.MEMBER).map((e) => e.memberId));
72
- e.forEach((e) => {
73
- a.has(e.memberId) || n.push(e);
74
- });
75
- }
76
- return n;
77
- }), a = c(() => {
78
- if (n) return N(r.value, i.MEMBER);
79
- {
80
- let e = /* @__PURE__ */ new Set();
81
- return o.value.forEach((t) => {
82
- F(t).forEach((t) => e.add(t));
83
- }), M(r.value, (t) => t.memberType === i.MEMBER && !e.has(t.memberId));
84
- }
85
- }), o = c(() => {
86
- if (n) return N(r.value, i.DEPARTMENT);
87
- {
88
- let e = [], n = (e) => {
89
- if (!e.children || e.children.length === 0) return !1;
90
- let t = F(e);
91
- return t.length === 0 ? !1 : t.every((e) => r.value.some((t) => t.memberType === i.MEMBER && t.memberId === e));
92
- }, a = (t, r = !1) => {
93
- if (t.memberType === i.DEPARTMENT) {
94
- let o = n(t);
95
- if (o && !r) {
96
- if (e.push({
97
- memberId: t.memberId,
98
- memberName: t.memberName,
99
- memberType: i.DEPARTMENT,
100
- bnid: t.bnid,
101
- children: t.children
102
- }), t.children) for (let e of t.children) a(e, !0);
103
- } else if (!o && t.children) for (let e of t.children) a(e, !1);
104
- }
105
- };
106
- for (let e of t.value) a(e, !1);
107
- return e;
108
- }
109
- });
110
- return {
111
- selectedMembers: a,
112
- selectedDepartments: o
113
- };
114
- }
115
- //#endregion
116
- //#region components/AvailableRangePreview/layout.vue
117
- var L = { class: "text-1f2329" }, R = { class: "fz-14 text-1f2329" }, z = e({
118
- __name: "layout",
119
- props: {
120
- allVisible: {
121
- type: Boolean,
122
- default: r.ALL
123
- },
124
- modelValue: {
125
- type: Array,
126
- default: () => []
127
- },
128
- treeList: {
129
- type: Array,
130
- default: () => []
131
- },
132
- readonly: {
133
- type: Boolean,
134
- default: !1
135
- }
136
- },
137
- setup(e, { expose: n }) {
138
- let { t: i } = t(), o = y(null), b = () => {
139
- o.value && h(() => {
140
- o.value.scrollIntoView({
141
- behavior: "smooth",
142
- block: "center"
143
- });
144
- });
145
- }, E = e, { selectedMembers: D, selectedDepartments: O } = I(c(() => E.modelValue), c(() => E.treeList), E.readonly), k = c(() => [...D.value, ...O.value]);
146
- return C(() => [E.allVisible, E.modelValue], () => {
147
- b();
148
- }, {
149
- immediate: !1,
150
- deep: !0
151
- }), _(() => {
152
- b();
153
- }), n({ allSelectedItems: k }), (t, n) => (v(), d("div", {
154
- ref_key: "previewRef",
155
- ref: o,
156
- class: g(["available-range-preview w-full overflow-hidden", { "flex items-center": !e.readonly }])
157
- }, [e.readonly ? u("", !0) : (v(), d(s, { key: 0 }, [
158
- f("div", L, x(S(i)("COMMON_DICT.ENUMS.AVAILABLE_RANGE")) + ": ", 1),
159
- f("span", R, x(S(a).find((t) => t.value === e.allVisible)?.label), 1),
160
- m(S(T), {
161
- class: "mg-l-16",
162
- type: "primary",
163
- link: "",
164
- onClick: n[0] ||= (e) => t.$emit("edit")
165
- }, {
166
- default: w(() => [p(x(S(i)("COMMON_BUTTON.EDIT_TEXT")), 1)]),
167
- _: 1
168
- })
169
- ], 64)), e.allVisible === S(r).PARTIAL ? (v(), d("div", {
170
- key: 1,
171
- class: g(["flex-1 overflow-hidden", { "flex items-center": !e.readonly }])
172
- }, [S(D)?.length ? (v(), l(j, {
173
- key: 0,
174
- label: S(i)("COMMON_DICT.ENUMS.MEMBER") + ":",
175
- items: S(D),
176
- readonly: e.readonly
177
- }, null, 8, [
178
- "label",
179
- "items",
180
- "readonly"
181
- ])) : u("", !0), S(O)?.length ? (v(), l(j, {
182
- key: 1,
183
- label: S(i)("COMMON_DICT.ENUMS.DEPARTMENT") + ":",
184
- items: S(O),
185
- readonly: e.readonly
186
- }, null, 8, [
187
- "label",
188
- "items",
189
- "readonly"
190
- ])) : u("", !0)], 2)) : u("", !0)], 2));
191
- }
192
- }), B = e(j);
193
- //#endregion
194
- export { B as n, I as r, z as t };
@@ -1,229 +0,0 @@
1
- import { t as e } from "./withinstall.dLh4K-0g.js";
2
- import { m as t } from "./i18n.CxsxtRq_.js";
3
- import { t as n } from "./request.CfOHcfgX.js";
4
- import { n as r, t as i } from "./DialogContainer.DL7aTMDS.js";
5
- import { a, i as o, o as s } from "./config.MfNKPMiA.js";
6
- import { r as c, t as l } from "./AvailableRangePreview.Bz9QkkAM.js";
7
- import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, nextTick as v, onMounted as y, openBlock as b, ref as x, renderList as S, toDisplayString as C, unref as w, watch as T, withCtx as E } from "vue";
8
- import { ElButton as D, ElMessage as O, ElRadio as k, ElRadioGroup as A } from "element-plus";
9
- import { TreeShowSelect as j } from "color-star-custom-components";
10
- import { emitsMap as M } from "color-star-custom-methods";
11
- //#region components/AvailableRangeSetting/Dialog.vue
12
- var N = { class: "dialog-content" }, P = {
13
- key: 0,
14
- class: "selection-area overflow-hidden"
15
- }, F = { class: "dialog-footer" }, I = {
16
- __name: "Dialog",
17
- props: {
18
- visible: {
19
- type: Boolean,
20
- default: !1
21
- },
22
- allVisible: {
23
- type: Boolean,
24
- default: o.ALL
25
- },
26
- modelValue: {
27
- type: Array,
28
- default: () => []
29
- },
30
- treeList: {
31
- type: Array,
32
- default: () => []
33
- }
34
- },
35
- emits: [
36
- M.updateVisible,
37
- M.save,
38
- M.cancel
39
- ],
40
- setup(e, { emit: n }) {
41
- let { t: l } = t(), y = e, I = n, { showDialog: L, dialogRef: R } = r(), z = x(y.allVisible), B = x([...y.modelValue]), V = x(), { selectedMembers: H, selectedDepartments: U } = c(B, d(() => y.treeList), !1);
42
- T(() => y.visible, (e) => {
43
- e && v(() => {
44
- L();
45
- });
46
- }, { immediate: !0 });
47
- let W = d(() => {
48
- let e = [];
49
- return U.value.forEach((t) => {
50
- e.push({
51
- ...t,
52
- children: void 0
53
- });
54
- }), H.value.forEach((t) => {
55
- e.push({
56
- ...t,
57
- children: void 0
58
- });
59
- }), e;
60
- }), G = (e) => {
61
- z.value = e, e === o.ALL && (B.value = []);
62
- }, K = (e) => {
63
- let { selectedNode: t } = e;
64
- B.value = t || [];
65
- }, q = () => {
66
- I(M.cancel), I(M.updateVisible, !1);
67
- }, J = () => {
68
- if (z.value === o.PARTIAL && !B.value.length) {
69
- O.warning(l("COMMON_DICT.ENUMS.AVAILABLE_RANGE_EMPTY_TIP"));
70
- return;
71
- }
72
- I(M.save, {
73
- type: z.value,
74
- selectedItems: [...B.value]
75
- }), I(M.updateVisible, !1);
76
- };
77
- return (t, n) => (b(), f(w(i), {
78
- ref_key: "dialogRef",
79
- ref: R,
80
- title: w(l)("COMMON_DICT.ENUMS.AVAILABLE_RANGE_SETTING"),
81
- onClose: q
82
- }, {
83
- footer: E(() => [h("div", F, [_(w(D), {
84
- onClick: q,
85
- plain: ""
86
- }, {
87
- default: E(() => [g(C(w(l)("COMMON_BUTTON.CANCEL_TEXT")), 1)]),
88
- _: 1
89
- }), _(w(D), {
90
- type: "primary",
91
- onClick: J
92
- }, {
93
- default: E(() => [g(C(w(l)("COMMON_BUTTON.SAVE_TEXT")), 1)]),
94
- _: 1
95
- })])]),
96
- default: E(() => [h("div", N, [_(w(A), {
97
- class: "pd-b-16",
98
- modelValue: z.value,
99
- "onUpdate:modelValue": n[0] ||= (e) => z.value = e,
100
- onChange: G
101
- }, {
102
- default: E(() => [(b(!0), m(u, null, S(w(s), (e) => (b(), f(w(k), {
103
- key: e.value,
104
- value: e.value
105
- }, {
106
- default: E(() => [g(C(e.label), 1)]),
107
- _: 2
108
- }, 1032, ["value"]))), 128))]),
109
- _: 1
110
- }, 8, ["modelValue"]), z.value === w(o).PARTIAL ? (b(), m("div", P, [_(w(j), {
111
- modelValue: B.value,
112
- "onUpdate:modelValue": n[1] ||= (e) => B.value = e,
113
- ref_key: "treeRef",
114
- ref: V,
115
- treeProps: w(a),
116
- treeList: e.treeList,
117
- hasFilter: !0,
118
- rightTreeList: W.value,
119
- itemUnitName: w(l)("COMMON_DICT.ENUMS.ITEM_UNIT_NAME"),
120
- style: { height: "500px" },
121
- onGetCheckedNode: K
122
- }, null, 8, [
123
- "modelValue",
124
- "treeProps",
125
- "treeList",
126
- "rightTreeList",
127
- "itemUnitName"
128
- ])])) : p("", !0)])]),
129
- _: 1
130
- }, 8, ["title"]));
131
- }
132
- }, L = () => {
133
- let { $request: e, $env: t } = n();
134
- return { availableRangeApi: () => e({
135
- url: `${t.VITE_APP_AUTH_BASE_URL}/api/v1/admin/member/search`,
136
- method: "get"
137
- }) };
138
- }, R = { class: "available-range-setting w-full" }, z = e(/* @__PURE__ */ Object.assign({ name: "AvailableRangeSetting" }, {
139
- __name: "layout",
140
- props: {
141
- allVisible: {
142
- type: Boolean,
143
- default: o.ALL
144
- },
145
- modelValue: {
146
- type: Array,
147
- default: () => []
148
- }
149
- },
150
- emits: [
151
- M.updateAllVisible,
152
- M.updateModelValue,
153
- M.change
154
- ],
155
- setup(e, { expose: t, emit: n }) {
156
- let r = e, { availableRangeApi: i } = L(), a = n, o = x(!1), s = x(!1), c = x([]), u = x(r.allVisible), d = x(r.modelValue), h = x(new Set(d.value?.map((e) => e.memberId))), g = () => {
157
- s.value = !0, i().then((e) => {
158
- c.value = e?.data?.orgOptionSoList || [];
159
- }).finally(() => {
160
- s.value = !1;
161
- });
162
- }, v = () => {
163
- o.value = !0;
164
- }, S = (e) => {
165
- u.value = e.type, d.value = e.selectedItems, h.value.clear(), d.value.forEach((e) => {
166
- h.value.add(e.memberId);
167
- }), a(M.updateAllVisible, u.value), a(M.updateModelValue, d.value), E();
168
- }, C = () => {
169
- o.value = !1;
170
- }, E = () => {
171
- let e = {
172
- allVisible: u.value,
173
- selectedItems: d.value
174
- };
175
- a(M.change, e);
176
- }, D = x(null);
177
- return T(() => r.allVisible, (e) => {
178
- u.value = e;
179
- }, { immediate: !0 }), T(() => r.modelValue, (e) => {
180
- d.value = e || [], h.value.clear(), d.value.forEach((e) => {
181
- h.value.add(e.memberId);
182
- });
183
- }, { immediate: !0 }), y(() => {
184
- g();
185
- }), t({ getSelectedItems: () => {
186
- let e = D.value?.allSelectedItems || [];
187
- return {
188
- allVisible: u.value,
189
- visibleScope: e.map((e) => ({
190
- memberId: e.memberId,
191
- memberName: e.memberName,
192
- memberType: e.memberType,
193
- bnid: e.bnid
194
- }))
195
- };
196
- } }), (e, t) => (b(), m("div", R, [_(w(l), {
197
- allVisible: u.value,
198
- "model-value": d.value,
199
- "tree-list": c.value,
200
- onEdit: v,
201
- ref_key: "previewRef",
202
- ref: D
203
- }, null, 8, [
204
- "allVisible",
205
- "model-value",
206
- "tree-list"
207
- ]), o.value ? (b(), f(I, {
208
- key: 0,
209
- visible: o.value,
210
- "onUpdate:visible": t[0] ||= (e) => o.value = e,
211
- allVisible: u.value,
212
- "onUpdate:allVisible": t[1] ||= (e) => u.value = e,
213
- modelValue: d.value,
214
- "onUpdate:modelValue": t[2] ||= (e) => d.value = e,
215
- "tree-list": c.value,
216
- loading: s.value,
217
- onSave: S,
218
- onCancel: C
219
- }, null, 8, [
220
- "visible",
221
- "allVisible",
222
- "modelValue",
223
- "tree-list",
224
- "loading"
225
- ])) : p("", !0)]));
226
- }
227
- }));
228
- //#endregion
229
- export { z as t };
@@ -1,229 +0,0 @@
1
- import { t as e } from "./withinstall.dLh4K-0g.js";
2
- import { m as t } from "./i18n.CIjLjyDK.js";
3
- import { t as n } from "./request.CfOHcfgX.js";
4
- import { n as r, t as i } from "./DialogContainer.DL7aTMDS.js";
5
- import { a, i as o, o as s } from "./config.BEZNFeRN.js";
6
- import { r as c, t as l } from "./AvailableRangePreview.WFzbRasx.js";
7
- import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, nextTick as v, onMounted as y, openBlock as b, ref as x, renderList as S, toDisplayString as C, unref as w, watch as T, withCtx as E } from "vue";
8
- import { ElButton as D, ElMessage as O, ElRadio as k, ElRadioGroup as A } from "element-plus";
9
- import { TreeShowSelect as j } from "color-star-custom-components";
10
- import { emitsMap as M } from "color-star-custom-methods";
11
- //#region components/AvailableRangeSetting/Dialog.vue
12
- var N = { class: "dialog-content" }, P = {
13
- key: 0,
14
- class: "selection-area overflow-hidden"
15
- }, F = { class: "dialog-footer" }, I = {
16
- __name: "Dialog",
17
- props: {
18
- visible: {
19
- type: Boolean,
20
- default: !1
21
- },
22
- allVisible: {
23
- type: Boolean,
24
- default: o.ALL
25
- },
26
- modelValue: {
27
- type: Array,
28
- default: () => []
29
- },
30
- treeList: {
31
- type: Array,
32
- default: () => []
33
- }
34
- },
35
- emits: [
36
- M.updateVisible,
37
- M.save,
38
- M.cancel
39
- ],
40
- setup(e, { emit: n }) {
41
- let { t: l } = t(), y = e, I = n, { showDialog: L, dialogRef: R } = r(), z = x(y.allVisible), B = x([...y.modelValue]), V = x(), { selectedMembers: H, selectedDepartments: U } = c(B, d(() => y.treeList), !1);
42
- T(() => y.visible, (e) => {
43
- e && v(() => {
44
- L();
45
- });
46
- }, { immediate: !0 });
47
- let W = d(() => {
48
- let e = [];
49
- return U.value.forEach((t) => {
50
- e.push({
51
- ...t,
52
- children: void 0
53
- });
54
- }), H.value.forEach((t) => {
55
- e.push({
56
- ...t,
57
- children: void 0
58
- });
59
- }), e;
60
- }), G = (e) => {
61
- z.value = e, e === o.ALL && (B.value = []);
62
- }, K = (e) => {
63
- let { selectedNode: t } = e;
64
- B.value = t || [];
65
- }, q = () => {
66
- I(M.cancel), I(M.updateVisible, !1);
67
- }, J = () => {
68
- if (z.value === o.PARTIAL && !B.value.length) {
69
- O.warning(l("COMMON_DICT.ENUMS.AVAILABLE_RANGE_EMPTY_TIP"));
70
- return;
71
- }
72
- I(M.save, {
73
- type: z.value,
74
- selectedItems: [...B.value]
75
- }), I(M.updateVisible, !1);
76
- };
77
- return (t, n) => (b(), f(w(i), {
78
- ref_key: "dialogRef",
79
- ref: R,
80
- title: w(l)("COMMON_DICT.ENUMS.AVAILABLE_RANGE_SETTING"),
81
- onClose: q
82
- }, {
83
- footer: E(() => [h("div", F, [_(w(D), {
84
- onClick: q,
85
- plain: ""
86
- }, {
87
- default: E(() => [g(C(w(l)("COMMON_BUTTON.CANCEL_TEXT")), 1)]),
88
- _: 1
89
- }), _(w(D), {
90
- type: "primary",
91
- onClick: J
92
- }, {
93
- default: E(() => [g(C(w(l)("COMMON_BUTTON.SAVE_TEXT")), 1)]),
94
- _: 1
95
- })])]),
96
- default: E(() => [h("div", N, [_(w(A), {
97
- class: "pd-b-16",
98
- modelValue: z.value,
99
- "onUpdate:modelValue": n[0] ||= (e) => z.value = e,
100
- onChange: G
101
- }, {
102
- default: E(() => [(b(!0), m(u, null, S(w(s), (e) => (b(), f(w(k), {
103
- key: e.value,
104
- value: e.value
105
- }, {
106
- default: E(() => [g(C(e.label), 1)]),
107
- _: 2
108
- }, 1032, ["value"]))), 128))]),
109
- _: 1
110
- }, 8, ["modelValue"]), z.value === w(o).PARTIAL ? (b(), m("div", P, [_(w(j), {
111
- modelValue: B.value,
112
- "onUpdate:modelValue": n[1] ||= (e) => B.value = e,
113
- ref_key: "treeRef",
114
- ref: V,
115
- treeProps: w(a),
116
- treeList: e.treeList,
117
- hasFilter: !0,
118
- rightTreeList: W.value,
119
- itemUnitName: w(l)("COMMON_DICT.ENUMS.ITEM_UNIT_NAME"),
120
- style: { height: "500px" },
121
- onGetCheckedNode: K
122
- }, null, 8, [
123
- "modelValue",
124
- "treeProps",
125
- "treeList",
126
- "rightTreeList",
127
- "itemUnitName"
128
- ])])) : p("", !0)])]),
129
- _: 1
130
- }, 8, ["title"]));
131
- }
132
- }, L = () => {
133
- let { $request: e, $env: t } = n();
134
- return { availableRangeApi: () => e({
135
- url: `${t.VITE_APP_AUTH_BASE_URL}/api/v1/admin/member/search`,
136
- method: "get"
137
- }) };
138
- }, R = { class: "available-range-setting w-full" }, z = e(/* @__PURE__ */ Object.assign({ name: "AvailableRangeSetting" }, {
139
- __name: "layout",
140
- props: {
141
- allVisible: {
142
- type: Boolean,
143
- default: o.ALL
144
- },
145
- modelValue: {
146
- type: Array,
147
- default: () => []
148
- }
149
- },
150
- emits: [
151
- M.updateAllVisible,
152
- M.updateModelValue,
153
- M.change
154
- ],
155
- setup(e, { expose: t, emit: n }) {
156
- let r = e, { availableRangeApi: i } = L(), a = n, o = x(!1), s = x(!1), c = x([]), u = x(r.allVisible), d = x(r.modelValue), h = x(new Set(d.value?.map((e) => e.memberId))), g = () => {
157
- s.value = !0, i().then((e) => {
158
- c.value = e?.data?.orgOptionSoList || [];
159
- }).finally(() => {
160
- s.value = !1;
161
- });
162
- }, v = () => {
163
- o.value = !0;
164
- }, S = (e) => {
165
- u.value = e.type, d.value = e.selectedItems, h.value.clear(), d.value.forEach((e) => {
166
- h.value.add(e.memberId);
167
- }), a(M.updateAllVisible, u.value), a(M.updateModelValue, d.value), E();
168
- }, C = () => {
169
- o.value = !1;
170
- }, E = () => {
171
- let e = {
172
- allVisible: u.value,
173
- selectedItems: d.value
174
- };
175
- a(M.change, e);
176
- }, D = x(null);
177
- return T(() => r.allVisible, (e) => {
178
- u.value = e;
179
- }, { immediate: !0 }), T(() => r.modelValue, (e) => {
180
- d.value = e || [], h.value.clear(), d.value.forEach((e) => {
181
- h.value.add(e.memberId);
182
- });
183
- }, { immediate: !0 }), y(() => {
184
- g();
185
- }), t({ getSelectedItems: () => {
186
- let e = D.value?.allSelectedItems || [];
187
- return {
188
- allVisible: u.value,
189
- visibleScope: e.map((e) => ({
190
- memberId: e.memberId,
191
- memberName: e.memberName,
192
- memberType: e.memberType,
193
- bnid: e.bnid
194
- }))
195
- };
196
- } }), (e, t) => (b(), m("div", R, [_(w(l), {
197
- allVisible: u.value,
198
- "model-value": d.value,
199
- "tree-list": c.value,
200
- onEdit: v,
201
- ref_key: "previewRef",
202
- ref: D
203
- }, null, 8, [
204
- "allVisible",
205
- "model-value",
206
- "tree-list"
207
- ]), o.value ? (b(), f(I, {
208
- key: 0,
209
- visible: o.value,
210
- "onUpdate:visible": t[0] ||= (e) => o.value = e,
211
- allVisible: u.value,
212
- "onUpdate:allVisible": t[1] ||= (e) => u.value = e,
213
- modelValue: d.value,
214
- "onUpdate:modelValue": t[2] ||= (e) => d.value = e,
215
- "tree-list": c.value,
216
- loading: s.value,
217
- onSave: S,
218
- onCancel: C
219
- }, null, 8, [
220
- "visible",
221
- "allVisible",
222
- "modelValue",
223
- "tree-list",
224
- "loading"
225
- ])) : p("", !0)]));
226
- }
227
- }));
228
- //#endregion
229
- export { z as t };