hqchart 1.1.12693 → 1.1.12706
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/package.json +15 -47
- package/src/jscommon/umychart.resource/js/codemirror/javascript.js +1 -1
- package/.babelrc +0 -6
- package/.vscode/settings.json +0 -4
- package/Makefile +0 -9
- package/README.md +0 -452
- package/index.js +0 -17
- package/postcss.config.js +0 -5
- package/src/index.html +0 -18
- package/src/jscommon/backup/announcement.png +0 -0
- package/src/jscommon/backup/announcement2.png +0 -0
- package/src/jscommon/backup/blocktrading.png +0 -0
- package/src/jscommon/backup/investor.png +0 -0
- package/src/jscommon/backup/pforecast.png +0 -0
- package/src/jscommon/backup/research.png +0 -0
- package/src/jscommon/backup/tradedetail.png +0 -0
- package/src/jscommon/backup/umychart - backup.js +0 -17631
- package/src/jscommon/backup/umychart.macro.js +0 -4
- package/src/jscommon/backup/umychart.macro.vue.js +0 -3
- package/src/jscommon/commonindextree.json +0 -92
- package/src/jscommon/index.html +0 -13
- package/src/jscommon/jschinamapdata.js +0 -3
- package/src/jscommon/umychart.NetworkFilterTest.js +0 -48803
- package/src/jscommon/umychart.aliYunnetwork.js +0 -47
- package/src/jscommon/umychart.cninfo.components/readme.txt +0 -1
- package/src/jscommon/umychart.complier.js +0 -25293
- package/src/jscommon/umychart.complier.node/umychart.complier.controller.js +0 -559
- package/src/jscommon/umychart.complier.node/umychart.complier.node.js +0 -7043
- package/src/jscommon/umychart.complier.node/umychart.data.node.js +0 -816
- package/src/jscommon/umychart.console.js +0 -12
- package/src/jscommon/umychart.deal.js +0 -1452
- package/src/jscommon/umychart.dragdiv.js +0 -48
- package/src/jscommon/umychart.index.data.js +0 -4132
- package/src/jscommon/umychart.js +0 -90542
- package/src/jscommon/umychart.keyboard.js +0 -1659
- package/src/jscommon/umychart.listctrl.js +0 -690
- package/src/jscommon/umychart.mind.js +0 -2203
- package/src/jscommon/umychart.network.js +0 -44
- package/src/jscommon/umychart.news.js +0 -823
- package/src/jscommon/umychart.node.build/buildall.bat +0 -1
- package/src/jscommon/umychart.node.build/umychart.node.bat +0 -1
- package/src/jscommon/umychart.node.build/umychart.node.export.js +0 -40
- package/src/jscommon/umychart.regressiontest.js +0 -400
- package/src/jscommon/umychart.report.js +0 -5803
- package/src/jscommon/umychart.scrollbar.js +0 -1345
- package/src/jscommon/umychart.stock.js +0 -4218
- package/src/jscommon/umychart.style.js +0 -625
- package/src/jscommon/umychart.testdata.js +0 -150
- package/src/jscommon/umychart.uniapp.build/buildall.bat +0 -1
- package/src/jscommon/umychart.uniapp.build/umychart.bat +0 -1
- package/src/jscommon/umychart.uniapp.build/umychart.export.js +0 -70
- package/src/jscommon/umychart.user.js +0 -137
- package/src/jscommon/umychart.version.js +0 -30
- package/src/jscommon/umychart.vue/umychart.aliYunnetwork.vue.js +0 -56
- package/src/jscommon/umychart.vue.build/buildall.bat +0 -4
- package/src/jscommon/umychart.vue.build/copy_codemirror.bat +0 -2
- package/src/jscommon/umychart.vue.build/umychart.aliYunnetwork.vue.export.js +0 -9
- package/src/jscommon/umychart.vue.build/umychart.dragdiv.bat +0 -1
- package/src/jscommon/umychart.vue.build/umychart.dragdiv.export.js +0 -6
- package/src/jscommon/umychart.vue.build/umychart.index.data.bat +0 -1
- package/src/jscommon/umychart.vue.build/umychart.index.data.export.js +0 -4
- package/src/jscommon/umychart.vue.build/umychart.listctrl.vue.export.js +0 -15
- package/src/jscommon/umychart.vue.build/umychart.regressiontest.vue.export.js +0 -7
- package/src/jscommon/umychart.vue.build/umychart.regressiontest.wechat.export.js +0 -12
- package/src/jscommon/umychart.vue.build/umychart.stock.bat +0 -1
- package/src/jscommon/umychart.vue.build/umychart.stock.vue.export.js +0 -16
- package/src/jscommon/umychart.vue.build/umychart.testdata.bat +0 -3
- package/src/jscommon/umychart.vue.build/umychart.testdata.vue.export.js +0 -7
- package/src/jscommon/umychart.vue.build/umychart.vue.bat +0 -8
- package/src/jscommon/umychart.vue.build/umychart.vue.export.js +0 -112
- package/src/jscommon/umychart.vue.components/empyt.vue +0 -51
- package/src/jscommon/umychart.vue.components/historydayline.vue +0 -240
- package/src/jscommon/umychart.vue.components/jsloader.adddialog.vue +0 -315
- package/src/jscommon/umychart.vue.components/jsloader.vue +0 -93
- package/src/jscommon/umychart.vue.components/jsvuecontainer.vue +0 -160
- package/src/jscommon/umychart.vue.components/jsvuecontainer2.0.vue +0 -391
- package/src/jscommon/umychart.vue.components/login.vue +0 -178
- package/src/jscommon/umychart.vue.components/queryContent.vue +0 -750
- package/src/jscommon/umychart.vue.components/readme.txt +0 -8
- package/src/jscommon/umychart.vue.components/searchsymbol.vue +0 -299
- package/src/jscommon/umychart.vue.components/simulatetrade.vue +0 -1471
- package/src/jscommon/umychart.vue.components/stockchart.vue +0 -343
- package/src/jscommon/umychart.vue.components/stockchartV2.vue +0 -195
- package/src/jscommon/umychart.vue.components/stockdeal.vue +0 -358
- package/src/jscommon/umychart.vue.components/stockdealcount.vue +0 -262
- package/src/jscommon/umychart.vue.components/stockdeallastest.vue +0 -316
- package/src/jscommon/umychart.vue.components/stockdrawtool.vue +0 -343
- package/src/jscommon/umychart.vue.components/stockfull.vue +0 -355
- package/src/jscommon/umychart.vue.components/stockinfo.demo.vue +0 -153
- package/src/jscommon/umychart.vue.components/stockinfo.vue +0 -685
- package/src/jscommon/umychart.vue.components/stockkline.demo.vue +0 -1904
- package/src/jscommon/umychart.vue.components/stockmultiorder.vue +0 -174
- package/src/jscommon/umychart.vue.components/stockmultiperiod.vue +0 -222
- package/src/jscommon/umychart.vue.components/stockorder.vue +0 -320
- package/src/jscommon/umychart.vue.components/stocktradeinfo.demo.vue +0 -250
- package/src/jscommon/umychart.vue.components/stocktradeinfo.vue +0 -1907
- package/src/jscommon/umychart.vue.components/test.vue +0 -0
- package/src/jscommon/umychart.wechat/getDate.wechat.js +0 -91
- package/src/jscommon/umychart.wechat/lighter.news.wechat.js +0 -262
- package/src/jscommon/umychart.wechat/readme.txt +0 -3
- package/src/jscommon/umychart.wechat/umychart.analyze.wechat.js +0 -551
- package/src/jscommon/umychart.wechat/umychart.apidraw.wechat.js +0 -126
- package/src/jscommon/umychart.wechat/umychart.bigV.wechat.js +0 -2510
- package/src/jscommon/umychart.wechat/umychart.chartframe.wechat.js +0 -2942
- package/src/jscommon/umychart.wechat/umychart.chartpaint.wechat.js +0 -9752
- package/src/jscommon/umychart.wechat/umychart.charttitle.wechat.js +0 -2023
- package/src/jscommon/umychart.wechat/umychart.complier.wechat.js +0 -14726
- package/src/jscommon/umychart.wechat/umychart.console.wechat.js +0 -8
- package/src/jscommon/umychart.wechat/umychart.coordinatedata.wechat.js +0 -3654
- package/src/jscommon/umychart.wechat/umychart.data.wechat.js +0 -2243
- package/src/jscommon/umychart.wechat/umychart.element.wechart.js +0 -132
- package/src/jscommon/umychart.wechat/umychart.explainer.wechat.js +0 -1077
- package/src/jscommon/umychart.wechat/umychart.extendchart.wechat.js +0 -1140
- package/src/jscommon/umychart.wechat/umychart.framesplit.wechat.js +0 -2247
- package/src/jscommon/umychart.wechat/umychart.hqIndexformula.wechat.js +0 -941
- package/src/jscommon/umychart.wechat/umychart.index.data.wechat.js +0 -3628
- package/src/jscommon/umychart.wechat/umychart.index.wechat.js +0 -4074
- package/src/jscommon/umychart.wechat/umychart.klineinfo.wechat.js +0 -836
- package/src/jscommon/umychart.wechat/umychart.markethot.js +0 -50
- package/src/jscommon/umychart.wechat/umychart.network.wechart.js +0 -62
- package/src/jscommon/umychart.wechat/umychart.news.wechat.js +0 -3568
- package/src/jscommon/umychart.wechat/umychart.regressiontest.wechat.js +0 -412
- package/src/jscommon/umychart.wechat/umychart.report.wechat.js +0 -3983
- package/src/jscommon/umychart.wechat/umychart.resource.wechat.js +0 -919
- package/src/jscommon/umychart.wechat/umychart.shareimage.wechat.js +0 -681
- package/src/jscommon/umychart.wechat/umychart.simulatetrade.wechat.js +0 -238
- package/src/jscommon/umychart.wechat/umychart.stock.wechat.js +0 -4035
- package/src/jscommon/umychart.wechat/umychart.style.wechat.js +0 -419
- package/src/jscommon/umychart.wechat/umychart.uniapp.canvas.helper.js +0 -99
- package/src/jscommon/umychart.wechat/umychart.user.wechat.js +0 -588
- package/src/jscommon/umychart.wechat/umychart.userlog.wechat.js +0 -240
- package/src/jscommon/umychart.wechat/umychart.vedio.wechat.js +0 -112
- package/src/jscommon/umychart.wechat/umychart.version.wechat.js +0 -36
- package/src/jscommon/umychart.wechat/umychart.wechat.3.0.js +0 -12055
- package/src/jscommon/umychart.wechat/umychart.wechat.js +0 -15460
- package/src/jscommon/umychart.worker.js +0 -114
- package/src/jscommon/umychart.ws.stock.js +0 -110
- package/src/jscommon/umychart_python/.vscode/launch.json +0 -15
- package/src/jscommon/umychart_python/__init__.py +0 -4
- package/src/jscommon/umychart_python/build.cmd +0 -2
- package/src/jscommon/umychart_python/setup.py +0 -25
- package/src/jscommon/umychart_python/umychart_cache_testcase.py +0 -165
- package/src/jscommon/umychart_python/umychart_complier_data.py +0 -781
- package/src/jscommon/umychart_python/umychart_complier_help.py +0 -175
- package/src/jscommon/umychart_python/umychart_complier_job.py +0 -193
- package/src/jscommon/umychart_python/umychart_complier_jsalgorithm.py +0 -4144
- package/src/jscommon/umychart_python/umychart_complier_jscomplier.py +0 -177
- package/src/jscommon/umychart_python/umychart_complier_jsexecute.py +0 -517
- package/src/jscommon/umychart_python/umychart_complier_jsparser.py +0 -864
- package/src/jscommon/umychart_python/umychart_complier_jssymboldata.py +0 -1238
- package/src/jscommon/umychart_python/umychart_complier_jssymboldata_cache.py +0 -146
- package/src/jscommon/umychart_python/umychart_complier_jssymboldata_json.py +0 -106
- package/src/jscommon/umychart_python/umychart_complier_pandas_help.py +0 -80
- package/src/jscommon/umychart_python/umychart_complier_scanner.py +0 -554
- package/src/jscommon/umychart_python/umychart_complier_testcase.py +0 -362
- package/src/jscommon/umychart_python/umychart_complier_util.py +0 -30
- package/src/jscommon/umychart_python/umychart_webtemplate.py +0 -131
- package/src/jscommon/umychart_python/updatehqchartweb.bat +0 -5
- package/src/jscommon/vendor.js +0 -2
- package/src/pages/block.list.demo.page/App.vue +0 -117
- package/src/pages/block.list.demo.page/index.js +0 -12
- package/src/pages/brushTool.demo.page/App.vue +0 -19
- package/src/pages/brushTool.demo.page/index.js +0 -12
- package/src/pages/container.demo.page/App.vue +0 -118
- package/src/pages/container.demo.page/index.js +0 -18
- package/src/pages/dataZoom.demo.page/App.vue +0 -265
- package/src/pages/dataZoom.demo.page/components/dataZoom.vue +0 -303
- package/src/pages/dataZoom.demo.page/index.js +0 -12
- package/src/pages/historydayline.demo.page/App.vue +0 -57
- package/src/pages/historydayline.demo.page/index.js +0 -12
- package/src/pages/hq.demo.page/App.vue +0 -163
- package/src/pages/hq.demo.page/index.js +0 -12
- package/src/pages/hqchart.black/App.vue +0 -90
- package/src/pages/hqchart.black/components/searchsymbol.vue +0 -299
- package/src/pages/hqchart.black/components/stockdrawtool.vue +0 -300
- package/src/pages/hqchart.black/components/stockfull.vue +0 -313
- package/src/pages/hqchart.black/components/stockinfo.vue +0 -428
- package/src/pages/hqchart.black/components/stockkline.demo.vue +0 -1652
- package/src/pages/hqchart.black/components/stocktradeinfo.vue +0 -1337
- package/src/pages/hqchart.black/index.js +0 -30
- package/src/pages/hqchart.black/router/candlestickChart.vue +0 -108
- package/src/pages/hqchart.black/router/pricePointsTable.vue +0 -294
- package/src/pages/hqchart.black/router/stockDeallas.vue +0 -417
- package/src/pages/hqchart.black/router/timeShareChart.vue +0 -108
- package/src/pages/hqchart.page/App.vue +0 -101
- package/src/pages/hqchart.page/index.js +0 -18
- package/src/pages/index/App.vue +0 -1408
- package/src/pages/index/index.js +0 -7
- package/src/pages/indexHq/App.vue +0 -110
- package/src/pages/indexHq/index.js +0 -18
- package/src/pages/login.demo.page/App.vue +0 -22
- package/src/pages/login.demo.page/index.js +0 -12
- package/src/pages/queryContent.demo.page/App.vue +0 -29
- package/src/pages/queryContent.demo.page/index.js +0 -18
- package/src/pages/ranking.black/App.vue +0 -199
- package/src/pages/ranking.black/index.js +0 -18
- package/src/pages/search.demo.page/App.vue +0 -28
- package/src/pages/search.demo.page/index.js +0 -12
- package/src/pages/simulatetrade.demo.page/app.vue +0 -121
- package/src/pages/simulatetrade.demo.page/index.js +0 -17
- package/src/pages/stockdeal.demo.page/App.vue +0 -63
- package/src/pages/stockdeal.demo.page/index.js +0 -19
- package/src/pages/stockdealcount.demo.page/App.vue +0 -37
- package/src/pages/stockdealcount.demo.page/index.js +0 -12
- package/src/pages/stockdeallastest.demo.page/App.vue +0 -74
- package/src/pages/stockdeallastest.demo.page/index.js +0 -18
- package/src/pages/stockinfo.demo.page/App.vue +0 -92
- package/src/pages/stockinfo.demo.page/index.html +0 -13
- package/src/pages/stockinfo.demo.page/index.js +0 -19
- package/src/pages/stockkline.demo.page/App.vue +0 -55
- package/src/pages/stockkline.demo.page/index.js +0 -18
- package/src/pages/stockmultiorder.demo.page/App.vue +0 -149
- package/src/pages/stockmultiorder.demo.page/index.js +0 -18
- package/src/pages/stockmultiperiod.demo.page/App.vue +0 -87
- package/src/pages/stockmultiperiod.demo.page/index.js +0 -18
- package/src/pages/stockorder.demo.page/App.vue +0 -69
- package/src/pages/stockorder.demo.page/index.js +0 -18
- package/src/pages/test/App.vue +0 -22
- package/src/pages/test/index.js +0 -7
- package/src/pages/tradeinfopage/app.vue +0 -40
- package/src/pages/tradeinfopage/index.js +0 -7
- package/src/pages/tradeinfopage/tradeinfo.html +0 -12
- package/src/utils/urlObj.js +0 -81
- package/src/vendor.js +0 -2
- package/webpack.config.js +0 -104
|
@@ -1,1907 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="tradeinfo" ref="tradeinfo" :class='{blackStyle: isBlackStyle}'>
|
|
3
|
-
<div class="firstLine" ref="bookWrap">
|
|
4
|
-
<p>
|
|
5
|
-
<span>
|
|
6
|
-
委比:
|
|
7
|
-
<span :class="BookData.BookRate.Color">{{BookData.BookRate.Text}}</span>
|
|
8
|
-
</span>
|
|
9
|
-
</p>
|
|
10
|
-
<p>
|
|
11
|
-
<span>
|
|
12
|
-
委差:
|
|
13
|
-
<span :class="BookData.BookDiff.Color">{{BookData.BookDiff.Text}}</span>
|
|
14
|
-
</span>
|
|
15
|
-
</p>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="sellFive" ref='sellFive'>
|
|
18
|
-
<div>
|
|
19
|
-
<p v-for="(item,index) in SellData" :key="index">
|
|
20
|
-
<span>{{item.Title}}</span>
|
|
21
|
-
</p>
|
|
22
|
-
</div>
|
|
23
|
-
<div>
|
|
24
|
-
<p v-for="(item,index) in SellData" :key="index" :class="item.Price.Color">
|
|
25
|
-
<span>{{item.Price.Text}}</span>
|
|
26
|
-
</p>
|
|
27
|
-
</div>
|
|
28
|
-
<div>
|
|
29
|
-
<p v-for="(item,index) in SellData" :key="index">
|
|
30
|
-
<span>{{item.Vol.Text}}</span>
|
|
31
|
-
</p>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
<div class="buyFive" ref='buyFive'>
|
|
35
|
-
<div>
|
|
36
|
-
<p v-for="(itemBuy,ind) in BuyData" :key="ind">
|
|
37
|
-
<span>{{itemBuy.Title}}</span>
|
|
38
|
-
</p>
|
|
39
|
-
</div>
|
|
40
|
-
<div>
|
|
41
|
-
<p v-for="(itemBuy,ind) in BuyData" :key="ind" :class="itemBuy.Price.Color">
|
|
42
|
-
<span>{{itemBuy.Price.Text}}</span>
|
|
43
|
-
</p>
|
|
44
|
-
</div>
|
|
45
|
-
<div>
|
|
46
|
-
<p v-for="(itemBuy,ind) in BuyData" :key="ind">
|
|
47
|
-
<span>{{itemBuy.Vol.Text}}</span>
|
|
48
|
-
</p>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
<div class="detailList" ref="detailList" v-show="IsShowTradeData">
|
|
52
|
-
<div id="deal" ref="deal"></div>
|
|
53
|
-
<a :href="MoreDealLink" target='_blank' class="seeMoreDeal">点击查看更多分时成交</a>
|
|
54
|
-
</div>
|
|
55
|
-
<div class="shorttermlist" ref='shorttermlist' v-show="ShortTerm.IsShow">
|
|
56
|
-
<div>
|
|
57
|
-
<p v-for="(item,index) in ShortTerm.Data" :key="index" :class="item.Color">{{item.Time.Text}}</p>
|
|
58
|
-
</div>
|
|
59
|
-
<div>
|
|
60
|
-
<p v-for="(item,index) in ShortTerm.Data" :key="index" :class="item.Color">{{item.Name}}</p>
|
|
61
|
-
</div>
|
|
62
|
-
<div>
|
|
63
|
-
<p v-for="(item,index) in ShortTerm.Data" :key="index" :class="item.Color">{{item.Type.Text}}</p>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
<div class="capitalList" ref='capitalList' v-show='CapitalFlow.IsShow'><!-- 资金流 -->
|
|
67
|
-
<p class='tabTop'>
|
|
68
|
-
<span v-for='(item,index) in CapitalFlowDayType' :key='index' :class='{active:CapitalFlowDayIndex == index}' @click='ChangeCapitalFlowDay(index)'>{{item}}</span>
|
|
69
|
-
</p>
|
|
70
|
-
<div class='mainFlow'>
|
|
71
|
-
<p><span>主力流入</span><span :class='CurrentDayCapitaData.MainFlowData.In.Color'>{{CurrentDayCapitaData.MainFlowData.In.Text}}</span></p>
|
|
72
|
-
<p><span>主力流出</span><span :class='CurrentDayCapitaData.MainFlowData.Out.Color'>{{CurrentDayCapitaData.MainFlowData.Out.Text}}</span></p>
|
|
73
|
-
<p><span>主力净流向</span><span :class='CurrentDayCapitaData.MainFlowData.NetFlow.Color'>{{CurrentDayCapitaData.MainFlowData.NetFlow.Text}}</span></p>
|
|
74
|
-
</div>
|
|
75
|
-
<div class="orderList">
|
|
76
|
-
<table>
|
|
77
|
-
<thead>
|
|
78
|
-
<tr>
|
|
79
|
-
<td>{{CurrentDayCapitaData.ValueUnit.Text}}</td>
|
|
80
|
-
<td>流入</td>
|
|
81
|
-
<td>流出</td>
|
|
82
|
-
</tr>
|
|
83
|
-
</thead>
|
|
84
|
-
<tbody>
|
|
85
|
-
<tr v-for='(item,index) in CurrentDayCapitaData.OrderData' :key='index'>
|
|
86
|
-
<td>{{item.TiTle}}</td>
|
|
87
|
-
<td :class='item.In.Color'>{{item.In.Text}}</td>
|
|
88
|
-
<td :class='item.Out.Color'>{{item.Out.Text}}</td>
|
|
89
|
-
</tr>
|
|
90
|
-
</tbody>
|
|
91
|
-
</table>
|
|
92
|
-
</div>
|
|
93
|
-
<div class="netValueWrap" ref='netValueWrap'>
|
|
94
|
-
<div class="charWrap" ref='charWrap'>
|
|
95
|
-
<div class="middleLine" ref='middleLine'></div>
|
|
96
|
-
<div class="bars">
|
|
97
|
-
<div class="realArea" v-for='(item,index) in CurrentDayCapitaData.ChartStyleData' :key='index'>
|
|
98
|
-
<div class='label' :style='item.Label'>{{CurrentDayCapitaData.NetValueData[index].Text}}</div>
|
|
99
|
-
<div>
|
|
100
|
-
<div class="content" :style='item.Content'>
|
|
101
|
-
<div class='bar' :style='item.Bar'></div>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
</div>
|
|
108
|
-
<div class="xLabels">
|
|
109
|
-
<span>净超大</span>
|
|
110
|
-
<span>净大单</span>
|
|
111
|
-
<span>净中单</span>
|
|
112
|
-
<span>净小单</span>
|
|
113
|
-
</div>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
<div class='dealpricelist' ref='dealpricelist' v-show='DealPrice.IsShow' ><!-- 分价表 -->
|
|
117
|
-
<div id="priceList" ref="priceList"></div>
|
|
118
|
-
<!-- <table class='table'>
|
|
119
|
-
<tbody>
|
|
120
|
-
<tr v-for='(item,index) in DealPriceData' :key='index+"dealprice"'>
|
|
121
|
-
<td :class='item.Price.Color'>{{item.Price.Text}}</td>
|
|
122
|
-
<td>{{item.Vol}}</td>
|
|
123
|
-
<td><span :style='item.Bar'>
|
|
124
|
-
<span class="buy" :style='item.BuyRate'></span><span class="none" :style='item.NoneRate'></span><span class="sell" :style='item.SellRate'></span>
|
|
125
|
-
</span>
|
|
126
|
-
</td>
|
|
127
|
-
<td>{{item.Rate}}</td>
|
|
128
|
-
</tr>
|
|
129
|
-
</tbody>
|
|
130
|
-
</table> -->
|
|
131
|
-
</div>
|
|
132
|
-
|
|
133
|
-
</div>
|
|
134
|
-
</template>
|
|
135
|
-
<script>
|
|
136
|
-
import $ from "jquery";
|
|
137
|
-
import JSCommon from "../umychart.vue/umychart.vue.js";
|
|
138
|
-
import JSCommonStock from "../umychart.vue/umychart.stock.vue.js";
|
|
139
|
-
import '../../jscommon/umychart.resource/css/tools.css'
|
|
140
|
-
|
|
141
|
-
// JSCommon.MARKET_SUFFIX_NAME.GetMarketStatus = function (symbol) { return 2; }
|
|
142
|
-
|
|
143
|
-
//默认数据输出
|
|
144
|
-
class DefaultData {
|
|
145
|
-
static GetBuyData() {
|
|
146
|
-
let dataAry = [];
|
|
147
|
-
for(let i = 0; i < 5; ++i){
|
|
148
|
-
var obj = {
|
|
149
|
-
Vol: {Text: ""},
|
|
150
|
-
Price: {Text: "",Color: ""},
|
|
151
|
-
Title: ""
|
|
152
|
-
};
|
|
153
|
-
dataAry.push(obj);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
return dataAry;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
static GetSellData() {
|
|
160
|
-
return DefaultData.GetBuyData();
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
static GetTradeData() {
|
|
164
|
-
var data = [];
|
|
165
|
-
for (var i = 0; i < 10; ++i) {
|
|
166
|
-
var item = {
|
|
167
|
-
Time: { Text: "" },
|
|
168
|
-
Price: { Text: "", Color: "" },
|
|
169
|
-
Vol: { Text: "" },
|
|
170
|
-
BS: { Text: "", Color: "" }
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
data.push(item);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
return data;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
static GetBookData() {
|
|
180
|
-
const data = {
|
|
181
|
-
BookRate: {
|
|
182
|
-
Text: "",
|
|
183
|
-
Color: ""
|
|
184
|
-
},
|
|
185
|
-
BookDiff: {
|
|
186
|
-
Text: "",
|
|
187
|
-
Color: ""
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
return data;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
static GetRowStyle() {
|
|
194
|
-
let data = {
|
|
195
|
-
Sell: {
|
|
196
|
-
top: 0,
|
|
197
|
-
height: 0,
|
|
198
|
-
display: "none"
|
|
199
|
-
},
|
|
200
|
-
Buy: {
|
|
201
|
-
top: 0,
|
|
202
|
-
height: 0,
|
|
203
|
-
display: "none"
|
|
204
|
-
},
|
|
205
|
-
Trade: {
|
|
206
|
-
top: 0,
|
|
207
|
-
height: 0,
|
|
208
|
-
display: "none"
|
|
209
|
-
}
|
|
210
|
-
}; //默认都不显示
|
|
211
|
-
|
|
212
|
-
return data;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
static GetRowShortStyle() {
|
|
216
|
-
let data = {
|
|
217
|
-
Sell: {
|
|
218
|
-
top: 0,
|
|
219
|
-
height: 0,
|
|
220
|
-
display: "none"
|
|
221
|
-
},
|
|
222
|
-
Buy: {
|
|
223
|
-
top: 0,
|
|
224
|
-
height: 0,
|
|
225
|
-
display: "none"
|
|
226
|
-
},
|
|
227
|
-
Short: {
|
|
228
|
-
top: 0,
|
|
229
|
-
height: 0,
|
|
230
|
-
display: "none"
|
|
231
|
-
}
|
|
232
|
-
}; //默认都不显示
|
|
233
|
-
|
|
234
|
-
return data;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
static GetCapitalFlowSingle() {
|
|
238
|
-
let data = {
|
|
239
|
-
MainFlowData: {
|
|
240
|
-
In: { Value: "", Text: "", Color: "PriceUp" },
|
|
241
|
-
Out: { Value: "", Text: "", Color: "PriceDown" },
|
|
242
|
-
NetFlow: { Value: "", Text: "", Color: "" }
|
|
243
|
-
},
|
|
244
|
-
OrderData: [
|
|
245
|
-
{
|
|
246
|
-
TiTle: "超大",
|
|
247
|
-
In: { Value: "", Text: "", Color: "PriceUp" },
|
|
248
|
-
Out: { Value: "", Text: "", Color: "PriceDown" }
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
TiTle: "大单",
|
|
252
|
-
In: { Value: "", Text: "", Color: "PriceUp" },
|
|
253
|
-
Out: { Value: "", Text: "", Color: "PriceDown" }
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
TiTle: "中单",
|
|
257
|
-
In: { Value: "", Text: "", Color: "PriceUp" },
|
|
258
|
-
Out: { Value: "", Text: "", Color: "PriceDown" }
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
TiTle: "小单",
|
|
262
|
-
In: { Value: "", Text: "", Color: "PriceUp" },
|
|
263
|
-
Out: { Value: "", Text: "", Color: "PriceDown" }
|
|
264
|
-
}
|
|
265
|
-
],
|
|
266
|
-
NetValueData: [
|
|
267
|
-
{ TiTle: "净超大", Value: "", Text: "", Color: "", Direction: "" },
|
|
268
|
-
{ TiTle: "净大单", Value: "", Text: "", Color: "", Direction: "" },
|
|
269
|
-
{ TiTle: "净中单", Value: "", Text: "", Color: "", Direction: "" },
|
|
270
|
-
{ TiTle: "净小单", Value: "", Text: "", Color: "", Direction: "" }
|
|
271
|
-
],
|
|
272
|
-
ValueUnit: { Text: "万元" },
|
|
273
|
-
ChartStyleData: [
|
|
274
|
-
{
|
|
275
|
-
Content: { bottom: "", top: "" },
|
|
276
|
-
Bar: { bottom: "", top: "", height: "", bagckgroundColor: "" },
|
|
277
|
-
Label: { bottom: "", top: "", color: "" }
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
Content: { bottom: "", top: "" },
|
|
281
|
-
Bar: { bottom: "", top: "", height: "", bagckgroundColor: "" },
|
|
282
|
-
Label: { bottom: "", top: "", color: "" }
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
Content: { bottom: "", top: "" },
|
|
286
|
-
Bar: { bottom: "", top: "", height: "", bagckgroundColor: "" },
|
|
287
|
-
Label: { bottom: "", top: "", color: "" }
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
Content: { bottom: "", top: "" },
|
|
291
|
-
Bar: { bottom: "", top: "", height: "", bagckgroundColor: "" },
|
|
292
|
-
Label: { bottom: "", top: "", color: "" }
|
|
293
|
-
}
|
|
294
|
-
]
|
|
295
|
-
};
|
|
296
|
-
return data;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
static GetCapitalFlow() {
|
|
300
|
-
let data = [];
|
|
301
|
-
for (let i = 0; i < 4; i++) {
|
|
302
|
-
var dataItem = {
|
|
303
|
-
MainFlowData: {
|
|
304
|
-
In: { Value: "", Text: "", Color: "PriceUp" },
|
|
305
|
-
Out: { Value: "", Text: "", Color: "PriceDown" },
|
|
306
|
-
NetFlow: { Value: "", Text: "", Color: "" }
|
|
307
|
-
},
|
|
308
|
-
OrderData: [
|
|
309
|
-
{
|
|
310
|
-
TiTle: "超大",
|
|
311
|
-
In: { Value: "", Text: "", Color: "PriceUp" },
|
|
312
|
-
Out: { Value: "", Text: "", Color: "PriceDown" }
|
|
313
|
-
},
|
|
314
|
-
{
|
|
315
|
-
TiTle: "大单",
|
|
316
|
-
In: { Value: "", Text: "", Color: "PriceUp" },
|
|
317
|
-
Out: { Value: "", Text: "", Color: "PriceDown" }
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
TiTle: "中单",
|
|
321
|
-
In: { Value: "", Text: "", Color: "PriceUp" },
|
|
322
|
-
Out: { Value: "", Text: "", Color: "PriceDown" }
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
TiTle: "小单",
|
|
326
|
-
In: { Value: "", Text: "", Color: "PriceUp" },
|
|
327
|
-
Out: { Value: "", Text: "", Color: "PriceDown" }
|
|
328
|
-
}
|
|
329
|
-
],
|
|
330
|
-
NetValueData: [
|
|
331
|
-
{ TiTle: "净超大", Value: "", Text: "", Color: "", Direction: "" },
|
|
332
|
-
{ TiTle: "净大单", Value: "", Text: "", Color: "", Direction: "" },
|
|
333
|
-
{ TiTle: "净中单", Value: "", Text: "", Color: "", Direction: "" },
|
|
334
|
-
{ TiTle: "净小单", Value: "", Text: "", Color: "", Direction: "" }
|
|
335
|
-
],
|
|
336
|
-
ValueUnit: { Text: "万元" },
|
|
337
|
-
ChartStyleData: [
|
|
338
|
-
{
|
|
339
|
-
Content: { bottom: "", top: "" },
|
|
340
|
-
Bar: { bottom: "", top: "", height: "", bagckgroundColor: "" },
|
|
341
|
-
Label: { bottom: "", top: "", color: "" }
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
Content: { bottom: "", top: "" },
|
|
345
|
-
Bar: { bottom: "", top: "", height: "", bagckgroundColor: "" },
|
|
346
|
-
Label: { bottom: "", top: "", color: "" }
|
|
347
|
-
},
|
|
348
|
-
{
|
|
349
|
-
Content: { bottom: "", top: "" },
|
|
350
|
-
Bar: { bottom: "", top: "", height: "", bagckgroundColor: "" },
|
|
351
|
-
Label: { bottom: "", top: "", color: "" }
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
Content: { bottom: "", top: "" },
|
|
355
|
-
Bar: { bottom: "", top: "", height: "", bagckgroundColor: "" },
|
|
356
|
-
Label: { bottom: "", top: "", color: "" }
|
|
357
|
-
}
|
|
358
|
-
]
|
|
359
|
-
};
|
|
360
|
-
data.push(dataItem);
|
|
361
|
-
}
|
|
362
|
-
return data;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
static GetDealPriceData(){
|
|
366
|
-
let data = [{
|
|
367
|
-
Price:{Text:'',Color:''},
|
|
368
|
-
Vol:0,
|
|
369
|
-
Bar:{width:'20px'},
|
|
370
|
-
Rate:'',
|
|
371
|
-
WidthRate:0,
|
|
372
|
-
BuyRate:{width:'20px'},
|
|
373
|
-
SellRate:{width:'20px'},
|
|
374
|
-
NoneRate:{width:'20px'}
|
|
375
|
-
}];
|
|
376
|
-
return data;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
static GetDealOption(){ //成交明细option
|
|
380
|
-
return {
|
|
381
|
-
Type:'成交明细', //创建图形类型
|
|
382
|
-
|
|
383
|
-
Symbol:'600000.sh',
|
|
384
|
-
IsAutoUpdate:true, //是自动更新数据
|
|
385
|
-
AutoUpdateFrequency:15000, //数据更新频率
|
|
386
|
-
|
|
387
|
-
Column:
|
|
388
|
-
[
|
|
389
|
-
//{Type:JSCommon.DEAL_COLUMN_ID.STRING_TIME_ID }, //自定义时间格式
|
|
390
|
-
//{Type:JSCommon.DEAL_COLUMN_ID.INDEX_ID },
|
|
391
|
-
{Type:JSCommon.DEAL_COLUMN_ID.TIME_ID },
|
|
392
|
-
{Type:JSCommon.DEAL_COLUMN_ID.PRICE_ID },
|
|
393
|
-
{Type:JSCommon.DEAL_COLUMN_ID.VOL_ID },
|
|
394
|
-
{Type:JSCommon.DEAL_COLUMN_ID.BS_ID, },
|
|
395
|
-
],
|
|
396
|
-
|
|
397
|
-
IsSingleTable:true,
|
|
398
|
-
IsShowHeader:false,
|
|
399
|
-
|
|
400
|
-
KeyDown:false, //禁止键盘
|
|
401
|
-
Wheel:false, //禁止滚轴
|
|
402
|
-
|
|
403
|
-
Border: //边框
|
|
404
|
-
{
|
|
405
|
-
Left:1, //左边间距
|
|
406
|
-
Right:1, //右边间距
|
|
407
|
-
Bottom:1, //底部间距
|
|
408
|
-
Top:1 //顶部间距
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
static GetPriceListOption(){ //分价表option
|
|
413
|
-
return {
|
|
414
|
-
Type:'分价表', //创建图形类型
|
|
415
|
-
|
|
416
|
-
Symbol:'600000.sh',
|
|
417
|
-
IsAutoUpdate:true, //是自动更新数据
|
|
418
|
-
AutoUpdateFrequency:1000, //数据更新频率
|
|
419
|
-
|
|
420
|
-
Column:
|
|
421
|
-
[
|
|
422
|
-
// {Type:JSCommon.DEAL_COLUMN_ID.INDEX_ID },
|
|
423
|
-
// {Type:JSCommon.DEAL_COLUMN_ID.UPDOWN_ID },
|
|
424
|
-
// {Type:JSCommon.DEAL_COLUMN_ID.CENTER_BAR_ID , Title:"比例", DataIndex:9 }, //数据所在原始数据索引列
|
|
425
|
-
{Type:JSCommon.DEAL_COLUMN_ID.PRICE_ID },
|
|
426
|
-
{Type:JSCommon.DEAL_COLUMN_ID.VOL_ID },
|
|
427
|
-
{Type:JSCommon.DEAL_COLUMN_ID.MULTI_BAR_ID , Title:"比例", MaxText:"8888", DataIndex:8 }, //数据所在原始数据索引列
|
|
428
|
-
{Type:JSCommon.DEAL_COLUMN_ID.CUSTOM_TEXT_ID , Title:"占比", MaxText:"88.8%",TextAlign:"right" }, //自定义文字
|
|
429
|
-
|
|
430
|
-
],
|
|
431
|
-
|
|
432
|
-
IsSingleTable:true,
|
|
433
|
-
IsShowHeader:false,
|
|
434
|
-
IsShowLastPage:false,
|
|
435
|
-
|
|
436
|
-
KeyDown:false, //禁止键盘
|
|
437
|
-
Wheel:false, //禁止滚轴
|
|
438
|
-
|
|
439
|
-
Border: //边框
|
|
440
|
-
{
|
|
441
|
-
Left:1, //左边间距
|
|
442
|
-
Right:1, //右边间距
|
|
443
|
-
Bottom:1, //底部间距
|
|
444
|
-
Top:1 //顶部间距
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
function CapticalFlowChartStyle() {}
|
|
451
|
-
|
|
452
|
-
CapticalFlowChartStyle.DefaultStyleData = function() {
|
|
453
|
-
var chartStyleData = [];
|
|
454
|
-
for (let i = 0; i < 4; i++) {
|
|
455
|
-
var data = {
|
|
456
|
-
Content: { bottom: "", top: "" },
|
|
457
|
-
Bar: { bottom: "", top: "", height: "", bagckgroundColor: "" },
|
|
458
|
-
Label: { bottom: "", top: "", color: "" }
|
|
459
|
-
};
|
|
460
|
-
chartStyleData.push(data);
|
|
461
|
-
}
|
|
462
|
-
return chartStyleData;
|
|
463
|
-
};
|
|
464
|
-
|
|
465
|
-
export default {
|
|
466
|
-
JSCommonStock: JSCommonStock,
|
|
467
|
-
|
|
468
|
-
name: "StockTradeInfo",
|
|
469
|
-
props: [
|
|
470
|
-
"IsShareStock", //是否共享使用一个Stock类,
|
|
471
|
-
"DefaultSymbol",
|
|
472
|
-
'DefaultAPIDomain'
|
|
473
|
-
],
|
|
474
|
-
|
|
475
|
-
data() {
|
|
476
|
-
let data = {
|
|
477
|
-
Symbol: "600000.sh",
|
|
478
|
-
ID: [
|
|
479
|
-
JSCommon.JSChart.CreateGuid(),
|
|
480
|
-
JSCommon.JSChart.CreateGuid(),
|
|
481
|
-
JSCommon.JSChart.CreateGuid(),
|
|
482
|
-
JSCommon.JSChart.CreateGuid()
|
|
483
|
-
], //[0]=买卖盘 [1]=分笔 [2]=委比委差 [3]=资金流
|
|
484
|
-
JSStock: null,
|
|
485
|
-
RowStyle: DefaultData.GetRowStyle(),
|
|
486
|
-
|
|
487
|
-
BuyData: DefaultData.GetBuyData(), //买盘
|
|
488
|
-
SellData: DefaultData.GetSellData(), //卖盘
|
|
489
|
-
IsBuySellInital: false, //第1次 需要初始化
|
|
490
|
-
|
|
491
|
-
TradeData: null, //分笔数据
|
|
492
|
-
IsTradeDataInital: false, //第1次 需要初始化
|
|
493
|
-
IsShowTradeData: true, //是否显示
|
|
494
|
-
|
|
495
|
-
//短线
|
|
496
|
-
ShortTerm: {
|
|
497
|
-
Data: null, //短线精灵
|
|
498
|
-
IsShow: false, //是否显示
|
|
499
|
-
JSStock: null //数据请求控制器
|
|
500
|
-
},
|
|
501
|
-
|
|
502
|
-
//资金流
|
|
503
|
-
CapitalFlow: {
|
|
504
|
-
Data: DefaultData.GetCapitalFlow(), //数据
|
|
505
|
-
IsShow: false //是否显示
|
|
506
|
-
},
|
|
507
|
-
CurrentDayCapitaData: DefaultData.GetCapitalFlowSingle(), //当前类型下的资金流数据
|
|
508
|
-
CapitalFlowDayType: ["当日", "3日", "5日", "10日"],
|
|
509
|
-
CapitalFlowDayIndex: 0,
|
|
510
|
-
CapitalFlowUnit: {
|
|
511
|
-
TextAry: [],
|
|
512
|
-
IsTenThousand: true
|
|
513
|
-
},
|
|
514
|
-
|
|
515
|
-
BookData: DefaultData.GetBookData(), //委比委差数据
|
|
516
|
-
|
|
517
|
-
DealPrice:
|
|
518
|
-
{
|
|
519
|
-
IsShow:false,
|
|
520
|
-
},
|
|
521
|
-
DealChart: null,
|
|
522
|
-
DealChartOption: null,
|
|
523
|
-
MoreDealLink:'',
|
|
524
|
-
|
|
525
|
-
isBlackStyle: false,
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
HQChartStyle:new Map(),
|
|
529
|
-
|
|
530
|
-
PriceListChart: null,
|
|
531
|
-
PriceListOption: null,
|
|
532
|
-
ApiPriceListUrl:"https://opensource.zealink.com/API/StockPriceList",
|
|
533
|
-
|
|
534
|
-
ApiUrl:"https://opensource.zealink.com/API/Stock", //https://opensource.zealink.com/API/Stock
|
|
535
|
-
TextFullDataCount: 100,
|
|
536
|
-
TestUpdateCount: 0,
|
|
537
|
-
MapPrice: null
|
|
538
|
-
};
|
|
539
|
-
|
|
540
|
-
return data;
|
|
541
|
-
},
|
|
542
|
-
|
|
543
|
-
created() {
|
|
544
|
-
if (this.DefaultSymbol) this.Symbol = this.DefaultSymbol; //默认股票
|
|
545
|
-
if (this.DefaultAPIDomain)
|
|
546
|
-
{
|
|
547
|
-
JSCommon.JSChart.SetDomain(this.DefaultAPIDomain.Domain,this.DefaultAPIDomain.CacheDomain);
|
|
548
|
-
JSCommon.JSComplier.SetDomain(this.DefaultAPIDomain.Domain,this.DefaultAPIDomain.CacheDomain);
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
//配色风格
|
|
552
|
-
//白色
|
|
553
|
-
var resource=JSCommon.JSChart.GetResource();
|
|
554
|
-
resource.DealList.BorderColor='rgba(0,0,0,0)'; //去掉边框
|
|
555
|
-
resource.BGColor='rgb(255,255,255)';
|
|
556
|
-
resource.DealList.FieldColor.Bar[0]='rgb(178,34,34)';
|
|
557
|
-
resource.DealList.FieldColor.Bar[1]='rgb(34,139,34)';
|
|
558
|
-
resource.DealList.FieldColor.Bar[2]='rgb(139,139,122)';
|
|
559
|
-
this.HQChartStyle.set(0, JSON.parse(JSON.stringify(resource)));
|
|
560
|
-
|
|
561
|
-
//黑色
|
|
562
|
-
resource=JSCommon.HQChartStyle.GetStyleConfig(JSCommon.STYLE_TYPE_ID.BLACK_ID);
|
|
563
|
-
resource.DealList.BorderColor='rgba(0,0,0,0)'; //去掉边框
|
|
564
|
-
resource.BGColor='#191d1e';
|
|
565
|
-
this.HQChartStyle.set(1, JSON.parse(JSON.stringify(resource)));
|
|
566
|
-
|
|
567
|
-
},
|
|
568
|
-
|
|
569
|
-
mounted() {
|
|
570
|
-
console.log(
|
|
571
|
-
`[StockTradeInfo::mounted] IsShareStock=${this.IsShareStock} ID=${
|
|
572
|
-
this.ID
|
|
573
|
-
}`
|
|
574
|
-
);
|
|
575
|
-
if (this.IsShareStock == true || this.IsShareStock == "true") {
|
|
576
|
-
//外部调用SetJSStock()设置, 内部不创建
|
|
577
|
-
} else {
|
|
578
|
-
this.JSStock = JSCommonStock.JSStockInit();
|
|
579
|
-
this.InitalStock();
|
|
580
|
-
this.JSStock.RequestData();
|
|
581
|
-
|
|
582
|
-
// this.MoreDealLink = './stockdeallastest.demo.page.html?symbol=' + this.Symbol;
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
this.MoreDealLink = this.GetDealListUrl();
|
|
586
|
-
|
|
587
|
-
this.OnSize();
|
|
588
|
-
|
|
589
|
-
//初始化成交明细图形
|
|
590
|
-
this.CreateDealJSChart()
|
|
591
|
-
|
|
592
|
-
},
|
|
593
|
-
|
|
594
|
-
methods: {
|
|
595
|
-
NetworkFilter(data, callback)
|
|
596
|
-
{
|
|
597
|
-
console.log('[PriceListChart::NetworkFilter] data', data);
|
|
598
|
-
|
|
599
|
-
switch(data.Name)
|
|
600
|
-
{
|
|
601
|
-
case 'JSDealChartContainer::RequestDealData': //全量数据下载
|
|
602
|
-
this.RequestDealData(data, callback);
|
|
603
|
-
break;
|
|
604
|
-
case "JSDealChartContainer::RequestDealUpdateData":
|
|
605
|
-
this.RequestDealUpdateData(data, callback);
|
|
606
|
-
break;
|
|
607
|
-
}
|
|
608
|
-
},
|
|
609
|
-
recvPriceListUpdateData(recvData, callback){
|
|
610
|
-
const {deal,symbol} = recvData.stock[0]
|
|
611
|
-
var hqchartData={ detail:[] , symbol:symbol, UpdateType:1 };
|
|
612
|
-
|
|
613
|
-
for(var i=0;(this.TestUpdateCount+this.TextFullDataCount)<deal.length && i<10;++this.TestUpdateCount, ++i)
|
|
614
|
-
{
|
|
615
|
-
var item=deal[this.TestUpdateCount+this.TextFullDataCount];
|
|
616
|
-
|
|
617
|
-
var {price, vol, bs} = item
|
|
618
|
-
|
|
619
|
-
if (this.MapPrice.has(price))
|
|
620
|
-
{
|
|
621
|
-
var priceItem=this.MapPrice.get(price);
|
|
622
|
-
priceItem.BSVol[bs]+=vol;
|
|
623
|
-
priceItem.Vol+=vol;
|
|
624
|
-
}
|
|
625
|
-
else
|
|
626
|
-
{
|
|
627
|
-
var priceItem={Price:price, Vol:vol, BSVol:[0,0,0]};
|
|
628
|
-
priceItem.BSVol[bs]=vol;
|
|
629
|
-
|
|
630
|
-
this.MapPrice.set(price, priceItem);
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
hqchartData.detail=this.GetPriceList();
|
|
635
|
-
|
|
636
|
-
console.log("[DealChart::RequestDealUpdateData] hqchartData=",hqchartData)
|
|
637
|
-
callback(hqchartData);
|
|
638
|
-
},
|
|
639
|
-
RequestDealUpdateData(data, callback)
|
|
640
|
-
{
|
|
641
|
-
data.PreventDefault=true;
|
|
642
|
-
var symbol=data.Request.Data.symbol;
|
|
643
|
-
var lastDeal=data.LastItem; //本地最后一条分笔数据, 增量从这条数据开始下载.
|
|
644
|
-
console.log("[DealChart::RequestDealUpdateData] lastDeal",lastDeal);
|
|
645
|
-
|
|
646
|
-
// const recvData = LocalData.DEAL_UPDATE_600000_SH
|
|
647
|
-
// this.recvPriceListUpdateData(recvData, callback)
|
|
648
|
-
$.ajax({
|
|
649
|
-
url: this.ApiUrl,
|
|
650
|
-
data: { "field": ["symbol","name", "yclose", "deal"], "symbol": [symbol] },
|
|
651
|
-
type:"post",
|
|
652
|
-
dataType: "json",
|
|
653
|
-
async:true,
|
|
654
|
-
success: (recvdata)=>
|
|
655
|
-
{
|
|
656
|
-
this.recvPriceListUpdateData(recvdata,callback);
|
|
657
|
-
},
|
|
658
|
-
error:(request)=>
|
|
659
|
-
{
|
|
660
|
-
//self.RecvError(request,RECV_DATA_TYPE.BASE_DATA);
|
|
661
|
-
}
|
|
662
|
-
});
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
},
|
|
666
|
-
RecvDealData(recvdata,callback){
|
|
667
|
-
const {name,symbol,yclose,deal} = recvdata.stock[0]
|
|
668
|
-
// console.log('RecvDealData',name,symbol,yclose,deal);
|
|
669
|
-
var hqchartData={ detail:[], symbol:symbol, name:symbol, yclose: yclose};
|
|
670
|
-
var mapPrice=new Map();
|
|
671
|
-
for(var i=0;i<deal.length && i<this.TextFullDataCount;++i)
|
|
672
|
-
{
|
|
673
|
-
var item=deal[i];
|
|
674
|
-
|
|
675
|
-
var {price, vol, bs} = item
|
|
676
|
-
|
|
677
|
-
if (mapPrice.has(price))
|
|
678
|
-
{
|
|
679
|
-
var priceItem=mapPrice.get(price);
|
|
680
|
-
priceItem.BSVol[bs]+=vol;
|
|
681
|
-
priceItem.Vol+=vol;
|
|
682
|
-
}
|
|
683
|
-
else
|
|
684
|
-
{
|
|
685
|
-
var priceItem={Price:price, Vol:vol, BSVol:[0,0,0]};
|
|
686
|
-
priceItem.BSVol[bs]=vol;
|
|
687
|
-
|
|
688
|
-
mapPrice.set(price, priceItem);
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
this.MapPrice=mapPrice;
|
|
693
|
-
|
|
694
|
-
hqchartData.detail=this.GetPriceList();
|
|
695
|
-
|
|
696
|
-
console.log("[PriceListChart::RequestDealData] hqchartData=",hqchartData)
|
|
697
|
-
callback(hqchartData);
|
|
698
|
-
},
|
|
699
|
-
GetPriceList()
|
|
700
|
-
{
|
|
701
|
-
var totalVol=this.GetTotalVol();
|
|
702
|
-
var aryPrice=[];
|
|
703
|
-
for(var item of this.MapPrice)
|
|
704
|
-
{
|
|
705
|
-
// console.log('item of this.MapPrice', item);
|
|
706
|
-
var priceItem=item[1];
|
|
707
|
-
//0=时间 1=价格 2=成交量 3=成交金额 4=BS 5=字符串时间 6=ID
|
|
708
|
-
var newItem=[ null, priceItem.Price, priceItem.Vol, null, null ];
|
|
709
|
-
newItem[8]={ Value:[0,0,0],Color: [2,0,1] };
|
|
710
|
-
if (totalVol>0)
|
|
711
|
-
{
|
|
712
|
-
newItem[8].Value[0]=priceItem.BSVol[0]/totalVol;
|
|
713
|
-
newItem[8].Value[1]=priceItem.BSVol[1]/totalVol;
|
|
714
|
-
newItem[8].Value[2]=priceItem.BSVol[2]/totalVol;
|
|
715
|
-
|
|
716
|
-
newItem[8].Rate= priceItem.Vol/totalVol; //占比
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
newItem[9]={ Value:[0,0] };
|
|
720
|
-
if (totalVol>0)
|
|
721
|
-
{
|
|
722
|
-
newItem[9].Value[0]=priceItem.BSVol[1]/totalVol;
|
|
723
|
-
newItem[9].Value[1]=priceItem.BSVol[2]/totalVol;
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
aryPrice.push(newItem);
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
return aryPrice;
|
|
730
|
-
},
|
|
731
|
-
GetTotalVol()
|
|
732
|
-
{
|
|
733
|
-
var totalVol=0;
|
|
734
|
-
for(var item of this.MapPrice)
|
|
735
|
-
{
|
|
736
|
-
totalVol+=item[1].Vol;
|
|
737
|
-
}
|
|
738
|
-
|
|
739
|
-
return totalVol;
|
|
740
|
-
},
|
|
741
|
-
RequestDealData(data, callback){
|
|
742
|
-
var symbol=data.Request.Data.symbol;
|
|
743
|
-
data.PreventDefault=true;
|
|
744
|
-
|
|
745
|
-
// const recvdata = LocalData.DEAL_600000_SH
|
|
746
|
-
// this.RecvDealData(recvdata,callback);
|
|
747
|
-
$.ajax({
|
|
748
|
-
url: this.ApiUrl,
|
|
749
|
-
data: { "field": ["symbol","name", "yclose", "deal"], "symbol": [symbol] },
|
|
750
|
-
type:"post",
|
|
751
|
-
dataType: "json",
|
|
752
|
-
async:true,
|
|
753
|
-
success: (recvdata)=>
|
|
754
|
-
{
|
|
755
|
-
this.RecvDealData(recvdata,callback);
|
|
756
|
-
},
|
|
757
|
-
error:(request)=>
|
|
758
|
-
{
|
|
759
|
-
//self.RecvError(request,RECV_DATA_TYPE.BASE_DATA);
|
|
760
|
-
}
|
|
761
|
-
});
|
|
762
|
-
|
|
763
|
-
},
|
|
764
|
-
|
|
765
|
-
//创建成交明细图
|
|
766
|
-
CreateDealJSChart()
|
|
767
|
-
{
|
|
768
|
-
if(this.DealChart) return;
|
|
769
|
-
|
|
770
|
-
const divDeal = this.$refs.deal
|
|
771
|
-
let chart = JSCommon.JSDealChart.Init(divDeal); //把成交明细图绑定到一个Div上
|
|
772
|
-
this.DealChartOption = DefaultData.GetDealOption()
|
|
773
|
-
if(this.Symbol)
|
|
774
|
-
{
|
|
775
|
-
this.DealChartOption.Symbol = this.Symbol
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
if(this.isBlackStyle)
|
|
779
|
-
{
|
|
780
|
-
//黑色风格
|
|
781
|
-
const resource = this.HQChartStyle.get(1)
|
|
782
|
-
JSCommon.JSChart.SetStyle(resource);
|
|
783
|
-
divDeal.style.backgroundColor = resource.BGColor; //设置最外面的div背景
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
chart.SetOption(this.DealChartOption); //设置配置
|
|
787
|
-
this.DealChart = chart
|
|
788
|
-
|
|
789
|
-
},
|
|
790
|
-
|
|
791
|
-
//创建分价表
|
|
792
|
-
CreatePriceListChart()
|
|
793
|
-
{
|
|
794
|
-
if(this.PriceListChart) return;
|
|
795
|
-
|
|
796
|
-
const divDeal = this.$refs.priceList
|
|
797
|
-
let chart = JSCommon.JSDealChart.Init(divDeal); //把成交明细图绑定到一个Div上
|
|
798
|
-
this.PriceListOption = DefaultData.GetPriceListOption()
|
|
799
|
-
this.PriceListOption.NetworkFilter = (data, callback) => { this.PriceListNetworkFilter(data, callback)}
|
|
800
|
-
this.PriceListOption.EventCallback=
|
|
801
|
-
[
|
|
802
|
-
// { //根据大小单显示成交量颜色
|
|
803
|
-
// event:JSCommon.JSCHART_EVENT_ID.ON_DRAW_DEAL_VOL_COLOR,
|
|
804
|
-
// callback:(event, data, obj)=>{ this.GetVolColor(event, data, obj); }
|
|
805
|
-
// },
|
|
806
|
-
{ //自定义内容
|
|
807
|
-
event:JSCommon.JSCHART_EVENT_ID.ON_DRAW_DEAL_TEXT,
|
|
808
|
-
callback:(event, data, obj)=>{ this.GetCustomText(event, data, obj); }
|
|
809
|
-
}
|
|
810
|
-
];
|
|
811
|
-
if(this.Symbol)
|
|
812
|
-
{
|
|
813
|
-
this.PriceListOption.Symbol = this.Symbol
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
if(this.isBlackStyle)
|
|
817
|
-
{
|
|
818
|
-
//黑色风格
|
|
819
|
-
var resource=this.HQChartStyle.get(1);
|
|
820
|
-
JSCommon.JSChart.SetStyle(resource);
|
|
821
|
-
divDeal.style.backgroundColor = resource.BGColor; //设置最外面的div背景
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
chart.SetOption(this.PriceListOption); //设置配置
|
|
825
|
-
this.PriceListChart = chart
|
|
826
|
-
|
|
827
|
-
},
|
|
828
|
-
|
|
829
|
-
//分价表数据
|
|
830
|
-
PriceListNetworkFilter(data, callback)
|
|
831
|
-
{
|
|
832
|
-
console.log('[PriceListChart::PriceListNetworkFilter] data', data);
|
|
833
|
-
switch(data.Name)
|
|
834
|
-
{
|
|
835
|
-
case 'JSDealChartContainer::RequestDealData': //全量数据下载
|
|
836
|
-
this.RequestPriceListData(data, callback);
|
|
837
|
-
break;
|
|
838
|
-
case "JSDealChartContainer::RequestDealUpdateData":
|
|
839
|
-
this.RequestPriceListData(data, callback);
|
|
840
|
-
break;
|
|
841
|
-
}
|
|
842
|
-
},
|
|
843
|
-
|
|
844
|
-
RequestPriceListData(data, callback)
|
|
845
|
-
{
|
|
846
|
-
data.PreventDefault=true;
|
|
847
|
-
var symbol=data.Request.Data.symbol;
|
|
848
|
-
console.log("[DealChart::RequestPriceListData] symbol",symbol);
|
|
849
|
-
var url= this.ApiPriceListUrl;
|
|
850
|
-
|
|
851
|
-
$.ajax({
|
|
852
|
-
url: url,
|
|
853
|
-
data: { 'symbol':[symbol]},
|
|
854
|
-
type:"post",
|
|
855
|
-
dataType: 'json',
|
|
856
|
-
async:true,
|
|
857
|
-
success: (recvdata)=>
|
|
858
|
-
{
|
|
859
|
-
this.RecvPriceListData(recvdata, callback);
|
|
860
|
-
},
|
|
861
|
-
fail: (request) =>
|
|
862
|
-
{
|
|
863
|
-
this.RecvError(request, RECV_DATA_TYPE.DEAL_PRICE_LIST_DATA);
|
|
864
|
-
}
|
|
865
|
-
});
|
|
866
|
-
},
|
|
867
|
-
|
|
868
|
-
RecvPriceListData(recvdata, callback)
|
|
869
|
-
{
|
|
870
|
-
var stock=recvdata.statistics[0];
|
|
871
|
-
var hqchartData={ detail:[], symbol:stock.symbol, name:stock.name, yclose: stock.yclose , UpdateType:1 };
|
|
872
|
-
var totalVol=stock.vol;
|
|
873
|
-
for(var i in stock.list)
|
|
874
|
-
{
|
|
875
|
-
var item=stock.list[i];
|
|
876
|
-
var vol=item[1];
|
|
877
|
-
var newItem=[ null, item[0], vol, null, null ];
|
|
878
|
-
newItem[8]={ Value:[0,0,0],Color: [0,1,2] };
|
|
879
|
-
if (totalVol>0)
|
|
880
|
-
{
|
|
881
|
-
newItem[8].Value[0]=item[2]/vol;
|
|
882
|
-
newItem[8].Value[1]=item[3]/vol;
|
|
883
|
-
newItem[8].Value[2]=item[4]/vol;
|
|
884
|
-
|
|
885
|
-
newItem[8].Rate= item[1]/totalVol; //占比
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
hqchartData.detail.push(newItem);
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
hqchartData.detail.sort(function(left, right) { return right[1]-left[1] });
|
|
892
|
-
|
|
893
|
-
callback(hqchartData);
|
|
894
|
-
},
|
|
895
|
-
|
|
896
|
-
GetCustomText(event, data, obj)
|
|
897
|
-
{
|
|
898
|
-
var itemData=data.Data.Source[8];
|
|
899
|
-
if (!itemData) return;
|
|
900
|
-
|
|
901
|
-
var value=itemData.Rate*100;
|
|
902
|
-
var text=value.toFixed(1)+"%";
|
|
903
|
-
|
|
904
|
-
data.Out.Text=text;
|
|
905
|
-
//data.Out.TextAlign='center';
|
|
906
|
-
},
|
|
907
|
-
|
|
908
|
-
GetDealListUrl()
|
|
909
|
-
{
|
|
910
|
-
var url=`./stockdeallastest.demo.page.html?symbol=${this.Symbol}&style=${this.isBlackStyle?"black":"white"}`;
|
|
911
|
-
return url;
|
|
912
|
-
},
|
|
913
|
-
|
|
914
|
-
ChangeCapitalFlowDay(index) {
|
|
915
|
-
this.CapitalFlowDayIndex = index;
|
|
916
|
-
this.CurrentDayCapitaData = this.CapitalFlow.Data[index];
|
|
917
|
-
},
|
|
918
|
-
UpdateBuySell: function(id, arySymbol, dataType, jsStock) {
|
|
919
|
-
if (arySymbol.indexOf(this.Symbol) < 0) return;
|
|
920
|
-
|
|
921
|
-
let read = jsStock.GetStockRead(this.ID[0], this.UpdateBuySell); //获取一个读取数据类,并绑定id和更新数据方法
|
|
922
|
-
let aryBuy = read.Get(this.Symbol, JSCommonStock.STOCK_FIELD_NAME.BUY5);
|
|
923
|
-
let arySell = read.Get(this.Symbol, JSCommonStock.STOCK_FIELD_NAME.SELL5); //买盘数据需要倒序排列
|
|
924
|
-
let yClose = read.Get(this.Symbol, JSCommonStock.STOCK_FIELD_NAME.YCLOSE);
|
|
925
|
-
|
|
926
|
-
let SellTitle = ["卖一", "卖二", "卖三", "卖四", "卖五"];
|
|
927
|
-
let BuyTitle = ["买一", "买二", "买三", "买四", "买五"];
|
|
928
|
-
|
|
929
|
-
if (!this.IsPlusNumber(yClose)) return;
|
|
930
|
-
|
|
931
|
-
if (
|
|
932
|
-
this.IsBuySellInital == true &&
|
|
933
|
-
(id != this.ID[0] ||
|
|
934
|
-
dataType != JSCommonStock.RECV_DATA_TYPE.BUY_SELL_DATA)
|
|
935
|
-
)
|
|
936
|
-
return;
|
|
937
|
-
|
|
938
|
-
console.log("[StockTradeInfo::UpdateBuySell]",this.Symbol,aryBuy,arySell,yClose);
|
|
939
|
-
|
|
940
|
-
let buyData = DefaultData.GetBuyData();
|
|
941
|
-
for (var i in aryBuy)
|
|
942
|
-
{
|
|
943
|
-
var item = aryBuy[i];
|
|
944
|
-
|
|
945
|
-
var buyItem = buyData[i];
|
|
946
|
-
buyItem.Title = BuyTitle[i];
|
|
947
|
-
|
|
948
|
-
if (item.Price<=0) continue; //没有价格的 为无效数据
|
|
949
|
-
|
|
950
|
-
buyItem.Vol.Text = item.Vol.toString();
|
|
951
|
-
buyItem.Price.Text = JSCommon.IFrameSplitOperator.FormatValueString(item.Price,2);
|
|
952
|
-
buyItem.Price.Color = JSCommon.IFrameSplitOperator.FormatValueColor(item.Price,yClose);
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
let sellData = DefaultData.GetSellData();
|
|
956
|
-
for (var i in arySell)
|
|
957
|
-
{
|
|
958
|
-
var item = arySell[i];
|
|
959
|
-
|
|
960
|
-
var selItem = sellData[i];
|
|
961
|
-
selItem.Title = SellTitle[i];
|
|
962
|
-
|
|
963
|
-
if (item.Price<=0) continue; //没有价格的 为无效数据
|
|
964
|
-
|
|
965
|
-
selItem.Vol.Text = item.Vol.toString();
|
|
966
|
-
selItem.Price.Text = JSCommon.IFrameSplitOperator.FormatValueString(item.Price,2);
|
|
967
|
-
selItem.Price.Color = JSCommon.IFrameSplitOperator.FormatValueColor(item.Price,yClose);
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
this.IsBuySellInital = true; //已经初始化了
|
|
971
|
-
this.SellData = sellData.reverse();
|
|
972
|
-
this.BuyData = buyData;
|
|
973
|
-
},
|
|
974
|
-
//设置外部共享的股票数据类
|
|
975
|
-
SetJSStock: function(jsStock) {
|
|
976
|
-
this.JSStock = jsStock;
|
|
977
|
-
},
|
|
978
|
-
|
|
979
|
-
ChangeStyle(styleName)
|
|
980
|
-
{
|
|
981
|
-
this.isBlackStyle = 'black' === styleName;
|
|
982
|
-
this.MoreDealLink = this.GetDealListUrl();
|
|
983
|
-
|
|
984
|
-
var resource=this.HQChartStyle.get(this.isBlackStyle?1:0);
|
|
985
|
-
// console.log('resourceresourceresource:', resource.DealList.FieldColor.Text);
|
|
986
|
-
JSCommon.JSChart.SetStyle(resource);
|
|
987
|
-
var divDeal = this.$refs.deal;
|
|
988
|
-
if(divDeal){
|
|
989
|
-
divDeal.style.backgroundColor=resource.BGColor; //设置最外面的div背景
|
|
990
|
-
if (this.DealChart) this.DealChart.ReloadResource({Redraw:true}); //动态刷新配色
|
|
991
|
-
}
|
|
992
|
-
var priceList = this.$refs.priceList;
|
|
993
|
-
if(priceList){
|
|
994
|
-
priceList.style.backgroundColor=resource.BGColor; //设置最外面的div背景
|
|
995
|
-
if (this.PriceListChart) this.PriceListChart.ReloadResource({Redraw:true}); //动态刷新配色
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
},
|
|
999
|
-
|
|
1000
|
-
//窗口变化UI自适应调整
|
|
1001
|
-
OnSize() {
|
|
1002
|
-
this.$nextTick(() => {
|
|
1003
|
-
var tradeinfo = this.$refs.tradeinfo;
|
|
1004
|
-
var bookWrap = this.$refs.bookWrap;
|
|
1005
|
-
var sellFive = this.$refs.sellFive;
|
|
1006
|
-
var buyFive = this.$refs.buyFive;
|
|
1007
|
-
var dealpricelist = this.$refs.dealpricelist
|
|
1008
|
-
var detailList = this.$refs.detailList;
|
|
1009
|
-
var deal = this.$refs.deal;
|
|
1010
|
-
var priceList = this.$refs.priceList;
|
|
1011
|
-
var height = tradeinfo.clientHeight;
|
|
1012
|
-
var width = tradeinfo.clientWidth;
|
|
1013
|
-
|
|
1014
|
-
var dealpricelistHeight = height - bookWrap.offsetHeight - sellFive.offsetHeight - buyFive.offsetHeight;
|
|
1015
|
-
dealpricelist.style.height = dealpricelistHeight + 'px';
|
|
1016
|
-
var detailListHeight = height - 67 - 24 * 10 - 3
|
|
1017
|
-
detailList.style.height = detailListHeight + 'px';
|
|
1018
|
-
|
|
1019
|
-
var seeMoreDealHeight = 25
|
|
1020
|
-
if(deal){
|
|
1021
|
-
deal.style.height = (detailListHeight - seeMoreDealHeight) + 'px';
|
|
1022
|
-
deal.style.width = width + 'px';
|
|
1023
|
-
}
|
|
1024
|
-
if(this.DealChart){
|
|
1025
|
-
this.DealChart.OnSize()
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
if(priceList){
|
|
1029
|
-
priceList.style.height = detailListHeight + 'px';
|
|
1030
|
-
priceList.style.width = width + 'px';
|
|
1031
|
-
}
|
|
1032
|
-
if(this.PriceListChart){
|
|
1033
|
-
this.PriceListChart.OnSize()
|
|
1034
|
-
}
|
|
1035
|
-
})
|
|
1036
|
-
},
|
|
1037
|
-
|
|
1038
|
-
RequestData: function() {
|
|
1039
|
-
this.JSStock.RequestData();
|
|
1040
|
-
},
|
|
1041
|
-
|
|
1042
|
-
UpdateBookRate: function(id, arySymbol, dataType, jsStock)
|
|
1043
|
-
{
|
|
1044
|
-
if (arySymbol.indexOf(this.Symbol) < 0) return;
|
|
1045
|
-
|
|
1046
|
-
let read = jsStock.GetStockRead(this.ID[2], this.UpdateBookRate); //获取一个读取数据类,并绑定id和更新数据方法
|
|
1047
|
-
var bookRate = { Value: read.Get(this.Symbol, JSCommonStock.STOCK_FIELD_NAME.BOOK_RATE) }; //委比
|
|
1048
|
-
var bookDiffer = { Value: read.Get(this.Symbol, JSCommonStock.STOCK_FIELD_NAME.BOOK_DIFFER) }; //委差
|
|
1049
|
-
|
|
1050
|
-
console.log('bookRate,bookDiffer:',bookRate,bookDiffer);
|
|
1051
|
-
|
|
1052
|
-
if ( id != this.ID[2] || dataType != JSCommonStock.RECV_DATA_TYPE.DERIVATIVE_DATA ) return;
|
|
1053
|
-
|
|
1054
|
-
let bookData = DefaultData.GetBookData();
|
|
1055
|
-
bookData.BookRate.Text = JSCommon.IFrameSplitOperator.FormatValueString(bookRate.Value, 2) + "%";
|
|
1056
|
-
bookData.BookRate.Color = JSCommon.IFrameSplitOperator.FormatValueColor(bookRate.Value,0);
|
|
1057
|
-
bookData.BookDiff.Text = bookDiffer.Value;
|
|
1058
|
-
bookData.BookDiff.Color = JSCommon.IFrameSplitOperator.FormatValueColor(bookDiffer.Value,0);
|
|
1059
|
-
this.BookData = bookData;
|
|
1060
|
-
// console.log('[UpdateBookRate BookData]',this.BookData);
|
|
1061
|
-
},
|
|
1062
|
-
|
|
1063
|
-
UpdateTrade: function(id, arySymbol, dataType, jsStock) {
|
|
1064
|
-
if (arySymbol.indexOf(this.Symbol) < 0) return;
|
|
1065
|
-
|
|
1066
|
-
let read = jsStock.GetStockRead(this.ID[1], this.UpdateTrade); //获取一个读取数据类,并绑定id和更新数据方法
|
|
1067
|
-
let aryDeal = read.Get(this.Symbol, JSCommonStock.STOCK_FIELD_NAME.DEAL);
|
|
1068
|
-
let yClose = read.Get(this.Symbol, JSCommonStock.STOCK_FIELD_NAME.YCLOSE);
|
|
1069
|
-
|
|
1070
|
-
console.log(
|
|
1071
|
-
"[StockTradeInfo::UpdateTrade]",
|
|
1072
|
-
this.Symbol,
|
|
1073
|
-
aryDeal,
|
|
1074
|
-
yClose
|
|
1075
|
-
);
|
|
1076
|
-
|
|
1077
|
-
if (!this.IsPlusNumber(yClose) || !aryDeal) return;
|
|
1078
|
-
if (
|
|
1079
|
-
this.IsTradeDataInital == true &&
|
|
1080
|
-
(id != this.ID[1] || dataType != JSCommonStock.RECV_DATA_TYPE.DEAL_DATA)
|
|
1081
|
-
)
|
|
1082
|
-
return;
|
|
1083
|
-
|
|
1084
|
-
let data = DefaultData.GetTradeData();
|
|
1085
|
-
// console.log(data)
|
|
1086
|
-
for (let i = 0; i < aryDeal.length && i < data.length; i++) {
|
|
1087
|
-
var item = aryDeal[i];
|
|
1088
|
-
var tradeItem = data[i];
|
|
1089
|
-
var newTime = parseInt(item.Time / 100); //去掉秒
|
|
1090
|
-
|
|
1091
|
-
tradeItem.Time.Text = JSCommon.IFrameSplitOperator.FormatTimeString(
|
|
1092
|
-
newTime
|
|
1093
|
-
);
|
|
1094
|
-
tradeItem.Price.Text = JSCommon.IFrameSplitOperator.FormatValueString(
|
|
1095
|
-
item.Price,
|
|
1096
|
-
2
|
|
1097
|
-
);
|
|
1098
|
-
tradeItem.Price.Color = JSCommon.IFrameSplitOperator.FormatValueColor(
|
|
1099
|
-
item.Price,
|
|
1100
|
-
yClose
|
|
1101
|
-
);
|
|
1102
|
-
tradeItem.Vol.Text = parseInt(item.Vol / 100).toString(); //单位是股 需要/100
|
|
1103
|
-
|
|
1104
|
-
if (item.BS == "B") tradeItem.BS = { Color: "PriceUp", Text: " B" };
|
|
1105
|
-
else if (item.BS == "S")
|
|
1106
|
-
tradeItem.BS = { Color: "PriceDown", Text: " S" };
|
|
1107
|
-
else tradeItem.BS = { Color: "Transparent", Text: " B" }; //使用透明色
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
this.IsTradeDataInital = true; //已经初始化了
|
|
1111
|
-
this.TradeData = data;
|
|
1112
|
-
},
|
|
1113
|
-
|
|
1114
|
-
//资金流
|
|
1115
|
-
InitalCapitalFlow: function() {
|
|
1116
|
-
//订阅字段
|
|
1117
|
-
var field = [
|
|
1118
|
-
JSCommonStock.STOCK_FIELD_NAME.CAPITAL_FLOW_DAY,
|
|
1119
|
-
JSCommonStock.STOCK_FIELD_NAME.CAPITAL_FLOW_DAY3,
|
|
1120
|
-
JSCommonStock.STOCK_FIELD_NAME.CAPITAL_FLOW_DAY5,
|
|
1121
|
-
JSCommonStock.STOCK_FIELD_NAME.CAPITAL_FLOW_DAY10
|
|
1122
|
-
//JSCommonStock.STOCK_FIELD_NAME.DDE,
|
|
1123
|
-
//JSCommonStock.STOCK_FIELD_NAME.DDE3,
|
|
1124
|
-
//JSCommonStock.STOCK_FIELD_NAME.DDE5,
|
|
1125
|
-
//JSCommonStock.STOCK_FIELD_NAME.DDE10,
|
|
1126
|
-
];
|
|
1127
|
-
var read = this.JSStock.GetStockRead(this.ID[3], this.UpdateCapitalFlow); //订阅资金流
|
|
1128
|
-
if (this.Symbol != "") {
|
|
1129
|
-
read.SetQueryField(this.Symbol, field);
|
|
1130
|
-
}
|
|
1131
|
-
},
|
|
1132
|
-
|
|
1133
|
-
UpdateCapitalFlow: function(id, arySymbol, dataType, jsStock)
|
|
1134
|
-
{
|
|
1135
|
-
let read = jsStock.GetStockRead(this.ID[3], this.UpdateCapitalFlow); //获取一个读取数据类,并绑定id和更新数据方法
|
|
1136
|
-
if (!this.CapitalFlow.IsShow) return; //不显示直接返回 不订阅了
|
|
1137
|
-
if (arySymbol.indexOf(this.Symbol) < 0) return;
|
|
1138
|
-
|
|
1139
|
-
var flowDay = read.Get(
|
|
1140
|
-
this.Symbol,
|
|
1141
|
-
JSCommonStock.STOCK_FIELD_NAME.CAPITAL_FLOW_DAY
|
|
1142
|
-
);
|
|
1143
|
-
var flowDay3 = read.Get(
|
|
1144
|
-
this.Symbol,
|
|
1145
|
-
JSCommonStock.STOCK_FIELD_NAME.CAPITAL_FLOW_DAY3
|
|
1146
|
-
);
|
|
1147
|
-
var flowDay5 = read.Get(
|
|
1148
|
-
this.Symbol,
|
|
1149
|
-
JSCommonStock.STOCK_FIELD_NAME.CAPITAL_FLOW_DAY5
|
|
1150
|
-
);
|
|
1151
|
-
var flowDay10 = read.Get(
|
|
1152
|
-
this.Symbol,
|
|
1153
|
-
JSCommonStock.STOCK_FIELD_NAME.CAPITAL_FLOW_DAY10
|
|
1154
|
-
);
|
|
1155
|
-
if (flowDay) this.RecvCapticalData(flowDay, 0);
|
|
1156
|
-
if (flowDay3) this.RecvCapticalData(flowDay3, 1);
|
|
1157
|
-
if (flowDay5) this.RecvCapticalData(flowDay5, 2);
|
|
1158
|
-
if (flowDay10) this.RecvCapticalData(flowDay10, 3);
|
|
1159
|
-
|
|
1160
|
-
this.CurrentDayCapitaData = this.CapitalFlow.Data[
|
|
1161
|
-
this.CapitalFlowDayIndex
|
|
1162
|
-
];
|
|
1163
|
-
|
|
1164
|
-
console.log(
|
|
1165
|
-
"[StockTradeInfo::UpdateCapitalFlow]",
|
|
1166
|
-
this.Symbol,
|
|
1167
|
-
flowDay,
|
|
1168
|
-
flowDay3,
|
|
1169
|
-
flowDay5,
|
|
1170
|
-
flowDay10
|
|
1171
|
-
);
|
|
1172
|
-
},
|
|
1173
|
-
InitCapitalFlowChart(netValueData, chartStyleData) {
|
|
1174
|
-
//资金流柱状图
|
|
1175
|
-
var data = netValueData;
|
|
1176
|
-
var maxValue = 0;
|
|
1177
|
-
for (let i = 0; i < data.length; i++) {
|
|
1178
|
-
if (Math.abs(data[i].Value) > maxValue) {
|
|
1179
|
-
maxValue = Math.abs(data[i].Value);
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
for (let i = 0; i < data.length; i++) {
|
|
1184
|
-
var absValue = Math.abs(data[i].Value);
|
|
1185
|
-
var rate = Number(absValue / maxValue).toFixed(4);
|
|
1186
|
-
var contentHeight = ($(".charWrap").height() - 1) / 2;
|
|
1187
|
-
var rateHeight = Math.floor(rate * contentHeight);
|
|
1188
|
-
if(rateHeight == 0 && absValue !== 0){
|
|
1189
|
-
rateHeight = 2;
|
|
1190
|
-
}
|
|
1191
|
-
var contentPos = contentHeight + 1;
|
|
1192
|
-
var direction = data[i].Direction;
|
|
1193
|
-
// var labelHeight = 18;
|
|
1194
|
-
if (direction == "upper") {
|
|
1195
|
-
chartStyleData[i] = {
|
|
1196
|
-
Content: { bottom: contentPos + "px", top: "auto" },
|
|
1197
|
-
Bar: {
|
|
1198
|
-
bottom: "0",
|
|
1199
|
-
top: "auto",
|
|
1200
|
-
height: rateHeight + "px",
|
|
1201
|
-
backgroundColor: "#ee1515"
|
|
1202
|
-
},
|
|
1203
|
-
Label: {
|
|
1204
|
-
bottom: "auto",
|
|
1205
|
-
top: contentHeight+"px",
|
|
1206
|
-
color: "#ee1515"
|
|
1207
|
-
}
|
|
1208
|
-
};
|
|
1209
|
-
} else if (direction == "below") {
|
|
1210
|
-
chartStyleData[i] = {
|
|
1211
|
-
Content: { bottom: "auto", top: contentPos + "px" },
|
|
1212
|
-
Bar: {
|
|
1213
|
-
bottom: "auto",
|
|
1214
|
-
top: "0",
|
|
1215
|
-
height: rateHeight + "px",
|
|
1216
|
-
backgroundColor: "#199e00"
|
|
1217
|
-
},
|
|
1218
|
-
Label: {
|
|
1219
|
-
bottom: contentHeight+"px",
|
|
1220
|
-
top: "auto",
|
|
1221
|
-
color: "#199e00"
|
|
1222
|
-
}
|
|
1223
|
-
};
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
},
|
|
1227
|
-
RecvCapticalData(data, index) {
|
|
1228
|
-
var superIn = data.SuperIn; //超大单流入
|
|
1229
|
-
var superOut = data.SuperOut; //超大单流出
|
|
1230
|
-
var bigIn = data.BigIn; //大单流入
|
|
1231
|
-
var bigOut = data.BigOut; //大单流出
|
|
1232
|
-
var midIn = data.MidIn; //中单流入
|
|
1233
|
-
var midOut = data.MidOut; //中单流出
|
|
1234
|
-
var smallIn = data.SmallIn; //小单流入
|
|
1235
|
-
var smallOut = data.SmallOut; //小单流出
|
|
1236
|
-
var mainIn = data.MainIn; //主力流入
|
|
1237
|
-
var mainOut = data.MainOut; //主力流出
|
|
1238
|
-
var mainNetIn = data.MainNetIn; //主力净流入
|
|
1239
|
-
|
|
1240
|
-
var superNetValue = superIn - superOut;
|
|
1241
|
-
var bigNetValue = bigIn - bigOut;
|
|
1242
|
-
var midNetValue = midIn - midOut;
|
|
1243
|
-
var smallNetValue = smallIn - smallOut;
|
|
1244
|
-
|
|
1245
|
-
var mainFlowData = this.CapitalFlow.Data[index].MainFlowData;
|
|
1246
|
-
mainFlowData.In.value = mainIn;
|
|
1247
|
-
mainFlowData.In.Text = this.FormatValueString(mainIn,true,0);
|
|
1248
|
-
mainFlowData.Out.value = mainOut;
|
|
1249
|
-
mainFlowData.Out.Text = this.FormatValueString(mainOut,true,0);
|
|
1250
|
-
mainFlowData.NetFlow.value = mainNetIn;
|
|
1251
|
-
mainFlowData.NetFlow.Text = this.FormatValueString(mainNetIn,true,0);
|
|
1252
|
-
mainFlowData.NetFlow.Color = JSCommon.IFrameSplitOperator.FormatValueColor(
|
|
1253
|
-
mainNetIn,
|
|
1254
|
-
0
|
|
1255
|
-
);
|
|
1256
|
-
|
|
1257
|
-
var orderAry = [
|
|
1258
|
-
{ In: superIn, Out: superOut },
|
|
1259
|
-
{ In: bigIn, Out: bigOut },
|
|
1260
|
-
{ In: midIn, Out: midOut },
|
|
1261
|
-
{ In: smallIn, Out: smallOut }
|
|
1262
|
-
];
|
|
1263
|
-
var OrderData = this.CapitalFlow.Data[index].OrderData;
|
|
1264
|
-
for (let i = 0; i < orderAry.length; i++) {
|
|
1265
|
-
var orderItem = orderAry[i];
|
|
1266
|
-
OrderData[i].In.Value = orderItem.In;
|
|
1267
|
-
OrderData[i].In.Text = this.FormatValueString(orderItem.In,false,0);
|
|
1268
|
-
OrderData[i].Out.Value = orderItem.Out;
|
|
1269
|
-
OrderData[i].Out.Text = this.FormatValueString(orderItem.Out,false,0);
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
var netValue = [
|
|
1273
|
-
{ Value: superNetValue },
|
|
1274
|
-
{ Value: bigNetValue },
|
|
1275
|
-
{ Value: midNetValue },
|
|
1276
|
-
{ Value: smallNetValue }
|
|
1277
|
-
];
|
|
1278
|
-
var netValueData = this.CapitalFlow.Data[index].NetValueData;
|
|
1279
|
-
for (let j = 0; j < netValue.length; j++) {
|
|
1280
|
-
var netItem = netValue[j];
|
|
1281
|
-
netValueData[j].Value = netItem.Value;
|
|
1282
|
-
netValueData[j].Text = this.FormatValueString(netItem.Value,false,0);
|
|
1283
|
-
netValueData[j].Color = JSCommon.IFrameSplitOperator.FormatValueColor(
|
|
1284
|
-
netItem.Value,
|
|
1285
|
-
0
|
|
1286
|
-
);
|
|
1287
|
-
netValueData[j].Direction = netItem.Value > 0 ? "upper" : "below";
|
|
1288
|
-
}
|
|
1289
|
-
|
|
1290
|
-
var chartStyleData = this.CapitalFlow.Data[index].ChartStyleData;
|
|
1291
|
-
this.InitCapitalFlowChart(netValueData, chartStyleData);
|
|
1292
|
-
|
|
1293
|
-
this.CapitalFlow.Data[index].MainFlowData = mainFlowData;
|
|
1294
|
-
this.CapitalFlow.Data[index].OrderData = OrderData;
|
|
1295
|
-
this.CapitalFlow.Data[index].NetValueData = netValueData;
|
|
1296
|
-
this.CapitalFlow.Data[index].ChartStyleData = chartStyleData;
|
|
1297
|
-
},
|
|
1298
|
-
FormatValueString:function(value,HasUnit,floatCount){
|
|
1299
|
-
if(HasUnit){
|
|
1300
|
-
return Number(value / 10000).toFixed(floatCount) + '万元';
|
|
1301
|
-
}else{
|
|
1302
|
-
return Number(value / 10000).toFixed(floatCount);
|
|
1303
|
-
}
|
|
1304
|
-
},
|
|
1305
|
-
//切换股票代码
|
|
1306
|
-
SetSymbol: function(symbol) {
|
|
1307
|
-
if (this.Symbol == symbol) return;
|
|
1308
|
-
|
|
1309
|
-
console.log(`[StockTradeInfo::SetSymbol] symbol=${this.Symbol}`);
|
|
1310
|
-
|
|
1311
|
-
this.Symbol = symbol;
|
|
1312
|
-
this.IsBuySellInital = false;
|
|
1313
|
-
this.IsTradeDataInital = false;
|
|
1314
|
-
this.InitalStock(); //订阅数据
|
|
1315
|
-
if (this.IsSHSZIndex(this.Symbol)) this.ShowCapitalFlow(false);
|
|
1316
|
-
else this.InitalCapitalFlow();
|
|
1317
|
-
if (!this.IsShareStock) this.JSStock.RequestData();
|
|
1318
|
-
|
|
1319
|
-
this.MoreDealLink = this.GetDealListUrl();
|
|
1320
|
-
|
|
1321
|
-
//分价表是显示的状态,切换股票更新
|
|
1322
|
-
if (this.DealChart) this.DealChart.ChangeSymbol(this.Symbol);
|
|
1323
|
-
if (this.PriceListChart) this.PriceListChart.ChangeSymbol(this.Symbol);
|
|
1324
|
-
|
|
1325
|
-
},
|
|
1326
|
-
|
|
1327
|
-
//初始化
|
|
1328
|
-
InitalStock: function() {
|
|
1329
|
-
if (this.IsSHSZIndex()) return; //指数没有买卖盘
|
|
1330
|
-
|
|
1331
|
-
// 分成3个ID 分开取
|
|
1332
|
-
let read = this.JSStock.GetStockRead(this.ID[0], this.UpdateBuySell); //订阅买卖盘数据
|
|
1333
|
-
read.SetQueryField(this.Symbol, [
|
|
1334
|
-
JSCommonStock.STOCK_FIELD_NAME.BUY5,
|
|
1335
|
-
JSCommonStock.STOCK_FIELD_NAME.SELL5,
|
|
1336
|
-
JSCommonStock.STOCK_FIELD_NAME.YCLOSE
|
|
1337
|
-
]);
|
|
1338
|
-
|
|
1339
|
-
read = this.JSStock.GetStockRead(this.ID[1], this.UpdateTrade); //订阅成交明细
|
|
1340
|
-
read.SetQueryField(this.Symbol, [
|
|
1341
|
-
JSCommonStock.STOCK_FIELD_NAME.DEAL,
|
|
1342
|
-
JSCommonStock.STOCK_FIELD_NAME.YCLOSE
|
|
1343
|
-
]);
|
|
1344
|
-
|
|
1345
|
-
read = this.JSStock.GetStockRead(this.ID[2], this.UpdateBookRate); //订阅委比委差
|
|
1346
|
-
read.SetQueryField(this.Symbol, [
|
|
1347
|
-
JSCommonStock.STOCK_FIELD_NAME.BOOK_RATE,
|
|
1348
|
-
JSCommonStock.STOCK_FIELD_NAME.BOOK_DIFFER
|
|
1349
|
-
]);
|
|
1350
|
-
},
|
|
1351
|
-
|
|
1352
|
-
IsSHSZIndex: function() {
|
|
1353
|
-
return JSCommon.MARKET_SUFFIX_NAME.IsSHSZIndex(this.Symbol);
|
|
1354
|
-
},
|
|
1355
|
-
|
|
1356
|
-
//改变显示数据
|
|
1357
|
-
ChangeShowData: function(name, value) {
|
|
1358
|
-
console.log("[StockTradeInfo::ChangeShowData]", name, value);
|
|
1359
|
-
switch (name) {
|
|
1360
|
-
case "分笔":
|
|
1361
|
-
this.IsShowTradeData = true;
|
|
1362
|
-
this.ShowShortTerm(false);
|
|
1363
|
-
this.ShowCapitalFlow(false);
|
|
1364
|
-
this.ShowDealPrice(false);
|
|
1365
|
-
break;
|
|
1366
|
-
case "异动":
|
|
1367
|
-
this.IsShowTradeData = false;
|
|
1368
|
-
this.ShowCapitalFlow(false);
|
|
1369
|
-
this.ShowDealPrice(false);
|
|
1370
|
-
this.ShowShortTerm(true);
|
|
1371
|
-
break;
|
|
1372
|
-
case "资金":
|
|
1373
|
-
this.IsShowTradeData = false;
|
|
1374
|
-
this.ShowShortTerm(false);
|
|
1375
|
-
this.ShowDealPrice(false);
|
|
1376
|
-
this.ShowCapitalFlow(true);
|
|
1377
|
-
break;
|
|
1378
|
-
case "分价":
|
|
1379
|
-
this.IsShowTradeData=false;
|
|
1380
|
-
this.ShowShortTerm(false);
|
|
1381
|
-
this.ShowCapitalFlow(false);
|
|
1382
|
-
this.ShowDealPrice(true);
|
|
1383
|
-
break;
|
|
1384
|
-
}
|
|
1385
|
-
this.OnSize();
|
|
1386
|
-
},
|
|
1387
|
-
|
|
1388
|
-
//移动显示
|
|
1389
|
-
ShowShortTerm: function(isShow) {
|
|
1390
|
-
if (isShow) {
|
|
1391
|
-
if (!this.ShortTerm.JSStock) this.ShortTerm.JSStock = JSCommonStock.JSStock.GetShortTerm();
|
|
1392
|
-
var shortTerm = this.ShortTerm.JSStock;
|
|
1393
|
-
shortTerm.UpdateUICallback = this.UpdateShortTerm;
|
|
1394
|
-
shortTerm.IsAutoUpdate = true;
|
|
1395
|
-
shortTerm.RequestData();
|
|
1396
|
-
this.ShortTerm.IsShow = true;
|
|
1397
|
-
} else {
|
|
1398
|
-
this.ShortTerm.IsShow = false;
|
|
1399
|
-
if (!this.ShortTerm.JSStock) return;
|
|
1400
|
-
this.ShortTerm.JSStock.IsAutoUpdate = false;
|
|
1401
|
-
this.ShortTerm.JSStock.Stop();
|
|
1402
|
-
}
|
|
1403
|
-
},
|
|
1404
|
-
|
|
1405
|
-
//资金流显示
|
|
1406
|
-
ShowCapitalFlow: function(isShow) {
|
|
1407
|
-
if (isShow) {
|
|
1408
|
-
this.CapitalFlow.IsShow = true;
|
|
1409
|
-
this.InitalCapitalFlow();
|
|
1410
|
-
this.RequestData();
|
|
1411
|
-
} else
|
|
1412
|
-
{
|
|
1413
|
-
this.JSStock.Unsubscribe(this.ID[3]);
|
|
1414
|
-
this.CapitalFlow.IsShow = false;
|
|
1415
|
-
}
|
|
1416
|
-
},
|
|
1417
|
-
|
|
1418
|
-
UpdateShortTerm: function(data) {
|
|
1419
|
-
console.log("[StockTradeInfo::UpdateShortTerm] recv data", data);
|
|
1420
|
-
var showData = [];
|
|
1421
|
-
for (var i in data.Data) {
|
|
1422
|
-
var item = data.Data[i];
|
|
1423
|
-
var showItem = {
|
|
1424
|
-
Name: item.Name,
|
|
1425
|
-
Symbol: item.Symbol,
|
|
1426
|
-
Type: {
|
|
1427
|
-
Text: item.TypeInfo,
|
|
1428
|
-
Value: item.Type
|
|
1429
|
-
},
|
|
1430
|
-
Time: {
|
|
1431
|
-
Value: item.Time
|
|
1432
|
-
},
|
|
1433
|
-
Color: "PriceNull"
|
|
1434
|
-
};
|
|
1435
|
-
showItem.Time.Text = JSCommon.IFrameSplitOperator.FormatTimeString(
|
|
1436
|
-
parseInt(showItem.Time.Value / 100)
|
|
1437
|
-
);
|
|
1438
|
-
showItem.Color =
|
|
1439
|
-
showItem.Type.Value % 10 === 1 ? "PriceUp" : "PriceDown";
|
|
1440
|
-
showData.push(showItem);
|
|
1441
|
-
}
|
|
1442
|
-
this.ShortTerm.Data = showData;
|
|
1443
|
-
this.OnSize();
|
|
1444
|
-
},
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
ShowDealPrice:function(isShow)
|
|
1448
|
-
{
|
|
1449
|
-
if (isShow)
|
|
1450
|
-
{
|
|
1451
|
-
this.DealPrice.IsShow=true;
|
|
1452
|
-
this.OnSize();
|
|
1453
|
-
if (this.PriceListChart) this.PriceListChart.ChangeSymbol(this.Symbol);
|
|
1454
|
-
else this.CreatePriceListChart()
|
|
1455
|
-
// if (!this.DealPrice.JSStock) this.DealPrice.JSStock = JSCommonStock.JSStock.GetDealPriceListData();
|
|
1456
|
-
// var dealPrice = this.DealPrice.JSStock;
|
|
1457
|
-
// dealPrice.Symbol=this.Symbol;
|
|
1458
|
-
// dealPrice.UpdateUICallback = this.UpdateDealPrice;
|
|
1459
|
-
// dealPrice.IsAutoUpdate = true;
|
|
1460
|
-
// dealPrice.RequestData();
|
|
1461
|
-
}
|
|
1462
|
-
else
|
|
1463
|
-
{
|
|
1464
|
-
this.DealPrice.IsShow=false;
|
|
1465
|
-
// if (!this.DealPrice.JSStock) return;
|
|
1466
|
-
// this.DealPrice.JSStock.IsAutoUpdate = false;
|
|
1467
|
-
// this.DealPrice.JSStock.Stop();
|
|
1468
|
-
}
|
|
1469
|
-
},
|
|
1470
|
-
|
|
1471
|
-
UpdateDealPrice:function(dealPrice) //分价表
|
|
1472
|
-
{
|
|
1473
|
-
console.log('[StockTradeInfo::UpdateDealPrice]', dealPrice.Data);
|
|
1474
|
-
var yClose = dealPrice.Data.Day.YClose;
|
|
1475
|
-
var priceList = dealPrice.Data.PriceList;
|
|
1476
|
-
var maxVol = 0;
|
|
1477
|
-
for(let i = 0; i < priceList.length; ++i){
|
|
1478
|
-
var item = priceList[i];
|
|
1479
|
-
if(item.Vol > maxVol){
|
|
1480
|
-
maxVol = item.Vol;
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
var tdWPer = 0.25;
|
|
1484
|
-
var paddingRight = 5;
|
|
1485
|
-
var barWidth = this.$refs.dealpricelist.clientWidth * tdWPer - paddingRight;
|
|
1486
|
-
var data = [];
|
|
1487
|
-
for(let i = 0; i < priceList.length; ++i){
|
|
1488
|
-
var item = priceList[i];
|
|
1489
|
-
var vol = item.Vol;
|
|
1490
|
-
var buyRate = item.BuyVol / vol;
|
|
1491
|
-
var sellRate = item.SellVol / vol;
|
|
1492
|
-
var noneRate = item.NoneVol / vol;
|
|
1493
|
-
|
|
1494
|
-
var dealPriceObj = {};
|
|
1495
|
-
|
|
1496
|
-
var barStyle = {width:'20px'};
|
|
1497
|
-
dealPriceObj.Price = {Text:JSCommon.IFrameSplitOperator.FormatValueString(item.Price,2),Color:'',Value:item.Price} ;
|
|
1498
|
-
dealPriceObj.Vol = parseInt(item.Vol/100);
|
|
1499
|
-
dealPriceObj.Rate = JSCommon.IFrameSplitOperator.FormatValueString(item.Proportion * 100, 2) + '%';
|
|
1500
|
-
var color = JSCommon.IFrameSplitOperator.FormatValueColor(item.Price,yClose);
|
|
1501
|
-
dealPriceObj.Price.Color = color;
|
|
1502
|
-
// if(color == 'PriceUp'){
|
|
1503
|
-
// barStyle.backgroundColor = '#f00';
|
|
1504
|
-
// }else if(color == 'PriceDown'){
|
|
1505
|
-
// barStyle.backgroundColor = '#0f0';
|
|
1506
|
-
// }else{
|
|
1507
|
-
// barStyle.backgroundColor = '#ccc';
|
|
1508
|
-
// }
|
|
1509
|
-
|
|
1510
|
-
dealPriceObj.WidthRate = item.Vol / maxVol;
|
|
1511
|
-
var totalWidth = barWidth * dealPriceObj.WidthRate > 1 ? barWidth * dealPriceObj.WidthRate : 1;
|
|
1512
|
-
barStyle.width = totalWidth + 'px';
|
|
1513
|
-
|
|
1514
|
-
var buyWidth = buyRate * totalWidth + 'px';
|
|
1515
|
-
var sellWidth = sellRate * totalWidth + 'px';
|
|
1516
|
-
var noneWidth = noneRate * totalWidth + 'px';
|
|
1517
|
-
dealPriceObj.BuyRate = {width:buyWidth};
|
|
1518
|
-
dealPriceObj.SellRate = {width:sellWidth};
|
|
1519
|
-
dealPriceObj.NoneRate = {width:noneWidth};
|
|
1520
|
-
|
|
1521
|
-
dealPriceObj.Bar = barStyle;
|
|
1522
|
-
data.push(dealPriceObj);
|
|
1523
|
-
}
|
|
1524
|
-
data.sort( (l,r) => r.Price.Value-l.Price.Value );
|
|
1525
|
-
this.DealPriceData = data;
|
|
1526
|
-
console.log(`[::StockTradeInfo]backgroundColor:`,this.DealPriceData);
|
|
1527
|
-
},
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
IsNumber: JSCommon.IFrameSplitOperator.IsNumber, //是否是数值型
|
|
1531
|
-
IsPlusNumber: JSCommon.IFrameSplitOperator.IsPlusNumber //是否是>0的数值型
|
|
1532
|
-
}
|
|
1533
|
-
};
|
|
1534
|
-
</script>
|
|
1535
|
-
|
|
1536
|
-
<style lang="less" scoped>
|
|
1537
|
-
@border: 1px solid #e1ecf2;
|
|
1538
|
-
|
|
1539
|
-
html,
|
|
1540
|
-
body,
|
|
1541
|
-
div,
|
|
1542
|
-
p,
|
|
1543
|
-
span,
|
|
1544
|
-
li {
|
|
1545
|
-
font: 14px / normal "Microsoft Yahei";
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
|
-
* {
|
|
1549
|
-
padding: 0;
|
|
1550
|
-
margin: 0;
|
|
1551
|
-
}
|
|
1552
|
-
|
|
1553
|
-
ol,
|
|
1554
|
-
ul {
|
|
1555
|
-
list-style: none;
|
|
1556
|
-
}
|
|
1557
|
-
|
|
1558
|
-
.PriceUp,
|
|
1559
|
-
.PriceUp > span {
|
|
1560
|
-
color: #ee1515 !important;
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
.PriceDown,
|
|
1564
|
-
.PriceDown > span {
|
|
1565
|
-
color: #199e00 !important;
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
.PriceNull {
|
|
1569
|
-
color: inherit;
|
|
1570
|
-
}
|
|
1571
|
-
|
|
1572
|
-
.Transparent {
|
|
1573
|
-
color: rgba(255, 0, 255, 0);
|
|
1574
|
-
}
|
|
1575
|
-
|
|
1576
|
-
.tradeinfo {
|
|
1577
|
-
border: @border;
|
|
1578
|
-
width: 100%;
|
|
1579
|
-
height: 100%;
|
|
1580
|
-
position: relative;
|
|
1581
|
-
|
|
1582
|
-
.firstLine,
|
|
1583
|
-
.sellFive,
|
|
1584
|
-
.buyFive{
|
|
1585
|
-
box-sizing: border-box;
|
|
1586
|
-
}
|
|
1587
|
-
|
|
1588
|
-
.firstLine {
|
|
1589
|
-
width: 100%;
|
|
1590
|
-
border-bottom: @border;
|
|
1591
|
-
padding-left: 10px;
|
|
1592
|
-
display: flex;
|
|
1593
|
-
flex-direction: row;
|
|
1594
|
-
flex-wrap: wrap;
|
|
1595
|
-
|
|
1596
|
-
> p {
|
|
1597
|
-
flex-grow: 1;
|
|
1598
|
-
line-height: 67px;
|
|
1599
|
-
}
|
|
1600
|
-
}
|
|
1601
|
-
|
|
1602
|
-
.buyFive,
|
|
1603
|
-
.sellFive,
|
|
1604
|
-
.shorttermlist {
|
|
1605
|
-
border-bottom: @border;
|
|
1606
|
-
padding: 0 10px;
|
|
1607
|
-
display: flex;
|
|
1608
|
-
flex-direction: row;
|
|
1609
|
-
flex-wrap: wrap;
|
|
1610
|
-
overflow: hidden;
|
|
1611
|
-
width: 100%;
|
|
1612
|
-
box-sizing: border-box;
|
|
1613
|
-
|
|
1614
|
-
> div {
|
|
1615
|
-
flex-grow: 1;
|
|
1616
|
-
height: 100%;
|
|
1617
|
-
|
|
1618
|
-
p {
|
|
1619
|
-
height: 24px;
|
|
1620
|
-
line-height: 24px;
|
|
1621
|
-
}
|
|
1622
|
-
}
|
|
1623
|
-
|
|
1624
|
-
> div:nth-of-type(3),
|
|
1625
|
-
> div:nth-of-type(2) {
|
|
1626
|
-
p {
|
|
1627
|
-
width: 100%;
|
|
1628
|
-
text-align: right;
|
|
1629
|
-
}
|
|
1630
|
-
}
|
|
1631
|
-
}
|
|
1632
|
-
|
|
1633
|
-
.detailList,
|
|
1634
|
-
.shorttermlist {
|
|
1635
|
-
border-bottom: none;
|
|
1636
|
-
}
|
|
1637
|
-
.detailList{
|
|
1638
|
-
position: relative;
|
|
1639
|
-
width: 100%;
|
|
1640
|
-
overflow-y: hidden;
|
|
1641
|
-
|
|
1642
|
-
#deal{
|
|
1643
|
-
position: relative;
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
|
-
.seeMoreDeal{
|
|
1647
|
-
text-decoration: none;
|
|
1648
|
-
color: #317ef3;
|
|
1649
|
-
opacity: 0.7;
|
|
1650
|
-
width: 100%;
|
|
1651
|
-
// position: absolute;
|
|
1652
|
-
// right: 10px;
|
|
1653
|
-
// bottom: 5px;
|
|
1654
|
-
display: inline-block;
|
|
1655
|
-
padding: 0 10px 0;
|
|
1656
|
-
text-align: right;
|
|
1657
|
-
height: 25px;
|
|
1658
|
-
line-height: 25px;
|
|
1659
|
-
background-color: #fff;
|
|
1660
|
-
box-sizing: border-box;
|
|
1661
|
-
}
|
|
1662
|
-
.seeMoreDeal:hover{
|
|
1663
|
-
opacity: 1;
|
|
1664
|
-
}
|
|
1665
|
-
}
|
|
1666
|
-
.capitalList {
|
|
1667
|
-
.tabTop {
|
|
1668
|
-
width: 100%;
|
|
1669
|
-
display: flex;
|
|
1670
|
-
flex-direction: row;
|
|
1671
|
-
border-bottom: @border;
|
|
1672
|
-
> span {
|
|
1673
|
-
flex-grow: 1;
|
|
1674
|
-
border-right: @border;
|
|
1675
|
-
display: inline-block;
|
|
1676
|
-
line-height: 22px;
|
|
1677
|
-
text-align: center;
|
|
1678
|
-
cursor: pointer;
|
|
1679
|
-
}
|
|
1680
|
-
> span:hover {
|
|
1681
|
-
color: #093e8a;
|
|
1682
|
-
}
|
|
1683
|
-
> span.active {
|
|
1684
|
-
color: #093e8a;
|
|
1685
|
-
background-color: #e1ecf2;
|
|
1686
|
-
}
|
|
1687
|
-
> span:last-child {
|
|
1688
|
-
border-right: none;
|
|
1689
|
-
}
|
|
1690
|
-
}
|
|
1691
|
-
.mainFlow {
|
|
1692
|
-
border-bottom: @border;
|
|
1693
|
-
> p {
|
|
1694
|
-
display: flex;
|
|
1695
|
-
flex-direction: row;
|
|
1696
|
-
> span {
|
|
1697
|
-
flex-grow: 1;
|
|
1698
|
-
padding: 0 8px;
|
|
1699
|
-
display: inline-block;
|
|
1700
|
-
line-height: 22px;
|
|
1701
|
-
}
|
|
1702
|
-
> span:last-child {
|
|
1703
|
-
text-align: right;
|
|
1704
|
-
}
|
|
1705
|
-
}
|
|
1706
|
-
}
|
|
1707
|
-
.orderList {
|
|
1708
|
-
border-bottom: @border;
|
|
1709
|
-
table {
|
|
1710
|
-
width: 100%;
|
|
1711
|
-
td {
|
|
1712
|
-
line-height: 22px;
|
|
1713
|
-
padding: 0 8px;
|
|
1714
|
-
}
|
|
1715
|
-
tr > td:nth-of-type(2),
|
|
1716
|
-
tr > td:nth-of-type(3) {
|
|
1717
|
-
text-align: right;
|
|
1718
|
-
}
|
|
1719
|
-
}
|
|
1720
|
-
}
|
|
1721
|
-
.netValueWrap {
|
|
1722
|
-
padding: 4px 8px;
|
|
1723
|
-
> .charWrap {
|
|
1724
|
-
border: @border;
|
|
1725
|
-
width: 100%;
|
|
1726
|
-
height: 93px;
|
|
1727
|
-
position: relative;
|
|
1728
|
-
.middleLine {
|
|
1729
|
-
width: 100%;
|
|
1730
|
-
height: 1px;
|
|
1731
|
-
background-color: #e1ecf2;
|
|
1732
|
-
position: absolute;
|
|
1733
|
-
left: 0;
|
|
1734
|
-
top: 46px;
|
|
1735
|
-
}
|
|
1736
|
-
.bars {
|
|
1737
|
-
position: absolute;
|
|
1738
|
-
width: 100%;
|
|
1739
|
-
height: 100%;
|
|
1740
|
-
top: 0;
|
|
1741
|
-
left: 0;
|
|
1742
|
-
display: flex;
|
|
1743
|
-
flex-direction: row;
|
|
1744
|
-
.realArea {
|
|
1745
|
-
/*横向平铺*/
|
|
1746
|
-
flex-grow: 1;
|
|
1747
|
-
height: 100%;
|
|
1748
|
-
padding: 0 15px;
|
|
1749
|
-
position: relative;
|
|
1750
|
-
.label {
|
|
1751
|
-
font-size: 12px;
|
|
1752
|
-
height: 18px;
|
|
1753
|
-
width: 100%;
|
|
1754
|
-
position: absolute;
|
|
1755
|
-
left:0;
|
|
1756
|
-
text-align: center;
|
|
1757
|
-
}
|
|
1758
|
-
> div {
|
|
1759
|
-
width: 100%;
|
|
1760
|
-
height: 100%;
|
|
1761
|
-
position: relative;
|
|
1762
|
-
.content {
|
|
1763
|
-
/*包含柱条,文本,left,bottom值确定方向*/
|
|
1764
|
-
position: absolute;
|
|
1765
|
-
width: 100%;
|
|
1766
|
-
height: 46px;
|
|
1767
|
-
bottom: 47px; /*上方*/
|
|
1768
|
-
.bar{
|
|
1769
|
-
position: absolute;
|
|
1770
|
-
left: 0;
|
|
1771
|
-
display: inline-block;
|
|
1772
|
-
width: 100%;
|
|
1773
|
-
font-size: 12px;
|
|
1774
|
-
}
|
|
1775
|
-
}
|
|
1776
|
-
}
|
|
1777
|
-
}
|
|
1778
|
-
}
|
|
1779
|
-
}
|
|
1780
|
-
> .xLabels {
|
|
1781
|
-
width: 100%;
|
|
1782
|
-
display: flex;
|
|
1783
|
-
height: 22px;
|
|
1784
|
-
flex-direction: row;
|
|
1785
|
-
> span {
|
|
1786
|
-
flex-grow: 1;
|
|
1787
|
-
line-height: 22px;
|
|
1788
|
-
display: inline-block;
|
|
1789
|
-
text-align: center;
|
|
1790
|
-
}
|
|
1791
|
-
}
|
|
1792
|
-
}
|
|
1793
|
-
}
|
|
1794
|
-
.dealpricelist{
|
|
1795
|
-
box-sizing: border-box;
|
|
1796
|
-
// overflow-y: auto;
|
|
1797
|
-
// .table{
|
|
1798
|
-
// border-collapse: collapse;
|
|
1799
|
-
// border-spacing: 0;
|
|
1800
|
-
// border: none;
|
|
1801
|
-
// tr>td{
|
|
1802
|
-
// width: 25%;
|
|
1803
|
-
// line-height: 22px;
|
|
1804
|
-
// box-sizing: border-box;
|
|
1805
|
-
// }
|
|
1806
|
-
// tr>td:nth-of-type(2),tr>td:last-child{
|
|
1807
|
-
// text-align: right;
|
|
1808
|
-
// }
|
|
1809
|
-
// tr>td:nth-of-type(2){
|
|
1810
|
-
// padding-right: 5px;
|
|
1811
|
-
// }
|
|
1812
|
-
// td>span{
|
|
1813
|
-
// vertical-align: middle;
|
|
1814
|
-
// display:inline-block;
|
|
1815
|
-
// height: 14px;
|
|
1816
|
-
// .buy,.sell,.none{
|
|
1817
|
-
// display: inline-block;
|
|
1818
|
-
// height: 14px;
|
|
1819
|
-
// }
|
|
1820
|
-
// .buy{
|
|
1821
|
-
// background-color: red;
|
|
1822
|
-
// }
|
|
1823
|
-
// .sell{
|
|
1824
|
-
// background-color: green;
|
|
1825
|
-
// }
|
|
1826
|
-
// .none{
|
|
1827
|
-
// background-color: #ccc;
|
|
1828
|
-
// }
|
|
1829
|
-
// }
|
|
1830
|
-
|
|
1831
|
-
// }
|
|
1832
|
-
}
|
|
1833
|
-
|
|
1834
|
-
}
|
|
1835
|
-
|
|
1836
|
-
.blackStyle{
|
|
1837
|
-
width: 100%;
|
|
1838
|
-
.tradeinfo{
|
|
1839
|
-
background-color: #191d1e;
|
|
1840
|
-
border: 1px solid #3d4042;
|
|
1841
|
-
|
|
1842
|
-
.firstLine,
|
|
1843
|
-
.sellFive,
|
|
1844
|
-
.buyFive{
|
|
1845
|
-
border-bottom: 1px solid #3d4042;
|
|
1846
|
-
}
|
|
1847
|
-
|
|
1848
|
-
.firstLine>p>span,
|
|
1849
|
-
.sellFive>div>p>span,
|
|
1850
|
-
.buyFive>div>p>span,
|
|
1851
|
-
.dealpricelist table td
|
|
1852
|
-
{
|
|
1853
|
-
color: #9ca7b3;
|
|
1854
|
-
}
|
|
1855
|
-
|
|
1856
|
-
.dealpricelist table tr>td:last-child{
|
|
1857
|
-
color: #dde2e7;
|
|
1858
|
-
}
|
|
1859
|
-
|
|
1860
|
-
.sellFive>div:nth-of-type(3)>p>span,
|
|
1861
|
-
.buyFive>div:nth-of-type(3)>p>span{
|
|
1862
|
-
color: #06e2d6;
|
|
1863
|
-
}
|
|
1864
|
-
|
|
1865
|
-
.capitalList {
|
|
1866
|
-
.tabTop{
|
|
1867
|
-
border-bottom: 1px solid #3d4042;
|
|
1868
|
-
span{
|
|
1869
|
-
border-right: 1px solid #3d4042;
|
|
1870
|
-
color: #9ca7b3;
|
|
1871
|
-
|
|
1872
|
-
&.active{
|
|
1873
|
-
background-color: transparent;
|
|
1874
|
-
color: #f39700;
|
|
1875
|
-
}
|
|
1876
|
-
}
|
|
1877
|
-
}
|
|
1878
|
-
.mainFlow{
|
|
1879
|
-
border-bottom: 1px solid #3d4042;
|
|
1880
|
-
>p>span{
|
|
1881
|
-
color: #9ca7b3;
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
.orderList{
|
|
1885
|
-
border-bottom: 1px solid #3d4042;
|
|
1886
|
-
td{
|
|
1887
|
-
color: #9ca7b3;
|
|
1888
|
-
&:nth-of-type(2),
|
|
1889
|
-
&:nth-of-type(3){
|
|
1890
|
-
color: #dde2e7;
|
|
1891
|
-
}
|
|
1892
|
-
}
|
|
1893
|
-
}
|
|
1894
|
-
.netValueWrap > .charWrap {
|
|
1895
|
-
border: 1px solid #3d4042;
|
|
1896
|
-
.middleLine{
|
|
1897
|
-
background-color: #3d4042;
|
|
1898
|
-
}
|
|
1899
|
-
}
|
|
1900
|
-
.netValueWrap .xLabels span{
|
|
1901
|
-
color: #9ca7b3;
|
|
1902
|
-
}
|
|
1903
|
-
}
|
|
1904
|
-
|
|
1905
|
-
}
|
|
1906
|
-
}
|
|
1907
|
-
</style>
|