china-mobile-international-custom-components 0.0.28 → 0.0.30
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.
- package/es/ApplicationIcon.mjs +30 -28
- package/es/PageContainer.mjs +178 -149
- package/es/assets/PageContainer.css +1 -1
- package/es/index.mjs +2 -2
- package/lib/ApplicationIcon.js +1 -1
- package/lib/PageContainer.js +1 -1
- package/lib/assets/PageContainer.css +1 -1
- package/lib/index.js +2 -2
- package/package.json +4 -4
- package/es/assets/AvailableRangePreview.css +0 -1
- package/es/assets/AvailableRangeSetting.css +0 -1
- package/es/assets/CustomSidebar.css +0 -1
- package/es/chunks/AvailableRangePreview.D4mZe1lQ.js +0 -217
- package/es/chunks/AvailableRangeSetting.BkSLnQ6N.js +0 -215
- package/es/chunks/CustomSidebar.BWGoPtLi.js +0 -506
- package/es/chunks/CustomTitle.BLZ7evms.js +0 -5
- package/es/chunks/CustomToggle.CP3M2_f3.js +0 -165
- package/es/chunks/PageContainer.D-G32lvP.js +0 -329
- package/es/chunks/_plugin-vue_export-helper.CVVE_0_F.js +0 -13
- package/es/chunks/_plugin-vue_export-helper.Cf-_TWPK.js +0 -6
- package/es/chunks/index.39AUVSwV.js +0 -288
- package/es/chunks/index.AHEDCg43.js +0 -160
- package/es/chunks/index.B67AnSJI.js +0 -154
- package/es/chunks/index.B9F4VYQK.js +0 -118
- package/es/chunks/index.BPxF6Amx.js +0 -157
- package/es/chunks/index.C2gKjqoA.js +0 -209
- package/es/chunks/index.DTtNnKDH.js +0 -288
- package/es/chunks/index.DtBeJlu6.js +0 -142
- package/es/chunks/index.kR57MtNP.js +0 -211
- package/es/chunks/index.wQj5YKPy.js +0 -288
- package/es/chunks/layout.BE8_kCeR.js +0 -619
- package/es/chunks/layout.BNqqXOrs.js +0 -639
- package/es/chunks/layout.C6AMos7n.js +0 -17
- package/es/chunks/layout.CWFXohJu.js +0 -622
- package/es/chunks/layout.ClkgLsEw.js +0 -640
- package/es/chunks/layout.R5FQNRjS.js +0 -619
- package/es/chunks/layout.nKB_kc-U.js +0 -26
- package/es/chunks/utils.BhlZXNZ6.js +0 -19
- package/lib/assets/AvailableRangePreview.css +0 -1
- package/lib/assets/AvailableRangeSetting.css +0 -1
- package/lib/assets/CustomSidebar.css +0 -1
- package/lib/chunks/AvailableRangePreview.CkgZsXP0.js +0 -1
- package/lib/chunks/AvailableRangeSetting.CF-jHm4x.js +0 -1
- package/lib/chunks/CustomSidebar.CMYJFb2P.js +0 -1
- package/lib/chunks/CustomTitle.BkFZ-ZIq.js +0 -1
- package/lib/chunks/CustomToggle.C0PpzKPP.js +0 -1
- package/lib/chunks/PageContainer.GH56wASV.js +0 -1
- package/lib/chunks/_plugin-vue_export-helper.C55-DZV2.js +0 -1
- package/lib/chunks/_plugin-vue_export-helper.DAGvX2Jf.js +0 -1
- package/lib/chunks/index.BfHfKST0.js +0 -1
- package/lib/chunks/index.BlXappa4.js +0 -1
- package/lib/chunks/index.CCxHaoi4.js +0 -1
- package/lib/chunks/index.CSYGhK9M.js +0 -1
- package/lib/chunks/index.C_IlZrzE.js +0 -1
- package/lib/chunks/index.DUGtabLJ.js +0 -1
- package/lib/chunks/index.Dakz8S3g.js +0 -1
- package/lib/chunks/index.DsmgWFv8.js +0 -1
- package/lib/chunks/index.DydPD8Lc.js +0 -1
- package/lib/chunks/index.k_hSuA6i.js +0 -1
- package/lib/chunks/layout.BEW4Cgni.js +0 -1
- package/lib/chunks/layout.BJjU9nKW.js +0 -1
- package/lib/chunks/layout.BQigNrr5.js +0 -1
- package/lib/chunks/layout.ClFtiz-t.js +0 -1
- package/lib/chunks/layout.CmDwUHZo.js +0 -1
- package/lib/chunks/layout.CqbDoD_v.js +0 -1
- package/lib/chunks/layout.CwJgDGuR.js +0 -1
- package/lib/chunks/layout.D0zeFdw9.js +0 -1
- package/lib/chunks/utils.BT5Uuz2Q.js +0 -1
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import { t as withInstall } from "./utils.BhlZXNZ6.js";
|
|
2
|
-
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.Cf-_TWPK.js";
|
|
3
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, nextTick, normalizeClass, onMounted, openBlock, ref, renderList, toDisplayString, unref, watch, withCtx } from "vue";
|
|
4
|
-
import { ElButton, ElPopover } from "element-plus";
|
|
5
|
-
import '../assets/AvailableRangePreview.css';const RANGE_TYPES = {
|
|
6
|
-
ALL: !0,
|
|
7
|
-
PARTIAL: !1
|
|
8
|
-
}, rangeOptions = [{
|
|
9
|
-
value: RANGE_TYPES.ALL,
|
|
10
|
-
label: "全部成员"
|
|
11
|
-
}, {
|
|
12
|
-
value: RANGE_TYPES.PARTIAL,
|
|
13
|
-
label: "部分成员"
|
|
14
|
-
}], MEMBER_DEPARTMENT_TYPES = {
|
|
15
|
-
MEMBER: 1,
|
|
16
|
-
DEPARTMENT: 2
|
|
17
|
-
}, TREE_PROPS = {
|
|
18
|
-
label: "memberName",
|
|
19
|
-
children: "children",
|
|
20
|
-
value: "memberId"
|
|
21
|
-
}, DEFAULT_SHOW_COUNT = {
|
|
22
|
-
three: 3,
|
|
23
|
-
one: 1
|
|
24
|
-
};
|
|
25
|
-
var _hoisted_1$1 = {
|
|
26
|
-
key: 0,
|
|
27
|
-
class: "pd-l-16 text-dee0e3 pd-r-16"
|
|
28
|
-
}, _hoisted_2 = { class: "fz-14 text-646a73 nowrap" }, _hoisted_3 = { class: "tag-item nowrap fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe pointer" }, _hoisted_4 = { class: "tag-list-popover overflow-y-auto flex gap-4 flex-wrap" }, TagList_default = /* @__PURE__ */ _plugin_vue_export_helper_default({
|
|
29
|
-
__name: "TagList",
|
|
30
|
-
props: {
|
|
31
|
-
label: {
|
|
32
|
-
type: String,
|
|
33
|
-
required: !0
|
|
34
|
-
},
|
|
35
|
-
items: {
|
|
36
|
-
type: Array,
|
|
37
|
-
default: () => []
|
|
38
|
-
},
|
|
39
|
-
defaultShowCount: {
|
|
40
|
-
type: Number,
|
|
41
|
-
default: DEFAULT_SHOW_COUNT.one
|
|
42
|
-
},
|
|
43
|
-
readonly: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: !1
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
setup(i) {
|
|
49
|
-
let w = i, A = computed(() => w.readonly ? w.items : w.items.slice(0, w.defaultShowCount)), j = computed(() => w.items.length > w.defaultShowCount), M = computed(() => w.items.length - w.defaultShowCount), N = computed(() => w.items.slice(w.defaultShowCount));
|
|
50
|
-
return (w, E) => i.items.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
51
|
-
i.readonly ? createCommentVNode("", !0) : (openBlock(), createElementBlock("span", _hoisted_1$1, "|")),
|
|
52
|
-
createElementVNode("span", _hoisted_2, toDisplayString(i.label), 1),
|
|
53
|
-
createElementVNode("div", { class: normalizeClass(["tag-list", { "flex items-center gap-4": !i.readonly }]) }, [(openBlock(!0), createElementBlock(Fragment, null, renderList(A.value, (w) => (openBlock(), createElementBlock("div", {
|
|
54
|
-
key: w.memberId,
|
|
55
|
-
class: normalizeClass(["tag-item fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe", { "mg-r-4 mg-b-4": i.readonly }])
|
|
56
|
-
}, toDisplayString(w.memberName), 3))), 128)), !i.readonly && j.value ? (openBlock(), createBlock(unref(ElPopover), {
|
|
57
|
-
key: 0,
|
|
58
|
-
placement: "top",
|
|
59
|
-
trigger: "click",
|
|
60
|
-
width: "300"
|
|
61
|
-
}, {
|
|
62
|
-
reference: withCtx(() => [createElementVNode("span", _hoisted_3, " +" + toDisplayString(M.value), 1)]),
|
|
63
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_4, [(openBlock(!0), createElementBlock(Fragment, null, renderList(N.value, (i) => (openBlock(), createElementBlock("span", {
|
|
64
|
-
key: i.memberId,
|
|
65
|
-
class: "tag-item nowrap fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe"
|
|
66
|
-
}, toDisplayString(i.memberName), 1))), 128))])]),
|
|
67
|
-
_: 1
|
|
68
|
-
})) : createCommentVNode("", !0)], 2)
|
|
69
|
-
], 64)) : createCommentVNode("", !0);
|
|
70
|
-
}
|
|
71
|
-
}, [["__scopeId", "data-v-bf564085"]]), safeFilter = (i, w) => i?.filter(w) || [], filterByType = (i, w) => safeFilter(i, (i) => i.memberType === w), collectDepartmentMembers = (i, w) => {
|
|
72
|
-
if (i.children) for (let T of i.children) T.memberType === MEMBER_DEPARTMENT_TYPES.MEMBER ? w(T) : T.memberType === MEMBER_DEPARTMENT_TYPES.DEPARTMENT && collectDepartmentMembers(T, w);
|
|
73
|
-
}, collectDepartmentMemberIds = (i) => {
|
|
74
|
-
let w = [];
|
|
75
|
-
return collectDepartmentMembers(i, (i) => w.push(i.memberId)), w;
|
|
76
|
-
};
|
|
77
|
-
function useSelectionDisplay(i, w, T = !1) {
|
|
78
|
-
let D = computed(() => {
|
|
79
|
-
if (!i.value) return [];
|
|
80
|
-
let T = [...i.value], E = filterByType(T, MEMBER_DEPARTMENT_TYPES.DEPARTMENT);
|
|
81
|
-
if (E.length > 0 && w.value && w.value.length > 0) {
|
|
82
|
-
let i = /* @__PURE__ */ new Set();
|
|
83
|
-
E.forEach((T) => {
|
|
84
|
-
let E = (w) => {
|
|
85
|
-
for (let D of w) if (D.memberType === MEMBER_DEPARTMENT_TYPES.DEPARTMENT && D.memberId === T.memberId) return collectDepartmentMembers(D, (w) => i.add(w)), !0;
|
|
86
|
-
else if (D.children && E(D.children)) return !0;
|
|
87
|
-
return !1;
|
|
88
|
-
};
|
|
89
|
-
E(w.value);
|
|
90
|
-
});
|
|
91
|
-
let D = new Set(filterByType(T, MEMBER_DEPARTMENT_TYPES.MEMBER).map((i) => i.memberId));
|
|
92
|
-
i.forEach((i) => {
|
|
93
|
-
D.has(i.memberId) || T.push(i);
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
return T;
|
|
97
|
-
}), O = computed(() => {
|
|
98
|
-
if (T) return filterByType(D.value, MEMBER_DEPARTMENT_TYPES.MEMBER);
|
|
99
|
-
{
|
|
100
|
-
let i = /* @__PURE__ */ new Set();
|
|
101
|
-
return k.value.forEach((w) => {
|
|
102
|
-
collectDepartmentMemberIds(w).forEach((w) => i.add(w));
|
|
103
|
-
}), safeFilter(D.value, (w) => w.memberType === MEMBER_DEPARTMENT_TYPES.MEMBER && !i.has(w.memberId));
|
|
104
|
-
}
|
|
105
|
-
}), k = computed(() => {
|
|
106
|
-
if (T) return filterByType(D.value, MEMBER_DEPARTMENT_TYPES.DEPARTMENT);
|
|
107
|
-
{
|
|
108
|
-
let i = [], T = (i) => {
|
|
109
|
-
if (!i.children || i.children.length === 0) return !1;
|
|
110
|
-
let w = collectDepartmentMemberIds(i);
|
|
111
|
-
return w.length === 0 ? !1 : w.every((i) => D.value.some((w) => w.memberType === MEMBER_DEPARTMENT_TYPES.MEMBER && w.memberId === i));
|
|
112
|
-
}, E = (w, D = !1) => {
|
|
113
|
-
if (w.memberType === MEMBER_DEPARTMENT_TYPES.DEPARTMENT) {
|
|
114
|
-
let O = T(w);
|
|
115
|
-
if (O && !D) {
|
|
116
|
-
if (i.push({
|
|
117
|
-
memberId: w.memberId,
|
|
118
|
-
memberName: w.memberName,
|
|
119
|
-
memberType: MEMBER_DEPARTMENT_TYPES.DEPARTMENT,
|
|
120
|
-
children: w.children
|
|
121
|
-
}), w.children) for (let i of w.children) E(i, !0);
|
|
122
|
-
} else if (!O && w.children) for (let i of w.children) E(i, !1);
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
for (let i of w.value) E(i, !1);
|
|
126
|
-
return i;
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
return {
|
|
130
|
-
selectedMembers: O,
|
|
131
|
-
selectedDepartments: k
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
var _hoisted_1 = { class: "fz-14 text-1f2329" };
|
|
135
|
-
const AvailableRangePreview = withInstall({
|
|
136
|
-
__name: "layout",
|
|
137
|
-
props: {
|
|
138
|
-
allVisible: {
|
|
139
|
-
type: Boolean,
|
|
140
|
-
default: RANGE_TYPES.ALL
|
|
141
|
-
},
|
|
142
|
-
modelValue: {
|
|
143
|
-
type: Array,
|
|
144
|
-
default: () => []
|
|
145
|
-
},
|
|
146
|
-
treeList: {
|
|
147
|
-
type: Array,
|
|
148
|
-
default: () => []
|
|
149
|
-
},
|
|
150
|
-
readonly: {
|
|
151
|
-
type: Boolean,
|
|
152
|
-
default: !1
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
setup(i, { expose: w }) {
|
|
156
|
-
let P = ref(null), F = () => {
|
|
157
|
-
P.value && nextTick(() => {
|
|
158
|
-
P.value.scrollIntoView({
|
|
159
|
-
behavior: "smooth",
|
|
160
|
-
block: "center"
|
|
161
|
-
});
|
|
162
|
-
});
|
|
163
|
-
}, I = i, { selectedMembers: L, selectedDepartments: R } = useSelectionDisplay(computed(() => I.modelValue), computed(() => I.treeList), I.readonly), z = computed(() => {
|
|
164
|
-
let i = L.value.length > 0, w = R.value.length > 0;
|
|
165
|
-
return i && !w || !i && w ? DEFAULT_SHOW_COUNT.three : DEFAULT_SHOW_COUNT.one;
|
|
166
|
-
}), B = computed(() => [...L.value, ...R.value]);
|
|
167
|
-
return watch(() => [I.allVisible, I.modelValue], () => {
|
|
168
|
-
F();
|
|
169
|
-
}, {
|
|
170
|
-
immediate: !1,
|
|
171
|
-
deep: !0
|
|
172
|
-
}), onMounted(() => {
|
|
173
|
-
F();
|
|
174
|
-
}), w({ allSelectedItems: B }), (w, E) => (openBlock(), createElementBlock("div", {
|
|
175
|
-
ref_key: "previewRef",
|
|
176
|
-
ref: P,
|
|
177
|
-
class: normalizeClass(["available-range-preview w-full overflow-hidden", { "flex items-center": !i.readonly }])
|
|
178
|
-
}, [i.readonly ? createCommentVNode("", !0) : (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
179
|
-
E[2] ||= createElementVNode("div", { class: "text-1f2329" }, "可用范围:", -1),
|
|
180
|
-
createElementVNode("span", _hoisted_1, toDisplayString(unref(rangeOptions).find((w) => w.value === i.allVisible)?.label), 1),
|
|
181
|
-
createVNode(unref(ElButton), {
|
|
182
|
-
class: "mg-l-16",
|
|
183
|
-
type: "primary",
|
|
184
|
-
link: "",
|
|
185
|
-
onClick: E[0] ||= (i) => w.$emit("edit")
|
|
186
|
-
}, {
|
|
187
|
-
default: withCtx(() => [...E[1] ||= [createTextVNode(" 编辑 ", -1)]]),
|
|
188
|
-
_: 1
|
|
189
|
-
})
|
|
190
|
-
], 64)), i.allVisible === unref(RANGE_TYPES).PARTIAL ? (openBlock(), createElementBlock("div", {
|
|
191
|
-
key: 1,
|
|
192
|
-
class: normalizeClass(["flex-1 overflow-hidden", { "flex items-center": !i.readonly }])
|
|
193
|
-
}, [unref(L)?.length ? (openBlock(), createBlock(TagList_default, {
|
|
194
|
-
key: 0,
|
|
195
|
-
label: "成员:",
|
|
196
|
-
items: unref(L),
|
|
197
|
-
"default-show-count": z.value,
|
|
198
|
-
readonly: i.readonly
|
|
199
|
-
}, null, 8, [
|
|
200
|
-
"items",
|
|
201
|
-
"default-show-count",
|
|
202
|
-
"readonly"
|
|
203
|
-
])) : createCommentVNode("", !0), unref(R)?.length ? (openBlock(), createBlock(TagList_default, {
|
|
204
|
-
key: 1,
|
|
205
|
-
label: "部门:",
|
|
206
|
-
items: unref(R),
|
|
207
|
-
"default-show-count": z.value,
|
|
208
|
-
readonly: i.readonly
|
|
209
|
-
}, null, 8, [
|
|
210
|
-
"items",
|
|
211
|
-
"default-show-count",
|
|
212
|
-
"readonly"
|
|
213
|
-
])) : createCommentVNode("", !0)], 2)) : createCommentVNode("", !0)], 2));
|
|
214
|
-
}
|
|
215
|
-
}), TagList = withInstall(TagList_default);
|
|
216
|
-
var AvailableRangePreview_default = AvailableRangePreview;
|
|
217
|
-
export { RANGE_TYPES as a, useSelectionDisplay as i, AvailableRangePreview_default as n, TREE_PROPS as o, TagList as r, rangeOptions as s, AvailableRangePreview as t };
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { t as withInstall } from "./utils.BhlZXNZ6.js";
|
|
2
|
-
import { a as RANGE_TYPES, i as useSelectionDisplay, o as TREE_PROPS, s as rangeOptions, t as AvailableRangePreview } from "./AvailableRangePreview.D4mZe1lQ.js";
|
|
3
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, onMounted, openBlock, ref, renderList, toDisplayString, unref, watch, withCtx } from "vue";
|
|
4
|
-
import { ElButton, ElDialog, ElRadio, ElRadioGroup } from "element-plus";
|
|
5
|
-
import { emitsMap } from "color-star-custom-methods";
|
|
6
|
-
import { TreeShowSelect } from "color-star-custom-components";
|
|
7
|
-
var _hoisted_1$1 = { class: "dialog-content" }, _hoisted_2 = {
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "selection-area overflow-hidden"
|
|
10
|
-
}, _hoisted_3 = { class: "dialog-footer" }, Dialog_default = {
|
|
11
|
-
__name: "Dialog",
|
|
12
|
-
props: {
|
|
13
|
-
visible: {
|
|
14
|
-
type: Boolean,
|
|
15
|
-
default: !1
|
|
16
|
-
},
|
|
17
|
-
allVisible: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
default: RANGE_TYPES.ALL
|
|
20
|
-
},
|
|
21
|
-
modelValue: {
|
|
22
|
-
type: Array,
|
|
23
|
-
default: () => []
|
|
24
|
-
},
|
|
25
|
-
treeList: {
|
|
26
|
-
type: Array,
|
|
27
|
-
default: () => []
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
emits: [
|
|
31
|
-
emitsMap.updateVisible,
|
|
32
|
-
emitsMap.save,
|
|
33
|
-
emitsMap.cancel
|
|
34
|
-
],
|
|
35
|
-
setup(e, { emit: g }) {
|
|
36
|
-
let x = e, w = g, j = ref(!0), M = ref(x.allVisible), N = ref([...x.modelValue]), P = ref(), { selectedMembers: F, selectedDepartments: I } = useSelectionDisplay(N, computed(() => x.treeList), !1), L = computed(() => {
|
|
37
|
-
let e = [];
|
|
38
|
-
return I.value.forEach((f) => {
|
|
39
|
-
e.push({
|
|
40
|
-
...f,
|
|
41
|
-
children: void 0
|
|
42
|
-
});
|
|
43
|
-
}), F.value.forEach((f) => {
|
|
44
|
-
e.push({
|
|
45
|
-
...f,
|
|
46
|
-
children: void 0
|
|
47
|
-
});
|
|
48
|
-
}), e;
|
|
49
|
-
}), R = (e) => {
|
|
50
|
-
M.value = e, e === RANGE_TYPES.ALL && (N.value = []);
|
|
51
|
-
}, z = (e) => {
|
|
52
|
-
let { selectedNode: f } = e;
|
|
53
|
-
N.value = f || [];
|
|
54
|
-
}, B = () => {
|
|
55
|
-
w(emitsMap.cancel), w(emitsMap.updateVisible, !1);
|
|
56
|
-
}, V = () => {
|
|
57
|
-
w(emitsMap.save, {
|
|
58
|
-
type: M.value,
|
|
59
|
-
selectedItems: [...N.value]
|
|
60
|
-
}), w(emitsMap.updateVisible, !1);
|
|
61
|
-
};
|
|
62
|
-
return (p, g) => (openBlock(), createBlock(unref(ElDialog), {
|
|
63
|
-
modelValue: j.value,
|
|
64
|
-
"onUpdate:modelValue": g[2] ||= (e) => j.value = e,
|
|
65
|
-
title: "可用范围设置",
|
|
66
|
-
"close-on-click-modal": !1,
|
|
67
|
-
"close-on-press-escape": !1,
|
|
68
|
-
"append-to": "#source-publish-container"
|
|
69
|
-
}, {
|
|
70
|
-
footer: withCtx(() => [createElementVNode("div", _hoisted_3, [createVNode(unref(ElButton), {
|
|
71
|
-
onClick: B,
|
|
72
|
-
plain: ""
|
|
73
|
-
}, {
|
|
74
|
-
default: withCtx(() => [...g[3] ||= [createTextVNode("取消", -1)]]),
|
|
75
|
-
_: 1
|
|
76
|
-
}), createVNode(unref(ElButton), {
|
|
77
|
-
type: "primary",
|
|
78
|
-
onClick: V
|
|
79
|
-
}, {
|
|
80
|
-
default: withCtx(() => [...g[4] ||= [createTextVNode("保存", -1)]]),
|
|
81
|
-
_: 1
|
|
82
|
-
})])]),
|
|
83
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_1$1, [createVNode(unref(ElRadioGroup), {
|
|
84
|
-
class: "pd-b-16",
|
|
85
|
-
modelValue: M.value,
|
|
86
|
-
"onUpdate:modelValue": g[0] ||= (e) => M.value = e,
|
|
87
|
-
onChange: R
|
|
88
|
-
}, {
|
|
89
|
-
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(rangeOptions), (e) => (openBlock(), createBlock(unref(ElRadio), {
|
|
90
|
-
key: e.value,
|
|
91
|
-
value: e.value
|
|
92
|
-
}, {
|
|
93
|
-
default: withCtx(() => [createTextVNode(toDisplayString(e.label), 1)]),
|
|
94
|
-
_: 2
|
|
95
|
-
}, 1032, ["value"]))), 128))]),
|
|
96
|
-
_: 1
|
|
97
|
-
}, 8, ["modelValue"]), M.value === unref(RANGE_TYPES).PARTIAL ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(unref(TreeShowSelect), {
|
|
98
|
-
modelValue: N.value,
|
|
99
|
-
"onUpdate:modelValue": g[1] ||= (e) => N.value = e,
|
|
100
|
-
ref_key: "treeRef",
|
|
101
|
-
ref: P,
|
|
102
|
-
treeProps: unref(TREE_PROPS),
|
|
103
|
-
treeList: e.treeList,
|
|
104
|
-
hasFilter: !0,
|
|
105
|
-
rightTreeList: L.value,
|
|
106
|
-
style: { height: "500px" },
|
|
107
|
-
onGetCheckedNode: z
|
|
108
|
-
}, null, 8, [
|
|
109
|
-
"modelValue",
|
|
110
|
-
"treeProps",
|
|
111
|
-
"treeList",
|
|
112
|
-
"rightTreeList"
|
|
113
|
-
])])) : createCommentVNode("", !0)])]),
|
|
114
|
-
_: 1
|
|
115
|
-
}, 8, ["modelValue"]));
|
|
116
|
-
}
|
|
117
|
-
}, _hoisted_1 = { class: "available-range-setting w-full" };
|
|
118
|
-
const AvailableRangeSetting = withInstall(/* @__PURE__ */ Object.assign({ name: "AvailableRangeSetting" }, {
|
|
119
|
-
__name: "layout",
|
|
120
|
-
props: {
|
|
121
|
-
allVisible: {
|
|
122
|
-
type: Boolean,
|
|
123
|
-
default: RANGE_TYPES.ALL
|
|
124
|
-
},
|
|
125
|
-
modelValue: {
|
|
126
|
-
type: Array,
|
|
127
|
-
default: () => []
|
|
128
|
-
},
|
|
129
|
-
loadDataApi: {
|
|
130
|
-
type: Function,
|
|
131
|
-
default: () => () => []
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
emits: [
|
|
135
|
-
emitsMap.updateAllVisible,
|
|
136
|
-
emitsMap.updateModelValue,
|
|
137
|
-
emitsMap.change
|
|
138
|
-
],
|
|
139
|
-
setup(e, { expose: f, emit: p }) {
|
|
140
|
-
let m = e, h = p, _ = ref(!1), v = ref(!1), y = ref([]), b = ref(m.allVisible), S = ref(m.modelValue), C = ref(new Set(S.value?.map((e) => e.memberId))), T = () => {
|
|
141
|
-
m.loadDataApi && typeof m.loadDataApi == "function" ? (v.value = !0, m.loadDataApi().then((e) => {
|
|
142
|
-
y.value = e?.data?.orgOptionSoList || [];
|
|
143
|
-
}).finally(() => {
|
|
144
|
-
v.value = !1;
|
|
145
|
-
})) : y.value = [];
|
|
146
|
-
}, E = () => {
|
|
147
|
-
_.value = !0;
|
|
148
|
-
}, D = (e) => {
|
|
149
|
-
b.value = e.type, S.value = e.selectedItems, C.value.clear(), S.value.forEach((e) => {
|
|
150
|
-
C.value.add(e.memberId);
|
|
151
|
-
}), h(emitsMap.updateAllVisible, b.value), h(emitsMap.updateModelValue, S.value), k();
|
|
152
|
-
}, O = () => {
|
|
153
|
-
_.value = !1;
|
|
154
|
-
}, k = () => {
|
|
155
|
-
let e = {
|
|
156
|
-
allVisible: b.value,
|
|
157
|
-
selectedItems: S.value
|
|
158
|
-
};
|
|
159
|
-
h(emitsMap.change, e);
|
|
160
|
-
}, A = ref(null);
|
|
161
|
-
return watch(() => m.allVisible, (e) => {
|
|
162
|
-
b.value = e;
|
|
163
|
-
}, { immediate: !0 }), watch(() => m.modelValue, (e) => {
|
|
164
|
-
S.value = e || [], C.value.clear(), S.value.forEach((e) => {
|
|
165
|
-
C.value.add(e.memberId);
|
|
166
|
-
});
|
|
167
|
-
}, { immediate: !0 }), watch(() => m.loadDataApi, () => {
|
|
168
|
-
T();
|
|
169
|
-
}, { immediate: !1 }), onMounted(() => {
|
|
170
|
-
T();
|
|
171
|
-
}), f({ getSelectedItems: () => {
|
|
172
|
-
let e = A.value?.allSelectedItems || [];
|
|
173
|
-
return {
|
|
174
|
-
allVisible: b.value,
|
|
175
|
-
visibleScope: e.map((e) => ({
|
|
176
|
-
memberId: e.memberId,
|
|
177
|
-
memberName: e.memberName,
|
|
178
|
-
memberType: e.memberType,
|
|
179
|
-
bnid: e.bnid
|
|
180
|
-
}))
|
|
181
|
-
};
|
|
182
|
-
} }), (e, f) => (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(unref(AvailableRangePreview), {
|
|
183
|
-
allVisible: b.value,
|
|
184
|
-
"model-value": S.value,
|
|
185
|
-
"tree-list": y.value,
|
|
186
|
-
onEdit: E,
|
|
187
|
-
ref_key: "previewRef",
|
|
188
|
-
ref: A
|
|
189
|
-
}, null, 8, [
|
|
190
|
-
"allVisible",
|
|
191
|
-
"model-value",
|
|
192
|
-
"tree-list"
|
|
193
|
-
]), _.value ? (openBlock(), createBlock(Dialog_default, {
|
|
194
|
-
key: 0,
|
|
195
|
-
visible: _.value,
|
|
196
|
-
"onUpdate:visible": f[0] ||= (e) => _.value = e,
|
|
197
|
-
allVisible: b.value,
|
|
198
|
-
"onUpdate:allVisible": f[1] ||= (e) => b.value = e,
|
|
199
|
-
modelValue: S.value,
|
|
200
|
-
"onUpdate:modelValue": f[2] ||= (e) => S.value = e,
|
|
201
|
-
"tree-list": y.value,
|
|
202
|
-
loading: v.value,
|
|
203
|
-
onSave: D,
|
|
204
|
-
onCancel: O
|
|
205
|
-
}, null, 8, [
|
|
206
|
-
"visible",
|
|
207
|
-
"allVisible",
|
|
208
|
-
"modelValue",
|
|
209
|
-
"tree-list",
|
|
210
|
-
"loading"
|
|
211
|
-
])) : createCommentVNode("", !0)]));
|
|
212
|
-
}
|
|
213
|
-
}));
|
|
214
|
-
var AvailableRangeSetting_default = AvailableRangeSetting;
|
|
215
|
-
export { AvailableRangeSetting_default as n, AvailableRangeSetting as t };
|