hqchart 1.1.13545 → 1.1.13555
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 -5
- package/lib/umychart.vue.js +46 -30
- package/package.json +1 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +20 -0
- package/src/jscommon/umychart.deal.js +4 -0
- package/src/jscommon/umychart.js +39 -0
- package/src/jscommon/umychart.popMenu.js +13 -0
- package/src/jscommon/umychart.report.js +386 -13
- package/src/jscommon/umychart.resource/font/iconfont.css +11 -3
- package/src/jscommon/umychart.resource/font/iconfont.ttf +0 -0
- package/src/jscommon/umychart.resource/font/iconfont.woff +0 -0
- package/src/jscommon/umychart.resource/font/iconfont.woff2 +0 -0
- package/src/jscommon/umychart.style.js +7 -0
- package/src/jscommon/umychart.testdata.js +20 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +437 -14
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +20 -0
- package/src/jscommon/umychart.vue/umychart.vue.js +450 -14
|
@@ -6523,6 +6523,9 @@ var JSCHART_EVENT_ID=
|
|
|
6523
6523
|
ON_TREPORT_LOCAL_SORT:126, //T型报价列表本地排序
|
|
6524
6524
|
ON_CLICK_TREPORT_ROW:127, //左键点击点击T型报价列表
|
|
6525
6525
|
|
|
6526
|
+
ON_DRAW_REPORT_ROW_BG:140, //报价列表整行背景
|
|
6527
|
+
ON_CLICK_REPORT_CHECKBOX:141, //报价列表checkbox
|
|
6528
|
+
|
|
6526
6529
|
|
|
6527
6530
|
ON_CHANGE_INDEX:150, //切换指标
|
|
6528
6531
|
ON_MENU_COMMAND:151, //菜单事件回调
|
|
@@ -71162,6 +71165,15 @@ function JSChartResource()
|
|
|
71162
71165
|
BorderColor:'rgba(180,180,180,0.9)',
|
|
71163
71166
|
BGColor:"rgba(234,239,248,0.9)",
|
|
71164
71167
|
BarWidth:{ Size:12 }
|
|
71168
|
+
},
|
|
71169
|
+
|
|
71170
|
+
CheckBox:
|
|
71171
|
+
{
|
|
71172
|
+
Family:"iconfont", Size:15,
|
|
71173
|
+
Checked:{ Color:"rgb(33,148,240)", Symbol:"\ue6b3", DisableColor:"rgb(112,128,144)" },
|
|
71174
|
+
Unchecked:{ Color:"rgb(33,148,240)", Symbol:"\ue6b4", DisableColor:"rgb(112,128,144)" },
|
|
71175
|
+
|
|
71176
|
+
Margin:{ Left:5, Right:5, Bottom:2, Top:4 },
|
|
71165
71177
|
}
|
|
71166
71178
|
},
|
|
71167
71179
|
|
|
@@ -72177,6 +72189,33 @@ function JSChartResource()
|
|
|
72177
72189
|
if (subItem.BorderColor) dest.VScrollbar.BorderColor=subItem.BorderColor;
|
|
72178
72190
|
if (subItem.BGColor) dest.VScrollbar.BGColor=subItem.BGColor;
|
|
72179
72191
|
}
|
|
72192
|
+
|
|
72193
|
+
if (item.CheckBox)
|
|
72194
|
+
{
|
|
72195
|
+
var subItem=item.CheckBox;
|
|
72196
|
+
if (subItem.Family) dest.CheckBox.Family=subItem.Family;
|
|
72197
|
+
if (IFrameSplitOperator.IsNumber(subItem.Size)) dest.CheckBox.Size=subItem.Size;
|
|
72198
|
+
|
|
72199
|
+
if (subItem.Checked)
|
|
72200
|
+
{
|
|
72201
|
+
var child=subItem.Checked;
|
|
72202
|
+
if (child.Color) dest.CheckBox.Checked.Color=child.Color;
|
|
72203
|
+
if (child.Symbol) dest.CheckBox.Checked.Symbol=child.Symbol;
|
|
72204
|
+
if (child.DisableColor) dest.CheckBox.Checked.DisableColor=child.DisableColor;
|
|
72205
|
+
}
|
|
72206
|
+
|
|
72207
|
+
if (subItem.Unchecked)
|
|
72208
|
+
{
|
|
72209
|
+
var child=subItem.Unchecked;
|
|
72210
|
+
if (child.Color) dest.CheckBox.Unchecked.Color=child.Color;
|
|
72211
|
+
if (child.Symbol) dest.CheckBox.Unchecked.Symbol=child.Symbol;
|
|
72212
|
+
if (child.DisableColor) dest.CheckBox.Unchecked.DisableColor=child.DisableColor;
|
|
72213
|
+
|
|
72214
|
+
|
|
72215
|
+
}
|
|
72216
|
+
|
|
72217
|
+
CopyMarginConfig(dest.CheckBox.Margin, subItem.Margin);
|
|
72218
|
+
}
|
|
72180
72219
|
|
|
72181
72220
|
}
|
|
72182
72221
|
|
|
@@ -123580,6 +123619,13 @@ function GetBlackStyle()
|
|
|
123580
123619
|
BarColor:"rgba(48,48,48,0.9)",
|
|
123581
123620
|
BorderColor:'rgba(48,48,48,0.9)',
|
|
123582
123621
|
BGColor:"rgba(211,211,211,0.5)",
|
|
123622
|
+
},
|
|
123623
|
+
|
|
123624
|
+
CheckBox:
|
|
123625
|
+
{
|
|
123626
|
+
Family:"iconfont", Size:15,
|
|
123627
|
+
Checked:{ Color:"rgb(237,60,31)", Symbol:"\ue6b3", DisableColor:"rgb(112,128,144)" },
|
|
123628
|
+
Unchecked:{ Color:"rgb(237,60,31)", Symbol:"\ue6b4", DisableColor:"rgb(112,128,144)" },
|
|
123583
123629
|
}
|
|
123584
123630
|
},
|
|
123585
123631
|
|
|
@@ -124712,6 +124758,10 @@ function ChartDealList()
|
|
|
124712
124758
|
if (!IFrameSplitOperator.IsNumber(item.DataIndex)) continue;
|
|
124713
124759
|
colItem.DataIndex=item.DataIndex; //柱子数据所在原始数据索引列
|
|
124714
124760
|
}
|
|
124761
|
+
else if (item.Type==DEAL_COLUMN_ID.TIME_ID)
|
|
124762
|
+
{
|
|
124763
|
+
if (IFrameSplitOperator.IsString(item.Foramt)) colItem.Foramt=item.Foramt; //设置时间格式
|
|
124764
|
+
}
|
|
124715
124765
|
|
|
124716
124766
|
this.Column.push(colItem);
|
|
124717
124767
|
}
|
|
@@ -125338,6 +125388,7 @@ function JSReportChart(divElement)
|
|
|
125338
125388
|
if (IFrameSplitOperator.IsBool(option.EnableDragHeader)) chart.EnableDragHeader=option.EnableDragHeader;
|
|
125339
125389
|
if (IFrameSplitOperator.IsNumber(option.WheelPageType)) chart.WheelPageType=option.WheelPageType;
|
|
125340
125390
|
if (IFrameSplitOperator.IsBool(option.PageUpDownCycle)) chart.PageUpDownCycle=option.PageUpDownCycle;
|
|
125391
|
+
|
|
125341
125392
|
|
|
125342
125393
|
if (option.VScrollbar) chart.SetVScrollbar(option.VScrollbar);
|
|
125343
125394
|
if (option.SortInfo)
|
|
@@ -125351,6 +125402,7 @@ function JSReportChart(divElement)
|
|
|
125351
125402
|
if (reportChart)
|
|
125352
125403
|
{
|
|
125353
125404
|
if (IFrameSplitOperator.IsNumber(option.TextOverflowStyle)) reportChart.TextOverflowStyle=option.TextOverflowStyle;
|
|
125405
|
+
if (IFrameSplitOperator.IsNumber(option.MultiSelectModel)) reportChart.MultiSelectModel=option.MultiSelectModel;
|
|
125354
125406
|
}
|
|
125355
125407
|
|
|
125356
125408
|
this.SetChartBorder(chart, option);
|
|
@@ -125914,6 +125966,7 @@ function JSReportChartContainer(uielement)
|
|
|
125914
125966
|
{
|
|
125915
125967
|
chart.SelectedRow=-1;
|
|
125916
125968
|
chart.SelectedFixedRow=-1;
|
|
125969
|
+
chart.MultiSelectedRow=[];
|
|
125917
125970
|
}
|
|
125918
125971
|
}
|
|
125919
125972
|
|
|
@@ -126517,6 +126570,8 @@ function JSReportChartContainer(uielement)
|
|
|
126517
126570
|
|
|
126518
126571
|
if (IFrameSplitOperator.IsNumber(item[35])) stock.Time=item[35]; //时间 hhmm / hhmmss / hhmmss.fff
|
|
126519
126572
|
if (IFrameSplitOperator.IsNumber(item[36])) stock.Date=item[36]; //日期
|
|
126573
|
+
|
|
126574
|
+
if (IFrameSplitOperator.IsBool(item[37])) stock.Checked=item[37];
|
|
126520
126575
|
}
|
|
126521
126576
|
|
|
126522
126577
|
|
|
@@ -126944,6 +126999,12 @@ function JSReportChartContainer(uielement)
|
|
|
126944
126999
|
}
|
|
126945
127000
|
else
|
|
126946
127001
|
{
|
|
127002
|
+
var bottonData=report.GetButtonData(x,y)
|
|
127003
|
+
if (bottonData)
|
|
127004
|
+
{
|
|
127005
|
+
mouseStatus={ Cursor:"pointer", Name:"Botton"};
|
|
127006
|
+
}
|
|
127007
|
+
|
|
126947
127008
|
var tooltipData=report.GetTooltipData(x,y); //单元格提示信息
|
|
126948
127009
|
if (tooltipData)
|
|
126949
127010
|
{
|
|
@@ -127749,6 +127810,100 @@ function JSReportChartContainer(uielement)
|
|
|
127749
127810
|
|
|
127750
127811
|
var result={ Redraw:false, Update:false }; //Redraw=重绘, Update=更新数据
|
|
127751
127812
|
|
|
127813
|
+
if (chart.MultiSelectModel==1)
|
|
127814
|
+
{
|
|
127815
|
+
var pageStatus=chart.GetCurrentPageStatus();
|
|
127816
|
+
if (IFrameSplitOperator.IsNonEmptyArray(pageStatus.MultiSelectedRow))
|
|
127817
|
+
{
|
|
127818
|
+
var selected=pageStatus.MultiSelectedRow[0];
|
|
127819
|
+
if (step>0)
|
|
127820
|
+
{
|
|
127821
|
+
if (selected==this.Data.Data.length-1) return result;
|
|
127822
|
+
|
|
127823
|
+
if (selected<0 || selected<pageStatus.Start || selected>pageStatus.End)
|
|
127824
|
+
{
|
|
127825
|
+
chart.MultiSelectedRow=[pageStatus.Start];
|
|
127826
|
+
result.Redraw=true;
|
|
127827
|
+
return result;
|
|
127828
|
+
}
|
|
127829
|
+
|
|
127830
|
+
var offset=this.Data.YOffset;
|
|
127831
|
+
for(var i=0;i<step;++i)
|
|
127832
|
+
{
|
|
127833
|
+
++selected;
|
|
127834
|
+
if (selected>pageStatus.End) ++offset;
|
|
127835
|
+
|
|
127836
|
+
if (selected>=this.Data.Data.length)
|
|
127837
|
+
{
|
|
127838
|
+
selected=0;
|
|
127839
|
+
offset=0;
|
|
127840
|
+
}
|
|
127841
|
+
}
|
|
127842
|
+
|
|
127843
|
+
result.Redraw=true;
|
|
127844
|
+
result.Update=(offset!=this.Data.YOffset);
|
|
127845
|
+
|
|
127846
|
+
chart.MultiSelectedRow=[selected];
|
|
127847
|
+
this.Data.YOffset=offset;
|
|
127848
|
+
|
|
127849
|
+
return result;
|
|
127850
|
+
|
|
127851
|
+
}
|
|
127852
|
+
else if (step<0)
|
|
127853
|
+
{
|
|
127854
|
+
if (selected==0) return result;
|
|
127855
|
+
|
|
127856
|
+
if (selected<0 || selected<pageStatus.Start || selected>pageStatus.End)
|
|
127857
|
+
{
|
|
127858
|
+
chart.MultiSelectedRow=[pageStatus.End];
|
|
127859
|
+
result.Redraw=true;
|
|
127860
|
+
return result;
|
|
127861
|
+
}
|
|
127862
|
+
|
|
127863
|
+
step=Math.abs(step);
|
|
127864
|
+
var offset=this.Data.YOffset;
|
|
127865
|
+
for(var i=0;i<step;++i)
|
|
127866
|
+
{
|
|
127867
|
+
--selected;
|
|
127868
|
+
if (selected<pageStatus.Start) --offset;
|
|
127869
|
+
|
|
127870
|
+
if (selected<0)
|
|
127871
|
+
{
|
|
127872
|
+
selected=this.Data.Data.length-1;
|
|
127873
|
+
offset=this.Data.Data.length-pageSize;
|
|
127874
|
+
if (offset<0) offset=0;
|
|
127875
|
+
}
|
|
127876
|
+
}
|
|
127877
|
+
|
|
127878
|
+
result.Redraw=true;
|
|
127879
|
+
result.Update=(offset!=this.Data.YOffset);
|
|
127880
|
+
|
|
127881
|
+
chart.MultiSelectedRow=[selected];
|
|
127882
|
+
this.Data.YOffset=offset;
|
|
127883
|
+
|
|
127884
|
+
return result;
|
|
127885
|
+
}
|
|
127886
|
+
else
|
|
127887
|
+
{
|
|
127888
|
+
return null;
|
|
127889
|
+
}
|
|
127890
|
+
|
|
127891
|
+
return result;
|
|
127892
|
+
}
|
|
127893
|
+
else
|
|
127894
|
+
{
|
|
127895
|
+
var selected=-1;
|
|
127896
|
+
if (step>0) selected=pageStatus.Start;
|
|
127897
|
+
else if (step<0) selected=pageStatus.End;
|
|
127898
|
+
else return null;
|
|
127899
|
+
|
|
127900
|
+
chart.MultiSelectedRow=[selected];
|
|
127901
|
+
result.Redraw=true;
|
|
127902
|
+
}
|
|
127903
|
+
|
|
127904
|
+
return result;
|
|
127905
|
+
}
|
|
127906
|
+
|
|
127752
127907
|
|
|
127753
127908
|
if (chart.SelectedModel==0) //不可翻页模式, 只能在当前页移动
|
|
127754
127909
|
{
|
|
@@ -128721,6 +128876,13 @@ var REPORT_COLUMN_ID=
|
|
|
128721
128876
|
|
|
128722
128877
|
TIME_ID:31, //时间 hhmmss / hhmm / hhmmss.fff
|
|
128723
128878
|
DATE_ID:32, //日期
|
|
128879
|
+
|
|
128880
|
+
CHECKBOX_ID:33, //单选框
|
|
128881
|
+
CHECKBOX2_ID:34,
|
|
128882
|
+
CHECKBOX3_ID:35,
|
|
128883
|
+
CHECKBOX4_ID:36,
|
|
128884
|
+
CHECKBOX5_ID:37,
|
|
128885
|
+
CHECKBOX6_ID:38,
|
|
128724
128886
|
|
|
128725
128887
|
|
|
128726
128888
|
SYMBOL_NAME_ID:99,
|
|
@@ -128795,6 +128957,10 @@ function ChartReport()
|
|
|
128795
128957
|
this.SelectedFixedRow=-1; //选中固定行ID
|
|
128796
128958
|
this.IsDrawBorder=1; //是否绘制单元格边框
|
|
128797
128959
|
|
|
128960
|
+
//多选模式
|
|
128961
|
+
this.MultiSelectModel=0; //0=禁用 1=开启
|
|
128962
|
+
this.MultiSelectedRow=[]; //选中行
|
|
128963
|
+
|
|
128798
128964
|
this.ShowSymbol=[]; //显示的股票列表 { Index:序号(排序用), Symbol:股票代码 }
|
|
128799
128965
|
this.DragRow; //拖拽行
|
|
128800
128966
|
|
|
@@ -128894,6 +129060,8 @@ function ChartReport()
|
|
|
128894
129060
|
DistanceWidth:g_JSChartResource.Report.KLine.DistanceWidth
|
|
128895
129061
|
}
|
|
128896
129062
|
|
|
129063
|
+
this.CheckBoxConfig=CloneData(g_JSChartResource.Report.CheckBox);
|
|
129064
|
+
|
|
128897
129065
|
//股票代码+股票名称
|
|
128898
129066
|
this.ItemSymbolFontConfig={Size:g_JSChartResource.Report.Item.SymbolFont.Size, Name:g_JSChartResource.Report.Item.SymbolFont.Name};
|
|
128899
129067
|
this.ItemNameFontConfg={Size:g_JSChartResource.Report.Item.NameFont.Size, Name:g_JSChartResource.Report.Item.NameFont.Name};
|
|
@@ -128912,6 +129080,7 @@ function ChartReport()
|
|
|
128912
129080
|
this.RowHeight=0; //行高度
|
|
128913
129081
|
this.BottomToolbarHeight=0; //底部工具条高度
|
|
128914
129082
|
this.IsShowAllColumn=false; //是否已显示所有列
|
|
129083
|
+
this.DevicePixelRatio=GetDevicePixelRatio(); //分辨率
|
|
128915
129084
|
|
|
128916
129085
|
//{
|
|
128917
129086
|
// Type:列id, Title:标题, TextAlign:文字对齐方式, MaxText:文字最大宽度 , TextColor:文字颜色, Sort:0=不支持排序 1=本地排序 0=远程排序,
|
|
@@ -128932,8 +129101,13 @@ function ChartReport()
|
|
|
128932
129101
|
// { Text, Color, Title:, TitleColor, Space, Margin:{ Left, Top, Right, Bottom }}
|
|
128933
129102
|
this.TooltipRect=[];
|
|
128934
129103
|
|
|
129104
|
+
//{ Rect:rtItem, Type: 0=checkedbox, 1=button, 2=link , Stock, Index:index, Column:column }
|
|
129105
|
+
this.ButtonRect=[];
|
|
129106
|
+
|
|
128935
129107
|
this.ReloadResource=function(resource)
|
|
128936
129108
|
{
|
|
129109
|
+
this.DevicePixelRatio=GetDevicePixelRatio()
|
|
129110
|
+
|
|
128937
129111
|
this.UpColor=g_JSChartResource.Report.UpTextColor;
|
|
128938
129112
|
this.DownColor=g_JSChartResource.Report.DownTextColor;
|
|
128939
129113
|
this.UnchagneColor=g_JSChartResource.Report.UnchagneTextColor;
|
|
@@ -129197,6 +129371,8 @@ function ChartReport()
|
|
|
129197
129371
|
{ Type:REPORT_COLUMN_ID.TIME_ID, Title:"时间", TextAlign:"left", ValueType:0, TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"99:99:99.999" },
|
|
129198
129372
|
{ Type:REPORT_COLUMN_ID.DATE_ID, Title:"日期", TextAlign:"left", FormatType:0, TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999-99-99" },
|
|
129199
129373
|
|
|
129374
|
+
{ Type:REPORT_COLUMN_ID.CHECKBOX_ID, Title:"", TextAlign:"center", FixedWidth:20*GetDevicePixelRatio() }
|
|
129375
|
+
|
|
129200
129376
|
|
|
129201
129377
|
];
|
|
129202
129378
|
|
|
@@ -129222,7 +129398,9 @@ function ChartReport()
|
|
|
129222
129398
|
{
|
|
129223
129399
|
this.ShowSymbol=[];
|
|
129224
129400
|
this.TooltipRect=[];
|
|
129225
|
-
|
|
129401
|
+
this.ButtonRect=[];
|
|
129402
|
+
this.DevicePixelRatio=GetDevicePixelRatio()
|
|
129403
|
+
|
|
129226
129404
|
if (this.GlobalOption) this.GlobalOption.FlashBGCount=0;
|
|
129227
129405
|
|
|
129228
129406
|
if (this.SizeChange) this.CalculateSize();
|
|
@@ -129274,7 +129452,14 @@ function ChartReport()
|
|
|
129274
129452
|
|
|
129275
129453
|
this.GetCurrentPageStatus=function() //{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
|
|
129276
129454
|
{
|
|
129277
|
-
var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRow:this.SelectedRow, IsSinglePage:false, DataCount:0 };
|
|
129455
|
+
var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRow:this.SelectedRow, IsSinglePage:false, DataCount:0, MultiSelectModel:this.MultiSelectModel };
|
|
129456
|
+
if (this.MultiSelectModel==1)
|
|
129457
|
+
{
|
|
129458
|
+
result.SelectedRow=-1;
|
|
129459
|
+
result.MultiSelectedRow=this.MultiSelectedRow.slice();
|
|
129460
|
+
result.MultiSelectedRow.sort((left, right)=>{ return left>right; });
|
|
129461
|
+
}
|
|
129462
|
+
|
|
129278
129463
|
if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
|
|
129279
129464
|
{
|
|
129280
129465
|
result.End=this.Data.YOffset+this.RowCount-1;
|
|
@@ -129695,19 +129880,34 @@ function ChartReport()
|
|
|
129695
129880
|
|
|
129696
129881
|
textTop=top+this.FixedRowHeight*this.FixedRowCount;
|
|
129697
129882
|
this.Canvas.font=this.ItemFont;
|
|
129883
|
+
|
|
129884
|
+
var eventDrawBG=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_REPORT_ROW_BG);
|
|
129885
|
+
var selectedSymbol=this.GetSelectedSymbol();
|
|
129886
|
+
|
|
129887
|
+
var setSelected;
|
|
129888
|
+
if (this.MultiSelectModel==1) setSelected=new Set(this.MultiSelectedRow);
|
|
129889
|
+
|
|
129698
129890
|
for(var i=this.Data.YOffset, j=0; i<this.Data.Data.length && j<this.RowCount ;++i, ++j)
|
|
129699
129891
|
{
|
|
129700
129892
|
var symbol=this.Data.Data[i];
|
|
129701
129893
|
|
|
129702
129894
|
var bFillRow=false;
|
|
129703
|
-
if (this.
|
|
129895
|
+
if (this.MultiSelectModel==1)
|
|
129704
129896
|
{
|
|
129705
|
-
if (
|
|
129897
|
+
if (setSelected.has(i)) bFillRow=true;
|
|
129706
129898
|
}
|
|
129707
129899
|
else
|
|
129708
129900
|
{
|
|
129709
|
-
if (
|
|
129901
|
+
if (this.SelectedModel==0)
|
|
129902
|
+
{
|
|
129903
|
+
if (j==this.SelectedRow) bFillRow=true; //选中行
|
|
129904
|
+
}
|
|
129905
|
+
else
|
|
129906
|
+
{
|
|
129907
|
+
if (i==this.SelectedRow) bFillRow=true; //选中行
|
|
129908
|
+
}
|
|
129710
129909
|
}
|
|
129910
|
+
|
|
129711
129911
|
|
|
129712
129912
|
if (this.DragRow)
|
|
129713
129913
|
{
|
|
@@ -129734,6 +129934,18 @@ function ChartReport()
|
|
|
129734
129934
|
bFillRow=false;
|
|
129735
129935
|
}
|
|
129736
129936
|
|
|
129937
|
+
if (eventDrawBG && eventDrawBG.Callback)
|
|
129938
|
+
{
|
|
129939
|
+
//Out:{ BGColor: }
|
|
129940
|
+
var sendData={ RowIndex:i, Symbol:symbol, Out:null, Selected:selectedSymbol, MultiSelectModel:this.MultiSelectModel };
|
|
129941
|
+
eventDrawBG.Callback(eventDrawBG,sendData,this);
|
|
129942
|
+
if (sendData.Out && sendData.Out.BGColor)
|
|
129943
|
+
{
|
|
129944
|
+
this.Canvas.fillStyle=sendData.Out.BGColor;
|
|
129945
|
+
this.Canvas.fillRect(left,textTop,rowWidth,this.RowHeight);
|
|
129946
|
+
}
|
|
129947
|
+
}
|
|
129948
|
+
|
|
129737
129949
|
if (bFillRow)
|
|
129738
129950
|
{
|
|
129739
129951
|
this.Canvas.fillStyle=this.SelectedColor;
|
|
@@ -129748,6 +129960,36 @@ function ChartReport()
|
|
|
129748
129960
|
}
|
|
129749
129961
|
}
|
|
129750
129962
|
|
|
129963
|
+
this.GetSelectedSymbol=function()
|
|
129964
|
+
{
|
|
129965
|
+
if (this.MultiSelectModel==1)
|
|
129966
|
+
{
|
|
129967
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.MultiSelectedRow)) return null;
|
|
129968
|
+
|
|
129969
|
+
var aryData=[];
|
|
129970
|
+
for(var i=0;i<this.MultiSelectedRow.length;++i)
|
|
129971
|
+
{
|
|
129972
|
+
var item=this.Data.Data[this.MultiSelectedRow[i]];
|
|
129973
|
+
if (!item) continue;
|
|
129974
|
+
|
|
129975
|
+
aryData.push(item);
|
|
129976
|
+
}
|
|
129977
|
+
|
|
129978
|
+
return aryData;
|
|
129979
|
+
}
|
|
129980
|
+
else
|
|
129981
|
+
{
|
|
129982
|
+
if (this.SelectedRow<0) return null;
|
|
129983
|
+
|
|
129984
|
+
var index=this.SelectedRow;
|
|
129985
|
+
if (this.SelectedModel==0) //当前屏选中
|
|
129986
|
+
index=this.Data.YOffset+this.SelectedRow;
|
|
129987
|
+
|
|
129988
|
+
var symbol=this.Data.Data[index];
|
|
129989
|
+
return [symbol];
|
|
129990
|
+
}
|
|
129991
|
+
}
|
|
129992
|
+
|
|
129751
129993
|
|
|
129752
129994
|
this.DrawFixedSymbolRow=function(top, dataIndex)
|
|
129753
129995
|
{
|
|
@@ -130073,6 +130315,18 @@ function ChartReport()
|
|
|
130073
130315
|
{
|
|
130074
130316
|
this.FormaDateDrawInfo(column, stock, drawInfo, data);
|
|
130075
130317
|
}
|
|
130318
|
+
else if (column.Type==REPORT_COLUMN_ID.CHECKBOX_ID)
|
|
130319
|
+
{
|
|
130320
|
+
rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
|
|
130321
|
+
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
130322
|
+
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
130323
|
+
drawInfo.Rect=rtItem;
|
|
130324
|
+
drawInfo.Checked=false;
|
|
130325
|
+
drawInfo.Font=`${this.CheckBoxConfig.Size*this.DevicePixelRatio}px ${this.CheckBoxConfig.Family}`;
|
|
130326
|
+
if (stock && IFrameSplitOperator.IsBool(stock.Checked))
|
|
130327
|
+
drawInfo.Checked=stock.Checked;
|
|
130328
|
+
}
|
|
130329
|
+
|
|
130076
130330
|
|
|
130077
130331
|
//拖拽行颜色
|
|
130078
130332
|
if (rowType==3)
|
|
@@ -130086,6 +130340,10 @@ function ChartReport()
|
|
|
130086
130340
|
{
|
|
130087
130341
|
this.DrawIconItem(drawInfo, x, top, textWidth);
|
|
130088
130342
|
}
|
|
130343
|
+
else if (column.Type==REPORT_COLUMN_ID.CHECKBOX_ID)
|
|
130344
|
+
{
|
|
130345
|
+
this.DrawCheckbox(drawInfo, left, top, itemWidth);
|
|
130346
|
+
}
|
|
130089
130347
|
else
|
|
130090
130348
|
{
|
|
130091
130349
|
if (data.FlashBG && data.FlashBG.Data && column.ID!=undefined)
|
|
@@ -130116,6 +130374,12 @@ function ChartReport()
|
|
|
130116
130374
|
var tooltipData={ Rect:rtItem, Stock:stock, Index:index, Column:column, RowType:rowType, Type:drawInfo.Tooltip.Type, Data:drawInfo.Tooltip.Data };
|
|
130117
130375
|
this.TooltipRect.push(tooltipData);
|
|
130118
130376
|
}
|
|
130377
|
+
|
|
130378
|
+
if (drawInfo.Botton)
|
|
130379
|
+
{
|
|
130380
|
+
var buttonData={ Stock:stock, Index:index, Column:column, Rect:drawInfo.Botton.Rect, Type:drawInfo.Botton.Type };
|
|
130381
|
+
this.ButtonRect.push(buttonData);
|
|
130382
|
+
}
|
|
130119
130383
|
}
|
|
130120
130384
|
|
|
130121
130385
|
this.DrawCustomText=function(drawInfo, column, left, top, cellWidth)
|
|
@@ -130633,6 +130897,36 @@ function ChartReport()
|
|
|
130633
130897
|
this.Canvas.font=this.ItemFont;
|
|
130634
130898
|
}
|
|
130635
130899
|
|
|
130900
|
+
this.DrawCheckbox=function(drawInfo, left, top, width)
|
|
130901
|
+
{
|
|
130902
|
+
var textAlign=drawInfo.TextAlign;
|
|
130903
|
+
var size=this.CheckBoxConfig.Size*this.DevicePixelRatio;
|
|
130904
|
+
//var boxWidth=size+this.CheckBoxConfig.Margin.Left+this.CheckBoxConfig.Margin.Right;
|
|
130905
|
+
var x=left+this.CheckBoxConfig.Margin.Left;
|
|
130906
|
+
var y=top+this.RowHeight-this.CheckBoxConfig.Margin.Bottom;
|
|
130907
|
+
if (textAlign=='center') x=left+width/2-size/2;
|
|
130908
|
+
else if (textAlign=='right') x=left+width-this.CheckBoxConfig.Margin.Right;
|
|
130909
|
+
|
|
130910
|
+
this.Canvas.font=drawInfo.Font;
|
|
130911
|
+
this.Canvas.textBaseline="bottom";
|
|
130912
|
+
this.Canvas.textAlign="left";
|
|
130913
|
+
if (drawInfo.Checked===true)
|
|
130914
|
+
{
|
|
130915
|
+
this.Canvas.fillStyle=this.CheckBoxConfig.Checked.Color;
|
|
130916
|
+
this.Canvas.fillText(this.CheckBoxConfig.Checked.Symbol,x,y);
|
|
130917
|
+
}
|
|
130918
|
+
else if (drawInfo.Checked===false)
|
|
130919
|
+
{
|
|
130920
|
+
this.Canvas.fillStyle=this.CheckBoxConfig.Unchecked.Color;
|
|
130921
|
+
this.Canvas.fillText(this.CheckBoxConfig.Unchecked.Symbol,x,y);
|
|
130922
|
+
}
|
|
130923
|
+
|
|
130924
|
+
var rtBox={ Left:x, Bottom:y, Width:size, Height:size };
|
|
130925
|
+
rtBox.Right=rtBox.Left+rtBox.Width;
|
|
130926
|
+
rtBox.Top=rtBox.Bottom-rtBox.Height;
|
|
130927
|
+
drawInfo.Botton={ Rect:rtBox, Type:0 };
|
|
130928
|
+
}
|
|
130929
|
+
|
|
130636
130930
|
//字体由外面设置
|
|
130637
130931
|
this.TextEllipsis=function(text, maxWidth, maxText)
|
|
130638
130932
|
{
|
|
@@ -131145,6 +131439,7 @@ function ChartReport()
|
|
|
131145
131439
|
|
|
131146
131440
|
this.SelectedFixedRow=row.Index;
|
|
131147
131441
|
this.SelectedRow=-1;
|
|
131442
|
+
this.MultiSelectedRow=[];
|
|
131148
131443
|
|
|
131149
131444
|
return { Type:4, Redraw:bRedraw, Row:row }; //行
|
|
131150
131445
|
}
|
|
@@ -131152,18 +131447,45 @@ function ChartReport()
|
|
|
131152
131447
|
var row=this.PtInBody(x,y);
|
|
131153
131448
|
if (row)
|
|
131154
131449
|
{
|
|
131450
|
+
var btnStatus={ Redraw:false };
|
|
131451
|
+
this.OnClickButton(x, y, e, btnStatus);
|
|
131452
|
+
|
|
131155
131453
|
var bRedraw=true;
|
|
131156
|
-
if (this.
|
|
131454
|
+
if (this.MultiSelectModel==1)
|
|
131157
131455
|
{
|
|
131158
|
-
if (
|
|
131159
|
-
|
|
131456
|
+
if (e && e.ctrlKey) //多选
|
|
131457
|
+
{
|
|
131458
|
+
var pos=this.MultiSelectedRow.indexOf(row.DataIndex);
|
|
131459
|
+
if (pos>=0) this.MultiSelectedRow.splice(pos,1);
|
|
131460
|
+
else this.MultiSelectedRow.push(row.DataIndex);
|
|
131461
|
+
|
|
131462
|
+
}
|
|
131463
|
+
else if (e && e.shiftKey) //批量多选
|
|
131464
|
+
{
|
|
131465
|
+
this.OnShiftClickRow(row);
|
|
131466
|
+
}
|
|
131467
|
+
else
|
|
131468
|
+
{
|
|
131469
|
+
if (this.MultiSelectedRow.length==1 && this.MultiSelectedRow[0]==row.DataIndex) bRedraw=false;
|
|
131470
|
+
else this.MultiSelectedRow=[row.DataIndex];
|
|
131471
|
+
}
|
|
131472
|
+
|
|
131160
131473
|
this.SelectedFixedRow=-1;
|
|
131161
131474
|
}
|
|
131162
|
-
else
|
|
131475
|
+
else
|
|
131163
131476
|
{
|
|
131164
|
-
if (this.
|
|
131165
|
-
|
|
131166
|
-
|
|
131477
|
+
if (this.SelectedModel==0)
|
|
131478
|
+
{
|
|
131479
|
+
if (this.SelectedRow==row.Index) bRedraw=false;
|
|
131480
|
+
this.SelectedRow=row.Index;
|
|
131481
|
+
this.SelectedFixedRow=-1;
|
|
131482
|
+
}
|
|
131483
|
+
else
|
|
131484
|
+
{
|
|
131485
|
+
if (this.SelectedRow==row.DataIndex) bRedraw=false;
|
|
131486
|
+
this.SelectedRow=row.DataIndex;
|
|
131487
|
+
this.SelectedFixedRow=-1;
|
|
131488
|
+
}
|
|
131167
131489
|
}
|
|
131168
131490
|
|
|
131169
131491
|
var eventID=JSCHART_EVENT_ID.ON_CLICK_REPORT_ROW;
|
|
@@ -131171,7 +131493,7 @@ function ChartReport()
|
|
|
131171
131493
|
|
|
131172
131494
|
this.SendClickEvent(eventID, { Data:row, X:x, Y:y, e:e, Inside:insidePoint, UIElement:uiElement });
|
|
131173
131495
|
|
|
131174
|
-
return { Type:2, Redraw:bRedraw, Row:row }; //行
|
|
131496
|
+
return { Type:2, Redraw:bRedraw || btnStatus.Redraw, Row:row }; //行
|
|
131175
131497
|
}
|
|
131176
131498
|
|
|
131177
131499
|
var header=this.PtInHeader(x,y);
|
|
@@ -131194,6 +131516,62 @@ function ChartReport()
|
|
|
131194
131516
|
return null;
|
|
131195
131517
|
}
|
|
131196
131518
|
|
|
131519
|
+
this.OnShiftClickRow=function(row)
|
|
131520
|
+
{
|
|
131521
|
+
if (this.MultiSelectedRow.length<=0)
|
|
131522
|
+
{
|
|
131523
|
+
this.MultiSelectedRow.push(row.DataIndex);
|
|
131524
|
+
return;
|
|
131525
|
+
}
|
|
131526
|
+
|
|
131527
|
+
var max=null, min=null;
|
|
131528
|
+
for(var i=0;i<this.MultiSelectedRow.length;++i)
|
|
131529
|
+
{
|
|
131530
|
+
var value=this.MultiSelectedRow[i];
|
|
131531
|
+
if (max==null || max<value) max=value;
|
|
131532
|
+
if (min==null || min>value) min=value;
|
|
131533
|
+
if (value==row.DataIndex) //移除
|
|
131534
|
+
{
|
|
131535
|
+
this.MultiSelectedRow.splice(i,1);
|
|
131536
|
+
return;
|
|
131537
|
+
}
|
|
131538
|
+
}
|
|
131539
|
+
|
|
131540
|
+
if (max==min)
|
|
131541
|
+
{
|
|
131542
|
+
var start=row.DataIndex, end=max;
|
|
131543
|
+
if (start>end)
|
|
131544
|
+
{
|
|
131545
|
+
start=max;
|
|
131546
|
+
end=row.DataIndex;
|
|
131547
|
+
}
|
|
131548
|
+
|
|
131549
|
+
this.MultiSelectedRow=[];
|
|
131550
|
+
for(var i=start;i<=end;++i)
|
|
131551
|
+
{
|
|
131552
|
+
this.MultiSelectedRow.push(i);
|
|
131553
|
+
}
|
|
131554
|
+
}
|
|
131555
|
+
else
|
|
131556
|
+
{
|
|
131557
|
+
if (row.DataIndex<=max && row.DataIndex>=min)
|
|
131558
|
+
{
|
|
131559
|
+
this.MultiSelectedRow.push(row.DataIndex);
|
|
131560
|
+
}
|
|
131561
|
+
else
|
|
131562
|
+
{
|
|
131563
|
+
var start=Math.min(row.DataIndex, min);
|
|
131564
|
+
var end=Math.max(row.DataIndex, max);
|
|
131565
|
+
this.MultiSelectedRow=[];
|
|
131566
|
+
for(var i=start;i<=end;++i)
|
|
131567
|
+
{
|
|
131568
|
+
this.MultiSelectedRow.push(i);
|
|
131569
|
+
}
|
|
131570
|
+
}
|
|
131571
|
+
}
|
|
131572
|
+
|
|
131573
|
+
}
|
|
131574
|
+
|
|
131197
131575
|
this.OnDrawgRow=function(x, y, e) //Type: 5=顶部 6=空白行 2=行 7=底部
|
|
131198
131576
|
{
|
|
131199
131577
|
if (!this.Data) return null;
|
|
@@ -131230,6 +131608,33 @@ function ChartReport()
|
|
|
131230
131608
|
return { Type:7 };
|
|
131231
131609
|
}
|
|
131232
131610
|
|
|
131611
|
+
this.OnClickButton=function(x, y, e, status)
|
|
131612
|
+
{
|
|
131613
|
+
if (e.button!=0) return false;
|
|
131614
|
+
|
|
131615
|
+
var buttonData=this.GetButtonData(x,y);
|
|
131616
|
+
if (!buttonData) return true;
|
|
131617
|
+
|
|
131618
|
+
if (buttonData.Type===0)
|
|
131619
|
+
{
|
|
131620
|
+
var sendData={ Column:buttonData.Column, Index:buttonData.Index, Stock:buttonData.Stock, PreventDefault: false };
|
|
131621
|
+
this.SendClickEvent(JSCHART_EVENT_ID.ON_CLICK_REPORT_CHECKBOX, sendData)
|
|
131622
|
+
|
|
131623
|
+
if (!sendData.PreventDefault)
|
|
131624
|
+
{
|
|
131625
|
+
if (IFrameSplitOperator.IsBool(buttonData.Stock.Checked))
|
|
131626
|
+
buttonData.Stock.Checked=!buttonData.Stock.Checked;
|
|
131627
|
+
else
|
|
131628
|
+
buttonData.Stock.Checked=true;
|
|
131629
|
+
}
|
|
131630
|
+
|
|
131631
|
+
status.Redraw=true;
|
|
131632
|
+
return true;
|
|
131633
|
+
}
|
|
131634
|
+
|
|
131635
|
+
return false;
|
|
131636
|
+
}
|
|
131637
|
+
|
|
131233
131638
|
this.OnDblClick=function(x,y,e)
|
|
131234
131639
|
{
|
|
131235
131640
|
if (!this.Data) return false;
|
|
@@ -131467,6 +131872,24 @@ function ChartReport()
|
|
|
131467
131872
|
return null;
|
|
131468
131873
|
}
|
|
131469
131874
|
|
|
131875
|
+
this.GetButtonData=function(x,y)
|
|
131876
|
+
{
|
|
131877
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.ButtonRect)) return null;
|
|
131878
|
+
|
|
131879
|
+
for(var i=0;i<this.ButtonRect.length;++i)
|
|
131880
|
+
{
|
|
131881
|
+
var item=this.ButtonRect[i];
|
|
131882
|
+
|
|
131883
|
+
var rt=item.Rect;
|
|
131884
|
+
if (!rt) continue;
|
|
131885
|
+
|
|
131886
|
+
if (x>=rt.Left && x<=rt.Right && y>=rt.Top && y<=rt.Bottom)
|
|
131887
|
+
{
|
|
131888
|
+
return { Rect:item.Rect, Stock:item.Stock, Column:item.Column, Index:item.Index, Type:item.Type };
|
|
131889
|
+
}
|
|
131890
|
+
}
|
|
131891
|
+
}
|
|
131892
|
+
|
|
131470
131893
|
this.PtInHeaderDragBorder=function(x, y)
|
|
131471
131894
|
{
|
|
131472
131895
|
if (!this.IsShowHeader) return null;
|
|
@@ -135297,7 +135720,7 @@ function ScrollBarBGChart()
|
|
|
135297
135720
|
|
|
135298
135721
|
|
|
135299
135722
|
|
|
135300
|
-
var HQCHART_VERSION="1.1.
|
|
135723
|
+
var HQCHART_VERSION="1.1.13554";
|
|
135301
135724
|
|
|
135302
135725
|
function PrintHQChartVersion()
|
|
135303
135726
|
{
|