hqchart 1.1.13095 → 1.1.13105
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 +77 -59
- package/package.json +1 -1
- package/src/jscommon/umychart.js +251 -210
- package/src/jscommon/umychart.report.js +334 -2
- package/src/jscommon/umychart.style.js +10 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +596 -213
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +596 -213
|
@@ -82,6 +82,7 @@ function JSReportChart(divElement)
|
|
|
82
82
|
if (IFrameSplitOperator.IsBool(option.EnableDragRow)) chart.EnableDragRow=option.EnableDragRow;
|
|
83
83
|
if (IFrameSplitOperator.IsNumber(option.DragRowType)) chart.DragRowType=option.DragRowType;
|
|
84
84
|
if (IFrameSplitOperator.IsBool(option.EnableDragHeader)) chart.EnableDragHeader=option.EnableDragHeader;
|
|
85
|
+
if (option.VScrollbar) chart.SetVScrollbar(option.VScrollbar);
|
|
85
86
|
if (option.SortInfo)
|
|
86
87
|
{
|
|
87
88
|
var item=option.SortInfo;
|
|
@@ -278,7 +279,7 @@ function JSReportChartContainer(uielement)
|
|
|
278
279
|
|
|
279
280
|
this.FlashBG=new Map();
|
|
280
281
|
this.FlashBGTimer=null; //闪烁背景 Value:{ LastTime:数据最后的时间, Data: { Key:ID, BGColor:, Time: , Count: 次数 } };
|
|
281
|
-
this.GlobalOption={ FlashBGCount:0 }
|
|
282
|
+
this.GlobalOption={ FlashBGCount:0 };
|
|
282
283
|
|
|
283
284
|
//this.FixedRowData.Data=[ [null, {Value:11, Text:"11" }], [null, null, null, {Value:12, Text:"ddddd", Color:"rgb(45,200,4)"}]];
|
|
284
285
|
|
|
@@ -320,6 +321,8 @@ function JSReportChartContainer(uielement)
|
|
|
320
321
|
|
|
321
322
|
//拖拽滚动条
|
|
322
323
|
this.DragXScroll=null; //{Start:{x,y}, End:{x, y}}
|
|
324
|
+
this.DragYScroll=null;
|
|
325
|
+
this.IsShowVScrollbar=false;
|
|
323
326
|
|
|
324
327
|
this.IsDestroy=false; //是否已经销毁了
|
|
325
328
|
|
|
@@ -436,11 +439,24 @@ function JSReportChartContainer(uielement)
|
|
|
436
439
|
chart.GlobalOption=this.GlobalOption;
|
|
437
440
|
chart.FixedRowData=this.FixedRowData;
|
|
438
441
|
chart.SortInfo=this.SortInfo;
|
|
442
|
+
|
|
439
443
|
chart.Tab=new ChartReportTab();
|
|
440
444
|
chart.Tab.Frame=this.Frame;
|
|
441
445
|
chart.Tab.Canvas=this.Canvas;
|
|
442
446
|
chart.Tab.ChartBorder=this.Frame.ChartBorder;
|
|
443
447
|
chart.Tab.Report=chart;
|
|
448
|
+
|
|
449
|
+
chart.VScrollbar=new ChartVScrollbar();
|
|
450
|
+
chart.VScrollbar.Frame=this.Frame;
|
|
451
|
+
chart.VScrollbar.Canvas=this.Canvas;
|
|
452
|
+
chart.VScrollbar.ChartBorder=this.Frame.ChartBorder;
|
|
453
|
+
chart.VScrollbar.Report=chart;
|
|
454
|
+
chart.VScrollbar.IsShowCallback=()=>
|
|
455
|
+
{
|
|
456
|
+
if (this.DragYScroll) return true;
|
|
457
|
+
return this.IsShowVScrollbar;
|
|
458
|
+
}
|
|
459
|
+
|
|
444
460
|
this.ChartPaint[0]=chart;
|
|
445
461
|
|
|
446
462
|
//页脚
|
|
@@ -662,6 +678,16 @@ function JSReportChartContainer(uielement)
|
|
|
662
678
|
if (IFrameSplitOperator.IsNumber(item.Field)) this.SortInfo.Field=item.Field;
|
|
663
679
|
if (IFrameSplitOperator.IsNumber(item.Sort)) this.SortInfo.Sort=item.Sort;
|
|
664
680
|
}
|
|
681
|
+
|
|
682
|
+
if (IFrameSplitOperator.IsBool(option.IsReloadStockList))
|
|
683
|
+
{
|
|
684
|
+
var requestOption={ Callback:null };
|
|
685
|
+
if (this.Symbol) requestOption.Callback=()=>{ this.RequestMemberListData(); };
|
|
686
|
+
this.MapStockData=new Map();
|
|
687
|
+
this.RequestStockListData(requestOption);
|
|
688
|
+
return;
|
|
689
|
+
}
|
|
690
|
+
|
|
665
691
|
}
|
|
666
692
|
|
|
667
693
|
this.RequestMemberListData();
|
|
@@ -1332,6 +1358,7 @@ function JSReportChartContainer(uielement)
|
|
|
1332
1358
|
this.UIOnMouseDown=function(e)
|
|
1333
1359
|
{
|
|
1334
1360
|
this.DragXScroll=null;
|
|
1361
|
+
this.DragYScroll=null;
|
|
1335
1362
|
this.DragHeader=null;
|
|
1336
1363
|
this.DragColumnWidth=null;
|
|
1337
1364
|
this.DragMove={ Click:{ X:e.clientX, Y:e.clientY }, Move:{X:e.clientX, Y:e.clientY}, PreMove:{X:e.clientX, Y:e.clientY } };
|
|
@@ -1408,6 +1435,38 @@ function JSReportChartContainer(uielement)
|
|
|
1408
1435
|
this.OnClickTab(tabData, e);
|
|
1409
1436
|
}
|
|
1410
1437
|
}
|
|
1438
|
+
else if (clickData.Type==5 && e.button==0) //右侧滚动条
|
|
1439
|
+
{
|
|
1440
|
+
var scroll=clickData.VScrollbar;
|
|
1441
|
+
if (scroll.Type==1) //顶部按钮
|
|
1442
|
+
{
|
|
1443
|
+
if (this.MoveYOffset(-1))
|
|
1444
|
+
{
|
|
1445
|
+
this.Draw();
|
|
1446
|
+
this.DelayUpdateStockData();
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
else if (scroll.Type==2) //底部按钮
|
|
1450
|
+
{
|
|
1451
|
+
if (this.MoveYOffset(1))
|
|
1452
|
+
{
|
|
1453
|
+
this.Draw();
|
|
1454
|
+
this.DelayUpdateStockData();
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
else if (scroll.Type==3) //滚动条
|
|
1458
|
+
{
|
|
1459
|
+
this.DragYScroll={ Click:{X:x, Y:y}, LastMove:{X:x, Y:y} };
|
|
1460
|
+
}
|
|
1461
|
+
else if (scroll.Type==4) //滚动条内部
|
|
1462
|
+
{
|
|
1463
|
+
if (this.SetYOffset(scroll.Pos))
|
|
1464
|
+
{
|
|
1465
|
+
this.Draw();
|
|
1466
|
+
this.DelayUpdateStockData();
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1411
1470
|
}
|
|
1412
1471
|
}
|
|
1413
1472
|
|
|
@@ -1454,6 +1513,7 @@ function JSReportChartContainer(uielement)
|
|
|
1454
1513
|
var mouseStatus={ Cursor:"default", Name:"Default"};; //鼠标状态
|
|
1455
1514
|
var report=this.GetReportChart();
|
|
1456
1515
|
var cell=null;
|
|
1516
|
+
var bDraw=false;
|
|
1457
1517
|
if (report)
|
|
1458
1518
|
{
|
|
1459
1519
|
var dragHeaderWidth=report.PtInHeaderDragBorder(x,y);
|
|
@@ -1466,6 +1526,18 @@ function JSReportChartContainer(uielement)
|
|
|
1466
1526
|
{
|
|
1467
1527
|
cell=report.PtInCell(x,y); //是否在单元格(EnableTooltip)
|
|
1468
1528
|
}
|
|
1529
|
+
|
|
1530
|
+
var scrollbar=report.VScrollbar;
|
|
1531
|
+
if (scrollbar.Enable)
|
|
1532
|
+
{
|
|
1533
|
+
var bShowScrollbar=report.PtInClient(x,y);
|
|
1534
|
+
this.IsShowVScrollbar=bShowScrollbar;
|
|
1535
|
+
if (!this.DragYScroll)
|
|
1536
|
+
{
|
|
1537
|
+
if (bShowScrollbar && !scrollbar.LastStatus.Draw) bDraw=true;
|
|
1538
|
+
else if (!bShowScrollbar && scrollbar.LastStatus.Draw) bDraw=true;
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1469
1541
|
}
|
|
1470
1542
|
|
|
1471
1543
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_MOUSE_MOVE);
|
|
@@ -1476,16 +1548,32 @@ function JSReportChartContainer(uielement)
|
|
|
1476
1548
|
}
|
|
1477
1549
|
|
|
1478
1550
|
if (mouseStatus) this.UIElement.style.cursor=mouseStatus.Cursor;
|
|
1551
|
+
|
|
1552
|
+
if (bDraw) this.Draw();
|
|
1479
1553
|
}
|
|
1480
1554
|
|
|
1481
1555
|
this.UIOnMounseOut=function(e)
|
|
1482
1556
|
{
|
|
1557
|
+
var bDraw=false;
|
|
1483
1558
|
var tabChart=this.GetTabChart();
|
|
1484
1559
|
if (tabChart && tabChart.MoveOnTabIndex>=0)
|
|
1485
1560
|
{
|
|
1486
1561
|
tabChart.MoveOnTabIndex=-1;
|
|
1562
|
+
bDraw=true;
|
|
1487
1563
|
this.Draw();
|
|
1488
1564
|
}
|
|
1565
|
+
|
|
1566
|
+
var scrollbar=this.GetVScrollbarChart();
|
|
1567
|
+
if (scrollbar.Enable)
|
|
1568
|
+
{
|
|
1569
|
+
this.IsShowVScrollbar=false;
|
|
1570
|
+
if (!this.DragYScroll)
|
|
1571
|
+
{
|
|
1572
|
+
if (scrollbar.LastStatus.Draw) bDraw=true;
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
if (bDraw) this.Draw();
|
|
1489
1577
|
}
|
|
1490
1578
|
|
|
1491
1579
|
this.UIOnMouseleave=function(e)
|
|
@@ -1577,6 +1665,21 @@ function JSReportChartContainer(uielement)
|
|
|
1577
1665
|
var pos=chart.Tab.GetScrollPostionByPoint(x,y);
|
|
1578
1666
|
if (this.SetXOffset(pos)) this.Draw();
|
|
1579
1667
|
}
|
|
1668
|
+
else if (this.DragYScroll)
|
|
1669
|
+
{
|
|
1670
|
+
var chart=this.ChartPaint[0];
|
|
1671
|
+
if (!chart || !chart.VScrollbar) return;
|
|
1672
|
+
|
|
1673
|
+
this.DragYScroll.LastMove.X=x;
|
|
1674
|
+
this.DragYScroll.LastMove.Y=y;
|
|
1675
|
+
|
|
1676
|
+
var pos=chart.VScrollbar.GetScrollPostionByPoint(x,y);
|
|
1677
|
+
if (this.SetYOffset(pos))
|
|
1678
|
+
{
|
|
1679
|
+
this.Draw();
|
|
1680
|
+
this.DelayUpdateStockData();
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1580
1683
|
else if (this.DragHeader && this.DragHeader.ClickData) //表头拖拽
|
|
1581
1684
|
{
|
|
1582
1685
|
if (this.DragHeader.ClickData.Header.IsFixed) return;
|
|
@@ -1719,6 +1822,11 @@ function JSReportChartContainer(uielement)
|
|
|
1719
1822
|
|
|
1720
1823
|
this.DragHeader=null;
|
|
1721
1824
|
this.DragXScroll=null;
|
|
1825
|
+
if (this.DragYScroll)
|
|
1826
|
+
{
|
|
1827
|
+
bRedraw=true;
|
|
1828
|
+
this.DragYScroll=null;
|
|
1829
|
+
}
|
|
1722
1830
|
this.DragRow=null;
|
|
1723
1831
|
this.DragMove=null;
|
|
1724
1832
|
this.DragColumnWidth=null;
|
|
@@ -2027,6 +2135,14 @@ function JSReportChartContainer(uielement)
|
|
|
2027
2135
|
return chart.Tab;
|
|
2028
2136
|
}
|
|
2029
2137
|
|
|
2138
|
+
this.GetVScrollbarChart=function()
|
|
2139
|
+
{
|
|
2140
|
+
var chart=this.ChartPaint[0];
|
|
2141
|
+
if (!chart) return null;
|
|
2142
|
+
|
|
2143
|
+
return chart.VScrollbar;
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2030
2146
|
this.GetReportChart=function()
|
|
2031
2147
|
{
|
|
2032
2148
|
var chart=this.ChartPaint[0];
|
|
@@ -2318,6 +2434,21 @@ function JSReportChartContainer(uielement)
|
|
|
2318
2434
|
return true;
|
|
2319
2435
|
}
|
|
2320
2436
|
|
|
2437
|
+
this.SetYOffset=function(pos)
|
|
2438
|
+
{
|
|
2439
|
+
if (!IFrameSplitOperator.IsNumber(pos)) return false;
|
|
2440
|
+
var chart=this.ChartPaint[0];
|
|
2441
|
+
if (!chart) return false;
|
|
2442
|
+
|
|
2443
|
+
var maxOffset=chart.GetYScrollRange();
|
|
2444
|
+
if (pos<0) pos=0;
|
|
2445
|
+
if (pos>maxOffset) pos=maxOffset;
|
|
2446
|
+
|
|
2447
|
+
this.Data.YOffset=pos;
|
|
2448
|
+
|
|
2449
|
+
return true;
|
|
2450
|
+
}
|
|
2451
|
+
|
|
2321
2452
|
this.GotoLastPage=function()
|
|
2322
2453
|
{
|
|
2323
2454
|
var chart=this.ChartPaint[0];
|
|
@@ -2354,6 +2485,17 @@ function JSReportChartContainer(uielement)
|
|
|
2354
2485
|
if (option && option.Redraw) this.Draw();
|
|
2355
2486
|
}
|
|
2356
2487
|
|
|
2488
|
+
this.SetVScrollbar=function(option)
|
|
2489
|
+
{
|
|
2490
|
+
var chart=this.GetReportChart();
|
|
2491
|
+
if (!chart) return;
|
|
2492
|
+
|
|
2493
|
+
var scrollbar=chart.VScrollbar;
|
|
2494
|
+
if (!scrollbar) return;
|
|
2495
|
+
|
|
2496
|
+
if (IFrameSplitOperator.IsBool(option.Enable)) scrollbar.Enable=option.Enable;
|
|
2497
|
+
}
|
|
2498
|
+
|
|
2357
2499
|
this.SetSelectedTab=function(index, opiton)
|
|
2358
2500
|
{
|
|
2359
2501
|
var chart=this.ChartPaint[0];;
|
|
@@ -3047,6 +3189,7 @@ function ChartReport()
|
|
|
3047
3189
|
this.DragRow; //拖拽行
|
|
3048
3190
|
|
|
3049
3191
|
this.Tab;
|
|
3192
|
+
this.VScrollbar;
|
|
3050
3193
|
|
|
3051
3194
|
this.GlobalOption;
|
|
3052
3195
|
|
|
@@ -3229,6 +3372,7 @@ function ChartReport()
|
|
|
3229
3372
|
}
|
|
3230
3373
|
|
|
3231
3374
|
if (this.Tab) this.Tab.ReloadResource(resource);
|
|
3375
|
+
if (this.VScrollbar) this.VScrollbar.ReloadResource(resource);
|
|
3232
3376
|
}
|
|
3233
3377
|
|
|
3234
3378
|
this.SetColumn=function(aryColumn)
|
|
@@ -3328,6 +3472,15 @@ function ChartReport()
|
|
|
3328
3472
|
var maxOffset=this.Column.length-this.FixedColumn-3;
|
|
3329
3473
|
if (maxOffset<0) return 0;
|
|
3330
3474
|
|
|
3475
|
+
return maxOffset;
|
|
3476
|
+
}
|
|
3477
|
+
|
|
3478
|
+
this.GetYScrollRange=function()
|
|
3479
|
+
{
|
|
3480
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return 0;
|
|
3481
|
+
|
|
3482
|
+
var maxOffset=this.Data.Data.length-this.RowCount;
|
|
3483
|
+
|
|
3331
3484
|
return maxOffset;
|
|
3332
3485
|
}
|
|
3333
3486
|
|
|
@@ -3424,6 +3577,12 @@ function ChartReport()
|
|
|
3424
3577
|
|
|
3425
3578
|
this.DrawDragRow();
|
|
3426
3579
|
|
|
3580
|
+
if (this.VScrollbar)
|
|
3581
|
+
{
|
|
3582
|
+
var bottom=this.ChartBorder.GetBottom();
|
|
3583
|
+
this.VScrollbar.DrawScrollbar(this.RectClient.Left,this.RectClient.Top+this.HeaderHeight, this.RectClient.Right, bottom-this.BottomToolbarHeight-4);
|
|
3584
|
+
}
|
|
3585
|
+
|
|
3427
3586
|
this.SizeChange=false;
|
|
3428
3587
|
}
|
|
3429
3588
|
|
|
@@ -3477,6 +3636,8 @@ function ChartReport()
|
|
|
3477
3636
|
this.BottomToolbarHeight=0;
|
|
3478
3637
|
}
|
|
3479
3638
|
|
|
3639
|
+
if (this.VScrollbar && this.VScrollbar.Enable) this.VScrollbar.CalculateSize();
|
|
3640
|
+
|
|
3480
3641
|
this.UpdateCacheData();
|
|
3481
3642
|
|
|
3482
3643
|
var pixelRatio=GetDevicePixelRatio();
|
|
@@ -5037,7 +5198,7 @@ function ChartReport()
|
|
|
5037
5198
|
return GetFontHeight(this.Canvas, font, word);
|
|
5038
5199
|
}
|
|
5039
5200
|
|
|
5040
|
-
this.OnMouseDown=function(x,y,e) //Type: 1=tab 4=固定行 2=行 3=表头
|
|
5201
|
+
this.OnMouseDown=function(x,y,e) //Type: 1=tab 4=固定行 2=行 3=表头 5=右侧滚动条
|
|
5041
5202
|
{
|
|
5042
5203
|
if (!this.Data) return null;
|
|
5043
5204
|
|
|
@@ -5047,6 +5208,12 @@ function ChartReport()
|
|
|
5047
5208
|
if (tab) return { Type:1, Tab: tab }; //底部工具栏
|
|
5048
5209
|
}
|
|
5049
5210
|
|
|
5211
|
+
if (this.VScrollbar)
|
|
5212
|
+
{
|
|
5213
|
+
var item=this.VScrollbar.OnMouseDown(x,y,e);
|
|
5214
|
+
if (item) return { Type:5, VScrollbar:item }; //右侧滚动条
|
|
5215
|
+
}
|
|
5216
|
+
|
|
5050
5217
|
var pixelTatio = GetDevicePixelRatio();
|
|
5051
5218
|
var insidePoint={X:x/pixelTatio, Y:y/pixelTatio};
|
|
5052
5219
|
|
|
@@ -5171,6 +5338,13 @@ function ChartReport()
|
|
|
5171
5338
|
return false;
|
|
5172
5339
|
}
|
|
5173
5340
|
|
|
5341
|
+
this.PtInClient=function(x,y)
|
|
5342
|
+
{
|
|
5343
|
+
if (x>this.RectClient.Left && x<this.RectClient.Right && y>this.RectClient.Top && y<this.RectClient.Bottom) return true;
|
|
5344
|
+
|
|
5345
|
+
return false;
|
|
5346
|
+
}
|
|
5347
|
+
|
|
5174
5348
|
this.PtInBody=function(x,y)
|
|
5175
5349
|
{
|
|
5176
5350
|
if (!this.Data) return null;
|
|
@@ -5801,3 +5975,161 @@ function ChartReportPageInfo()
|
|
|
5801
5975
|
this.SizeChange=false;
|
|
5802
5976
|
}
|
|
5803
5977
|
}
|
|
5978
|
+
|
|
5979
|
+
|
|
5980
|
+
function ChartVScrollbar()
|
|
5981
|
+
{
|
|
5982
|
+
this.Canvas; //画布
|
|
5983
|
+
this.ChartBorder; //边框信息
|
|
5984
|
+
this.ChartFrame; //框架画法
|
|
5985
|
+
this.Name; //名称
|
|
5986
|
+
this.ClassName='ChartReportTab'; //类名
|
|
5987
|
+
this.IsDrawFirst=false;
|
|
5988
|
+
this.GetEventCallback; //获取事件
|
|
5989
|
+
this.Report;
|
|
5990
|
+
|
|
5991
|
+
this.MaxPos=15; //滚动条可移动长度
|
|
5992
|
+
this.CurrentPos=15; //当前滚动条移动位置
|
|
5993
|
+
this.Step=1; //滚动条移动步长
|
|
5994
|
+
this.ButtonSize=25;
|
|
5995
|
+
this.Enable=false;
|
|
5996
|
+
this.LastStatus={ Draw:false, };
|
|
5997
|
+
this.GlobalOption;
|
|
5998
|
+
|
|
5999
|
+
this.ScrollBarHeight=g_JSChartResource.Report.VScrollbar.ScrollBarHeight;
|
|
6000
|
+
this.ButtonColor=g_JSChartResource.Report.VScrollbar.ButtonColor;
|
|
6001
|
+
this.BarColor=g_JSChartResource.Report.VScrollbar.BarColor;
|
|
6002
|
+
this.BorderColor=g_JSChartResource.Report.VScrollbar.BorderColor;
|
|
6003
|
+
this.BGColor=g_JSChartResource.Report.VScrollbar.BGColor;
|
|
6004
|
+
this.Mergin={ Left:2, Right:2, Top:2, Bottom:2 };
|
|
6005
|
+
this.BarWithConfig={ Size:g_JSChartResource.Report.VScrollbar.BarWidth.Size };
|
|
6006
|
+
|
|
6007
|
+
this.RectScroll={ Top:null, Bottom:null, Bar:null, Client:null }; //滚动条区域
|
|
6008
|
+
|
|
6009
|
+
this.ReloadResource=function(resource)
|
|
6010
|
+
{
|
|
6011
|
+
this.ScrollBarHeight=g_JSChartResource.Report.VScrollbar.ScrollBarHeight;
|
|
6012
|
+
this.ButtonColor=g_JSChartResource.Report.VScrollbar.ButtonColor;
|
|
6013
|
+
this.BarColor=g_JSChartResource.Report.VScrollbar.BarColor;
|
|
6014
|
+
this.BorderColor=g_JSChartResource.Report.VScrollbar.BorderColor;
|
|
6015
|
+
this.BGColor=g_JSChartResource.Report.VScrollbar.BGColor;
|
|
6016
|
+
this.BarWithConfig={ Size:g_JSChartResource.Report.VScrollbar.BarWidth.Size };
|
|
6017
|
+
}
|
|
6018
|
+
|
|
6019
|
+
this.CalculateSize=function()
|
|
6020
|
+
{
|
|
6021
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
6022
|
+
|
|
6023
|
+
var width=this.BarWithConfig.Size*pixelRatio+this.Mergin.Left+this.Mergin.Right;
|
|
6024
|
+
this.ButtonSize=Math.min(25, width);
|
|
6025
|
+
}
|
|
6026
|
+
|
|
6027
|
+
this.DrawScrollbar=function(left, top, right, bottom)
|
|
6028
|
+
{
|
|
6029
|
+
this.LastStatus.Draw=false;
|
|
6030
|
+
this.RectScroll={ Left:null, Right:null, Bar:null, Client:null };
|
|
6031
|
+
if (!this.Enable) return;
|
|
6032
|
+
|
|
6033
|
+
var isShow=this.IsShowCallback();
|
|
6034
|
+
if (!isShow) return;
|
|
6035
|
+
|
|
6036
|
+
var pageInfo=this.Report.GetCurrentPageStatus();
|
|
6037
|
+
if (pageInfo.IsSinglePage) return;
|
|
6038
|
+
|
|
6039
|
+
var xOffset=pageInfo.Start;
|
|
6040
|
+
var dataCount=pageInfo.DataCount-pageInfo.PageSize;
|
|
6041
|
+
var buttonSize=this.ButtonSize;
|
|
6042
|
+
|
|
6043
|
+
this.MaxPos=dataCount;
|
|
6044
|
+
this.CurrentPos=xOffset;
|
|
6045
|
+
|
|
6046
|
+
var rtTop={ Right:right-this.Mergin.Right, Top:top+this.Mergin.Top, Width:buttonSize, Height:buttonSize };
|
|
6047
|
+
rtTop.Left=rtTop.Right-buttonSize;
|
|
6048
|
+
rtTop.Bottom=rtTop.Top+buttonSize;
|
|
6049
|
+
|
|
6050
|
+
var rtBottom={ Right:right-this.Mergin.Right, Bottom:bottom-this.Mergin.Bottom, Width:buttonSize, Height:buttonSize };
|
|
6051
|
+
rtBottom.Left=rtBottom.Right-buttonSize;
|
|
6052
|
+
rtBottom.Top=rtBottom.Bottom-buttonSize;
|
|
6053
|
+
|
|
6054
|
+
var centerHeight=(rtBottom.Top-2)-(rtTop.Bottom+2);
|
|
6055
|
+
var value = centerHeight - this.ScrollBarHeight;
|
|
6056
|
+
var yOffset = (value * this.CurrentPos) / this.MaxPos;
|
|
6057
|
+
var y = rtTop.Bottom + 2 + yOffset;
|
|
6058
|
+
|
|
6059
|
+
var rtBar = {Right:right-this.Mergin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
|
|
6060
|
+
rtBar.Left=rtBar.Right-buttonSize;
|
|
6061
|
+
rtBar.Bottom=rtBar.Top+rtBar.Height;
|
|
6062
|
+
|
|
6063
|
+
this.RectScroll.Top=rtTop;
|
|
6064
|
+
this.RectScroll.Bottom=rtBottom;
|
|
6065
|
+
this.RectScroll.Bar=rtBar;
|
|
6066
|
+
this.RectScroll.Client={ Left:rtTop.Left, Right: rtTop.Right, Top:rtTop.Bottom, Bottom:rtBottom.Top };
|
|
6067
|
+
|
|
6068
|
+
var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Mergin.Right+this.Mergin.Left };
|
|
6069
|
+
rtBG.Left=rtBG.Right-rtBG.Width;
|
|
6070
|
+
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
6071
|
+
this.Canvas.fillStyle=this.BGColor;
|
|
6072
|
+
this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
|
|
6073
|
+
|
|
6074
|
+
this.Canvas.fillStyle=this.ButtonColor;
|
|
6075
|
+
this.Canvas.fillRect(rtTop.Left,rtTop.Top,rtTop.Width,rtTop.Height);
|
|
6076
|
+
this.Canvas.fillRect(rtBottom.Left,rtBottom.Top,rtBottom.Width,rtBottom.Height);
|
|
6077
|
+
|
|
6078
|
+
this.Canvas.strokeStyle=this.BorderColor;
|
|
6079
|
+
this.Canvas.strokeRect(rtTop.Left,rtTop.Top,rtTop.Width,rtTop.Height);
|
|
6080
|
+
this.Canvas.strokeRect(rtBottom.Left,rtBottom.Top,rtBottom.Width,rtBottom.Height);
|
|
6081
|
+
|
|
6082
|
+
this.Canvas.fillStyle=this.BarColor;
|
|
6083
|
+
this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);
|
|
6084
|
+
|
|
6085
|
+
this.LastStatus.Draw=true;
|
|
6086
|
+
}
|
|
6087
|
+
|
|
6088
|
+
this.OnMouseDown=function(x,y, e)
|
|
6089
|
+
{
|
|
6090
|
+
return this.PtInScroll(x,y);
|
|
6091
|
+
}
|
|
6092
|
+
|
|
6093
|
+
// Type 1-4 滚动条
|
|
6094
|
+
this.PtInScroll=function(x,y)
|
|
6095
|
+
{
|
|
6096
|
+
if (!this.RectScroll) return null;
|
|
6097
|
+
|
|
6098
|
+
if (this.RectScroll.Top)
|
|
6099
|
+
{
|
|
6100
|
+
var rtItem=this.RectScroll.Top;
|
|
6101
|
+
if (x>=rtItem.Left && x<=rtItem.Right && y>=rtItem.Top && y<=rtItem.Bottom) return { Type: 1, Rect: rtItem };
|
|
6102
|
+
}
|
|
6103
|
+
|
|
6104
|
+
if (this.RectScroll.Bottom)
|
|
6105
|
+
{
|
|
6106
|
+
var rtItem=this.RectScroll.Bottom;
|
|
6107
|
+
if (x>=rtItem.Left && x<=rtItem.Right && y>=rtItem.Top && y<=rtItem.Bottom) return { Type: 2, Rect: rtItem };
|
|
6108
|
+
}
|
|
6109
|
+
|
|
6110
|
+
if (this.RectScroll.Bar)
|
|
6111
|
+
{
|
|
6112
|
+
var rtItem=this.RectScroll.Bar;
|
|
6113
|
+
if (x>=rtItem.Left && x<=rtItem.Right && y>=rtItem.Top && y<=rtItem.Bottom) return { Type: 3, Rect: rtItem };
|
|
6114
|
+
}
|
|
6115
|
+
|
|
6116
|
+
if (this.RectScroll.Client)
|
|
6117
|
+
{
|
|
6118
|
+
var rtItem=this.RectScroll.Client;
|
|
6119
|
+
if (x>=rtItem.Left && x<=rtItem.Right && y>=rtItem.Top && y<=rtItem.Bottom)
|
|
6120
|
+
{
|
|
6121
|
+
return { Type: 4, Rect: rtItem , Pos: this.GetScrollPostionByPoint(x,y) };
|
|
6122
|
+
}
|
|
6123
|
+
}
|
|
6124
|
+
|
|
6125
|
+
return null;
|
|
6126
|
+
}
|
|
6127
|
+
|
|
6128
|
+
this.GetScrollPostionByPoint=function(x,y)
|
|
6129
|
+
{
|
|
6130
|
+
var rtItem=this.RectScroll.Client;
|
|
6131
|
+
var value=rtItem.Bottom-rtItem.Top-this.ScrollBarHeight;
|
|
6132
|
+
var pos =parseInt((this.MaxPos * (y - rtItem.Top)) / value);
|
|
6133
|
+
return pos;
|
|
6134
|
+
}
|
|
6135
|
+
}
|
|
@@ -595,6 +595,16 @@ function GetBlackStyle()
|
|
|
595
595
|
|
|
596
596
|
MoveRowColor:'rgb(135,206,250)',
|
|
597
597
|
SrcRowColor:'rgb(49,48,56)',
|
|
598
|
+
},
|
|
599
|
+
|
|
600
|
+
VScrollbar:
|
|
601
|
+
{
|
|
602
|
+
BarWidth:40,
|
|
603
|
+
ScrollBarHeight:60,
|
|
604
|
+
ButtonColor:"rgba(13,12,15,0.8)",
|
|
605
|
+
BarColor:"rgba(48,48,48,0.9)",
|
|
606
|
+
BorderColor:'rgba(48,48,48,0.9)',
|
|
607
|
+
BGColor:"rgba(211,211,211,0.5)",
|
|
598
608
|
}
|
|
599
609
|
},
|
|
600
610
|
|