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
package/package.json
CHANGED
|
@@ -1008,6 +1008,10 @@ function ChartDealList()
|
|
|
1008
1008
|
if (!IFrameSplitOperator.IsNumber(item.DataIndex)) continue;
|
|
1009
1009
|
colItem.DataIndex=item.DataIndex; //柱子数据所在原始数据索引列
|
|
1010
1010
|
}
|
|
1011
|
+
else if (item.Type==DEAL_COLUMN_ID.TIME_ID)
|
|
1012
|
+
{
|
|
1013
|
+
if (IFrameSplitOperator.IsString(item.Foramt)) colItem.Foramt=item.Foramt; //设置时间格式
|
|
1014
|
+
}
|
|
1011
1015
|
|
|
1012
1016
|
this.Column.push(colItem);
|
|
1013
1017
|
}
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -2599,6 +2599,7 @@ var JSCHART_EVENT_ID=
|
|
|
2599
2599
|
ON_CLICK_TREPORT_ROW:127, //左键点击点击T型报价列表
|
|
2600
2600
|
|
|
2601
2601
|
ON_DRAW_REPORT_ROW_BG:140, //报价列表整行背景
|
|
2602
|
+
ON_CLICK_REPORT_CHECKBOX:141, //报价列表checkbox
|
|
2602
2603
|
|
|
2603
2604
|
|
|
2604
2605
|
ON_CHANGE_INDEX:150, //切换指标
|
|
@@ -67239,6 +67240,15 @@ function JSChartResource()
|
|
|
67239
67240
|
BorderColor:'rgba(180,180,180,0.9)',
|
|
67240
67241
|
BGColor:"rgba(234,239,248,0.9)",
|
|
67241
67242
|
BarWidth:{ Size:12 }
|
|
67243
|
+
},
|
|
67244
|
+
|
|
67245
|
+
CheckBox:
|
|
67246
|
+
{
|
|
67247
|
+
Family:"iconfont", Size:15,
|
|
67248
|
+
Checked:{ Color:"rgb(33,148,240)", Symbol:"\ue6b3", DisableColor:"rgb(112,128,144)" },
|
|
67249
|
+
Unchecked:{ Color:"rgb(33,148,240)", Symbol:"\ue6b4", DisableColor:"rgb(112,128,144)" },
|
|
67250
|
+
|
|
67251
|
+
Margin:{ Left:5, Right:5, Bottom:2, Top:4 },
|
|
67242
67252
|
}
|
|
67243
67253
|
},
|
|
67244
67254
|
|
|
@@ -68254,6 +68264,33 @@ function JSChartResource()
|
|
|
68254
68264
|
if (subItem.BorderColor) dest.VScrollbar.BorderColor=subItem.BorderColor;
|
|
68255
68265
|
if (subItem.BGColor) dest.VScrollbar.BGColor=subItem.BGColor;
|
|
68256
68266
|
}
|
|
68267
|
+
|
|
68268
|
+
if (item.CheckBox)
|
|
68269
|
+
{
|
|
68270
|
+
var subItem=item.CheckBox;
|
|
68271
|
+
if (subItem.Family) dest.CheckBox.Family=subItem.Family;
|
|
68272
|
+
if (IFrameSplitOperator.IsNumber(subItem.Size)) dest.CheckBox.Size=subItem.Size;
|
|
68273
|
+
|
|
68274
|
+
if (subItem.Checked)
|
|
68275
|
+
{
|
|
68276
|
+
var child=subItem.Checked;
|
|
68277
|
+
if (child.Color) dest.CheckBox.Checked.Color=child.Color;
|
|
68278
|
+
if (child.Symbol) dest.CheckBox.Checked.Symbol=child.Symbol;
|
|
68279
|
+
if (child.DisableColor) dest.CheckBox.Checked.DisableColor=child.DisableColor;
|
|
68280
|
+
}
|
|
68281
|
+
|
|
68282
|
+
if (subItem.Unchecked)
|
|
68283
|
+
{
|
|
68284
|
+
var child=subItem.Unchecked;
|
|
68285
|
+
if (child.Color) dest.CheckBox.Unchecked.Color=child.Color;
|
|
68286
|
+
if (child.Symbol) dest.CheckBox.Unchecked.Symbol=child.Symbol;
|
|
68287
|
+
if (child.DisableColor) dest.CheckBox.Unchecked.DisableColor=child.DisableColor;
|
|
68288
|
+
|
|
68289
|
+
|
|
68290
|
+
}
|
|
68291
|
+
|
|
68292
|
+
CopyMarginConfig(dest.CheckBox.Margin, subItem.Margin);
|
|
68293
|
+
}
|
|
68257
68294
|
|
|
68258
68295
|
}
|
|
68259
68296
|
|
|
@@ -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,6 +3670,13 @@ var REPORT_COLUMN_ID=
|
|
|
3565
3670
|
|
|
3566
3671
|
TIME_ID:31, //时间 hhmmss / hhmm / hhmmss.fff
|
|
3567
3672
|
DATE_ID:32, //日期
|
|
3673
|
+
|
|
3674
|
+
CHECKBOX_ID:33, //单选框
|
|
3675
|
+
CHECKBOX2_ID:34,
|
|
3676
|
+
CHECKBOX3_ID:35,
|
|
3677
|
+
CHECKBOX4_ID:36,
|
|
3678
|
+
CHECKBOX5_ID:37,
|
|
3679
|
+
CHECKBOX6_ID:38,
|
|
3568
3680
|
|
|
3569
3681
|
|
|
3570
3682
|
SYMBOL_NAME_ID:99,
|
|
@@ -3639,6 +3751,10 @@ function ChartReport()
|
|
|
3639
3751
|
this.SelectedFixedRow=-1; //选中固定行ID
|
|
3640
3752
|
this.IsDrawBorder=1; //是否绘制单元格边框
|
|
3641
3753
|
|
|
3754
|
+
//多选模式
|
|
3755
|
+
this.MultiSelectModel=0; //0=禁用 1=开启
|
|
3756
|
+
this.MultiSelectedRow=[]; //选中行
|
|
3757
|
+
|
|
3642
3758
|
this.ShowSymbol=[]; //显示的股票列表 { Index:序号(排序用), Symbol:股票代码 }
|
|
3643
3759
|
this.DragRow; //拖拽行
|
|
3644
3760
|
|
|
@@ -3738,6 +3854,8 @@ function ChartReport()
|
|
|
3738
3854
|
DistanceWidth:g_JSChartResource.Report.KLine.DistanceWidth
|
|
3739
3855
|
}
|
|
3740
3856
|
|
|
3857
|
+
this.CheckBoxConfig=CloneData(g_JSChartResource.Report.CheckBox);
|
|
3858
|
+
|
|
3741
3859
|
//股票代码+股票名称
|
|
3742
3860
|
this.ItemSymbolFontConfig={Size:g_JSChartResource.Report.Item.SymbolFont.Size, Name:g_JSChartResource.Report.Item.SymbolFont.Name};
|
|
3743
3861
|
this.ItemNameFontConfg={Size:g_JSChartResource.Report.Item.NameFont.Size, Name:g_JSChartResource.Report.Item.NameFont.Name};
|
|
@@ -3756,6 +3874,7 @@ function ChartReport()
|
|
|
3756
3874
|
this.RowHeight=0; //行高度
|
|
3757
3875
|
this.BottomToolbarHeight=0; //底部工具条高度
|
|
3758
3876
|
this.IsShowAllColumn=false; //是否已显示所有列
|
|
3877
|
+
this.DevicePixelRatio=GetDevicePixelRatio(); //分辨率
|
|
3759
3878
|
|
|
3760
3879
|
//{
|
|
3761
3880
|
// Type:列id, Title:标题, TextAlign:文字对齐方式, MaxText:文字最大宽度 , TextColor:文字颜色, Sort:0=不支持排序 1=本地排序 0=远程排序,
|
|
@@ -3776,8 +3895,13 @@ function ChartReport()
|
|
|
3776
3895
|
// { Text, Color, Title:, TitleColor, Space, Margin:{ Left, Top, Right, Bottom }}
|
|
3777
3896
|
this.TooltipRect=[];
|
|
3778
3897
|
|
|
3898
|
+
//{ Rect:rtItem, Type: 0=checkedbox, 1=button, 2=link , Stock, Index:index, Column:column }
|
|
3899
|
+
this.ButtonRect=[];
|
|
3900
|
+
|
|
3779
3901
|
this.ReloadResource=function(resource)
|
|
3780
3902
|
{
|
|
3903
|
+
this.DevicePixelRatio=GetDevicePixelRatio()
|
|
3904
|
+
|
|
3781
3905
|
this.UpColor=g_JSChartResource.Report.UpTextColor;
|
|
3782
3906
|
this.DownColor=g_JSChartResource.Report.DownTextColor;
|
|
3783
3907
|
this.UnchagneColor=g_JSChartResource.Report.UnchagneTextColor;
|
|
@@ -4041,6 +4165,8 @@ function ChartReport()
|
|
|
4041
4165
|
{ Type:REPORT_COLUMN_ID.TIME_ID, Title:"时间", TextAlign:"left", ValueType:0, TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"99:99:99.999" },
|
|
4042
4166
|
{ Type:REPORT_COLUMN_ID.DATE_ID, Title:"日期", TextAlign:"left", FormatType:0, TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999-99-99" },
|
|
4043
4167
|
|
|
4168
|
+
{ Type:REPORT_COLUMN_ID.CHECKBOX_ID, Title:"", TextAlign:"center", FixedWidth:20*GetDevicePixelRatio() }
|
|
4169
|
+
|
|
4044
4170
|
|
|
4045
4171
|
];
|
|
4046
4172
|
|
|
@@ -4066,7 +4192,9 @@ function ChartReport()
|
|
|
4066
4192
|
{
|
|
4067
4193
|
this.ShowSymbol=[];
|
|
4068
4194
|
this.TooltipRect=[];
|
|
4069
|
-
|
|
4195
|
+
this.ButtonRect=[];
|
|
4196
|
+
this.DevicePixelRatio=GetDevicePixelRatio()
|
|
4197
|
+
|
|
4070
4198
|
if (this.GlobalOption) this.GlobalOption.FlashBGCount=0;
|
|
4071
4199
|
|
|
4072
4200
|
if (this.SizeChange) this.CalculateSize();
|
|
@@ -4118,7 +4246,14 @@ function ChartReport()
|
|
|
4118
4246
|
|
|
4119
4247
|
this.GetCurrentPageStatus=function() //{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
|
|
4120
4248
|
{
|
|
4121
|
-
var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRow:this.SelectedRow, IsSinglePage:false, DataCount:0 };
|
|
4249
|
+
var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRow:this.SelectedRow, IsSinglePage:false, DataCount:0, MultiSelectModel:this.MultiSelectModel };
|
|
4250
|
+
if (this.MultiSelectModel==1)
|
|
4251
|
+
{
|
|
4252
|
+
result.SelectedRow=-1;
|
|
4253
|
+
result.MultiSelectedRow=this.MultiSelectedRow.slice();
|
|
4254
|
+
result.MultiSelectedRow.sort((left, right)=>{ return left>right; });
|
|
4255
|
+
}
|
|
4256
|
+
|
|
4122
4257
|
if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
|
|
4123
4258
|
{
|
|
4124
4259
|
result.End=this.Data.YOffset+this.RowCount-1;
|
|
@@ -4542,19 +4677,31 @@ function ChartReport()
|
|
|
4542
4677
|
|
|
4543
4678
|
var eventDrawBG=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_REPORT_ROW_BG);
|
|
4544
4679
|
var selectedSymbol=this.GetSelectedSymbol();
|
|
4680
|
+
|
|
4681
|
+
var setSelected;
|
|
4682
|
+
if (this.MultiSelectModel==1) setSelected=new Set(this.MultiSelectedRow);
|
|
4683
|
+
|
|
4545
4684
|
for(var i=this.Data.YOffset, j=0; i<this.Data.Data.length && j<this.RowCount ;++i, ++j)
|
|
4546
4685
|
{
|
|
4547
4686
|
var symbol=this.Data.Data[i];
|
|
4548
4687
|
|
|
4549
4688
|
var bFillRow=false;
|
|
4550
|
-
if (this.
|
|
4689
|
+
if (this.MultiSelectModel==1)
|
|
4551
4690
|
{
|
|
4552
|
-
if (
|
|
4691
|
+
if (setSelected.has(i)) bFillRow=true;
|
|
4553
4692
|
}
|
|
4554
4693
|
else
|
|
4555
4694
|
{
|
|
4556
|
-
if (
|
|
4695
|
+
if (this.SelectedModel==0)
|
|
4696
|
+
{
|
|
4697
|
+
if (j==this.SelectedRow) bFillRow=true; //选中行
|
|
4698
|
+
}
|
|
4699
|
+
else
|
|
4700
|
+
{
|
|
4701
|
+
if (i==this.SelectedRow) bFillRow=true; //选中行
|
|
4702
|
+
}
|
|
4557
4703
|
}
|
|
4704
|
+
|
|
4558
4705
|
|
|
4559
4706
|
if (this.DragRow)
|
|
4560
4707
|
{
|
|
@@ -4584,7 +4731,7 @@ function ChartReport()
|
|
|
4584
4731
|
if (eventDrawBG && eventDrawBG.Callback)
|
|
4585
4732
|
{
|
|
4586
4733
|
//Out:{ BGColor: }
|
|
4587
|
-
var sendData={ RowIndex:i, Symbol:symbol, Out:null, Selected:selectedSymbol };
|
|
4734
|
+
var sendData={ RowIndex:i, Symbol:symbol, Out:null, Selected:selectedSymbol, MultiSelectModel:this.MultiSelectModel };
|
|
4588
4735
|
eventDrawBG.Callback(eventDrawBG,sendData,this);
|
|
4589
4736
|
if (sendData.Out && sendData.Out.BGColor)
|
|
4590
4737
|
{
|
|
@@ -4609,14 +4756,32 @@ function ChartReport()
|
|
|
4609
4756
|
|
|
4610
4757
|
this.GetSelectedSymbol=function()
|
|
4611
4758
|
{
|
|
4612
|
-
if (this.
|
|
4759
|
+
if (this.MultiSelectModel==1)
|
|
4760
|
+
{
|
|
4761
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.MultiSelectedRow)) return null;
|
|
4613
4762
|
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4763
|
+
var aryData=[];
|
|
4764
|
+
for(var i=0;i<this.MultiSelectedRow.length;++i)
|
|
4765
|
+
{
|
|
4766
|
+
var item=this.Data.Data[this.MultiSelectedRow[i]];
|
|
4767
|
+
if (!item) continue;
|
|
4768
|
+
|
|
4769
|
+
aryData.push(item);
|
|
4770
|
+
}
|
|
4771
|
+
|
|
4772
|
+
return aryData;
|
|
4773
|
+
}
|
|
4774
|
+
else
|
|
4775
|
+
{
|
|
4776
|
+
if (this.SelectedRow<0) return null;
|
|
4617
4777
|
|
|
4618
|
-
|
|
4619
|
-
|
|
4778
|
+
var index=this.SelectedRow;
|
|
4779
|
+
if (this.SelectedModel==0) //当前屏选中
|
|
4780
|
+
index=this.Data.YOffset+this.SelectedRow;
|
|
4781
|
+
|
|
4782
|
+
var symbol=this.Data.Data[index];
|
|
4783
|
+
return [symbol];
|
|
4784
|
+
}
|
|
4620
4785
|
}
|
|
4621
4786
|
|
|
4622
4787
|
|
|
@@ -4944,6 +5109,18 @@ function ChartReport()
|
|
|
4944
5109
|
{
|
|
4945
5110
|
this.FormaDateDrawInfo(column, stock, drawInfo, data);
|
|
4946
5111
|
}
|
|
5112
|
+
else if (column.Type==REPORT_COLUMN_ID.CHECKBOX_ID)
|
|
5113
|
+
{
|
|
5114
|
+
rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
|
|
5115
|
+
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
5116
|
+
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
5117
|
+
drawInfo.Rect=rtItem;
|
|
5118
|
+
drawInfo.Checked=false;
|
|
5119
|
+
drawInfo.Font=`${this.CheckBoxConfig.Size*this.DevicePixelRatio}px ${this.CheckBoxConfig.Family}`;
|
|
5120
|
+
if (stock && IFrameSplitOperator.IsBool(stock.Checked))
|
|
5121
|
+
drawInfo.Checked=stock.Checked;
|
|
5122
|
+
}
|
|
5123
|
+
|
|
4947
5124
|
|
|
4948
5125
|
//拖拽行颜色
|
|
4949
5126
|
if (rowType==3)
|
|
@@ -4957,6 +5134,10 @@ function ChartReport()
|
|
|
4957
5134
|
{
|
|
4958
5135
|
this.DrawIconItem(drawInfo, x, top, textWidth);
|
|
4959
5136
|
}
|
|
5137
|
+
else if (column.Type==REPORT_COLUMN_ID.CHECKBOX_ID)
|
|
5138
|
+
{
|
|
5139
|
+
this.DrawCheckbox(drawInfo, left, top, itemWidth);
|
|
5140
|
+
}
|
|
4960
5141
|
else
|
|
4961
5142
|
{
|
|
4962
5143
|
if (data.FlashBG && data.FlashBG.Data && column.ID!=undefined)
|
|
@@ -4987,6 +5168,12 @@ function ChartReport()
|
|
|
4987
5168
|
var tooltipData={ Rect:rtItem, Stock:stock, Index:index, Column:column, RowType:rowType, Type:drawInfo.Tooltip.Type, Data:drawInfo.Tooltip.Data };
|
|
4988
5169
|
this.TooltipRect.push(tooltipData);
|
|
4989
5170
|
}
|
|
5171
|
+
|
|
5172
|
+
if (drawInfo.Botton)
|
|
5173
|
+
{
|
|
5174
|
+
var buttonData={ Stock:stock, Index:index, Column:column, Rect:drawInfo.Botton.Rect, Type:drawInfo.Botton.Type };
|
|
5175
|
+
this.ButtonRect.push(buttonData);
|
|
5176
|
+
}
|
|
4990
5177
|
}
|
|
4991
5178
|
|
|
4992
5179
|
this.DrawCustomText=function(drawInfo, column, left, top, cellWidth)
|
|
@@ -5504,6 +5691,36 @@ function ChartReport()
|
|
|
5504
5691
|
this.Canvas.font=this.ItemFont;
|
|
5505
5692
|
}
|
|
5506
5693
|
|
|
5694
|
+
this.DrawCheckbox=function(drawInfo, left, top, width)
|
|
5695
|
+
{
|
|
5696
|
+
var textAlign=drawInfo.TextAlign;
|
|
5697
|
+
var size=this.CheckBoxConfig.Size*this.DevicePixelRatio;
|
|
5698
|
+
//var boxWidth=size+this.CheckBoxConfig.Margin.Left+this.CheckBoxConfig.Margin.Right;
|
|
5699
|
+
var x=left+this.CheckBoxConfig.Margin.Left;
|
|
5700
|
+
var y=top+this.RowHeight-this.CheckBoxConfig.Margin.Bottom;
|
|
5701
|
+
if (textAlign=='center') x=left+width/2-size/2;
|
|
5702
|
+
else if (textAlign=='right') x=left+width-this.CheckBoxConfig.Margin.Right;
|
|
5703
|
+
|
|
5704
|
+
this.Canvas.font=drawInfo.Font;
|
|
5705
|
+
this.Canvas.textBaseline="bottom";
|
|
5706
|
+
this.Canvas.textAlign="left";
|
|
5707
|
+
if (drawInfo.Checked===true)
|
|
5708
|
+
{
|
|
5709
|
+
this.Canvas.fillStyle=this.CheckBoxConfig.Checked.Color;
|
|
5710
|
+
this.Canvas.fillText(this.CheckBoxConfig.Checked.Symbol,x,y);
|
|
5711
|
+
}
|
|
5712
|
+
else if (drawInfo.Checked===false)
|
|
5713
|
+
{
|
|
5714
|
+
this.Canvas.fillStyle=this.CheckBoxConfig.Unchecked.Color;
|
|
5715
|
+
this.Canvas.fillText(this.CheckBoxConfig.Unchecked.Symbol,x,y);
|
|
5716
|
+
}
|
|
5717
|
+
|
|
5718
|
+
var rtBox={ Left:x, Bottom:y, Width:size, Height:size };
|
|
5719
|
+
rtBox.Right=rtBox.Left+rtBox.Width;
|
|
5720
|
+
rtBox.Top=rtBox.Bottom-rtBox.Height;
|
|
5721
|
+
drawInfo.Botton={ Rect:rtBox, Type:0 };
|
|
5722
|
+
}
|
|
5723
|
+
|
|
5507
5724
|
//字体由外面设置
|
|
5508
5725
|
this.TextEllipsis=function(text, maxWidth, maxText)
|
|
5509
5726
|
{
|
|
@@ -6016,6 +6233,7 @@ function ChartReport()
|
|
|
6016
6233
|
|
|
6017
6234
|
this.SelectedFixedRow=row.Index;
|
|
6018
6235
|
this.SelectedRow=-1;
|
|
6236
|
+
this.MultiSelectedRow=[];
|
|
6019
6237
|
|
|
6020
6238
|
return { Type:4, Redraw:bRedraw, Row:row }; //行
|
|
6021
6239
|
}
|
|
@@ -6023,18 +6241,45 @@ function ChartReport()
|
|
|
6023
6241
|
var row=this.PtInBody(x,y);
|
|
6024
6242
|
if (row)
|
|
6025
6243
|
{
|
|
6244
|
+
var btnStatus={ Redraw:false };
|
|
6245
|
+
this.OnClickButton(x, y, e, btnStatus);
|
|
6246
|
+
|
|
6026
6247
|
var bRedraw=true;
|
|
6027
|
-
if (this.
|
|
6248
|
+
if (this.MultiSelectModel==1)
|
|
6028
6249
|
{
|
|
6029
|
-
if (
|
|
6030
|
-
|
|
6250
|
+
if (e && e.ctrlKey) //多选
|
|
6251
|
+
{
|
|
6252
|
+
var pos=this.MultiSelectedRow.indexOf(row.DataIndex);
|
|
6253
|
+
if (pos>=0) this.MultiSelectedRow.splice(pos,1);
|
|
6254
|
+
else this.MultiSelectedRow.push(row.DataIndex);
|
|
6255
|
+
|
|
6256
|
+
}
|
|
6257
|
+
else if (e && e.shiftKey) //批量多选
|
|
6258
|
+
{
|
|
6259
|
+
this.OnShiftClickRow(row);
|
|
6260
|
+
}
|
|
6261
|
+
else
|
|
6262
|
+
{
|
|
6263
|
+
if (this.MultiSelectedRow.length==1 && this.MultiSelectedRow[0]==row.DataIndex) bRedraw=false;
|
|
6264
|
+
else this.MultiSelectedRow=[row.DataIndex];
|
|
6265
|
+
}
|
|
6266
|
+
|
|
6031
6267
|
this.SelectedFixedRow=-1;
|
|
6032
6268
|
}
|
|
6033
|
-
else
|
|
6269
|
+
else
|
|
6034
6270
|
{
|
|
6035
|
-
if (this.
|
|
6036
|
-
|
|
6037
|
-
|
|
6271
|
+
if (this.SelectedModel==0)
|
|
6272
|
+
{
|
|
6273
|
+
if (this.SelectedRow==row.Index) bRedraw=false;
|
|
6274
|
+
this.SelectedRow=row.Index;
|
|
6275
|
+
this.SelectedFixedRow=-1;
|
|
6276
|
+
}
|
|
6277
|
+
else
|
|
6278
|
+
{
|
|
6279
|
+
if (this.SelectedRow==row.DataIndex) bRedraw=false;
|
|
6280
|
+
this.SelectedRow=row.DataIndex;
|
|
6281
|
+
this.SelectedFixedRow=-1;
|
|
6282
|
+
}
|
|
6038
6283
|
}
|
|
6039
6284
|
|
|
6040
6285
|
var eventID=JSCHART_EVENT_ID.ON_CLICK_REPORT_ROW;
|
|
@@ -6042,7 +6287,7 @@ function ChartReport()
|
|
|
6042
6287
|
|
|
6043
6288
|
this.SendClickEvent(eventID, { Data:row, X:x, Y:y, e:e, Inside:insidePoint, UIElement:uiElement });
|
|
6044
6289
|
|
|
6045
|
-
return { Type:2, Redraw:bRedraw, Row:row }; //行
|
|
6290
|
+
return { Type:2, Redraw:bRedraw || btnStatus.Redraw, Row:row }; //行
|
|
6046
6291
|
}
|
|
6047
6292
|
|
|
6048
6293
|
var header=this.PtInHeader(x,y);
|
|
@@ -6065,6 +6310,62 @@ function ChartReport()
|
|
|
6065
6310
|
return null;
|
|
6066
6311
|
}
|
|
6067
6312
|
|
|
6313
|
+
this.OnShiftClickRow=function(row)
|
|
6314
|
+
{
|
|
6315
|
+
if (this.MultiSelectedRow.length<=0)
|
|
6316
|
+
{
|
|
6317
|
+
this.MultiSelectedRow.push(row.DataIndex);
|
|
6318
|
+
return;
|
|
6319
|
+
}
|
|
6320
|
+
|
|
6321
|
+
var max=null, min=null;
|
|
6322
|
+
for(var i=0;i<this.MultiSelectedRow.length;++i)
|
|
6323
|
+
{
|
|
6324
|
+
var value=this.MultiSelectedRow[i];
|
|
6325
|
+
if (max==null || max<value) max=value;
|
|
6326
|
+
if (min==null || min>value) min=value;
|
|
6327
|
+
if (value==row.DataIndex) //移除
|
|
6328
|
+
{
|
|
6329
|
+
this.MultiSelectedRow.splice(i,1);
|
|
6330
|
+
return;
|
|
6331
|
+
}
|
|
6332
|
+
}
|
|
6333
|
+
|
|
6334
|
+
if (max==min)
|
|
6335
|
+
{
|
|
6336
|
+
var start=row.DataIndex, end=max;
|
|
6337
|
+
if (start>end)
|
|
6338
|
+
{
|
|
6339
|
+
start=max;
|
|
6340
|
+
end=row.DataIndex;
|
|
6341
|
+
}
|
|
6342
|
+
|
|
6343
|
+
this.MultiSelectedRow=[];
|
|
6344
|
+
for(var i=start;i<=end;++i)
|
|
6345
|
+
{
|
|
6346
|
+
this.MultiSelectedRow.push(i);
|
|
6347
|
+
}
|
|
6348
|
+
}
|
|
6349
|
+
else
|
|
6350
|
+
{
|
|
6351
|
+
if (row.DataIndex<=max && row.DataIndex>=min)
|
|
6352
|
+
{
|
|
6353
|
+
this.MultiSelectedRow.push(row.DataIndex);
|
|
6354
|
+
}
|
|
6355
|
+
else
|
|
6356
|
+
{
|
|
6357
|
+
var start=Math.min(row.DataIndex, min);
|
|
6358
|
+
var end=Math.max(row.DataIndex, max);
|
|
6359
|
+
this.MultiSelectedRow=[];
|
|
6360
|
+
for(var i=start;i<=end;++i)
|
|
6361
|
+
{
|
|
6362
|
+
this.MultiSelectedRow.push(i);
|
|
6363
|
+
}
|
|
6364
|
+
}
|
|
6365
|
+
}
|
|
6366
|
+
|
|
6367
|
+
}
|
|
6368
|
+
|
|
6068
6369
|
this.OnDrawgRow=function(x, y, e) //Type: 5=顶部 6=空白行 2=行 7=底部
|
|
6069
6370
|
{
|
|
6070
6371
|
if (!this.Data) return null;
|
|
@@ -6101,6 +6402,33 @@ function ChartReport()
|
|
|
6101
6402
|
return { Type:7 };
|
|
6102
6403
|
}
|
|
6103
6404
|
|
|
6405
|
+
this.OnClickButton=function(x, y, e, status)
|
|
6406
|
+
{
|
|
6407
|
+
if (e.button!=0) return false;
|
|
6408
|
+
|
|
6409
|
+
var buttonData=this.GetButtonData(x,y);
|
|
6410
|
+
if (!buttonData) return true;
|
|
6411
|
+
|
|
6412
|
+
if (buttonData.Type===0)
|
|
6413
|
+
{
|
|
6414
|
+
var sendData={ Column:buttonData.Column, Index:buttonData.Index, Stock:buttonData.Stock, PreventDefault: false };
|
|
6415
|
+
this.SendClickEvent(JSCHART_EVENT_ID.ON_CLICK_REPORT_CHECKBOX, sendData)
|
|
6416
|
+
|
|
6417
|
+
if (!sendData.PreventDefault)
|
|
6418
|
+
{
|
|
6419
|
+
if (IFrameSplitOperator.IsBool(buttonData.Stock.Checked))
|
|
6420
|
+
buttonData.Stock.Checked=!buttonData.Stock.Checked;
|
|
6421
|
+
else
|
|
6422
|
+
buttonData.Stock.Checked=true;
|
|
6423
|
+
}
|
|
6424
|
+
|
|
6425
|
+
status.Redraw=true;
|
|
6426
|
+
return true;
|
|
6427
|
+
}
|
|
6428
|
+
|
|
6429
|
+
return false;
|
|
6430
|
+
}
|
|
6431
|
+
|
|
6104
6432
|
this.OnDblClick=function(x,y,e)
|
|
6105
6433
|
{
|
|
6106
6434
|
if (!this.Data) return false;
|
|
@@ -6338,6 +6666,24 @@ function ChartReport()
|
|
|
6338
6666
|
return null;
|
|
6339
6667
|
}
|
|
6340
6668
|
|
|
6669
|
+
this.GetButtonData=function(x,y)
|
|
6670
|
+
{
|
|
6671
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.ButtonRect)) return null;
|
|
6672
|
+
|
|
6673
|
+
for(var i=0;i<this.ButtonRect.length;++i)
|
|
6674
|
+
{
|
|
6675
|
+
var item=this.ButtonRect[i];
|
|
6676
|
+
|
|
6677
|
+
var rt=item.Rect;
|
|
6678
|
+
if (!rt) continue;
|
|
6679
|
+
|
|
6680
|
+
if (x>=rt.Left && x<=rt.Right && y>=rt.Top && y<=rt.Bottom)
|
|
6681
|
+
{
|
|
6682
|
+
return { Rect:item.Rect, Stock:item.Stock, Column:item.Column, Index:item.Index, Type:item.Type };
|
|
6683
|
+
}
|
|
6684
|
+
}
|
|
6685
|
+
}
|
|
6686
|
+
|
|
6341
6687
|
this.PtInHeaderDragBorder=function(x, y)
|
|
6342
6688
|
{
|
|
6343
6689
|
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
|