kso-sel-org 1.0.15 → 1.0.18

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.
Files changed (2) hide show
  1. package/index.js +168 -162
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,15 +1,15 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".org-list-box[data-v-d7df037a]{display:flex;padding:10px;box-sizing:border-box;justify-content:space-between}.org-list-box .left-tree-box[data-v-d7df037a]{width:50%;overflow:hidden;border:1px solid #ebeef5}.org-list-box .left-tree-box .search-box[data-v-d7df037a]{display:flex;height:52px;padding:5px 12px;background:#f0f2f5;box-sizing:border-box;align-items:center}.org-list-box .left-tree-box .search-box label[data-v-d7df037a]{font-weight:700;color:#303133;white-space:nowrap}.org-list-box .left-tree-box .search-box .el-input[data-v-d7df037a]{width:100%;margin-left:10px}.org-list-box .right-selected-list[data-v-d7df037a]{width:48%;border:1px solid #ebeef5}.org-list-box .right-selected-list .selected-box[data-v-d7df037a]{display:flex;height:52px;padding:5px 12px;background:#f0f2f5;box-sizing:border-box;align-items:center;justify-content:space-between}.org-list-box .right-selected-list .selected-box span[data-v-d7df037a]{font-weight:700;color:#303133}.org-list-box .right-selected-list .selected-box .delete-btn[data-v-d7df037a]{display:inline-block;width:17px;height:17px;cursor:pointer;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 .el-icon svg[data-v-d7df037a]{width:1.5em;height:1.5em}.org-list-box .tree-content-box[data-v-d7df037a]{height:420px;padding:5px 15px;overflow:auto;box-sizing:border-box}.org-list-box ul li[data-v-d7df037a]{display:flex;width:100%;padding:0 20px;margin-bottom:8px;line-height:40px;border:solid 1px #d7dde4;border-radius:4px;box-sizing:border-box;align-items:center;justify-content:space-between}.org-list-box ul .org-name[data-v-d7df037a]{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.org-list-box ul .el-icon[data-v-d7df037a]{cursor:pointer}.org-list-box .org-del .img-box[data-v-d7df037a]{margin:7px 0 0;cursor:pointer}.org-list-box .flow-modal-title[data-v-d7df037a]{width:100%;height:40px;line-height:40px;color:#fff;text-indent:1em;background:#2b5fda}.selector-footer[data-v-d7df037a]{display:flex;padding:10px;border-top:solid 1px #dcdfe6;justify-content:flex-end}[data-v-d7df037a] .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-d7df037a] .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-d7df037a] .el-input{height:32px}[data-v-d7df037a] .node-text-box{display:flex;align-items:center}[data-v-d7df037a] .node-text-box .el-radio{margin-right:5px}[data-v-d7df037a] .node-text-box .el-radio .el-radio__label{display:none}[data-v-d7df037a] .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{background-color:#f0f5ff}[data-v-d7df037a] .el-input__icon{color:#a8abb2}[data-v-d7df037a]::-webkit-scrollbar{width:5px}[data-v-d7df037a]::-webkit-scrollbar-thumb{background:#b7c7dd;border-radius:3px}[data-v-d7df037a]::-webkit-scrollbar-track{background:#ededed;border-radius:3px}.close[data-v-d7df037a]{position:absolute;display:none;padding:2px;cursor:pointer;border-radius:50%}.org-selector:hover .close[data-v-d7df037a]{display:block}")),document.head.appendChild(e)}}catch(d){console.error("vite-plugin-css-injected-by-js",d)}})();
2
- import { defineComponent as pe, mergeModels as Y, useAttrs as ve, useModel as he, inject as ge, ref as f, onMounted as _e, resolveComponent as y, openBlock as g, createElementBlock as b, createElementVNode as o, createVNode as r, unref as _, isRef as j, Fragment as Z, renderList as ee, toDisplayString as E, withCtx as k, renderSlot as me, createBlock as le, createTextVNode as q, normalizeStyle as ye, createCommentVNode as ke, pushScopeId as xe, popScopeId as be } from "vue";
3
- import { ElMessage as te } from "element-plus";
4
- const K = (h) => (xe("data-v-d7df037a"), h = h(), be(), h), Ce = {
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".org-list-box[data-v-873ad7a9]{display:flex;padding:10px;box-sizing:border-box;justify-content:space-between}.org-list-box .left-tree-box[data-v-873ad7a9]{width:50%;overflow:hidden;border:1px solid #ebeef5}.org-list-box .left-tree-box .search-box[data-v-873ad7a9]{display:flex;height:52px;padding:5px 12px;background:#f0f2f5;box-sizing:border-box;align-items:center}.org-list-box .left-tree-box .search-box label[data-v-873ad7a9]{font-weight:700;color:#303133;white-space:nowrap}.org-list-box .left-tree-box .search-box .el-input[data-v-873ad7a9]{width:100%;margin-left:10px}.org-list-box .right-selected-list[data-v-873ad7a9]{width:48%;border:1px solid #ebeef5}.org-list-box .right-selected-list .selected-box[data-v-873ad7a9]{display:flex;height:52px;padding:5px 12px;background:#f0f2f5;box-sizing:border-box;align-items:center;justify-content:space-between}.org-list-box .right-selected-list .selected-box span[data-v-873ad7a9]{font-weight:700;color:#303133}.org-list-box .right-selected-list .selected-box .delete-btn[data-v-873ad7a9]{display:inline-block;width:17px;height:17px;cursor:pointer;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 .el-icon svg[data-v-873ad7a9]{width:1.5em;height:1.5em}.org-list-box .tree-content-box[data-v-873ad7a9]{height:420px;padding:5px 15px;overflow:auto;box-sizing:border-box}.org-list-box ul li[data-v-873ad7a9]{display:flex;width:100%;padding:0 20px;margin-bottom:8px;line-height:40px;border:solid 1px #d7dde4;border-radius:4px;box-sizing:border-box;align-items:center;justify-content:space-between}.org-list-box ul .org-name[data-v-873ad7a9]{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.org-list-box ul .el-icon[data-v-873ad7a9]{cursor:pointer}.org-list-box .org-del .img-box[data-v-873ad7a9]{margin:7px 0 0;cursor:pointer}.org-list-box .flow-modal-title[data-v-873ad7a9]{width:100%;height:40px;line-height:40px;color:#fff;text-indent:1em;background:#2b5fda}.selector-footer[data-v-873ad7a9]{display:flex;padding:10px;border-top:solid 1px #dcdfe6;justify-content:flex-end}[data-v-873ad7a9] .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-873ad7a9] .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-873ad7a9] .el-input{height:32px}[data-v-873ad7a9] .node-text-box{display:flex;align-items:center}[data-v-873ad7a9] .node-text-box .el-radio{margin-right:5px}[data-v-873ad7a9] .node-text-box .el-radio .el-radio__label{display:none}[data-v-873ad7a9] .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{background-color:#f0f5ff}[data-v-873ad7a9] .el-input__icon{color:#a8abb2}[data-v-873ad7a9]::-webkit-scrollbar{width:5px}[data-v-873ad7a9]::-webkit-scrollbar-thumb{background:#b7c7dd;border-radius:3px}[data-v-873ad7a9]::-webkit-scrollbar-track{background:#ededed;border-radius:3px}.close[data-v-873ad7a9]{position:absolute;display:none;padding:2px;cursor:pointer;border-radius:50%}.org-selector:hover .close[data-v-873ad7a9]{display:block}")),document.head.appendChild(e)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
+ import { defineComponent as ve, mergeModels as Z, useAttrs as he, useModel as ge, inject as _e, ref as f, watch as me, onMounted as ye, resolveComponent as y, openBlock as _, createElementBlock as b, createElementVNode as n, createVNode as r, unref as m, isRef as j, Fragment as ee, renderList as le, toDisplayString as O, withCtx as k, renderSlot as ke, createBlock as te, createTextVNode as F, normalizeStyle as xe, createCommentVNode as be, pushScopeId as Ce, popScopeId as Ne } from "vue";
3
+ import { ElMessage as oe } from "element-plus";
4
+ const K = (h) => (Ce("data-v-873ad7a9"), h = h(), Ne(), h), Ve = {
5
5
  key: 0,
6
6
  class: "org-selector"
7
- }, Ne = { class: "org-list-box" }, Ve = { class: "left-tree-box" }, Te = { class: "search-box" }, Ie = /* @__PURE__ */ K(() => /* @__PURE__ */ o("label", null, "单位列表", -1)), Se = { class: "tree-content-box" }, Ee = { class: "right-selected-list" }, Oe = /* @__PURE__ */ K(() => /* @__PURE__ */ o("span", null, "已选单位", -1)), Be = { class: "tree-content-box" }, De = ["title"], we = {
7
+ }, Te = { class: "org-list-box" }, Ie = { class: "left-tree-box" }, Se = { class: "search-box" }, Ee = /* @__PURE__ */ K(() => /* @__PURE__ */ n("label", null, "单位列表", -1)), Oe = { class: "tree-content-box" }, Be = { class: "right-selected-list" }, we = /* @__PURE__ */ K(() => /* @__PURE__ */ n("span", null, "已选单位", -1)), De = { class: "tree-content-box" }, Ae = ["title"], je = {
8
8
  key: 1,
9
9
  class: "org-selector"
10
- }, Ae = { class: "org-list-box" }, je = { class: "left-tree-box" }, Ke = { class: "search-box" }, Le = /* @__PURE__ */ K(() => /* @__PURE__ */ o("label", null, "单位列表", -1)), Me = { class: "tree-content-box" }, qe = { class: "right-selected-list" }, ze = /* @__PURE__ */ K(() => /* @__PURE__ */ o("span", null, "已选单位", -1)), Fe = { class: "tree-content-box" }, Pe = ["title"], Re = { class: "selector-footer" }, Ue = /* @__PURE__ */ pe({
10
+ }, Ke = { class: "org-list-box" }, Le = { class: "left-tree-box" }, Me = { class: "search-box" }, qe = /* @__PURE__ */ K(() => /* @__PURE__ */ n("label", null, "单位列表", -1)), ze = { class: "tree-content-box" }, Fe = { class: "right-selected-list" }, Pe = /* @__PURE__ */ K(() => /* @__PURE__ */ n("span", null, "已选单位", -1)), Re = { class: "tree-content-box" }, Ue = ["title"], $e = { class: "selector-footer" }, He = /* @__PURE__ */ ve({
11
11
  __name: "index",
12
- props: /* @__PURE__ */ Y({
12
+ props: /* @__PURE__ */ Z({
13
13
  notDialog: { type: Boolean },
14
14
  title: { default: "单位选择" },
15
15
  modelValue: { default: "" },
@@ -32,58 +32,64 @@ const K = (h) => (xe("data-v-d7df037a"), h = h(), be(), h), Ce = {
32
32
  inputText: { type: String },
33
33
  inputTextModifiers: {}
34
34
  }),
35
- emits: /* @__PURE__ */ Y(["onCancel", "onSelect", "update:modelValue", "onClear"], ["update:inputText"]),
36
- setup(h, { expose: L, emit: O }) {
37
- const n = h;
38
- let B = ve();
39
- const C = O, N = he(h, "inputText"), z = ge("req"), F = {
35
+ emits: /* @__PURE__ */ Z(["onCancel", "onSelect", "update:modelValue", "onClear"], ["update:inputText"]),
36
+ setup(h, { expose: L, emit: B }) {
37
+ const o = h;
38
+ let w = he();
39
+ const C = B, N = ge(h, "inputText"), P = _e("req"), R = {
40
40
  children: "childrenList",
41
41
  label: "orgName"
42
42
  }, i = f();
43
- let P = f(!1), p = f(!1), D = f(!1), V = f(""), v = f(""), u = f([]), w = f([]), x = f([]);
44
- const T = f([]), m = f("");
43
+ let U = f(!1), p = f(!1), V = f(!1), T = f(""), v = f(""), u = f([]), D = f([]), x = f([]);
44
+ const I = f([]), g = f(""), M = f(!0);
45
+ me(
46
+ () => o.modelValue,
47
+ (e, l) => {
48
+ g.value = e, o.defaultText && !V.value && q();
49
+ }
50
+ );
45
51
  function A() {
46
- if (n.modelValue)
47
- m.value = n.modelValue, x.value = m.value.split(","), T.value = x.value;
52
+ if (o.modelValue)
53
+ g.value = o.modelValue, x.value = g.value.split(","), I.value = x.value;
48
54
  else {
49
- m.value = "";
55
+ g.value = "";
50
56
  const e = JSON.parse(localStorage.getItem("userInfo"));
51
- T.value = [e.orgId], x.value = [];
57
+ I.value = [e.orgId], x.value = [];
52
58
  }
53
- if (p.value = !0, P.value && i.value) {
59
+ if (p.value = !0, U.value && i.value) {
54
60
  i.value.setCheckedKeys(x.value), u.value = i.value.getCheckedNodes();
55
61
  return;
56
62
  }
57
- ne();
58
- }
59
- function oe() {
60
- n.bindEvent && A();
63
+ ae();
61
64
  }
62
65
  function ne() {
66
+ o.bindEvent && A();
67
+ }
68
+ function ae() {
63
69
  let e = {
64
- pid: n.rootOrgId,
65
- orgType: n.orgType
70
+ pid: o.rootOrgId,
71
+ orgType: o.orgType
66
72
  };
67
- n.reqParams && (e = Object.assign(e, n.reqParams)), z.post({ url: getKsoRoot("/sys/org/list-by-condition"), params: e }).then(({ data: l }) => {
68
- n.rootOrgId && l.forEach((a) => {
69
- a.id == n.rootOrgId && (a.pid = "");
73
+ o.reqParams && (e = Object.assign(e, o.reqParams)), P.post({ url: getKsoRoot("/sys/org/list-by-condition"), params: e }).then(({ data: l }) => {
74
+ o.rootOrgId && l.forEach((a) => {
75
+ a.id == o.rootOrgId && (a.pid = "");
70
76
  });
71
- let t = ae(l);
72
- T.value.length < 1 && t && t.length > 0 && t.forEach((a) => {
77
+ let t = se(l);
78
+ I.value.length < 1 && t && t.length > 0 && t.forEach((a) => {
73
79
  a.expanded = !0;
74
- }), w.value = t, i.value.setCheckedKeys(x.value), P.value = !0;
80
+ }), D.value = t, i.value.setCheckedKeys(x.value), U.value = !0;
75
81
  });
76
82
  }
77
- function R() {
78
- if (!m.value)
83
+ function q() {
84
+ if (!g.value)
79
85
  return;
80
- D.value = !0;
81
- let e = { ids: m.value };
82
- z.post({ url: getKsoRoot("/sys/org/find-by-ids"), params: e }).then(({ data: l }) => {
83
- l && l.length > 0 && (W(l), C("onSelect", l));
86
+ V.value = !0;
87
+ let e = { ids: g.value };
88
+ P.post({ url: getKsoRoot("/sys/org/find-by-ids"), params: e }).then(({ data: l }) => {
89
+ l && l.length > 0 && (X(l), C("onSelect", l));
84
90
  });
85
91
  }
86
- function ae(e) {
92
+ function se(e) {
87
93
  return e.forEach((l) => {
88
94
  l.name = l.orgName, x.value.length > 0 && x.value.includes(l.id) && u.value.push(l);
89
95
  let t = [];
@@ -92,14 +98,14 @@ const K = (h) => (xe("data-v-d7df037a"), h = h(), be(), h), Ce = {
92
98
  }), l.childrenList = t;
93
99
  }), e = e.filter((l) => l.pid == ""), e;
94
100
  }
95
- function U(e, { node: l, data: t }) {
101
+ function $(e, { node: l, data: t }) {
96
102
  t.expanded && (l.expanded = !0);
97
103
  let a = "tree-file-node-icon";
98
104
  l.childNodes && l.childNodes.length > 0 && (a = "tree-folder-node-icon");
99
105
  let d = [];
100
- if (!n.multiple) {
106
+ if (!o.multiple) {
101
107
  let c = "";
102
- t.id === V.value && (c = t.id), d.push(
108
+ t.id === T.value && (c = t.id), d.push(
103
109
  e(y("el-radio"), {
104
110
  modelValue: c,
105
111
  label: t.id
@@ -123,41 +129,41 @@ const K = (h) => (xe("data-v-d7df037a"), h = h(), be(), h), Ce = {
123
129
  )
124
130
  ), e("span", { class: "node-text-box" }, d);
125
131
  }
126
- function $(e, l) {
132
+ function H(e, l) {
127
133
  return e ? l.name.indexOf(e) !== -1 || l.id.indexOf(e) !== -1 : !0;
128
134
  }
129
- function H() {
130
- i.value.filter(v.value), v.value || se(w.value[0].id, !1);
135
+ function J() {
136
+ i.value.filter(v.value), v.value || de(D.value[0].id, !1);
131
137
  }
132
- function se(e, l) {
138
+ function de(e, l) {
133
139
  var t = i.value.store.nodesMap;
134
140
  for (let a in t)
135
141
  e === a ? t[a].expanded = !0 : t[a].expanded = l;
136
142
  }
137
- function J(e) {
138
- n.multiple || (i.value.setCheckedNodes([e]), V.value = e.id), u.value = i.value.getCheckedNodes();
139
- }
140
- function G(e, l) {
141
- u.value.splice(l, 1), V.value = "", i.value.setCheckedNodes(u.value);
143
+ function G(e) {
144
+ o.multiple || (i.value.setCheckedNodes([e]), T.value = e.id), u.value = i.value.getCheckedNodes();
142
145
  }
143
- function M() {
144
- u.value = [], V.value = "", i.value && i.value.setCheckedNodes(u.value);
146
+ function Q(e, l) {
147
+ u.value.splice(l, 1), T.value = "", i.value.setCheckedNodes(u.value);
145
148
  }
146
- function de() {
147
- p.value = !1, C("onCancel", "");
149
+ function z() {
150
+ u.value = [], T.value = "", i.value && i.value.setCheckedNodes(u.value);
148
151
  }
149
152
  function ie() {
153
+ p.value = !1, M.value && C("onCancel", ""), M.value = !0;
154
+ }
155
+ function re() {
150
156
  if (u.value.length == 0)
151
- return te.closeAll(), te({
157
+ return oe.closeAll(), oe({
152
158
  message: "请选择数据",
153
159
  duration: 1e3,
154
160
  type: "warning",
155
161
  offset: document.documentElement.clientHeight / 3
156
162
  }), !1;
157
- let e = Q(u.value);
158
- W(e), p.value = !1, C("onSelect", e);
163
+ let e = W(u.value);
164
+ X(e), C("onSelect", e), M.value = !1, p.value = !1;
159
165
  }
160
- function Q(e) {
166
+ function W(e) {
161
167
  let l = [];
162
168
  return e.forEach((t) => {
163
169
  let a = {
@@ -174,7 +180,7 @@ const K = (h) => (xe("data-v-d7df037a"), h = h(), be(), h), Ce = {
174
180
  l.push(a);
175
181
  }), l;
176
182
  }
177
- function W(e) {
183
+ function X(e) {
178
184
  let l = {};
179
185
  Object.keys(e[0]).forEach((a) => {
180
186
  l[a] = [];
@@ -182,97 +188,97 @@ const K = (h) => (xe("data-v-d7df037a"), h = h(), be(), h), Ce = {
182
188
  var d;
183
189
  for (let c in a)
184
190
  (d = l[c]) == null || d.push(a[c]);
185
- }), N.value = l.orgName.join(n.separator), C("update:modelValue", l.id.join(","));
186
- let t = n.returnValue.split("|");
191
+ }), N.value = l.orgName.join(o.separator), C("update:modelValue", l.id.join(","));
192
+ let t = o.returnValue.split("|");
187
193
  t && t.length > 0 && t.forEach((a) => {
188
194
  let d = a.split(":");
189
195
  if (d && d.length > 1) {
190
- let c = l[d[1]], I = c ? c.join(",") : "";
191
- B.sync[d[0]] = I;
196
+ let c = l[d[1]], S = c ? c.join(",") : "";
197
+ w.sync[d[0]] = S;
192
198
  }
193
199
  });
194
200
  }
195
- function X() {
196
- if (N.value = "", C("update:modelValue", ""), n.returnValue) {
197
- let e = n.returnValue.split("|");
201
+ function Y() {
202
+ if (N.value = "", C("update:modelValue", ""), o.returnValue) {
203
+ let e = o.returnValue.split("|");
198
204
  e && e.length > 0 && e.forEach((l) => {
199
205
  let t = l.split(":");
200
- t && t.length > 1 && (B.sync[t[0]] = "");
206
+ t && t.length > 1 && (w.sync[t[0]] = "");
201
207
  });
202
208
  }
203
- M(), C("onClear", "");
209
+ z(), C("onClear", "");
204
210
  }
205
- _e(() => {
206
- m.value = n.modelValue, n.notDialog && A(), n.defaultText && !D.value && R(), n.multiple || (V.value = m.value);
211
+ ye(() => {
212
+ g.value = o.modelValue, o.notDialog && A(), o.defaultText && !V.value && q(), o.multiple || (T.value = g.value);
207
213
  });
208
- function re(e) {
209
- m.value = e, D.value = !1, n.defaultText && !D.value && R();
214
+ function ue(e) {
215
+ g.value = e, V.value = !1, o.defaultText && !V.value && q();
210
216
  }
211
217
  return L({
212
218
  /** 获取选中的数据 */
213
- clear: X,
214
- setValue: re,
215
- getSelectData: () => Q(u.value),
219
+ clear: Y,
220
+ setValue: ue,
221
+ getSelectData: () => W(u.value),
216
222
  openDialogEvent: A
217
223
  }), (e, l) => {
218
- const t = y("el-input"), a = y("el-tree"), d = y("CircleCloseFilled"), c = y("el-icon"), I = y("el-button"), ue = y("CircleClose"), ce = y("el-dialog");
219
- return e.notDialog ? (g(), b("div", Ce, [
220
- o("div", Ne, [
221
- o("div", Ve, [
222
- o("div", Te, [
223
- Ie,
224
+ const t = y("el-input"), a = y("el-tree"), d = y("CircleCloseFilled"), c = y("el-icon"), S = y("el-button"), ce = y("CircleClose"), fe = y("el-dialog");
225
+ return e.notDialog ? (_(), b("div", Ve, [
226
+ n("div", Te, [
227
+ n("div", Ie, [
228
+ n("div", Se, [
229
+ Ee,
224
230
  r(t, {
225
- modelValue: _(v),
231
+ modelValue: m(v),
226
232
  "onUpdate:modelValue": l[0] || (l[0] = (s) => j(v) ? v.value = s : v = s),
227
233
  "suffix-icon": "Search",
228
- onInput: H,
234
+ onInput: J,
229
235
  placeholder: "请输入单位名称查询"
230
236
  }, null, 8, ["modelValue"])
231
237
  ]),
232
- o("div", Se, [
238
+ n("div", Oe, [
233
239
  r(a, {
234
240
  ref_key: "orgTree",
235
241
  ref: i,
236
- data: _(w),
242
+ data: m(D),
237
243
  "node-key": "id",
238
- props: F,
244
+ props: R,
239
245
  "expand-on-click-node": !1,
240
- "show-checkbox": n.multiple,
246
+ "show-checkbox": o.multiple,
241
247
  "check-strictly": !0,
242
248
  "highlight-current": !0,
243
249
  accordion: !1,
244
250
  "check-on-click-node": !0,
245
- "filter-node-method": $,
251
+ "filter-node-method": H,
246
252
  indent: 26,
247
- onCheck: J,
248
- "render-content": U,
249
- "default-expanded-keys": _(T),
253
+ onCheck: G,
254
+ "render-content": $,
255
+ "default-expanded-keys": m(I),
250
256
  "icon-class": "el-icon-arrow-right"
251
257
  }, null, 8, ["data", "show-checkbox", "default-expanded-keys"])
252
258
  ])
253
259
  ]),
254
- o("div", Ee, [
255
- o("div", { class: "selected-box" }, [
256
- Oe,
257
- o("div", { title: "删除全部" }, [
258
- o("i", {
259
- onClick: M,
260
+ n("div", Be, [
261
+ n("div", { class: "selected-box" }, [
262
+ we,
263
+ n("div", { title: "删除全部" }, [
264
+ n("i", {
265
+ onClick: z,
260
266
  class: "delete-btn"
261
267
  })
262
268
  ])
263
269
  ]),
264
- o("div", null, [
265
- o("div", Be, [
266
- o("ul", null, [
267
- (g(!0), b(Z, null, ee(_(u), (s, S) => (g(), b("li", {
268
- key: S + "s"
270
+ n("div", null, [
271
+ n("div", De, [
272
+ n("ul", null, [
273
+ (_(!0), b(ee, null, le(m(u), (s, E) => (_(), b("li", {
274
+ key: E + "s"
269
275
  }, [
270
- o("span", {
276
+ n("span", {
271
277
  class: "org-name",
272
278
  title: s.orgName + "(" + s.id + ")"
273
- }, E(s.orgName) + "(" + E(s.id) + ") ", 9, De),
279
+ }, O(s.orgName) + "(" + O(s.id) + ") ", 9, Ae),
274
280
  r(c, {
275
- onClick: (fe) => G(s, S),
281
+ onClick: (pe) => Q(s, E),
276
282
  title: "移除",
277
283
  color: "#909399",
278
284
  size: "16"
@@ -288,14 +294,14 @@ const K = (h) => (xe("data-v-d7df037a"), h = h(), be(), h), Ce = {
288
294
  ])
289
295
  ])
290
296
  ])
291
- ])) : (g(), b("div", we, [
292
- e.$slots.func ? (g(), b("div", {
297
+ ])) : (_(), b("div", je, [
298
+ e.$slots.func ? (_(), b("div", {
293
299
  key: 0,
294
300
  class: "slot-box",
295
- onClick: oe
301
+ onClick: ne
296
302
  }, [
297
- me(e.$slots, "func", {}, void 0, !0)
298
- ])) : (g(), le(t, {
303
+ ke(e.$slots, "func", {}, void 0, !0)
304
+ ])) : (_(), te(t, {
299
305
  key: 1,
300
306
  modelValue: N.value,
301
307
  "onUpdate:modelValue": l[1] || (l[1] = (s) => N.value = s),
@@ -303,97 +309,97 @@ const K = (h) => (xe("data-v-d7df037a"), h = h(), be(), h), Ce = {
303
309
  readonly: e.readonly
304
310
  }, {
305
311
  append: k(() => [
306
- r(I, {
312
+ r(S, {
307
313
  type: "primary",
308
314
  disabled: e.disabled,
309
315
  onClick: A
310
316
  }, {
311
317
  default: k(() => [
312
- q(E(e.buttonText), 1)
318
+ F(O(e.buttonText), 1)
313
319
  ]),
314
320
  _: 1
315
321
  }, 8, ["disabled"]),
316
- N.value && e.isClear ? (g(), le(c, {
322
+ N.value && e.isClear ? (_(), te(c, {
317
323
  key: 0,
318
324
  class: "close",
319
- style: ye({ right: n.buttonText.length * n.fontFize + 25 + "px" }),
320
- onClick: X
325
+ style: xe({ right: o.buttonText.length * o.fontFize + 25 + "px" }),
326
+ onClick: Y
321
327
  }, {
322
328
  default: k(() => [
323
- r(ue, { color: "#868484" })
329
+ r(ce, { color: "#868484" })
324
330
  ]),
325
331
  _: 1
326
- }, 8, ["style"])) : ke("", !0)
332
+ }, 8, ["style"])) : be("", !0)
327
333
  ]),
328
334
  _: 1
329
335
  }, 8, ["modelValue", "disabled", "readonly"])),
330
- r(ce, {
331
- title: n.title,
332
- modelValue: _(p),
336
+ r(fe, {
337
+ title: o.title,
338
+ modelValue: m(p),
333
339
  "onUpdate:modelValue": l[4] || (l[4] = (s) => j(p) ? p.value = s : p = s),
334
340
  "append-to-body": !0,
335
341
  "close-on-click-modal": !1,
336
342
  "close-on-press-escape": !1,
337
- onClose: de,
343
+ onClose: ie,
338
344
  width: 1e3
339
345
  }, {
340
346
  default: k(() => [
341
- o("div", Ae, [
342
- o("div", je, [
343
- o("div", Ke, [
344
- Le,
347
+ n("div", Ke, [
348
+ n("div", Le, [
349
+ n("div", Me, [
350
+ qe,
345
351
  r(t, {
346
- modelValue: _(v),
352
+ modelValue: m(v),
347
353
  "onUpdate:modelValue": l[2] || (l[2] = (s) => j(v) ? v.value = s : v = s),
348
354
  "suffix-icon": "Search",
349
- onInput: H,
355
+ onInput: J,
350
356
  placeholder: "请输入单位名称查询"
351
357
  }, null, 8, ["modelValue"])
352
358
  ]),
353
- o("div", Me, [
359
+ n("div", ze, [
354
360
  r(a, {
355
361
  ref_key: "orgTree",
356
362
  ref: i,
357
- data: _(w),
363
+ data: m(D),
358
364
  "node-key": "id",
359
- props: F,
365
+ props: R,
360
366
  "expand-on-click-node": !1,
361
- "show-checkbox": n.multiple,
367
+ "show-checkbox": o.multiple,
362
368
  "check-strictly": !0,
363
369
  "highlight-current": !0,
364
370
  accordion: !1,
365
371
  "check-on-click-node": !0,
366
- "filter-node-method": $,
372
+ "filter-node-method": H,
367
373
  indent: 26,
368
- onCheck: J,
369
- "render-content": U,
370
- "default-expanded-keys": _(T),
374
+ onCheck: G,
375
+ "render-content": $,
376
+ "default-expanded-keys": m(I),
371
377
  "icon-class": "el-icon-arrow-right"
372
378
  }, null, 8, ["data", "show-checkbox", "default-expanded-keys"])
373
379
  ])
374
380
  ]),
375
- o("div", qe, [
376
- o("div", { class: "selected-box" }, [
377
- ze,
378
- o("div", { title: "删除全部" }, [
379
- o("i", {
380
- onClick: M,
381
+ n("div", Fe, [
382
+ n("div", { class: "selected-box" }, [
383
+ Pe,
384
+ n("div", { title: "删除全部" }, [
385
+ n("i", {
386
+ onClick: z,
381
387
  class: "delete-btn"
382
388
  })
383
389
  ])
384
390
  ]),
385
- o("div", null, [
386
- o("div", Fe, [
387
- o("ul", null, [
388
- (g(!0), b(Z, null, ee(_(u), (s, S) => (g(), b("li", {
389
- key: S + "s"
391
+ n("div", null, [
392
+ n("div", Re, [
393
+ n("ul", null, [
394
+ (_(!0), b(ee, null, le(m(u), (s, E) => (_(), b("li", {
395
+ key: E + "s"
390
396
  }, [
391
- o("span", {
397
+ n("span", {
392
398
  class: "org-name",
393
399
  title: s.orgName + "(" + s.id + ")"
394
- }, E(s.orgName) + "(" + E(s.id) + ") ", 9, Pe),
400
+ }, O(s.orgName) + "(" + O(s.id) + ") ", 9, Ue),
395
401
  r(c, {
396
- onClick: (fe) => G(s, S),
402
+ onClick: (pe) => Q(s, E),
397
403
  title: "移除",
398
404
  color: "#909399",
399
405
  size: "16"
@@ -409,21 +415,21 @@ const K = (h) => (xe("data-v-d7df037a"), h = h(), be(), h), Ce = {
409
415
  ])
410
416
  ])
411
417
  ]),
412
- o("div", Re, [
413
- r(I, {
418
+ n("div", $e, [
419
+ r(S, {
414
420
  onClick: l[3] || (l[3] = (s) => j(p) ? p.value = !1 : p = !1)
415
421
  }, {
416
422
  default: k(() => [
417
- q("取消")
423
+ F("取消")
418
424
  ]),
419
425
  _: 1
420
426
  }),
421
- r(I, {
427
+ r(S, {
422
428
  type: "primary",
423
- onClick: ie
429
+ onClick: re
424
430
  }, {
425
431
  default: k(() => [
426
- q("确认")
432
+ F("确认")
427
433
  ]),
428
434
  _: 1
429
435
  })
@@ -435,12 +441,12 @@ const K = (h) => (xe("data-v-d7df037a"), h = h(), be(), h), Ce = {
435
441
  };
436
442
  }
437
443
  });
438
- const $e = (h, L) => {
439
- const O = h.__vccOpts || h;
440
- for (const [n, B] of L)
441
- O[n] = B;
442
- return O;
443
- }, Ge = /* @__PURE__ */ $e(Ue, [["__scopeId", "data-v-d7df037a"]]);
444
+ const Je = (h, L) => {
445
+ const B = h.__vccOpts || h;
446
+ for (const [o, w] of L)
447
+ B[o] = w;
448
+ return B;
449
+ }, We = /* @__PURE__ */ Je(He, [["__scopeId", "data-v-873ad7a9"]]);
444
450
  export {
445
- Ge as ksoSelOrg
451
+ We as ksoSelOrg
446
452
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kso-sel-org",
3
- "version": "1.0.15",
3
+ "version": "1.0.18",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {