hqchart 1.1.13963 → 1.1.13965
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.NetworkFilterTest.vue.js +24 -3
- package/lib/umychart.vue.js +21 -14
- package/package.json +1 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +141 -0
- package/src/jscommon/umychart.report.js +113 -9
- package/src/jscommon/umychart.testdata.js +141 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +114 -10
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +141 -0
- package/src/jscommon/umychart.vue/umychart.vue.js +114 -10
|
@@ -203,6 +203,12 @@ function JSReportChart(divElement)
|
|
|
203
203
|
if (IFrameSplitOperator.IsNumber(item.Sort)) chart.SortInfo.Sort=item.Sort;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
+
if (option.VirtualTable)
|
|
207
|
+
{
|
|
208
|
+
var item=option.VirtualTable;
|
|
209
|
+
if (IFrameSplitOperator.IsBool(item.Enable)) chart.Data.Virtual.Enable=item.Enable;
|
|
210
|
+
}
|
|
211
|
+
|
|
206
212
|
var reportChart=chart.GetReportChart();
|
|
207
213
|
if (reportChart)
|
|
208
214
|
{
|
|
@@ -417,7 +423,7 @@ function JSReportChartContainer(uielement)
|
|
|
417
423
|
this.Symbol; //板块代码
|
|
418
424
|
this.Name; //板块名称
|
|
419
425
|
this.NetworkFilter; //数据回调接口
|
|
420
|
-
this.Data={ XOffset:0, YOffset:0, Data:[] }; //股票列表
|
|
426
|
+
this.Data={ XOffset:0, YOffset:0, Data:[], Virtual:{ Enable:false, Count:0 } }; //股票列表 (Virtual 虚拟表)
|
|
421
427
|
this.SourceData={ Data:[] } ; //原始股票顺序(排序还原用)
|
|
422
428
|
this.BlockData=new Map(); //当前板块数据
|
|
423
429
|
this.MapStockData=new Map(); //原始股票数据
|
|
@@ -786,6 +792,7 @@ function JSReportChartContainer(uielement)
|
|
|
786
792
|
{
|
|
787
793
|
this.SourceData.Data=[];
|
|
788
794
|
this.Data.Data=[];
|
|
795
|
+
this.Data.Virtual.Count=0;
|
|
789
796
|
this.BlockData=new Map();
|
|
790
797
|
}
|
|
791
798
|
|
|
@@ -1042,6 +1049,12 @@ function JSReportChartContainer(uielement)
|
|
|
1042
1049
|
}
|
|
1043
1050
|
}
|
|
1044
1051
|
|
|
1052
|
+
if (recvData.Virtual) //虚拟表设置
|
|
1053
|
+
{
|
|
1054
|
+
var item=recvData.Virtual;
|
|
1055
|
+
if (IFrameSplitOperator.IsNumber(item.Count)) this.Data.Virtual.Count=item.Count;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1045
1058
|
this.Draw();
|
|
1046
1059
|
this.UpdateStockData();
|
|
1047
1060
|
}
|
|
@@ -1267,6 +1280,12 @@ function JSReportChartContainer(uielement)
|
|
|
1267
1280
|
var chart=this.ChartPaint[0];
|
|
1268
1281
|
if (!chart) return;
|
|
1269
1282
|
|
|
1283
|
+
if (this.Data.Virtual && this.Data.Virtual.Enable)
|
|
1284
|
+
{
|
|
1285
|
+
this.RequestVirtualStockData(); //虚拟表格 全部取后台
|
|
1286
|
+
return;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1270
1289
|
if (this.SortInfo && this.SortInfo.Field>=0 && this.SortInfo.Sort>0)
|
|
1271
1290
|
{
|
|
1272
1291
|
var column=chart.Column[this.SortInfo.Field];
|
|
@@ -2622,8 +2641,9 @@ function JSReportChartContainer(uielement)
|
|
|
2622
2641
|
if (!chart) return false;
|
|
2623
2642
|
|
|
2624
2643
|
var pageSize=chart.GetPageSize();
|
|
2625
|
-
|
|
2626
|
-
if (
|
|
2644
|
+
var dataCount=chart.GetAllRowCount();
|
|
2645
|
+
if (pageSize>dataCount) return false;
|
|
2646
|
+
if (this.Data.YOffset+pageSize>=dataCount)
|
|
2627
2647
|
{
|
|
2628
2648
|
if (bCycle===true)
|
|
2629
2649
|
{
|
|
@@ -2637,7 +2657,7 @@ function JSReportChartContainer(uielement)
|
|
|
2637
2657
|
}
|
|
2638
2658
|
|
|
2639
2659
|
this.Data.YOffset+=pageSize;
|
|
2640
|
-
var showDataCount=
|
|
2660
|
+
var showDataCount=dataCount-this.Data.YOffset;
|
|
2641
2661
|
|
|
2642
2662
|
if (chart.SelectedModel==0)
|
|
2643
2663
|
{
|
|
@@ -2653,13 +2673,14 @@ function JSReportChartContainer(uielement)
|
|
|
2653
2673
|
var chart=this.ChartPaint[0];
|
|
2654
2674
|
if (!chart) return false;
|
|
2655
2675
|
var pageSize=chart.GetPageSize();
|
|
2656
|
-
|
|
2676
|
+
var dataCount=chart.GetAllRowCount();
|
|
2677
|
+
if (pageSize>dataCount) return false;
|
|
2657
2678
|
|
|
2658
2679
|
if (this.Data.YOffset<=0)
|
|
2659
2680
|
{
|
|
2660
2681
|
if (bCycle===true)
|
|
2661
2682
|
{
|
|
2662
|
-
this.Data.YOffset=
|
|
2683
|
+
this.Data.YOffset=dataCount-pageSize; //循环到最后一页
|
|
2663
2684
|
return true;
|
|
2664
2685
|
}
|
|
2665
2686
|
else
|
|
@@ -3097,7 +3118,16 @@ function JSReportChartContainer(uielement)
|
|
|
3097
3118
|
if (column.Sort!=1 && column.Sort!=2) return false;
|
|
3098
3119
|
|
|
3099
3120
|
var sortInfo={ Field:index, Sort:sortType };
|
|
3100
|
-
if (
|
|
3121
|
+
if (this.Data.Virtual && this.Data.Virtual.Enable)
|
|
3122
|
+
{
|
|
3123
|
+
this.SortInfo.Field=sortInfo.Field;
|
|
3124
|
+
this.SortInfo.Sort=sortInfo.Sort;
|
|
3125
|
+
this.Data.YOffset=0;
|
|
3126
|
+
this.ResetReportSelectStatus();
|
|
3127
|
+
this.RequestVirtualStockData(); //虚拟表格
|
|
3128
|
+
return true;
|
|
3129
|
+
}
|
|
3130
|
+
else if (sortInfo.Sort==0) //不排序还原
|
|
3101
3131
|
{
|
|
3102
3132
|
this.Data.Data=[];
|
|
3103
3133
|
if (IFrameSplitOperator.IsNonEmptyArray(this.SourceData.Data))
|
|
@@ -3823,6 +3853,70 @@ function JSReportChartContainer(uielement)
|
|
|
3823
3853
|
if (bUpdate) this.Draw();
|
|
3824
3854
|
}
|
|
3825
3855
|
|
|
3856
|
+
//虚拟表格 请求序号 所有数据后台返回
|
|
3857
|
+
this.RequestVirtualStockData=function()
|
|
3858
|
+
{
|
|
3859
|
+
var chart=this.ChartPaint[0];
|
|
3860
|
+
if (!chart) return;
|
|
3861
|
+
|
|
3862
|
+
var self=this;
|
|
3863
|
+
var startIndex=this.Data.YOffset;
|
|
3864
|
+
var pageSize=chart.GetPageSize();
|
|
3865
|
+
var endIndex=startIndex+pageSize;
|
|
3866
|
+
var dataCount=chart.GetAllRowCount();
|
|
3867
|
+
if (endIndex>=dataCount) endIndex=dataCount-1;
|
|
3868
|
+
|
|
3869
|
+
if (!this.NetworkFilter) return;
|
|
3870
|
+
|
|
3871
|
+
var requestData=
|
|
3872
|
+
{
|
|
3873
|
+
range:{ start:startIndex, end:endIndex, count:chart.GetAllRowCount() },
|
|
3874
|
+
column:null,
|
|
3875
|
+
sort:0, symbol:this.Symbol, name:this.Name,
|
|
3876
|
+
pageSize:pageSize
|
|
3877
|
+
}
|
|
3878
|
+
|
|
3879
|
+
if (this.SortInfo && this.SortInfo.Field>=0 && this.SortInfo.Sort>0) //排序
|
|
3880
|
+
{
|
|
3881
|
+
var column=chart.Column[this.SortInfo.Field];
|
|
3882
|
+
requestData.column={ name: column.Title, type: column.Type, index:this.SortInfo.Field, ID:column.ID };
|
|
3883
|
+
requestData.sort=this.SortInfo.Sort;
|
|
3884
|
+
}
|
|
3885
|
+
|
|
3886
|
+
var obj=
|
|
3887
|
+
{
|
|
3888
|
+
Name:'JSDealChartContainer::RequestVirtualStockData', //类名::函数名
|
|
3889
|
+
Explain:'报价列表股票数据(虚拟表格)',
|
|
3890
|
+
Request:
|
|
3891
|
+
{
|
|
3892
|
+
Data: requestData
|
|
3893
|
+
},
|
|
3894
|
+
Self:this,
|
|
3895
|
+
PreventDefault:false
|
|
3896
|
+
};
|
|
3897
|
+
|
|
3898
|
+
if (chart.FixedRowCount>0 && chart.FixedRowData.Type==1)
|
|
3899
|
+
{
|
|
3900
|
+
var arySymbol=[];
|
|
3901
|
+
for(var i=0;i<chart.FixedRowData.Symbol.length;++i)
|
|
3902
|
+
{
|
|
3903
|
+
var item=chart.FixedRowData.Symbol[i];
|
|
3904
|
+
if (item) arySymbol.push(item);
|
|
3905
|
+
}
|
|
3906
|
+
|
|
3907
|
+
obj.Request.FixedSymbol=arySymbol;
|
|
3908
|
+
}
|
|
3909
|
+
|
|
3910
|
+
this.NetworkFilter(obj, function(data)
|
|
3911
|
+
{
|
|
3912
|
+
self.RecvStockSortData(data);
|
|
3913
|
+
self.AutoUpdate();
|
|
3914
|
+
});
|
|
3915
|
+
|
|
3916
|
+
if (obj.PreventDefault==true) return;
|
|
3917
|
+
|
|
3918
|
+
}
|
|
3919
|
+
|
|
3826
3920
|
//底部标签
|
|
3827
3921
|
this.ShowPageInfo=function(bShow)
|
|
3828
3922
|
{
|
|
@@ -4502,8 +4596,9 @@ function ChartReport()
|
|
|
4502
4596
|
this.GetYScrollRange=function()
|
|
4503
4597
|
{
|
|
4504
4598
|
if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return 0;
|
|
4599
|
+
var dataCount=this.GetAllRowCount();
|
|
4505
4600
|
|
|
4506
|
-
var maxOffset=
|
|
4601
|
+
var maxOffset=dataCount-this.RowCount;
|
|
4507
4602
|
|
|
4508
4603
|
return maxOffset;
|
|
4509
4604
|
}
|
|
@@ -5079,6 +5174,14 @@ function ChartReport()
|
|
|
5079
5174
|
this.Canvas.stroke();
|
|
5080
5175
|
}
|
|
5081
5176
|
|
|
5177
|
+
//获取一共多少行
|
|
5178
|
+
this.GetAllRowCount=function()
|
|
5179
|
+
{
|
|
5180
|
+
var count=this.Data.Data.length;
|
|
5181
|
+
if (this.Data.Virtual && this.Data.Virtual.Enable) count=this.Data.Virtual.Count;
|
|
5182
|
+
return count;
|
|
5183
|
+
}
|
|
5184
|
+
|
|
5082
5185
|
this.DrawBody=function()
|
|
5083
5186
|
{
|
|
5084
5187
|
if (!this.Data) return;
|
|
@@ -5118,7 +5221,8 @@ function ChartReport()
|
|
|
5118
5221
|
var setSelected;
|
|
5119
5222
|
if (this.MultiSelectModel==1) setSelected=new Set(this.MultiSelectedRow);
|
|
5120
5223
|
|
|
5121
|
-
|
|
5224
|
+
var dataCount=this.GetAllRowCount();
|
|
5225
|
+
for(var i=this.Data.YOffset, j=0; i<dataCount && j<this.RowCount ;++i, ++j)
|
|
5122
5226
|
{
|
|
5123
5227
|
var symbol=this.Data.Data[i];
|
|
5124
5228
|
|
|
@@ -170,6 +170,10 @@ HQData.NetworkFilter=function(data, callback)
|
|
|
170
170
|
//HQChart使用教程95-报价列表对接第3方数据4-股票排序数据
|
|
171
171
|
HQData.Report_RequestStockSortData(data, callback);
|
|
172
172
|
break;
|
|
173
|
+
case "JSDealChartContainer::RequestVirtualStockData":
|
|
174
|
+
HQData.Report_RequestVirtualStockData(data, callback); //股票数据 虚拟表格
|
|
175
|
+
break;
|
|
176
|
+
|
|
173
177
|
}
|
|
174
178
|
}
|
|
175
179
|
|
|
@@ -1040,6 +1044,30 @@ HQData.Report_RequestStockListData=function(data, callback)
|
|
|
1040
1044
|
|
|
1041
1045
|
}
|
|
1042
1046
|
|
|
1047
|
+
//空码表
|
|
1048
|
+
HQData.Report_RequestStockListData_Empty=function(data, callback)
|
|
1049
|
+
{
|
|
1050
|
+
data.PreventDefault=true;
|
|
1051
|
+
var hqchartData={ data:[] };
|
|
1052
|
+
console.log("[HQData.Report_RequestStockListData_EMPTY] hqchartData",hqchartData);
|
|
1053
|
+
callback(hqchartData);
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
HQData.Report_RequestMemberVirtualListData=function(data, callback, option)
|
|
1057
|
+
{
|
|
1058
|
+
var symbol=data.Request.Data.symbol; //板块代码
|
|
1059
|
+
data.PreventDefault=true;
|
|
1060
|
+
|
|
1061
|
+
var hqchartData= { symbol:symbol , name:symbol, data:[] , code:0, Virtual:{ Count:option.Virtual.Count } };
|
|
1062
|
+
|
|
1063
|
+
for(var i=0; i<SHSZ_STOCK_LIST_TEST_DATA.symbol.length && i<50; ++i )
|
|
1064
|
+
{
|
|
1065
|
+
hqchartData.data.push(SHSZ_STOCK_LIST_TEST_DATA.symbol[i]);
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
callback(hqchartData);
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1043
1071
|
//板块|行业等成分列表
|
|
1044
1072
|
HQData.Report_RequestMemberListDat=function(data, callback)
|
|
1045
1073
|
{
|
|
@@ -1305,6 +1333,119 @@ HQData.Report_RequestStockSortData=function(data, callback)
|
|
|
1305
1333
|
}
|
|
1306
1334
|
|
|
1307
1335
|
|
|
1336
|
+
HQData.Report_RequestVirtualStockData=function(data, callback)
|
|
1337
|
+
{
|
|
1338
|
+
var blockID=data.Request.Data.symbol; //板块代码
|
|
1339
|
+
var range=data.Request.Data.range; //排序范围
|
|
1340
|
+
var column=data.Request.Data.column; //排序列信息
|
|
1341
|
+
var sortType=data.Request.Data.sort; //排序方向
|
|
1342
|
+
var pageSize=data.Request.Data.pageSize;
|
|
1343
|
+
data.PreventDefault=true;
|
|
1344
|
+
|
|
1345
|
+
var start=range.start;
|
|
1346
|
+
var end=range.end;
|
|
1347
|
+
if (start>0) start-=pageSize;
|
|
1348
|
+
if (start<0) start=0;
|
|
1349
|
+
end+=pageSize;
|
|
1350
|
+
|
|
1351
|
+
var count=end-start+1;
|
|
1352
|
+
|
|
1353
|
+
var aryData=[];
|
|
1354
|
+
var aryIndex=[];
|
|
1355
|
+
|
|
1356
|
+
if (IFrameSplitOperator.IsNonEmptyArray(SHSZ_STOCK_LIST_TEST_DATA.symbol))
|
|
1357
|
+
{
|
|
1358
|
+
var randomStart = Math.floor(Math.random()*(SHSZ_STOCK_LIST_TEST_DATA.symbol.length-1));
|
|
1359
|
+
var symbolCount=SHSZ_STOCK_LIST_TEST_DATA.symbol.length;
|
|
1360
|
+
for(var i=0;i<count;++i)
|
|
1361
|
+
{
|
|
1362
|
+
var dataIndex=(randomStart+i)%symbolCount;
|
|
1363
|
+
var symbol=SHSZ_STOCK_LIST_TEST_DATA.symbol[dataIndex];
|
|
1364
|
+
var name=SHSZ_STOCK_LIST_TEST_DATA.name[dataIndex];
|
|
1365
|
+
var price=SHSZ_STOCK_LIST_TEST_DATA.close[dataIndex];
|
|
1366
|
+
var vol=SHSZ_STOCK_LIST_TEST_DATA.vol[dataIndex];
|
|
1367
|
+
var newItem=
|
|
1368
|
+
[
|
|
1369
|
+
symbol,
|
|
1370
|
+
name,
|
|
1371
|
+
SHSZ_STOCK_LIST_TEST_DATA.yclose[dataIndex],
|
|
1372
|
+
SHSZ_STOCK_LIST_TEST_DATA.open[dataIndex],
|
|
1373
|
+
SHSZ_STOCK_LIST_TEST_DATA.high[dataIndex],
|
|
1374
|
+
SHSZ_STOCK_LIST_TEST_DATA.low[dataIndex],
|
|
1375
|
+
price,
|
|
1376
|
+
vol,
|
|
1377
|
+
SHSZ_STOCK_LIST_TEST_DATA.amount[dataIndex],
|
|
1378
|
+
];
|
|
1379
|
+
|
|
1380
|
+
//买价 量
|
|
1381
|
+
newItem[9]=price+0.05;
|
|
1382
|
+
newItem[10]=10;
|
|
1383
|
+
|
|
1384
|
+
//卖价 量
|
|
1385
|
+
newItem[11]=price-0.06;
|
|
1386
|
+
newItem[12]=5;
|
|
1387
|
+
|
|
1388
|
+
//均价
|
|
1389
|
+
newItem[13]=price-0.03;
|
|
1390
|
+
|
|
1391
|
+
//内盘
|
|
1392
|
+
newItem[18]=vol/4;
|
|
1393
|
+
//外盘
|
|
1394
|
+
newItem[19]=vol/5;
|
|
1395
|
+
|
|
1396
|
+
newItem[14]=vol*1.5; //流通股本
|
|
1397
|
+
newItem[15]=vol*1.8; //总股本
|
|
1398
|
+
|
|
1399
|
+
//换手率
|
|
1400
|
+
newItem[23]=(Math.round(Math.random()*60))/100;
|
|
1401
|
+
|
|
1402
|
+
//名字字段
|
|
1403
|
+
var symbolEx={ Text:name };
|
|
1404
|
+
if (i%20==5)
|
|
1405
|
+
symbolEx.Symbol={ Family:'iconfont', Size:16, Data:[ { Text:'\ue629', Color:'rgb(255,165,0)'}, { Text:'\ue627', Color:'#1c65db'} ] };
|
|
1406
|
+
else if (i%20==9)
|
|
1407
|
+
symbolEx.Symbol={ Family:'iconfont', Size:16, Data:[ { Text:'\ue629', Color:'rgb(255,165,0)'}] } ;
|
|
1408
|
+
else if (i%20==18)
|
|
1409
|
+
symbolEx.Symbol={ Family:'iconfont', Size:16, Data:[ { Text:'\ue627', Color:'#1c65db'}] } ;
|
|
1410
|
+
|
|
1411
|
+
newItem[27]=symbolEx;
|
|
1412
|
+
|
|
1413
|
+
|
|
1414
|
+
//扩展数据 (定制数据)
|
|
1415
|
+
var extendData=[];
|
|
1416
|
+
newItem[30]=extendData;
|
|
1417
|
+
|
|
1418
|
+
//行业
|
|
1419
|
+
extendData[0]="行业X";
|
|
1420
|
+
//地区
|
|
1421
|
+
extendData[1]="地区X";
|
|
1422
|
+
|
|
1423
|
+
//PE|PB
|
|
1424
|
+
extendData[2]=(Math.round(Math.random()*60))/100;
|
|
1425
|
+
extendData[3]=(Math.round(Math.random()*60))/100;
|
|
1426
|
+
extendData[4]=(Math.round(Math.random()*60))/100;
|
|
1427
|
+
extendData[5]=(Math.round(Math.random()*60))/100;
|
|
1428
|
+
|
|
1429
|
+
|
|
1430
|
+
//周涨幅
|
|
1431
|
+
extendData[6]=(Math.round(Math.random()*60))/100;
|
|
1432
|
+
extendData[7]=(Math.round(Math.random()*60))/100;
|
|
1433
|
+
extendData[8]=(Math.round(Math.random()*60))/100;
|
|
1434
|
+
|
|
1435
|
+
|
|
1436
|
+
aryData.push(newItem);
|
|
1437
|
+
aryIndex.push(start+i);
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
var hqchartData={ data:aryData, index:aryIndex, filedindex:-1, sort:sortType, symbol:blockID };
|
|
1442
|
+
|
|
1443
|
+
if (column) hqchartData.filedindex=column.index;
|
|
1444
|
+
|
|
1445
|
+
callback(hqchartData);
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
|
|
1308
1449
|
|
|
1309
1450
|
HQData.Keyboard_RequestSymbolList=function(data, callback)
|
|
1310
1451
|
{
|
|
@@ -127661,6 +127661,12 @@ function JSReportChart(divElement)
|
|
|
127661
127661
|
if (IFrameSplitOperator.IsNumber(item.Sort)) chart.SortInfo.Sort=item.Sort;
|
|
127662
127662
|
}
|
|
127663
127663
|
|
|
127664
|
+
if (option.VirtualTable)
|
|
127665
|
+
{
|
|
127666
|
+
var item=option.VirtualTable;
|
|
127667
|
+
if (IFrameSplitOperator.IsBool(item.Enable)) chart.Data.Virtual.Enable=item.Enable;
|
|
127668
|
+
}
|
|
127669
|
+
|
|
127664
127670
|
var reportChart=chart.GetReportChart();
|
|
127665
127671
|
if (reportChart)
|
|
127666
127672
|
{
|
|
@@ -127875,7 +127881,7 @@ function JSReportChartContainer(uielement)
|
|
|
127875
127881
|
this.Symbol; //板块代码
|
|
127876
127882
|
this.Name; //板块名称
|
|
127877
127883
|
this.NetworkFilter; //数据回调接口
|
|
127878
|
-
this.Data={ XOffset:0, YOffset:0, Data:[] }; //股票列表
|
|
127884
|
+
this.Data={ XOffset:0, YOffset:0, Data:[], Virtual:{ Enable:false, Count:0 } }; //股票列表 (Virtual 虚拟表)
|
|
127879
127885
|
this.SourceData={ Data:[] } ; //原始股票顺序(排序还原用)
|
|
127880
127886
|
this.BlockData=new Map(); //当前板块数据
|
|
127881
127887
|
this.MapStockData=new Map(); //原始股票数据
|
|
@@ -128244,6 +128250,7 @@ function JSReportChartContainer(uielement)
|
|
|
128244
128250
|
{
|
|
128245
128251
|
this.SourceData.Data=[];
|
|
128246
128252
|
this.Data.Data=[];
|
|
128253
|
+
this.Data.Virtual.Count=0;
|
|
128247
128254
|
this.BlockData=new Map();
|
|
128248
128255
|
}
|
|
128249
128256
|
|
|
@@ -128500,6 +128507,12 @@ function JSReportChartContainer(uielement)
|
|
|
128500
128507
|
}
|
|
128501
128508
|
}
|
|
128502
128509
|
|
|
128510
|
+
if (recvData.Virtual) //虚拟表设置
|
|
128511
|
+
{
|
|
128512
|
+
var item=recvData.Virtual;
|
|
128513
|
+
if (IFrameSplitOperator.IsNumber(item.Count)) this.Data.Virtual.Count=item.Count;
|
|
128514
|
+
}
|
|
128515
|
+
|
|
128503
128516
|
this.Draw();
|
|
128504
128517
|
this.UpdateStockData();
|
|
128505
128518
|
}
|
|
@@ -128725,6 +128738,12 @@ function JSReportChartContainer(uielement)
|
|
|
128725
128738
|
var chart=this.ChartPaint[0];
|
|
128726
128739
|
if (!chart) return;
|
|
128727
128740
|
|
|
128741
|
+
if (this.Data.Virtual && this.Data.Virtual.Enable)
|
|
128742
|
+
{
|
|
128743
|
+
this.RequestVirtualStockData(); //虚拟表格 全部取后台
|
|
128744
|
+
return;
|
|
128745
|
+
}
|
|
128746
|
+
|
|
128728
128747
|
if (this.SortInfo && this.SortInfo.Field>=0 && this.SortInfo.Sort>0)
|
|
128729
128748
|
{
|
|
128730
128749
|
var column=chart.Column[this.SortInfo.Field];
|
|
@@ -130080,8 +130099,9 @@ function JSReportChartContainer(uielement)
|
|
|
130080
130099
|
if (!chart) return false;
|
|
130081
130100
|
|
|
130082
130101
|
var pageSize=chart.GetPageSize();
|
|
130083
|
-
|
|
130084
|
-
if (
|
|
130102
|
+
var dataCount=chart.GetAllRowCount();
|
|
130103
|
+
if (pageSize>dataCount) return false;
|
|
130104
|
+
if (this.Data.YOffset+pageSize>=dataCount)
|
|
130085
130105
|
{
|
|
130086
130106
|
if (bCycle===true)
|
|
130087
130107
|
{
|
|
@@ -130095,7 +130115,7 @@ function JSReportChartContainer(uielement)
|
|
|
130095
130115
|
}
|
|
130096
130116
|
|
|
130097
130117
|
this.Data.YOffset+=pageSize;
|
|
130098
|
-
var showDataCount=
|
|
130118
|
+
var showDataCount=dataCount-this.Data.YOffset;
|
|
130099
130119
|
|
|
130100
130120
|
if (chart.SelectedModel==0)
|
|
130101
130121
|
{
|
|
@@ -130111,13 +130131,14 @@ function JSReportChartContainer(uielement)
|
|
|
130111
130131
|
var chart=this.ChartPaint[0];
|
|
130112
130132
|
if (!chart) return false;
|
|
130113
130133
|
var pageSize=chart.GetPageSize();
|
|
130114
|
-
|
|
130134
|
+
var dataCount=chart.GetAllRowCount();
|
|
130135
|
+
if (pageSize>dataCount) return false;
|
|
130115
130136
|
|
|
130116
130137
|
if (this.Data.YOffset<=0)
|
|
130117
130138
|
{
|
|
130118
130139
|
if (bCycle===true)
|
|
130119
130140
|
{
|
|
130120
|
-
this.Data.YOffset=
|
|
130141
|
+
this.Data.YOffset=dataCount-pageSize; //循环到最后一页
|
|
130121
130142
|
return true;
|
|
130122
130143
|
}
|
|
130123
130144
|
else
|
|
@@ -130555,7 +130576,16 @@ function JSReportChartContainer(uielement)
|
|
|
130555
130576
|
if (column.Sort!=1 && column.Sort!=2) return false;
|
|
130556
130577
|
|
|
130557
130578
|
var sortInfo={ Field:index, Sort:sortType };
|
|
130558
|
-
if (
|
|
130579
|
+
if (this.Data.Virtual && this.Data.Virtual.Enable)
|
|
130580
|
+
{
|
|
130581
|
+
this.SortInfo.Field=sortInfo.Field;
|
|
130582
|
+
this.SortInfo.Sort=sortInfo.Sort;
|
|
130583
|
+
this.Data.YOffset=0;
|
|
130584
|
+
this.ResetReportSelectStatus();
|
|
130585
|
+
this.RequestVirtualStockData(); //虚拟表格
|
|
130586
|
+
return true;
|
|
130587
|
+
}
|
|
130588
|
+
else if (sortInfo.Sort==0) //不排序还原
|
|
130559
130589
|
{
|
|
130560
130590
|
this.Data.Data=[];
|
|
130561
130591
|
if (IFrameSplitOperator.IsNonEmptyArray(this.SourceData.Data))
|
|
@@ -131281,6 +131311,70 @@ function JSReportChartContainer(uielement)
|
|
|
131281
131311
|
if (bUpdate) this.Draw();
|
|
131282
131312
|
}
|
|
131283
131313
|
|
|
131314
|
+
//虚拟表格 请求序号 所有数据后台返回
|
|
131315
|
+
this.RequestVirtualStockData=function()
|
|
131316
|
+
{
|
|
131317
|
+
var chart=this.ChartPaint[0];
|
|
131318
|
+
if (!chart) return;
|
|
131319
|
+
|
|
131320
|
+
var self=this;
|
|
131321
|
+
var startIndex=this.Data.YOffset;
|
|
131322
|
+
var pageSize=chart.GetPageSize();
|
|
131323
|
+
var endIndex=startIndex+pageSize;
|
|
131324
|
+
var dataCount=chart.GetAllRowCount();
|
|
131325
|
+
if (endIndex>=dataCount) endIndex=dataCount-1;
|
|
131326
|
+
|
|
131327
|
+
if (!this.NetworkFilter) return;
|
|
131328
|
+
|
|
131329
|
+
var requestData=
|
|
131330
|
+
{
|
|
131331
|
+
range:{ start:startIndex, end:endIndex, count:chart.GetAllRowCount() },
|
|
131332
|
+
column:null,
|
|
131333
|
+
sort:0, symbol:this.Symbol, name:this.Name,
|
|
131334
|
+
pageSize:pageSize
|
|
131335
|
+
}
|
|
131336
|
+
|
|
131337
|
+
if (this.SortInfo && this.SortInfo.Field>=0 && this.SortInfo.Sort>0) //排序
|
|
131338
|
+
{
|
|
131339
|
+
var column=chart.Column[this.SortInfo.Field];
|
|
131340
|
+
requestData.column={ name: column.Title, type: column.Type, index:this.SortInfo.Field, ID:column.ID };
|
|
131341
|
+
requestData.sort=this.SortInfo.Sort;
|
|
131342
|
+
}
|
|
131343
|
+
|
|
131344
|
+
var obj=
|
|
131345
|
+
{
|
|
131346
|
+
Name:'JSDealChartContainer::RequestVirtualStockData', //类名::函数名
|
|
131347
|
+
Explain:'报价列表股票数据(虚拟表格)',
|
|
131348
|
+
Request:
|
|
131349
|
+
{
|
|
131350
|
+
Data: requestData
|
|
131351
|
+
},
|
|
131352
|
+
Self:this,
|
|
131353
|
+
PreventDefault:false
|
|
131354
|
+
};
|
|
131355
|
+
|
|
131356
|
+
if (chart.FixedRowCount>0 && chart.FixedRowData.Type==1)
|
|
131357
|
+
{
|
|
131358
|
+
var arySymbol=[];
|
|
131359
|
+
for(var i=0;i<chart.FixedRowData.Symbol.length;++i)
|
|
131360
|
+
{
|
|
131361
|
+
var item=chart.FixedRowData.Symbol[i];
|
|
131362
|
+
if (item) arySymbol.push(item);
|
|
131363
|
+
}
|
|
131364
|
+
|
|
131365
|
+
obj.Request.FixedSymbol=arySymbol;
|
|
131366
|
+
}
|
|
131367
|
+
|
|
131368
|
+
this.NetworkFilter(obj, function(data)
|
|
131369
|
+
{
|
|
131370
|
+
self.RecvStockSortData(data);
|
|
131371
|
+
self.AutoUpdate();
|
|
131372
|
+
});
|
|
131373
|
+
|
|
131374
|
+
if (obj.PreventDefault==true) return;
|
|
131375
|
+
|
|
131376
|
+
}
|
|
131377
|
+
|
|
131284
131378
|
//底部标签
|
|
131285
131379
|
this.ShowPageInfo=function(bShow)
|
|
131286
131380
|
{
|
|
@@ -131960,8 +132054,9 @@ function ChartReport()
|
|
|
131960
132054
|
this.GetYScrollRange=function()
|
|
131961
132055
|
{
|
|
131962
132056
|
if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return 0;
|
|
132057
|
+
var dataCount=this.GetAllRowCount();
|
|
131963
132058
|
|
|
131964
|
-
var maxOffset=
|
|
132059
|
+
var maxOffset=dataCount-this.RowCount;
|
|
131965
132060
|
|
|
131966
132061
|
return maxOffset;
|
|
131967
132062
|
}
|
|
@@ -132537,6 +132632,14 @@ function ChartReport()
|
|
|
132537
132632
|
this.Canvas.stroke();
|
|
132538
132633
|
}
|
|
132539
132634
|
|
|
132635
|
+
//获取一共多少行
|
|
132636
|
+
this.GetAllRowCount=function()
|
|
132637
|
+
{
|
|
132638
|
+
var count=this.Data.Data.length;
|
|
132639
|
+
if (this.Data.Virtual && this.Data.Virtual.Enable) count=this.Data.Virtual.Count;
|
|
132640
|
+
return count;
|
|
132641
|
+
}
|
|
132642
|
+
|
|
132540
132643
|
this.DrawBody=function()
|
|
132541
132644
|
{
|
|
132542
132645
|
if (!this.Data) return;
|
|
@@ -132576,7 +132679,8 @@ function ChartReport()
|
|
|
132576
132679
|
var setSelected;
|
|
132577
132680
|
if (this.MultiSelectModel==1) setSelected=new Set(this.MultiSelectedRow);
|
|
132578
132681
|
|
|
132579
|
-
|
|
132682
|
+
var dataCount=this.GetAllRowCount();
|
|
132683
|
+
for(var i=this.Data.YOffset, j=0; i<dataCount && j<this.RowCount ;++i, ++j)
|
|
132580
132684
|
{
|
|
132581
132685
|
var symbol=this.Data.Data[i];
|
|
132582
132686
|
|
|
@@ -139177,7 +139281,7 @@ function ScrollBarBGChart()
|
|
|
139177
139281
|
|
|
139178
139282
|
|
|
139179
139283
|
|
|
139180
|
-
var HQCHART_VERSION="1.1.
|
|
139284
|
+
var HQCHART_VERSION="1.1.13964";
|
|
139181
139285
|
|
|
139182
139286
|
function PrintHQChartVersion()
|
|
139183
139287
|
{
|