kso-sel-org 1.0.0
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/dist/index.es.js +343 -0
- package/dist/index.umd.js +1 -0
- package/dist/style.css +1 -0
- package/package.json +51 -0
package/dist/index.es.js
ADDED
@@ -0,0 +1,343 @@
|
|
1
|
+
import { defineComponent as se, useAttrs as de, inject as R, ref as f, watch as F, onMounted as re, resolveComponent as v, openBlock as k, createElementBlock as T, renderSlot as ie, createBlock as M, unref as b, isRef as S, withCtx as m, createVNode as p, createCommentVNode as ue, createTextVNode as O, toDisplayString as j, createElementVNode as s, Fragment as ce, renderList as fe, pushScopeId as pe, popScopeId as he } from "vue";
|
2
|
+
const U = (h) => (pe("data-v-e2b739c9"), h = h(), he(), h), ve = { class: "org-selector" }, ge = { class: "org-list-box" }, _e = { class: "left-tree-box" }, me = { class: "search-box" }, ye = /* @__PURE__ */ U(() => /* @__PURE__ */ s("label", null, "单位列表", -1)), Ce = { class: "tree-content-box" }, ke = { class: "right-selected-list" }, be = /* @__PURE__ */ U(() => /* @__PURE__ */ s("span", null, "已选单位", -1)), xe = { class: "tree-content-box" }, Ne = ["title"], Ve = { class: "org-name" }, Te = { class: "selector-footer" }, Ee = /* @__PURE__ */ se({
|
3
|
+
__name: "index",
|
4
|
+
props: {
|
5
|
+
modelValue: { default: "" },
|
6
|
+
rootOrgId: { default: "" },
|
7
|
+
orgType: { default: "" },
|
8
|
+
inputText: { default: "" },
|
9
|
+
returnValue: { default: "" },
|
10
|
+
readonly: { type: Boolean, default: !0 },
|
11
|
+
isClear: { type: Boolean, default: !0 },
|
12
|
+
disabled: { type: Boolean, default: !1 },
|
13
|
+
buttonText: { default: "选择" },
|
14
|
+
multiple: { type: Boolean, default: !0 },
|
15
|
+
bindEvent: { type: Boolean, default: !0 },
|
16
|
+
defaultText: { type: Boolean, default: !1 },
|
17
|
+
reqParams: { default: void 0 }
|
18
|
+
},
|
19
|
+
emits: ["onCancel", "onSelect", "update:modelValue", "onClear"],
|
20
|
+
setup(h, { emit: g }) {
|
21
|
+
const n = h;
|
22
|
+
let N = de();
|
23
|
+
const V = R("req"), { warningMsgBox: z } = R("msgBox"), $ = {
|
24
|
+
children: "childrenList",
|
25
|
+
label: "orgName"
|
26
|
+
}, r = f(null);
|
27
|
+
let u = f(""), w = f(!1), _ = f(!1), E = f(!1), x = f(""), y = f(""), c = f([]), B = f([]), C = f([]);
|
28
|
+
F(
|
29
|
+
() => n.modelValue,
|
30
|
+
() => {
|
31
|
+
n.defaultText && !E.value && D();
|
32
|
+
}
|
33
|
+
), F(
|
34
|
+
() => n.inputText,
|
35
|
+
(e) => {
|
36
|
+
u.value = e;
|
37
|
+
}
|
38
|
+
);
|
39
|
+
function A() {
|
40
|
+
if (n.modelValue ? C.value = n.modelValue.split(",") : C.value = [], _.value = !0, w.value && r.value) {
|
41
|
+
r.value.setCheckedKeys(C.value), c.value = r.value.getCheckedNodes();
|
42
|
+
return;
|
43
|
+
}
|
44
|
+
H();
|
45
|
+
}
|
46
|
+
function G() {
|
47
|
+
n.bindEvent && A();
|
48
|
+
}
|
49
|
+
function H() {
|
50
|
+
let e = {
|
51
|
+
pid: n.rootOrgId,
|
52
|
+
orgType: n.orgType
|
53
|
+
};
|
54
|
+
n.reqParams && (e = Object.assign(e, n.reqParams)), V.post({ url: getKsoRoot("/sys/org/list-by-condition"), params: e }).then(({ data: l }) => {
|
55
|
+
let t = J(l);
|
56
|
+
t && t.length > 0 && t.forEach((o) => {
|
57
|
+
o.expanded = !0;
|
58
|
+
}), B.value = t, r.value.setCheckedKeys(C.value), w.value = !0;
|
59
|
+
});
|
60
|
+
}
|
61
|
+
function D() {
|
62
|
+
if (!n.modelValue)
|
63
|
+
return;
|
64
|
+
E.value = !0;
|
65
|
+
let e = { ids: n.modelValue };
|
66
|
+
V.post({ url: getKsoRoot("/sys/org/find-by-ids"), params: e }).then(({ data: l }) => {
|
67
|
+
if (l && l.length > 0) {
|
68
|
+
let t = [];
|
69
|
+
l.forEach((o) => {
|
70
|
+
t.push(o.orgName);
|
71
|
+
}), u.value = t.join(",");
|
72
|
+
}
|
73
|
+
});
|
74
|
+
}
|
75
|
+
function J(e) {
|
76
|
+
return e.forEach((l) => {
|
77
|
+
l.name = l.orgName, C.value.length > 0 && C.value.includes(l.id) && c.value.push(l);
|
78
|
+
let t = [];
|
79
|
+
e.forEach((o) => {
|
80
|
+
o.pid == l.id && t.push(o);
|
81
|
+
}), l.childrenList = t;
|
82
|
+
}), e = e.filter((l) => l.pid == ""), e;
|
83
|
+
}
|
84
|
+
function Q(e, { node: l, data: t }) {
|
85
|
+
t.expanded && (l.expanded = !0);
|
86
|
+
let o = "tree-file-node-icon";
|
87
|
+
l.childNodes && l.childNodes.length > 0 && (o = "tree-folder-node-icon");
|
88
|
+
let a = [];
|
89
|
+
if (!n.multiple) {
|
90
|
+
let i = "";
|
91
|
+
t.id === x.value && (i = t.id), a.push(
|
92
|
+
e(v("el-radio"), {
|
93
|
+
modelValue: i,
|
94
|
+
label: t.id,
|
95
|
+
size: "large"
|
96
|
+
})
|
97
|
+
);
|
98
|
+
}
|
99
|
+
return a.push(
|
100
|
+
e("i", {
|
101
|
+
class: o,
|
102
|
+
style: {
|
103
|
+
marginRight: "5px"
|
104
|
+
}
|
105
|
+
})
|
106
|
+
), a.push(
|
107
|
+
e(
|
108
|
+
"span",
|
109
|
+
{
|
110
|
+
attrs: {
|
111
|
+
title: t.name
|
112
|
+
}
|
113
|
+
},
|
114
|
+
t.name
|
115
|
+
)
|
116
|
+
), e("span", { class: "node-text-box" }, a);
|
117
|
+
}
|
118
|
+
function W(e, l) {
|
119
|
+
return e ? l.name.indexOf(e) !== -1 || l.id.indexOf(e) !== -1 : !0;
|
120
|
+
}
|
121
|
+
function X() {
|
122
|
+
r.value.filter(y.value), y.value || Y(B.value[0].id, !1);
|
123
|
+
}
|
124
|
+
function Y(e, l) {
|
125
|
+
var t = r.value.store.nodesMap;
|
126
|
+
for (let o in t)
|
127
|
+
e === o ? t[o].expanded = !0 : t[o].expanded = l;
|
128
|
+
}
|
129
|
+
function Z(e) {
|
130
|
+
n.multiple || (r.value.setCheckedNodes([e]), x.value = e.id), c.value = r.value.getCheckedNodes();
|
131
|
+
}
|
132
|
+
function ee(e, l) {
|
133
|
+
c.value.splice(l, 1), x.value = "", r.value.setCheckedNodes(c.value);
|
134
|
+
}
|
135
|
+
function L() {
|
136
|
+
c.value = [], x.value = "", r.value && r.value.setCheckedNodes(c.value);
|
137
|
+
}
|
138
|
+
function q() {
|
139
|
+
_.value = !1, g("onCancel", "");
|
140
|
+
}
|
141
|
+
function le() {
|
142
|
+
if (c.value.length == 0)
|
143
|
+
return z("请选择数据"), !1;
|
144
|
+
let e = te(c.value);
|
145
|
+
oe(e), _.value = !1, g("onSelect", e);
|
146
|
+
}
|
147
|
+
function te(e) {
|
148
|
+
let l = [];
|
149
|
+
return e.forEach((t) => {
|
150
|
+
let o = {
|
151
|
+
id: t.id,
|
152
|
+
orgName: t.orgName,
|
153
|
+
orgType: t.orgType,
|
154
|
+
sname: t.sname,
|
155
|
+
fname: t.fname,
|
156
|
+
regId: t.regId,
|
157
|
+
regName: t.regName,
|
158
|
+
cityId: t.cityId,
|
159
|
+
cityName: t.cityName
|
160
|
+
};
|
161
|
+
l.push(o);
|
162
|
+
}), l;
|
163
|
+
}
|
164
|
+
function oe(e) {
|
165
|
+
let l = {};
|
166
|
+
Object.keys(e[0]).forEach((o) => {
|
167
|
+
l[o] = [];
|
168
|
+
}), e.forEach((o) => {
|
169
|
+
var a;
|
170
|
+
for (let i in o)
|
171
|
+
(a = l[i]) == null || a.push(o[i]);
|
172
|
+
}), u.value = l.orgName.join(","), g("update:modelValue", l.id.join(","));
|
173
|
+
let t = n.returnValue.split("|");
|
174
|
+
t && t.length > 0 && t.forEach((o) => {
|
175
|
+
let a = o.split(":");
|
176
|
+
if (a && a.length > 1) {
|
177
|
+
let i = l[a[1]], I = i ? i.join(",") : "";
|
178
|
+
N.sync[a[0]] = I;
|
179
|
+
}
|
180
|
+
});
|
181
|
+
}
|
182
|
+
function K() {
|
183
|
+
if (u.value = "", g("update:modelValue", ""), n.returnValue) {
|
184
|
+
let e = n.returnValue.split("|");
|
185
|
+
e && e.length > 0 && e.forEach((l) => {
|
186
|
+
let t = l.split(":");
|
187
|
+
t && t.length > 1 && (N.sync[t[0]] = "");
|
188
|
+
});
|
189
|
+
}
|
190
|
+
L(), g("onClear", "");
|
191
|
+
}
|
192
|
+
return re(() => {
|
193
|
+
n.defaultText && !E.value ? D() : u.value = n.inputText, n.multiple || (x.value = n.modelValue);
|
194
|
+
}), (e, l) => {
|
195
|
+
const t = v("CircleClose"), o = v("el-icon"), a = v("el-button"), i = v("el-input"), I = v("el-tree"), ne = v("CircleCloseFilled"), ae = v("el-dialog");
|
196
|
+
return k(), T("div", ve, [
|
197
|
+
e.$slots.func ? (k(), T("div", {
|
198
|
+
key: 0,
|
199
|
+
class: "slot-box",
|
200
|
+
onClick: G
|
201
|
+
}, [
|
202
|
+
ie(e.$slots, "func", {}, void 0, !0)
|
203
|
+
])) : (k(), M(i, {
|
204
|
+
key: 1,
|
205
|
+
modelValue: b(u),
|
206
|
+
"onUpdate:modelValue": l[0] || (l[0] = (d) => S(u) ? u.value = d : u = d),
|
207
|
+
disabled: e.disabled,
|
208
|
+
readonly: e.readonly,
|
209
|
+
clearable: "",
|
210
|
+
onClear: K,
|
211
|
+
placeholder: ""
|
212
|
+
}, {
|
213
|
+
append: m(() => [
|
214
|
+
b(u) && e.isClear && e.readonly ? (k(), M(o, {
|
215
|
+
key: 0,
|
216
|
+
onClickCapture: K
|
217
|
+
}, {
|
218
|
+
default: m(() => [
|
219
|
+
p(t)
|
220
|
+
]),
|
221
|
+
_: 1
|
222
|
+
})) : ue("", !0),
|
223
|
+
p(a, {
|
224
|
+
type: "primary",
|
225
|
+
disabled: e.disabled,
|
226
|
+
onClick: A
|
227
|
+
}, {
|
228
|
+
default: m(() => [
|
229
|
+
O(j(e.buttonText), 1)
|
230
|
+
]),
|
231
|
+
_: 1
|
232
|
+
}, 8, ["disabled"])
|
233
|
+
]),
|
234
|
+
_: 1
|
235
|
+
}, 8, ["modelValue", "disabled", "readonly"])),
|
236
|
+
p(ae, {
|
237
|
+
title: "单位选择",
|
238
|
+
modelValue: b(_),
|
239
|
+
"onUpdate:modelValue": l[2] || (l[2] = (d) => S(_) ? _.value = d : _ = d),
|
240
|
+
onClose: q,
|
241
|
+
width: 1e3
|
242
|
+
}, {
|
243
|
+
default: m(() => [
|
244
|
+
s("div", ge, [
|
245
|
+
s("div", _e, [
|
246
|
+
s("div", me, [
|
247
|
+
ye,
|
248
|
+
p(i, {
|
249
|
+
modelValue: b(y),
|
250
|
+
"onUpdate:modelValue": l[1] || (l[1] = (d) => S(y) ? y.value = d : y = d),
|
251
|
+
"suffix-icon": "Search",
|
252
|
+
onInput: X,
|
253
|
+
placeholder: "请输入单位名称查询"
|
254
|
+
}, null, 8, ["modelValue"])
|
255
|
+
]),
|
256
|
+
s("div", Ce, [
|
257
|
+
p(I, {
|
258
|
+
data: b(B),
|
259
|
+
ref_key: "orgTree",
|
260
|
+
ref: r,
|
261
|
+
"node-key": "id",
|
262
|
+
props: $,
|
263
|
+
"expand-on-click-node": !1,
|
264
|
+
"show-checkbox": e.multiple,
|
265
|
+
"check-strictly": !0,
|
266
|
+
"highlight-current": !0,
|
267
|
+
accordion: !0,
|
268
|
+
"check-on-click-node": !0,
|
269
|
+
"filter-node-method": W,
|
270
|
+
indent: 26,
|
271
|
+
onCheck: Z,
|
272
|
+
"render-content": Q,
|
273
|
+
"icon-class": "el-icon-arrow-right"
|
274
|
+
}, null, 8, ["data", "show-checkbox"])
|
275
|
+
])
|
276
|
+
]),
|
277
|
+
s("div", ke, [
|
278
|
+
s("div", { class: "selected-box" }, [
|
279
|
+
be,
|
280
|
+
s("div", { title: "删除全部" }, [
|
281
|
+
s("i", {
|
282
|
+
onClick: L,
|
283
|
+
class: "delete-btn"
|
284
|
+
})
|
285
|
+
])
|
286
|
+
]),
|
287
|
+
s("div", null, [
|
288
|
+
s("div", xe, [
|
289
|
+
s("ul", null, [
|
290
|
+
(k(!0), T(ce, null, fe(b(c), (d, P) => (k(), T("li", {
|
291
|
+
key: P + "s",
|
292
|
+
title: d.orgName + "(" + d.id + ")"
|
293
|
+
}, [
|
294
|
+
s("span", Ve, j(d.orgName) + "(" + j(d.id) + ") ", 1),
|
295
|
+
p(o, {
|
296
|
+
onClick: (Ie) => ee(d, P),
|
297
|
+
color: "#909399",
|
298
|
+
size: "16"
|
299
|
+
}, {
|
300
|
+
default: m(() => [
|
301
|
+
p(ne)
|
302
|
+
]),
|
303
|
+
_: 2
|
304
|
+
}, 1032, ["onClick"])
|
305
|
+
], 8, Ne))), 128))
|
306
|
+
])
|
307
|
+
])
|
308
|
+
])
|
309
|
+
])
|
310
|
+
]),
|
311
|
+
s("div", Te, [
|
312
|
+
p(a, { onClick: q }, {
|
313
|
+
default: m(() => [
|
314
|
+
O("取消")
|
315
|
+
]),
|
316
|
+
_: 1
|
317
|
+
}),
|
318
|
+
p(a, {
|
319
|
+
type: "primary",
|
320
|
+
onClick: le
|
321
|
+
}, {
|
322
|
+
default: m(() => [
|
323
|
+
O("确认")
|
324
|
+
]),
|
325
|
+
_: 1
|
326
|
+
})
|
327
|
+
])
|
328
|
+
]),
|
329
|
+
_: 1
|
330
|
+
}, 8, ["modelValue"])
|
331
|
+
]);
|
332
|
+
};
|
333
|
+
}
|
334
|
+
});
|
335
|
+
const Be = (h, g) => {
|
336
|
+
const n = h.__vccOpts || h;
|
337
|
+
for (const [N, V] of g)
|
338
|
+
n[N] = V;
|
339
|
+
return n;
|
340
|
+
}, Oe = /* @__PURE__ */ Be(Ee, [["__scopeId", "data-v-e2b739c9"]]);
|
341
|
+
export {
|
342
|
+
Oe as default
|
343
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(e,m){typeof exports=="object"&&typeof module<"u"?module.exports=m(require("vue")):typeof define=="function"&&define.amd?define(["vue"],m):(e=typeof globalThis<"u"?globalThis:e||self,e["kso-dic"]=m(e.Vue))})(this,function(e){"use strict";const m=u=>(e.pushScopeId("data-v-e2b739c9"),u=u(),e.popScopeId(),u),O={class:"org-selector"},j={class:"org-list-box"},D={class:"left-tree-box"},A={class:"search-box"},L=m(()=>e.createElementVNode("label",null,"单位列表",-1)),q={class:"tree-content-box"},R={class:"right-selected-list"},K=m(()=>e.createElementVNode("span",null,"已选单位",-1)),P={class:"tree-content-box"},F=["title"],M={class:"org-name"},U={class:"selector-footer"},z=e.defineComponent({__name:"index",props:{modelValue:{default:""},rootOrgId:{default:""},orgType:{default:""},inputText:{default:""},returnValue:{default:""},readonly:{type:Boolean,default:!0},isClear:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},buttonText:{default:"选择"},multiple:{type:Boolean,default:!0},bindEvent:{type:Boolean,default:!0},defaultText:{type:Boolean,default:!1},reqParams:{default:void 0}},emits:["onCancel","onSelect","update:modelValue","onClear"],setup(u,{emit:p}){const a=u;let V=e.useAttrs();const y=e.inject("req"),{warningMsgBox:$}=e.inject("msgBox"),G={children:"childrenList",label:"orgName"},s=e.ref(null);let c=e.ref(""),b=e.ref(!1),h=e.ref(!1),C=e.ref(!1),N=e.ref(""),g=e.ref(""),f=e.ref([]),k=e.ref([]),_=e.ref([]);e.watch(()=>a.modelValue,()=>{a.defaultText&&!C.value&&T()}),e.watch(()=>a.inputText,t=>{c.value=t});function E(){if(a.modelValue?_.value=a.modelValue.split(","):_.value=[],h.value=!0,b.value&&s.value){s.value.setCheckedKeys(_.value),f.value=s.value.getCheckedNodes();return}J()}function H(){a.bindEvent&&E()}function J(){let t={pid:a.rootOrgId,orgType:a.orgType};a.reqParams&&(t=Object.assign(t,a.reqParams)),y.post({url:getKsoRoot("/sys/org/list-by-condition"),params:t}).then(({data:l})=>{let o=Q(l);o&&o.length>0&&o.forEach(n=>{n.expanded=!0}),k.value=o,s.value.setCheckedKeys(_.value),b.value=!0})}function T(){if(!a.modelValue)return;C.value=!0;let t={ids:a.modelValue};y.post({url:getKsoRoot("/sys/org/find-by-ids"),params:t}).then(({data:l})=>{if(l&&l.length>0){let o=[];l.forEach(n=>{o.push(n.orgName)}),c.value=o.join(",")}})}function Q(t){return t.forEach(l=>{l.name=l.orgName,_.value.length>0&&_.value.includes(l.id)&&f.value.push(l);let o=[];t.forEach(n=>{n.pid==l.id&&o.push(n)}),l.childrenList=o}),t=t.filter(l=>l.pid==""),t}function W(t,{node:l,data:o}){o.expanded&&(l.expanded=!0);let n="tree-file-node-icon";l.childNodes&&l.childNodes.length>0&&(n="tree-folder-node-icon");let r=[];if(!a.multiple){let i="";o.id===N.value&&(i=o.id),r.push(t(e.resolveComponent("el-radio"),{modelValue:i,label:o.id,size:"large"}))}return r.push(t("i",{class:n,style:{marginRight:"5px"}})),r.push(t("span",{attrs:{title:o.name}},o.name)),t("span",{class:"node-text-box"},r)}function X(t,l){return t?l.name.indexOf(t)!==-1||l.id.indexOf(t)!==-1:!0}function Y(){s.value.filter(g.value),g.value||Z(k.value[0].id,!1)}function Z(t,l){var o=s.value.store.nodesMap;for(let n in o)t===n?o[n].expanded=!0:o[n].expanded=l}function v(t){a.multiple||(s.value.setCheckedNodes([t]),N.value=t.id),f.value=s.value.getCheckedNodes()}function ee(t,l){f.value.splice(l,1),N.value="",s.value.setCheckedNodes(f.value)}function B(){f.value=[],N.value="",s.value&&s.value.setCheckedNodes(f.value)}function w(){h.value=!1,p("onCancel","")}function te(){if(f.value.length==0)return $("请选择数据"),!1;let t=le(f.value);oe(t),h.value=!1,p("onSelect",t)}function le(t){let l=[];return t.forEach(o=>{let n={id:o.id,orgName:o.orgName,orgType:o.orgType,sname:o.sname,fname:o.fname,regId:o.regId,regName:o.regName,cityId:o.cityId,cityName:o.cityName};l.push(n)}),l}function oe(t){let l={};Object.keys(t[0]).forEach(n=>{l[n]=[]}),t.forEach(n=>{var r;for(let i in n)(r=l[i])==null||r.push(n[i])}),c.value=l.orgName.join(","),p("update:modelValue",l.id.join(","));let o=a.returnValue.split("|");o&&o.length>0&&o.forEach(n=>{let r=n.split(":");if(r&&r.length>1){let i=l[r[1]],x=i?i.join(","):"";V.sync[r[0]]=x}})}function S(){if(c.value="",p("update:modelValue",""),a.returnValue){let t=a.returnValue.split("|");t&&t.length>0&&t.forEach(l=>{let o=l.split(":");o&&o.length>1&&(V.sync[o[0]]="")})}B(),p("onClear","")}return e.onMounted(()=>{a.defaultText&&!C.value?T():c.value=a.inputText,a.multiple||(N.value=a.modelValue)}),(t,l)=>{const o=e.resolveComponent("CircleClose"),n=e.resolveComponent("el-icon"),r=e.resolveComponent("el-button"),i=e.resolveComponent("el-input"),x=e.resolveComponent("el-tree"),ne=e.resolveComponent("CircleCloseFilled"),ae=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",O,[t.$slots.func?(e.openBlock(),e.createElementBlock("div",{key:0,class:"slot-box",onClick:H},[e.renderSlot(t.$slots,"func",{},void 0,!0)])):(e.openBlock(),e.createBlock(i,{key:1,modelValue:e.unref(c),"onUpdate:modelValue":l[0]||(l[0]=d=>e.isRef(c)?c.value=d:c=d),disabled:t.disabled,readonly:t.readonly,clearable:"",onClear:S,placeholder:""},{append:e.withCtx(()=>[e.unref(c)&&t.isClear&&t.readonly?(e.openBlock(),e.createBlock(n,{key:0,onClickCapture:S},{default:e.withCtx(()=>[e.createVNode(o)]),_:1})):e.createCommentVNode("",!0),e.createVNode(r,{type:"primary",disabled:t.disabled,onClick:E},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.buttonText),1)]),_:1},8,["disabled"])]),_:1},8,["modelValue","disabled","readonly"])),e.createVNode(ae,{title:"单位选择",modelValue:e.unref(h),"onUpdate:modelValue":l[2]||(l[2]=d=>e.isRef(h)?h.value=d:h=d),onClose:w,width:1e3},{default:e.withCtx(()=>[e.createElementVNode("div",j,[e.createElementVNode("div",D,[e.createElementVNode("div",A,[L,e.createVNode(i,{modelValue:e.unref(g),"onUpdate:modelValue":l[1]||(l[1]=d=>e.isRef(g)?g.value=d:g=d),"suffix-icon":"Search",onInput:Y,placeholder:"请输入单位名称查询"},null,8,["modelValue"])]),e.createElementVNode("div",q,[e.createVNode(x,{data:e.unref(k),ref_key:"orgTree",ref:s,"node-key":"id",props:G,"expand-on-click-node":!1,"show-checkbox":t.multiple,"check-strictly":!0,"highlight-current":!0,accordion:!0,"check-on-click-node":!0,"filter-node-method":X,indent:26,onCheck:v,"render-content":W,"icon-class":"el-icon-arrow-right"},null,8,["data","show-checkbox"])])]),e.createElementVNode("div",R,[e.createElementVNode("div",{class:"selected-box"},[K,e.createElementVNode("div",{title:"删除全部"},[e.createElementVNode("i",{onClick:B,class:"delete-btn"})])]),e.createElementVNode("div",null,[e.createElementVNode("div",P,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),(d,I)=>(e.openBlock(),e.createElementBlock("li",{key:I+"s",title:d.orgName+"("+d.id+")"},[e.createElementVNode("span",M,e.toDisplayString(d.orgName)+"("+e.toDisplayString(d.id)+") ",1),e.createVNode(n,{onClick:ie=>ee(d,I),color:"#909399",size:"16"},{default:e.withCtx(()=>[e.createVNode(ne)]),_:2},1032,["onClick"])],8,F))),128))])])])])]),e.createElementVNode("div",U,[e.createVNode(r,{onClick:w},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(r,{type:"primary",onClick:te},{default:e.withCtx(()=>[e.createTextVNode("确认")]),_:1})])]),_:1},8,["modelValue"])])}}}),re="";return((u,p)=>{const a=u.__vccOpts||u;for(const[V,y]of p)a[V]=y;return a})(z,[["__scopeId","data-v-e2b739c9"]])});
|
package/dist/style.css
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
.org-list-box[data-v-e2b739c9]{padding:10px;display:flex;justify-content:space-between;box-sizing:border-box}.org-list-box .left-tree-box[data-v-e2b739c9]{border:1px solid #ebeef5;width:50%;overflow:hidden}.org-list-box .left-tree-box .search-box[data-v-e2b739c9]{height:52px;padding:5px 12px;background:#f0f2f5;box-sizing:border-box;display:flex;align-items:center}.org-list-box .left-tree-box .search-box label[data-v-e2b739c9]{color:#303133;font-weight:700}.org-list-box .left-tree-box .search-box[data-v-e2b739c9] .el-input{width:calc(100% - 100px);margin-left:10px}.org-list-box .right-selected-list[data-v-e2b739c9]{border:1px solid #ebeef5;width:48%}.org-list-box .right-selected-list .selected-box[data-v-e2b739c9]{height:52px;padding:5px 12px;background:#f0f2f5;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between}.org-list-box .right-selected-list .selected-box span[data-v-e2b739c9]{color:#303133;font-weight:700}.org-list-box .right-selected-list .selected-box .delete-btn[data-v-e2b739c9]{display:inline-block;width:17px;height:17px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAADkSURBVDiN7ZOxccJAEEXfwiX2EFCCSnAHhkoM+V4NtKAZRCw6kVwCHUAHDixImPsOPJ5BMrKsGYd+4d79d/+CNTqc3SvBojv/wqB+LIrl7Sxc3FuBBPM+AYBg3s2EBNVPoTs8dTNBZmuTMmCD2V7wOmQxeEZamVme4GAAF/dFgkpm69l2ux+SvMe4MqmcwPKhKOrJyK/cpVfSuKuJsQRoYiwbd42W/EmTf8l3DGqkE4BSOhjUfXdD38Htks12uxzIRzcZQ6uJwebs/jIUktTa9E9JCEeu1zekTJD96nmzI9PpEeADOClObZiMikMAAAAASUVORK5CYII=) no-repeat;block-size:100% 100%}.org-list-box .right-selected-list[data-v-e2b739c9] .el-icon svg{width:1.5em;height:1.5em}.org-list-box .tree-content-box[data-v-e2b739c9]{height:420px;padding:5px 15px;box-sizing:border-box;overflow:auto}.org-list-box ul li[data-v-e2b739c9]{width:100%;line-height:40px;display:flex;align-items:center;justify-content:space-between;border:solid 1px #d7dde4;border-radius:4px;margin-bottom:8px;padding:0 20px;box-sizing:border-box}.org-list-box ul .org-name[data-v-e2b739c9]{width:92%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.org-list-box ul[data-v-e2b739c9] .el-icon{cursor:pointer}.org-list-box .org-del .img-box[data-v-e2b739c9]{margin:7px 0 0;cursor:pointer}.org-list-box .flow-modal-title[data-v-e2b739c9]{height:40px;background:#2b5fda;width:100%;text-indent:1em;color:#fff;line-height:40px}.selector-footer[data-v-e2b739c9]{padding:10px;display:flex;justify-content:flex-end;border-top:solid 1px #dcdfe6}[data-v-e2b739c9] .tree-folder-node-icon{display:inline-block;width:18px;height:18px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAIvSURBVFiF7ZaxaxRBFMZ/73JFhBQWlhIDXmGRIoKFxR1OYboIFloKu7cBAyLEykpIYSFYi4W32QQFiwTyDwhOsaJgm+KKNFpdYRkkYJJncZO7SW7vdu+SgMH74Ir5bt77vn3v7czCGP87JG+DSfQtytIZajb5Q80+ll8ApdztZysOcIMJ7h4tykME7iCkI8sqFaAKgDA5vAEhtaGEo+qbWAPEGfCQ34JzRvEKKHOmobN2UbZ92sSaADBBagOJAcyaRhy0n9ZGg6s2TAXmKPHdrOqDY6wQIASoV16l2uFzMNCAeae3T1CTwIZJ9Hlh2zno2wLT0PsI7z1qG5gFQHllEp3hB09tXXrOEjeshQY2swIm1mWEDYQpR63zk5vAQ2DPmVhimi3zRqeychTFsQqYFS1zjdcoyx3ykBd2UV661aaJtYWwBVwBFrjEZ5PoPRtKy3uAKsJ1AFuX9UEGOhUwK1pmmo+e+D7wyBMHwEaSItSAHUfdQvlqGlrxskbAmvsNRLcFV1kAjiZ8F2He1uVDVpANpYlQQ/jmqBlKjDSYXQPCZY9/ZkOxgwJtKC1+M+/Fd9t5SIwSovmDmP0WKPt5gQD2ieyaVe3lI0mh2L1xMY5ik2iCtk+1rPf+NPsvRgWGhvIl/1vrHA3YujSARpG9/2gLhMjEeqez9q7azv1/Ekq173/tnJUsumtA2fP6Vs36fHKJgj4SlX4iPVB3oeG34IBPQLNQgtOh6bTGGAOAv4Uio5lixzLEAAAAAElFTkSuQmCC) no-repeat;background-size:100% 100%}[data-v-e2b739c9] .tree-file-node-icon{display:inline-block;width:18px;height:18px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAJxSURBVFiF7Za/a1NRFMc/5zWFCh07ZBBF6NDBoUOhFjpchw5iCwpdHARfWiEigotTl4CjiyBSi315gRa6VByiOEjoFYQ6dHToUBBbh/wBoS0YehzeTWh+vDRJ0xahXwiEc8893+89P+598D/DLOmQWdKh08TwuibP6iz97NHPnsnq7LkKMIGmUdaAAWAAZc0Emj4XASarCwiLCImqUUggLJqsLnQaT9omzmiC67xCee5MZeCJ+78ITpDwmt+8sBkp90yAyWiCa6wBlVqXAN+mZB1cP0AIDLr1dXZ50I6IEwWYtzrIFfKAqZIrd+ycfK/xC3QS4csxEZYDZuxTKXUtwISaRMkDY85URLhtfdmO8R9B2QCSzrSFMGN9KcZxxDahWdZhF6xCvo0wEUcOYH3ZRpgAKj5jKBtmWYfj9jTNgFnWm3h8rZ5E+AHcb3WSmv2hJoGPKLecqcgRU3Zeftb7NmTA1XKzSq4U2GeqXXIA60uRfaZQCs6URNg0gU7W+9ZkwHXzCtEFE2GX/nZHqh5uev4eMx0CDyvTUyPA3WRvai4YwKakeZmyOo1wFwDls03Jpxg/rTEoZeCZnZN34EpgQh3BYxyPVYQcsNPyZFl9CeRR0ihpIG8CzbTaA+wg5PBYxWPchDoCcU0YaojyCBozYN7rVTx+1WcKpcwRN+xj+VMnNsqAkLO++PVcnT9GfYw2kEcECfoY7TRc5wKU+GlotdYrAXZOtoBvTcgLbu1sBQBwwDRKQPQolVACDrnXTajGWrYB98DMu9+p0PUnWa9wKeDCBZzYhCbQ8EIFINGVfFZoXgLlA9GM9wolF/MSl2jAP+MZ1PXRPKaQAAAAAElFTkSuQmCC) no-repeat;background-size:100% 100%}[data-v-e2b739c9] .el-input{height:32px}[data-v-e2b739c9] .node-text-box{display:flex;align-items:center}[data-v-e2b739c9] .node-text-box .el-radio{margin-right:5px}[data-v-e2b739c9] .node-text-box .el-radio .el-radio__label{display:none}[data-v-e2b739c9] .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{background-color:#f0f5ff}[data-v-e2b739c9] .el-input__icon{color:#a8abb2}[data-v-e2b739c9] .el-input-group__append{position:relative}[data-v-e2b739c9] .el-input-group__append .el-icon{position:absolute;left:-24px;top:9px;z-index:2;cursor:pointer}[data-v-e2b739c9]::-webkit-scrollbar{width:5px}[data-v-e2b739c9]::-webkit-scrollbar-thumb{border-radius:3px;background:#b7c7dd}[data-v-e2b739c9]::-webkit-scrollbar-track{border-radius:3px;background:#ededed}
|
package/package.json
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
{
|
2
|
+
"name": "kso-sel-org",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "机构选择",
|
5
|
+
"main": "dist/index.umd.js",
|
6
|
+
"module": "dist/index.es.js",
|
7
|
+
"style": "dist/style.css",
|
8
|
+
"types": "dist/index.d.ts",
|
9
|
+
"files": [
|
10
|
+
"dist"
|
11
|
+
],
|
12
|
+
"scripts": {
|
13
|
+
"dev": "vite",
|
14
|
+
"build": "vue-tsc --noEmit && vite build",
|
15
|
+
"build:no-vue-tsc": "vite build",
|
16
|
+
"preview": "vite preview"
|
17
|
+
},
|
18
|
+
"dependencies": {
|
19
|
+
"axios": "^1.6.2",
|
20
|
+
"element-plus": "^2.3.8",
|
21
|
+
"element-resize-detector": "^1.2.4",
|
22
|
+
"kso-dic": "^1.0.0",
|
23
|
+
"kso-sel-reg": "^1.0.1",
|
24
|
+
"less": "^4.1.3",
|
25
|
+
"less-loader": "^11.1.3",
|
26
|
+
"qs": "^6.11.2",
|
27
|
+
"template_js": "^3.1.4",
|
28
|
+
"unplugin-auto-import": "^0.17.2",
|
29
|
+
"vite-plugin-dts": "3.4.0",
|
30
|
+
"vue": "3.3.4",
|
31
|
+
"vue-router": "^4.2.4",
|
32
|
+
"vue-types": "^5.1.0",
|
33
|
+
"vue-virtual-list-xg": "^0.0.9"
|
34
|
+
},
|
35
|
+
"devDependencies": {
|
36
|
+
"@types/node": "^20.3.3",
|
37
|
+
"@vitejs/plugin-vue": "^4.1.0",
|
38
|
+
"sass": "^1.69.5",
|
39
|
+
"typescript": "^5.0.2",
|
40
|
+
"vite": "^4.3.9",
|
41
|
+
"vite-plugin-eslint": "^1.8.1",
|
42
|
+
"vue-tsc": "^1.4.2"
|
43
|
+
},
|
44
|
+
"keywords": [
|
45
|
+
"kso-sel-org",
|
46
|
+
"kso",
|
47
|
+
"vue3"
|
48
|
+
],
|
49
|
+
"author": "kusafe",
|
50
|
+
"license": "MIT"
|
51
|
+
}
|