hqchart 1.1.14915 → 1.1.14922
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.
- package/lib/umychart.vue.js +109 -99
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +17 -1
- package/src/jscommon/umychart.js +2 -0
- package/src/jscommon/umychart.report.js +98 -42
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +101 -43
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +118 -44
package/package.json
CHANGED
|
@@ -1125,6 +1125,13 @@ function JSFloatTooltip()
|
|
|
1125
1125
|
Left:"UMyChart_Tooltip_Float_Text2_Span", //左对齐
|
|
1126
1126
|
MarginLeft:'UMyChart_Tooltip_Float_Text3_Span',
|
|
1127
1127
|
Right:"UMyChart_Tooltip_Float_Text_Span",
|
|
1128
|
+
|
|
1129
|
+
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
this.TitleAlign=
|
|
1133
|
+
{
|
|
1134
|
+
Default:"UMyChart_Tooltip_Float_Title_Span", //标题默认
|
|
1128
1135
|
}
|
|
1129
1136
|
|
|
1130
1137
|
this.AryData=[]; //输出文字信息
|
|
@@ -1223,7 +1230,7 @@ function JSFloatTooltip()
|
|
|
1223
1230
|
rowItem.TitleTd=tdDom;
|
|
1224
1231
|
|
|
1225
1232
|
var spanDom=document.createElement("span");
|
|
1226
|
-
spanDom.className=
|
|
1233
|
+
spanDom.className=this.TitleAlign.Default;
|
|
1227
1234
|
spanDom.innerText='标题';
|
|
1228
1235
|
tdDom.appendChild(spanDom);
|
|
1229
1236
|
rowItem.TitleSpan=spanDom;
|
|
@@ -1724,6 +1731,15 @@ function JSFloatTooltip()
|
|
|
1724
1731
|
if (item.TextSpan.className!=this.ValueAlign.Right) item.TextSpan.className=this.ValueAlign.Right;
|
|
1725
1732
|
}
|
|
1726
1733
|
|
|
1734
|
+
if (outItem.TitleClassName)
|
|
1735
|
+
{
|
|
1736
|
+
item.TitleSpan.className=outItem.TitleClassName;
|
|
1737
|
+
}
|
|
1738
|
+
else
|
|
1739
|
+
{
|
|
1740
|
+
if (item.TitleSpan.className!=this.TitleAlign.Default) item.TitleSpan.className=this.TitleAlign.Default;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1727
1743
|
if (outItem.IsMergeCell) //合并单元格
|
|
1728
1744
|
{
|
|
1729
1745
|
item.TitleTd.colspan=2;
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -229,7 +229,13 @@ function JSReportChart(divElement)
|
|
|
229
229
|
//是否自动更新
|
|
230
230
|
if (option.IsAutoUpdate!=null) chart.IsAutoUpdate=option.IsAutoUpdate;
|
|
231
231
|
if (option.AutoUpdateFrequency>0) chart.AutoUpdateFrequency=option.AutoUpdateFrequency;
|
|
232
|
-
|
|
232
|
+
|
|
233
|
+
//数据筛选
|
|
234
|
+
if (option.DataFilter)
|
|
235
|
+
{
|
|
236
|
+
var item=option.DataFilter;
|
|
237
|
+
if (IFrameSplitOperator.IsBool(item.Enable)) chart.DataFilterConfig.Enable=item.Enable;
|
|
238
|
+
}
|
|
233
239
|
|
|
234
240
|
//注册事件
|
|
235
241
|
if (option.EventCallback)
|
|
@@ -303,9 +309,9 @@ function JSReportChart(divElement)
|
|
|
303
309
|
if (this.JSChartContainer) this.JSChartContainer.AddSymbol(arySymbol, option);
|
|
304
310
|
}
|
|
305
311
|
|
|
306
|
-
this.
|
|
312
|
+
this.EnableDataFilter=function(bEnable, option) //启动|关闭筛选
|
|
307
313
|
{
|
|
308
|
-
if (this.JSChartContainer) this.JSChartContainer.
|
|
314
|
+
if (this.JSChartContainer) this.JSChartContainer.EnableDataFilter(bEnable, option);
|
|
309
315
|
}
|
|
310
316
|
|
|
311
317
|
//事件回调
|
|
@@ -495,6 +501,8 @@ function JSReportChartContainer(uielement)
|
|
|
495
501
|
//MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
|
|
496
502
|
this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
|
|
497
503
|
this.RequestStatus={ IsFinishStockList:false, IsFinishMemberList:false }; //下载状态
|
|
504
|
+
|
|
505
|
+
this.DataFilterConfig={ Enable:false, }; //数据筛选
|
|
498
506
|
|
|
499
507
|
this.ChartDestroy=function() //销毁
|
|
500
508
|
{
|
|
@@ -1146,6 +1154,8 @@ function JSReportChartContainer(uielement)
|
|
|
1146
1154
|
|
|
1147
1155
|
this.RequestMemberListData=function()
|
|
1148
1156
|
{
|
|
1157
|
+
if (this.RequestStatus.IsFinishStockList==false) return; //码表没有下完
|
|
1158
|
+
|
|
1149
1159
|
//this.ChartSplashPaint.SetTitle(this.SplashTitle.MemberList);
|
|
1150
1160
|
//this.ChartSplashPaint.EnableSplash(true);
|
|
1151
1161
|
//this.Draw();
|
|
@@ -1205,6 +1215,16 @@ function JSReportChartContainer(uielement)
|
|
|
1205
1215
|
|
|
1206
1216
|
this.RequestStatus.IsFinishMemberList=true;
|
|
1207
1217
|
|
|
1218
|
+
this.DataFilter();
|
|
1219
|
+
|
|
1220
|
+
//实时本地数据排序
|
|
1221
|
+
var chart=this.GetReportChart();
|
|
1222
|
+
if (chart && (this.SortInfo.Sort==1 || this.SortInfo.Sort==2) && IFrameSplitOperator.IsNumber(this.SortInfo.Field) && this.SortInfo.Field>=0)
|
|
1223
|
+
{
|
|
1224
|
+
var column=chart.Column[this.SortInfo.Field];
|
|
1225
|
+
this.LocalDataSort(column, this.SortInfo);
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1208
1228
|
this.Draw();
|
|
1209
1229
|
this.UpdateStockData();
|
|
1210
1230
|
}
|
|
@@ -1518,7 +1538,7 @@ function JSReportChartContainer(uielement)
|
|
|
1518
1538
|
if (!chart) return;
|
|
1519
1539
|
|
|
1520
1540
|
//列表还没有加载完成
|
|
1521
|
-
if (this.RequestStatus.
|
|
1541
|
+
if (this.RequestStatus.IsFinishStockList==false || this.RequestStatus.IsFinishMemberList==false) return;
|
|
1522
1542
|
|
|
1523
1543
|
if (this.Data.Virtual && this.Data.Virtual.Enable)
|
|
1524
1544
|
{
|
|
@@ -1616,31 +1636,21 @@ function JSReportChartContainer(uielement)
|
|
|
1616
1636
|
var chart=this.ChartPaint[0];
|
|
1617
1637
|
if (!chart) return;
|
|
1618
1638
|
|
|
1639
|
+
|
|
1640
|
+
|
|
1619
1641
|
var bUpdate=false;
|
|
1642
|
+
if (this.DataFilter()) bUpdate=true; //过滤数据每次都刷新
|
|
1643
|
+
|
|
1620
1644
|
//实时本地数据排序
|
|
1621
1645
|
var chart=this.ChartPaint[0];
|
|
1622
1646
|
if (chart && (this.SortInfo.Sort==1 || this.SortInfo.Sort==2) && IFrameSplitOperator.IsNumber(this.SortInfo.Field) && this.SortInfo.Field>=0)
|
|
1623
1647
|
{
|
|
1624
|
-
var column=chart.Column[this.SortInfo.Field];
|
|
1625
|
-
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_LOCAL_SORT);
|
|
1626
|
-
|
|
1627
1648
|
//当前选中的股票
|
|
1628
1649
|
var selectedSymbol=null;
|
|
1629
1650
|
if (chart.SelectedRowData && chart.SelectedModel==1) selectedSymbol=chart.SelectedRowData.Symbol;
|
|
1630
1651
|
|
|
1631
|
-
var
|
|
1632
|
-
|
|
1633
|
-
{
|
|
1634
|
-
var sendData={ Column:column, SortInfo:this.SortInfo, SymbolList:this.Data.Data, Result:null, PreventDefault:false };
|
|
1635
|
-
event.Callback (event, sendData, this);
|
|
1636
|
-
if (event.PreventDefault)
|
|
1637
|
-
{
|
|
1638
|
-
bLocalSrot=false;
|
|
1639
|
-
if (Array.isArray(sendData.Result)) this.Data.Data=sendData.Result;
|
|
1640
|
-
}
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
if (bLocalSrot) this.Data.Data.sort((left, right)=> { return this.LocalSort(left, right, column, this.SortInfo.Sort); });
|
|
1652
|
+
var column=chart.Column[this.SortInfo.Field];
|
|
1653
|
+
this.LocalDataSort(column, this.SortInfo);
|
|
1644
1654
|
|
|
1645
1655
|
if (selectedSymbol)
|
|
1646
1656
|
{
|
|
@@ -3705,33 +3715,15 @@ function JSReportChartContainer(uielement)
|
|
|
3705
3715
|
{
|
|
3706
3716
|
if (sortInfo.Sort==0)
|
|
3707
3717
|
{
|
|
3708
|
-
this.Data.Data=
|
|
3709
|
-
|
|
3710
|
-
{
|
|
3711
|
-
this.Data.Data.push(this.SourceData.Data[i]);
|
|
3712
|
-
}
|
|
3718
|
+
this.Data.Data=this.SourceData.Data.slice();
|
|
3719
|
+
this.DataFilter();
|
|
3713
3720
|
}
|
|
3714
3721
|
else
|
|
3715
3722
|
{
|
|
3716
3723
|
if (header.Column.Sort==1) //本地排序
|
|
3717
3724
|
{
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
if (event && event.Callback)
|
|
3721
|
-
{
|
|
3722
|
-
var sendData={ Column:header.Column, SortInfo:sortInfo, SymbolList:this.Data.Data, Result:null, PreventDefault:false};
|
|
3723
|
-
event.Callback (event, sendData, this);
|
|
3724
|
-
if (sendData.PreventDefault)
|
|
3725
|
-
{
|
|
3726
|
-
if (Array.isArray(sendData.Result)) this.Data.Data=sendData.Result;
|
|
3727
|
-
bLocalSort=false;
|
|
3728
|
-
}
|
|
3729
|
-
|
|
3730
|
-
}
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
if (bLocalSort) this.Data.Data.sort((left, right)=> { return this.LocalSort(left, right, header.Column, sortInfo.Sort); });
|
|
3734
|
-
|
|
3725
|
+
this.DataFilter();
|
|
3726
|
+
this.LocalDataSort(header.Column, sortInfo);
|
|
3735
3727
|
}
|
|
3736
3728
|
else if (header.Column.Sort==2) //远程排序
|
|
3737
3729
|
{
|
|
@@ -3756,6 +3748,70 @@ function JSReportChartContainer(uielement)
|
|
|
3756
3748
|
}
|
|
3757
3749
|
}
|
|
3758
3750
|
|
|
3751
|
+
this.LocalDataSort=function(column, sortInfo)
|
|
3752
|
+
{
|
|
3753
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_LOCAL_SORT);
|
|
3754
|
+
var bLocalSort=true;
|
|
3755
|
+
if (event && event.Callback)
|
|
3756
|
+
{
|
|
3757
|
+
var sendData={ Column:header.Column, SortInfo:sortInfo, SymbolList:this.Data.Data, Result:null, PreventDefault:false};
|
|
3758
|
+
event.Callback (event, sendData, this);
|
|
3759
|
+
if (sendData.PreventDefault)
|
|
3760
|
+
{
|
|
3761
|
+
if (Array.isArray(sendData.Result)) this.Data.Data=sendData.Result;
|
|
3762
|
+
bLocalSort=false;
|
|
3763
|
+
}
|
|
3764
|
+
}
|
|
3765
|
+
|
|
3766
|
+
if (bLocalSort) this.Data.Data.sort((left, right)=> { return this.LocalSort(left, right, column, sortInfo.Sort); });
|
|
3767
|
+
}
|
|
3768
|
+
|
|
3769
|
+
//数据筛选
|
|
3770
|
+
this.DataFilter=function()
|
|
3771
|
+
{
|
|
3772
|
+
if (!this.DataFilterConfig.Enable) return false;
|
|
3773
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.SourceData.Data)) return false;
|
|
3774
|
+
|
|
3775
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_DATA_FILTER);
|
|
3776
|
+
if (!event || !event.Callback) return false;
|
|
3777
|
+
|
|
3778
|
+
var aryData=this.SourceData.Data.slice(); //原始数据
|
|
3779
|
+
|
|
3780
|
+
var sendData={ AryData:aryData, PreventDefault:false };
|
|
3781
|
+
event.Callback(event, sendData, this);
|
|
3782
|
+
if (!sendData.PreventDefault) return false;
|
|
3783
|
+
|
|
3784
|
+
this.Data.Data=sendData.AryData;
|
|
3785
|
+
|
|
3786
|
+
return true;
|
|
3787
|
+
}
|
|
3788
|
+
|
|
3789
|
+
this.EnableDataFilter=function(enable, option)
|
|
3790
|
+
{
|
|
3791
|
+
if (!IFrameSplitOperator.IsBool(enable)) return false;
|
|
3792
|
+
|
|
3793
|
+
this.DataFilterConfig.Enable=enable;
|
|
3794
|
+
if (enable)
|
|
3795
|
+
{
|
|
3796
|
+
this.DataFilter();
|
|
3797
|
+
}
|
|
3798
|
+
else
|
|
3799
|
+
{
|
|
3800
|
+
this.Data.Data=this.SourceData.Data.slice();
|
|
3801
|
+
}
|
|
3802
|
+
|
|
3803
|
+
//排序
|
|
3804
|
+
var chart=this.GetReportChart();
|
|
3805
|
+
if (chart && (this.SortInfo.Sort==1 || this.SortInfo.Sort==2) && IFrameSplitOperator.IsNumber(this.SortInfo.Field) && this.SortInfo.Field>=0)
|
|
3806
|
+
{
|
|
3807
|
+
var column=chart.Column[this.SortInfo.Field];
|
|
3808
|
+
this.LocalDataSort(column, this.SortInfo);
|
|
3809
|
+
}
|
|
3810
|
+
|
|
3811
|
+
this.ResetReportStatus();
|
|
3812
|
+
this.Draw();
|
|
3813
|
+
}
|
|
3814
|
+
|
|
3759
3815
|
this.PopupHeaderMenu=function(clickData, e)
|
|
3760
3816
|
{
|
|
3761
3817
|
if (!this.JSPopMenu) return;
|
|
@@ -6925,6 +6925,8 @@ var JSCHART_EVENT_ID=
|
|
|
6925
6925
|
GET_DEFAULT_INDEX_PARAM:172, //获取指标默认参数
|
|
6926
6926
|
|
|
6927
6927
|
ON_RELOAD_RESOURCE:173,
|
|
6928
|
+
|
|
6929
|
+
ON_REPORT_DATA_FILTER:174, //数据筛选
|
|
6928
6930
|
}
|
|
6929
6931
|
|
|
6930
6932
|
var JSCHART_OPERATOR_ID=
|
|
@@ -137928,7 +137930,13 @@ function JSReportChart(divElement)
|
|
|
137928
137930
|
//是否自动更新
|
|
137929
137931
|
if (option.IsAutoUpdate!=null) chart.IsAutoUpdate=option.IsAutoUpdate;
|
|
137930
137932
|
if (option.AutoUpdateFrequency>0) chart.AutoUpdateFrequency=option.AutoUpdateFrequency;
|
|
137931
|
-
|
|
137933
|
+
|
|
137934
|
+
//数据筛选
|
|
137935
|
+
if (option.DataFilter)
|
|
137936
|
+
{
|
|
137937
|
+
var item=option.DataFilter;
|
|
137938
|
+
if (IFrameSplitOperator.IsBool(item.Enable)) chart.DataFilterConfig.Enable=item.Enable;
|
|
137939
|
+
}
|
|
137932
137940
|
|
|
137933
137941
|
//注册事件
|
|
137934
137942
|
if (option.EventCallback)
|
|
@@ -138002,9 +138010,9 @@ function JSReportChart(divElement)
|
|
|
138002
138010
|
if (this.JSChartContainer) this.JSChartContainer.AddSymbol(arySymbol, option);
|
|
138003
138011
|
}
|
|
138004
138012
|
|
|
138005
|
-
this.
|
|
138013
|
+
this.EnableDataFilter=function(bEnable, option) //启动|关闭筛选
|
|
138006
138014
|
{
|
|
138007
|
-
if (this.JSChartContainer) this.JSChartContainer.
|
|
138015
|
+
if (this.JSChartContainer) this.JSChartContainer.EnableDataFilter(bEnable, option);
|
|
138008
138016
|
}
|
|
138009
138017
|
|
|
138010
138018
|
//事件回调
|
|
@@ -138194,6 +138202,8 @@ function JSReportChartContainer(uielement)
|
|
|
138194
138202
|
//MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
|
|
138195
138203
|
this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
|
|
138196
138204
|
this.RequestStatus={ IsFinishStockList:false, IsFinishMemberList:false }; //下载状态
|
|
138205
|
+
|
|
138206
|
+
this.DataFilterConfig={ Enable:false, }; //数据筛选
|
|
138197
138207
|
|
|
138198
138208
|
this.ChartDestroy=function() //销毁
|
|
138199
138209
|
{
|
|
@@ -138845,6 +138855,8 @@ function JSReportChartContainer(uielement)
|
|
|
138845
138855
|
|
|
138846
138856
|
this.RequestMemberListData=function()
|
|
138847
138857
|
{
|
|
138858
|
+
if (this.RequestStatus.IsFinishStockList==false) return; //码表没有下完
|
|
138859
|
+
|
|
138848
138860
|
//this.ChartSplashPaint.SetTitle(this.SplashTitle.MemberList);
|
|
138849
138861
|
//this.ChartSplashPaint.EnableSplash(true);
|
|
138850
138862
|
//this.Draw();
|
|
@@ -138904,6 +138916,16 @@ function JSReportChartContainer(uielement)
|
|
|
138904
138916
|
|
|
138905
138917
|
this.RequestStatus.IsFinishMemberList=true;
|
|
138906
138918
|
|
|
138919
|
+
this.DataFilter();
|
|
138920
|
+
|
|
138921
|
+
//实时本地数据排序
|
|
138922
|
+
var chart=this.GetReportChart();
|
|
138923
|
+
if (chart && (this.SortInfo.Sort==1 || this.SortInfo.Sort==2) && IFrameSplitOperator.IsNumber(this.SortInfo.Field) && this.SortInfo.Field>=0)
|
|
138924
|
+
{
|
|
138925
|
+
var column=chart.Column[this.SortInfo.Field];
|
|
138926
|
+
this.LocalDataSort(column, this.SortInfo);
|
|
138927
|
+
}
|
|
138928
|
+
|
|
138907
138929
|
this.Draw();
|
|
138908
138930
|
this.UpdateStockData();
|
|
138909
138931
|
}
|
|
@@ -139217,7 +139239,7 @@ function JSReportChartContainer(uielement)
|
|
|
139217
139239
|
if (!chart) return;
|
|
139218
139240
|
|
|
139219
139241
|
//列表还没有加载完成
|
|
139220
|
-
if (this.RequestStatus.
|
|
139242
|
+
if (this.RequestStatus.IsFinishStockList==false || this.RequestStatus.IsFinishMemberList==false) return;
|
|
139221
139243
|
|
|
139222
139244
|
if (this.Data.Virtual && this.Data.Virtual.Enable)
|
|
139223
139245
|
{
|
|
@@ -139315,31 +139337,21 @@ function JSReportChartContainer(uielement)
|
|
|
139315
139337
|
var chart=this.ChartPaint[0];
|
|
139316
139338
|
if (!chart) return;
|
|
139317
139339
|
|
|
139340
|
+
|
|
139341
|
+
|
|
139318
139342
|
var bUpdate=false;
|
|
139343
|
+
if (this.DataFilter()) bUpdate=true; //过滤数据每次都刷新
|
|
139344
|
+
|
|
139319
139345
|
//实时本地数据排序
|
|
139320
139346
|
var chart=this.ChartPaint[0];
|
|
139321
139347
|
if (chart && (this.SortInfo.Sort==1 || this.SortInfo.Sort==2) && IFrameSplitOperator.IsNumber(this.SortInfo.Field) && this.SortInfo.Field>=0)
|
|
139322
139348
|
{
|
|
139323
|
-
var column=chart.Column[this.SortInfo.Field];
|
|
139324
|
-
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_LOCAL_SORT);
|
|
139325
|
-
|
|
139326
139349
|
//当前选中的股票
|
|
139327
139350
|
var selectedSymbol=null;
|
|
139328
139351
|
if (chart.SelectedRowData && chart.SelectedModel==1) selectedSymbol=chart.SelectedRowData.Symbol;
|
|
139329
139352
|
|
|
139330
|
-
var
|
|
139331
|
-
|
|
139332
|
-
{
|
|
139333
|
-
var sendData={ Column:column, SortInfo:this.SortInfo, SymbolList:this.Data.Data, Result:null, PreventDefault:false };
|
|
139334
|
-
event.Callback (event, sendData, this);
|
|
139335
|
-
if (event.PreventDefault)
|
|
139336
|
-
{
|
|
139337
|
-
bLocalSrot=false;
|
|
139338
|
-
if (Array.isArray(sendData.Result)) this.Data.Data=sendData.Result;
|
|
139339
|
-
}
|
|
139340
|
-
}
|
|
139341
|
-
|
|
139342
|
-
if (bLocalSrot) this.Data.Data.sort((left, right)=> { return this.LocalSort(left, right, column, this.SortInfo.Sort); });
|
|
139353
|
+
var column=chart.Column[this.SortInfo.Field];
|
|
139354
|
+
this.LocalDataSort(column, this.SortInfo);
|
|
139343
139355
|
|
|
139344
139356
|
if (selectedSymbol)
|
|
139345
139357
|
{
|
|
@@ -141404,33 +141416,15 @@ function JSReportChartContainer(uielement)
|
|
|
141404
141416
|
{
|
|
141405
141417
|
if (sortInfo.Sort==0)
|
|
141406
141418
|
{
|
|
141407
|
-
this.Data.Data=
|
|
141408
|
-
|
|
141409
|
-
{
|
|
141410
|
-
this.Data.Data.push(this.SourceData.Data[i]);
|
|
141411
|
-
}
|
|
141419
|
+
this.Data.Data=this.SourceData.Data.slice();
|
|
141420
|
+
this.DataFilter();
|
|
141412
141421
|
}
|
|
141413
141422
|
else
|
|
141414
141423
|
{
|
|
141415
141424
|
if (header.Column.Sort==1) //本地排序
|
|
141416
141425
|
{
|
|
141417
|
-
|
|
141418
|
-
|
|
141419
|
-
if (event && event.Callback)
|
|
141420
|
-
{
|
|
141421
|
-
var sendData={ Column:header.Column, SortInfo:sortInfo, SymbolList:this.Data.Data, Result:null, PreventDefault:false};
|
|
141422
|
-
event.Callback (event, sendData, this);
|
|
141423
|
-
if (sendData.PreventDefault)
|
|
141424
|
-
{
|
|
141425
|
-
if (Array.isArray(sendData.Result)) this.Data.Data=sendData.Result;
|
|
141426
|
-
bLocalSort=false;
|
|
141427
|
-
}
|
|
141428
|
-
|
|
141429
|
-
}
|
|
141430
|
-
|
|
141431
|
-
|
|
141432
|
-
if (bLocalSort) this.Data.Data.sort((left, right)=> { return this.LocalSort(left, right, header.Column, sortInfo.Sort); });
|
|
141433
|
-
|
|
141426
|
+
this.DataFilter();
|
|
141427
|
+
this.LocalDataSort(header.Column, sortInfo);
|
|
141434
141428
|
}
|
|
141435
141429
|
else if (header.Column.Sort==2) //远程排序
|
|
141436
141430
|
{
|
|
@@ -141455,6 +141449,70 @@ function JSReportChartContainer(uielement)
|
|
|
141455
141449
|
}
|
|
141456
141450
|
}
|
|
141457
141451
|
|
|
141452
|
+
this.LocalDataSort=function(column, sortInfo)
|
|
141453
|
+
{
|
|
141454
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_LOCAL_SORT);
|
|
141455
|
+
var bLocalSort=true;
|
|
141456
|
+
if (event && event.Callback)
|
|
141457
|
+
{
|
|
141458
|
+
var sendData={ Column:header.Column, SortInfo:sortInfo, SymbolList:this.Data.Data, Result:null, PreventDefault:false};
|
|
141459
|
+
event.Callback (event, sendData, this);
|
|
141460
|
+
if (sendData.PreventDefault)
|
|
141461
|
+
{
|
|
141462
|
+
if (Array.isArray(sendData.Result)) this.Data.Data=sendData.Result;
|
|
141463
|
+
bLocalSort=false;
|
|
141464
|
+
}
|
|
141465
|
+
}
|
|
141466
|
+
|
|
141467
|
+
if (bLocalSort) this.Data.Data.sort((left, right)=> { return this.LocalSort(left, right, column, sortInfo.Sort); });
|
|
141468
|
+
}
|
|
141469
|
+
|
|
141470
|
+
//数据筛选
|
|
141471
|
+
this.DataFilter=function()
|
|
141472
|
+
{
|
|
141473
|
+
if (!this.DataFilterConfig.Enable) return false;
|
|
141474
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.SourceData.Data)) return false;
|
|
141475
|
+
|
|
141476
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_DATA_FILTER);
|
|
141477
|
+
if (!event || !event.Callback) return false;
|
|
141478
|
+
|
|
141479
|
+
var aryData=this.SourceData.Data.slice(); //原始数据
|
|
141480
|
+
|
|
141481
|
+
var sendData={ AryData:aryData, PreventDefault:false };
|
|
141482
|
+
event.Callback(event, sendData, this);
|
|
141483
|
+
if (!sendData.PreventDefault) return false;
|
|
141484
|
+
|
|
141485
|
+
this.Data.Data=sendData.AryData;
|
|
141486
|
+
|
|
141487
|
+
return true;
|
|
141488
|
+
}
|
|
141489
|
+
|
|
141490
|
+
this.EnableDataFilter=function(enable, option)
|
|
141491
|
+
{
|
|
141492
|
+
if (!IFrameSplitOperator.IsBool(enable)) return false;
|
|
141493
|
+
|
|
141494
|
+
this.DataFilterConfig.Enable=enable;
|
|
141495
|
+
if (enable)
|
|
141496
|
+
{
|
|
141497
|
+
this.DataFilter();
|
|
141498
|
+
}
|
|
141499
|
+
else
|
|
141500
|
+
{
|
|
141501
|
+
this.Data.Data=this.SourceData.Data.slice();
|
|
141502
|
+
}
|
|
141503
|
+
|
|
141504
|
+
//排序
|
|
141505
|
+
var chart=this.GetReportChart();
|
|
141506
|
+
if (chart && (this.SortInfo.Sort==1 || this.SortInfo.Sort==2) && IFrameSplitOperator.IsNumber(this.SortInfo.Field) && this.SortInfo.Field>=0)
|
|
141507
|
+
{
|
|
141508
|
+
var column=chart.Column[this.SortInfo.Field];
|
|
141509
|
+
this.LocalDataSort(column, this.SortInfo);
|
|
141510
|
+
}
|
|
141511
|
+
|
|
141512
|
+
this.ResetReportStatus();
|
|
141513
|
+
this.Draw();
|
|
141514
|
+
}
|
|
141515
|
+
|
|
141458
141516
|
this.PopupHeaderMenu=function(clickData, e)
|
|
141459
141517
|
{
|
|
141460
141518
|
if (!this.JSPopMenu) return;
|
|
@@ -151104,7 +151162,7 @@ function ScrollBarBGChart()
|
|
|
151104
151162
|
|
|
151105
151163
|
|
|
151106
151164
|
|
|
151107
|
-
var HQCHART_VERSION="1.1.
|
|
151165
|
+
var HQCHART_VERSION="1.1.14921";
|
|
151108
151166
|
|
|
151109
151167
|
function PrintHQChartVersion()
|
|
151110
151168
|
{
|