kso-sel-org 1.0.9 → 1.0.11

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/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import ksoSelOrg from "./types/org-selector";
2
+ export { ksoSelOrg };
package/index.js ADDED
@@ -0,0 +1,367 @@
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("[data-v-bb722cb4] .org-list-box{padding:10px;display:flex;justify-content:space-between;box-sizing:border-box}[data-v-bb722cb4] .org-list-box .left-tree-box{border:1px solid #ebeef5;width:50%;overflow:hidden}[data-v-bb722cb4] .org-list-box .left-tree-box .search-box{height:52px;padding:5px 12px;background:#f0f2f5;box-sizing:border-box;display:flex;align-items:center}[data-v-bb722cb4] .org-list-box .left-tree-box .search-box label{color:#303133;font-weight:700;white-space:nowrap}[data-v-bb722cb4] .org-list-box .left-tree-box .search-box .el-input{width:100%;margin-left:10px}[data-v-bb722cb4] .org-list-box .right-selected-list{border:1px solid #ebeef5;width:48%}[data-v-bb722cb4] .org-list-box .right-selected-list .selected-box{height:52px;padding:5px 12px;background:#f0f2f5;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between}[data-v-bb722cb4] .org-list-box .right-selected-list .selected-box span{color:#303133;font-weight:700}[data-v-bb722cb4] .org-list-box .right-selected-list .selected-box .delete-btn{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%;cursor:pointer}[data-v-bb722cb4] .org-list-box .right-selected-list .el-icon svg{width:1.5em;height:1.5em}[data-v-bb722cb4] .org-list-box .tree-content-box{height:420px;padding:5px 15px;box-sizing:border-box;overflow:auto}[data-v-bb722cb4] .org-list-box ul li{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}[data-v-bb722cb4] .org-list-box ul .org-name{width:92%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[data-v-bb722cb4] .org-list-box ul .el-icon{cursor:pointer}[data-v-bb722cb4] .org-list-box .org-del .img-box{margin:7px 0 0;cursor:pointer}[data-v-bb722cb4] .org-list-box .flow-modal-title{height:40px;background:#2b5fda;width:100%;text-indent:1em;color:#fff;line-height:40px}.selector-footer[data-v-bb722cb4]{padding:10px;display:flex;justify-content:flex-end;border-top:solid 1px #dcdfe6}[data-v-bb722cb4] .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-bb722cb4] .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-bb722cb4] .el-input{height:32px}[data-v-bb722cb4] .node-text-box{display:flex;align-items:center}[data-v-bb722cb4] .node-text-box .el-radio{margin-right:5px}[data-v-bb722cb4] .node-text-box .el-radio .el-radio__label{display:none}[data-v-bb722cb4] .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{background-color:#f0f5ff}[data-v-bb722cb4] .el-input__icon{color:#a8abb2}[data-v-bb722cb4]::-webkit-scrollbar{width:5px}[data-v-bb722cb4]::-webkit-scrollbar-thumb{border-radius:3px;background:#b7c7dd}[data-v-bb722cb4]::-webkit-scrollbar-track{border-radius:3px;background:#ededed}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
+ import { defineComponent as P, useAttrs as ne, inject as R, ref as c, watch as M, onMounted as ae, resolveComponent as f, openBlock as C, createElementBlock as I, createVNode as o, unref as k, renderSlot as ue, createBlock as U, isRef as z, withCtx as h, createCommentVNode as re, createTextVNode as v, toDisplayString as de, createElementVNode as ie } from "vue";
3
+ import { CircleCloseFilled as se } from "@element-plus/icons-vue";
4
+ const ce = {
5
+ key: 0,
6
+ class: "org-selector"
7
+ }, fe = {
8
+ key: 1,
9
+ class: "org-selector"
10
+ }, pe = {
11
+ class: "selector-footer"
12
+ }, ve = /* @__PURE__ */ P({
13
+ __name: "index",
14
+ props: {
15
+ notDialog: {
16
+ type: Boolean
17
+ },
18
+ modelValue: {
19
+ default: ""
20
+ },
21
+ rootOrgId: {
22
+ default: ""
23
+ },
24
+ orgType: {
25
+ default: ""
26
+ },
27
+ inputText: {
28
+ default: ""
29
+ },
30
+ returnValue: {
31
+ default: ""
32
+ },
33
+ readonly: {
34
+ type: Boolean,
35
+ default: !0
36
+ },
37
+ isClear: {
38
+ type: Boolean,
39
+ default: !0
40
+ },
41
+ disabled: {
42
+ type: Boolean,
43
+ default: !1
44
+ },
45
+ buttonText: {
46
+ default: "选择"
47
+ },
48
+ multiple: {
49
+ type: Boolean,
50
+ default: !0
51
+ },
52
+ bindEvent: {
53
+ type: Boolean,
54
+ default: !0
55
+ },
56
+ defaultText: {
57
+ type: Boolean,
58
+ default: !1
59
+ },
60
+ reqParams: {
61
+ default: void 0
62
+ }
63
+ },
64
+ emits: ["onCancel", "onSelect", "update:modelValue", "onClear"],
65
+ setup(_, {
66
+ expose: T,
67
+ emit: x
68
+ }) {
69
+ const n = _;
70
+ let N = ne();
71
+ const m = x, S = R("req"), {
72
+ warningMsgBox: $
73
+ } = R("msgBox"), G = {
74
+ children: "childrenList",
75
+ label: "orgName"
76
+ }, r = c(null);
77
+ let i = c(""), j = c(!1), p = c(!1), E = c(!1), y = c(""), V = c(""), d = c([]), B = c([]), g = c([]);
78
+ M(() => n.modelValue, () => {
79
+ n.defaultText && !E.value && F();
80
+ }), M(() => n.inputText, (e) => {
81
+ i.value = e;
82
+ });
83
+ const A = /* @__PURE__ */ P({
84
+ render() {
85
+ return o("div", {
86
+ class: "org-list-box"
87
+ }, [o("div", {
88
+ class: "left-tree-box"
89
+ }, [o("div", {
90
+ class: "search-box"
91
+ }, [o("label", null, [v("单位列表")]), o(f("el-input"), {
92
+ modelValue: V.value,
93
+ "onUpdate:modelValue": (e) => V.value = e,
94
+ "suffix-icon": f("Search"),
95
+ onInput: Y,
96
+ placeholder: "请输入单位名称查询"
97
+ }, null)]), o("div", {
98
+ class: "tree-content-box"
99
+ }, [o(f("el-tree"), {
100
+ ref: (e) => r.value = e,
101
+ data: B.value,
102
+ "node-key": "id",
103
+ props: G,
104
+ "expand-on-click-node": !1,
105
+ "show-checkbox": n.multiple,
106
+ "check-strictly": !0,
107
+ "highlight-current": !0,
108
+ accordion: !0,
109
+ "check-on-click-node": !0,
110
+ "filter-node-method": X,
111
+ indent: 26,
112
+ onCheck: ee,
113
+ "render-content": W,
114
+ "icon-class": "el-icon-arrow-right"
115
+ }, null)])]), o("div", {
116
+ class: "right-selected-list"
117
+ }, [o("div", {
118
+ class: "selected-box"
119
+ }, [o("span", null, [v("已选单位")]), o("div", {
120
+ title: "删除全部"
121
+ }, [o("i", {
122
+ onClick: w,
123
+ class: "delete-btn"
124
+ }, null)])]), o("div", null, [o("div", {
125
+ class: "tree-content-box"
126
+ }, [o("ul", null, [d.value.map((e, l) => o("li", {
127
+ title: e.orgName + "(" + e.id + ")"
128
+ }, [o("span", {
129
+ class: "org-name"
130
+ }, [e.orgName, v("("), e.id, v(")")]), o(f("el-icon"), {
131
+ onClick: () => le(e, l),
132
+ color: "#909399",
133
+ size: "16"
134
+ }, {
135
+ default: () => [o(se, null, null)]
136
+ })]))])])])])]);
137
+ }
138
+ });
139
+ function D() {
140
+ if (n.modelValue ? g.value = n.modelValue.split(",") : g.value = [], p.value = !0, j.value && r.value) {
141
+ r.value.setCheckedKeys(g.value), d.value = r.value.getCheckedNodes();
142
+ return;
143
+ }
144
+ J();
145
+ }
146
+ function H() {
147
+ n.bindEvent && D();
148
+ }
149
+ function J() {
150
+ let e = {
151
+ pid: n.rootOrgId,
152
+ orgType: n.orgType
153
+ };
154
+ n.reqParams && (e = Object.assign(e, n.reqParams)), S.post({
155
+ url: getKsoRoot("/sys/org/list-by-condition"),
156
+ params: e
157
+ }).then(({
158
+ data: l
159
+ }) => {
160
+ let t = Q(l);
161
+ t && t.length > 0 && t.forEach((a) => {
162
+ a.expanded = !0;
163
+ }), B.value = t, r.value.setCheckedKeys(g.value), j.value = !0;
164
+ });
165
+ }
166
+ function F() {
167
+ if (!n.modelValue)
168
+ return;
169
+ E.value = !0;
170
+ let e = {
171
+ ids: n.modelValue
172
+ };
173
+ S.post({
174
+ url: getKsoRoot("/sys/org/find-by-ids"),
175
+ params: e
176
+ }).then(({
177
+ data: l
178
+ }) => {
179
+ if (l && l.length > 0) {
180
+ let t = [];
181
+ l.forEach((a) => {
182
+ t.push(a.orgName);
183
+ }), i.value = t.join(",");
184
+ }
185
+ });
186
+ }
187
+ function Q(e) {
188
+ return e.forEach((l) => {
189
+ l.name = l.orgName, g.value.length > 0 && g.value.includes(l.id) && d.value.push(l);
190
+ let t = [];
191
+ e.forEach((a) => {
192
+ a.pid == l.id && t.push(a);
193
+ }), l.childrenList = t;
194
+ }), e = e.filter((l) => l.pid == ""), e;
195
+ }
196
+ function W(e, {
197
+ node: l,
198
+ data: t
199
+ }) {
200
+ t.expanded && (l.expanded = !0);
201
+ let a = "tree-file-node-icon";
202
+ l.childNodes && l.childNodes.length > 0 && (a = "tree-folder-node-icon");
203
+ let u = [];
204
+ if (!n.multiple) {
205
+ let s = "";
206
+ t.id === y.value && (s = t.id), u.push(e(f("el-radio"), {
207
+ modelValue: s,
208
+ label: t.id,
209
+ size: "large"
210
+ }));
211
+ }
212
+ return u.push(e("i", {
213
+ class: a,
214
+ style: {
215
+ marginRight: "5px"
216
+ }
217
+ })), u.push(e("span", {
218
+ attrs: {
219
+ title: t.name
220
+ }
221
+ }, t.name)), e("span", {
222
+ class: "node-text-box"
223
+ }, u);
224
+ }
225
+ function X(e, l) {
226
+ return e ? l.name.indexOf(e) !== -1 || l.id.indexOf(e) !== -1 : !0;
227
+ }
228
+ function Y() {
229
+ r.value.filter(V.value), V.value || Z(B.value[0].id, !1);
230
+ }
231
+ function Z(e, l) {
232
+ var t = r.value.store.nodesMap;
233
+ for (let a in t)
234
+ e === a ? t[a].expanded = !0 : t[a].expanded = l;
235
+ }
236
+ function ee(e) {
237
+ n.multiple || (r.value.setCheckedNodes([e]), y.value = e.id), d.value = r.value.getCheckedNodes();
238
+ }
239
+ function le(e, l) {
240
+ d.value.splice(l, 1), y.value = "", r.value.setCheckedNodes(d.value);
241
+ }
242
+ function w() {
243
+ d.value = [], y.value = "", r.value && r.value.setCheckedNodes(d.value);
244
+ }
245
+ function L() {
246
+ p.value = !1, m("onCancel", "");
247
+ }
248
+ function te() {
249
+ if (d.value.length == 0)
250
+ return $("请选择数据"), !1;
251
+ let e = q(d.value);
252
+ oe(e), p.value = !1, m("onSelect", e);
253
+ }
254
+ function q(e) {
255
+ let l = [];
256
+ return e.forEach((t) => {
257
+ let a = {
258
+ id: t.id,
259
+ orgName: t.orgName,
260
+ orgType: t.orgType,
261
+ sname: t.sname,
262
+ fname: t.fname,
263
+ regId: t.regId,
264
+ regName: t.regName,
265
+ cityId: t.cityId,
266
+ cityName: t.cityName
267
+ };
268
+ l.push(a);
269
+ }), l;
270
+ }
271
+ function oe(e) {
272
+ let l = {};
273
+ Object.keys(e[0]).forEach((a) => {
274
+ l[a] = [];
275
+ }), e.forEach((a) => {
276
+ var u;
277
+ for (let s in a)
278
+ (u = l[s]) == null || u.push(a[s]);
279
+ }), i.value = l.orgName.join(","), m("update:modelValue", l.id.join(","));
280
+ let t = n.returnValue.split("|");
281
+ t && t.length > 0 && t.forEach((a) => {
282
+ let u = a.split(":");
283
+ if (u && u.length > 1) {
284
+ let s = l[u[1]], O = s ? s.join(",") : "";
285
+ N.sync[u[0]] = O;
286
+ }
287
+ });
288
+ }
289
+ function K() {
290
+ if (i.value = "", m("update:modelValue", ""), n.returnValue) {
291
+ let e = n.returnValue.split("|");
292
+ e && e.length > 0 && e.forEach((l) => {
293
+ let t = l.split(":");
294
+ t && t.length > 1 && (N.sync[t[0]] = "");
295
+ });
296
+ }
297
+ w(), m("onClear", "");
298
+ }
299
+ return ae(() => {
300
+ n.notDialog && D(), n.defaultText && !E.value ? F() : i.value = n.inputText, n.multiple || (y.value = n.modelValue);
301
+ }), T({
302
+ /** 获取选中的数据 */
303
+ getSelectData: () => q(d.value)
304
+ }), (e, l) => {
305
+ const t = f("CircleClose"), a = f("el-icon"), u = f("el-button"), s = f("el-input"), O = f("el-dialog");
306
+ return e.notDialog ? (C(), I("div", ce, [o(k(A))])) : (C(), I("div", fe, [e.$slots.func ? (C(), I("div", {
307
+ key: 0,
308
+ class: "slot-box",
309
+ onClick: H
310
+ }, [ue(e.$slots, "func", {}, void 0, !0)])) : (C(), U(s, {
311
+ key: 1,
312
+ modelValue: k(i),
313
+ "onUpdate:modelValue": l[0] || (l[0] = (b) => z(i) ? i.value = b : i = b),
314
+ disabled: e.disabled,
315
+ readonly: e.readonly,
316
+ clearable: "",
317
+ onClear: K,
318
+ placeholder: ""
319
+ }, {
320
+ append: h(() => [k(i) && e.isClear && e.readonly ? (C(), U(a, {
321
+ key: 0,
322
+ onClickCapture: K
323
+ }, {
324
+ default: h(() => [o(t)]),
325
+ _: 1
326
+ })) : re("", !0), o(u, {
327
+ type: "primary",
328
+ disabled: e.disabled,
329
+ onClick: D
330
+ }, {
331
+ default: h(() => [v(de(e.buttonText), 1)]),
332
+ _: 1
333
+ }, 8, ["disabled"])]),
334
+ _: 1
335
+ }, 8, ["modelValue", "disabled", "readonly"])), o(O, {
336
+ title: "单位选择",
337
+ modelValue: k(p),
338
+ "onUpdate:modelValue": l[1] || (l[1] = (b) => z(p) ? p.value = b : p = b),
339
+ onClose: L,
340
+ width: 1e3
341
+ }, {
342
+ default: h(() => [o(k(A)), ie("div", pe, [o(u, {
343
+ onClick: L
344
+ }, {
345
+ default: h(() => [v("取消")]),
346
+ _: 1
347
+ }), o(u, {
348
+ type: "primary",
349
+ onClick: te
350
+ }, {
351
+ default: h(() => [v("确认")]),
352
+ _: 1
353
+ })])]),
354
+ _: 1
355
+ }, 8, ["modelValue"])]));
356
+ };
357
+ }
358
+ });
359
+ const ge = (_, T) => {
360
+ const x = _.__vccOpts || _;
361
+ for (const [n, N] of T)
362
+ x[n] = N;
363
+ return x;
364
+ }, ye = /* @__PURE__ */ ge(ve, [["__scopeId", "data-v-bb722cb4"]]);
365
+ export {
366
+ ye as ksoSelOrg
367
+ };
package/package.json CHANGED
@@ -1,55 +1,13 @@
1
1
  {
2
2
  "name": "kso-sel-org",
3
- "version": "1.0.9",
4
- "description": "机构选择",
5
- "private": false,
6
- "main": "dist/index.umd.js",
7
- "module": "dist/index.es.js",
8
- "types": "dist/index.d.ts",
9
- "files": [
10
- "dist"
11
- ],
3
+ "version": "1.0.11",
4
+ "description": "",
5
+ "main": "index.js",
12
6
  "scripts": {
13
- "dev": "vite",
14
- "build": "vue-tsc --noEmit && vite build",
15
- "build:no-vue-tsc": "vite build",
16
- "preview": "vite preview"
7
+ "test": "echo \"Error: no test specified\" && exit 1"
17
8
  },
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-org": "^1.0.8",
24
- "kso-sel-reg": "^1.0.1",
25
- "less": "^4.1.3",
26
- "less-loader": "^11.1.3",
27
- "qs": "^6.11.2",
28
- "template_js": "^3.1.4",
29
- "unplugin-auto-import": "^0.17.2",
30
- "vite-plugin-dts": "3.4.0",
31
- "vue": "3.3.4",
32
- "vue-router": "^4.2.4",
33
- "vue-types": "^5.1.0",
34
- "vue-virtual-list-xg": "^0.0.9"
35
- },
36
- "devDependencies": {
37
- "@types/node": "^20.3.3",
38
- "@vitejs/plugin-vue": "^4.1.0",
39
- "css-loader": "^6.8.1",
40
- "sass": "^1.69.5",
41
- "typescript": "^5.0.2",
42
- "vite": "^4.3.9",
43
- "vite-plugin-eslint": "^1.8.1",
44
- "vue-loader": "^17.3.1",
45
- "vue-style-loader": "^4.1.3",
46
- "vue-tsc": "^1.4.2"
47
- },
48
- "keywords": [
49
- "kso-sel-org",
50
- "kso",
51
- "vue3"
52
- ],
53
- "author": "kusafe",
54
- "license": "MIT"
55
- }
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "types": "./index.d.ts"
13
+ }
@@ -0,0 +1,139 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ /** 没有对话框 */
3
+ notDialog?: boolean | undefined;
4
+ /** 默认选中code值 */
5
+ modelValue: string;
6
+ /** 根机构ID(根机构ID,如果不设置,则返回所有机构树,传入则只显示该机构下的所有单位树) */
7
+ rootOrgId?: string | undefined;
8
+ /** 单位类型(如果不设置,则返回所有单位类型,否则传值(01:隶属局单位,02:直属局单位,03:总署单位))*/
9
+ orgType?: string | undefined;
10
+ /** 文本框显示内容 */
11
+ inputText?: string | undefined;
12
+ /** 返回内容处理 */
13
+ returnValue?: string | undefined;
14
+ /** 是否只读 */
15
+ readonly?: boolean | undefined;
16
+ /** 是否清除 */
17
+ isClear?: boolean | undefined;
18
+ /** 是否禁用 */
19
+ disabled?: boolean | undefined;
20
+ /** 按钮文本内容 */
21
+ buttonText?: string | undefined;
22
+ /** 开启复选 */
23
+ multiple?: boolean | undefined;
24
+ /** 事件绑定 */
25
+ bindEvent?: boolean | undefined;
26
+ /** 根据传进来的code查对应的name,覆盖inputText值 */
27
+ defaultText?: boolean | undefined;
28
+ /** 扩展查询参数 */
29
+ reqParams?: object | undefined;
30
+ }>, {
31
+ modelValue: string;
32
+ rootOrgId: string;
33
+ orgType: string;
34
+ inputText: string;
35
+ returnValue: string;
36
+ readonly: boolean;
37
+ isClear: boolean;
38
+ disabled: boolean;
39
+ buttonText: string;
40
+ multiple: boolean;
41
+ bindEvent: boolean;
42
+ defaultText: boolean;
43
+ reqParams: undefined;
44
+ }>, {
45
+ /** 获取选中的数据 */
46
+ getSelectData: () => object[];
47
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
48
+ onCancel: (...args: any[]) => void;
49
+ onSelect: (...args: any[]) => void;
50
+ "update:modelValue": (...args: any[]) => void;
51
+ onClear: (...args: any[]) => void;
52
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
53
+ /** 没有对话框 */
54
+ notDialog?: boolean | undefined;
55
+ /** 默认选中code值 */
56
+ modelValue: string;
57
+ /** 根机构ID(根机构ID,如果不设置,则返回所有机构树,传入则只显示该机构下的所有单位树) */
58
+ rootOrgId?: string | undefined;
59
+ /** 单位类型(如果不设置,则返回所有单位类型,否则传值(01:隶属局单位,02:直属局单位,03:总署单位))*/
60
+ orgType?: string | undefined;
61
+ /** 文本框显示内容 */
62
+ inputText?: string | undefined;
63
+ /** 返回内容处理 */
64
+ returnValue?: string | undefined;
65
+ /** 是否只读 */
66
+ readonly?: boolean | undefined;
67
+ /** 是否清除 */
68
+ isClear?: boolean | undefined;
69
+ /** 是否禁用 */
70
+ disabled?: boolean | undefined;
71
+ /** 按钮文本内容 */
72
+ buttonText?: string | undefined;
73
+ /** 开启复选 */
74
+ multiple?: boolean | undefined;
75
+ /** 事件绑定 */
76
+ bindEvent?: boolean | undefined;
77
+ /** 根据传进来的code查对应的name,覆盖inputText值 */
78
+ defaultText?: boolean | undefined;
79
+ /** 扩展查询参数 */
80
+ reqParams?: object | undefined;
81
+ }>, {
82
+ modelValue: string;
83
+ rootOrgId: string;
84
+ orgType: string;
85
+ inputText: string;
86
+ returnValue: string;
87
+ readonly: boolean;
88
+ isClear: boolean;
89
+ disabled: boolean;
90
+ buttonText: string;
91
+ multiple: boolean;
92
+ bindEvent: boolean;
93
+ defaultText: boolean;
94
+ reqParams: undefined;
95
+ }>>> & {
96
+ onOnCancel?: ((...args: any[]) => any) | undefined;
97
+ onOnSelect?: ((...args: any[]) => any) | undefined;
98
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
99
+ onOnClear?: ((...args: any[]) => any) | undefined;
100
+ }, {
101
+ modelValue: string;
102
+ rootOrgId: string;
103
+ orgType: string;
104
+ inputText: string;
105
+ returnValue: string;
106
+ readonly: boolean;
107
+ isClear: boolean;
108
+ disabled: boolean;
109
+ buttonText: string;
110
+ multiple: boolean;
111
+ bindEvent: boolean;
112
+ defaultText: boolean;
113
+ reqParams: object;
114
+ }, {}>, {
115
+ func?(_: {}): any;
116
+ }>;
117
+ export default _default;
118
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
119
+ type __VLS_TypePropsToRuntimeProps<T> = {
120
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
121
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
122
+ } : {
123
+ type: import('vue').PropType<T[K]>;
124
+ required: true;
125
+ };
126
+ };
127
+ type __VLS_WithDefaults<P, D> = {
128
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
129
+ default: D[K];
130
+ }> : P[K];
131
+ };
132
+ type __VLS_Prettify<T> = {
133
+ [K in keyof T]: T[K];
134
+ } & {};
135
+ type __VLS_WithTemplateSlots<T, S> = T & {
136
+ new (): {
137
+ $slots: S;
138
+ };
139
+ };
package/dist/index.es.js DELETED
@@ -1,349 +0,0 @@
1
- import { defineComponent as se, useAttrs as de, inject as R, ref as p, watch as F, onMounted as re, resolveComponent as g, openBlock as C, createElementBlock as T, renderSlot as ie, createBlock as M, unref as b, isRef as S, withCtx as _, createVNode as h, 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
- import '/dist/style.css'
3
- const U = (u) => (pe("data-v-7f6c2b96"), u = u(), he(), u), ve = { class: "org-selector" }, ge = { class: "org-list-box" }, me = { class: "left-tree-box" }, _e = { class: "search-box" }, ye = /* @__PURE__ */ U(() => /* @__PURE__ */ s("label", null, "单位列表", -1)), ke = { class: "tree-content-box" }, Ce = { 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({
4
- __name: "index",
5
- props: {
6
- modelValue: { default: "" },
7
- rootOrgId: { default: "" },
8
- orgType: { default: "" },
9
- inputText: { default: "" },
10
- returnValue: { default: "" },
11
- readonly: { type: Boolean, default: !0 },
12
- isClear: { type: Boolean, default: !0 },
13
- disabled: { type: Boolean, default: !1 },
14
- buttonText: { default: "选择" },
15
- multiple: { type: Boolean, default: !0 },
16
- bindEvent: { type: Boolean, default: !0 },
17
- defaultText: { type: Boolean, default: !1 },
18
- reqParams: { default: void 0 }
19
- },
20
- emits: ["onCancel", "onSelect", "update:modelValue", "onClear"],
21
- setup(u, { emit: v }) {
22
- const n = u;
23
- let N = de();
24
- const V = R("req"), { warningMsgBox: z } = R("msgBox"), $ = {
25
- children: "childrenList",
26
- label: "orgName"
27
- }, r = p(null);
28
- let c = p(""), w = p(!1), m = p(!1), E = p(!1), x = p(""), y = p(""), f = p([]), B = p([]), k = p([]);
29
- F(
30
- () => n.modelValue,
31
- () => {
32
- n.defaultText && !E.value && D();
33
- }
34
- ), F(
35
- () => n.inputText,
36
- (e) => {
37
- c.value = e;
38
- }
39
- );
40
- function A() {
41
- if (n.modelValue ? k.value = n.modelValue.split(",") : k.value = [], m.value = !0, w.value && r.value) {
42
- r.value.setCheckedKeys(k.value), f.value = r.value.getCheckedNodes();
43
- return;
44
- }
45
- H();
46
- }
47
- function G() {
48
- n.bindEvent && A();
49
- }
50
- function H() {
51
- let e = {
52
- pid: n.rootOrgId,
53
- orgType: n.orgType
54
- };
55
- n.reqParams && (e = Object.assign(e, n.reqParams)), V.post({ url: getKsoRoot("/sys/org/list-by-condition"), params: e }).then(({ data: l }) => {
56
- let t = J(l);
57
- t && t.length > 0 && t.forEach((o) => {
58
- o.expanded = !0;
59
- }), B.value = t, r.value.setCheckedKeys(k.value), w.value = !0;
60
- });
61
- }
62
- function D() {
63
- if (!n.modelValue)
64
- return;
65
- E.value = !0;
66
- let e = { ids: n.modelValue };
67
- V.post({ url: getKsoRoot("/sys/org/find-by-ids"), params: e }).then(({ data: l }) => {
68
- if (l && l.length > 0) {
69
- let t = [];
70
- l.forEach((o) => {
71
- t.push(o.orgName);
72
- }), c.value = t.join(",");
73
- }
74
- });
75
- }
76
- function J(e) {
77
- return e.forEach((l) => {
78
- l.name = l.orgName, k.value.length > 0 && k.value.includes(l.id) && f.value.push(l);
79
- let t = [];
80
- e.forEach((o) => {
81
- o.pid == l.id && t.push(o);
82
- }), l.childrenList = t;
83
- }), e = e.filter((l) => l.pid == ""), e;
84
- }
85
- function Q(e, { node: l, data: t }) {
86
- t.expanded && (l.expanded = !0);
87
- let o = "tree-file-node-icon";
88
- l.childNodes && l.childNodes.length > 0 && (o = "tree-folder-node-icon");
89
- let a = [];
90
- if (!n.multiple) {
91
- let i = "";
92
- t.id === x.value && (i = t.id), a.push(
93
- e(g("el-radio"), {
94
- modelValue: i,
95
- label: t.id,
96
- size: "large"
97
- })
98
- );
99
- }
100
- return a.push(
101
- e("i", {
102
- class: o,
103
- style: {
104
- marginRight: "5px"
105
- }
106
- })
107
- ), a.push(
108
- e(
109
- "span",
110
- {
111
- attrs: {
112
- title: t.name
113
- }
114
- },
115
- t.name
116
- )
117
- ), e("span", { class: "node-text-box" }, a);
118
- }
119
- function W(e, l) {
120
- return e ? l.name.indexOf(e) !== -1 || l.id.indexOf(e) !== -1 : !0;
121
- }
122
- function X() {
123
- r.value.filter(y.value), y.value || Y(B.value[0].id, !1);
124
- }
125
- function Y(e, l) {
126
- var t = r.value.store.nodesMap;
127
- for (let o in t)
128
- e === o ? t[o].expanded = !0 : t[o].expanded = l;
129
- }
130
- function Z(e) {
131
- n.multiple || (r.value.setCheckedNodes([e]), x.value = e.id), f.value = r.value.getCheckedNodes();
132
- }
133
- function ee(e, l) {
134
- f.value.splice(l, 1), x.value = "", r.value.setCheckedNodes(f.value);
135
- }
136
- function L() {
137
- f.value = [], x.value = "", r.value && r.value.setCheckedNodes(f.value);
138
- }
139
- function P() {
140
- m.value = !1, v("onCancel", "");
141
- }
142
- function le() {
143
- if (f.value.length == 0)
144
- return z("请选择数据"), !1;
145
- let e = te(f.value);
146
- oe(e), m.value = !1, v("onSelect", e);
147
- }
148
- function te(e) {
149
- let l = [];
150
- return e.forEach((t) => {
151
- let o = {
152
- id: t.id,
153
- orgName: t.orgName,
154
- orgType: t.orgType,
155
- sname: t.sname,
156
- fname: t.fname,
157
- regId: t.regId,
158
- regName: t.regName,
159
- cityId: t.cityId,
160
- cityName: t.cityName
161
- };
162
- l.push(o);
163
- }), l;
164
- }
165
- function oe(e) {
166
- let l = {};
167
- Object.keys(e[0]).forEach((o) => {
168
- l[o] = [];
169
- }), e.forEach((o) => {
170
- var a;
171
- for (let i in o)
172
- (a = l[i]) == null || a.push(o[i]);
173
- }), c.value = l.orgName.join(","), v("update:modelValue", l.id.join(","));
174
- let t = n.returnValue.split("|");
175
- t && t.length > 0 && t.forEach((o) => {
176
- let a = o.split(":");
177
- if (a && a.length > 1) {
178
- let i = l[a[1]], I = i ? i.join(",") : "";
179
- N.sync[a[0]] = I;
180
- }
181
- });
182
- }
183
- function q() {
184
- if (c.value = "", v("update:modelValue", ""), n.returnValue) {
185
- let e = n.returnValue.split("|");
186
- e && e.length > 0 && e.forEach((l) => {
187
- let t = l.split(":");
188
- t && t.length > 1 && (N.sync[t[0]] = "");
189
- });
190
- }
191
- L(), v("onClear", "");
192
- }
193
- return re(() => {
194
- n.defaultText && !E.value ? D() : c.value = n.inputText, n.multiple || (x.value = n.modelValue);
195
- }), (e, l) => {
196
- const t = g("CircleClose"), o = g("el-icon"), a = g("el-button"), i = g("el-input"), I = g("el-tree"), ne = g("CircleCloseFilled"), ae = g("el-dialog");
197
- return C(), T("div", ve, [
198
- e.$slots.func ? (C(), T("div", {
199
- key: 0,
200
- class: "slot-box",
201
- onClick: G
202
- }, [
203
- ie(e.$slots, "func", {}, void 0, !0)
204
- ])) : (C(), M(i, {
205
- key: 1,
206
- modelValue: b(c),
207
- "onUpdate:modelValue": l[0] || (l[0] = (d) => S(c) ? c.value = d : c = d),
208
- disabled: e.disabled,
209
- readonly: e.readonly,
210
- clearable: "",
211
- onClear: q,
212
- placeholder: ""
213
- }, {
214
- append: _(() => [
215
- b(c) && e.isClear && e.readonly ? (C(), M(o, {
216
- key: 0,
217
- onClickCapture: q
218
- }, {
219
- default: _(() => [
220
- h(t)
221
- ]),
222
- _: 1
223
- })) : ue("", !0),
224
- h(a, {
225
- type: "primary",
226
- disabled: e.disabled,
227
- onClick: A
228
- }, {
229
- default: _(() => [
230
- O(j(e.buttonText), 1)
231
- ]),
232
- _: 1
233
- }, 8, ["disabled"])
234
- ]),
235
- _: 1
236
- }, 8, ["modelValue", "disabled", "readonly"])),
237
- h(ae, {
238
- title: "单位选择",
239
- modelValue: b(m),
240
- "onUpdate:modelValue": l[2] || (l[2] = (d) => S(m) ? m.value = d : m = d),
241
- onClose: P,
242
- width: 1e3
243
- }, {
244
- default: _(() => [
245
- s("div", ge, [
246
- s("div", me, [
247
- s("div", _e, [
248
- ye,
249
- h(i, {
250
- modelValue: b(y),
251
- "onUpdate:modelValue": l[1] || (l[1] = (d) => S(y) ? y.value = d : y = d),
252
- "suffix-icon": "Search",
253
- onInput: X,
254
- placeholder: "请输入单位名称查询"
255
- }, null, 8, ["modelValue"])
256
- ]),
257
- s("div", ke, [
258
- h(I, {
259
- data: b(B),
260
- ref_key: "orgTree",
261
- ref: r,
262
- "node-key": "id",
263
- props: $,
264
- "expand-on-click-node": !1,
265
- "show-checkbox": e.multiple,
266
- "check-strictly": !0,
267
- "highlight-current": !0,
268
- accordion: !0,
269
- "check-on-click-node": !0,
270
- "filter-node-method": W,
271
- indent: 26,
272
- onCheck: Z,
273
- "render-content": Q,
274
- "icon-class": "el-icon-arrow-right"
275
- }, null, 8, ["data", "show-checkbox"])
276
- ])
277
- ]),
278
- s("div", Ce, [
279
- s("div", { class: "selected-box" }, [
280
- be,
281
- s("div", { title: "删除全部" }, [
282
- s("i", {
283
- onClick: L,
284
- class: "delete-btn"
285
- })
286
- ])
287
- ]),
288
- s("div", null, [
289
- s("div", xe, [
290
- s("ul", null, [
291
- (C(!0), T(ce, null, fe(b(f), (d, K) => (C(), T("li", {
292
- key: K + "s",
293
- title: d.orgName + "(" + d.id + ")"
294
- }, [
295
- s("span", Ve, j(d.orgName) + "(" + j(d.id) + ") ", 1),
296
- h(o, {
297
- onClick: (Se) => ee(d, K),
298
- color: "#909399",
299
- size: "16"
300
- }, {
301
- default: _(() => [
302
- h(ne)
303
- ]),
304
- _: 2
305
- }, 1032, ["onClick"])
306
- ], 8, Ne))), 128))
307
- ])
308
- ])
309
- ])
310
- ])
311
- ]),
312
- s("div", Te, [
313
- h(a, { onClick: P }, {
314
- default: _(() => [
315
- O("取消")
316
- ]),
317
- _: 1
318
- }),
319
- h(a, {
320
- type: "primary",
321
- onClick: le
322
- }, {
323
- default: _(() => [
324
- O("确认")
325
- ]),
326
- _: 1
327
- })
328
- ])
329
- ]),
330
- _: 1
331
- }, 8, ["modelValue"])
332
- ]);
333
- };
334
- }
335
- });
336
- const Be = (u, v) => {
337
- const n = u.__vccOpts || u;
338
- for (const [N, V] of v)
339
- n[N] = V;
340
- return n;
341
- }, Ie = /* @__PURE__ */ Be(Ee, [["__scopeId", "data-v-7f6c2b96"]]), je = {
342
- install(u, v = {}) {
343
- u.component("ksoSelOrg", Ie);
344
- }
345
- };
346
- export {
347
- je as default,
348
- Ie as ksoSelOrg
349
- };
package/dist/index.umd.js DELETED
@@ -1 +0,0 @@
1
- (function(p,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(p=typeof globalThis<"u"?globalThis:p||self,e(p["kso-sel-org"]={},p.Vue))})(this,function(p,e){"use strict";const b=c=>(e.pushScopeId("data-v-7f6c2b96"),c=c(),e.popScopeId(),c),D={class:"org-selector"},A={class:"org-list-box"},L={class:"left-tree-box"},P={class:"search-box"},q=b(()=>e.createElementVNode("label",null,"单位列表",-1)),R={class:"tree-content-box"},K={class:"right-selected-list"},M=b(()=>e.createElementVNode("span",null,"已选单位",-1)),F={class:"tree-content-box"},U=["title"],z={class:"org-name"},$={class:"selector-footer"},G=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(c,{emit:h}){const a=c;let y=e.useAttrs();const V=e.inject("req"),{warningMsgBox:J}=e.inject("msgBox"),Q={children:"childrenList",label:"orgName"},s=e.ref(null);let f=e.ref(""),T=e.ref(!1),m=e.ref(!1),C=e.ref(!1),N=e.ref(""),g=e.ref(""),u=e.ref([]),k=e.ref([]),_=e.ref([]);e.watch(()=>a.modelValue,()=>{a.defaultText&&!C.value&&S()}),e.watch(()=>a.inputText,t=>{f.value=t});function B(){if(a.modelValue?_.value=a.modelValue.split(","):_.value=[],m.value=!0,T.value&&s.value){s.value.setCheckedKeys(_.value),u.value=s.value.getCheckedNodes();return}X()}function W(){a.bindEvent&&B()}function X(){let t={pid:a.rootOrgId,orgType:a.orgType};a.reqParams&&(t=Object.assign(t,a.reqParams)),V.post({url:getKsoRoot("/sys/org/list-by-condition"),params:t}).then(({data:l})=>{let o=Y(l);o&&o.length>0&&o.forEach(n=>{n.expanded=!0}),k.value=o,s.value.setCheckedKeys(_.value),T.value=!0})}function S(){if(!a.modelValue)return;C.value=!0;let t={ids:a.modelValue};V.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)}),f.value=o.join(",")}})}function Y(t){return t.forEach(l=>{l.name=l.orgName,_.value.length>0&&_.value.includes(l.id)&&u.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 Z(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 v(t,l){return t?l.name.indexOf(t)!==-1||l.id.indexOf(t)!==-1:!0}function ee(){s.value.filter(g.value),g.value||te(k.value[0].id,!1)}function te(t,l){var o=s.value.store.nodesMap;for(let n in o)t===n?o[n].expanded=!0:o[n].expanded=l}function le(t){a.multiple||(s.value.setCheckedNodes([t]),N.value=t.id),u.value=s.value.getCheckedNodes()}function oe(t,l){u.value.splice(l,1),N.value="",s.value.setCheckedNodes(u.value)}function w(){u.value=[],N.value="",s.value&&s.value.setCheckedNodes(u.value)}function O(){m.value=!1,h("onCancel","")}function ne(){if(u.value.length==0)return J("请选择数据"),!1;let t=ae(u.value);re(t),m.value=!1,h("onSelect",t)}function ae(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 re(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])}),f.value=l.orgName.join(","),h("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(","):"";y.sync[r[0]]=x}})}function I(){if(f.value="",h("update:modelValue",""),a.returnValue){let t=a.returnValue.split("|");t&&t.length>0&&t.forEach(l=>{let o=l.split(":");o&&o.length>1&&(y.sync[o[0]]="")})}w(),h("onClear","")}return e.onMounted(()=>{a.defaultText&&!C.value?S():f.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"),de=e.resolveComponent("CircleCloseFilled"),se=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",D,[t.$slots.func?(e.openBlock(),e.createElementBlock("div",{key:0,class:"slot-box",onClick:W},[e.renderSlot(t.$slots,"func",{},void 0,!0)])):(e.openBlock(),e.createBlock(i,{key:1,modelValue:e.unref(f),"onUpdate:modelValue":l[0]||(l[0]=d=>e.isRef(f)?f.value=d:f=d),disabled:t.disabled,readonly:t.readonly,clearable:"",onClear:I,placeholder:""},{append:e.withCtx(()=>[e.unref(f)&&t.isClear&&t.readonly?(e.openBlock(),e.createBlock(n,{key:0,onClickCapture:I},{default:e.withCtx(()=>[e.createVNode(o)]),_:1})):e.createCommentVNode("",!0),e.createVNode(r,{type:"primary",disabled:t.disabled,onClick:B},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.buttonText),1)]),_:1},8,["disabled"])]),_:1},8,["modelValue","disabled","readonly"])),e.createVNode(se,{title:"单位选择",modelValue:e.unref(m),"onUpdate:modelValue":l[2]||(l[2]=d=>e.isRef(m)?m.value=d:m=d),onClose:O,width:1e3},{default:e.withCtx(()=>[e.createElementVNode("div",A,[e.createElementVNode("div",L,[e.createElementVNode("div",P,[q,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:ee,placeholder:"请输入单位名称查询"},null,8,["modelValue"])]),e.createElementVNode("div",R,[e.createVNode(x,{data:e.unref(k),ref_key:"orgTree",ref:s,"node-key":"id",props:Q,"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":v,indent:26,onCheck:le,"render-content":Z,"icon-class":"el-icon-arrow-right"},null,8,["data","show-checkbox"])])]),e.createElementVNode("div",K,[e.createElementVNode("div",{class:"selected-box"},[M,e.createElementVNode("div",{title:"删除全部"},[e.createElementVNode("i",{onClick:w,class:"delete-btn"})])]),e.createElementVNode("div",null,[e.createElementVNode("div",F,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),(d,j)=>(e.openBlock(),e.createElementBlock("li",{key:j+"s",title:d.orgName+"("+d.id+")"},[e.createElementVNode("span",z,e.toDisplayString(d.orgName)+"("+e.toDisplayString(d.id)+") ",1),e.createVNode(n,{onClick:fe=>oe(d,j),color:"#909399",size:"16"},{default:e.withCtx(()=>[e.createVNode(de)]),_:2},1032,["onClick"])],8,U))),128))])])])])]),e.createElementVNode("div",$,[e.createVNode(r,{onClick:O},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(r,{type:"primary",onClick:ne},{default:e.withCtx(()=>[e.createTextVNode("确认")]),_:1})])]),_:1},8,["modelValue"])])}}}),ie="",E=((c,h)=>{const a=c.__vccOpts||c;for(const[y,V]of h)a[y]=V;return a})(G,[["__scopeId","data-v-7f6c2b96"]]),H={install(c,h={}){c.component("ksoSelOrg",E)}};p.default=H,p.ksoSelOrg=E,Object.defineProperties(p,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/dist/style.css DELETED
@@ -1 +0,0 @@
1
- .org-list-box[data-v-7f6c2b96]{padding:10px;display:flex;justify-content:space-between;box-sizing:border-box}.org-list-box .left-tree-box[data-v-7f6c2b96]{border:1px solid #ebeef5;width:50%;overflow:hidden}.org-list-box .left-tree-box .search-box[data-v-7f6c2b96]{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-7f6c2b96]{color:#303133;font-weight:700}.org-list-box .left-tree-box .search-box[data-v-7f6c2b96] .el-input{width:calc(100% - 100px);margin-left:10px}.org-list-box .right-selected-list[data-v-7f6c2b96]{border:1px solid #ebeef5;width:48%}.org-list-box .right-selected-list .selected-box[data-v-7f6c2b96]{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-7f6c2b96]{color:#303133;font-weight:700}.org-list-box .right-selected-list .selected-box .delete-btn[data-v-7f6c2b96]{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-7f6c2b96] .el-icon svg{width:1.5em;height:1.5em}.org-list-box .tree-content-box[data-v-7f6c2b96]{height:420px;padding:5px 15px;box-sizing:border-box;overflow:auto}.org-list-box ul li[data-v-7f6c2b96]{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-7f6c2b96]{width:92%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.org-list-box ul[data-v-7f6c2b96] .el-icon{cursor:pointer}.org-list-box .org-del .img-box[data-v-7f6c2b96]{margin:7px 0 0;cursor:pointer}.org-list-box .flow-modal-title[data-v-7f6c2b96]{height:40px;background:#2b5fda;width:100%;text-indent:1em;color:#fff;line-height:40px}.selector-footer[data-v-7f6c2b96]{padding:10px;display:flex;justify-content:flex-end;border-top:solid 1px #dcdfe6}[data-v-7f6c2b96] .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-7f6c2b96] .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-7f6c2b96] .el-input{height:32px}[data-v-7f6c2b96] .node-text-box{display:flex;align-items:center}[data-v-7f6c2b96] .node-text-box .el-radio{margin-right:5px}[data-v-7f6c2b96] .node-text-box .el-radio .el-radio__label{display:none}[data-v-7f6c2b96] .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{background-color:#f0f5ff}[data-v-7f6c2b96] .el-input__icon{color:#a8abb2}[data-v-7f6c2b96]::-webkit-scrollbar{width:5px}[data-v-7f6c2b96]::-webkit-scrollbar-thumb{border-radius:3px;background:#b7c7dd}[data-v-7f6c2b96]::-webkit-scrollbar-track{border-radius:3px;background:#ededed}