widget.qw 1.1.2 → 1.1.3
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/build/style.css +19 -19
- package/build/widget.qw.es.js +29 -15
- package/build/widget.qw.umd.js +29 -15
- package/package.json +1 -1
- package/src/components/CascaderPicker.vue +30 -14
- package/src/components/CascaderPop.vue +4 -2
- package/src/views/cascaderpicker/userpicker.vue +2 -2
- package/src/views/userpicker/index.vue +3 -1
package/build/style.css
CHANGED
|
@@ -675,25 +675,25 @@
|
|
|
675
675
|
margin:3px;
|
|
676
676
|
}
|
|
677
677
|
|
|
678
|
-
.cascader-pop[data-v-
|
|
678
|
+
.cascader-pop[data-v-1f4b2244] {
|
|
679
679
|
width: 100%;
|
|
680
680
|
overflow: hidden;
|
|
681
681
|
}
|
|
682
|
-
.cascader-selector[data-v-
|
|
682
|
+
.cascader-selector[data-v-1f4b2244] {
|
|
683
683
|
padding: 10px;
|
|
684
684
|
}
|
|
685
|
-
.search-buttons[data-v-
|
|
685
|
+
.search-buttons[data-v-1f4b2244] {
|
|
686
686
|
display: flex;
|
|
687
687
|
gap: 10px;
|
|
688
688
|
}
|
|
689
|
-
.clear-btn[data-v-
|
|
689
|
+
.clear-btn[data-v-1f4b2244] {
|
|
690
690
|
background-color: #f2f3f5;
|
|
691
691
|
border: none;
|
|
692
692
|
border-radius: 4px;
|
|
693
693
|
padding: 4px 8px;
|
|
694
694
|
font-size: 14px;
|
|
695
695
|
}
|
|
696
|
-
.confirm-btn[data-v-
|
|
696
|
+
.confirm-btn[data-v-1f4b2244] {
|
|
697
697
|
background-color: #1989fa;
|
|
698
698
|
color: white;
|
|
699
699
|
border: none;
|
|
@@ -701,19 +701,19 @@
|
|
|
701
701
|
padding: 4px 8px;
|
|
702
702
|
font-size: 14px;
|
|
703
703
|
}
|
|
704
|
-
.no-results[data-v-
|
|
704
|
+
.no-results[data-v-1f4b2244] {
|
|
705
705
|
text-align: center;
|
|
706
706
|
padding: 20px;
|
|
707
707
|
color: #969799;
|
|
708
708
|
}
|
|
709
|
-
.cascader-header[data-v-
|
|
709
|
+
.cascader-header[data-v-1f4b2244] {
|
|
710
710
|
padding: 10px;
|
|
711
711
|
border-bottom: 1px solid #ebedf0;
|
|
712
712
|
display: flex;
|
|
713
713
|
justify-content: space-between;
|
|
714
714
|
align-items: center;
|
|
715
715
|
}
|
|
716
|
-
.current-path[data-v-
|
|
716
|
+
.current-path[data-v-1f4b2244] {
|
|
717
717
|
flex: 1;
|
|
718
718
|
font-size: 14px;
|
|
719
719
|
margin-left: 5px;
|
|
@@ -722,25 +722,25 @@
|
|
|
722
722
|
overflow: hidden;
|
|
723
723
|
text-overflow: ellipsis;
|
|
724
724
|
}
|
|
725
|
-
.header-right[data-v-
|
|
725
|
+
.header-right[data-v-1f4b2244] {
|
|
726
726
|
display: flex;
|
|
727
727
|
gap: 8px;
|
|
728
728
|
margin-left: auto;
|
|
729
729
|
}
|
|
730
|
-
.cancel-btn[data-v-
|
|
730
|
+
.cancel-btn[data-v-1f4b2244] {
|
|
731
731
|
color: #969799;
|
|
732
732
|
margin-right: 5px;
|
|
733
733
|
}
|
|
734
|
-
.scroll-container[data-v-
|
|
734
|
+
.scroll-container[data-v-1f4b2244] {
|
|
735
735
|
height: calc(80vh - 150px);
|
|
736
736
|
overflow-y: auto;
|
|
737
737
|
}
|
|
738
|
-
.cell-content[data-v-
|
|
738
|
+
.cell-content[data-v-1f4b2244] {
|
|
739
739
|
display: flex;
|
|
740
740
|
align-items: center;
|
|
741
741
|
gap: 12px;
|
|
742
742
|
}
|
|
743
|
-
.circle-selector[data-v-
|
|
743
|
+
.circle-selector[data-v-1f4b2244] {
|
|
744
744
|
width: 20px;
|
|
745
745
|
height: 20px;
|
|
746
746
|
border-radius: 50%;
|
|
@@ -750,29 +750,29 @@
|
|
|
750
750
|
transition: all 0.2s;
|
|
751
751
|
flex-shrink: 0;
|
|
752
752
|
}
|
|
753
|
-
.circle-selector.selected[data-v-
|
|
753
|
+
.circle-selector.selected[data-v-1f4b2244] {
|
|
754
754
|
background-color: #1989fa;
|
|
755
755
|
border-color: #1989fa;
|
|
756
756
|
}
|
|
757
|
-
.circle-selector.selected .van-icon[data-v-
|
|
757
|
+
.circle-selector.selected .van-icon[data-v-1f4b2244] {
|
|
758
758
|
color: white;
|
|
759
759
|
font-size: 14px;
|
|
760
760
|
}
|
|
761
|
-
.van-cell__right-icon[data-v-
|
|
761
|
+
.van-cell__right-icon[data-v-1f4b2244] {
|
|
762
762
|
color: #969799;
|
|
763
763
|
font-size: 16px;
|
|
764
764
|
margin-left: 8px;
|
|
765
765
|
}
|
|
766
|
-
.name[data-v-
|
|
766
|
+
.name[data-v-1f4b2244] {
|
|
767
767
|
flex: 1;
|
|
768
768
|
overflow: hidden;
|
|
769
769
|
text-overflow: ellipsis;
|
|
770
770
|
white-space: nowrap;
|
|
771
771
|
}
|
|
772
|
-
.cancel-btn[data-v-
|
|
772
|
+
.cancel-btn[data-v-1f4b2244] {
|
|
773
773
|
color: #969799;
|
|
774
774
|
}
|
|
775
|
-
.search-field[data-v-
|
|
775
|
+
.search-field[data-v-1f4b2244] {
|
|
776
776
|
background: #fff;
|
|
777
777
|
padding: 10px 16px;
|
|
778
778
|
border-bottom: 1px solid #ebedf0;
|
package/build/widget.qw.es.js
CHANGED
|
@@ -21635,8 +21635,8 @@ const _sfc_main$4 = {
|
|
|
21635
21635
|
}
|
|
21636
21636
|
};
|
|
21637
21637
|
var TreePicker = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-ebc14630"]]);
|
|
21638
|
-
var CascaderPop_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.cascader-pop[data-v-
|
|
21639
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
21638
|
+
var CascaderPop_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.cascader-pop[data-v-1f4b2244] {\r\n width: 100%;\r\n overflow: hidden;\n}\n.cascader-selector[data-v-1f4b2244] {\r\n padding: 10px;\n}\n.search-buttons[data-v-1f4b2244] {\r\n display: flex;\r\n gap: 10px;\n}\n.clear-btn[data-v-1f4b2244] {\r\n background-color: #f2f3f5;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.confirm-btn[data-v-1f4b2244] {\r\n background-color: #1989fa;\r\n color: white;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.no-results[data-v-1f4b2244] {\r\n text-align: center;\r\n padding: 20px;\r\n color: #969799;\n}\n.cascader-header[data-v-1f4b2244] {\r\n padding: 10px;\r\n border-bottom: 1px solid #ebedf0;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\n}\n.current-path[data-v-1f4b2244] {\r\n flex: 1;\r\n font-size: 14px;\r\n margin-left: 5px;\r\n color: #323233;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\n}\n.header-right[data-v-1f4b2244] {\r\n display: flex;\r\n gap: 8px;\r\n margin-left: auto;\n}\n.cancel-btn[data-v-1f4b2244] {\r\n color: #969799;\r\n margin-right: 5px;\n}\n.scroll-container[data-v-1f4b2244] {\r\n height: calc(80vh - 150px);\r\n overflow-y: auto;\n}\n.cell-content[data-v-1f4b2244] {\r\n display: flex;\r\n align-items: center;\r\n gap: 12px;\n}\n.circle-selector[data-v-1f4b2244] {\r\n width: 20px;\r\n height: 20px;\r\n border-radius: 50%;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: all 0.2s;\r\n flex-shrink: 0;\n}\n.circle-selector.selected[data-v-1f4b2244] {\r\n background-color: #1989fa;\r\n border-color: #1989fa;\n}\n.circle-selector.selected .van-icon[data-v-1f4b2244] {\r\n color: white;\r\n font-size: 14px;\n}\n.van-cell__right-icon[data-v-1f4b2244] {\r\n color: #969799;\r\n font-size: 16px;\r\n margin-left: 8px;\n}\n.name[data-v-1f4b2244] {\r\n flex: 1;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\n}\n.cancel-btn[data-v-1f4b2244] {\r\n color: #969799;\n}\n.search-field[data-v-1f4b2244] {\r\n background: #fff;\r\n padding: 10px 16px;\r\n border-bottom: 1px solid #ebedf0;\r\n position: sticky;\r\n top: 0;\r\n z-index: 999;\r\n margin-bottom: 10px;\r\n flex-shrink: 0;\r\n /* \u9632\u6B62\u538B\u7F29 */\n}\r\n")();
|
|
21639
|
+
const _withScopeId = (n) => (pushScopeId("data-v-1f4b2244"), n = n(), popScopeId(), n);
|
|
21640
21640
|
const _hoisted_1$3 = {
|
|
21641
21641
|
class: "cascader-selector"
|
|
21642
21642
|
};
|
|
@@ -21764,7 +21764,8 @@ const _sfc_main$3 = {
|
|
|
21764
21764
|
props2.idQueryNode({
|
|
21765
21765
|
id: parentId,
|
|
21766
21766
|
isReturnParent,
|
|
21767
|
-
hasChildren: true
|
|
21767
|
+
hasChildren: true,
|
|
21768
|
+
hasUsers: true
|
|
21768
21769
|
}, (node) => {
|
|
21769
21770
|
data2.parentNode = node;
|
|
21770
21771
|
});
|
|
@@ -21785,6 +21786,7 @@ const _sfc_main$3 = {
|
|
|
21785
21786
|
params.isReturnParent = true;
|
|
21786
21787
|
params.hasChildren = false;
|
|
21787
21788
|
params.hasPaths = true;
|
|
21789
|
+
params.hasUsers = true;
|
|
21788
21790
|
let selectNode = null;
|
|
21789
21791
|
yield props2.idQueryNode(params, (node) => {
|
|
21790
21792
|
data2.parentNode = node;
|
|
@@ -21828,7 +21830,9 @@ const _sfc_main$3 = {
|
|
|
21828
21830
|
props2.idQueryNode({
|
|
21829
21831
|
id: node.id,
|
|
21830
21832
|
isReturnParent: false,
|
|
21831
|
-
hasChildren: true
|
|
21833
|
+
hasChildren: true,
|
|
21834
|
+
hasPaths: true,
|
|
21835
|
+
hasUsers: true
|
|
21832
21836
|
}, (node2) => {
|
|
21833
21837
|
data2.parentNode = node2;
|
|
21834
21838
|
});
|
|
@@ -21840,6 +21844,7 @@ const _sfc_main$3 = {
|
|
|
21840
21844
|
params.isReturnParent = true;
|
|
21841
21845
|
params.hasChildren = true;
|
|
21842
21846
|
params.hasPaths = true;
|
|
21847
|
+
params.hasUsers = true;
|
|
21843
21848
|
yield props2.idQueryNode(params, (node) => {
|
|
21844
21849
|
data2.parentNode = node;
|
|
21845
21850
|
});
|
|
@@ -21959,7 +21964,7 @@ const _sfc_main$3 = {
|
|
|
21959
21964
|
};
|
|
21960
21965
|
}
|
|
21961
21966
|
};
|
|
21962
|
-
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
21967
|
+
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-1f4b2244"]]);
|
|
21963
21968
|
const _hoisted_1$2 = {
|
|
21964
21969
|
style: {
|
|
21965
21970
|
"display": "flex",
|
|
@@ -22064,21 +22069,30 @@ const _sfc_main$2 = {
|
|
|
22064
22069
|
ids = modelValue2.value;
|
|
22065
22070
|
if (ids.length < 1)
|
|
22066
22071
|
return [];
|
|
22067
|
-
let
|
|
22072
|
+
let res = [];
|
|
22073
|
+
let receivedNodes = [];
|
|
22074
|
+
for (var i = 0; i < ids.length; i++) {
|
|
22075
|
+
let nodeId = ids[i];
|
|
22076
|
+
let selectNode = null;
|
|
22077
|
+
selectNode = util.findNode(nodeId, receivedNodes);
|
|
22078
|
+
if (selectNode) {
|
|
22079
|
+
res = [...res, selectNode];
|
|
22080
|
+
continue;
|
|
22081
|
+
}
|
|
22068
22082
|
let params = {};
|
|
22069
22083
|
params.id = nodeId;
|
|
22070
|
-
params.isReturnParent =
|
|
22084
|
+
params.isReturnParent = false;
|
|
22071
22085
|
params.hasChildren = false;
|
|
22072
|
-
params.hasPaths =
|
|
22073
|
-
|
|
22086
|
+
params.hasPaths = false;
|
|
22087
|
+
params.hasUsers = true;
|
|
22074
22088
|
yield props2.idQueryNode(params, (node) => {
|
|
22075
|
-
|
|
22076
|
-
selectNode = util.findNode(nodeId,
|
|
22089
|
+
receivedNodes = [...receivedNodes, ...node.children || []];
|
|
22090
|
+
selectNode = util.findNode(nodeId, receivedNodes);
|
|
22077
22091
|
});
|
|
22078
|
-
|
|
22079
|
-
|
|
22080
|
-
|
|
22081
|
-
return
|
|
22092
|
+
if (selectNode)
|
|
22093
|
+
res = [...res, selectNode];
|
|
22094
|
+
}
|
|
22095
|
+
return res;
|
|
22082
22096
|
});
|
|
22083
22097
|
watch(() => JSON.stringify(modelValue2.value), (n, o) => __async(this, null, function* () {
|
|
22084
22098
|
if (!props2.multiple) {
|
package/build/widget.qw.umd.js
CHANGED
|
@@ -21638,8 +21638,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21638
21638
|
}
|
|
21639
21639
|
};
|
|
21640
21640
|
var TreePicker = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-ebc14630"]]);
|
|
21641
|
-
var CascaderPop_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.cascader-pop[data-v-
|
|
21642
|
-
const _withScopeId = (n) => (vue.pushScopeId("data-v-
|
|
21641
|
+
var CascaderPop_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.cascader-pop[data-v-1f4b2244] {\r\n width: 100%;\r\n overflow: hidden;\n}\n.cascader-selector[data-v-1f4b2244] {\r\n padding: 10px;\n}\n.search-buttons[data-v-1f4b2244] {\r\n display: flex;\r\n gap: 10px;\n}\n.clear-btn[data-v-1f4b2244] {\r\n background-color: #f2f3f5;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.confirm-btn[data-v-1f4b2244] {\r\n background-color: #1989fa;\r\n color: white;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.no-results[data-v-1f4b2244] {\r\n text-align: center;\r\n padding: 20px;\r\n color: #969799;\n}\n.cascader-header[data-v-1f4b2244] {\r\n padding: 10px;\r\n border-bottom: 1px solid #ebedf0;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\n}\n.current-path[data-v-1f4b2244] {\r\n flex: 1;\r\n font-size: 14px;\r\n margin-left: 5px;\r\n color: #323233;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\n}\n.header-right[data-v-1f4b2244] {\r\n display: flex;\r\n gap: 8px;\r\n margin-left: auto;\n}\n.cancel-btn[data-v-1f4b2244] {\r\n color: #969799;\r\n margin-right: 5px;\n}\n.scroll-container[data-v-1f4b2244] {\r\n height: calc(80vh - 150px);\r\n overflow-y: auto;\n}\n.cell-content[data-v-1f4b2244] {\r\n display: flex;\r\n align-items: center;\r\n gap: 12px;\n}\n.circle-selector[data-v-1f4b2244] {\r\n width: 20px;\r\n height: 20px;\r\n border-radius: 50%;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: all 0.2s;\r\n flex-shrink: 0;\n}\n.circle-selector.selected[data-v-1f4b2244] {\r\n background-color: #1989fa;\r\n border-color: #1989fa;\n}\n.circle-selector.selected .van-icon[data-v-1f4b2244] {\r\n color: white;\r\n font-size: 14px;\n}\n.van-cell__right-icon[data-v-1f4b2244] {\r\n color: #969799;\r\n font-size: 16px;\r\n margin-left: 8px;\n}\n.name[data-v-1f4b2244] {\r\n flex: 1;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\n}\n.cancel-btn[data-v-1f4b2244] {\r\n color: #969799;\n}\n.search-field[data-v-1f4b2244] {\r\n background: #fff;\r\n padding: 10px 16px;\r\n border-bottom: 1px solid #ebedf0;\r\n position: sticky;\r\n top: 0;\r\n z-index: 999;\r\n margin-bottom: 10px;\r\n flex-shrink: 0;\r\n /* \u9632\u6B62\u538B\u7F29 */\n}\r\n")();
|
|
21642
|
+
const _withScopeId = (n) => (vue.pushScopeId("data-v-1f4b2244"), n = n(), vue.popScopeId(), n);
|
|
21643
21643
|
const _hoisted_1$3 = {
|
|
21644
21644
|
class: "cascader-selector"
|
|
21645
21645
|
};
|
|
@@ -21767,7 +21767,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21767
21767
|
props2.idQueryNode({
|
|
21768
21768
|
id: parentId,
|
|
21769
21769
|
isReturnParent,
|
|
21770
|
-
hasChildren: true
|
|
21770
|
+
hasChildren: true,
|
|
21771
|
+
hasUsers: true
|
|
21771
21772
|
}, (node) => {
|
|
21772
21773
|
data2.parentNode = node;
|
|
21773
21774
|
});
|
|
@@ -21788,6 +21789,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21788
21789
|
params.isReturnParent = true;
|
|
21789
21790
|
params.hasChildren = false;
|
|
21790
21791
|
params.hasPaths = true;
|
|
21792
|
+
params.hasUsers = true;
|
|
21791
21793
|
let selectNode = null;
|
|
21792
21794
|
yield props2.idQueryNode(params, (node) => {
|
|
21793
21795
|
data2.parentNode = node;
|
|
@@ -21831,7 +21833,9 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21831
21833
|
props2.idQueryNode({
|
|
21832
21834
|
id: node.id,
|
|
21833
21835
|
isReturnParent: false,
|
|
21834
|
-
hasChildren: true
|
|
21836
|
+
hasChildren: true,
|
|
21837
|
+
hasPaths: true,
|
|
21838
|
+
hasUsers: true
|
|
21835
21839
|
}, (node2) => {
|
|
21836
21840
|
data2.parentNode = node2;
|
|
21837
21841
|
});
|
|
@@ -21843,6 +21847,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21843
21847
|
params.isReturnParent = true;
|
|
21844
21848
|
params.hasChildren = true;
|
|
21845
21849
|
params.hasPaths = true;
|
|
21850
|
+
params.hasUsers = true;
|
|
21846
21851
|
yield props2.idQueryNode(params, (node) => {
|
|
21847
21852
|
data2.parentNode = node;
|
|
21848
21853
|
});
|
|
@@ -21962,7 +21967,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21962
21967
|
};
|
|
21963
21968
|
}
|
|
21964
21969
|
};
|
|
21965
|
-
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
21970
|
+
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-1f4b2244"]]);
|
|
21966
21971
|
const _hoisted_1$2 = {
|
|
21967
21972
|
style: {
|
|
21968
21973
|
"display": "flex",
|
|
@@ -22067,21 +22072,30 @@ var __async = (__this, __arguments, generator) => {
|
|
|
22067
22072
|
ids = modelValue2.value;
|
|
22068
22073
|
if (ids.length < 1)
|
|
22069
22074
|
return [];
|
|
22070
|
-
let
|
|
22075
|
+
let res = [];
|
|
22076
|
+
let receivedNodes = [];
|
|
22077
|
+
for (var i = 0; i < ids.length; i++) {
|
|
22078
|
+
let nodeId = ids[i];
|
|
22079
|
+
let selectNode = null;
|
|
22080
|
+
selectNode = util.findNode(nodeId, receivedNodes);
|
|
22081
|
+
if (selectNode) {
|
|
22082
|
+
res = [...res, selectNode];
|
|
22083
|
+
continue;
|
|
22084
|
+
}
|
|
22071
22085
|
let params = {};
|
|
22072
22086
|
params.id = nodeId;
|
|
22073
|
-
params.isReturnParent =
|
|
22087
|
+
params.isReturnParent = false;
|
|
22074
22088
|
params.hasChildren = false;
|
|
22075
|
-
params.hasPaths =
|
|
22076
|
-
|
|
22089
|
+
params.hasPaths = false;
|
|
22090
|
+
params.hasUsers = true;
|
|
22077
22091
|
yield props2.idQueryNode(params, (node) => {
|
|
22078
|
-
|
|
22079
|
-
selectNode = util.findNode(nodeId,
|
|
22092
|
+
receivedNodes = [...receivedNodes, ...node.children || []];
|
|
22093
|
+
selectNode = util.findNode(nodeId, receivedNodes);
|
|
22080
22094
|
});
|
|
22081
|
-
|
|
22082
|
-
|
|
22083
|
-
|
|
22084
|
-
return
|
|
22095
|
+
if (selectNode)
|
|
22096
|
+
res = [...res, selectNode];
|
|
22097
|
+
}
|
|
22098
|
+
return res;
|
|
22085
22099
|
});
|
|
22086
22100
|
vue.watch(() => JSON.stringify(modelValue2.value), (n, o) => __async(this, null, function* () {
|
|
22087
22101
|
if (!props2.multiple) {
|
package/package.json
CHANGED
|
@@ -116,34 +116,50 @@ const onDelete = (idx) => {
|
|
|
116
116
|
|
|
117
117
|
const ids2nodes = async () => {
|
|
118
118
|
let ids = []
|
|
119
|
-
if(!props.multiple){
|
|
120
|
-
if(modelValue.value)
|
|
119
|
+
if (!props.multiple) {
|
|
120
|
+
if (modelValue.value)
|
|
121
121
|
ids = [modelValue.value]
|
|
122
122
|
}
|
|
123
|
-
else if(modelValue.value && modelValue.value.length>0)
|
|
123
|
+
else if (modelValue.value && modelValue.value.length > 0)
|
|
124
124
|
ids = modelValue.value
|
|
125
125
|
|
|
126
126
|
if (ids.length < 1)
|
|
127
127
|
return []
|
|
128
128
|
|
|
129
|
-
let
|
|
129
|
+
let res = []
|
|
130
|
+
|
|
131
|
+
//记录网络请求接收到的所有用户列表
|
|
132
|
+
let receivedNodes = []
|
|
133
|
+
for (var i = 0; i < ids.length; i++) {
|
|
134
|
+
let nodeId = ids[i]
|
|
135
|
+
|
|
136
|
+
let selectNode = null
|
|
137
|
+
|
|
138
|
+
//现在历史用户列表中查找
|
|
139
|
+
//找不到再发网络请求
|
|
140
|
+
selectNode = util.findNode(nodeId, receivedNodes)
|
|
141
|
+
if (selectNode){
|
|
142
|
+
res = [...res, selectNode]
|
|
143
|
+
continue
|
|
144
|
+
}
|
|
145
|
+
|
|
130
146
|
let params = {}
|
|
131
147
|
params.id = nodeId
|
|
132
|
-
params.isReturnParent =
|
|
148
|
+
params.isReturnParent = false
|
|
133
149
|
params.hasChildren = false
|
|
134
|
-
params.hasPaths =
|
|
150
|
+
params.hasPaths = false
|
|
151
|
+
params.hasUsers = true
|
|
135
152
|
|
|
136
|
-
let selectNode = null
|
|
137
153
|
await props.idQueryNode(params, (node) => {
|
|
138
|
-
|
|
139
|
-
selectNode = util.findNode(nodeId,
|
|
154
|
+
receivedNodes = [...receivedNodes, ...(node.children || [])]
|
|
155
|
+
selectNode = util.findNode(nodeId, receivedNodes)
|
|
140
156
|
})
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
157
|
+
|
|
158
|
+
if (selectNode)
|
|
159
|
+
res = [...res, selectNode]
|
|
160
|
+
}
|
|
145
161
|
|
|
146
|
-
return
|
|
162
|
+
return res
|
|
147
163
|
}
|
|
148
164
|
|
|
149
165
|
watch(() => JSON.stringify(modelValue.value), async (n, o) => {
|
|
@@ -165,7 +165,7 @@ const onBack = () => {
|
|
|
165
165
|
data.keyword = ""
|
|
166
166
|
//查询父节点
|
|
167
167
|
//父节点一定有子节点
|
|
168
|
-
props.idQueryNode({ id: parentId, isReturnParent: isReturnParent, hasChildren: true }, (node) => {
|
|
168
|
+
props.idQueryNode({ id: parentId, isReturnParent: isReturnParent, hasChildren: true,hasUsers:true }, (node) => {
|
|
169
169
|
data.parentNode = node
|
|
170
170
|
})
|
|
171
171
|
}
|
|
@@ -191,6 +191,7 @@ const ids2nodes = async () => {
|
|
|
191
191
|
params.isReturnParent = true
|
|
192
192
|
params.hasChildren = false
|
|
193
193
|
params.hasPaths = true
|
|
194
|
+
params.hasUsers = true
|
|
194
195
|
|
|
195
196
|
let selectNode = null
|
|
196
197
|
await props.idQueryNode(params, (node) => {
|
|
@@ -245,7 +246,7 @@ const onToggle = (node) => {
|
|
|
245
246
|
}
|
|
246
247
|
|
|
247
248
|
const onNextLevel = (node) => {
|
|
248
|
-
props.idQueryNode({ id: node.id, isReturnParent: false, hasChildren: true }, (node) => {
|
|
249
|
+
props.idQueryNode({ id: node.id, isReturnParent: false, hasChildren: true,hasPaths:true,hasUsers:true }, (node) => {
|
|
249
250
|
data.parentNode = node
|
|
250
251
|
})
|
|
251
252
|
}
|
|
@@ -257,6 +258,7 @@ const query = async () => {
|
|
|
257
258
|
params.isReturnParent = true
|
|
258
259
|
params.hasChildren = true
|
|
259
260
|
params.hasPaths = true
|
|
261
|
+
params.hasUsers = true
|
|
260
262
|
|
|
261
263
|
await props.idQueryNode(params, (node) => {
|
|
262
264
|
data.parentNode = node
|
|
@@ -79,8 +79,8 @@ const idQueryNode = async (params, setNode) => {
|
|
|
79
79
|
let p = {
|
|
80
80
|
id: params.id,
|
|
81
81
|
hasChildren: params.hasChildren,
|
|
82
|
-
hasPaths:
|
|
83
|
-
hasUsers:
|
|
82
|
+
hasPaths: params.hasPaths,
|
|
83
|
+
hasUsers: params.hasUsers,
|
|
84
84
|
isReturnParent: params.isReturnParent
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -10,8 +10,10 @@ import UserPicker from '../cascaderpicker/userpicker.vue'
|
|
|
10
10
|
|
|
11
11
|
const data = reactive({
|
|
12
12
|
multiple:true,
|
|
13
|
+
// multiple:false,
|
|
13
14
|
auth: 'require',
|
|
14
|
-
userids: []
|
|
15
|
+
userids: ["YuChao", "LiuShouBo", "KuangLeiLei","HouMu"]
|
|
16
|
+
// userids: "YuChao"
|
|
15
17
|
})
|
|
16
18
|
|
|
17
19
|
onMounted(() => {
|