kso-sel-org 1.0.7 → 1.0.9

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 CHANGED
@@ -1,5 +1,6 @@
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({
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({
3
4
  __name: "index",
4
5
  props: {
5
6
  modelValue: { default: "" },
@@ -17,14 +18,14 @@ const U = (h) => (pe("data-v-e2b739c9"), h = h(), he(), h), ve = { class: "org-s
17
18
  reqParams: { default: void 0 }
18
19
  },
19
20
  emits: ["onCancel", "onSelect", "update:modelValue", "onClear"],
20
- setup(h, { emit: g }) {
21
- const n = h;
21
+ setup(u, { emit: v }) {
22
+ const n = u;
22
23
  let N = de();
23
24
  const V = R("req"), { warningMsgBox: z } = R("msgBox"), $ = {
24
25
  children: "childrenList",
25
26
  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([]);
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([]);
28
29
  F(
29
30
  () => n.modelValue,
30
31
  () => {
@@ -33,12 +34,12 @@ const U = (h) => (pe("data-v-e2b739c9"), h = h(), he(), h), ve = { class: "org-s
33
34
  ), F(
34
35
  () => n.inputText,
35
36
  (e) => {
36
- u.value = e;
37
+ c.value = e;
37
38
  }
38
39
  );
39
40
  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();
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();
42
43
  return;
43
44
  }
44
45
  H();
@@ -55,7 +56,7 @@ const U = (h) => (pe("data-v-e2b739c9"), h = h(), he(), h), ve = { class: "org-s
55
56
  let t = J(l);
56
57
  t && t.length > 0 && t.forEach((o) => {
57
58
  o.expanded = !0;
58
- }), B.value = t, r.value.setCheckedKeys(C.value), w.value = !0;
59
+ }), B.value = t, r.value.setCheckedKeys(k.value), w.value = !0;
59
60
  });
60
61
  }
61
62
  function D() {
@@ -68,13 +69,13 @@ const U = (h) => (pe("data-v-e2b739c9"), h = h(), he(), h), ve = { class: "org-s
68
69
  let t = [];
69
70
  l.forEach((o) => {
70
71
  t.push(o.orgName);
71
- }), u.value = t.join(",");
72
+ }), c.value = t.join(",");
72
73
  }
73
74
  });
74
75
  }
75
76
  function J(e) {
76
77
  return e.forEach((l) => {
77
- l.name = l.orgName, C.value.length > 0 && C.value.includes(l.id) && c.value.push(l);
78
+ l.name = l.orgName, k.value.length > 0 && k.value.includes(l.id) && f.value.push(l);
78
79
  let t = [];
79
80
  e.forEach((o) => {
80
81
  o.pid == l.id && t.push(o);
@@ -89,7 +90,7 @@ const U = (h) => (pe("data-v-e2b739c9"), h = h(), he(), h), ve = { class: "org-s
89
90
  if (!n.multiple) {
90
91
  let i = "";
91
92
  t.id === x.value && (i = t.id), a.push(
92
- e(v("el-radio"), {
93
+ e(g("el-radio"), {
93
94
  modelValue: i,
94
95
  label: t.id,
95
96
  size: "large"
@@ -127,22 +128,22 @@ const U = (h) => (pe("data-v-e2b739c9"), h = h(), he(), h), ve = { class: "org-s
127
128
  e === o ? t[o].expanded = !0 : t[o].expanded = l;
128
129
  }
129
130
  function Z(e) {
130
- n.multiple || (r.value.setCheckedNodes([e]), x.value = e.id), c.value = r.value.getCheckedNodes();
131
+ n.multiple || (r.value.setCheckedNodes([e]), x.value = e.id), f.value = r.value.getCheckedNodes();
131
132
  }
132
133
  function ee(e, l) {
133
- c.value.splice(l, 1), x.value = "", r.value.setCheckedNodes(c.value);
134
+ f.value.splice(l, 1), x.value = "", r.value.setCheckedNodes(f.value);
134
135
  }
135
136
  function L() {
136
- c.value = [], x.value = "", r.value && r.value.setCheckedNodes(c.value);
137
+ f.value = [], x.value = "", r.value && r.value.setCheckedNodes(f.value);
137
138
  }
138
- function q() {
139
- _.value = !1, g("onCancel", "");
139
+ function P() {
140
+ m.value = !1, v("onCancel", "");
140
141
  }
141
142
  function le() {
142
- if (c.value.length == 0)
143
+ if (f.value.length == 0)
143
144
  return z("请选择数据"), !1;
144
- let e = te(c.value);
145
- oe(e), _.value = !1, g("onSelect", e);
145
+ let e = te(f.value);
146
+ oe(e), m.value = !1, v("onSelect", e);
146
147
  }
147
148
  function te(e) {
148
149
  let l = [];
@@ -169,7 +170,7 @@ const U = (h) => (pe("data-v-e2b739c9"), h = h(), he(), h), ve = { class: "org-s
169
170
  var a;
170
171
  for (let i in o)
171
172
  (a = l[i]) == null || a.push(o[i]);
172
- }), u.value = l.orgName.join(","), g("update:modelValue", l.id.join(","));
173
+ }), c.value = l.orgName.join(","), v("update:modelValue", l.id.join(","));
173
174
  let t = n.returnValue.split("|");
174
175
  t && t.length > 0 && t.forEach((o) => {
175
176
  let a = o.split(":");
@@ -179,53 +180,53 @@ const U = (h) => (pe("data-v-e2b739c9"), h = h(), he(), h), ve = { class: "org-s
179
180
  }
180
181
  });
181
182
  }
182
- function K() {
183
- if (u.value = "", g("update:modelValue", ""), n.returnValue) {
183
+ function q() {
184
+ if (c.value = "", v("update:modelValue", ""), n.returnValue) {
184
185
  let e = n.returnValue.split("|");
185
186
  e && e.length > 0 && e.forEach((l) => {
186
187
  let t = l.split(":");
187
188
  t && t.length > 1 && (N.sync[t[0]] = "");
188
189
  });
189
190
  }
190
- L(), g("onClear", "");
191
+ L(), v("onClear", "");
191
192
  }
192
193
  return re(() => {
193
- n.defaultText && !E.value ? D() : u.value = n.inputText, n.multiple || (x.value = n.modelValue);
194
+ n.defaultText && !E.value ? D() : c.value = n.inputText, n.multiple || (x.value = n.modelValue);
194
195
  }), (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", {
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", {
198
199
  key: 0,
199
200
  class: "slot-box",
200
201
  onClick: G
201
202
  }, [
202
203
  ie(e.$slots, "func", {}, void 0, !0)
203
- ])) : (k(), M(i, {
204
+ ])) : (C(), M(i, {
204
205
  key: 1,
205
- modelValue: b(u),
206
- "onUpdate:modelValue": l[0] || (l[0] = (d) => S(u) ? u.value = d : u = d),
206
+ modelValue: b(c),
207
+ "onUpdate:modelValue": l[0] || (l[0] = (d) => S(c) ? c.value = d : c = d),
207
208
  disabled: e.disabled,
208
209
  readonly: e.readonly,
209
210
  clearable: "",
210
- onClear: K,
211
+ onClear: q,
211
212
  placeholder: ""
212
213
  }, {
213
- append: m(() => [
214
- b(u) && e.isClear && e.readonly ? (k(), M(o, {
214
+ append: _(() => [
215
+ b(c) && e.isClear && e.readonly ? (C(), M(o, {
215
216
  key: 0,
216
- onClickCapture: K
217
+ onClickCapture: q
217
218
  }, {
218
- default: m(() => [
219
- p(t)
219
+ default: _(() => [
220
+ h(t)
220
221
  ]),
221
222
  _: 1
222
223
  })) : ue("", !0),
223
- p(a, {
224
+ h(a, {
224
225
  type: "primary",
225
226
  disabled: e.disabled,
226
227
  onClick: A
227
228
  }, {
228
- default: m(() => [
229
+ default: _(() => [
229
230
  O(j(e.buttonText), 1)
230
231
  ]),
231
232
  _: 1
@@ -233,19 +234,19 @@ const U = (h) => (pe("data-v-e2b739c9"), h = h(), he(), h), ve = { class: "org-s
233
234
  ]),
234
235
  _: 1
235
236
  }, 8, ["modelValue", "disabled", "readonly"])),
236
- p(ae, {
237
+ h(ae, {
237
238
  title: "单位选择",
238
- modelValue: b(_),
239
- "onUpdate:modelValue": l[2] || (l[2] = (d) => S(_) ? _.value = d : _ = d),
240
- onClose: q,
239
+ modelValue: b(m),
240
+ "onUpdate:modelValue": l[2] || (l[2] = (d) => S(m) ? m.value = d : m = d),
241
+ onClose: P,
241
242
  width: 1e3
242
243
  }, {
243
- default: m(() => [
244
+ default: _(() => [
244
245
  s("div", ge, [
245
- s("div", _e, [
246
- s("div", me, [
246
+ s("div", me, [
247
+ s("div", _e, [
247
248
  ye,
248
- p(i, {
249
+ h(i, {
249
250
  modelValue: b(y),
250
251
  "onUpdate:modelValue": l[1] || (l[1] = (d) => S(y) ? y.value = d : y = d),
251
252
  "suffix-icon": "Search",
@@ -253,8 +254,8 @@ const U = (h) => (pe("data-v-e2b739c9"), h = h(), he(), h), ve = { class: "org-s
253
254
  placeholder: "请输入单位名称查询"
254
255
  }, null, 8, ["modelValue"])
255
256
  ]),
256
- s("div", Ce, [
257
- p(I, {
257
+ s("div", ke, [
258
+ h(I, {
258
259
  data: b(B),
259
260
  ref_key: "orgTree",
260
261
  ref: r,
@@ -274,7 +275,7 @@ const U = (h) => (pe("data-v-e2b739c9"), h = h(), he(), h), ve = { class: "org-s
274
275
  }, null, 8, ["data", "show-checkbox"])
275
276
  ])
276
277
  ]),
277
- s("div", ke, [
278
+ s("div", Ce, [
278
279
  s("div", { class: "selected-box" }, [
279
280
  be,
280
281
  s("div", { title: "删除全部" }, [
@@ -287,18 +288,18 @@ const U = (h) => (pe("data-v-e2b739c9"), h = h(), he(), h), ve = { class: "org-s
287
288
  s("div", null, [
288
289
  s("div", xe, [
289
290
  s("ul", null, [
290
- (k(!0), T(ce, null, fe(b(c), (d, P) => (k(), T("li", {
291
- key: P + "s",
291
+ (C(!0), T(ce, null, fe(b(f), (d, K) => (C(), T("li", {
292
+ key: K + "s",
292
293
  title: d.orgName + "(" + d.id + ")"
293
294
  }, [
294
295
  s("span", Ve, j(d.orgName) + "(" + j(d.id) + ") ", 1),
295
- p(o, {
296
- onClick: (Ie) => ee(d, P),
296
+ h(o, {
297
+ onClick: (Se) => ee(d, K),
297
298
  color: "#909399",
298
299
  size: "16"
299
300
  }, {
300
- default: m(() => [
301
- p(ne)
301
+ default: _(() => [
302
+ h(ne)
302
303
  ]),
303
304
  _: 2
304
305
  }, 1032, ["onClick"])
@@ -309,17 +310,17 @@ const U = (h) => (pe("data-v-e2b739c9"), h = h(), he(), h), ve = { class: "org-s
309
310
  ])
310
311
  ]),
311
312
  s("div", Te, [
312
- p(a, { onClick: q }, {
313
- default: m(() => [
313
+ h(a, { onClick: P }, {
314
+ default: _(() => [
314
315
  O("取消")
315
316
  ]),
316
317
  _: 1
317
318
  }),
318
- p(a, {
319
+ h(a, {
319
320
  type: "primary",
320
321
  onClick: le
321
322
  }, {
322
- default: m(() => [
323
+ default: _(() => [
323
324
  O("确认")
324
325
  ]),
325
326
  _: 1
@@ -332,12 +333,17 @@ const U = (h) => (pe("data-v-e2b739c9"), h = h(), he(), h), ve = { class: "org-s
332
333
  };
333
334
  }
334
335
  });
335
- const Be = (h, g) => {
336
- const n = h.__vccOpts || h;
337
- for (const [N, V] of g)
336
+ const Be = (u, v) => {
337
+ const n = u.__vccOpts || u;
338
+ for (const [N, V] of v)
338
339
  n[N] = V;
339
340
  return n;
340
- }, Oe = /* @__PURE__ */ Be(Ee, [["__scopeId", "data-v-e2b739c9"]]);
341
+ }, Ie = /* @__PURE__ */ Be(Ee, [["__scopeId", "data-v-7f6c2b96"]]), je = {
342
+ install(u, v = {}) {
343
+ u.component("ksoSelOrg", Ie);
344
+ }
345
+ };
341
346
  export {
342
- Oe as default
347
+ je as default,
348
+ Ie as ksoSelOrg
343
349
  };
package/dist/index.umd.js CHANGED
@@ -1 +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-sel-org"]=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"]])});
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 CHANGED
@@ -1 +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}
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}
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "kso-sel-org",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "机构选择",
5
+ "private": false,
5
6
  "main": "dist/index.umd.js",
6
7
  "module": "dist/index.es.js",
7
8
  "types": "dist/index.d.ts",
@@ -19,7 +20,7 @@
19
20
  "element-plus": "^2.3.8",
20
21
  "element-resize-detector": "^1.2.4",
21
22
  "kso-dic": "^1.0.0",
22
- "kso-sel-org": "^1.0.5",
23
+ "kso-sel-org": "^1.0.8",
23
24
  "kso-sel-reg": "^1.0.1",
24
25
  "less": "^4.1.3",
25
26
  "less-loader": "^11.1.3",
@@ -1,17 +0,0 @@
1
- export declare const load: () => {
2
- dialog: any;
3
- columns: any;
4
- queryCondis: any;
5
- pagination: any;
6
- tableData: any;
7
- load_dialog_config: () => Promise<void>;
8
- page_current_change: () => void;
9
- sort_change: ({ prop, order }: {
10
- prop: any;
11
- order: any;
12
- }) => void;
13
- load_table_data: (pageNum?: number) => void;
14
- sort_header_cell_class: ({ column }: {
15
- column: any;
16
- }) => string;
17
- };
@@ -1,2 +0,0 @@
1
- import kuDialog from './components/dialog.vue';
2
- export { kuDialog as kuDialog };
@@ -1,28 +0,0 @@
1
- export declare const load: () => {
2
- load_grid_config: () => Promise<void>;
3
- load_table_data: (pageNum?: number) => void;
4
- filter_change: (filters: any) => void;
5
- sort_header_cell_class: ({ column }: {
6
- column: any;
7
- }) => string;
8
- sort_change: ({ prop, order }: {
9
- prop: any;
10
- order: any;
11
- }) => void;
12
- page_size_change: () => void;
13
- page_current_change: () => void;
14
- clearRowFilter: () => void;
15
- lstabRef: any;
16
- cfgLoading: any;
17
- queryCondis: any;
18
- columns: any;
19
- loading: any;
20
- lstab: any;
21
- headFuncOper: any;
22
- rowFuncOper: any;
23
- headFuncOperBatch: any;
24
- rowFuncOperBatch: any;
25
- quickFilter: any;
26
- pagination: any;
27
- tableData: any;
28
- };
@@ -1,5 +0,0 @@
1
- export declare const method: () => {
2
- calColWidth: (width: number, num: string, minNum: string) => string | number;
3
- debounce: (fn: any, time: any) => (...argu: any[]) => void;
4
- openLsTabSetting: () => void;
5
- };
@@ -1 +0,0 @@
1
- export { default as kuMenuAuthor } from './src/index.vue';
@@ -1 +0,0 @@
1
- export { default as kuOperAuthor } from './src/index.vue';
@@ -1 +0,0 @@
1
- export { default as kuRoleAssign } from './src/index.vue';
@@ -1 +0,0 @@
1
- export { default as kuRoleAuthor } from './src/index.vue';
@@ -1,3 +0,0 @@
1
- export { default as kuAreaSelector } from './src/area-selector/index.vue';
2
- export { default as kuOrgSelector } from './src/org-selector/index.vue';
3
- export { default as kuUserSelector } from './src/user-selector/index.vue';
@@ -1,132 +0,0 @@
1
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
- /** 默认选中code值 */
3
- modelValue: string;
4
- /** 根机构ID(根机构ID,如果不设置,则返回所有机构树,传入则只显示该机构下的所有单位树) */
5
- rootOrgId?: string | undefined;
6
- /** 单位类型(如果不设置,则返回所有单位类型,否则传值(01:隶属局单位,02:直属局单位,03:总署单位))*/
7
- orgType?: string | undefined;
8
- /** 文本框显示内容 */
9
- inputText?: string | undefined;
10
- /** 返回内容处理 */
11
- returnValue?: string | undefined;
12
- /** 是否只读 */
13
- readonly?: boolean | undefined;
14
- /** 是否清除 */
15
- isClear?: boolean | undefined;
16
- /** 是否禁用 */
17
- disabled?: boolean | undefined;
18
- /** 按钮文本内容 */
19
- buttonText?: string | undefined;
20
- /** 开启复选 */
21
- multiple?: boolean | undefined;
22
- /** 事件绑定 */
23
- bindEvent?: boolean | undefined;
24
- /** 根据传进来的code查对应的name,覆盖inputText值 */
25
- defaultText?: boolean | undefined;
26
- /** 扩展查询参数 */
27
- reqParams?: object | undefined;
28
- }>, {
29
- modelValue: string;
30
- rootOrgId: string;
31
- orgType: string;
32
- inputText: string;
33
- returnValue: string;
34
- readonly: boolean;
35
- isClear: boolean;
36
- disabled: boolean;
37
- buttonText: string;
38
- multiple: boolean;
39
- bindEvent: boolean;
40
- defaultText: boolean;
41
- reqParams: undefined;
42
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
43
- onSelect: (...args: any[]) => void;
44
- "update:modelValue": (...args: any[]) => void;
45
- onCancel: (...args: any[]) => void;
46
- onClear: (...args: any[]) => void;
47
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
48
- /** 默认选中code值 */
49
- modelValue: string;
50
- /** 根机构ID(根机构ID,如果不设置,则返回所有机构树,传入则只显示该机构下的所有单位树) */
51
- rootOrgId?: string | undefined;
52
- /** 单位类型(如果不设置,则返回所有单位类型,否则传值(01:隶属局单位,02:直属局单位,03:总署单位))*/
53
- orgType?: string | undefined;
54
- /** 文本框显示内容 */
55
- inputText?: string | undefined;
56
- /** 返回内容处理 */
57
- returnValue?: string | undefined;
58
- /** 是否只读 */
59
- readonly?: boolean | undefined;
60
- /** 是否清除 */
61
- isClear?: boolean | undefined;
62
- /** 是否禁用 */
63
- disabled?: boolean | undefined;
64
- /** 按钮文本内容 */
65
- buttonText?: string | undefined;
66
- /** 开启复选 */
67
- multiple?: boolean | undefined;
68
- /** 事件绑定 */
69
- bindEvent?: boolean | undefined;
70
- /** 根据传进来的code查对应的name,覆盖inputText值 */
71
- defaultText?: boolean | undefined;
72
- /** 扩展查询参数 */
73
- reqParams?: object | undefined;
74
- }>, {
75
- modelValue: string;
76
- rootOrgId: string;
77
- orgType: string;
78
- inputText: string;
79
- returnValue: string;
80
- readonly: boolean;
81
- isClear: boolean;
82
- disabled: boolean;
83
- buttonText: string;
84
- multiple: boolean;
85
- bindEvent: boolean;
86
- defaultText: boolean;
87
- reqParams: undefined;
88
- }>>> & {
89
- onOnSelect?: ((...args: any[]) => any) | undefined;
90
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
91
- onOnCancel?: ((...args: any[]) => any) | undefined;
92
- onOnClear?: ((...args: any[]) => any) | undefined;
93
- }, {
94
- modelValue: string;
95
- multiple: boolean;
96
- readonly: boolean;
97
- disabled: boolean;
98
- bindEvent: boolean;
99
- inputText: string;
100
- returnValue: string;
101
- isClear: boolean;
102
- buttonText: string;
103
- defaultText: boolean;
104
- reqParams: object;
105
- rootOrgId: string;
106
- orgType: string;
107
- }, {}>, {
108
- func?(_: {}): any;
109
- }>;
110
- export default _default;
111
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
112
- type __VLS_TypePropsToRuntimeProps<T> = {
113
- [K in keyof T]-?: {} extends Pick<T, K> ? {
114
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
115
- } : {
116
- type: import('vue').PropType<T[K]>;
117
- required: true;
118
- };
119
- };
120
- type __VLS_WithDefaults<P, D> = {
121
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
122
- default: D[K];
123
- }> : P[K];
124
- };
125
- type __VLS_Prettify<T> = {
126
- [K in keyof T]: T[K];
127
- } & {};
128
- type __VLS_WithTemplateSlots<T, S> = T & {
129
- new (): {
130
- $slots: S;
131
- };
132
- };
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import ksoSelOrg from './components/Selector/src/org-selector/index.vue';
2
- export default ksoSelOrg;