hqchart 1.1.13983 → 1.1.13989
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 +353 -384
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +14 -7
- package/src/jscommon/umychart.js +13 -328
- package/src/jscommon/umychart.resource/css/tools.css +21 -0
- package/src/jscommon/umychart.style.js +7 -2
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +21 -331
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +35 -338
package/package.json
CHANGED
|
@@ -29,6 +29,9 @@ function JSDialogTooltip()
|
|
|
29
29
|
this.BGColor=g_JSChartResource.DialogTooltip.BGColor;
|
|
30
30
|
this.BorderColor=g_JSChartResource.DialogTooltip.BorderColor;
|
|
31
31
|
|
|
32
|
+
this.TextColor=g_JSChartResource.DialogTooltip.TextColor;
|
|
33
|
+
this.ValueColor=g_JSChartResource.DialogTooltip.ValueColor;
|
|
34
|
+
|
|
32
35
|
this.VolColor=g_JSChartResource.DialogTooltip.VolColor;
|
|
33
36
|
this.AmountColor=g_JSChartResource.DialogTooltip.AmountColor;
|
|
34
37
|
this.TurnoverRateColor=g_JSChartResource.DialogTooltip.TurnoverRateColor;
|
|
@@ -284,7 +287,7 @@ function JSDialogTooltip()
|
|
|
284
287
|
var item=this.AryData[index];
|
|
285
288
|
|
|
286
289
|
item.TitleSpan.innerText=outItem.Title;
|
|
287
|
-
item.TitleSpan.style.color=this.
|
|
290
|
+
item.TitleSpan.style.color=this.TextColor;
|
|
288
291
|
item.TextSpan.innerText=outItem.Text;
|
|
289
292
|
item.TextSpan.style.color=outItem.Color;
|
|
290
293
|
item.Tr.style.display="";
|
|
@@ -553,6 +556,9 @@ function JSDialogTooltip()
|
|
|
553
556
|
this.PositionColor=g_JSChartResource.DialogTooltip.PositionColor;
|
|
554
557
|
this.DateTimeColor=g_JSChartResource.DialogTooltip.DateTimeColor;
|
|
555
558
|
|
|
559
|
+
this.TextColor=g_JSChartResource.DialogTooltip.TextColor;
|
|
560
|
+
this.ValueColor=g_JSChartResource.DialogTooltip.ValueColor;
|
|
561
|
+
|
|
556
562
|
if (!this.DivDialog) return;
|
|
557
563
|
|
|
558
564
|
this.UpdateStyle();
|
|
@@ -566,6 +572,7 @@ function JSDialogTooltip()
|
|
|
566
572
|
if (this.BorderColor) this.DivDialog.style['border-color']=this.BorderColor;
|
|
567
573
|
|
|
568
574
|
if (this.TitleBGColor) this.TitleBox.DivTitle.style['background-color']=this.TitleBGColor;
|
|
575
|
+
if (this.TitleColor) this.TitleBox.DivName.style['color']=this.TitleColor;
|
|
569
576
|
|
|
570
577
|
this.UpdateTableDOM();
|
|
571
578
|
},
|
|
@@ -579,7 +586,7 @@ function JSDialogTooltip()
|
|
|
579
586
|
{
|
|
580
587
|
Title:g_JSChartLocalization.GetText(TitleID, this.LanguageID),
|
|
581
588
|
Text:"--.--",
|
|
582
|
-
Color:this.
|
|
589
|
+
Color:this.ValueColor
|
|
583
590
|
};
|
|
584
591
|
|
|
585
592
|
if (!IFrameSplitOperator.IsNumber(price)) return item;
|
|
@@ -587,7 +594,7 @@ function JSDialogTooltip()
|
|
|
587
594
|
if (format==2)
|
|
588
595
|
{
|
|
589
596
|
item.Text=price.toFixed(defaultfloatPrecision);
|
|
590
|
-
item.Color=this.
|
|
597
|
+
item.Color=this.ValueColor;
|
|
591
598
|
return item;
|
|
592
599
|
}
|
|
593
600
|
|
|
@@ -613,7 +620,7 @@ function JSDialogTooltip()
|
|
|
613
620
|
{
|
|
614
621
|
Title:g_JSChartLocalization.GetText(TitleID,this.LanguageID),
|
|
615
622
|
Text:'--',
|
|
616
|
-
Color:this.
|
|
623
|
+
Color:this.ValueColor
|
|
617
624
|
};
|
|
618
625
|
|
|
619
626
|
if (!IFrameSplitOperator.IsNumber(value)) return item;
|
|
@@ -661,7 +668,7 @@ function JSDialogTooltip()
|
|
|
661
668
|
{
|
|
662
669
|
Title:g_JSChartLocalization.GetText(TitleID,this.LanguageID),
|
|
663
670
|
Text:"--.--",
|
|
664
|
-
Color:this.
|
|
671
|
+
Color:this.ValueColor
|
|
665
672
|
};
|
|
666
673
|
|
|
667
674
|
if (!IFrameSplitOperator.IsNumber(price) || !IFrameSplitOperator.IsNumber(yClose)) return item;
|
|
@@ -691,7 +698,7 @@ function JSDialogTooltip()
|
|
|
691
698
|
{
|
|
692
699
|
Title:g_JSChartLocalization.GetText(TitleID,this.LanguageID),
|
|
693
700
|
Text:"--.--",
|
|
694
|
-
Color:this.
|
|
701
|
+
Color:this.ValueColor
|
|
695
702
|
};
|
|
696
703
|
|
|
697
704
|
if (!IFrameSplitOperator.IsNumber(price) || !IFrameSplitOperator.IsNumber(yClose)) return item;
|
|
@@ -710,7 +717,7 @@ function JSDialogTooltip()
|
|
|
710
717
|
{
|
|
711
718
|
Title:g_JSChartLocalization.GetText(TitleID,this.LanguageID),
|
|
712
719
|
Text:"--.--",
|
|
713
|
-
Color:this.
|
|
720
|
+
Color:this.ValueColor
|
|
714
721
|
};
|
|
715
722
|
|
|
716
723
|
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -2449,7 +2449,7 @@ JSChart.GetScrollPosition=function()
|
|
|
2449
2449
|
|
|
2450
2450
|
var JSCHART_EVENT_ID=
|
|
2451
2451
|
{
|
|
2452
|
-
RECV_KLINE_MATCH:1, //接收到形态匹配
|
|
2452
|
+
//RECV_KLINE_MATCH:1, //接收到形态匹配
|
|
2453
2453
|
RECV_INDEX_DATA:2, //接收指标数据
|
|
2454
2454
|
RECV_HISTROY_DATA:3,//接收到历史数据
|
|
2455
2455
|
RECV_TRAIN_MOVE_STEP:4, //接收K线训练,移动一次K线
|
|
@@ -69210,13 +69210,19 @@ function JSChartResource()
|
|
|
69210
69210
|
this.DialogTooltip=
|
|
69211
69211
|
{
|
|
69212
69212
|
BGColor:'rgb(250,250,250)', //背景色
|
|
69213
|
-
BorderColor:'rgb(20,20,20)',
|
|
69214
|
-
TitleColor:'rgb(
|
|
69213
|
+
BorderColor:'rgb(20,20,20)', //边框颜色
|
|
69214
|
+
TitleColor:'rgb(250,250,250)', //标题颜色
|
|
69215
|
+
TitleBGColor:"rgb(200, 66, 69)", //标题背景颜色
|
|
69215
69216
|
VolColor:"rgb(255, 185, 15)", //标题成交量
|
|
69216
69217
|
AmountColor:"rgb(79, 79, 79)", //成交金额
|
|
69217
69218
|
DateTimeColor:'rgb(60,60,60)',
|
|
69218
69219
|
TurnoverRateColor:'rgb(43,54,69)', //换手率
|
|
69219
|
-
PositionColor:"rgb(255,0,255)" //持仓
|
|
69220
|
+
PositionColor:"rgb(255,0,255)", //持仓
|
|
69221
|
+
|
|
69222
|
+
TextColor:"rgb(0,0,0)", //数值名称
|
|
69223
|
+
ValueColor:"rgb(0,0,0)", //数值
|
|
69224
|
+
|
|
69225
|
+
|
|
69220
69226
|
},
|
|
69221
69227
|
|
|
69222
69228
|
//区间统计
|
|
@@ -70232,6 +70238,7 @@ function JSChartResource()
|
|
|
70232
70238
|
if (item.BGColor) this.DialogTooltip.BGColor=item.BGColor;
|
|
70233
70239
|
if (item.BorderColor) this.DialogTooltip.BorderColor=item.BorderColor;
|
|
70234
70240
|
if (item.TitleColor) this.DialogTooltip.TitleColor=item.TitleColor;
|
|
70241
|
+
if (item.TitleBGColor) this.DialogTooltip.TitleBGColor=item.TitleBGColor;
|
|
70235
70242
|
if (item.DateTimeColor) this.DialogTooltip.DateTimeColor=item.DateTimeColor;
|
|
70236
70243
|
|
|
70237
70244
|
if (item.VolColor) this.DialogTooltip.VolColor=item.VolColor;
|
|
@@ -70239,6 +70246,8 @@ function JSChartResource()
|
|
|
70239
70246
|
if (item.TurnoverRateColor) this.DialogTooltip.TurnoverRateColor=item.TurnoverRateColor;
|
|
70240
70247
|
if (item.PositionColor) this.DialogTooltip.PositionColor=item.PositionColor;
|
|
70241
70248
|
|
|
70249
|
+
if (item.TextColor) this.DialogTooltip.TextColor=item.TextColor;
|
|
70250
|
+
if (item.ValueColor) this.DialogTooltip.ValueColor=item.ValueColor;
|
|
70242
70251
|
}
|
|
70243
70252
|
|
|
70244
70253
|
if (style.DialogSelectRect)
|
|
@@ -78090,101 +78099,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
78090
78099
|
this.ChartDrawStorageCache=null; //清空缓存
|
|
78091
78100
|
}
|
|
78092
78101
|
|
|
78093
|
-
//形态匹配
|
|
78094
|
-
// scope.Plate 板块范围 scope.Symbol 股票范围
|
|
78095
|
-
// sample 样本数据
|
|
78096
|
-
this.RequestKLineMatch=function(sample,param)
|
|
78097
|
-
{
|
|
78098
|
-
var self =this;
|
|
78099
|
-
var scope=param.Scope;
|
|
78100
|
-
var waitDailog=param.WaitDialog;
|
|
78101
|
-
JSConsole.Chart.Log('[KLineChartContainer::RequestKLineMatch',sample,scope)
|
|
78102
|
-
|
|
78103
|
-
var aryDate=new Array();
|
|
78104
|
-
var aryValue=new Array();
|
|
78105
|
-
|
|
78106
|
-
for(var i=sample.Start;i<sample.End && i<sample.Data.Data.length;++i)
|
|
78107
|
-
{
|
|
78108
|
-
var item=sample.Data.Data[i];
|
|
78109
|
-
aryDate.push(item.Date);
|
|
78110
|
-
aryValue.push(item.Close);
|
|
78111
|
-
}
|
|
78112
|
-
|
|
78113
|
-
var sampleData=
|
|
78114
|
-
{
|
|
78115
|
-
Stock:sample.Stock,
|
|
78116
|
-
Index:{Start:sample.Start, End:sample.End}, //数据索引
|
|
78117
|
-
Date:{Start:aryDate[0], End:aryDate[aryDate.length-1]}, //起始 结束日期
|
|
78118
|
-
Minsimilar:scope.Minsimilar, //相似度
|
|
78119
|
-
Plate:scope.Plate,
|
|
78120
|
-
DayRegion:300
|
|
78121
|
-
};
|
|
78122
|
-
|
|
78123
|
-
//请求数据
|
|
78124
|
-
$.ajax({
|
|
78125
|
-
url: this.KLineMatchUrl,
|
|
78126
|
-
data:
|
|
78127
|
-
{
|
|
78128
|
-
"userid": "guest",
|
|
78129
|
-
"plate": scope.Plate,
|
|
78130
|
-
"period": this.Period,
|
|
78131
|
-
"right": this.Right,
|
|
78132
|
-
"dayregion": sampleData.DayRegion,
|
|
78133
|
-
"minsimilar": scope.Minsimilar,
|
|
78134
|
-
"sampledate":aryDate,
|
|
78135
|
-
"samplevalue":aryValue
|
|
78136
|
-
},
|
|
78137
|
-
type:"post",
|
|
78138
|
-
dataType: "json",
|
|
78139
|
-
async:true,
|
|
78140
|
-
success: function (data)
|
|
78141
|
-
{
|
|
78142
|
-
if (waitDailog) waitDailog.Close();
|
|
78143
|
-
self.RecvKLineMatchData(data,sampleData);
|
|
78144
|
-
},
|
|
78145
|
-
error:function(jqXHR, textStatus, errorThrown)
|
|
78146
|
-
{
|
|
78147
|
-
console.warn('[KLineChartContainer::RequestKLineMatch] failed',jqXHR,textStatus, errorThrown);
|
|
78148
|
-
if (waitDailog) waitDailog.Close();
|
|
78149
|
-
}
|
|
78150
|
-
});
|
|
78151
|
-
}
|
|
78152
|
-
|
|
78153
|
-
//接收形态选股结果
|
|
78154
|
-
this.RecvKLineMatchData=function(data,sample)
|
|
78155
|
-
{
|
|
78156
|
-
JSConsole.Chart.Log('[KLineChartContainer::RecvKLineMatchData] recv',data,sample);
|
|
78157
|
-
var filterData=[]; //结果数据
|
|
78158
|
-
for(var i in data.match)
|
|
78159
|
-
{
|
|
78160
|
-
var item=data.match[i];
|
|
78161
|
-
if (item.symbol==sample.Stock.Symbol) continue;
|
|
78162
|
-
|
|
78163
|
-
for(var j in item.data)
|
|
78164
|
-
{
|
|
78165
|
-
var dataItem=item.data[j];
|
|
78166
|
-
var newItem={Symbol:item.symbol, Name:item.name,Similar:dataItem.similar, Start:dataItem.start, End:dataItem.end};
|
|
78167
|
-
filterData.push(newItem);
|
|
78168
|
-
}
|
|
78169
|
-
}
|
|
78170
|
-
filterData.sort(function(a,b){return b.Similar-a.Similar;}); //排序
|
|
78171
|
-
JSConsole.Chart.Log('[KLineChartContainer::RecvKLineMatchData] filterData',filterData);
|
|
78172
|
-
|
|
78173
|
-
if (this.mapEvent.has(JSCHART_EVENT_ID.RECV_KLINE_MATCH))
|
|
78174
|
-
{
|
|
78175
|
-
var item=this.mapEvent.get(JSCHART_EVENT_ID.RECV_KLINE_MATCH);
|
|
78176
|
-
var data={Sample:sample, Match:filterData, Source:data}
|
|
78177
|
-
item.Callback(item,data,this);
|
|
78178
|
-
}
|
|
78179
|
-
else
|
|
78180
|
-
{
|
|
78181
|
-
var dlg=new KLineMatchDialog(this.Frame.ChartBorder.UIElement.parentNode);
|
|
78182
|
-
|
|
78183
|
-
var event={ data:{ Chart:this, MatchData:filterData, Sample:sample, Source:data} };
|
|
78184
|
-
dlg.DoModal(event);
|
|
78185
|
-
}
|
|
78186
|
-
}
|
|
78187
|
-
|
|
78188
78102
|
//更新信息地雷
|
|
78189
78103
|
this.UpdataChartInfo=function()
|
|
78190
78104
|
{
|
|
@@ -90713,235 +90627,6 @@ function ChangeIndexDialog(divElement)
|
|
|
90713
90627
|
}
|
|
90714
90628
|
}
|
|
90715
90629
|
|
|
90716
|
-
//形态选股
|
|
90717
|
-
function KLineMatchDialog(divElement)
|
|
90718
|
-
{
|
|
90719
|
-
this.newMethod=IDivDialog; //派生
|
|
90720
|
-
this.newMethod(divElement);
|
|
90721
|
-
delete this.newMethod;
|
|
90722
|
-
|
|
90723
|
-
this.MatchData; //匹配的股票数据
|
|
90724
|
-
this.Sample; //样本数据
|
|
90725
|
-
this.Dialog;
|
|
90726
|
-
this.HQChart;
|
|
90727
|
-
|
|
90728
|
-
this.PageData; //分页数据
|
|
90729
|
-
|
|
90730
|
-
//隐藏窗口
|
|
90731
|
-
this.Close=function()
|
|
90732
|
-
{
|
|
90733
|
-
this.DivElement.removeChild(this.Dialog);
|
|
90734
|
-
}
|
|
90735
|
-
|
|
90736
|
-
//创建
|
|
90737
|
-
this.Create=function()
|
|
90738
|
-
{
|
|
90739
|
-
this.ID=Guid();
|
|
90740
|
-
var div=document.createElement('div');
|
|
90741
|
-
div.className='jchart-kline-match-box';
|
|
90742
|
-
div.id=this.ID;
|
|
90743
|
-
div.innerHTML=
|
|
90744
|
-
`<div class='parameter jchart-kline-match-box'>
|
|
90745
|
-
<div class='parameter-header'>
|
|
90746
|
-
<span>形态匹配</span>
|
|
90747
|
-
<strong id='close' class='icon iconfont icon-close'></strong>
|
|
90748
|
-
</div>
|
|
90749
|
-
<div class='parameter-content'>
|
|
90750
|
-
<p class='dataCount'></p>
|
|
90751
|
-
<table class='matchTable'>
|
|
90752
|
-
<thead>
|
|
90753
|
-
<tr>
|
|
90754
|
-
<td>股票名称</td>
|
|
90755
|
-
<td>匹配度</td>
|
|
90756
|
-
<td>时间段</td>
|
|
90757
|
-
</tr>
|
|
90758
|
-
</thead>
|
|
90759
|
-
<tbody>
|
|
90760
|
-
</tbody>
|
|
90761
|
-
</table>
|
|
90762
|
-
<div class='pagination' data-current='1'></div>
|
|
90763
|
-
</div>
|
|
90764
|
-
<div class='parameter-footer'>
|
|
90765
|
-
<button id='close' class='submit' >确定</button>
|
|
90766
|
-
</div>
|
|
90767
|
-
</div>`.trim();
|
|
90768
|
-
|
|
90769
|
-
this.DivElement.appendChild(div);
|
|
90770
|
-
this.Dialog=div;
|
|
90771
|
-
|
|
90772
|
-
//关闭按钮
|
|
90773
|
-
$("#"+this.ID+" #close").click(
|
|
90774
|
-
{
|
|
90775
|
-
divBox:this,
|
|
90776
|
-
},
|
|
90777
|
-
function(event)
|
|
90778
|
-
{
|
|
90779
|
-
event.data.divBox.Close();
|
|
90780
|
-
});
|
|
90781
|
-
}
|
|
90782
|
-
|
|
90783
|
-
this.BindData=function()
|
|
90784
|
-
{
|
|
90785
|
-
JSConsole.Chart.Log(`[KLineMatchDialog::BindData] 形态源: ${this.Sample.Stock.Name} 区间:${this.Sample.Date.Start} - ${this.Sample.Date.End}`);
|
|
90786
|
-
var count = this.MatchData.length + 1;
|
|
90787
|
-
var pageData = {NewData:{},MetaData:[],PageCount:0,Count:count};
|
|
90788
|
-
var pageCount = 0;
|
|
90789
|
-
var paginationHtml = '';
|
|
90790
|
-
|
|
90791
|
-
$('#'+this.ID+' .dataCount').html('个数:'+count);
|
|
90792
|
-
|
|
90793
|
-
for(let i = 0; i < count ; i++){
|
|
90794
|
-
var dataObj = {};
|
|
90795
|
-
if(i == 0){
|
|
90796
|
-
dataObj = {
|
|
90797
|
-
Symbol:this.Sample.Stock.Symbol,
|
|
90798
|
-
Name:this.Sample.Stock.Name,
|
|
90799
|
-
Rate:'形态源',
|
|
90800
|
-
Color:'red',
|
|
90801
|
-
Date:`${this.Sample.Date.Start}-${this.Sample.Date.End}`
|
|
90802
|
-
};
|
|
90803
|
-
}else{
|
|
90804
|
-
let dataItem = this.MatchData[i - 1];
|
|
90805
|
-
dataObj = {
|
|
90806
|
-
Symbol:dataItem.Symbol,
|
|
90807
|
-
Name:dataItem.Name,
|
|
90808
|
-
Rate:Number(dataItem.Similar * 100).toFixed(2),
|
|
90809
|
-
Color:'',
|
|
90810
|
-
Date:`${dataItem.Start}-${dataItem.End}`
|
|
90811
|
-
};
|
|
90812
|
-
}
|
|
90813
|
-
pageData.MetaData.push(dataObj);
|
|
90814
|
-
}
|
|
90815
|
-
|
|
90816
|
-
if(pageData.Count % 10 == 0){
|
|
90817
|
-
pageCount = pageData.Count / 10;
|
|
90818
|
-
}else{
|
|
90819
|
-
pageCount = Math.floor(pageData.Count / 10) + 1;
|
|
90820
|
-
}
|
|
90821
|
-
pageData.PageCount = pageCount;
|
|
90822
|
-
|
|
90823
|
-
this.PaginationMetaData(pageData);
|
|
90824
|
-
this.PageData = pageData;
|
|
90825
|
-
JSConsole.Chart.Log('[KLineMatchDialog::DoModal pageData]',pageData);
|
|
90826
|
-
|
|
90827
|
-
this.RenderDom(1);
|
|
90828
|
-
|
|
90829
|
-
this.PaginationInit('#'+this.ID,pageData.PageCount,this.paginationCallback);
|
|
90830
|
-
// $('#' + this.ID + ' .pagination').html(paginationHtml);
|
|
90831
|
-
|
|
90832
|
-
|
|
90833
|
-
}
|
|
90834
|
-
this.RenderDom = function(page){
|
|
90835
|
-
let currentPageData = this.PageData.NewData[page];
|
|
90836
|
-
JSConsole.Chart.Log('[KLineMatchDialog::RenderDom currentPageData]',currentPageData);
|
|
90837
|
-
let bodyHtml = '';
|
|
90838
|
-
for(let i = 0; i < currentPageData.length; i++){
|
|
90839
|
-
bodyHtml += `<tr>
|
|
90840
|
-
<td class=${currentPageData[i].Color}>${currentPageData[i].Name}</td>
|
|
90841
|
-
<td class=${currentPageData[i].Color}>${currentPageData[i].Rate}</td>
|
|
90842
|
-
<td class=${currentPageData[i].Color}>${currentPageData[i].Date}</td>
|
|
90843
|
-
</tr>`.trim();
|
|
90844
|
-
}
|
|
90845
|
-
|
|
90846
|
-
$('#'+this.ID + ' .matchTable tbody').html(bodyHtml)
|
|
90847
|
-
}
|
|
90848
|
-
var _this = this;
|
|
90849
|
-
this.paginationCallback = function(page) {
|
|
90850
|
-
_this.RenderDom(page);
|
|
90851
|
-
_this.PaginationInit('#'+_this.ID,_this.PageData.PageCount,_this.paginationCallback); //更新UI
|
|
90852
|
-
}
|
|
90853
|
-
this.PaginationInit = function(id, maxPageNum, callback) { //初始化分页
|
|
90854
|
-
var spanStr = "";
|
|
90855
|
-
var currentPageNum = $(id + " .pagination").data("current");
|
|
90856
|
-
var lastPageNum = 0;
|
|
90857
|
-
var showCountPage = 5; //只显示5个数字项
|
|
90858
|
-
|
|
90859
|
-
if (currentPageNum < showCountPage) { //当前页小于预显示页数
|
|
90860
|
-
if (maxPageNum >= showCountPage) {
|
|
90861
|
-
for (var j = 0; j < showCountPage; j++) { //上 1 2 3 4 5 下
|
|
90862
|
-
spanStr += (j + 1) != currentPageNum ? "<span>" + (j + 1) + "</span>" : "<span class='active'>" + (j + 1) + "</span>";
|
|
90863
|
-
}
|
|
90864
|
-
} else {
|
|
90865
|
-
for (var j = 0; j < maxPageNum; j++) { //上 1 2 3 4 5 下
|
|
90866
|
-
spanStr += (j + 1) != currentPageNum ? "<span>" + (j + 1) + "</span>" : "<span class='active'>" + (j + 1) + "</span>";
|
|
90867
|
-
}
|
|
90868
|
-
}
|
|
90869
|
-
} else { //大于5时,最终页数是当前页数加1
|
|
90870
|
-
lastPageNum = (currentPageNum + 1) > maxPageNum ? currentPageNum : (currentPageNum + 1);
|
|
90871
|
-
|
|
90872
|
-
for (var i = currentPageNum - 3; i <= lastPageNum; i++) { //含最终项之前的五项
|
|
90873
|
-
spanStr += i != currentPageNum ? "<span>" + i + "</span>" : "<span class='active'>" + i + "</span>";
|
|
90874
|
-
}
|
|
90875
|
-
}
|
|
90876
|
-
|
|
90877
|
-
spanStr = "<span class='beforePage'>上一页</span>" + spanStr + "<span class='nextPage'>下一页</span>";
|
|
90878
|
-
$(id + " .pagination").html(spanStr);
|
|
90879
|
-
$(id + " .pagination span").bind('click', { "maxpage": maxPageNum, "Callback": callback }, this.PaginationCurrentIndex);
|
|
90880
|
-
// return spanStr;
|
|
90881
|
-
}
|
|
90882
|
-
|
|
90883
|
-
this.PaginationCurrentIndex = function(event) { //分页切换
|
|
90884
|
-
var text = $(this).text();
|
|
90885
|
-
JSConsole.Chart.Log('[::PaginationCurrentIndex text]',text);
|
|
90886
|
-
var currentPageNum = Number($(this).parent().data("current"));
|
|
90887
|
-
var maxPageNum = event.data.maxpage;
|
|
90888
|
-
var callback = event.data.Callback;
|
|
90889
|
-
var flag = 1;
|
|
90890
|
-
if (text === "上一页") {
|
|
90891
|
-
flag = currentPageNum === 1 ? currentPageNum : currentPageNum - 1;
|
|
90892
|
-
} else if (text === "下一页") {
|
|
90893
|
-
flag = currentPageNum === maxPageNum ? currentPageNum : currentPageNum + 1;
|
|
90894
|
-
} else {
|
|
90895
|
-
flag = Number(text);
|
|
90896
|
-
}
|
|
90897
|
-
$(this).parent().data("current", flag); //将当前页存到dom上
|
|
90898
|
-
callback(flag);
|
|
90899
|
-
}
|
|
90900
|
-
|
|
90901
|
-
this.PaginationMetaData = function(data){ //假分页数据,每页10条数据
|
|
90902
|
-
// data = {NewData:{},MetaData:[],PageCount:0,Callback:null};
|
|
90903
|
-
var newData = {};
|
|
90904
|
-
var metaData = data.MetaData;
|
|
90905
|
-
var pageCount = data.PageCount;
|
|
90906
|
-
|
|
90907
|
-
for(let i = 0; i < pageCount; i++){
|
|
90908
|
-
var itemArr = [];
|
|
90909
|
-
for(let j = 0; j < 10; j++){
|
|
90910
|
-
var itemIndex = 10*i + j;
|
|
90911
|
-
if(itemIndex <= metaData.length - 1){
|
|
90912
|
-
var item = metaData[itemIndex];
|
|
90913
|
-
itemArr.push(item);
|
|
90914
|
-
}else {
|
|
90915
|
-
break;
|
|
90916
|
-
}
|
|
90917
|
-
}
|
|
90918
|
-
newData[i+1] = itemArr;
|
|
90919
|
-
}
|
|
90920
|
-
data.NewData = newData;
|
|
90921
|
-
}
|
|
90922
|
-
|
|
90923
|
-
//显示
|
|
90924
|
-
this.DoModal=function(event)
|
|
90925
|
-
{
|
|
90926
|
-
var chart=event.data.Chart;
|
|
90927
|
-
if (this.ID==null) this.Create(); //第1次 需要创建div
|
|
90928
|
-
this.MatchData=event.data.MatchData;
|
|
90929
|
-
this.Sample=event.data.Sample;
|
|
90930
|
-
this.HQChart=chart;
|
|
90931
|
-
|
|
90932
|
-
this.BindData();
|
|
90933
|
-
|
|
90934
|
-
|
|
90935
|
-
//居中显示
|
|
90936
|
-
var border=chart.Frame.ChartBorder;
|
|
90937
|
-
var scrollPos=GetScrollPosition();
|
|
90938
|
-
var left=border.GetWidth()/2;
|
|
90939
|
-
var top=border.GetHeight()/2;
|
|
90940
|
-
|
|
90941
|
-
this.Show(left,top,200,200); //显示
|
|
90942
|
-
}
|
|
90943
|
-
}
|
|
90944
|
-
|
|
90945
90630
|
//等待动画窗口
|
|
90946
90631
|
function WaitDialog(divElement)
|
|
90947
90632
|
{
|
|
@@ -1774,18 +1774,39 @@ input[type="color"] {
|
|
|
1774
1774
|
background: rgb(225, 225, 225);
|
|
1775
1775
|
border: 1px solid rgb(173, 173, 173);
|
|
1776
1776
|
margin-left: 5px;
|
|
1777
|
+
|
|
1778
|
+
-moz-user-select:none;
|
|
1779
|
+
-webkit-user-select: none;
|
|
1780
|
+
-ms-user-select: none;
|
|
1781
|
+
-khtml-user-selece:none;
|
|
1782
|
+
|
|
1783
|
+
user-select: none;
|
|
1777
1784
|
}
|
|
1778
1785
|
|
|
1779
1786
|
.UMyChart_SelectRect_DateTitle_Span
|
|
1780
1787
|
{
|
|
1781
1788
|
padding-right: 4px;
|
|
1782
1789
|
padding-left: 4px;
|
|
1790
|
+
|
|
1791
|
+
-moz-user-select:none;
|
|
1792
|
+
-webkit-user-select: none;
|
|
1793
|
+
-ms-user-select: none;
|
|
1794
|
+
-khtml-user-selece:none;
|
|
1795
|
+
|
|
1796
|
+
user-select: none;
|
|
1783
1797
|
}
|
|
1784
1798
|
|
|
1785
1799
|
.UMyChart_SelectRect_DateValue_Span
|
|
1786
1800
|
{
|
|
1787
1801
|
padding-right: 4px;
|
|
1788
1802
|
padding-left: 4px;
|
|
1803
|
+
|
|
1804
|
+
-moz-user-select:none;
|
|
1805
|
+
-webkit-user-select: none;
|
|
1806
|
+
-ms-user-select: none;
|
|
1807
|
+
-khtml-user-selece:none;
|
|
1808
|
+
|
|
1809
|
+
user-select: none;
|
|
1789
1810
|
}
|
|
1790
1811
|
|
|
1791
1812
|
.UMyChart_SelectRect_Table
|
|
@@ -398,12 +398,17 @@ function GetBlackStyle()
|
|
|
398
398
|
{
|
|
399
399
|
BGColor:'rgb(20,20,20)', //背景色
|
|
400
400
|
BorderColor:'rgb(170,170,170)', //边框颜色
|
|
401
|
-
TitleColor:'rgb(
|
|
401
|
+
TitleColor:'rgb(250,250,250)', //标题颜色
|
|
402
402
|
VolColor:"rgb(255, 185, 15)", //标题成交量
|
|
403
403
|
AmountColor:"rgb(210,210,210)", //成交金额
|
|
404
404
|
DateTimeColor:'rgb(210,210,210)',
|
|
405
405
|
TurnoverRateColor:'rgb(43,54,69)', //换手率
|
|
406
|
-
PositionColor:"rgb(255,0,255)" //持仓
|
|
406
|
+
PositionColor:"rgb(255,0,255)", //持仓
|
|
407
|
+
|
|
408
|
+
TextColor:"rgb(210,210,210)", //数值名称
|
|
409
|
+
ValueColor:"rgb(210,210,210)", //数值
|
|
410
|
+
|
|
411
|
+
TitleBGColor:"rgb(200, 66, 69)",
|
|
407
412
|
},
|
|
408
413
|
|
|
409
414
|
DialogSelectRect:
|