hqchart 1.1.13550 → 1.1.13558
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 +47 -34
- package/package.json +1 -1
- package/src/jscommon/umychart.deal.js +4 -0
- package/src/jscommon/umychart.js +45 -3
- package/src/jscommon/umychart.report.js +405 -21
- 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 +462 -25
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +462 -25
|
@@ -182,6 +182,7 @@ function JSReportChart(divElement)
|
|
|
182
182
|
if (IFrameSplitOperator.IsBool(option.EnableDragHeader)) chart.EnableDragHeader=option.EnableDragHeader;
|
|
183
183
|
if (IFrameSplitOperator.IsNumber(option.WheelPageType)) chart.WheelPageType=option.WheelPageType;
|
|
184
184
|
if (IFrameSplitOperator.IsBool(option.PageUpDownCycle)) chart.PageUpDownCycle=option.PageUpDownCycle;
|
|
185
|
+
|
|
185
186
|
|
|
186
187
|
if (option.VScrollbar) chart.SetVScrollbar(option.VScrollbar);
|
|
187
188
|
if (option.SortInfo)
|
|
@@ -195,6 +196,7 @@ function JSReportChart(divElement)
|
|
|
195
196
|
if (reportChart)
|
|
196
197
|
{
|
|
197
198
|
if (IFrameSplitOperator.IsNumber(option.TextOverflowStyle)) reportChart.TextOverflowStyle=option.TextOverflowStyle;
|
|
199
|
+
if (IFrameSplitOperator.IsNumber(option.MultiSelectModel)) reportChart.MultiSelectModel=option.MultiSelectModel;
|
|
198
200
|
}
|
|
199
201
|
|
|
200
202
|
this.SetChartBorder(chart, option);
|
|
@@ -758,6 +760,7 @@ function JSReportChartContainer(uielement)
|
|
|
758
760
|
{
|
|
759
761
|
chart.SelectedRow=-1;
|
|
760
762
|
chart.SelectedFixedRow=-1;
|
|
763
|
+
chart.MultiSelectedRow=[];
|
|
761
764
|
}
|
|
762
765
|
}
|
|
763
766
|
|
|
@@ -1361,6 +1364,8 @@ function JSReportChartContainer(uielement)
|
|
|
1361
1364
|
|
|
1362
1365
|
if (IFrameSplitOperator.IsNumber(item[35])) stock.Time=item[35]; //时间 hhmm / hhmmss / hhmmss.fff
|
|
1363
1366
|
if (IFrameSplitOperator.IsNumber(item[36])) stock.Date=item[36]; //日期
|
|
1367
|
+
|
|
1368
|
+
if (IFrameSplitOperator.IsBool(item[37])) stock.Checked=item[37];
|
|
1364
1369
|
}
|
|
1365
1370
|
|
|
1366
1371
|
|
|
@@ -1788,6 +1793,12 @@ function JSReportChartContainer(uielement)
|
|
|
1788
1793
|
}
|
|
1789
1794
|
else
|
|
1790
1795
|
{
|
|
1796
|
+
var bottonData=report.GetButtonData(x,y)
|
|
1797
|
+
if (bottonData)
|
|
1798
|
+
{
|
|
1799
|
+
mouseStatus={ Cursor:"pointer", Name:"Botton"};
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1791
1802
|
var tooltipData=report.GetTooltipData(x,y); //单元格提示信息
|
|
1792
1803
|
if (tooltipData)
|
|
1793
1804
|
{
|
|
@@ -2593,6 +2604,100 @@ function JSReportChartContainer(uielement)
|
|
|
2593
2604
|
|
|
2594
2605
|
var result={ Redraw:false, Update:false }; //Redraw=重绘, Update=更新数据
|
|
2595
2606
|
|
|
2607
|
+
if (chart.MultiSelectModel==1)
|
|
2608
|
+
{
|
|
2609
|
+
var pageStatus=chart.GetCurrentPageStatus();
|
|
2610
|
+
if (IFrameSplitOperator.IsNonEmptyArray(pageStatus.MultiSelectedRow))
|
|
2611
|
+
{
|
|
2612
|
+
var selected=pageStatus.MultiSelectedRow[0];
|
|
2613
|
+
if (step>0)
|
|
2614
|
+
{
|
|
2615
|
+
if (selected==this.Data.Data.length-1) return result;
|
|
2616
|
+
|
|
2617
|
+
if (selected<0 || selected<pageStatus.Start || selected>pageStatus.End)
|
|
2618
|
+
{
|
|
2619
|
+
chart.MultiSelectedRow=[pageStatus.Start];
|
|
2620
|
+
result.Redraw=true;
|
|
2621
|
+
return result;
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2624
|
+
var offset=this.Data.YOffset;
|
|
2625
|
+
for(var i=0;i<step;++i)
|
|
2626
|
+
{
|
|
2627
|
+
++selected;
|
|
2628
|
+
if (selected>pageStatus.End) ++offset;
|
|
2629
|
+
|
|
2630
|
+
if (selected>=this.Data.Data.length)
|
|
2631
|
+
{
|
|
2632
|
+
selected=0;
|
|
2633
|
+
offset=0;
|
|
2634
|
+
}
|
|
2635
|
+
}
|
|
2636
|
+
|
|
2637
|
+
result.Redraw=true;
|
|
2638
|
+
result.Update=(offset!=this.Data.YOffset);
|
|
2639
|
+
|
|
2640
|
+
chart.MultiSelectedRow=[selected];
|
|
2641
|
+
this.Data.YOffset=offset;
|
|
2642
|
+
|
|
2643
|
+
return result;
|
|
2644
|
+
|
|
2645
|
+
}
|
|
2646
|
+
else if (step<0)
|
|
2647
|
+
{
|
|
2648
|
+
if (selected==0) return result;
|
|
2649
|
+
|
|
2650
|
+
if (selected<0 || selected<pageStatus.Start || selected>pageStatus.End)
|
|
2651
|
+
{
|
|
2652
|
+
chart.MultiSelectedRow=[pageStatus.End];
|
|
2653
|
+
result.Redraw=true;
|
|
2654
|
+
return result;
|
|
2655
|
+
}
|
|
2656
|
+
|
|
2657
|
+
step=Math.abs(step);
|
|
2658
|
+
var offset=this.Data.YOffset;
|
|
2659
|
+
for(var i=0;i<step;++i)
|
|
2660
|
+
{
|
|
2661
|
+
--selected;
|
|
2662
|
+
if (selected<pageStatus.Start) --offset;
|
|
2663
|
+
|
|
2664
|
+
if (selected<0)
|
|
2665
|
+
{
|
|
2666
|
+
selected=this.Data.Data.length-1;
|
|
2667
|
+
offset=this.Data.Data.length-pageSize;
|
|
2668
|
+
if (offset<0) offset=0;
|
|
2669
|
+
}
|
|
2670
|
+
}
|
|
2671
|
+
|
|
2672
|
+
result.Redraw=true;
|
|
2673
|
+
result.Update=(offset!=this.Data.YOffset);
|
|
2674
|
+
|
|
2675
|
+
chart.MultiSelectedRow=[selected];
|
|
2676
|
+
this.Data.YOffset=offset;
|
|
2677
|
+
|
|
2678
|
+
return result;
|
|
2679
|
+
}
|
|
2680
|
+
else
|
|
2681
|
+
{
|
|
2682
|
+
return null;
|
|
2683
|
+
}
|
|
2684
|
+
|
|
2685
|
+
return result;
|
|
2686
|
+
}
|
|
2687
|
+
else
|
|
2688
|
+
{
|
|
2689
|
+
var selected=-1;
|
|
2690
|
+
if (step>0) selected=pageStatus.Start;
|
|
2691
|
+
else if (step<0) selected=pageStatus.End;
|
|
2692
|
+
else return null;
|
|
2693
|
+
|
|
2694
|
+
chart.MultiSelectedRow=[selected];
|
|
2695
|
+
result.Redraw=true;
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2698
|
+
return result;
|
|
2699
|
+
}
|
|
2700
|
+
|
|
2596
2701
|
|
|
2597
2702
|
if (chart.SelectedModel==0) //不可翻页模式, 只能在当前页移动
|
|
2598
2703
|
{
|
|
@@ -3565,7 +3670,8 @@ var REPORT_COLUMN_ID=
|
|
|
3565
3670
|
|
|
3566
3671
|
TIME_ID:31, //时间 hhmmss / hhmm / hhmmss.fff
|
|
3567
3672
|
DATE_ID:32, //日期
|
|
3568
|
-
|
|
3673
|
+
|
|
3674
|
+
CHECKBOX_ID:33, //单选框
|
|
3569
3675
|
|
|
3570
3676
|
SYMBOL_NAME_ID:99,
|
|
3571
3677
|
|
|
@@ -3573,6 +3679,7 @@ var REPORT_COLUMN_ID=
|
|
|
3573
3679
|
CUSTOM_NUMBER_TEXT_ID:101, //自定义数值型
|
|
3574
3680
|
CUSTOM_DATETIME_TEXT_ID:102, //自定义日期类型
|
|
3575
3681
|
CUSTOM_ICON_ID:103, //自定义图标
|
|
3682
|
+
CUSTOM_CHECKBOX_ID:104, //自定义checkbox
|
|
3576
3683
|
}
|
|
3577
3684
|
|
|
3578
3685
|
var MAP_COLUMN_FIELD=new Map([
|
|
@@ -3639,6 +3746,10 @@ function ChartReport()
|
|
|
3639
3746
|
this.SelectedFixedRow=-1; //选中固定行ID
|
|
3640
3747
|
this.IsDrawBorder=1; //是否绘制单元格边框
|
|
3641
3748
|
|
|
3749
|
+
//多选模式
|
|
3750
|
+
this.MultiSelectModel=0; //0=禁用 1=开启
|
|
3751
|
+
this.MultiSelectedRow=[]; //选中行
|
|
3752
|
+
|
|
3642
3753
|
this.ShowSymbol=[]; //显示的股票列表 { Index:序号(排序用), Symbol:股票代码 }
|
|
3643
3754
|
this.DragRow; //拖拽行
|
|
3644
3755
|
|
|
@@ -3738,6 +3849,8 @@ function ChartReport()
|
|
|
3738
3849
|
DistanceWidth:g_JSChartResource.Report.KLine.DistanceWidth
|
|
3739
3850
|
}
|
|
3740
3851
|
|
|
3852
|
+
this.CheckBoxConfig=CloneData(g_JSChartResource.Report.CheckBox);
|
|
3853
|
+
|
|
3741
3854
|
//股票代码+股票名称
|
|
3742
3855
|
this.ItemSymbolFontConfig={Size:g_JSChartResource.Report.Item.SymbolFont.Size, Name:g_JSChartResource.Report.Item.SymbolFont.Name};
|
|
3743
3856
|
this.ItemNameFontConfg={Size:g_JSChartResource.Report.Item.NameFont.Size, Name:g_JSChartResource.Report.Item.NameFont.Name};
|
|
@@ -3756,6 +3869,7 @@ function ChartReport()
|
|
|
3756
3869
|
this.RowHeight=0; //行高度
|
|
3757
3870
|
this.BottomToolbarHeight=0; //底部工具条高度
|
|
3758
3871
|
this.IsShowAllColumn=false; //是否已显示所有列
|
|
3872
|
+
this.DevicePixelRatio=GetDevicePixelRatio(); //分辨率
|
|
3759
3873
|
|
|
3760
3874
|
//{
|
|
3761
3875
|
// Type:列id, Title:标题, TextAlign:文字对齐方式, MaxText:文字最大宽度 , TextColor:文字颜色, Sort:0=不支持排序 1=本地排序 0=远程排序,
|
|
@@ -3776,8 +3890,13 @@ function ChartReport()
|
|
|
3776
3890
|
// { Text, Color, Title:, TitleColor, Space, Margin:{ Left, Top, Right, Bottom }}
|
|
3777
3891
|
this.TooltipRect=[];
|
|
3778
3892
|
|
|
3893
|
+
//{ Rect:rtItem, Type: 0=checkedbox, 1=button, 2=link , Stock, Index:index, Column:column }
|
|
3894
|
+
this.ButtonRect=[];
|
|
3895
|
+
|
|
3779
3896
|
this.ReloadResource=function(resource)
|
|
3780
3897
|
{
|
|
3898
|
+
this.DevicePixelRatio=GetDevicePixelRatio()
|
|
3899
|
+
|
|
3781
3900
|
this.UpColor=g_JSChartResource.Report.UpTextColor;
|
|
3782
3901
|
this.DownColor=g_JSChartResource.Report.DownTextColor;
|
|
3783
3902
|
this.UnchagneColor=g_JSChartResource.Report.UnchagneTextColor;
|
|
@@ -3929,6 +4048,14 @@ function ChartReport()
|
|
|
3929
4048
|
if (IFrameSplitOperator.IsNumber(item.ValueType)) colItem.FormatType=item.ValueType; //输出样式
|
|
3930
4049
|
|
|
3931
4050
|
}
|
|
4051
|
+
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID)
|
|
4052
|
+
{
|
|
4053
|
+
if (!IFrameSplitOperator.IsNumber(item.DataIndex) && !IFrameSplitOperator.IsNumber(item.BlockIndex)) continue;
|
|
4054
|
+
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
4055
|
+
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
4056
|
+
if (item.CheckBox) colItem.CheckBox=CloneData(item.CheckBox);
|
|
4057
|
+
else colItem.CheckBox=CloneData(g_JSChartResource.Report.CheckBox);
|
|
4058
|
+
}
|
|
3932
4059
|
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID)
|
|
3933
4060
|
{
|
|
3934
4061
|
|
|
@@ -3945,6 +4072,7 @@ function ChartReport()
|
|
|
3945
4072
|
{
|
|
3946
4073
|
if (IFrameSplitOperator.IsNumber(item.FormatType)) colItem.FormatType=item.FormatType;
|
|
3947
4074
|
}
|
|
4075
|
+
|
|
3948
4076
|
|
|
3949
4077
|
this.Column.push(colItem);
|
|
3950
4078
|
}
|
|
@@ -4041,6 +4169,10 @@ function ChartReport()
|
|
|
4041
4169
|
{ Type:REPORT_COLUMN_ID.TIME_ID, Title:"时间", TextAlign:"left", ValueType:0, TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"99:99:99.999" },
|
|
4042
4170
|
{ Type:REPORT_COLUMN_ID.DATE_ID, Title:"日期", TextAlign:"left", FormatType:0, TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999-99-99" },
|
|
4043
4171
|
|
|
4172
|
+
{ Type:REPORT_COLUMN_ID.CHECKBOX_ID, Title:"", TextAlign:"center", FixedWidth:20*GetDevicePixelRatio() },
|
|
4173
|
+
|
|
4174
|
+
{ Type:REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID, Title:"", TextAlign:"center", FixedWidth:20*GetDevicePixelRatio() },
|
|
4175
|
+
|
|
4044
4176
|
|
|
4045
4177
|
];
|
|
4046
4178
|
|
|
@@ -4066,7 +4198,9 @@ function ChartReport()
|
|
|
4066
4198
|
{
|
|
4067
4199
|
this.ShowSymbol=[];
|
|
4068
4200
|
this.TooltipRect=[];
|
|
4069
|
-
|
|
4201
|
+
this.ButtonRect=[];
|
|
4202
|
+
this.DevicePixelRatio=GetDevicePixelRatio()
|
|
4203
|
+
|
|
4070
4204
|
if (this.GlobalOption) this.GlobalOption.FlashBGCount=0;
|
|
4071
4205
|
|
|
4072
4206
|
if (this.SizeChange) this.CalculateSize();
|
|
@@ -4118,7 +4252,14 @@ function ChartReport()
|
|
|
4118
4252
|
|
|
4119
4253
|
this.GetCurrentPageStatus=function() //{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
|
|
4120
4254
|
{
|
|
4121
|
-
var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRow:this.SelectedRow, IsSinglePage:false, DataCount:0 };
|
|
4255
|
+
var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRow:this.SelectedRow, IsSinglePage:false, DataCount:0, MultiSelectModel:this.MultiSelectModel };
|
|
4256
|
+
if (this.MultiSelectModel==1)
|
|
4257
|
+
{
|
|
4258
|
+
result.SelectedRow=-1;
|
|
4259
|
+
result.MultiSelectedRow=this.MultiSelectedRow.slice();
|
|
4260
|
+
result.MultiSelectedRow.sort((left, right)=>{ return left>right; });
|
|
4261
|
+
}
|
|
4262
|
+
|
|
4122
4263
|
if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
|
|
4123
4264
|
{
|
|
4124
4265
|
result.End=this.Data.YOffset+this.RowCount-1;
|
|
@@ -4542,19 +4683,31 @@ function ChartReport()
|
|
|
4542
4683
|
|
|
4543
4684
|
var eventDrawBG=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_REPORT_ROW_BG);
|
|
4544
4685
|
var selectedSymbol=this.GetSelectedSymbol();
|
|
4686
|
+
|
|
4687
|
+
var setSelected;
|
|
4688
|
+
if (this.MultiSelectModel==1) setSelected=new Set(this.MultiSelectedRow);
|
|
4689
|
+
|
|
4545
4690
|
for(var i=this.Data.YOffset, j=0; i<this.Data.Data.length && j<this.RowCount ;++i, ++j)
|
|
4546
4691
|
{
|
|
4547
4692
|
var symbol=this.Data.Data[i];
|
|
4548
4693
|
|
|
4549
4694
|
var bFillRow=false;
|
|
4550
|
-
if (this.
|
|
4695
|
+
if (this.MultiSelectModel==1)
|
|
4551
4696
|
{
|
|
4552
|
-
if (
|
|
4697
|
+
if (setSelected.has(i)) bFillRow=true;
|
|
4553
4698
|
}
|
|
4554
4699
|
else
|
|
4555
4700
|
{
|
|
4556
|
-
if (
|
|
4701
|
+
if (this.SelectedModel==0)
|
|
4702
|
+
{
|
|
4703
|
+
if (j==this.SelectedRow) bFillRow=true; //选中行
|
|
4704
|
+
}
|
|
4705
|
+
else
|
|
4706
|
+
{
|
|
4707
|
+
if (i==this.SelectedRow) bFillRow=true; //选中行
|
|
4708
|
+
}
|
|
4557
4709
|
}
|
|
4710
|
+
|
|
4558
4711
|
|
|
4559
4712
|
if (this.DragRow)
|
|
4560
4713
|
{
|
|
@@ -4584,7 +4737,7 @@ function ChartReport()
|
|
|
4584
4737
|
if (eventDrawBG && eventDrawBG.Callback)
|
|
4585
4738
|
{
|
|
4586
4739
|
//Out:{ BGColor: }
|
|
4587
|
-
var sendData={ RowIndex:i, Symbol:symbol, Out:null, Selected:selectedSymbol };
|
|
4740
|
+
var sendData={ RowIndex:i, Symbol:symbol, Out:null, Selected:selectedSymbol, MultiSelectModel:this.MultiSelectModel };
|
|
4588
4741
|
eventDrawBG.Callback(eventDrawBG,sendData,this);
|
|
4589
4742
|
if (sendData.Out && sendData.Out.BGColor)
|
|
4590
4743
|
{
|
|
@@ -4609,14 +4762,32 @@ function ChartReport()
|
|
|
4609
4762
|
|
|
4610
4763
|
this.GetSelectedSymbol=function()
|
|
4611
4764
|
{
|
|
4612
|
-
if (this.
|
|
4765
|
+
if (this.MultiSelectModel==1)
|
|
4766
|
+
{
|
|
4767
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.MultiSelectedRow)) return null;
|
|
4613
4768
|
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4769
|
+
var aryData=[];
|
|
4770
|
+
for(var i=0;i<this.MultiSelectedRow.length;++i)
|
|
4771
|
+
{
|
|
4772
|
+
var item=this.Data.Data[this.MultiSelectedRow[i]];
|
|
4773
|
+
if (!item) continue;
|
|
4774
|
+
|
|
4775
|
+
aryData.push(item);
|
|
4776
|
+
}
|
|
4777
|
+
|
|
4778
|
+
return aryData;
|
|
4779
|
+
}
|
|
4780
|
+
else
|
|
4781
|
+
{
|
|
4782
|
+
if (this.SelectedRow<0) return null;
|
|
4617
4783
|
|
|
4618
|
-
|
|
4619
|
-
|
|
4784
|
+
var index=this.SelectedRow;
|
|
4785
|
+
if (this.SelectedModel==0) //当前屏选中
|
|
4786
|
+
index=this.Data.YOffset+this.SelectedRow;
|
|
4787
|
+
|
|
4788
|
+
var symbol=this.Data.Data[index];
|
|
4789
|
+
return [symbol];
|
|
4790
|
+
}
|
|
4620
4791
|
}
|
|
4621
4792
|
|
|
4622
4793
|
|
|
@@ -4944,6 +5115,29 @@ function ChartReport()
|
|
|
4944
5115
|
{
|
|
4945
5116
|
this.FormaDateDrawInfo(column, stock, drawInfo, data);
|
|
4946
5117
|
}
|
|
5118
|
+
else if (column.Type==REPORT_COLUMN_ID.CHECKBOX_ID)
|
|
5119
|
+
{
|
|
5120
|
+
rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
|
|
5121
|
+
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
5122
|
+
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
5123
|
+
drawInfo.Rect=rtItem;
|
|
5124
|
+
drawInfo.Checked=false;
|
|
5125
|
+
drawInfo.Enable=true;
|
|
5126
|
+
drawInfo.CheckBox=this.CheckBoxConfig;
|
|
5127
|
+
drawInfo.Data=stock;
|
|
5128
|
+
if (stock && IFrameSplitOperator.IsBool(stock.Checked))
|
|
5129
|
+
drawInfo.Checked=stock.Checked;
|
|
5130
|
+
}
|
|
5131
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID)
|
|
5132
|
+
{
|
|
5133
|
+
rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
|
|
5134
|
+
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
5135
|
+
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
5136
|
+
drawInfo.Rect=rtItem;
|
|
5137
|
+
|
|
5138
|
+
this.GetCustomCheckBoxDrawInfo(data, column, drawInfo);
|
|
5139
|
+
}
|
|
5140
|
+
|
|
4947
5141
|
|
|
4948
5142
|
//拖拽行颜色
|
|
4949
5143
|
if (rowType==3)
|
|
@@ -4957,6 +5151,10 @@ function ChartReport()
|
|
|
4957
5151
|
{
|
|
4958
5152
|
this.DrawIconItem(drawInfo, x, top, textWidth);
|
|
4959
5153
|
}
|
|
5154
|
+
else if (column.Type==REPORT_COLUMN_ID.CHECKBOX_ID || column.Type==REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID)
|
|
5155
|
+
{
|
|
5156
|
+
this.DrawCheckbox(drawInfo, left, top, itemWidth);
|
|
5157
|
+
}
|
|
4960
5158
|
else
|
|
4961
5159
|
{
|
|
4962
5160
|
if (data.FlashBG && data.FlashBG.Data && column.ID!=undefined)
|
|
@@ -4987,6 +5185,12 @@ function ChartReport()
|
|
|
4987
5185
|
var tooltipData={ Rect:rtItem, Stock:stock, Index:index, Column:column, RowType:rowType, Type:drawInfo.Tooltip.Type, Data:drawInfo.Tooltip.Data };
|
|
4988
5186
|
this.TooltipRect.push(tooltipData);
|
|
4989
5187
|
}
|
|
5188
|
+
|
|
5189
|
+
if (drawInfo.Botton)
|
|
5190
|
+
{
|
|
5191
|
+
var buttonData={ Stock:stock, Index:index, Column:column, Rect:drawInfo.Botton.Rect, Type:drawInfo.Botton.Type, Data:drawInfo.Data };
|
|
5192
|
+
this.ButtonRect.push(buttonData);
|
|
5193
|
+
}
|
|
4990
5194
|
}
|
|
4991
5195
|
|
|
4992
5196
|
this.DrawCustomText=function(drawInfo, column, left, top, cellWidth)
|
|
@@ -5240,6 +5444,19 @@ function ChartReport()
|
|
|
5240
5444
|
}
|
|
5241
5445
|
}
|
|
5242
5446
|
|
|
5447
|
+
this.GetCustomCheckBoxDrawInfo=function(data, column, drawInfo)
|
|
5448
|
+
{
|
|
5449
|
+
var checkData=this.GetExtendData(data, column);
|
|
5450
|
+
if (!checkData) return;
|
|
5451
|
+
if (!IFrameSplitOperator.IsBool(checkData.Checked)) return;
|
|
5452
|
+
|
|
5453
|
+
drawInfo.Checked=checkData.Checked;
|
|
5454
|
+
drawInfo.Enable=true;
|
|
5455
|
+
drawInfo.Data=checkData;
|
|
5456
|
+
if (IFrameSplitOperator.IsBool(checkData.DisableCheckBox)) drawInfo.Enable=!checkData.DisableCheckBox;
|
|
5457
|
+
drawInfo.CheckBox=column.CheckBox;
|
|
5458
|
+
}
|
|
5459
|
+
|
|
5243
5460
|
this.FormaTimeDrawInfo=function(column, stock, drawInfo, data)
|
|
5244
5461
|
{
|
|
5245
5462
|
if (!IFrameSplitOperator.IsNumber(stock.Time)) return;
|
|
@@ -5504,6 +5721,44 @@ function ChartReport()
|
|
|
5504
5721
|
this.Canvas.font=this.ItemFont;
|
|
5505
5722
|
}
|
|
5506
5723
|
|
|
5724
|
+
this.DrawCheckbox=function(drawInfo, left, top, width)
|
|
5725
|
+
{
|
|
5726
|
+
if (!IFrameSplitOperator.IsBool(drawInfo.Checked)) return;
|
|
5727
|
+
if (!drawInfo.CheckBox) return;
|
|
5728
|
+
|
|
5729
|
+
drawInfo.Font=`${drawInfo.CheckBox.Size*this.DevicePixelRatio}px ${drawInfo.CheckBox.Family}`;
|
|
5730
|
+
var textAlign=drawInfo.TextAlign;
|
|
5731
|
+
var size=drawInfo.CheckBox.Size*this.DevicePixelRatio;
|
|
5732
|
+
var x=left+drawInfo.CheckBox.Margin.Left;
|
|
5733
|
+
var y=top+this.RowHeight-drawInfo.CheckBox.Margin.Bottom;
|
|
5734
|
+
if (textAlign=='center') x=left+width/2-size/2;
|
|
5735
|
+
else if (textAlign=='right') x=left+width-drawInfo.CheckBox.Margin.Right;
|
|
5736
|
+
|
|
5737
|
+
this.Canvas.font=drawInfo.Font;
|
|
5738
|
+
this.Canvas.textBaseline="bottom";
|
|
5739
|
+
this.Canvas.textAlign="left";
|
|
5740
|
+
if (drawInfo.Checked===true)
|
|
5741
|
+
{
|
|
5742
|
+
if (drawInfo.Enable===false) this.Canvas.fillStyle=drawInfo.CheckBox.Checked.DisableColor;
|
|
5743
|
+
else this.Canvas.fillStyle=drawInfo.CheckBox.Checked.Color;
|
|
5744
|
+
this.Canvas.fillText(drawInfo.CheckBox.Checked.Symbol,x,y);
|
|
5745
|
+
}
|
|
5746
|
+
else if (drawInfo.Checked===false)
|
|
5747
|
+
{
|
|
5748
|
+
if (drawInfo.Enable===false) this.Canvas.fillStyle=drawInfo.CheckBox.Unchecked.DisableColor;
|
|
5749
|
+
else this.Canvas.fillStyle=drawInfo.CheckBox.Unchecked.Color;
|
|
5750
|
+
this.Canvas.fillText(drawInfo.CheckBox.Unchecked.Symbol,x,y);
|
|
5751
|
+
}
|
|
5752
|
+
|
|
5753
|
+
if (drawInfo.Enable)
|
|
5754
|
+
{
|
|
5755
|
+
var rtBox={ Left:x, Bottom:y, Width:size, Height:size };
|
|
5756
|
+
rtBox.Right=rtBox.Left+rtBox.Width;
|
|
5757
|
+
rtBox.Top=rtBox.Bottom-rtBox.Height;
|
|
5758
|
+
drawInfo.Botton={ Rect:rtBox, Type:0 };
|
|
5759
|
+
}
|
|
5760
|
+
}
|
|
5761
|
+
|
|
5507
5762
|
//字体由外面设置
|
|
5508
5763
|
this.TextEllipsis=function(text, maxWidth, maxText)
|
|
5509
5764
|
{
|
|
@@ -6016,6 +6271,7 @@ function ChartReport()
|
|
|
6016
6271
|
|
|
6017
6272
|
this.SelectedFixedRow=row.Index;
|
|
6018
6273
|
this.SelectedRow=-1;
|
|
6274
|
+
this.MultiSelectedRow=[];
|
|
6019
6275
|
|
|
6020
6276
|
return { Type:4, Redraw:bRedraw, Row:row }; //行
|
|
6021
6277
|
}
|
|
@@ -6023,18 +6279,45 @@ function ChartReport()
|
|
|
6023
6279
|
var row=this.PtInBody(x,y);
|
|
6024
6280
|
if (row)
|
|
6025
6281
|
{
|
|
6282
|
+
var btnStatus={ Redraw:false };
|
|
6283
|
+
this.OnClickButton(x, y, e, btnStatus);
|
|
6284
|
+
|
|
6026
6285
|
var bRedraw=true;
|
|
6027
|
-
if (this.
|
|
6286
|
+
if (this.MultiSelectModel==1)
|
|
6028
6287
|
{
|
|
6029
|
-
if (
|
|
6030
|
-
|
|
6288
|
+
if (e && e.ctrlKey) //多选
|
|
6289
|
+
{
|
|
6290
|
+
var pos=this.MultiSelectedRow.indexOf(row.DataIndex);
|
|
6291
|
+
if (pos>=0) this.MultiSelectedRow.splice(pos,1);
|
|
6292
|
+
else this.MultiSelectedRow.push(row.DataIndex);
|
|
6293
|
+
|
|
6294
|
+
}
|
|
6295
|
+
else if (e && e.shiftKey) //批量多选
|
|
6296
|
+
{
|
|
6297
|
+
this.OnShiftClickRow(row);
|
|
6298
|
+
}
|
|
6299
|
+
else
|
|
6300
|
+
{
|
|
6301
|
+
if (this.MultiSelectedRow.length==1 && this.MultiSelectedRow[0]==row.DataIndex) bRedraw=false;
|
|
6302
|
+
else this.MultiSelectedRow=[row.DataIndex];
|
|
6303
|
+
}
|
|
6304
|
+
|
|
6031
6305
|
this.SelectedFixedRow=-1;
|
|
6032
6306
|
}
|
|
6033
|
-
else
|
|
6307
|
+
else
|
|
6034
6308
|
{
|
|
6035
|
-
if (this.
|
|
6036
|
-
|
|
6037
|
-
|
|
6309
|
+
if (this.SelectedModel==0)
|
|
6310
|
+
{
|
|
6311
|
+
if (this.SelectedRow==row.Index) bRedraw=false;
|
|
6312
|
+
this.SelectedRow=row.Index;
|
|
6313
|
+
this.SelectedFixedRow=-1;
|
|
6314
|
+
}
|
|
6315
|
+
else
|
|
6316
|
+
{
|
|
6317
|
+
if (this.SelectedRow==row.DataIndex) bRedraw=false;
|
|
6318
|
+
this.SelectedRow=row.DataIndex;
|
|
6319
|
+
this.SelectedFixedRow=-1;
|
|
6320
|
+
}
|
|
6038
6321
|
}
|
|
6039
6322
|
|
|
6040
6323
|
var eventID=JSCHART_EVENT_ID.ON_CLICK_REPORT_ROW;
|
|
@@ -6042,7 +6325,7 @@ function ChartReport()
|
|
|
6042
6325
|
|
|
6043
6326
|
this.SendClickEvent(eventID, { Data:row, X:x, Y:y, e:e, Inside:insidePoint, UIElement:uiElement });
|
|
6044
6327
|
|
|
6045
|
-
return { Type:2, Redraw:bRedraw, Row:row }; //行
|
|
6328
|
+
return { Type:2, Redraw:bRedraw || btnStatus.Redraw, Row:row }; //行
|
|
6046
6329
|
}
|
|
6047
6330
|
|
|
6048
6331
|
var header=this.PtInHeader(x,y);
|
|
@@ -6065,6 +6348,62 @@ function ChartReport()
|
|
|
6065
6348
|
return null;
|
|
6066
6349
|
}
|
|
6067
6350
|
|
|
6351
|
+
this.OnShiftClickRow=function(row)
|
|
6352
|
+
{
|
|
6353
|
+
if (this.MultiSelectedRow.length<=0)
|
|
6354
|
+
{
|
|
6355
|
+
this.MultiSelectedRow.push(row.DataIndex);
|
|
6356
|
+
return;
|
|
6357
|
+
}
|
|
6358
|
+
|
|
6359
|
+
var max=null, min=null;
|
|
6360
|
+
for(var i=0;i<this.MultiSelectedRow.length;++i)
|
|
6361
|
+
{
|
|
6362
|
+
var value=this.MultiSelectedRow[i];
|
|
6363
|
+
if (max==null || max<value) max=value;
|
|
6364
|
+
if (min==null || min>value) min=value;
|
|
6365
|
+
if (value==row.DataIndex) //移除
|
|
6366
|
+
{
|
|
6367
|
+
this.MultiSelectedRow.splice(i,1);
|
|
6368
|
+
return;
|
|
6369
|
+
}
|
|
6370
|
+
}
|
|
6371
|
+
|
|
6372
|
+
if (max==min)
|
|
6373
|
+
{
|
|
6374
|
+
var start=row.DataIndex, end=max;
|
|
6375
|
+
if (start>end)
|
|
6376
|
+
{
|
|
6377
|
+
start=max;
|
|
6378
|
+
end=row.DataIndex;
|
|
6379
|
+
}
|
|
6380
|
+
|
|
6381
|
+
this.MultiSelectedRow=[];
|
|
6382
|
+
for(var i=start;i<=end;++i)
|
|
6383
|
+
{
|
|
6384
|
+
this.MultiSelectedRow.push(i);
|
|
6385
|
+
}
|
|
6386
|
+
}
|
|
6387
|
+
else
|
|
6388
|
+
{
|
|
6389
|
+
if (row.DataIndex<=max && row.DataIndex>=min)
|
|
6390
|
+
{
|
|
6391
|
+
this.MultiSelectedRow.push(row.DataIndex);
|
|
6392
|
+
}
|
|
6393
|
+
else
|
|
6394
|
+
{
|
|
6395
|
+
var start=Math.min(row.DataIndex, min);
|
|
6396
|
+
var end=Math.max(row.DataIndex, max);
|
|
6397
|
+
this.MultiSelectedRow=[];
|
|
6398
|
+
for(var i=start;i<=end;++i)
|
|
6399
|
+
{
|
|
6400
|
+
this.MultiSelectedRow.push(i);
|
|
6401
|
+
}
|
|
6402
|
+
}
|
|
6403
|
+
}
|
|
6404
|
+
|
|
6405
|
+
}
|
|
6406
|
+
|
|
6068
6407
|
this.OnDrawgRow=function(x, y, e) //Type: 5=顶部 6=空白行 2=行 7=底部
|
|
6069
6408
|
{
|
|
6070
6409
|
if (!this.Data) return null;
|
|
@@ -6101,6 +6440,33 @@ function ChartReport()
|
|
|
6101
6440
|
return { Type:7 };
|
|
6102
6441
|
}
|
|
6103
6442
|
|
|
6443
|
+
this.OnClickButton=function(x, y, e, status)
|
|
6444
|
+
{
|
|
6445
|
+
if (e.button!=0) return false;
|
|
6446
|
+
|
|
6447
|
+
var buttonData=this.GetButtonData(x,y);
|
|
6448
|
+
if (!buttonData) return true;
|
|
6449
|
+
|
|
6450
|
+
if (buttonData.Type===0)
|
|
6451
|
+
{
|
|
6452
|
+
var sendData={ Column:buttonData.Column, Index:buttonData.Index, Stock:buttonData.Stock, Data:buttonData.Data, PreventDefault: false };
|
|
6453
|
+
this.SendClickEvent(JSCHART_EVENT_ID.ON_CLICK_REPORT_CHECKBOX, sendData)
|
|
6454
|
+
|
|
6455
|
+
if (!sendData.PreventDefault)
|
|
6456
|
+
{
|
|
6457
|
+
if (IFrameSplitOperator.IsBool(buttonData.Data.Checked))
|
|
6458
|
+
buttonData.Data.Checked=!buttonData.Data.Checked;
|
|
6459
|
+
else
|
|
6460
|
+
buttonData.Data.Checked=true;
|
|
6461
|
+
}
|
|
6462
|
+
|
|
6463
|
+
status.Redraw=true;
|
|
6464
|
+
return true;
|
|
6465
|
+
}
|
|
6466
|
+
|
|
6467
|
+
return false;
|
|
6468
|
+
}
|
|
6469
|
+
|
|
6104
6470
|
this.OnDblClick=function(x,y,e)
|
|
6105
6471
|
{
|
|
6106
6472
|
if (!this.Data) return false;
|
|
@@ -6338,6 +6704,24 @@ function ChartReport()
|
|
|
6338
6704
|
return null;
|
|
6339
6705
|
}
|
|
6340
6706
|
|
|
6707
|
+
this.GetButtonData=function(x,y)
|
|
6708
|
+
{
|
|
6709
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.ButtonRect)) return null;
|
|
6710
|
+
|
|
6711
|
+
for(var i=0;i<this.ButtonRect.length;++i)
|
|
6712
|
+
{
|
|
6713
|
+
var item=this.ButtonRect[i];
|
|
6714
|
+
|
|
6715
|
+
var rt=item.Rect;
|
|
6716
|
+
if (!rt) continue;
|
|
6717
|
+
|
|
6718
|
+
if (x>=rt.Left && x<=rt.Right && y>=rt.Top && y<=rt.Bottom)
|
|
6719
|
+
{
|
|
6720
|
+
return { Rect:item.Rect, Stock:item.Stock, Column:item.Column, Index:item.Index, Type:item.Type, Data:item.Data };
|
|
6721
|
+
}
|
|
6722
|
+
}
|
|
6723
|
+
}
|
|
6724
|
+
|
|
6341
6725
|
this.PtInHeaderDragBorder=function(x, y)
|
|
6342
6726
|
{
|
|
6343
6727
|
if (!this.IsShowHeader) return null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: "iconfont"; /* Project id 1040563 */
|
|
3
|
-
src: url('iconfont.woff2?t=
|
|
4
|
-
url('iconfont.woff?t=
|
|
5
|
-
url('iconfont.ttf?t=
|
|
3
|
+
src: url('iconfont.woff2?t=1721033595459') format('woff2'),
|
|
4
|
+
url('iconfont.woff?t=1721033595459') format('woff'),
|
|
5
|
+
url('iconfont.ttf?t=1721033595459') format('truetype');
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.iconfont {
|
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
-moz-osx-font-smoothing: grayscale;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
.icon-Unchecked-box:before {
|
|
17
|
+
content: "\e6b4";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.icon-check-box:before {
|
|
21
|
+
content: "\e6b3";
|
|
22
|
+
}
|
|
23
|
+
|
|
16
24
|
.icon-paixujiantou:before {
|
|
17
25
|
content: "\e6b1";
|
|
18
26
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -622,6 +622,13 @@ function GetBlackStyle()
|
|
|
622
622
|
BarColor:"rgba(48,48,48,0.9)",
|
|
623
623
|
BorderColor:'rgba(48,48,48,0.9)',
|
|
624
624
|
BGColor:"rgba(211,211,211,0.5)",
|
|
625
|
+
},
|
|
626
|
+
|
|
627
|
+
CheckBox:
|
|
628
|
+
{
|
|
629
|
+
Family:"iconfont", Size:15,
|
|
630
|
+
Checked:{ Color:"rgb(237,60,31)", Symbol:"\ue6b3", DisableColor:"rgb(112,128,144)" },
|
|
631
|
+
Unchecked:{ Color:"rgb(237,60,31)", Symbol:"\ue6b4", DisableColor:"rgb(112,128,144)" },
|
|
625
632
|
}
|
|
626
633
|
},
|
|
627
634
|
|