china-mobile-international-custom-components 0.0.26 → 0.0.28
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 +85 -0
- package/es/AvailableRangePreview.mjs +1 -1
- package/es/AvailableRangeSetting.mjs +68 -63
- package/es/CustomSidebar.mjs +1 -1
- package/es/assets/AvailableRangePreview.css +1 -0
- package/es/assets/AvailableRangeSetting.css +1 -0
- package/es/assets/CustomSidebar.css +1 -0
- package/es/assets/layout2.css +1 -1
- package/es/chunks/AvailableRangePreview.D4mZe1lQ.js +217 -0
- package/es/chunks/AvailableRangeSetting.BkSLnQ6N.js +215 -0
- package/es/chunks/CustomSidebar.BWGoPtLi.js +506 -0
- package/es/chunks/CustomTitle.BLZ7evms.js +5 -0
- package/es/chunks/CustomToggle.CP3M2_f3.js +165 -0
- package/es/chunks/PageContainer.D-G32lvP.js +329 -0
- package/es/chunks/_plugin-vue_export-helper.CVVE_0_F.js +13 -0
- package/es/chunks/_plugin-vue_export-helper.Cf-_TWPK.js +6 -0
- package/es/chunks/index.AHEDCg43.js +160 -0
- package/es/chunks/index.B67AnSJI.js +154 -0
- package/es/chunks/index.B9F4VYQK.js +118 -0
- package/es/chunks/index.BPxF6Amx.js +157 -0
- package/es/chunks/index.C2gKjqoA.js +209 -0
- package/es/chunks/index.DTtNnKDH.js +288 -0
- package/es/chunks/index.Dh5IGfxO.js +290 -0
- package/es/chunks/index.DtBeJlu6.js +142 -0
- package/es/chunks/index.kR57MtNP.js +211 -0
- package/es/chunks/index.wQj5YKPy.js +288 -0
- package/es/chunks/layout.BE8_kCeR.js +619 -0
- package/es/chunks/layout.C0EtkrZg.js +639 -0
- package/es/chunks/layout.C6AMos7n.js +17 -0
- package/es/chunks/layout.CWFXohJu.js +622 -0
- package/es/chunks/layout.R5FQNRjS.js +619 -0
- package/es/chunks/layout.nKB_kc-U.js +26 -0
- package/es/chunks/utils.BhlZXNZ6.js +19 -0
- package/es/index.mjs +643 -630
- package/lib/ApplicationIcon.js +1 -0
- package/lib/AvailableRangePreview.js +1 -1
- package/lib/AvailableRangeSetting.js +1 -1
- package/lib/CustomSidebar.js +1 -1
- package/lib/assets/AvailableRangePreview.css +1 -0
- package/lib/assets/AvailableRangeSetting.css +1 -0
- package/lib/assets/CustomSidebar.css +1 -0
- package/lib/assets/layout2.css +1 -1
- package/lib/chunks/AvailableRangePreview.CkgZsXP0.js +1 -0
- package/lib/chunks/AvailableRangeSetting.CF-jHm4x.js +1 -0
- package/lib/chunks/CustomSidebar.CMYJFb2P.js +1 -0
- package/lib/chunks/CustomTitle.BkFZ-ZIq.js +1 -0
- package/lib/chunks/CustomToggle.C0PpzKPP.js +1 -0
- package/lib/chunks/PageContainer.GH56wASV.js +1 -0
- package/lib/chunks/_plugin-vue_export-helper.C55-DZV2.js +1 -0
- package/lib/chunks/_plugin-vue_export-helper.DAGvX2Jf.js +1 -0
- package/lib/chunks/index.BfHfKST0.js +1 -0
- package/lib/chunks/index.Bk55us0s.js +1 -0
- package/lib/chunks/index.BlXappa4.js +1 -0
- package/lib/chunks/index.CCxHaoi4.js +1 -0
- package/lib/chunks/index.CSYGhK9M.js +1 -0
- package/lib/chunks/index.C_IlZrzE.js +1 -0
- package/lib/chunks/index.DUGtabLJ.js +1 -0
- package/lib/chunks/index.Dakz8S3g.js +1 -0
- package/lib/chunks/index.DydPD8Lc.js +1 -0
- package/lib/chunks/index.k_hSuA6i.js +1 -0
- package/lib/chunks/layout.BJjU9nKW.js +1 -0
- package/lib/chunks/layout.BO1q-dAZ.js +1 -0
- package/lib/chunks/layout.BQigNrr5.js +1 -0
- package/lib/chunks/layout.ClFtiz-t.js +1 -0
- package/lib/chunks/layout.CmDwUHZo.js +1 -0
- package/lib/chunks/layout.CqbDoD_v.js +1 -0
- package/lib/chunks/layout.CwJgDGuR.js +1 -0
- package/lib/chunks/utils.BT5Uuz2Q.js +1 -0
- package/lib/index.js +6 -6
- package/package.json +4 -4
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { w as I } from "./chunks/index.bCzIhWFw.js";
|
|
2
|
+
import { computed as s, resolveComponent as p, createBlock as n, openBlock as c, normalizeStyle as T, withCtx as i, createVNode as g, resolveDynamicComponent as u } from "vue";
|
|
3
|
+
import { WorkflowIcon3 as w, WorkflowIcon1 as z, Model as M, McpIcon as O, Plugin as P, Workflow as _ } from "color-message-aibox-vue";
|
|
4
|
+
const e = {
|
|
5
|
+
AGENT: "3",
|
|
6
|
+
// 智能体
|
|
7
|
+
WORKFLOW: "4",
|
|
8
|
+
// 工作流
|
|
9
|
+
PLUGIN: "5",
|
|
10
|
+
// 插件
|
|
11
|
+
MCP: "8",
|
|
12
|
+
// MCP
|
|
13
|
+
MODEL: "9"
|
|
14
|
+
// 模型
|
|
15
|
+
}, m = {
|
|
16
|
+
all: "all",
|
|
17
|
+
autonomous: 1,
|
|
18
|
+
dialogue: 3
|
|
19
|
+
}, C = {
|
|
20
|
+
__name: "layout",
|
|
21
|
+
props: {
|
|
22
|
+
row: {
|
|
23
|
+
type: Object,
|
|
24
|
+
required: !0
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
type: Number,
|
|
28
|
+
default: 48
|
|
29
|
+
},
|
|
30
|
+
applicationType: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: e.AGENT
|
|
33
|
+
},
|
|
34
|
+
// 图标字段名,用于指定从row中获取图标的字段
|
|
35
|
+
iconField: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: "icon"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
setup(o) {
|
|
41
|
+
const t = o, a = s(() => t.row?.[t.iconField]), l = s(() => t.applicationType === e.AGENT ? {
|
|
42
|
+
[m.autonomous]: z,
|
|
43
|
+
[m.dialogue]: w
|
|
44
|
+
}[t.row?.type] : {
|
|
45
|
+
[e.WORKFLOW]: _,
|
|
46
|
+
[e.PLUGIN]: P,
|
|
47
|
+
[e.MCP]: O,
|
|
48
|
+
[e.MODEL]: M
|
|
49
|
+
}[t.applicationType]);
|
|
50
|
+
return (d, y) => {
|
|
51
|
+
const r = p("el-icon"), f = p("el-image");
|
|
52
|
+
return a.value ? (c(), n(f, {
|
|
53
|
+
key: 0,
|
|
54
|
+
style: T({ width: o.size + "px", height: o.size + "px" }),
|
|
55
|
+
src: a.value,
|
|
56
|
+
fit: "cover",
|
|
57
|
+
class: "radius-8"
|
|
58
|
+
}, {
|
|
59
|
+
error: i(() => [
|
|
60
|
+
g(r, { size: o.size }, {
|
|
61
|
+
default: i(() => [
|
|
62
|
+
(c(), n(u(l.value)))
|
|
63
|
+
]),
|
|
64
|
+
_: 1
|
|
65
|
+
}, 8, ["size"])
|
|
66
|
+
]),
|
|
67
|
+
_: 1
|
|
68
|
+
}, 8, ["style", "src"])) : (c(), n(r, {
|
|
69
|
+
key: 1,
|
|
70
|
+
size: o.size
|
|
71
|
+
}, {
|
|
72
|
+
default: i(() => [
|
|
73
|
+
(c(), n(u(l.value)))
|
|
74
|
+
]),
|
|
75
|
+
_: 1
|
|
76
|
+
}, 8, ["size"]));
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}, v = I(C);
|
|
80
|
+
export {
|
|
81
|
+
m as APPLICATION_TYPE,
|
|
82
|
+
v as ApplicationIcon,
|
|
83
|
+
e as SOURCE_TYPE,
|
|
84
|
+
v as default
|
|
85
|
+
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { w as
|
|
2
|
-
import { ref as
|
|
1
|
+
import { w as x } from "./chunks/index.bCzIhWFw.js";
|
|
2
|
+
import { ref as r, computed as w, createBlock as _, openBlock as g, unref as p, withCtx as V, createElementVNode as N, createVNode as h, createElementBlock as k, createCommentVNode as P, Fragment as B, renderList as U, createTextVNode as I, toDisplayString as O, watch as C, onMounted as F } from "vue";
|
|
3
3
|
import { emitsMap as t } from "color-star-custom-methods";
|
|
4
|
-
import { R as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
4
|
+
import { R as E, u as G, r as Y, a as $, A as j } from "./chunks/index.Dh5IGfxO.js";
|
|
5
|
+
import { D as de, M as me } from "./chunks/index.Dh5IGfxO.js";
|
|
6
|
+
import { ElDialog as H, ElRadioGroup as W, ElRadio as q, ElButton as M } from "element-plus";
|
|
7
|
+
import { TreeShowSelect as z } from "color-star-custom-components";
|
|
8
|
+
const J = { class: "dialog-content" }, K = {
|
|
8
9
|
key: 0,
|
|
9
10
|
class: "selection-area overflow-hidden"
|
|
10
|
-
},
|
|
11
|
+
}, Q = { class: "dialog-footer" }, X = {
|
|
11
12
|
__name: "Dialog",
|
|
12
13
|
props: {
|
|
13
14
|
// 弹窗显示控制
|
|
@@ -18,7 +19,7 @@ const K = { class: "dialog-content" }, Q = {
|
|
|
18
19
|
// 当前选择的范围类型(是否全部可见)
|
|
19
20
|
allVisible: {
|
|
20
21
|
type: Boolean,
|
|
21
|
-
default:
|
|
22
|
+
default: E.ALL
|
|
22
23
|
},
|
|
23
24
|
// 选中的项目列表
|
|
24
25
|
modelValue: {
|
|
@@ -36,13 +37,13 @@ const K = { class: "dialog-content" }, Q = {
|
|
|
36
37
|
t.save,
|
|
37
38
|
t.cancel
|
|
38
39
|
],
|
|
39
|
-
setup(A, { emit:
|
|
40
|
-
const y = A, a =
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
setup(A, { emit: S }) {
|
|
41
|
+
const y = A, a = S, c = r(!0), o = r(y.allVisible), d = r([...y.modelValue]), f = r(), { selectedMembers: m, selectedDepartments: s } = G(
|
|
42
|
+
d,
|
|
43
|
+
w(() => y.treeList),
|
|
43
44
|
!1
|
|
44
45
|
// 编辑模式
|
|
45
|
-
), b =
|
|
46
|
+
), b = w(() => {
|
|
46
47
|
const i = [];
|
|
47
48
|
return s.value.forEach((e) => {
|
|
48
49
|
i.push({
|
|
@@ -57,83 +58,84 @@ const K = { class: "dialog-content" }, Q = {
|
|
|
57
58
|
});
|
|
58
59
|
}), i;
|
|
59
60
|
}), L = (i) => {
|
|
60
|
-
o.value = i, i ===
|
|
61
|
-
},
|
|
61
|
+
o.value = i, i === E.ALL && (d.value = []);
|
|
62
|
+
}, R = (i) => {
|
|
62
63
|
const { selectedNode: e } = i;
|
|
63
|
-
|
|
64
|
+
d.value = e || [];
|
|
64
65
|
}, T = () => {
|
|
65
66
|
a(t.cancel), a(t.updateVisible, !1);
|
|
66
|
-
},
|
|
67
|
+
}, D = () => {
|
|
67
68
|
a(t.save, {
|
|
68
69
|
type: o.value,
|
|
69
|
-
selectedItems: [...
|
|
70
|
+
selectedItems: [...d.value]
|
|
70
71
|
}), a(t.updateVisible, !1);
|
|
71
72
|
};
|
|
72
|
-
return (i, e) => (g(),
|
|
73
|
-
modelValue:
|
|
74
|
-
"onUpdate:modelValue": e[2] || (e[2] = (n) =>
|
|
73
|
+
return (i, e) => (g(), _(p(H), {
|
|
74
|
+
modelValue: c.value,
|
|
75
|
+
"onUpdate:modelValue": e[2] || (e[2] = (n) => c.value = n),
|
|
75
76
|
title: "可用范围设置",
|
|
76
77
|
"close-on-click-modal": !1,
|
|
77
78
|
"close-on-press-escape": !1,
|
|
78
|
-
"append-to-body": ""
|
|
79
|
+
"append-to-body": "",
|
|
80
|
+
onClose: T
|
|
79
81
|
}, {
|
|
80
82
|
footer: V(() => [
|
|
81
|
-
N("div",
|
|
82
|
-
h(
|
|
83
|
+
N("div", Q, [
|
|
84
|
+
h(p(M), {
|
|
83
85
|
onClick: T,
|
|
84
86
|
plain: ""
|
|
85
87
|
}, {
|
|
86
88
|
default: V(() => [...e[3] || (e[3] = [
|
|
87
|
-
|
|
89
|
+
I("取消", -1)
|
|
88
90
|
])]),
|
|
89
91
|
_: 1
|
|
90
92
|
}),
|
|
91
|
-
h(
|
|
93
|
+
h(p(M), {
|
|
92
94
|
type: "primary",
|
|
93
|
-
onClick:
|
|
95
|
+
onClick: D
|
|
94
96
|
}, {
|
|
95
97
|
default: V(() => [...e[4] || (e[4] = [
|
|
96
|
-
|
|
98
|
+
I("保存", -1)
|
|
97
99
|
])]),
|
|
98
100
|
_: 1
|
|
99
101
|
})
|
|
100
102
|
])
|
|
101
103
|
]),
|
|
102
104
|
default: V(() => [
|
|
103
|
-
N("div",
|
|
104
|
-
h(
|
|
105
|
+
N("div", J, [
|
|
106
|
+
h(p(W), {
|
|
105
107
|
class: "pd-b-16",
|
|
106
108
|
modelValue: o.value,
|
|
107
109
|
"onUpdate:modelValue": e[0] || (e[0] = (n) => o.value = n),
|
|
108
110
|
onChange: L
|
|
109
111
|
}, {
|
|
110
112
|
default: V(() => [
|
|
111
|
-
(g(!0),
|
|
113
|
+
(g(!0), k(B, null, U(p(Y), (n) => (g(), _(p(q), {
|
|
112
114
|
key: n.value,
|
|
113
115
|
value: n.value
|
|
114
116
|
}, {
|
|
115
117
|
default: V(() => [
|
|
116
|
-
|
|
118
|
+
I(O(n.label), 1)
|
|
117
119
|
]),
|
|
118
120
|
_: 2
|
|
119
121
|
}, 1032, ["value"]))), 128))
|
|
120
122
|
]),
|
|
121
123
|
_: 1
|
|
122
124
|
}, 8, ["modelValue"]),
|
|
123
|
-
o.value ===
|
|
124
|
-
h(
|
|
125
|
-
modelValue:
|
|
126
|
-
"onUpdate:modelValue": e[1] || (e[1] = (n) =>
|
|
125
|
+
o.value === p(E).PARTIAL ? (g(), k("div", K, [
|
|
126
|
+
h(p(z), {
|
|
127
|
+
modelValue: d.value,
|
|
128
|
+
"onUpdate:modelValue": e[1] || (e[1] = (n) => d.value = n),
|
|
127
129
|
ref_key: "treeRef",
|
|
128
130
|
ref: f,
|
|
129
|
-
treeProps:
|
|
131
|
+
treeProps: p($),
|
|
130
132
|
treeList: A.treeList,
|
|
131
133
|
hasFilter: !0,
|
|
132
134
|
rightTreeList: b.value,
|
|
133
135
|
style: { height: "500px" },
|
|
134
|
-
onGetCheckedNode:
|
|
136
|
+
onGetCheckedNode: R
|
|
135
137
|
}, null, 8, ["modelValue", "treeProps", "treeList", "rightTreeList"])
|
|
136
|
-
])) :
|
|
138
|
+
])) : P("", !0)
|
|
137
139
|
])
|
|
138
140
|
]),
|
|
139
141
|
_: 1
|
|
@@ -147,7 +149,7 @@ const K = { class: "dialog-content" }, Q = {
|
|
|
147
149
|
// 当前选择的范围类型(是否全部可见)
|
|
148
150
|
allVisible: {
|
|
149
151
|
type: Boolean,
|
|
150
|
-
default:
|
|
152
|
+
default: E.ALL
|
|
151
153
|
},
|
|
152
154
|
// 选中的项目列表
|
|
153
155
|
modelValue: {
|
|
@@ -165,30 +167,30 @@ const K = { class: "dialog-content" }, Q = {
|
|
|
165
167
|
t.updateModelValue,
|
|
166
168
|
t.change
|
|
167
169
|
],
|
|
168
|
-
setup(A, { expose:
|
|
169
|
-
const a = A,
|
|
170
|
+
setup(A, { expose: S, emit: y }) {
|
|
171
|
+
const a = A, c = y, o = r(!1), d = r(!1), f = r([]), m = r(a.allVisible), s = r(a.modelValue), b = r(
|
|
170
172
|
new Set(s.value?.map((l) => l.memberId))
|
|
171
173
|
), L = () => {
|
|
172
|
-
a.loadDataApi && typeof a.loadDataApi == "function" ? (
|
|
174
|
+
a.loadDataApi && typeof a.loadDataApi == "function" ? (d.value = !0, a.loadDataApi().then((l) => {
|
|
173
175
|
f.value = l?.data?.orgOptionSoList || [];
|
|
174
176
|
}).finally(() => {
|
|
175
|
-
|
|
177
|
+
d.value = !1;
|
|
176
178
|
})) : f.value = [];
|
|
177
|
-
},
|
|
179
|
+
}, R = () => {
|
|
178
180
|
o.value = !0;
|
|
179
181
|
}, T = (l) => {
|
|
180
182
|
m.value = l.type, s.value = l.selectedItems, b.value.clear(), s.value.forEach((u) => {
|
|
181
183
|
b.value.add(u.memberId);
|
|
182
|
-
}),
|
|
183
|
-
},
|
|
184
|
+
}), c(t.updateAllVisible, m.value), c(t.updateModelValue, s.value), i();
|
|
185
|
+
}, D = () => {
|
|
184
186
|
o.value = !1;
|
|
185
187
|
}, i = () => {
|
|
186
188
|
const l = {
|
|
187
189
|
allVisible: m.value,
|
|
188
190
|
selectedItems: s.value
|
|
189
191
|
};
|
|
190
|
-
|
|
191
|
-
}, e =
|
|
192
|
+
c(t.change, l);
|
|
193
|
+
}, e = r(null), n = () => {
|
|
192
194
|
const l = e.value?.allSelectedItems || [];
|
|
193
195
|
return {
|
|
194
196
|
allVisible: m.value,
|
|
@@ -200,13 +202,13 @@ const K = { class: "dialog-content" }, Q = {
|
|
|
200
202
|
}))
|
|
201
203
|
};
|
|
202
204
|
};
|
|
203
|
-
return
|
|
205
|
+
return C(
|
|
204
206
|
() => a.allVisible,
|
|
205
207
|
(l) => {
|
|
206
208
|
m.value = l;
|
|
207
209
|
},
|
|
208
210
|
{ immediate: !0 }
|
|
209
|
-
),
|
|
211
|
+
), C(
|
|
210
212
|
() => a.modelValue,
|
|
211
213
|
(l) => {
|
|
212
214
|
s.value = l || [], b.value.clear(), s.value.forEach((u) => {
|
|
@@ -214,7 +216,7 @@ const K = { class: "dialog-content" }, Q = {
|
|
|
214
216
|
});
|
|
215
217
|
},
|
|
216
218
|
{ immediate: !0 }
|
|
217
|
-
),
|
|
219
|
+
), C(
|
|
218
220
|
() => a.loadDataApi,
|
|
219
221
|
() => {
|
|
220
222
|
L();
|
|
@@ -222,18 +224,18 @@ const K = { class: "dialog-content" }, Q = {
|
|
|
222
224
|
{ immediate: !1 }
|
|
223
225
|
), F(() => {
|
|
224
226
|
L();
|
|
225
|
-
}),
|
|
227
|
+
}), S({
|
|
226
228
|
getSelectedItems: n
|
|
227
|
-
}), (l, u) => (g(),
|
|
228
|
-
h(
|
|
229
|
+
}), (l, u) => (g(), k("div", Z, [
|
|
230
|
+
h(p(j), {
|
|
229
231
|
allVisible: m.value,
|
|
230
232
|
"model-value": s.value,
|
|
231
233
|
"tree-list": f.value,
|
|
232
|
-
onEdit:
|
|
234
|
+
onEdit: R,
|
|
233
235
|
ref_key: "previewRef",
|
|
234
236
|
ref: e
|
|
235
237
|
}, null, 8, ["allVisible", "model-value", "tree-list"]),
|
|
236
|
-
o.value ? (g(),
|
|
238
|
+
o.value ? (g(), _(X, {
|
|
237
239
|
key: 0,
|
|
238
240
|
visible: o.value,
|
|
239
241
|
"onUpdate:visible": u[0] || (u[0] = (v) => o.value = v),
|
|
@@ -242,16 +244,19 @@ const K = { class: "dialog-content" }, Q = {
|
|
|
242
244
|
modelValue: s.value,
|
|
243
245
|
"onUpdate:modelValue": u[2] || (u[2] = (v) => s.value = v),
|
|
244
246
|
"tree-list": f.value,
|
|
245
|
-
loading:
|
|
247
|
+
loading: d.value,
|
|
246
248
|
onSave: T,
|
|
247
|
-
onCancel:
|
|
248
|
-
}, null, 8, ["visible", "allVisible", "modelValue", "tree-list", "loading"])) :
|
|
249
|
+
onCancel: D
|
|
250
|
+
}, null, 8, ["visible", "allVisible", "modelValue", "tree-list", "loading"])) : P("", !0)
|
|
249
251
|
]));
|
|
250
252
|
}
|
|
251
|
-
}), ne =
|
|
253
|
+
}), ne = x(ee);
|
|
252
254
|
export {
|
|
253
255
|
ne as AvailableRangeSetting,
|
|
254
|
-
|
|
256
|
+
de as DEFAULT_SHOW_COUNT,
|
|
257
|
+
me as MEMBER_DEPARTMENT_TYPES,
|
|
258
|
+
E as RANGE_TYPES,
|
|
259
|
+
$ as availableRangeTreeProps,
|
|
255
260
|
ne as default,
|
|
256
|
-
|
|
261
|
+
Y as rangeOptions
|
|
257
262
|
};
|
package/es/CustomSidebar.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as e, a as n, n as t, M as d, N as E, S as o, T as i, d as r, e as P, f as M, h as T, k as u, m as I, g as N, j as S, c as _, b as f, i as p, p as c, t as h } from "./chunks/layout.
|
|
1
|
+
import { l as e, a as n, n as t, M as d, N as E, S as o, T as i, d as r, e as P, f as M, h as T, k as u, m as I, g as N, j as S, c as _, b as f, i as p, p as c, t as h } from "./chunks/layout.C0EtkrZg.js";
|
|
2
2
|
export {
|
|
3
3
|
e as CustomSidebar,
|
|
4
4
|
n as MENU_COLOR_STRATEGY,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.nowrap[data-v-bf564085]{white-space:nowrap}.tag-list .tag-item[data-v-bf564085]{line-height:22px;display:inline-block}.gap-4[data-v-bf564085]{gap:4px}.tag-list-popover[data-v-bf564085]{max-height:300px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.dialog-content .selection-area[data-v-0525c8ac]{height:500px;border:1px solid var(--border-color);border-radius:8px;overflow:hidden}.dialog-footer[data-v-0525c8ac]{display:flex;justify-content:flex-end;gap:12px}.available-range-setting[data-v-3ff52101]{width:100%}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.nav-title[data-v-56e35473]{justify-content:space-between;align-items:center;height:68px;padding-left:2px;display:flex}.nav-title .title-logo[data-v-56e35473]{background:#eaf0fe;border-radius:100px;flex-shrink:0;justify-content:center;align-items:center;width:36px;height:36px;display:flex}.nav-title .title-text[data-v-56e35473]{white-space:nowrap;text-overflow:ellipsis;flex:1;overflow:hidden}.nav-title .collapse-unfold-icon[data-v-56e35473]{cursor:pointer;flex-shrink:0;justify-content:center;transition:transform .2s;display:flex}.nav-title .collapse-unfold-icon[data-v-56e35473]:hover{transform:scale(1.1)}.custom-tree[data-v-0a105c70]{background-color:#0000}.custom-tree[data-v-0a105c70] .el-tree-node__expand-icon{display:none}.custom-tree[data-v-0a105c70] .el-tree-node.is-current .el-tree-node__content{background:#eaf0fe;border-radius:6px}.custom-tree .tree-node-content-custom[data-v-0a105c70]{color:#1f2329;box-sizing:border-box;cursor:pointer;border-radius:6px;align-items:center;width:100%;padding:8px 12px;font-size:14px;font-weight:400;transition:all .3s;display:flex}.custom-tree .tree-node-content-custom.is-current[data-v-0a105c70]{color:#3271fe}.custom-tree .tree-node-content-custom.is-parent-active[data-v-0a105c70]{color:#3271fe;background:0 0;border-radius:6px}.custom-tree .tree-node-content-custom .expand-arrow[data-v-0a105c70]{cursor:pointer;flex-shrink:0;justify-content:center;align-items:center;transition:transform .3s;display:flex}.custom-tree .tree-node-content-custom .node-icon[data-v-0a105c70]{flex-shrink:0;justify-content:flex-start;width:24px}.custom-tree .tree-node-content-custom .node-label[data-v-0a105c70]{text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:14px;overflow:hidden}.user-popup-content[data-v-70783670]{padding:8px}.user-popup-content .list__item[data-v-70783670]{cursor:pointer;color:#262626;border-radius:8px;align-items:center;gap:6px;height:48px;padding:0 12px;font-size:14px;font-weight:400;transition:background-color .2s;display:flex}.user-popup-content .list__item[data-v-70783670]:hover{background:#f0f0f0}.user-popup-content .list__item-icon[data-v-70783670]{text-align:center;align-items:center;display:flex}.navbar-box__footer[data-v-d1e53517]{cursor:pointer;border-top:1px solid #f0f0f0;justify-content:space-between;align-items:center;width:100%;padding:16px 8px;display:flex;position:relative;bottom:0}.navbar-box__footer__left[data-v-d1e53517]{align-items:center;gap:6px;display:flex}.navbar-box__footer__left .name-first[data-v-d1e53517]{color:#fff;text-align:center;background:#3965ff;border-radius:50%;flex-shrink:0;width:30px;height:30px;margin-right:8px;font-size:22px;line-height:28px;display:inline-block}.navbar-box__footer__left .name-text[data-v-d1e53517]{color:#262626;align-items:center;gap:8px;font-size:14px;font-weight:500;line-height:20px;display:flex}.navbar-box__footer__left .user-id[data-v-d1e53517]{color:#a8abb2;font-size:12px}.footer-popup[data-v-d1e53517]{z-index:2001;width:280px;position:fixed;bottom:0}.footer-popup .footer-popup__content[data-v-d1e53517]{width:100%;height:100%}.content-bg[data-v-d1e53517]{-webkit-backdrop-filter:blur(16px);background:#f7f7f7b3;border:1px solid #fffc;border-radius:12px;box-shadow:0 9px 28px 8px #0000000d,0 6px 16px #00000014,0 3px 6px -4px #0000001f}.fade-enter-from[data-v-d1e53517],.fade-leave-to[data-v-d1e53517]{opacity:0}.fade-enter-active[data-v-d1e53517],.fade-leave-active[data-v-d1e53517]{transition:opacity .3s}.fade-enter-to[data-v-d1e53517],.fade-leave-from[data-v-d1e53517]{opacity:1}.sidebar[data-v-736b2e19]{width:240px;transition:width .3s;position:relative}.sidebar[data-v-736b2e19] .el-tree{--el-tree-node-hover-bg-color:transparent!important}
|
package/es/assets/layout2.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.nav-title[data-v-56e35473]{height:68px;padding-left:2px;display:flex;align-items:center;justify-content:space-between}.nav-title .title-logo[data-v-56e35473]{width:36px;height:36px;background:#eaf0fe;border-radius:100px;display:flex;justify-content:center;align-items:center;flex-shrink:0}.nav-title .title-text[data-v-56e35473]{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.nav-title .collapse-unfold-icon[data-v-56e35473]{cursor:pointer;flex-shrink:0;transition:transform .2s ease;display:flex;justify-content:center}.nav-title .collapse-unfold-icon[data-v-56e35473]:hover{transform:scale(1.1)}.custom-tree[data-v-0a105c70]{background-color:transparent}.custom-tree[data-v-0a105c70] .el-tree-node__expand-icon{display:none}.custom-tree[data-v-0a105c70] .el-tree-node.is-current .el-tree-node__content{background:#eaf0fe;border-radius:6px}.custom-tree .tree-node-content-custom[data-v-0a105c70]{display:flex;align-items:center;transition:all .3s ease;border-radius:6px;font-weight:400;font-size:14px;color:#1f2329;width:100%;padding:8px 12px;box-sizing:border-box;cursor:pointer}.custom-tree .tree-node-content-custom.is-current[data-v-0a105c70]{color:#3271fe}.custom-tree .tree-node-content-custom.is-parent-active[data-v-0a105c70]{color:#3271fe;border-radius:6px;background:transparent}.custom-tree .tree-node-content-custom .expand-arrow[data-v-0a105c70]{display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform .3s ease;flex-shrink:0}.custom-tree .tree-node-content-custom .node-icon[data-v-0a105c70]{width:24px;justify-content:flex-start;flex-shrink:0}.custom-tree .tree-node-content-custom .node-label[data-v-0a105c70]{flex:1;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-popup-content[data-v-70783670]{padding:8px}.user-popup-content .list__item[data-v-70783670]{cursor:pointer;display:flex;align-items:center;gap:6px;padding:0 12px;border-radius:8px;font-weight:400;font-size:14px;color:#262626;height:48px;transition:background-color .2s ease}.user-popup-content .list__item[data-v-70783670]:hover{background:#f0f0f0}.user-popup-content .list__item-icon[data-v-70783670]{text-align:center;display:flex;align-items:center}.navbar-box__footer[data-v-93817550]{height:52px;width:100%;cursor:pointer;position:relative;bottom:0;padding:8px;border:1px solid #DEE0E3;display:flex;align-items:center;justify-content:space-between;background:#e6e8ea;box-shadow:0 6px 40px 16px #00000005,0 4px 28px #00000005,0 3px 16px -8px #0000000a}.navbar-box__footer__left[data-v-93817550]{display:flex;align-items:center;gap:6px;flex:1;min-width:0}.navbar-box__footer__left>div[data-v-93817550]:last-child{flex:1;min-width:0}.navbar-box__footer__left .name-first[data-v-93817550]{display:inline-block;width:30px;height:30px;background:#3965ff;border-radius:50%;color:#fff;text-align:center;font-size:22px;line-height:28px;margin-right:2px;flex-shrink:0}.navbar-box__footer__left .name-text[data-v-93817550]{font-weight:500;font-size:14px;color:#262626;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.navbar-box__footer__left .user-id[data-v-93817550]{font-size:12px;color:#a8abb2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.navbar-box__footer__right[data-v-93817550]{width:16px}.footer-popup[data-v-93817550]{position:fixed;bottom:0;z-index:2001;width:280px}.footer-popup .footer-popup__content[data-v-93817550]{width:100%;height:100%}.content-bg[data-v-93817550]{background:#f7f7f7b3;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);box-shadow:0 9px 28px 8px #0000000d,0 6px 16px #00000014,0 3px 6px -4px #0000001f;border-radius:12px;border:1px solid rgba(255,255,255,.8)}.fade-enter-from[data-v-93817550],.fade-leave-to[data-v-93817550]{opacity:0}.fade-enter-active[data-v-93817550],.fade-leave-active[data-v-93817550]{transition:opacity .3s ease}.fade-enter-to[data-v-93817550],.fade-leave-from[data-v-93817550]{opacity:1}.sidebar[data-v-
|
|
1
|
+
.nav-title[data-v-56e35473]{height:68px;padding-left:2px;display:flex;align-items:center;justify-content:space-between}.nav-title .title-logo[data-v-56e35473]{width:36px;height:36px;background:#eaf0fe;border-radius:100px;display:flex;justify-content:center;align-items:center;flex-shrink:0}.nav-title .title-text[data-v-56e35473]{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.nav-title .collapse-unfold-icon[data-v-56e35473]{cursor:pointer;flex-shrink:0;transition:transform .2s ease;display:flex;justify-content:center}.nav-title .collapse-unfold-icon[data-v-56e35473]:hover{transform:scale(1.1)}.custom-tree[data-v-0a105c70]{background-color:transparent}.custom-tree[data-v-0a105c70] .el-tree-node__expand-icon{display:none}.custom-tree[data-v-0a105c70] .el-tree-node.is-current .el-tree-node__content{background:#eaf0fe;border-radius:6px}.custom-tree .tree-node-content-custom[data-v-0a105c70]{display:flex;align-items:center;transition:all .3s ease;border-radius:6px;font-weight:400;font-size:14px;color:#1f2329;width:100%;padding:8px 12px;box-sizing:border-box;cursor:pointer}.custom-tree .tree-node-content-custom.is-current[data-v-0a105c70]{color:#3271fe}.custom-tree .tree-node-content-custom.is-parent-active[data-v-0a105c70]{color:#3271fe;border-radius:6px;background:transparent}.custom-tree .tree-node-content-custom .expand-arrow[data-v-0a105c70]{display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform .3s ease;flex-shrink:0}.custom-tree .tree-node-content-custom .node-icon[data-v-0a105c70]{width:24px;justify-content:flex-start;flex-shrink:0}.custom-tree .tree-node-content-custom .node-label[data-v-0a105c70]{flex:1;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-popup-content[data-v-70783670]{padding:8px}.user-popup-content .list__item[data-v-70783670]{cursor:pointer;display:flex;align-items:center;gap:6px;padding:0 12px;border-radius:8px;font-weight:400;font-size:14px;color:#262626;height:48px;transition:background-color .2s ease}.user-popup-content .list__item[data-v-70783670]:hover{background:#f0f0f0}.user-popup-content .list__item-icon[data-v-70783670]{text-align:center;display:flex;align-items:center}.navbar-box__footer[data-v-93817550]{height:52px;width:100%;cursor:pointer;position:relative;bottom:0;padding:8px;border:1px solid #DEE0E3;display:flex;align-items:center;justify-content:space-between;background:#e6e8ea;box-shadow:0 6px 40px 16px #00000005,0 4px 28px #00000005,0 3px 16px -8px #0000000a}.navbar-box__footer__left[data-v-93817550]{display:flex;align-items:center;gap:6px;flex:1;min-width:0}.navbar-box__footer__left>div[data-v-93817550]:last-child{flex:1;min-width:0}.navbar-box__footer__left .name-first[data-v-93817550]{display:inline-block;width:30px;height:30px;background:#3965ff;border-radius:50%;color:#fff;text-align:center;font-size:22px;line-height:28px;margin-right:2px;flex-shrink:0}.navbar-box__footer__left .name-text[data-v-93817550]{font-weight:500;font-size:14px;color:#262626;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.navbar-box__footer__left .user-id[data-v-93817550]{font-size:12px;color:#a8abb2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.navbar-box__footer__right[data-v-93817550]{width:16px}.footer-popup[data-v-93817550]{position:fixed;bottom:0;z-index:2001;width:280px}.footer-popup .footer-popup__content[data-v-93817550]{width:100%;height:100%}.content-bg[data-v-93817550]{background:#f7f7f7b3;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);box-shadow:0 9px 28px 8px #0000000d,0 6px 16px #00000014,0 3px 6px -4px #0000001f;border-radius:12px;border:1px solid rgba(255,255,255,.8)}.fade-enter-from[data-v-93817550],.fade-leave-to[data-v-93817550]{opacity:0}.fade-enter-active[data-v-93817550],.fade-leave-active[data-v-93817550]{transition:opacity .3s ease}.fade-enter-to[data-v-93817550],.fade-leave-from[data-v-93817550]{opacity:1}.sidebar[data-v-f272ad1e]{width:240px;transition:width .3s ease;position:relative;height:calc(100vh - 52px)}.sidebar[data-v-f272ad1e] .el-tree{--el-tree-node-hover-bg-color: transparent !important}
|
|
@@ -0,0 +1,217 @@
|
|
|
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 };
|