[SSE] Change api methods for pivot table.
This commit is contained in:
parent
7884b59294
commit
59ec3f7446
|
@ -303,15 +303,27 @@ define([
|
||||||
|
|
||||||
this._state.TableName=props.asc_getName();
|
this._state.TableName=props.asc_getName();
|
||||||
|
|
||||||
|
var cache_names = props.asc_getCacheFields(),
|
||||||
|
pivot_names = props.asc_getPivotFields(),
|
||||||
|
names = [];
|
||||||
|
pivot_names.forEach(function (item, index) {
|
||||||
|
names[index] = item.asc_getName() || cache_names[index].asc_getName();
|
||||||
|
});
|
||||||
|
|
||||||
var arr = [], isChecked = [],
|
var arr = [], isChecked = [],
|
||||||
value = props.asc_getColumnFields();
|
value = props.asc_getColumnFields();
|
||||||
value && value.forEach(function (item) {
|
value && value.forEach(function (item) {
|
||||||
arr.push(new Common.UI.DataViewModel({
|
var index = item.asc_getIndex();
|
||||||
selected : false,
|
if (index>-1) {
|
||||||
allowSelected : true,
|
var name = names[index];
|
||||||
value : item
|
arr.push(new Common.UI.DataViewModel({
|
||||||
}));
|
selected : false,
|
||||||
isChecked[item] = true;
|
allowSelected : true,
|
||||||
|
index : index,
|
||||||
|
value : name
|
||||||
|
}));
|
||||||
|
isChecked[name] = true;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.columnsList.store.reset(arr);
|
this.columnsList.store.reset(arr);
|
||||||
this.columnsList.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true, suppressScrollX: true});
|
this.columnsList.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true, suppressScrollX: true});
|
||||||
|
@ -319,12 +331,17 @@ define([
|
||||||
arr = [];
|
arr = [];
|
||||||
value = props.asc_getRowFields();
|
value = props.asc_getRowFields();
|
||||||
value && value.forEach(function (item) {
|
value && value.forEach(function (item) {
|
||||||
arr.push(new Common.UI.DataViewModel({
|
var index = item.asc_getIndex();
|
||||||
selected : false,
|
if (index>-1) {
|
||||||
allowSelected : true,
|
var name = names[index];
|
||||||
value : item
|
arr.push(new Common.UI.DataViewModel({
|
||||||
}));
|
selected : false,
|
||||||
isChecked[item] = true;
|
allowSelected : true,
|
||||||
|
index : index,
|
||||||
|
value : name
|
||||||
|
}));
|
||||||
|
isChecked[name] = true;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.rowsList.store.reset(arr);
|
this.rowsList.store.reset(arr);
|
||||||
this.rowsList.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true, suppressScrollX: true});
|
this.rowsList.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true, suppressScrollX: true});
|
||||||
|
@ -332,12 +349,18 @@ define([
|
||||||
arr = [];
|
arr = [];
|
||||||
value = props.asc_getDataFields();
|
value = props.asc_getDataFields();
|
||||||
value && value.forEach(function (item) {
|
value && value.forEach(function (item) {
|
||||||
arr.push(new Common.UI.DataViewModel({
|
var index = item.asc_getIndex();
|
||||||
selected : false,
|
if (index>-1) {
|
||||||
allowSelected : true,
|
var name = names[index];
|
||||||
value : item
|
arr.push(new Common.UI.DataViewModel({
|
||||||
}));
|
selected : false,
|
||||||
isChecked[item] = true;
|
allowSelected : true,
|
||||||
|
index : index,
|
||||||
|
// value : name
|
||||||
|
value : item.asc_getName()
|
||||||
|
}));
|
||||||
|
isChecked[name] = true;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.valuesList.store.reset(arr);
|
this.valuesList.store.reset(arr);
|
||||||
this.valuesList.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true, suppressScrollX: true});
|
this.valuesList.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true, suppressScrollX: true});
|
||||||
|
@ -345,19 +368,23 @@ define([
|
||||||
arr = [];
|
arr = [];
|
||||||
value = props.asc_getPageFields();
|
value = props.asc_getPageFields();
|
||||||
value && value.forEach(function (item) {
|
value && value.forEach(function (item) {
|
||||||
arr.push(new Common.UI.DataViewModel({
|
var index = item.asc_getIndex();
|
||||||
selected : false,
|
if (index>-1) {
|
||||||
allowSelected : true,
|
var name = names[index];
|
||||||
value : item
|
arr.push(new Common.UI.DataViewModel({
|
||||||
}));
|
selected : false,
|
||||||
isChecked[item] = true;
|
allowSelected : true,
|
||||||
|
index : index,
|
||||||
|
value : name
|
||||||
|
}));
|
||||||
|
isChecked[name] = true;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.filtersList.store.reset(arr);
|
this.filtersList.store.reset(arr);
|
||||||
this.filtersList.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true, suppressScrollX: true});
|
this.filtersList.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true, suppressScrollX: true});
|
||||||
|
|
||||||
arr = [];
|
arr = [];
|
||||||
value = props.asc_getPivotFields();
|
names.forEach(function (item) {
|
||||||
value && value.forEach(function (item) {
|
|
||||||
arr.push(new Common.UI.DataViewModel({
|
arr.push(new Common.UI.DataViewModel({
|
||||||
selected : false,
|
selected : false,
|
||||||
allowSelected : true,
|
allowSelected : true,
|
||||||
|
|
Loading…
Reference in a new issue