@king-one/antdv 1.2.22 → 1.2.24
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/CHANGELOG.md +12 -0
- package/dist/es/components/dept-selector/src/dept.mjs +59 -59
- package/dist/es/components/dept-selector/src/types.mjs +11 -2
- package/dist/es/components/pro-selector/index.mjs +5 -4
- package/dist/es/components/pro-selector/src/pro-user.mjs +37 -43
- package/dist/es/components/pro-selector/src/types.mjs +20 -6
- package/dist/es/components/role-selector/src/role.mjs +37 -37
- package/dist/es/components/role-selector/src/types.mjs +13 -4
- package/dist/es/index.mjs +33 -32
- package/dist/lib/components/dept-selector/src/dept.js +1 -1
- package/dist/lib/components/dept-selector/src/types.js +1 -1
- package/dist/lib/components/pro-selector/index.js +1 -1
- package/dist/lib/components/pro-selector/src/pro-user.js +1 -1
- package/dist/lib/components/pro-selector/src/types.js +1 -1
- package/dist/lib/components/role-selector/src/role.js +1 -1
- package/dist/lib/components/role-selector/src/types.js +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/theme-chalk/icon.css +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/types/components/dept-selector/index.d.ts +13 -0
- package/dist/types/components/dept-selector/src/dept.d.ts +13 -0
- package/dist/types/components/dept-selector/src/types.d.ts +9 -0
- package/dist/types/components/pro-selector/index.d.ts +14 -5
- package/dist/types/components/pro-selector/src/pro-user.d.ts +14 -5
- package/dist/types/components/pro-selector/src/types.d.ts +15 -0
- package/dist/types/components/role-selector/index.d.ts +26 -0
- package/dist/types/components/role-selector/src/role.d.ts +13 -0
- package/dist/types/components/role-selector/src/types.d.ts +9 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as H, ref as s, watch as
|
|
1
|
+
import { defineComponent as H, ref as s, watch as p, createVNode as n, Fragment as J } from "vue";
|
|
2
2
|
import { useNamespace as Q } from "../../../hooks/use-namespace/index.mjs";
|
|
3
3
|
import "../../index.mjs";
|
|
4
4
|
import { message as W, FormItemRest as X, InputSearch as Y, Tree as Z, Empty as C, Input as ee } from "ant-design-vue";
|
|
5
5
|
import { GET_DEPT_TREE_URL as le, deptSelectorEmits as te, deptSelectorProps as ae } from "./types.mjs";
|
|
6
6
|
import { KProModal as ne } from "../../pro-modal/index.mjs";
|
|
7
7
|
import { KIcon as P } from "../../icon/index.mjs";
|
|
8
|
-
const
|
|
8
|
+
const f = Q("dept-selector"), ve = /* @__PURE__ */ H({
|
|
9
9
|
name: "KDeptSelector",
|
|
10
10
|
props: ae,
|
|
11
11
|
emits: te,
|
|
12
12
|
setup(t, {
|
|
13
|
-
emit:
|
|
13
|
+
emit: h,
|
|
14
14
|
attrs: V,
|
|
15
15
|
slots: g
|
|
16
16
|
}) {
|
|
17
|
-
const x = s(!0), w = s(!0), y = s([]),
|
|
17
|
+
const x = s(!0), w = s(!0), y = s([]), m = s([]), d = s([]), A = s(!1), u = s(t.isBuiltInRequest ? {
|
|
18
18
|
children: "children",
|
|
19
19
|
title: "deptName",
|
|
20
20
|
key: "id"
|
|
21
|
-
} : t.fieldNames),
|
|
21
|
+
} : t.fieldNames), S = s(""), r = s([]), v = s(t.treeData), E = s(!1), k = s("");
|
|
22
22
|
if (t.isBuiltInRequest) {
|
|
23
23
|
if (!t.http)
|
|
24
24
|
throw new Error("请传入http实例");
|
|
@@ -37,35 +37,35 @@ const h = Q("dept-selector"), ve = /* @__PURE__ */ H({
|
|
|
37
37
|
} else {
|
|
38
38
|
if (Array.isArray(t.modelValue)) return;
|
|
39
39
|
const e = t.modelValue[u.value.key];
|
|
40
|
-
|
|
40
|
+
m.value = [e], y.value = [e];
|
|
41
41
|
}
|
|
42
42
|
}, I = (e) => {
|
|
43
43
|
if (E.value)
|
|
44
44
|
return E.value = !1;
|
|
45
|
-
t.type === "radio" ?
|
|
45
|
+
t.type === "radio" ? r.value.length > 0 && (S.value = r.value[0][u.value.title] || "") : S.value = r.value.map((l) => l[u.value.title]).join(",");
|
|
46
46
|
};
|
|
47
|
-
|
|
47
|
+
p(() => t.visible, () => {
|
|
48
48
|
t.visible && N();
|
|
49
49
|
}, {
|
|
50
50
|
immediate: !0
|
|
51
|
-
}),
|
|
51
|
+
}), p(() => t.modelValue, () => {
|
|
52
52
|
v.value.length > 0 && N();
|
|
53
53
|
}, {
|
|
54
54
|
immediate: !0,
|
|
55
55
|
deep: !0
|
|
56
|
-
}),
|
|
56
|
+
}), p(v, () => {
|
|
57
57
|
v.value.length > 0 && N();
|
|
58
58
|
}, {
|
|
59
59
|
immediate: !0,
|
|
60
60
|
deep: !0
|
|
61
61
|
});
|
|
62
62
|
function R(e) {
|
|
63
|
-
const l = (i,
|
|
63
|
+
const l = (i, o) => {
|
|
64
64
|
for (const a of i) {
|
|
65
|
-
if (a[u.value.key] ===
|
|
65
|
+
if (a[u.value.key] === o)
|
|
66
66
|
return a;
|
|
67
67
|
if (a.children && a.children.length) {
|
|
68
|
-
const c = l(a.children,
|
|
68
|
+
const c = l(a.children, o);
|
|
69
69
|
if (c) return c;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -76,17 +76,17 @@ const h = Q("dept-selector"), ve = /* @__PURE__ */ H({
|
|
|
76
76
|
function D(e) {
|
|
77
77
|
return e ? e.map((l) => R(l)).filter(Boolean) : [];
|
|
78
78
|
}
|
|
79
|
-
|
|
80
|
-
t.type === "checkbox" && (x.value ?
|
|
79
|
+
p(d, () => {
|
|
80
|
+
t.type === "checkbox" && (x.value ? r.value = D(d.value.checked) : r.value = D(d.value), I("watch checkedKeys..."));
|
|
81
81
|
}, {
|
|
82
82
|
immediate: !0,
|
|
83
83
|
deep: !0
|
|
84
|
-
}),
|
|
85
|
-
t.type === "radio" && (
|
|
84
|
+
}), p(m, () => {
|
|
85
|
+
t.type === "radio" && (r.value = D(m.value), I("watch selectedKeys..."));
|
|
86
86
|
}, {
|
|
87
87
|
immediate: !0,
|
|
88
88
|
deep: !0
|
|
89
|
-
}),
|
|
89
|
+
}), p(() => t.treeData, () => {
|
|
90
90
|
t.isBuiltInRequest || (v.value = t.treeData);
|
|
91
91
|
});
|
|
92
92
|
const _ = () => {
|
|
@@ -94,22 +94,22 @@ const h = Q("dept-selector"), ve = /* @__PURE__ */ H({
|
|
|
94
94
|
}, B = () => {
|
|
95
95
|
E.value = !0;
|
|
96
96
|
}, O = () => {
|
|
97
|
-
|
|
97
|
+
h("update:visible", !1), h("cancel");
|
|
98
98
|
}, F = () => {
|
|
99
|
-
if (!
|
|
99
|
+
if (!r.value.length) {
|
|
100
100
|
W.warn("请选择部门");
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
|
-
t.type === "radio" ?
|
|
104
|
-
[u.value.key]:
|
|
105
|
-
[u.value.title]:
|
|
106
|
-
}) :
|
|
103
|
+
t.type === "radio" ? h("update:modelValue", {
|
|
104
|
+
[u.value.key]: m.value[0],
|
|
105
|
+
[u.value.title]: r.value[0][u.value.title]
|
|
106
|
+
}) : h("update:modelValue", r.value.map((e) => ({
|
|
107
107
|
[u.value.key]: e[u.value.key],
|
|
108
108
|
[u.value.title]: e[u.value.title]
|
|
109
|
-
}))),
|
|
109
|
+
}))), h("update:visible", !1), h("confirm", r.value), I("handleConfirm ...");
|
|
110
110
|
}, M = (e) => {
|
|
111
111
|
if (E.value = !0, t.type === "radio")
|
|
112
|
-
return
|
|
112
|
+
return r.value = [], m.value = [], !1;
|
|
113
113
|
if (x.value)
|
|
114
114
|
d.value.checked = d.value.checked.filter((l) => l !== e[u.value.key]);
|
|
115
115
|
else {
|
|
@@ -120,8 +120,8 @@ const h = Q("dept-selector"), ve = /* @__PURE__ */ H({
|
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
122
|
}, L = (e) => {
|
|
123
|
-
const l = [], i = (
|
|
124
|
-
for (const a of
|
|
123
|
+
const l = [], i = (o) => {
|
|
124
|
+
for (const a of o)
|
|
125
125
|
l.push(a[u.value.key]), a.children && a.children.length && i(a.children);
|
|
126
126
|
};
|
|
127
127
|
return i(e), l;
|
|
@@ -138,50 +138,50 @@ const h = Q("dept-selector"), ve = /* @__PURE__ */ H({
|
|
|
138
138
|
onOnConfirm: F
|
|
139
139
|
}, {
|
|
140
140
|
default: () => [n("div", {
|
|
141
|
-
class:
|
|
141
|
+
class: f.e("modal-content")
|
|
142
142
|
}, [$(), j()], 2)]
|
|
143
|
-
}, 8, ["modelValue", "modalProps", "onOnCancel", "onOnConfirm"])]),
|
|
143
|
+
}, 8, ["modelValue", "modalProps", "onOnCancel", "onOnConfirm"])]), b = (e, l) => {
|
|
144
144
|
let i;
|
|
145
|
-
for (let
|
|
146
|
-
const a = l[
|
|
145
|
+
for (let o = 0; o < l.length; o++) {
|
|
146
|
+
const a = l[o];
|
|
147
147
|
if (a.children)
|
|
148
148
|
if (a.children.some((c) => c[u.value.key] === e)) {
|
|
149
149
|
i = a[u.value.key];
|
|
150
150
|
break;
|
|
151
|
-
} else
|
|
151
|
+
} else b(e, a.children) && (i = b(e, a.children));
|
|
152
152
|
}
|
|
153
153
|
return i;
|
|
154
154
|
}, z = (e) => {
|
|
155
155
|
if (!e.trim()) {
|
|
156
|
-
y.value = [],
|
|
156
|
+
y.value = [], k.value = "", w.value = !0;
|
|
157
157
|
return;
|
|
158
158
|
}
|
|
159
|
-
const l = /* @__PURE__ */ new Set(), i = (
|
|
160
|
-
|
|
159
|
+
const l = /* @__PURE__ */ new Set(), i = (o, a) => {
|
|
160
|
+
o.forEach((c) => {
|
|
161
161
|
var U;
|
|
162
162
|
if ((U = c[u.value.title]) != null && U.includes(a)) {
|
|
163
|
-
let
|
|
164
|
-
for (;
|
|
165
|
-
l.add(
|
|
163
|
+
let K = b(c[u.value.key], v.value);
|
|
164
|
+
for (; K; )
|
|
165
|
+
l.add(K), K = b(K, v.value);
|
|
166
166
|
l.add(c[u.value.key]);
|
|
167
167
|
}
|
|
168
168
|
c.children && c.children.length > 0 && i(c.children, a);
|
|
169
169
|
});
|
|
170
170
|
};
|
|
171
|
-
i(v.value, e), y.value = Array.from(l),
|
|
171
|
+
i(v.value, e), y.value = Array.from(l), k.value = e, w.value = !0;
|
|
172
172
|
}, G = (e) => {
|
|
173
173
|
const l = e[u.value.title] || "";
|
|
174
|
-
if (!
|
|
174
|
+
if (!k.value)
|
|
175
175
|
return n("span", null, [l]);
|
|
176
|
-
const i = l.indexOf(
|
|
176
|
+
const i = l.indexOf(k.value);
|
|
177
177
|
if (i === -1)
|
|
178
178
|
return n("span", null, [l]);
|
|
179
|
-
const
|
|
180
|
-
return n("span", null, [
|
|
179
|
+
const o = l.substring(0, i), a = l.substring(i, i + k.value.length), c = l.substring(i + k.value.length);
|
|
180
|
+
return n("span", null, [o, n("span", {
|
|
181
181
|
style: "color: #f50; font-weight: bold"
|
|
182
182
|
}, [a]), c]);
|
|
183
183
|
}, $ = () => n("div", {
|
|
184
|
-
class:
|
|
184
|
+
class: f.e("modal-content-left")
|
|
185
185
|
}, [n(X, null, {
|
|
186
186
|
default: () => [n(Y, {
|
|
187
187
|
placeholder: "请输入部门名称",
|
|
@@ -194,8 +194,8 @@ const h = Q("dept-selector"), ve = /* @__PURE__ */ H({
|
|
|
194
194
|
}), v.value.length > 0 ? n(Z, {
|
|
195
195
|
expandedKeys: y.value,
|
|
196
196
|
"onUpdate:expandedKeys": (e) => y.value = e,
|
|
197
|
-
selectedKeys:
|
|
198
|
-
"onUpdate:selectedKeys": (e) =>
|
|
197
|
+
selectedKeys: m.value,
|
|
198
|
+
"onUpdate:selectedKeys": (e) => m.value = e,
|
|
199
199
|
checkedKeys: d.value,
|
|
200
200
|
"onUpdate:checkedKeys": (e) => d.value = e,
|
|
201
201
|
checkable: t.type === "checkbox",
|
|
@@ -209,7 +209,7 @@ const h = Q("dept-selector"), ve = /* @__PURE__ */ H({
|
|
|
209
209
|
"tree-data": v.value,
|
|
210
210
|
onCheck: _,
|
|
211
211
|
onSelect: B,
|
|
212
|
-
class:
|
|
212
|
+
class: f.e("modal-content-left-tree")
|
|
213
213
|
}, {
|
|
214
214
|
icon: (e) => T(e),
|
|
215
215
|
title: G,
|
|
@@ -221,13 +221,13 @@ const h = Q("dept-selector"), ve = /* @__PURE__ */ H({
|
|
|
221
221
|
name: e.parentId === "0" ? "qiye" : "bumen",
|
|
222
222
|
size: 16
|
|
223
223
|
}, null, 8, ["name"]), j = () => n("div", {
|
|
224
|
-
class:
|
|
225
|
-
}, [
|
|
226
|
-
class:
|
|
224
|
+
class: f.e("modal-content-right")
|
|
225
|
+
}, [r.value.length > 0 ? r.value.map((e) => n("div", {
|
|
226
|
+
class: f.e("modal-content-right-item")
|
|
227
227
|
}, [n("div", {
|
|
228
|
-
class:
|
|
228
|
+
class: f.e("modal-content-right-item-label")
|
|
229
229
|
}, [T(e), n("span", null, [e[u.value.title]])], 2), n("div", {
|
|
230
|
-
class:
|
|
230
|
+
class: f.e("modal-content-right-item-del"),
|
|
231
231
|
onClick: () => M(e)
|
|
232
232
|
}, [n(P, {
|
|
233
233
|
name: "shanchu",
|
|
@@ -239,17 +239,17 @@ const h = Q("dept-selector"), ve = /* @__PURE__ */ H({
|
|
|
239
239
|
return () => {
|
|
240
240
|
var e;
|
|
241
241
|
return n("div", {
|
|
242
|
-
class:
|
|
243
|
-
}, [(e = g.default) != null && e.call(g) ? g.default() : n("div", null, [n(ee, {
|
|
242
|
+
class: f.b()
|
|
243
|
+
}, [t.hideSlot ? null : (e = g.default) != null && e.call(g) ? g.default() : n("div", null, [n(ee, {
|
|
244
244
|
style: "width: 100%;",
|
|
245
245
|
readonly: !0,
|
|
246
|
-
value:
|
|
247
|
-
"onUpdate:value": (l) =>
|
|
248
|
-
onClick: () =>
|
|
246
|
+
value: S.value,
|
|
247
|
+
"onUpdate:value": (l) => S.value = l,
|
|
248
|
+
onClick: () => h("update:visible", !0),
|
|
249
249
|
placeholder: "请选择部门"
|
|
250
250
|
}, {
|
|
251
251
|
suffix: () => n("div", {
|
|
252
|
-
onClick: () =>
|
|
252
|
+
onClick: () => h("update:visible", !0)
|
|
253
253
|
}, [n(P, {
|
|
254
254
|
style: {
|
|
255
255
|
cursor: "pointer"
|
|
@@ -39,10 +39,19 @@ const t = {
|
|
|
39
39
|
/**
|
|
40
40
|
* 请求前缀,如 qy-user-service
|
|
41
41
|
*/
|
|
42
|
-
prefix: String
|
|
42
|
+
prefix: String,
|
|
43
|
+
/**
|
|
44
|
+
* 是否隐藏插槽,只使用 modal
|
|
45
|
+
*/
|
|
46
|
+
hideSlot: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !1
|
|
49
|
+
}
|
|
43
50
|
}, l = "/security/dept/company/tree", a = {
|
|
44
51
|
"update:visible": (e) => !0,
|
|
45
|
-
"update:modelValue": (e) => !0
|
|
52
|
+
"update:modelValue": (e) => !0,
|
|
53
|
+
confirm: (e) => !0,
|
|
54
|
+
cancel: () => !0
|
|
46
55
|
};
|
|
47
56
|
export {
|
|
48
57
|
l as GET_DEPT_TREE_URL,
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { withInstall as r } from "../utils/install.mjs";
|
|
2
2
|
import e from "./src/pro-user.mjs";
|
|
3
3
|
import "./style/index.mjs";
|
|
4
|
-
import { GTE_ORGTREE_URL as l, UserSelectorProps as E, selectUserContextKey as R } from "./src/types.mjs";
|
|
4
|
+
import { GTE_ORGTREE_URL as l, UserSelectorProps as E, selectUserContextKey as R, userSelectorEmits as U } from "./src/types.mjs";
|
|
5
5
|
import "./src/hooks/index.mjs";
|
|
6
6
|
e.GTE_ORGTREE_URL = "/security/dept/user/tree";
|
|
7
|
-
const
|
|
7
|
+
const p = r(e);
|
|
8
8
|
export {
|
|
9
9
|
l as GTE_ORGTREE_URL,
|
|
10
|
-
|
|
10
|
+
p as KUserSelector,
|
|
11
11
|
e as ProUserSelector,
|
|
12
12
|
E as UserSelectorProps,
|
|
13
|
-
R as selectUserContextKey
|
|
13
|
+
R as selectUserContextKey,
|
|
14
|
+
U as userSelectorEmits
|
|
14
15
|
};
|
|
@@ -1,43 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as L, ref as s, provide as O, reactive as T, watch as U, nextTick as g, createVNode as l, createTextVNode as v } from "vue";
|
|
2
2
|
import "../../index.mjs";
|
|
3
3
|
import { useNamespace as D } from "../../../hooks/use-namespace/index.mjs";
|
|
4
4
|
import { message as w, Input as R, Empty as x, FormItemRest as B } from "ant-design-vue";
|
|
5
|
-
import { selectUserContextKey as M,
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { KProModal as
|
|
5
|
+
import { selectUserContextKey as M, userSelectorEmits as z, UserSelectorProps as A } from "./types.mjs";
|
|
6
|
+
import K from "./components/org-tree.mjs";
|
|
7
|
+
import F from "./components/user.mjs";
|
|
8
|
+
import { KProModal as _ } from "../../pro-modal/index.mjs";
|
|
9
9
|
import { KIcon as f } from "../../icon/index.mjs";
|
|
10
|
-
import { KUserAvatar as
|
|
10
|
+
import { KUserAvatar as q } from "../../pro-user-avatar/index.mjs";
|
|
11
11
|
const {
|
|
12
12
|
b: u
|
|
13
|
-
} = D("pro-user-selector"), i = D("user-selector-extermal"),
|
|
13
|
+
} = D("pro-user-selector"), i = D("user-selector-extermal"), ee = /* @__PURE__ */ L({
|
|
14
14
|
name: "ProUserSelector",
|
|
15
|
-
props:
|
|
16
|
-
emits:
|
|
17
|
-
"update:visible": (a) => !0,
|
|
18
|
-
"update:modelValue": (a) => !0,
|
|
19
|
-
"delete-user": (a) => !0,
|
|
20
|
-
confirm: (a) => !0,
|
|
21
|
-
cancel: () => !0
|
|
22
|
-
},
|
|
15
|
+
props: A,
|
|
16
|
+
emits: z,
|
|
23
17
|
setup(a, {
|
|
24
|
-
emit:
|
|
18
|
+
emit: n,
|
|
25
19
|
slots: p,
|
|
26
|
-
expose:
|
|
27
|
-
attrs:
|
|
20
|
+
expose: E,
|
|
21
|
+
attrs: V
|
|
28
22
|
}) {
|
|
29
|
-
const d =
|
|
30
|
-
|
|
23
|
+
const d = s(""), r = s([]), o = s(), c = s(null);
|
|
24
|
+
O(M, T({
|
|
31
25
|
maxCount: a.maxCount,
|
|
32
26
|
http: a.http,
|
|
33
27
|
isBuiltInRequest: a.isBuiltInRequest,
|
|
34
28
|
prefix: a.prefix,
|
|
35
29
|
initData: a.initData
|
|
36
30
|
}));
|
|
37
|
-
const h =
|
|
31
|
+
const h = s(a.modelValue || []), m = s(!1);
|
|
38
32
|
U(() => a.modelValue, (e) => {
|
|
39
33
|
m.value ? m.value = !1 : (h.value = JSON.parse(JSON.stringify(e)), g(() => {
|
|
40
|
-
|
|
34
|
+
k(h.value);
|
|
41
35
|
}));
|
|
42
36
|
}, {
|
|
43
37
|
deep: !0,
|
|
@@ -49,19 +43,19 @@ const {
|
|
|
49
43
|
}, {
|
|
50
44
|
deep: !0
|
|
51
45
|
});
|
|
52
|
-
async function
|
|
46
|
+
async function k(e) {
|
|
53
47
|
if (o.value) {
|
|
54
48
|
const t = await o.value.dataLoadPromise;
|
|
55
49
|
o.value.getInitData(e, t);
|
|
56
50
|
}
|
|
57
51
|
}
|
|
58
|
-
const
|
|
52
|
+
const I = (e) => {
|
|
59
53
|
var t;
|
|
60
|
-
r.value = r.value.filter((
|
|
61
|
-
},
|
|
62
|
-
|
|
54
|
+
r.value = r.value.filter((y) => y.id !== e), (t = o.value) == null || t.deleteDeptUser(e);
|
|
55
|
+
}, b = () => {
|
|
56
|
+
n("update:visible", !1), n("cancel");
|
|
63
57
|
}, C = (e) => {
|
|
64
|
-
|
|
58
|
+
n("update:modelValue", a.modelValue.filter((t) => t.id !== e));
|
|
65
59
|
}, N = () => {
|
|
66
60
|
if (r.value.length === 0) {
|
|
67
61
|
w.warn("请选择用户");
|
|
@@ -72,20 +66,20 @@ const {
|
|
|
72
66
|
realName: t.realName || "",
|
|
73
67
|
avatar: t.avatar
|
|
74
68
|
}));
|
|
75
|
-
|
|
69
|
+
n("update:visible", !1), m.value = !0, n("update:modelValue", e), n("confirm", e);
|
|
76
70
|
};
|
|
77
|
-
|
|
71
|
+
E({
|
|
78
72
|
deleteCheckedUser: C
|
|
79
73
|
});
|
|
80
|
-
const
|
|
74
|
+
const S = () => l(_, {
|
|
81
75
|
modelValue: a.visible,
|
|
82
76
|
title: "选择联系人",
|
|
83
77
|
modalProps: {
|
|
84
78
|
cancelText: "取消",
|
|
85
79
|
okText: "确定",
|
|
86
|
-
...
|
|
80
|
+
...V
|
|
87
81
|
},
|
|
88
|
-
onOnCancel: () =>
|
|
82
|
+
onOnCancel: () => b(),
|
|
89
83
|
onOnConfirm: () => N()
|
|
90
84
|
}, {
|
|
91
85
|
default: () => [l("div", {
|
|
@@ -105,7 +99,7 @@ const {
|
|
|
105
99
|
name: "search"
|
|
106
100
|
}, null),
|
|
107
101
|
_: 1
|
|
108
|
-
}, 8, ["value", "onUpdate:value", "allowClear"])]), l(
|
|
102
|
+
}, 8, ["value", "onUpdate:value", "allowClear"])]), l(K, {
|
|
109
103
|
ref: o,
|
|
110
104
|
selectUserList: r.value,
|
|
111
105
|
"onUpdate:selectUserList": (e) => r.value = e,
|
|
@@ -119,31 +113,31 @@ const {
|
|
|
119
113
|
ref: c
|
|
120
114
|
}, [l("div", {
|
|
121
115
|
class: u("user-list")
|
|
122
|
-
}, [r.value.length > 0 ? r.value.map((e) => l(
|
|
116
|
+
}, [r.value.length > 0 ? r.value.map((e) => l(F, {
|
|
123
117
|
key: e.id,
|
|
124
118
|
userInfo: e,
|
|
125
119
|
isChecked: !1,
|
|
126
120
|
isDelete: !0,
|
|
127
|
-
"onDelete-user":
|
|
121
|
+
"onDelete-user": I
|
|
128
122
|
}, null, 8, ["userInfo", "isDelete", "onDelete-user"])) : l(x, {
|
|
129
123
|
image: x.PRESENTED_IMAGE_SIMPLE,
|
|
130
124
|
description: "暂无数据"
|
|
131
125
|
}, null, 8, ["image"])], 2)], 512)], 2)], 2)]
|
|
132
|
-
}, 8, ["modelValue", "modalProps", "onOnCancel", "onOnConfirm"]),
|
|
126
|
+
}, 8, ["modelValue", "modalProps", "onOnCancel", "onOnConfirm"]), P = () => l(B, null, {
|
|
133
127
|
default: () => [l("div", {
|
|
134
128
|
class: i.b()
|
|
135
|
-
}, [p.default ? p.default() : l("div", {
|
|
129
|
+
}, [a.hideSlot ? null : p.default ? p.default() : l("div", {
|
|
136
130
|
class: i.b("list")
|
|
137
131
|
}, [l("div", {
|
|
138
132
|
class: i.b("icon"),
|
|
139
|
-
onClick: () =>
|
|
133
|
+
onClick: () => n("update:visible", !0)
|
|
140
134
|
}, [l(f, {
|
|
141
135
|
name: "plus",
|
|
142
136
|
size: 20,
|
|
143
137
|
color: "#409eff"
|
|
144
138
|
}, null)], 10, ["onClick"]), a.modelValue.map((e) => l("div", {
|
|
145
139
|
class: i.b("item")
|
|
146
|
-
}, [l(
|
|
140
|
+
}, [l(q, {
|
|
147
141
|
name: e.realName,
|
|
148
142
|
avatar: e.avatar,
|
|
149
143
|
size: "small"
|
|
@@ -155,11 +149,11 @@ const {
|
|
|
155
149
|
name: "shanchu",
|
|
156
150
|
size: 18,
|
|
157
151
|
color: "#646a73"
|
|
158
|
-
}, null)], 8, ["onClick"])], 2))], 2),
|
|
152
|
+
}, null)], 8, ["onClick"])], 2))], 2), S()], 2)]
|
|
159
153
|
});
|
|
160
|
-
return () =>
|
|
154
|
+
return () => P();
|
|
161
155
|
}
|
|
162
156
|
});
|
|
163
157
|
export {
|
|
164
|
-
|
|
158
|
+
ee as default
|
|
165
159
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t = Symbol("selectUserContextKey"), l = {
|
|
2
2
|
visible: {
|
|
3
3
|
type: Boolean,
|
|
4
4
|
default: !1
|
|
@@ -33,10 +33,24 @@ const e = Symbol("selectUserContextKey"), t = {
|
|
|
33
33
|
type: Boolean,
|
|
34
34
|
default: !1
|
|
35
35
|
},
|
|
36
|
-
prefix: String
|
|
37
|
-
|
|
36
|
+
prefix: String,
|
|
37
|
+
/**
|
|
38
|
+
* 是否隐藏插槽,只使用 modal
|
|
39
|
+
*/
|
|
40
|
+
hideSlot: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: !1
|
|
43
|
+
}
|
|
44
|
+
}, u = "/security/dept/user/tree", o = {
|
|
45
|
+
"update:visible": (e) => !0,
|
|
46
|
+
"update:modelValue": (e) => !0,
|
|
47
|
+
"delete-user": (e) => !0,
|
|
48
|
+
confirm: (e) => !0,
|
|
49
|
+
cancel: () => !0
|
|
50
|
+
};
|
|
38
51
|
export {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
52
|
+
u as GTE_ORGTREE_URL,
|
|
53
|
+
l as UserSelectorProps,
|
|
54
|
+
t as selectUserContextKey,
|
|
55
|
+
o as userSelectorEmits
|
|
42
56
|
};
|