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,160 +0,0 @@
|
|
|
1
|
-
import { _ as P, w as _ } from "./_plugin-vue_export-helper.CVVE_0_F.js";
|
|
2
|
-
import { computed as m, createElementBlock as f, createCommentVNode as E, openBlock as o, normalizeClass as b, createElementVNode as i, toDisplayString as A, Fragment as x, renderList as N, createBlock as v, createVNode as S, unref as R, withCtx as w, createTextVNode as D } from "vue";
|
|
3
|
-
import { ElButton as B } from "element-plus";
|
|
4
|
-
import '../assets/index.css';const L = {
|
|
5
|
-
ALL: "all",
|
|
6
|
-
PARTIAL: "partial"
|
|
7
|
-
}, I = [
|
|
8
|
-
{
|
|
9
|
-
value: L.ALL,
|
|
10
|
-
label: "全部成员"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
value: L.PARTIAL,
|
|
14
|
-
label: "部分成员"
|
|
15
|
-
}
|
|
16
|
-
], l = {
|
|
17
|
-
MEMBER: "member",
|
|
18
|
-
DEPARTMENT: "department"
|
|
19
|
-
}, k = { class: "fz-12 text-secondary mg-b-8" }, C = {
|
|
20
|
-
__name: "TagList",
|
|
21
|
-
props: {
|
|
22
|
-
// 显示的标签
|
|
23
|
-
label: {
|
|
24
|
-
type: String,
|
|
25
|
-
required: !0
|
|
26
|
-
},
|
|
27
|
-
// 数据项列表
|
|
28
|
-
items: {
|
|
29
|
-
type: Array,
|
|
30
|
-
default: () => []
|
|
31
|
-
},
|
|
32
|
-
// 容器样式类
|
|
33
|
-
containerClass: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: "mg-b-12"
|
|
36
|
-
},
|
|
37
|
-
// 标签样式类
|
|
38
|
-
tagClass: {
|
|
39
|
-
type: String,
|
|
40
|
-
default: "bg-primary-light text-primary"
|
|
41
|
-
},
|
|
42
|
-
// 是否可滚动
|
|
43
|
-
scrollable: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: !0
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
setup(e) {
|
|
49
|
-
const a = e;
|
|
50
|
-
return m(() => ["tag-item", "fz-12", "pd-4", "pd-l-8", "pd-r-8", "radius-4", a.tagClass]), (y, g) => e.items.length > 0 ? (o(), f("div", {
|
|
51
|
-
key: 0,
|
|
52
|
-
class: b(e.containerClass)
|
|
53
|
-
}, [
|
|
54
|
-
i("div", k, A(e.label), 1),
|
|
55
|
-
i("div", {
|
|
56
|
-
class: b(["tag-list flex flex-wrap gap-8", { "max-h-120 overflow-y-auto": e.scrollable }])
|
|
57
|
-
}, [
|
|
58
|
-
(o(!0), f(x, null, N(e.items, (u) => (o(), f("span", {
|
|
59
|
-
key: u.id,
|
|
60
|
-
class: b([
|
|
61
|
-
"tag-item fz-12 pd-4 pd-l-8 pd-r-8 radius-4",
|
|
62
|
-
e.tagClass
|
|
63
|
-
])
|
|
64
|
-
}, A(u.name), 3))), 128))
|
|
65
|
-
], 2)
|
|
66
|
-
], 2)) : E("", !0);
|
|
67
|
-
}
|
|
68
|
-
}, h = /* @__PURE__ */ P(C, [["__scopeId", "data-v-40bc237e"]]), V = { class: "available-range-preview w-full" }, z = { class: "preview-area pd-16 radius-8 border" }, $ = { class: "flex items-center justify-between mg-b-16" }, Y = { class: "type-display" }, G = { class: "fz-14 weight-500" }, W = {
|
|
69
|
-
__name: "layout",
|
|
70
|
-
props: {
|
|
71
|
-
// 当前选择的范围类型
|
|
72
|
-
type: {
|
|
73
|
-
type: String,
|
|
74
|
-
default: "all"
|
|
75
|
-
},
|
|
76
|
-
// 选中的项目列表
|
|
77
|
-
modelValue: {
|
|
78
|
-
type: Array,
|
|
79
|
-
default: () => []
|
|
80
|
-
},
|
|
81
|
-
// 完整的树形数据(用于判断部门成员是否全部选中)
|
|
82
|
-
treeList: {
|
|
83
|
-
type: Array,
|
|
84
|
-
default: () => []
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
emits: ["edit"],
|
|
88
|
-
setup(e) {
|
|
89
|
-
const a = e, y = {
|
|
90
|
-
PARTIAL: "partial"
|
|
91
|
-
}, g = m(() => a.modelValue.filter(
|
|
92
|
-
(s) => s.type === l.MEMBER
|
|
93
|
-
)), u = m(() => ((r) => {
|
|
94
|
-
const c = [], M = (t) => {
|
|
95
|
-
if (t.type === l.DEPARTMENT && t.children) {
|
|
96
|
-
const T = (d) => {
|
|
97
|
-
const n = [];
|
|
98
|
-
for (const p of d)
|
|
99
|
-
p.type === l.MEMBER ? n.push(p.id) : p.type === l.DEPARTMENT && n.push(...T(p.children));
|
|
100
|
-
return n;
|
|
101
|
-
};
|
|
102
|
-
if (T(t.children).every(
|
|
103
|
-
(d) => a.modelValue.some(
|
|
104
|
-
(n) => n.type === l.MEMBER && n.id === d
|
|
105
|
-
)
|
|
106
|
-
) && c.push({
|
|
107
|
-
id: t.id,
|
|
108
|
-
name: t.name,
|
|
109
|
-
type: l.DEPARTMENT
|
|
110
|
-
}), t.children)
|
|
111
|
-
for (const d of t.children)
|
|
112
|
-
M(d);
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
for (const t of r)
|
|
116
|
-
M(t);
|
|
117
|
-
return c;
|
|
118
|
-
})(a.treeList));
|
|
119
|
-
return m(() => a.modelValue.filter(
|
|
120
|
-
(s) => s.type === l.DEPARTMENT
|
|
121
|
-
).length), m(() => g.value.length), (s, r) => (o(), f("div", V, [
|
|
122
|
-
i("div", z, [
|
|
123
|
-
i("div", $, [
|
|
124
|
-
i("div", Y, [
|
|
125
|
-
i("span", G, A(R(I).find((c) => c.value === e.type)?.label), 1)
|
|
126
|
-
]),
|
|
127
|
-
S(R(B), {
|
|
128
|
-
type: "primary",
|
|
129
|
-
size: "small",
|
|
130
|
-
onClick: r[0] || (r[0] = (c) => s.$emit("edit"))
|
|
131
|
-
}, {
|
|
132
|
-
default: w(() => [...r[1] || (r[1] = [
|
|
133
|
-
D(" 编辑 ", -1)
|
|
134
|
-
])]),
|
|
135
|
-
_: 1
|
|
136
|
-
})
|
|
137
|
-
]),
|
|
138
|
-
e.type === y.PARTIAL ? (o(), v(h, {
|
|
139
|
-
key: 0,
|
|
140
|
-
label: "成员:",
|
|
141
|
-
items: g.value,
|
|
142
|
-
"tag-class": "bg-primary-light text-primary"
|
|
143
|
-
}, null, 8, ["items"])) : E("", !0),
|
|
144
|
-
e.type === y.PARTIAL ? (o(), v(h, {
|
|
145
|
-
key: 1,
|
|
146
|
-
label: "部门:",
|
|
147
|
-
items: u.value,
|
|
148
|
-
"container-class": "",
|
|
149
|
-
"tag-class": "bg-info-light text-info"
|
|
150
|
-
}, null, 8, ["items"])) : E("", !0)
|
|
151
|
-
])
|
|
152
|
-
]));
|
|
153
|
-
}
|
|
154
|
-
}, j = /* @__PURE__ */ P(W, [["__scopeId", "data-v-e94c88d4"]]), K = _(j), Q = _(h);
|
|
155
|
-
export {
|
|
156
|
-
K as A,
|
|
157
|
-
L as R,
|
|
158
|
-
Q as T,
|
|
159
|
-
I as r
|
|
160
|
-
};
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import { _ as S, w as P } from "./_plugin-vue_export-helper.CVVE_0_F.js";
|
|
2
|
-
import { computed as m, createElementBlock as d, createCommentVNode as y, openBlock as s, createElementVNode as n, toDisplayString as p, createBlock as A, Fragment as R, renderList as w, unref as _, withCtx as v, createVNode as x, createTextVNode as k } from "vue";
|
|
3
|
-
import { ElPopover as N, ElButton as I } from "element-plus";
|
|
4
|
-
import '../assets/index.css';const L = {
|
|
5
|
-
ALL: "all",
|
|
6
|
-
PARTIAL: "partial"
|
|
7
|
-
}, D = [
|
|
8
|
-
{
|
|
9
|
-
value: L.ALL,
|
|
10
|
-
label: "全部成员"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
value: L.PARTIAL,
|
|
14
|
-
label: "部分成员"
|
|
15
|
-
}
|
|
16
|
-
], u = {
|
|
17
|
-
MEMBER: "member",
|
|
18
|
-
DEPARTMENT: "department"
|
|
19
|
-
}, B = { key: 0 }, C = { class: "fz-14 text-646a73 mg-b-8" }, V = { class: "tag-list flex gap-4" }, $ = { class: "tag-item fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe pointer" }, z = { class: "tag-list-popover flex gap-4 flex-wrap" }, Y = {
|
|
20
|
-
__name: "TagList",
|
|
21
|
-
props: {
|
|
22
|
-
// 显示的标签
|
|
23
|
-
label: {
|
|
24
|
-
type: String,
|
|
25
|
-
required: !0
|
|
26
|
-
},
|
|
27
|
-
// 数据项列表
|
|
28
|
-
items: {
|
|
29
|
-
type: Array,
|
|
30
|
-
default: () => []
|
|
31
|
-
},
|
|
32
|
-
// 默认显示的数量
|
|
33
|
-
defaultShowCount: {
|
|
34
|
-
type: Number,
|
|
35
|
-
default: 3
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
setup(l) {
|
|
39
|
-
const e = l, h = m(() => e.items.slice(0, e.defaultShowCount)), E = m(() => e.items.length > e.defaultShowCount), b = m(() => e.items.length - e.defaultShowCount), i = m(() => e.items.slice(e.defaultShowCount));
|
|
40
|
-
return (r, o) => l.items.length > 0 ? (s(), d("div", B, [
|
|
41
|
-
n("div", C, p(l.label), 1),
|
|
42
|
-
n("div", V, [
|
|
43
|
-
(s(!0), d(R, null, w(h.value, (a) => (s(), d("span", {
|
|
44
|
-
key: a.id,
|
|
45
|
-
class: "tag-item fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe"
|
|
46
|
-
}, p(a.name), 1))), 128)),
|
|
47
|
-
E.value ? (s(), A(_(N), {
|
|
48
|
-
key: 0,
|
|
49
|
-
placement: "top",
|
|
50
|
-
trigger: "click",
|
|
51
|
-
width: "300"
|
|
52
|
-
}, {
|
|
53
|
-
reference: v(() => [
|
|
54
|
-
n("span", $, " +" + p(b.value), 1)
|
|
55
|
-
]),
|
|
56
|
-
default: v(() => [
|
|
57
|
-
n("div", z, [
|
|
58
|
-
(s(!0), d(R, null, w(i.value, (a) => (s(), d("span", {
|
|
59
|
-
key: a.id,
|
|
60
|
-
class: "tag-item fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe"
|
|
61
|
-
}, p(a.name), 1))), 128))
|
|
62
|
-
])
|
|
63
|
-
]),
|
|
64
|
-
_: 1
|
|
65
|
-
})) : y("", !0)
|
|
66
|
-
])
|
|
67
|
-
])) : y("", !0);
|
|
68
|
-
}
|
|
69
|
-
}, M = /* @__PURE__ */ S(Y, [["__scopeId", "data-v-b1926095"]]), G = { class: "available-range-preview w-full" }, W = { class: "flex items-center justify-between mg-b-16" }, j = { class: "flex-1" }, q = { class: "fz-14 weight-500" }, F = {
|
|
70
|
-
__name: "layout",
|
|
71
|
-
props: {
|
|
72
|
-
// 当前选择的范围类型
|
|
73
|
-
type: {
|
|
74
|
-
type: String,
|
|
75
|
-
default: "all"
|
|
76
|
-
},
|
|
77
|
-
// 选中的项目列表
|
|
78
|
-
modelValue: {
|
|
79
|
-
type: Array,
|
|
80
|
-
default: () => []
|
|
81
|
-
},
|
|
82
|
-
// 完整的树形数据(用于判断部门成员是否全部选中)
|
|
83
|
-
treeList: {
|
|
84
|
-
type: Array,
|
|
85
|
-
default: () => []
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
emits: ["edit"],
|
|
89
|
-
setup(l) {
|
|
90
|
-
const e = l, h = {
|
|
91
|
-
PARTIAL: "partial"
|
|
92
|
-
}, E = m(() => e.modelValue.filter(
|
|
93
|
-
(i) => i.type === u.MEMBER
|
|
94
|
-
)), b = m(() => ((r) => {
|
|
95
|
-
const o = [], a = (t) => {
|
|
96
|
-
if (t.type === u.DEPARTMENT && t.children) {
|
|
97
|
-
const T = (f) => {
|
|
98
|
-
const c = [];
|
|
99
|
-
for (const g of f)
|
|
100
|
-
g.type === u.MEMBER ? c.push(g.id) : g.type === u.DEPARTMENT && c.push(...T(g.children));
|
|
101
|
-
return c;
|
|
102
|
-
};
|
|
103
|
-
if (T(t.children).every(
|
|
104
|
-
(f) => e.modelValue.some(
|
|
105
|
-
(c) => c.type === u.MEMBER && c.id === f
|
|
106
|
-
)
|
|
107
|
-
) && o.push({
|
|
108
|
-
id: t.id,
|
|
109
|
-
name: t.name,
|
|
110
|
-
type: u.DEPARTMENT
|
|
111
|
-
}), t.children)
|
|
112
|
-
for (const f of t.children)
|
|
113
|
-
a(f);
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
for (const t of r)
|
|
117
|
-
a(t);
|
|
118
|
-
return o;
|
|
119
|
-
})(e.treeList));
|
|
120
|
-
return (i, r) => (s(), d("div", G, [
|
|
121
|
-
n("div", W, [
|
|
122
|
-
n("div", j, [
|
|
123
|
-
n("span", q, p(_(D).find((o) => o.value === l.type)?.label), 1)
|
|
124
|
-
]),
|
|
125
|
-
x(_(I), {
|
|
126
|
-
type: "primary",
|
|
127
|
-
size: "small",
|
|
128
|
-
onClick: r[0] || (r[0] = (o) => i.$emit("edit"))
|
|
129
|
-
}, {
|
|
130
|
-
default: v(() => [...r[1] || (r[1] = [
|
|
131
|
-
k(" 编辑 ", -1)
|
|
132
|
-
])]),
|
|
133
|
-
_: 1
|
|
134
|
-
})
|
|
135
|
-
]),
|
|
136
|
-
l.type === h.PARTIAL ? (s(), A(M, {
|
|
137
|
-
key: 0,
|
|
138
|
-
label: "成员:",
|
|
139
|
-
items: E.value
|
|
140
|
-
}, null, 8, ["items"])) : y("", !0),
|
|
141
|
-
l.type === h.PARTIAL ? (s(), A(M, {
|
|
142
|
-
key: 1,
|
|
143
|
-
label: "部门:",
|
|
144
|
-
items: b.value
|
|
145
|
-
}, null, 8, ["items"])) : y("", !0)
|
|
146
|
-
]));
|
|
147
|
-
}
|
|
148
|
-
}, U = P(F), X = P(M);
|
|
149
|
-
export {
|
|
150
|
-
U as A,
|
|
151
|
-
L as R,
|
|
152
|
-
X as T,
|
|
153
|
-
D as r
|
|
154
|
-
};
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { _, w as P } from "./_plugin-vue_export-helper.CVVE_0_F.js";
|
|
2
|
-
import { computed as c, createElementBlock as r, openBlock as a, createElementVNode as s, createCommentVNode as g, createVNode as x, toDisplayString as E, unref as h, withCtx as L, createTextVNode as N, Fragment as M, renderList as T } from "vue";
|
|
3
|
-
import { ElButton as w } from "element-plus";
|
|
4
|
-
import '../assets/index.css';const R = {
|
|
5
|
-
ALL: "all",
|
|
6
|
-
PARTIAL: "partial"
|
|
7
|
-
}, D = [
|
|
8
|
-
{
|
|
9
|
-
value: R.ALL,
|
|
10
|
-
label: "全部成员"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
value: R.PARTIAL,
|
|
14
|
-
label: "部分成员"
|
|
15
|
-
}
|
|
16
|
-
], n = {
|
|
17
|
-
MEMBER: "member",
|
|
18
|
-
DEPARTMENT: "department"
|
|
19
|
-
}, I = { class: "available-range-preview w-full" }, S = { class: "preview-area pd-16 radius-8 border" }, k = { class: "flex items-center justify-between mg-b-16" }, B = { class: "type-display" }, V = { class: "fz-14 weight-500" }, z = {
|
|
20
|
-
key: 0,
|
|
21
|
-
class: "mg-b-12"
|
|
22
|
-
}, C = { class: "member-list flex flex-wrap gap-8" }, Y = { key: 1 }, G = { class: "department-list flex flex-wrap gap-8" }, W = {
|
|
23
|
-
__name: "layout",
|
|
24
|
-
props: {
|
|
25
|
-
// 当前选择的范围类型
|
|
26
|
-
type: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: "all"
|
|
29
|
-
},
|
|
30
|
-
// 选中的项目列表
|
|
31
|
-
modelValue: {
|
|
32
|
-
type: Array,
|
|
33
|
-
default: () => []
|
|
34
|
-
},
|
|
35
|
-
// 完整的树形数据(用于判断部门成员是否全部选中)
|
|
36
|
-
treeList: {
|
|
37
|
-
type: Array,
|
|
38
|
-
default: () => []
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
emits: ["edit"],
|
|
42
|
-
setup(m) {
|
|
43
|
-
const p = m, v = {
|
|
44
|
-
PARTIAL: "partial"
|
|
45
|
-
}, f = c(() => p.modelValue.filter(
|
|
46
|
-
(i) => i.type === n.MEMBER
|
|
47
|
-
)), y = c(() => ((t) => {
|
|
48
|
-
const e = [], A = (l) => {
|
|
49
|
-
if (l.type === n.DEPARTMENT && l.children) {
|
|
50
|
-
const b = (d) => {
|
|
51
|
-
const o = [];
|
|
52
|
-
for (const u of d)
|
|
53
|
-
u.type === n.MEMBER ? o.push(u.id) : u.type === n.DEPARTMENT && o.push(...b(u.children));
|
|
54
|
-
return o;
|
|
55
|
-
};
|
|
56
|
-
if (b(l.children).every(
|
|
57
|
-
(d) => p.modelValue.some(
|
|
58
|
-
(o) => o.type === n.MEMBER && o.id === d
|
|
59
|
-
)
|
|
60
|
-
) && e.push({
|
|
61
|
-
id: l.id,
|
|
62
|
-
name: l.name,
|
|
63
|
-
type: n.DEPARTMENT
|
|
64
|
-
}), l.children)
|
|
65
|
-
for (const d of l.children)
|
|
66
|
-
A(d);
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
for (const l of t)
|
|
70
|
-
A(l);
|
|
71
|
-
return e;
|
|
72
|
-
})(p.treeList));
|
|
73
|
-
return c(() => y.value.length), c(() => p.modelValue.filter(
|
|
74
|
-
(i) => i.type === n.DEPARTMENT
|
|
75
|
-
).length), c(() => f.value.length), (i, t) => (a(), r("div", I, [
|
|
76
|
-
s("div", S, [
|
|
77
|
-
s("div", k, [
|
|
78
|
-
s("div", B, [
|
|
79
|
-
s("span", V, E(h(D).find((e) => e.value === m.type)?.label), 1)
|
|
80
|
-
]),
|
|
81
|
-
x(h(w), {
|
|
82
|
-
type: "primary",
|
|
83
|
-
size: "small",
|
|
84
|
-
onClick: t[0] || (t[0] = (e) => i.$emit("edit"))
|
|
85
|
-
}, {
|
|
86
|
-
default: L(() => [...t[1] || (t[1] = [
|
|
87
|
-
N("编辑", -1)
|
|
88
|
-
])]),
|
|
89
|
-
_: 1
|
|
90
|
-
})
|
|
91
|
-
]),
|
|
92
|
-
m.type === v.PARTIAL && f.value.length > 0 ? (a(), r("div", z, [
|
|
93
|
-
t[2] || (t[2] = s("div", { class: "fz-12 text-secondary mg-b-8" }, "成员:", -1)),
|
|
94
|
-
s("div", C, [
|
|
95
|
-
(a(!0), r(M, null, T(f.value, (e) => (a(), r("span", {
|
|
96
|
-
key: e.id,
|
|
97
|
-
class: "member-tag fz-12 pd-4 pd-l-8 pd-r-8 radius-4 bg-primary-light text-primary"
|
|
98
|
-
}, E(e.name), 1))), 128))
|
|
99
|
-
])
|
|
100
|
-
])) : g("", !0),
|
|
101
|
-
m.type === v.PARTIAL && y.value.length > 0 ? (a(), r("div", Y, [
|
|
102
|
-
t[3] || (t[3] = s("div", { class: "fz-12 text-secondary mg-b-8" }, "部门:", -1)),
|
|
103
|
-
s("div", G, [
|
|
104
|
-
(a(!0), r(M, null, T(y.value, (e) => (a(), r("span", {
|
|
105
|
-
key: e.id,
|
|
106
|
-
class: "department-tag fz-12 pd-4 pd-l-8 pd-r-8 radius-4 bg-info-light text-info"
|
|
107
|
-
}, E(e.name), 1))), 128))
|
|
108
|
-
])
|
|
109
|
-
])) : g("", !0)
|
|
110
|
-
])
|
|
111
|
-
]));
|
|
112
|
-
}
|
|
113
|
-
}, $ = /* @__PURE__ */ _(W, [["__scopeId", "data-v-fc2b7e91"]]), J = P($);
|
|
114
|
-
export {
|
|
115
|
-
J as A,
|
|
116
|
-
R,
|
|
117
|
-
D as r
|
|
118
|
-
};
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { _ as P, w as L } from "./_plugin-vue_export-helper.CVVE_0_F.js";
|
|
2
|
-
import { computed as f, createElementBlock as m, createCommentVNode as y, openBlock as l, createElementVNode as a, toDisplayString as o, createBlock as E, Fragment as R, renderList as x, unref as _, withCtx as A, createVNode as S, createTextVNode as k } from "vue";
|
|
3
|
-
import { ElPopover as N, ElButton as I } from "element-plus";
|
|
4
|
-
import '../assets/index.css';const w = {
|
|
5
|
-
ALL: "all",
|
|
6
|
-
PARTIAL: "partial"
|
|
7
|
-
}, D = [
|
|
8
|
-
{
|
|
9
|
-
value: w.ALL,
|
|
10
|
-
label: "全部成员"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
value: w.PARTIAL,
|
|
14
|
-
label: "部分成员"
|
|
15
|
-
}
|
|
16
|
-
], u = {
|
|
17
|
-
MEMBER: "member",
|
|
18
|
-
DEPARTMENT: "department"
|
|
19
|
-
}, B = { key: 0 }, C = { class: "fz-14 text-646a73 mg-b-8" }, z = { class: "tag-list flex flex-wrap gap-4" }, V = { class: "expand-btn fz-12 pd-l-8 pd-r-8 radius-4 bg-f5f7fa text-646a73 cursor-pointer" }, $ = { class: "popover-content" }, Y = { class: "fz-14 text-646a73 mg-b-12" }, G = { class: "tag-list-popover flex flex-wrap gap-4" }, W = {
|
|
20
|
-
__name: "TagList",
|
|
21
|
-
props: {
|
|
22
|
-
// 显示的标签
|
|
23
|
-
label: {
|
|
24
|
-
type: String,
|
|
25
|
-
required: !0
|
|
26
|
-
},
|
|
27
|
-
// 数据项列表
|
|
28
|
-
items: {
|
|
29
|
-
type: Array,
|
|
30
|
-
default: () => []
|
|
31
|
-
},
|
|
32
|
-
// 默认显示的数量
|
|
33
|
-
defaultShowCount: {
|
|
34
|
-
type: Number,
|
|
35
|
-
default: 3
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
setup(t) {
|
|
39
|
-
const e = t, h = f(() => e.items.slice(0, e.defaultShowCount)), b = f(() => e.items.length > e.defaultShowCount), v = f(() => e.items.length - e.defaultShowCount), n = f(() => e.items.slice(e.defaultShowCount));
|
|
40
|
-
return (i, c) => t.items.length > 0 ? (l(), m("div", B, [
|
|
41
|
-
a("div", C, o(t.label), 1),
|
|
42
|
-
a("div", z, [
|
|
43
|
-
(l(!0), m(R, null, x(h.value, (r) => (l(), m("span", {
|
|
44
|
-
key: r.id,
|
|
45
|
-
class: "tag-item fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe"
|
|
46
|
-
}, o(r.name), 1))), 128)),
|
|
47
|
-
b.value ? (l(), E(_(N), {
|
|
48
|
-
key: 0,
|
|
49
|
-
placement: "top",
|
|
50
|
-
trigger: "click",
|
|
51
|
-
width: "300"
|
|
52
|
-
}, {
|
|
53
|
-
reference: A(() => [
|
|
54
|
-
a("span", V, " +" + o(v.value), 1)
|
|
55
|
-
]),
|
|
56
|
-
default: A(() => [
|
|
57
|
-
a("div", $, [
|
|
58
|
-
a("div", Y, o(t.label.replace(":", "")) + "(" + o(n.value.length) + "个)", 1),
|
|
59
|
-
a("div", G, [
|
|
60
|
-
(l(!0), m(R, null, x(n.value, (r) => (l(), m("span", {
|
|
61
|
-
key: r.id,
|
|
62
|
-
class: "tag-item fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe"
|
|
63
|
-
}, o(r.name), 1))), 128))
|
|
64
|
-
])
|
|
65
|
-
])
|
|
66
|
-
]),
|
|
67
|
-
_: 1
|
|
68
|
-
})) : y("", !0)
|
|
69
|
-
])
|
|
70
|
-
])) : y("", !0);
|
|
71
|
-
}
|
|
72
|
-
}, M = /* @__PURE__ */ P(W, [["__scopeId", "data-v-d1a6ca27"]]), j = { class: "available-range-preview w-full" }, q = { class: "flex items-center justify-between mg-b-16" }, F = { class: "flex-1" }, O = { class: "fz-14 weight-500" }, H = {
|
|
73
|
-
__name: "layout",
|
|
74
|
-
props: {
|
|
75
|
-
// 当前选择的范围类型
|
|
76
|
-
type: {
|
|
77
|
-
type: String,
|
|
78
|
-
default: "all"
|
|
79
|
-
},
|
|
80
|
-
// 选中的项目列表
|
|
81
|
-
modelValue: {
|
|
82
|
-
type: Array,
|
|
83
|
-
default: () => []
|
|
84
|
-
},
|
|
85
|
-
// 完整的树形数据(用于判断部门成员是否全部选中)
|
|
86
|
-
treeList: {
|
|
87
|
-
type: Array,
|
|
88
|
-
default: () => []
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
emits: ["edit"],
|
|
92
|
-
setup(t) {
|
|
93
|
-
const e = t, h = {
|
|
94
|
-
PARTIAL: "partial"
|
|
95
|
-
}, b = f(() => e.modelValue.filter(
|
|
96
|
-
(n) => n.type === u.MEMBER
|
|
97
|
-
)), v = f(() => ((i) => {
|
|
98
|
-
const c = [], r = (s) => {
|
|
99
|
-
if (s.type === u.DEPARTMENT && s.children) {
|
|
100
|
-
const T = (p) => {
|
|
101
|
-
const d = [];
|
|
102
|
-
for (const g of p)
|
|
103
|
-
g.type === u.MEMBER ? d.push(g.id) : g.type === u.DEPARTMENT && d.push(...T(g.children));
|
|
104
|
-
return d;
|
|
105
|
-
};
|
|
106
|
-
if (T(s.children).every(
|
|
107
|
-
(p) => e.modelValue.some(
|
|
108
|
-
(d) => d.type === u.MEMBER && d.id === p
|
|
109
|
-
)
|
|
110
|
-
) && c.push({
|
|
111
|
-
id: s.id,
|
|
112
|
-
name: s.name,
|
|
113
|
-
type: u.DEPARTMENT
|
|
114
|
-
}), s.children)
|
|
115
|
-
for (const p of s.children)
|
|
116
|
-
r(p);
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
for (const s of i)
|
|
120
|
-
r(s);
|
|
121
|
-
return c;
|
|
122
|
-
})(e.treeList));
|
|
123
|
-
return (n, i) => (l(), m("div", j, [
|
|
124
|
-
a("div", q, [
|
|
125
|
-
a("div", F, [
|
|
126
|
-
a("span", O, o(_(D).find((c) => c.value === t.type)?.label), 1)
|
|
127
|
-
]),
|
|
128
|
-
S(_(I), {
|
|
129
|
-
type: "primary",
|
|
130
|
-
size: "small",
|
|
131
|
-
onClick: i[0] || (i[0] = (c) => n.$emit("edit"))
|
|
132
|
-
}, {
|
|
133
|
-
default: A(() => [...i[1] || (i[1] = [
|
|
134
|
-
k(" 编辑 ", -1)
|
|
135
|
-
])]),
|
|
136
|
-
_: 1
|
|
137
|
-
})
|
|
138
|
-
]),
|
|
139
|
-
t.type === h.PARTIAL ? (l(), E(M, {
|
|
140
|
-
key: 0,
|
|
141
|
-
label: "成员:",
|
|
142
|
-
items: b.value
|
|
143
|
-
}, null, 8, ["items"])) : y("", !0),
|
|
144
|
-
t.type === h.PARTIAL ? (l(), E(M, {
|
|
145
|
-
key: 1,
|
|
146
|
-
label: "部门:",
|
|
147
|
-
items: v.value
|
|
148
|
-
}, null, 8, ["items"])) : y("", !0)
|
|
149
|
-
]));
|
|
150
|
-
}
|
|
151
|
-
}, Z = L(H), ee = L(M);
|
|
152
|
-
export {
|
|
153
|
-
Z as A,
|
|
154
|
-
w as R,
|
|
155
|
-
ee as T,
|
|
156
|
-
D as r
|
|
157
|
-
};
|