ocpview-plus 1.2.8 → 1.2.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.
|
@@ -34959,7 +34959,38 @@ const _sfc_main$17 = {
|
|
|
34959
34959
|
};
|
|
34960
34960
|
updateNode(this.data);
|
|
34961
34961
|
},
|
|
34962
|
-
setNodes(data
|
|
34962
|
+
setNodes(data, name2, value) {
|
|
34963
|
+
let tempName = name2;
|
|
34964
|
+
if (name2 === "readOnly") {
|
|
34965
|
+
tempName = "disabled";
|
|
34966
|
+
} else if (name2 === "selected") {
|
|
34967
|
+
if (this.myConfig.multiSelect && this.myConfig.showCheckBox) {
|
|
34968
|
+
tempName = "checked";
|
|
34969
|
+
} else {
|
|
34970
|
+
tempName = "selected";
|
|
34971
|
+
}
|
|
34972
|
+
}
|
|
34973
|
+
let responseId = this.myConfig.responseId;
|
|
34974
|
+
this.$refs.tree.flatState.forEach((el2) => {
|
|
34975
|
+
let index = data.findIndex(
|
|
34976
|
+
(el22) => el2.node[responseId] === el22[responseId]
|
|
34977
|
+
);
|
|
34978
|
+
if (index > -1) {
|
|
34979
|
+
if (el2.node[tempName] !== value) {
|
|
34980
|
+
let obj = {};
|
|
34981
|
+
obj[tempName] = value;
|
|
34982
|
+
Object.assign(el2.node, obj);
|
|
34983
|
+
}
|
|
34984
|
+
} else {
|
|
34985
|
+
if (el2.node[tempName] !== !value) {
|
|
34986
|
+
let obj = {};
|
|
34987
|
+
obj[tempName] = !value;
|
|
34988
|
+
Object.assign(el2.node, obj);
|
|
34989
|
+
}
|
|
34990
|
+
}
|
|
34991
|
+
});
|
|
34992
|
+
},
|
|
34993
|
+
setNodese(data = [], name2, value) {
|
|
34963
34994
|
let tempName = name2;
|
|
34964
34995
|
if (name2 === "readOnly") {
|
|
34965
34996
|
tempName = "disabled";
|