hqchart 1.1.13550 → 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.vue.js +41 -29
- package/package.json +1 -1
- package/src/jscommon/umychart.deal.js +4 -0
- package/src/jscommon/umychart.js +37 -0
- package/src/jscommon/umychart.report.js +366 -20
- 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.uniapp.h5/umychart.uniapp.h5.js +415 -21
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +415 -21
|
@@ -6568,6 +6568,7 @@ var JSCHART_EVENT_ID=
|
|
|
6568
6568
|
ON_CLICK_TREPORT_ROW:127, //左键点击点击T型报价列表
|
|
6569
6569
|
|
|
6570
6570
|
ON_DRAW_REPORT_ROW_BG:140, //报价列表整行背景
|
|
6571
|
+
ON_CLICK_REPORT_CHECKBOX:141, //报价列表checkbox
|
|
6571
6572
|
|
|
6572
6573
|
|
|
6573
6574
|
ON_CHANGE_INDEX:150, //切换指标
|
|
@@ -71208,6 +71209,15 @@ function JSChartResource()
|
|
|
71208
71209
|
BorderColor:'rgba(180,180,180,0.9)',
|
|
71209
71210
|
BGColor:"rgba(234,239,248,0.9)",
|
|
71210
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 },
|
|
71211
71221
|
}
|
|
71212
71222
|
},
|
|
71213
71223
|
|
|
@@ -72223,6 +72233,33 @@ function JSChartResource()
|
|
|
72223
72233
|
if (subItem.BorderColor) dest.VScrollbar.BorderColor=subItem.BorderColor;
|
|
72224
72234
|
if (subItem.BGColor) dest.VScrollbar.BGColor=subItem.BGColor;
|
|
72225
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
|
+
}
|
|
72226
72263
|
|
|
72227
72264
|
}
|
|
72228
72265
|
|
|
@@ -123626,6 +123663,13 @@ function GetBlackStyle()
|
|
|
123626
123663
|
BarColor:"rgba(48,48,48,0.9)",
|
|
123627
123664
|
BorderColor:'rgba(48,48,48,0.9)',
|
|
123628
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)" },
|
|
123629
123673
|
}
|
|
123630
123674
|
},
|
|
123631
123675
|
|
|
@@ -124758,6 +124802,10 @@ function ChartDealList()
|
|
|
124758
124802
|
if (!IFrameSplitOperator.IsNumber(item.DataIndex)) continue;
|
|
124759
124803
|
colItem.DataIndex=item.DataIndex; //柱子数据所在原始数据索引列
|
|
124760
124804
|
}
|
|
124805
|
+
else if (item.Type==DEAL_COLUMN_ID.TIME_ID)
|
|
124806
|
+
{
|
|
124807
|
+
if (IFrameSplitOperator.IsString(item.Foramt)) colItem.Foramt=item.Foramt; //设置时间格式
|
|
124808
|
+
}
|
|
124761
124809
|
|
|
124762
124810
|
this.Column.push(colItem);
|
|
124763
124811
|
}
|
|
@@ -125384,6 +125432,7 @@ function JSReportChart(divElement)
|
|
|
125384
125432
|
if (IFrameSplitOperator.IsBool(option.EnableDragHeader)) chart.EnableDragHeader=option.EnableDragHeader;
|
|
125385
125433
|
if (IFrameSplitOperator.IsNumber(option.WheelPageType)) chart.WheelPageType=option.WheelPageType;
|
|
125386
125434
|
if (IFrameSplitOperator.IsBool(option.PageUpDownCycle)) chart.PageUpDownCycle=option.PageUpDownCycle;
|
|
125435
|
+
|
|
125387
125436
|
|
|
125388
125437
|
if (option.VScrollbar) chart.SetVScrollbar(option.VScrollbar);
|
|
125389
125438
|
if (option.SortInfo)
|
|
@@ -125397,6 +125446,7 @@ function JSReportChart(divElement)
|
|
|
125397
125446
|
if (reportChart)
|
|
125398
125447
|
{
|
|
125399
125448
|
if (IFrameSplitOperator.IsNumber(option.TextOverflowStyle)) reportChart.TextOverflowStyle=option.TextOverflowStyle;
|
|
125449
|
+
if (IFrameSplitOperator.IsNumber(option.MultiSelectModel)) reportChart.MultiSelectModel=option.MultiSelectModel;
|
|
125400
125450
|
}
|
|
125401
125451
|
|
|
125402
125452
|
this.SetChartBorder(chart, option);
|
|
@@ -125960,6 +126010,7 @@ function JSReportChartContainer(uielement)
|
|
|
125960
126010
|
{
|
|
125961
126011
|
chart.SelectedRow=-1;
|
|
125962
126012
|
chart.SelectedFixedRow=-1;
|
|
126013
|
+
chart.MultiSelectedRow=[];
|
|
125963
126014
|
}
|
|
125964
126015
|
}
|
|
125965
126016
|
|
|
@@ -126563,6 +126614,8 @@ function JSReportChartContainer(uielement)
|
|
|
126563
126614
|
|
|
126564
126615
|
if (IFrameSplitOperator.IsNumber(item[35])) stock.Time=item[35]; //时间 hhmm / hhmmss / hhmmss.fff
|
|
126565
126616
|
if (IFrameSplitOperator.IsNumber(item[36])) stock.Date=item[36]; //日期
|
|
126617
|
+
|
|
126618
|
+
if (IFrameSplitOperator.IsBool(item[37])) stock.Checked=item[37];
|
|
126566
126619
|
}
|
|
126567
126620
|
|
|
126568
126621
|
|
|
@@ -126990,6 +127043,12 @@ function JSReportChartContainer(uielement)
|
|
|
126990
127043
|
}
|
|
126991
127044
|
else
|
|
126992
127045
|
{
|
|
127046
|
+
var bottonData=report.GetButtonData(x,y)
|
|
127047
|
+
if (bottonData)
|
|
127048
|
+
{
|
|
127049
|
+
mouseStatus={ Cursor:"pointer", Name:"Botton"};
|
|
127050
|
+
}
|
|
127051
|
+
|
|
126993
127052
|
var tooltipData=report.GetTooltipData(x,y); //单元格提示信息
|
|
126994
127053
|
if (tooltipData)
|
|
126995
127054
|
{
|
|
@@ -127795,6 +127854,100 @@ function JSReportChartContainer(uielement)
|
|
|
127795
127854
|
|
|
127796
127855
|
var result={ Redraw:false, Update:false }; //Redraw=重绘, Update=更新数据
|
|
127797
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
|
+
|
|
127798
127951
|
|
|
127799
127952
|
if (chart.SelectedModel==0) //不可翻页模式, 只能在当前页移动
|
|
127800
127953
|
{
|
|
@@ -128767,6 +128920,13 @@ var REPORT_COLUMN_ID=
|
|
|
128767
128920
|
|
|
128768
128921
|
TIME_ID:31, //时间 hhmmss / hhmm / hhmmss.fff
|
|
128769
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,
|
|
128770
128930
|
|
|
128771
128931
|
|
|
128772
128932
|
SYMBOL_NAME_ID:99,
|
|
@@ -128841,6 +129001,10 @@ function ChartReport()
|
|
|
128841
129001
|
this.SelectedFixedRow=-1; //选中固定行ID
|
|
128842
129002
|
this.IsDrawBorder=1; //是否绘制单元格边框
|
|
128843
129003
|
|
|
129004
|
+
//多选模式
|
|
129005
|
+
this.MultiSelectModel=0; //0=禁用 1=开启
|
|
129006
|
+
this.MultiSelectedRow=[]; //选中行
|
|
129007
|
+
|
|
128844
129008
|
this.ShowSymbol=[]; //显示的股票列表 { Index:序号(排序用), Symbol:股票代码 }
|
|
128845
129009
|
this.DragRow; //拖拽行
|
|
128846
129010
|
|
|
@@ -128940,6 +129104,8 @@ function ChartReport()
|
|
|
128940
129104
|
DistanceWidth:g_JSChartResource.Report.KLine.DistanceWidth
|
|
128941
129105
|
}
|
|
128942
129106
|
|
|
129107
|
+
this.CheckBoxConfig=CloneData(g_JSChartResource.Report.CheckBox);
|
|
129108
|
+
|
|
128943
129109
|
//股票代码+股票名称
|
|
128944
129110
|
this.ItemSymbolFontConfig={Size:g_JSChartResource.Report.Item.SymbolFont.Size, Name:g_JSChartResource.Report.Item.SymbolFont.Name};
|
|
128945
129111
|
this.ItemNameFontConfg={Size:g_JSChartResource.Report.Item.NameFont.Size, Name:g_JSChartResource.Report.Item.NameFont.Name};
|
|
@@ -128958,6 +129124,7 @@ function ChartReport()
|
|
|
128958
129124
|
this.RowHeight=0; //行高度
|
|
128959
129125
|
this.BottomToolbarHeight=0; //底部工具条高度
|
|
128960
129126
|
this.IsShowAllColumn=false; //是否已显示所有列
|
|
129127
|
+
this.DevicePixelRatio=GetDevicePixelRatio(); //分辨率
|
|
128961
129128
|
|
|
128962
129129
|
//{
|
|
128963
129130
|
// Type:列id, Title:标题, TextAlign:文字对齐方式, MaxText:文字最大宽度 , TextColor:文字颜色, Sort:0=不支持排序 1=本地排序 0=远程排序,
|
|
@@ -128978,8 +129145,13 @@ function ChartReport()
|
|
|
128978
129145
|
// { Text, Color, Title:, TitleColor, Space, Margin:{ Left, Top, Right, Bottom }}
|
|
128979
129146
|
this.TooltipRect=[];
|
|
128980
129147
|
|
|
129148
|
+
//{ Rect:rtItem, Type: 0=checkedbox, 1=button, 2=link , Stock, Index:index, Column:column }
|
|
129149
|
+
this.ButtonRect=[];
|
|
129150
|
+
|
|
128981
129151
|
this.ReloadResource=function(resource)
|
|
128982
129152
|
{
|
|
129153
|
+
this.DevicePixelRatio=GetDevicePixelRatio()
|
|
129154
|
+
|
|
128983
129155
|
this.UpColor=g_JSChartResource.Report.UpTextColor;
|
|
128984
129156
|
this.DownColor=g_JSChartResource.Report.DownTextColor;
|
|
128985
129157
|
this.UnchagneColor=g_JSChartResource.Report.UnchagneTextColor;
|
|
@@ -129243,6 +129415,8 @@ function ChartReport()
|
|
|
129243
129415
|
{ Type:REPORT_COLUMN_ID.TIME_ID, Title:"时间", TextAlign:"left", ValueType:0, TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"99:99:99.999" },
|
|
129244
129416
|
{ Type:REPORT_COLUMN_ID.DATE_ID, Title:"日期", TextAlign:"left", FormatType:0, TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999-99-99" },
|
|
129245
129417
|
|
|
129418
|
+
{ Type:REPORT_COLUMN_ID.CHECKBOX_ID, Title:"", TextAlign:"center", FixedWidth:20*GetDevicePixelRatio() }
|
|
129419
|
+
|
|
129246
129420
|
|
|
129247
129421
|
];
|
|
129248
129422
|
|
|
@@ -129268,7 +129442,9 @@ function ChartReport()
|
|
|
129268
129442
|
{
|
|
129269
129443
|
this.ShowSymbol=[];
|
|
129270
129444
|
this.TooltipRect=[];
|
|
129271
|
-
|
|
129445
|
+
this.ButtonRect=[];
|
|
129446
|
+
this.DevicePixelRatio=GetDevicePixelRatio()
|
|
129447
|
+
|
|
129272
129448
|
if (this.GlobalOption) this.GlobalOption.FlashBGCount=0;
|
|
129273
129449
|
|
|
129274
129450
|
if (this.SizeChange) this.CalculateSize();
|
|
@@ -129320,7 +129496,14 @@ function ChartReport()
|
|
|
129320
129496
|
|
|
129321
129497
|
this.GetCurrentPageStatus=function() //{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
|
|
129322
129498
|
{
|
|
129323
|
-
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
|
+
|
|
129324
129507
|
if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
|
|
129325
129508
|
{
|
|
129326
129509
|
result.End=this.Data.YOffset+this.RowCount-1;
|
|
@@ -129744,19 +129927,31 @@ function ChartReport()
|
|
|
129744
129927
|
|
|
129745
129928
|
var eventDrawBG=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_REPORT_ROW_BG);
|
|
129746
129929
|
var selectedSymbol=this.GetSelectedSymbol();
|
|
129930
|
+
|
|
129931
|
+
var setSelected;
|
|
129932
|
+
if (this.MultiSelectModel==1) setSelected=new Set(this.MultiSelectedRow);
|
|
129933
|
+
|
|
129747
129934
|
for(var i=this.Data.YOffset, j=0; i<this.Data.Data.length && j<this.RowCount ;++i, ++j)
|
|
129748
129935
|
{
|
|
129749
129936
|
var symbol=this.Data.Data[i];
|
|
129750
129937
|
|
|
129751
129938
|
var bFillRow=false;
|
|
129752
|
-
if (this.
|
|
129939
|
+
if (this.MultiSelectModel==1)
|
|
129753
129940
|
{
|
|
129754
|
-
if (
|
|
129941
|
+
if (setSelected.has(i)) bFillRow=true;
|
|
129755
129942
|
}
|
|
129756
129943
|
else
|
|
129757
129944
|
{
|
|
129758
|
-
if (
|
|
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
|
+
}
|
|
129759
129953
|
}
|
|
129954
|
+
|
|
129760
129955
|
|
|
129761
129956
|
if (this.DragRow)
|
|
129762
129957
|
{
|
|
@@ -129786,7 +129981,7 @@ function ChartReport()
|
|
|
129786
129981
|
if (eventDrawBG && eventDrawBG.Callback)
|
|
129787
129982
|
{
|
|
129788
129983
|
//Out:{ BGColor: }
|
|
129789
|
-
var sendData={ RowIndex:i, Symbol:symbol, Out:null, Selected:selectedSymbol };
|
|
129984
|
+
var sendData={ RowIndex:i, Symbol:symbol, Out:null, Selected:selectedSymbol, MultiSelectModel:this.MultiSelectModel };
|
|
129790
129985
|
eventDrawBG.Callback(eventDrawBG,sendData,this);
|
|
129791
129986
|
if (sendData.Out && sendData.Out.BGColor)
|
|
129792
129987
|
{
|
|
@@ -129811,14 +130006,32 @@ function ChartReport()
|
|
|
129811
130006
|
|
|
129812
130007
|
this.GetSelectedSymbol=function()
|
|
129813
130008
|
{
|
|
129814
|
-
if (this.
|
|
130009
|
+
if (this.MultiSelectModel==1)
|
|
130010
|
+
{
|
|
130011
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.MultiSelectedRow)) return null;
|
|
129815
130012
|
|
|
129816
|
-
|
|
129817
|
-
|
|
129818
|
-
|
|
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
|
+
}
|
|
129819
130021
|
|
|
129820
|
-
|
|
129821
|
-
|
|
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
|
+
}
|
|
129822
130035
|
}
|
|
129823
130036
|
|
|
129824
130037
|
|
|
@@ -130146,6 +130359,18 @@ function ChartReport()
|
|
|
130146
130359
|
{
|
|
130147
130360
|
this.FormaDateDrawInfo(column, stock, drawInfo, data);
|
|
130148
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
|
+
|
|
130149
130374
|
|
|
130150
130375
|
//拖拽行颜色
|
|
130151
130376
|
if (rowType==3)
|
|
@@ -130159,6 +130384,10 @@ function ChartReport()
|
|
|
130159
130384
|
{
|
|
130160
130385
|
this.DrawIconItem(drawInfo, x, top, textWidth);
|
|
130161
130386
|
}
|
|
130387
|
+
else if (column.Type==REPORT_COLUMN_ID.CHECKBOX_ID)
|
|
130388
|
+
{
|
|
130389
|
+
this.DrawCheckbox(drawInfo, left, top, itemWidth);
|
|
130390
|
+
}
|
|
130162
130391
|
else
|
|
130163
130392
|
{
|
|
130164
130393
|
if (data.FlashBG && data.FlashBG.Data && column.ID!=undefined)
|
|
@@ -130189,6 +130418,12 @@ function ChartReport()
|
|
|
130189
130418
|
var tooltipData={ Rect:rtItem, Stock:stock, Index:index, Column:column, RowType:rowType, Type:drawInfo.Tooltip.Type, Data:drawInfo.Tooltip.Data };
|
|
130190
130419
|
this.TooltipRect.push(tooltipData);
|
|
130191
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
|
+
}
|
|
130192
130427
|
}
|
|
130193
130428
|
|
|
130194
130429
|
this.DrawCustomText=function(drawInfo, column, left, top, cellWidth)
|
|
@@ -130706,6 +130941,36 @@ function ChartReport()
|
|
|
130706
130941
|
this.Canvas.font=this.ItemFont;
|
|
130707
130942
|
}
|
|
130708
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
|
+
|
|
130709
130974
|
//字体由外面设置
|
|
130710
130975
|
this.TextEllipsis=function(text, maxWidth, maxText)
|
|
130711
130976
|
{
|
|
@@ -131218,6 +131483,7 @@ function ChartReport()
|
|
|
131218
131483
|
|
|
131219
131484
|
this.SelectedFixedRow=row.Index;
|
|
131220
131485
|
this.SelectedRow=-1;
|
|
131486
|
+
this.MultiSelectedRow=[];
|
|
131221
131487
|
|
|
131222
131488
|
return { Type:4, Redraw:bRedraw, Row:row }; //行
|
|
131223
131489
|
}
|
|
@@ -131225,18 +131491,45 @@ function ChartReport()
|
|
|
131225
131491
|
var row=this.PtInBody(x,y);
|
|
131226
131492
|
if (row)
|
|
131227
131493
|
{
|
|
131494
|
+
var btnStatus={ Redraw:false };
|
|
131495
|
+
this.OnClickButton(x, y, e, btnStatus);
|
|
131496
|
+
|
|
131228
131497
|
var bRedraw=true;
|
|
131229
|
-
if (this.
|
|
131498
|
+
if (this.MultiSelectModel==1)
|
|
131230
131499
|
{
|
|
131231
|
-
if (
|
|
131232
|
-
|
|
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
|
+
|
|
131233
131517
|
this.SelectedFixedRow=-1;
|
|
131234
131518
|
}
|
|
131235
|
-
else
|
|
131519
|
+
else
|
|
131236
131520
|
{
|
|
131237
|
-
if (this.
|
|
131238
|
-
|
|
131239
|
-
|
|
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
|
+
}
|
|
131240
131533
|
}
|
|
131241
131534
|
|
|
131242
131535
|
var eventID=JSCHART_EVENT_ID.ON_CLICK_REPORT_ROW;
|
|
@@ -131244,7 +131537,7 @@ function ChartReport()
|
|
|
131244
131537
|
|
|
131245
131538
|
this.SendClickEvent(eventID, { Data:row, X:x, Y:y, e:e, Inside:insidePoint, UIElement:uiElement });
|
|
131246
131539
|
|
|
131247
|
-
return { Type:2, Redraw:bRedraw, Row:row }; //行
|
|
131540
|
+
return { Type:2, Redraw:bRedraw || btnStatus.Redraw, Row:row }; //行
|
|
131248
131541
|
}
|
|
131249
131542
|
|
|
131250
131543
|
var header=this.PtInHeader(x,y);
|
|
@@ -131267,6 +131560,62 @@ function ChartReport()
|
|
|
131267
131560
|
return null;
|
|
131268
131561
|
}
|
|
131269
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
|
+
|
|
131270
131619
|
this.OnDrawgRow=function(x, y, e) //Type: 5=顶部 6=空白行 2=行 7=底部
|
|
131271
131620
|
{
|
|
131272
131621
|
if (!this.Data) return null;
|
|
@@ -131303,6 +131652,33 @@ function ChartReport()
|
|
|
131303
131652
|
return { Type:7 };
|
|
131304
131653
|
}
|
|
131305
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
|
+
|
|
131306
131682
|
this.OnDblClick=function(x,y,e)
|
|
131307
131683
|
{
|
|
131308
131684
|
if (!this.Data) return false;
|
|
@@ -131540,6 +131916,24 @@ function ChartReport()
|
|
|
131540
131916
|
return null;
|
|
131541
131917
|
}
|
|
131542
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
|
+
|
|
131543
131937
|
this.PtInHeaderDragBorder=function(x, y)
|
|
131544
131938
|
{
|
|
131545
131939
|
if (!this.IsShowHeader) return null;
|
|
@@ -139280,7 +139674,7 @@ function HQChartScriptWorker()
|
|
|
139280
139674
|
|
|
139281
139675
|
|
|
139282
139676
|
|
|
139283
|
-
var HQCHART_VERSION="1.1.
|
|
139677
|
+
var HQCHART_VERSION="1.1.13554";
|
|
139284
139678
|
|
|
139285
139679
|
function PrintHQChartVersion()
|
|
139286
139680
|
{
|