Browse Source

BI-92460 fix:修正反选逻辑

es6
Jimmy.Chai 3 years ago
parent
commit
1bdcc73d20
  1. 4
      src/widget/multiselect/multiselect.combo.js
  2. 4
      src/widget/multiselect/multiselect.combo.nobar.js
  3. 4
      src/widget/multiselect/multiselect.insert.combo.js
  4. 4
      src/widget/multiselect/multiselect.insert.combo.nobar.js
  5. 6
      src/widget/multiselectlist/multiselectlist.insert.js
  6. 6
      src/widget/multiselectlist/multiselectlist.insert.nobar.js
  7. 4
      src/widget/multiselectlist/multiselectlist.js

4
src/widget/multiselect/multiselect.combo.js

@ -361,7 +361,9 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);

4
src/widget/multiselect/multiselect.combo.nobar.js

@ -387,7 +387,9 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);

4
src/widget/multiselect/multiselect.insert.combo.js

@ -375,7 +375,9 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);

4
src/widget/multiselect/multiselect.insert.combo.nobar.js

@ -372,7 +372,9 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);

6
src/widget/multiselectlist/multiselectlist.insert.js

@ -245,7 +245,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
text: o.valueFormatter(v) || v,
value: v
};
}), this.trigger.getKey());
}), this.trigger.getKeyword());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, obj) {
@ -262,7 +262,9 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);

6
src/widget/multiselectlist/multiselectlist.insert.nobar.js

@ -249,7 +249,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
text: o.valueFormatter(v) || v,
value: v
};
}), this.trigger.getKey());
}), this.trigger.getKeyword());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, obj) {
@ -266,7 +266,9 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);

4
src/widget/multiselectlist/multiselectlist.js

@ -252,7 +252,9 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);

Loading…
Cancel
Save