Browse Source

refactor: 换一种搜索方式

master
windy 5 years ago
parent
commit
bcbacaa38e
  1. 30
      dist/2.0/fineui.ie.js
  2. 30
      dist/2.0/fineui.js
  3. 30
      dist/bundle.ie.js
  4. 30
      dist/bundle.js
  5. 30
      dist/fineui.ie.js
  6. 30
      dist/fineui.js
  7. 30
      dist/fineui_without_jquery_polyfill.js
  8. 30
      dist/widget.js
  9. 15
      src/widget/multilayerselecttree/multilayerselecttree.trigger.js
  10. 15
      src/widget/multilayersingletree/multilayersingletree.trigger.js

30
dist/2.0/fineui.ie.js vendored

@ -69244,11 +69244,16 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
}
});
return this._fillTreeStructure4Search(items, "id");
},
_createJson: function(node, open) {
@ -70415,11 +70420,16 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
}
});
return this._fillTreeStructure4Search(items, "id");
},
_createJson: function(node, open) {

30
dist/2.0/fineui.js vendored

@ -69648,11 +69648,16 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
}
});
return this._fillTreeStructure4Search(items, "id");
},
_createJson: function(node, open) {
@ -70819,11 +70824,16 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
}
});
return this._fillTreeStructure4Search(items, "id");
},
_createJson: function(node, open) {

30
dist/bundle.ie.js vendored

@ -69244,11 +69244,16 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
}
});
return this._fillTreeStructure4Search(items, "id");
},
_createJson: function(node, open) {
@ -70415,11 +70420,16 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
}
});
return this._fillTreeStructure4Search(items, "id");
},
_createJson: function(node, open) {

30
dist/bundle.js vendored

@ -69648,11 +69648,16 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
}
});
return this._fillTreeStructure4Search(items, "id");
},
_createJson: function(node, open) {
@ -70819,11 +70824,16 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
}
});
return this._fillTreeStructure4Search(items, "id");
},
_createJson: function(node, open) {

30
dist/fineui.ie.js vendored

@ -69489,11 +69489,16 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
}
});
return this._fillTreeStructure4Search(items, "id");
},
_createJson: function(node, open) {
@ -70660,11 +70665,16 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
}
});
return this._fillTreeStructure4Search(items, "id");
},
_createJson: function(node, open) {

30
dist/fineui.js vendored

@ -69893,11 +69893,16 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
}
});
return this._fillTreeStructure4Search(items, "id");
},
_createJson: function(node, open) {
@ -71064,11 +71069,16 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
}
});
return this._fillTreeStructure4Search(items, "id");
},
_createJson: function(node, open) {

30
dist/fineui_without_jquery_polyfill.js vendored

@ -52192,11 +52192,16 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
}
});
return this._fillTreeStructure4Search(items, "id");
},
_createJson: function(node, open) {
@ -53363,11 +53368,16 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
}
});
return this._fillTreeStructure4Search(items, "id");
},
_createJson: function(node, open) {

30
dist/widget.js vendored

@ -7303,11 +7303,16 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
}
});
return this._fillTreeStructure4Search(items, "id");
},
_createJson: function(node, open) {
@ -8474,11 +8479,16 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
}
});
return this._fillTreeStructure4Search(items, "id");
},
_createJson: function(node, open) {

15
src/widget/multilayerselecttree/multilayerselecttree.trigger.js

@ -130,11 +130,16 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
}
});
return this._fillTreeStructure4Search(items, "id");
},
_createJson: function(node, open) {

15
src/widget/multilayersingletree/multilayersingletree.trigger.js

@ -130,11 +130,16 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
}
});
return this._fillTreeStructure4Search(items, "id");
},
_createJson: function(node, open) {

Loading…
Cancel
Save