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.
@@ -6567,6 +6567,9 @@ var JSCHART_EVENT_ID=
6567
6567
  ON_TREPORT_LOCAL_SORT:126, //T型报价列表本地排序
6568
6568
  ON_CLICK_TREPORT_ROW:127, //左键点击点击T型报价列表
6569
6569
 
6570
+ ON_DRAW_REPORT_ROW_BG:140, //报价列表整行背景
6571
+ ON_CLICK_REPORT_CHECKBOX:141, //报价列表checkbox
6572
+
6570
6573
 
6571
6574
  ON_CHANGE_INDEX:150, //切换指标
6572
6575
  ON_MENU_COMMAND:151, //菜单事件回调
@@ -71206,6 +71209,15 @@ function JSChartResource()
71206
71209
  BorderColor:'rgba(180,180,180,0.9)',
71207
71210
  BGColor:"rgba(234,239,248,0.9)",
71208
71211
  BarWidth:{ Size:12 }
71212
+ },
71213
+
71214
+ CheckBox:
71215
+ {
71216
+ Family:"iconfont", Size:15,
71217
+ Checked:{ Color:"rgb(33,148,240)", Symbol:"\ue6b3", DisableColor:"rgb(112,128,144)" },
71218
+ Unchecked:{ Color:"rgb(33,148,240)", Symbol:"\ue6b4", DisableColor:"rgb(112,128,144)" },
71219
+
71220
+ Margin:{ Left:5, Right:5, Bottom:2, Top:4 },
71209
71221
  }
71210
71222
  },
71211
71223
 
@@ -72221,6 +72233,33 @@ function JSChartResource()
72221
72233
  if (subItem.BorderColor) dest.VScrollbar.BorderColor=subItem.BorderColor;
72222
72234
  if (subItem.BGColor) dest.VScrollbar.BGColor=subItem.BGColor;
72223
72235
  }
72236
+
72237
+ if (item.CheckBox)
72238
+ {
72239
+ var subItem=item.CheckBox;
72240
+ if (subItem.Family) dest.CheckBox.Family=subItem.Family;
72241
+ if (IFrameSplitOperator.IsNumber(subItem.Size)) dest.CheckBox.Size=subItem.Size;
72242
+
72243
+ if (subItem.Checked)
72244
+ {
72245
+ var child=subItem.Checked;
72246
+ if (child.Color) dest.CheckBox.Checked.Color=child.Color;
72247
+ if (child.Symbol) dest.CheckBox.Checked.Symbol=child.Symbol;
72248
+ if (child.DisableColor) dest.CheckBox.Checked.DisableColor=child.DisableColor;
72249
+ }
72250
+
72251
+ if (subItem.Unchecked)
72252
+ {
72253
+ var child=subItem.Unchecked;
72254
+ if (child.Color) dest.CheckBox.Unchecked.Color=child.Color;
72255
+ if (child.Symbol) dest.CheckBox.Unchecked.Symbol=child.Symbol;
72256
+ if (child.DisableColor) dest.CheckBox.Unchecked.DisableColor=child.DisableColor;
72257
+
72258
+
72259
+ }
72260
+
72261
+ CopyMarginConfig(dest.CheckBox.Margin, subItem.Margin);
72262
+ }
72224
72263
 
72225
72264
  }
72226
72265
 
@@ -123624,6 +123663,13 @@ function GetBlackStyle()
123624
123663
  BarColor:"rgba(48,48,48,0.9)",
123625
123664
  BorderColor:'rgba(48,48,48,0.9)',
123626
123665
  BGColor:"rgba(211,211,211,0.5)",
123666
+ },
123667
+
123668
+ CheckBox:
123669
+ {
123670
+ Family:"iconfont", Size:15,
123671
+ Checked:{ Color:"rgb(237,60,31)", Symbol:"\ue6b3", DisableColor:"rgb(112,128,144)" },
123672
+ Unchecked:{ Color:"rgb(237,60,31)", Symbol:"\ue6b4", DisableColor:"rgb(112,128,144)" },
123627
123673
  }
123628
123674
  },
123629
123675
 
@@ -124756,6 +124802,10 @@ function ChartDealList()
124756
124802
  if (!IFrameSplitOperator.IsNumber(item.DataIndex)) continue;
124757
124803
  colItem.DataIndex=item.DataIndex; //柱子数据所在原始数据索引列
124758
124804
  }
124805
+ else if (item.Type==DEAL_COLUMN_ID.TIME_ID)
124806
+ {
124807
+ if (IFrameSplitOperator.IsString(item.Foramt)) colItem.Foramt=item.Foramt; //设置时间格式
124808
+ }
124759
124809
 
124760
124810
  this.Column.push(colItem);
124761
124811
  }
@@ -125382,6 +125432,7 @@ function JSReportChart(divElement)
125382
125432
  if (IFrameSplitOperator.IsBool(option.EnableDragHeader)) chart.EnableDragHeader=option.EnableDragHeader;
125383
125433
  if (IFrameSplitOperator.IsNumber(option.WheelPageType)) chart.WheelPageType=option.WheelPageType;
125384
125434
  if (IFrameSplitOperator.IsBool(option.PageUpDownCycle)) chart.PageUpDownCycle=option.PageUpDownCycle;
125435
+
125385
125436
 
125386
125437
  if (option.VScrollbar) chart.SetVScrollbar(option.VScrollbar);
125387
125438
  if (option.SortInfo)
@@ -125395,6 +125446,7 @@ function JSReportChart(divElement)
125395
125446
  if (reportChart)
125396
125447
  {
125397
125448
  if (IFrameSplitOperator.IsNumber(option.TextOverflowStyle)) reportChart.TextOverflowStyle=option.TextOverflowStyle;
125449
+ if (IFrameSplitOperator.IsNumber(option.MultiSelectModel)) reportChart.MultiSelectModel=option.MultiSelectModel;
125398
125450
  }
125399
125451
 
125400
125452
  this.SetChartBorder(chart, option);
@@ -125958,6 +126010,7 @@ function JSReportChartContainer(uielement)
125958
126010
  {
125959
126011
  chart.SelectedRow=-1;
125960
126012
  chart.SelectedFixedRow=-1;
126013
+ chart.MultiSelectedRow=[];
125961
126014
  }
125962
126015
  }
125963
126016
 
@@ -126561,6 +126614,8 @@ function JSReportChartContainer(uielement)
126561
126614
 
126562
126615
  if (IFrameSplitOperator.IsNumber(item[35])) stock.Time=item[35]; //时间 hhmm / hhmmss / hhmmss.fff
126563
126616
  if (IFrameSplitOperator.IsNumber(item[36])) stock.Date=item[36]; //日期
126617
+
126618
+ if (IFrameSplitOperator.IsBool(item[37])) stock.Checked=item[37];
126564
126619
  }
126565
126620
 
126566
126621
 
@@ -126988,6 +127043,12 @@ function JSReportChartContainer(uielement)
126988
127043
  }
126989
127044
  else
126990
127045
  {
127046
+ var bottonData=report.GetButtonData(x,y)
127047
+ if (bottonData)
127048
+ {
127049
+ mouseStatus={ Cursor:"pointer", Name:"Botton"};
127050
+ }
127051
+
126991
127052
  var tooltipData=report.GetTooltipData(x,y); //单元格提示信息
126992
127053
  if (tooltipData)
126993
127054
  {
@@ -127793,6 +127854,100 @@ function JSReportChartContainer(uielement)
127793
127854
 
127794
127855
  var result={ Redraw:false, Update:false }; //Redraw=重绘, Update=更新数据
127795
127856
 
127857
+ if (chart.MultiSelectModel==1)
127858
+ {
127859
+ var pageStatus=chart.GetCurrentPageStatus();
127860
+ if (IFrameSplitOperator.IsNonEmptyArray(pageStatus.MultiSelectedRow))
127861
+ {
127862
+ var selected=pageStatus.MultiSelectedRow[0];
127863
+ if (step>0)
127864
+ {
127865
+ if (selected==this.Data.Data.length-1) return result;
127866
+
127867
+ if (selected<0 || selected<pageStatus.Start || selected>pageStatus.End)
127868
+ {
127869
+ chart.MultiSelectedRow=[pageStatus.Start];
127870
+ result.Redraw=true;
127871
+ return result;
127872
+ }
127873
+
127874
+ var offset=this.Data.YOffset;
127875
+ for(var i=0;i<step;++i)
127876
+ {
127877
+ ++selected;
127878
+ if (selected>pageStatus.End) ++offset;
127879
+
127880
+ if (selected>=this.Data.Data.length)
127881
+ {
127882
+ selected=0;
127883
+ offset=0;
127884
+ }
127885
+ }
127886
+
127887
+ result.Redraw=true;
127888
+ result.Update=(offset!=this.Data.YOffset);
127889
+
127890
+ chart.MultiSelectedRow=[selected];
127891
+ this.Data.YOffset=offset;
127892
+
127893
+ return result;
127894
+
127895
+ }
127896
+ else if (step<0)
127897
+ {
127898
+ if (selected==0) return result;
127899
+
127900
+ if (selected<0 || selected<pageStatus.Start || selected>pageStatus.End)
127901
+ {
127902
+ chart.MultiSelectedRow=[pageStatus.End];
127903
+ result.Redraw=true;
127904
+ return result;
127905
+ }
127906
+
127907
+ step=Math.abs(step);
127908
+ var offset=this.Data.YOffset;
127909
+ for(var i=0;i<step;++i)
127910
+ {
127911
+ --selected;
127912
+ if (selected<pageStatus.Start) --offset;
127913
+
127914
+ if (selected<0)
127915
+ {
127916
+ selected=this.Data.Data.length-1;
127917
+ offset=this.Data.Data.length-pageSize;
127918
+ if (offset<0) offset=0;
127919
+ }
127920
+ }
127921
+
127922
+ result.Redraw=true;
127923
+ result.Update=(offset!=this.Data.YOffset);
127924
+
127925
+ chart.MultiSelectedRow=[selected];
127926
+ this.Data.YOffset=offset;
127927
+
127928
+ return result;
127929
+ }
127930
+ else
127931
+ {
127932
+ return null;
127933
+ }
127934
+
127935
+ return result;
127936
+ }
127937
+ else
127938
+ {
127939
+ var selected=-1;
127940
+ if (step>0) selected=pageStatus.Start;
127941
+ else if (step<0) selected=pageStatus.End;
127942
+ else return null;
127943
+
127944
+ chart.MultiSelectedRow=[selected];
127945
+ result.Redraw=true;
127946
+ }
127947
+
127948
+ return result;
127949
+ }
127950
+
127796
127951
 
127797
127952
  if (chart.SelectedModel==0) //不可翻页模式, 只能在当前页移动
127798
127953
  {
@@ -128765,6 +128920,13 @@ var REPORT_COLUMN_ID=
128765
128920
 
128766
128921
  TIME_ID:31, //时间 hhmmss / hhmm / hhmmss.fff
128767
128922
  DATE_ID:32, //日期
128923
+
128924
+ CHECKBOX_ID:33, //单选框
128925
+ CHECKBOX2_ID:34,
128926
+ CHECKBOX3_ID:35,
128927
+ CHECKBOX4_ID:36,
128928
+ CHECKBOX5_ID:37,
128929
+ CHECKBOX6_ID:38,
128768
128930
 
128769
128931
 
128770
128932
  SYMBOL_NAME_ID:99,
@@ -128839,6 +129001,10 @@ function ChartReport()
128839
129001
  this.SelectedFixedRow=-1; //选中固定行ID
128840
129002
  this.IsDrawBorder=1; //是否绘制单元格边框
128841
129003
 
129004
+ //多选模式
129005
+ this.MultiSelectModel=0; //0=禁用 1=开启
129006
+ this.MultiSelectedRow=[]; //选中行
129007
+
128842
129008
  this.ShowSymbol=[]; //显示的股票列表 { Index:序号(排序用), Symbol:股票代码 }
128843
129009
  this.DragRow; //拖拽行
128844
129010
 
@@ -128938,6 +129104,8 @@ function ChartReport()
128938
129104
  DistanceWidth:g_JSChartResource.Report.KLine.DistanceWidth
128939
129105
  }
128940
129106
 
129107
+ this.CheckBoxConfig=CloneData(g_JSChartResource.Report.CheckBox);
129108
+
128941
129109
  //股票代码+股票名称
128942
129110
  this.ItemSymbolFontConfig={Size:g_JSChartResource.Report.Item.SymbolFont.Size, Name:g_JSChartResource.Report.Item.SymbolFont.Name};
128943
129111
  this.ItemNameFontConfg={Size:g_JSChartResource.Report.Item.NameFont.Size, Name:g_JSChartResource.Report.Item.NameFont.Name};
@@ -128956,6 +129124,7 @@ function ChartReport()
128956
129124
  this.RowHeight=0; //行高度
128957
129125
  this.BottomToolbarHeight=0; //底部工具条高度
128958
129126
  this.IsShowAllColumn=false; //是否已显示所有列
129127
+ this.DevicePixelRatio=GetDevicePixelRatio(); //分辨率
128959
129128
 
128960
129129
  //{
128961
129130
  // Type:列id, Title:标题, TextAlign:文字对齐方式, MaxText:文字最大宽度 , TextColor:文字颜色, Sort:0=不支持排序 1=本地排序 0=远程排序,
@@ -128976,8 +129145,13 @@ function ChartReport()
128976
129145
  // { Text, Color, Title:, TitleColor, Space, Margin:{ Left, Top, Right, Bottom }}
128977
129146
  this.TooltipRect=[];
128978
129147
 
129148
+ //{ Rect:rtItem, Type: 0=checkedbox, 1=button, 2=link , Stock, Index:index, Column:column }
129149
+ this.ButtonRect=[];
129150
+
128979
129151
  this.ReloadResource=function(resource)
128980
129152
  {
129153
+ this.DevicePixelRatio=GetDevicePixelRatio()
129154
+
128981
129155
  this.UpColor=g_JSChartResource.Report.UpTextColor;
128982
129156
  this.DownColor=g_JSChartResource.Report.DownTextColor;
128983
129157
  this.UnchagneColor=g_JSChartResource.Report.UnchagneTextColor;
@@ -129241,6 +129415,8 @@ function ChartReport()
129241
129415
  { Type:REPORT_COLUMN_ID.TIME_ID, Title:"时间", TextAlign:"left", ValueType:0, TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"99:99:99.999" },
129242
129416
  { Type:REPORT_COLUMN_ID.DATE_ID, Title:"日期", TextAlign:"left", FormatType:0, TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999-99-99" },
129243
129417
 
129418
+ { Type:REPORT_COLUMN_ID.CHECKBOX_ID, Title:"", TextAlign:"center", FixedWidth:20*GetDevicePixelRatio() }
129419
+
129244
129420
 
129245
129421
  ];
129246
129422
 
@@ -129266,7 +129442,9 @@ function ChartReport()
129266
129442
  {
129267
129443
  this.ShowSymbol=[];
129268
129444
  this.TooltipRect=[];
129269
-
129445
+ this.ButtonRect=[];
129446
+ this.DevicePixelRatio=GetDevicePixelRatio()
129447
+
129270
129448
  if (this.GlobalOption) this.GlobalOption.FlashBGCount=0;
129271
129449
 
129272
129450
  if (this.SizeChange) this.CalculateSize();
@@ -129318,7 +129496,14 @@ function ChartReport()
129318
129496
 
129319
129497
  this.GetCurrentPageStatus=function() //{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
129320
129498
  {
129321
- var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRow:this.SelectedRow, IsSinglePage:false, DataCount:0 };
129499
+ var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRow:this.SelectedRow, IsSinglePage:false, DataCount:0, MultiSelectModel:this.MultiSelectModel };
129500
+ if (this.MultiSelectModel==1)
129501
+ {
129502
+ result.SelectedRow=-1;
129503
+ result.MultiSelectedRow=this.MultiSelectedRow.slice();
129504
+ result.MultiSelectedRow.sort((left, right)=>{ return left>right; });
129505
+ }
129506
+
129322
129507
  if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
129323
129508
  {
129324
129509
  result.End=this.Data.YOffset+this.RowCount-1;
@@ -129739,19 +129924,34 @@ function ChartReport()
129739
129924
 
129740
129925
  textTop=top+this.FixedRowHeight*this.FixedRowCount;
129741
129926
  this.Canvas.font=this.ItemFont;
129927
+
129928
+ var eventDrawBG=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_REPORT_ROW_BG);
129929
+ var selectedSymbol=this.GetSelectedSymbol();
129930
+
129931
+ var setSelected;
129932
+ if (this.MultiSelectModel==1) setSelected=new Set(this.MultiSelectedRow);
129933
+
129742
129934
  for(var i=this.Data.YOffset, j=0; i<this.Data.Data.length && j<this.RowCount ;++i, ++j)
129743
129935
  {
129744
129936
  var symbol=this.Data.Data[i];
129745
129937
 
129746
129938
  var bFillRow=false;
129747
- if (this.SelectedModel==0)
129939
+ if (this.MultiSelectModel==1)
129748
129940
  {
129749
- if (j==this.SelectedRow) bFillRow=true; //选中行
129941
+ if (setSelected.has(i)) bFillRow=true;
129750
129942
  }
129751
129943
  else
129752
129944
  {
129753
- if (i==this.SelectedRow) bFillRow=true; //选中行
129945
+ if (this.SelectedModel==0)
129946
+ {
129947
+ if (j==this.SelectedRow) bFillRow=true; //选中行
129948
+ }
129949
+ else
129950
+ {
129951
+ if (i==this.SelectedRow) bFillRow=true; //选中行
129952
+ }
129754
129953
  }
129954
+
129755
129955
 
129756
129956
  if (this.DragRow)
129757
129957
  {
@@ -129778,6 +129978,18 @@ function ChartReport()
129778
129978
  bFillRow=false;
129779
129979
  }
129780
129980
 
129981
+ if (eventDrawBG && eventDrawBG.Callback)
129982
+ {
129983
+ //Out:{ BGColor: }
129984
+ var sendData={ RowIndex:i, Symbol:symbol, Out:null, Selected:selectedSymbol, MultiSelectModel:this.MultiSelectModel };
129985
+ eventDrawBG.Callback(eventDrawBG,sendData,this);
129986
+ if (sendData.Out && sendData.Out.BGColor)
129987
+ {
129988
+ this.Canvas.fillStyle=sendData.Out.BGColor;
129989
+ this.Canvas.fillRect(left,textTop,rowWidth,this.RowHeight);
129990
+ }
129991
+ }
129992
+
129781
129993
  if (bFillRow)
129782
129994
  {
129783
129995
  this.Canvas.fillStyle=this.SelectedColor;
@@ -129792,6 +130004,36 @@ function ChartReport()
129792
130004
  }
129793
130005
  }
129794
130006
 
130007
+ this.GetSelectedSymbol=function()
130008
+ {
130009
+ if (this.MultiSelectModel==1)
130010
+ {
130011
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.MultiSelectedRow)) return null;
130012
+
130013
+ var aryData=[];
130014
+ for(var i=0;i<this.MultiSelectedRow.length;++i)
130015
+ {
130016
+ var item=this.Data.Data[this.MultiSelectedRow[i]];
130017
+ if (!item) continue;
130018
+
130019
+ aryData.push(item);
130020
+ }
130021
+
130022
+ return aryData;
130023
+ }
130024
+ else
130025
+ {
130026
+ if (this.SelectedRow<0) return null;
130027
+
130028
+ var index=this.SelectedRow;
130029
+ if (this.SelectedModel==0) //当前屏选中
130030
+ index=this.Data.YOffset+this.SelectedRow;
130031
+
130032
+ var symbol=this.Data.Data[index];
130033
+ return [symbol];
130034
+ }
130035
+ }
130036
+
129795
130037
 
129796
130038
  this.DrawFixedSymbolRow=function(top, dataIndex)
129797
130039
  {
@@ -130117,6 +130359,18 @@ function ChartReport()
130117
130359
  {
130118
130360
  this.FormaDateDrawInfo(column, stock, drawInfo, data);
130119
130361
  }
130362
+ else if (column.Type==REPORT_COLUMN_ID.CHECKBOX_ID)
130363
+ {
130364
+ rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
130365
+ rtItem.Right=rtItem.Left+rtItem.Width;
130366
+ rtItem.Bottom=rtItem.Top+rtItem.Height;
130367
+ drawInfo.Rect=rtItem;
130368
+ drawInfo.Checked=false;
130369
+ drawInfo.Font=`${this.CheckBoxConfig.Size*this.DevicePixelRatio}px ${this.CheckBoxConfig.Family}`;
130370
+ if (stock && IFrameSplitOperator.IsBool(stock.Checked))
130371
+ drawInfo.Checked=stock.Checked;
130372
+ }
130373
+
130120
130374
 
130121
130375
  //拖拽行颜色
130122
130376
  if (rowType==3)
@@ -130130,6 +130384,10 @@ function ChartReport()
130130
130384
  {
130131
130385
  this.DrawIconItem(drawInfo, x, top, textWidth);
130132
130386
  }
130387
+ else if (column.Type==REPORT_COLUMN_ID.CHECKBOX_ID)
130388
+ {
130389
+ this.DrawCheckbox(drawInfo, left, top, itemWidth);
130390
+ }
130133
130391
  else
130134
130392
  {
130135
130393
  if (data.FlashBG && data.FlashBG.Data && column.ID!=undefined)
@@ -130160,6 +130418,12 @@ function ChartReport()
130160
130418
  var tooltipData={ Rect:rtItem, Stock:stock, Index:index, Column:column, RowType:rowType, Type:drawInfo.Tooltip.Type, Data:drawInfo.Tooltip.Data };
130161
130419
  this.TooltipRect.push(tooltipData);
130162
130420
  }
130421
+
130422
+ if (drawInfo.Botton)
130423
+ {
130424
+ var buttonData={ Stock:stock, Index:index, Column:column, Rect:drawInfo.Botton.Rect, Type:drawInfo.Botton.Type };
130425
+ this.ButtonRect.push(buttonData);
130426
+ }
130163
130427
  }
130164
130428
 
130165
130429
  this.DrawCustomText=function(drawInfo, column, left, top, cellWidth)
@@ -130677,6 +130941,36 @@ function ChartReport()
130677
130941
  this.Canvas.font=this.ItemFont;
130678
130942
  }
130679
130943
 
130944
+ this.DrawCheckbox=function(drawInfo, left, top, width)
130945
+ {
130946
+ var textAlign=drawInfo.TextAlign;
130947
+ var size=this.CheckBoxConfig.Size*this.DevicePixelRatio;
130948
+ //var boxWidth=size+this.CheckBoxConfig.Margin.Left+this.CheckBoxConfig.Margin.Right;
130949
+ var x=left+this.CheckBoxConfig.Margin.Left;
130950
+ var y=top+this.RowHeight-this.CheckBoxConfig.Margin.Bottom;
130951
+ if (textAlign=='center') x=left+width/2-size/2;
130952
+ else if (textAlign=='right') x=left+width-this.CheckBoxConfig.Margin.Right;
130953
+
130954
+ this.Canvas.font=drawInfo.Font;
130955
+ this.Canvas.textBaseline="bottom";
130956
+ this.Canvas.textAlign="left";
130957
+ if (drawInfo.Checked===true)
130958
+ {
130959
+ this.Canvas.fillStyle=this.CheckBoxConfig.Checked.Color;
130960
+ this.Canvas.fillText(this.CheckBoxConfig.Checked.Symbol,x,y);
130961
+ }
130962
+ else if (drawInfo.Checked===false)
130963
+ {
130964
+ this.Canvas.fillStyle=this.CheckBoxConfig.Unchecked.Color;
130965
+ this.Canvas.fillText(this.CheckBoxConfig.Unchecked.Symbol,x,y);
130966
+ }
130967
+
130968
+ var rtBox={ Left:x, Bottom:y, Width:size, Height:size };
130969
+ rtBox.Right=rtBox.Left+rtBox.Width;
130970
+ rtBox.Top=rtBox.Bottom-rtBox.Height;
130971
+ drawInfo.Botton={ Rect:rtBox, Type:0 };
130972
+ }
130973
+
130680
130974
  //字体由外面设置
130681
130975
  this.TextEllipsis=function(text, maxWidth, maxText)
130682
130976
  {
@@ -131189,6 +131483,7 @@ function ChartReport()
131189
131483
 
131190
131484
  this.SelectedFixedRow=row.Index;
131191
131485
  this.SelectedRow=-1;
131486
+ this.MultiSelectedRow=[];
131192
131487
 
131193
131488
  return { Type:4, Redraw:bRedraw, Row:row }; //行
131194
131489
  }
@@ -131196,18 +131491,45 @@ function ChartReport()
131196
131491
  var row=this.PtInBody(x,y);
131197
131492
  if (row)
131198
131493
  {
131494
+ var btnStatus={ Redraw:false };
131495
+ this.OnClickButton(x, y, e, btnStatus);
131496
+
131199
131497
  var bRedraw=true;
131200
- if (this.SelectedModel==0)
131498
+ if (this.MultiSelectModel==1)
131201
131499
  {
131202
- if (this.SelectedRow==row.Index) bRedraw=false;
131203
- this.SelectedRow=row.Index;
131500
+ if (e && e.ctrlKey) //多选
131501
+ {
131502
+ var pos=this.MultiSelectedRow.indexOf(row.DataIndex);
131503
+ if (pos>=0) this.MultiSelectedRow.splice(pos,1);
131504
+ else this.MultiSelectedRow.push(row.DataIndex);
131505
+
131506
+ }
131507
+ else if (e && e.shiftKey) //批量多选
131508
+ {
131509
+ this.OnShiftClickRow(row);
131510
+ }
131511
+ else
131512
+ {
131513
+ if (this.MultiSelectedRow.length==1 && this.MultiSelectedRow[0]==row.DataIndex) bRedraw=false;
131514
+ else this.MultiSelectedRow=[row.DataIndex];
131515
+ }
131516
+
131204
131517
  this.SelectedFixedRow=-1;
131205
131518
  }
131206
- else
131519
+ else
131207
131520
  {
131208
- if (this.SelectedRow==row.DataIndex) bRedraw=false;
131209
- this.SelectedRow=row.DataIndex;
131210
- this.SelectedFixedRow=-1;
131521
+ if (this.SelectedModel==0)
131522
+ {
131523
+ if (this.SelectedRow==row.Index) bRedraw=false;
131524
+ this.SelectedRow=row.Index;
131525
+ this.SelectedFixedRow=-1;
131526
+ }
131527
+ else
131528
+ {
131529
+ if (this.SelectedRow==row.DataIndex) bRedraw=false;
131530
+ this.SelectedRow=row.DataIndex;
131531
+ this.SelectedFixedRow=-1;
131532
+ }
131211
131533
  }
131212
131534
 
131213
131535
  var eventID=JSCHART_EVENT_ID.ON_CLICK_REPORT_ROW;
@@ -131215,7 +131537,7 @@ function ChartReport()
131215
131537
 
131216
131538
  this.SendClickEvent(eventID, { Data:row, X:x, Y:y, e:e, Inside:insidePoint, UIElement:uiElement });
131217
131539
 
131218
- return { Type:2, Redraw:bRedraw, Row:row }; //行
131540
+ return { Type:2, Redraw:bRedraw || btnStatus.Redraw, Row:row }; //行
131219
131541
  }
131220
131542
 
131221
131543
  var header=this.PtInHeader(x,y);
@@ -131238,6 +131560,62 @@ function ChartReport()
131238
131560
  return null;
131239
131561
  }
131240
131562
 
131563
+ this.OnShiftClickRow=function(row)
131564
+ {
131565
+ if (this.MultiSelectedRow.length<=0)
131566
+ {
131567
+ this.MultiSelectedRow.push(row.DataIndex);
131568
+ return;
131569
+ }
131570
+
131571
+ var max=null, min=null;
131572
+ for(var i=0;i<this.MultiSelectedRow.length;++i)
131573
+ {
131574
+ var value=this.MultiSelectedRow[i];
131575
+ if (max==null || max<value) max=value;
131576
+ if (min==null || min>value) min=value;
131577
+ if (value==row.DataIndex) //移除
131578
+ {
131579
+ this.MultiSelectedRow.splice(i,1);
131580
+ return;
131581
+ }
131582
+ }
131583
+
131584
+ if (max==min)
131585
+ {
131586
+ var start=row.DataIndex, end=max;
131587
+ if (start>end)
131588
+ {
131589
+ start=max;
131590
+ end=row.DataIndex;
131591
+ }
131592
+
131593
+ this.MultiSelectedRow=[];
131594
+ for(var i=start;i<=end;++i)
131595
+ {
131596
+ this.MultiSelectedRow.push(i);
131597
+ }
131598
+ }
131599
+ else
131600
+ {
131601
+ if (row.DataIndex<=max && row.DataIndex>=min)
131602
+ {
131603
+ this.MultiSelectedRow.push(row.DataIndex);
131604
+ }
131605
+ else
131606
+ {
131607
+ var start=Math.min(row.DataIndex, min);
131608
+ var end=Math.max(row.DataIndex, max);
131609
+ this.MultiSelectedRow=[];
131610
+ for(var i=start;i<=end;++i)
131611
+ {
131612
+ this.MultiSelectedRow.push(i);
131613
+ }
131614
+ }
131615
+ }
131616
+
131617
+ }
131618
+
131241
131619
  this.OnDrawgRow=function(x, y, e) //Type: 5=顶部 6=空白行 2=行 7=底部
131242
131620
  {
131243
131621
  if (!this.Data) return null;
@@ -131274,6 +131652,33 @@ function ChartReport()
131274
131652
  return { Type:7 };
131275
131653
  }
131276
131654
 
131655
+ this.OnClickButton=function(x, y, e, status)
131656
+ {
131657
+ if (e.button!=0) return false;
131658
+
131659
+ var buttonData=this.GetButtonData(x,y);
131660
+ if (!buttonData) return true;
131661
+
131662
+ if (buttonData.Type===0)
131663
+ {
131664
+ var sendData={ Column:buttonData.Column, Index:buttonData.Index, Stock:buttonData.Stock, PreventDefault: false };
131665
+ this.SendClickEvent(JSCHART_EVENT_ID.ON_CLICK_REPORT_CHECKBOX, sendData)
131666
+
131667
+ if (!sendData.PreventDefault)
131668
+ {
131669
+ if (IFrameSplitOperator.IsBool(buttonData.Stock.Checked))
131670
+ buttonData.Stock.Checked=!buttonData.Stock.Checked;
131671
+ else
131672
+ buttonData.Stock.Checked=true;
131673
+ }
131674
+
131675
+ status.Redraw=true;
131676
+ return true;
131677
+ }
131678
+
131679
+ return false;
131680
+ }
131681
+
131277
131682
  this.OnDblClick=function(x,y,e)
131278
131683
  {
131279
131684
  if (!this.Data) return false;
@@ -131511,6 +131916,24 @@ function ChartReport()
131511
131916
  return null;
131512
131917
  }
131513
131918
 
131919
+ this.GetButtonData=function(x,y)
131920
+ {
131921
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.ButtonRect)) return null;
131922
+
131923
+ for(var i=0;i<this.ButtonRect.length;++i)
131924
+ {
131925
+ var item=this.ButtonRect[i];
131926
+
131927
+ var rt=item.Rect;
131928
+ if (!rt) continue;
131929
+
131930
+ if (x>=rt.Left && x<=rt.Right && y>=rt.Top && y<=rt.Bottom)
131931
+ {
131932
+ return { Rect:item.Rect, Stock:item.Stock, Column:item.Column, Index:item.Index, Type:item.Type };
131933
+ }
131934
+ }
131935
+ }
131936
+
131514
131937
  this.PtInHeaderDragBorder=function(x, y)
131515
131938
  {
131516
131939
  if (!this.IsShowHeader) return null;
@@ -137798,6 +138221,7 @@ function JSPopMenu()
137798
138221
 
137799
138222
 
137800
138223
  var rootData={ Root:root, TBody:tbody, Table:table };
138224
+ root.JSMenuData=rootData;
137801
138225
  for(var i=0;i<data.Menu.length;++i)
137802
138226
  {
137803
138227
  var item=data.Menu[i];
@@ -137900,6 +138324,7 @@ function JSPopMenu()
137900
138324
  subTable.appendChild(subTbody);
137901
138325
 
137902
138326
  var subRootData={ Root:subRoot, TBody:subTbody, Table:subTable };
138327
+ subRoot.JSMenuData=subRootData;
137903
138328
  var preTrDom=null;
137904
138329
  for(var i=0;i<item.SubMenu.length;++i)
137905
138330
  {
@@ -138035,6 +138460,17 @@ function JSPopMenu()
138035
138460
  parentItem.PopMenu.style.visibility="hidden";
138036
138461
  if (parentItem.PopRow) parentItem.PopRow.classList.remove(this.SelectedClassName);
138037
138462
 
138463
+ var popMenuData=parentItem.PopMenu.JSMenuData;
138464
+ for(var i=0;i<50;++i) //隐藏子菜单 最多50层
138465
+ {
138466
+ if (!popMenuData) break;
138467
+ if (!popMenuData.PopMenu) break;
138468
+
138469
+ popMenuData.PopMenu.style.visibility="hidden";
138470
+
138471
+ popMenuData=popMenuData.PopMenu;
138472
+ }
138473
+
138038
138474
  parentItem.PopMenu=null;
138039
138475
  parentItem.PopRow=null;
138040
138476
  }
@@ -139238,7 +139674,7 @@ function HQChartScriptWorker()
139238
139674
 
139239
139675
 
139240
139676
 
139241
- var HQCHART_VERSION="1.1.13544";
139677
+ var HQCHART_VERSION="1.1.13554";
139242
139678
 
139243
139679
  function PrintHQChartVersion()
139244
139680
  {