|
|
|
@ -1,5 +1,4 @@
|
|
|
|
|
import { |
|
|
|
|
shortcut, |
|
|
|
|
Widget, |
|
|
|
|
extend, |
|
|
|
|
emptyFn, |
|
|
|
@ -17,7 +16,6 @@ import {
|
|
|
|
|
} from "@/core"; |
|
|
|
|
import { MultiSelectCombo } from "@/widget"; |
|
|
|
|
|
|
|
|
|
@shortcut() |
|
|
|
|
export class AbstractAllValueChooser extends Widget { |
|
|
|
|
_const = { perPage: 100 }; |
|
|
|
|
|
|
|
|
@ -42,12 +40,12 @@ export class AbstractAllValueChooser extends Widget {
|
|
|
|
|
// 需要考虑到value也可能是数字
|
|
|
|
|
if (item.value === v || `${item.value}` === v) { |
|
|
|
|
text = item.text; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return text; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -56,7 +54,7 @@ export class AbstractAllValueChooser extends Widget {
|
|
|
|
|
for (let i = (times - 1) * this._const.perPage; items[i] && i < times * this._const.perPage; i++) { |
|
|
|
|
res.push(items[i]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return res; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -99,12 +97,12 @@ export class AbstractAllValueChooser extends Widget {
|
|
|
|
|
callback({ |
|
|
|
|
items: resultItems, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (options.type === MultiSelectCombo.REQ_GET_DATA_LENGTH) { |
|
|
|
|
callback({ count: resultItems.length }); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
callback({ |
|
|
|
@ -126,7 +124,7 @@ export class AbstractAllValueChooser extends Widget {
|
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|