hqchart 1.1.12687 → 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/lib/umychart.vue.js +94 -50
- package/package.json +15 -47
- package/src/jscommon/umychart.resource/js/codemirror/javascript.js +1 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +409 -115
- package/src/jscommon/umychart.vue/umychart.vue.js +409 -115
- 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 -25291
- 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 -90257
- 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 -618
- 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 -2931
- 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 -12051
- 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,174 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="divorders" ref='divorders' style='width:100%;height:100%;'>
|
|
3
|
-
<div ref='divstockorder' class='divstockorder' v-for='(orderField,index) in OrderFileds.CurrentFileds' :key='index'>
|
|
4
|
-
<StockOrder ref='stockorder' :DefaultSymbol='Symbol' :DefaultOrderFiled='orderField.OrderFiled' :DefaultOrder='orderField.Order' />
|
|
5
|
-
</div>
|
|
6
|
-
<div ref='divideline' class='divideline' v-for='item in DivideLine' :key='item.ID'/>
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script>
|
|
11
|
-
import StockOrder from './stockorder.vue'
|
|
12
|
-
export default {
|
|
13
|
-
name:'StockMultiOrder',
|
|
14
|
-
data()
|
|
15
|
-
{
|
|
16
|
-
var data=
|
|
17
|
-
{
|
|
18
|
-
OrderFileds: {MetaFileds:[],CurrentFileds:[]},
|
|
19
|
-
Symbol: 'SHA.ci',
|
|
20
|
-
DivideLine:[], //分割线
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
return data;
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
props: ['DefaultSymbol', 'DefaultOrderFileds'],
|
|
27
|
-
|
|
28
|
-
components: { StockOrder },
|
|
29
|
-
|
|
30
|
-
STOCK_FIELD_NAME:StockOrder.STOCK_FIELD_NAME,
|
|
31
|
-
|
|
32
|
-
methods:
|
|
33
|
-
{
|
|
34
|
-
ChangeSymbol(symbol)
|
|
35
|
-
{
|
|
36
|
-
var stockorders = this.$refs.stockorder;
|
|
37
|
-
for(let i = 0; i < stockorders.length; i++)
|
|
38
|
-
{
|
|
39
|
-
stockorders[i].ChangeSymbol(symbol);
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
CalculateTableSize: function () //计算布局
|
|
43
|
-
{
|
|
44
|
-
var divorders = this.$refs.divorders;
|
|
45
|
-
var height = divorders.offsetHeight;
|
|
46
|
-
var width = divorders.offsetWidth; //获取外层div的大小
|
|
47
|
-
console.log(`[StockMultiOrder::CalculateTableSize] height=${height} width=${width}`);
|
|
48
|
-
|
|
49
|
-
var itemHeight = 0;
|
|
50
|
-
var itemWidth = 0;
|
|
51
|
-
var count = this.OrderFileds.CurrentFileds.length;
|
|
52
|
-
|
|
53
|
-
var rowCount = 0; //一行放几个图
|
|
54
|
-
|
|
55
|
-
if (count == 9)
|
|
56
|
-
{
|
|
57
|
-
itemHeight = parseInt(height/3);
|
|
58
|
-
itemWidth = parseInt(width/3);
|
|
59
|
-
rowCount = 3;
|
|
60
|
-
}
|
|
61
|
-
else if (count == 6)
|
|
62
|
-
{
|
|
63
|
-
itemHeight = parseInt(height/3);
|
|
64
|
-
itemWidth = parseInt(width/2);
|
|
65
|
-
rowCount = 2;
|
|
66
|
-
}
|
|
67
|
-
else if (count == 4)
|
|
68
|
-
{
|
|
69
|
-
itemHeight = parseInt(height/2);
|
|
70
|
-
itemWidth = parseInt(width/2);
|
|
71
|
-
rowCount = 2;
|
|
72
|
-
}
|
|
73
|
-
else
|
|
74
|
-
{
|
|
75
|
-
itemHeight = height;
|
|
76
|
-
itemWidth = parseInt(width/count);
|
|
77
|
-
rowCount = count;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
//调整div位置
|
|
81
|
-
var divstockorders = this.$refs.divstockorder;
|
|
82
|
-
var top=0;
|
|
83
|
-
for (let i = 0; i < divstockorders.length;)
|
|
84
|
-
{
|
|
85
|
-
var left=0;
|
|
86
|
-
var divHeight=itemHeight;
|
|
87
|
-
if (top+itemHeight>=height) divHeight=height-top-2;
|
|
88
|
-
|
|
89
|
-
for(var j=0;j<rowCount && i<divstockorders.length;++j,++i)
|
|
90
|
-
{
|
|
91
|
-
var divstockorder = divstockorders[i];
|
|
92
|
-
var divWidth=itemWidth;
|
|
93
|
-
if (left+itemWidth>=width || j==rowCount-1) divWidth=width-left-2; //最后1个需要减去边框的宽度
|
|
94
|
-
|
|
95
|
-
divstockorder.style.left = left + 'px';
|
|
96
|
-
divstockorder.style.top = top + 'px';
|
|
97
|
-
divstockorder.style.width = divWidth + 'px';
|
|
98
|
-
divstockorder.style.height = itemHeight + 'px';
|
|
99
|
-
|
|
100
|
-
left+=itemWidth;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
top+=itemHeight;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
//分割线
|
|
107
|
-
var left=0;
|
|
108
|
-
for(let i=0;i<rowCount && i<this.$refs.divideline.length;++i)
|
|
109
|
-
{
|
|
110
|
-
left+=itemWidth;
|
|
111
|
-
var divideLine=this.$refs.divideline[i];
|
|
112
|
-
divideLine.style.left=left + 'px';
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
OnSize()
|
|
116
|
-
{
|
|
117
|
-
this.CalculateTableSize();
|
|
118
|
-
var stockorders = this.$refs.stockorder;
|
|
119
|
-
for(let i = 0; i < stockorders.length; i++)
|
|
120
|
-
{
|
|
121
|
-
stockorders[i].OnSize();
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
created()
|
|
126
|
-
{
|
|
127
|
-
if (this.DefaultSymbol) this.Symbol = this.DefaultSymbol;
|
|
128
|
-
if (this.DefaultOrderFileds) this.OrderFileds.MetaFileds = this.DefaultOrderFileds;
|
|
129
|
-
var count = this.OrderFileds.MetaFileds.length;
|
|
130
|
-
if(count >= 4 && count < 6)
|
|
131
|
-
{
|
|
132
|
-
count = 4;
|
|
133
|
-
this.DivideLine=[1];
|
|
134
|
-
}else if(count >=6 && count < 9)
|
|
135
|
-
{
|
|
136
|
-
count = 6;
|
|
137
|
-
this.DivideLine=[1,2];
|
|
138
|
-
}else if(count >= 9)
|
|
139
|
-
{
|
|
140
|
-
count = 9;
|
|
141
|
-
this.DivideLine=[1,2];
|
|
142
|
-
}
|
|
143
|
-
console.log(`[StockMultiOrder::created]count:${count}`);
|
|
144
|
-
this.OrderFileds.CurrentFileds = this.OrderFileds.MetaFileds.slice(0,count);
|
|
145
|
-
},
|
|
146
|
-
mounted()
|
|
147
|
-
{
|
|
148
|
-
this.OnSize();
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
</script>
|
|
153
|
-
<style scoped lang='less'>
|
|
154
|
-
.divorders
|
|
155
|
-
{
|
|
156
|
-
position: relative;
|
|
157
|
-
border: 1px solid #ccc;
|
|
158
|
-
|
|
159
|
-
.divstockorder
|
|
160
|
-
{
|
|
161
|
-
position: absolute;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.divideline
|
|
166
|
-
{
|
|
167
|
-
width:1px;
|
|
168
|
-
top:0px;
|
|
169
|
-
left:1px;
|
|
170
|
-
height:100%;
|
|
171
|
-
position: absolute;
|
|
172
|
-
background-color: #ccc;
|
|
173
|
-
}
|
|
174
|
-
</style>
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!--
|
|
3
|
-
多周期图
|
|
4
|
-
!-->
|
|
5
|
-
|
|
6
|
-
<template>
|
|
7
|
-
<div class="multiPeriodWrap" ref='multiPeriodWrap' style="width:100%;height:100%">
|
|
8
|
-
<div class='perioditem' ref='perioditem' v-for='(periodItem,index) in ShowPeriod.CurrentPeriod' :key='index'>
|
|
9
|
-
<StockChart ref='stockchart' :DefaultSymbol='Symbol' :DefaultOption='GetChartOption(periodItem)'></StockChart>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<script>
|
|
16
|
-
import JSCommon from "../umychart.vue/umychart.vue.js";
|
|
17
|
-
import StockChart from './stockchart.vue'
|
|
18
|
-
import '../../jscommon/umychart.resource/font/iconfont.css'
|
|
19
|
-
import '../../jscommon/umychart.resource/css/tools.css'
|
|
20
|
-
|
|
21
|
-
//股票周期枚举
|
|
22
|
-
var STOCK_PERIOD=
|
|
23
|
-
{
|
|
24
|
-
PERIOD_MINUTE_ID:0, //走势图
|
|
25
|
-
PERIOD_KLINE_DAY_ID:1, //日线
|
|
26
|
-
PERIOD_KLINE_WEEK_ID:2, //周
|
|
27
|
-
PERIOD_KLINE_MONTH_ID:3, //月
|
|
28
|
-
PERIOD_KLINE_YEAR_ID:4, //年
|
|
29
|
-
|
|
30
|
-
PERIOD_KLINE_MINUTE_ID:5, //1分钟
|
|
31
|
-
PERIOD_KLINE_5_MINUTE_ID:6, //5分钟
|
|
32
|
-
PERIOD_KLINE_15_MINUTE_ID:7, //15分钟
|
|
33
|
-
PERIOD_KLINE_30_MINUTE_ID:8, //30分钟
|
|
34
|
-
|
|
35
|
-
//周期往后加
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
function DefaultData(){}
|
|
39
|
-
|
|
40
|
-
DefaultData.GetKLineOption = function (option)
|
|
41
|
-
{
|
|
42
|
-
let data =
|
|
43
|
-
{
|
|
44
|
-
Type: '历史K线图',
|
|
45
|
-
IsShowCorssCursorInfo:true,
|
|
46
|
-
Windows: //指定指标
|
|
47
|
-
[
|
|
48
|
-
{ Index: "MA",Modify: true, Change: true },
|
|
49
|
-
{ Index: "KDJ" ,Modify: true, Change: true, Close:true},
|
|
50
|
-
{ Index: "VOL" ,Modify: true, Change: true, Close:true}
|
|
51
|
-
],
|
|
52
|
-
KLine:
|
|
53
|
-
{
|
|
54
|
-
Right:1, //复权 0 不复权 1 前复权 2 后复权
|
|
55
|
-
Period:option.Period - 1, //周期: 0 日线 1 周线 2 月线 3 年线
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
if (option.Right>=0) data.KLine.Right=option.Right;
|
|
60
|
-
if (option.Windows) data.Windows=option.Windows;
|
|
61
|
-
return data;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
DefaultData.GetMinuteOption = function (option)
|
|
65
|
-
{
|
|
66
|
-
let data =
|
|
67
|
-
{
|
|
68
|
-
Type: '分钟走势图',
|
|
69
|
-
DayCount:1, //1 走势图 2,3,4,5 多日走势图
|
|
70
|
-
Windows: //指定指标
|
|
71
|
-
[
|
|
72
|
-
//{ Index: "KDJ" }
|
|
73
|
-
]
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
if (option.Windows) data.Windows=option.Windows;
|
|
77
|
-
return data;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export default
|
|
81
|
-
{
|
|
82
|
-
name: 'StockMultiPeriod',
|
|
83
|
-
|
|
84
|
-
components: { StockChart },
|
|
85
|
-
|
|
86
|
-
props:
|
|
87
|
-
[
|
|
88
|
-
'DefaultShowPeriod', //显示的周期
|
|
89
|
-
'DefaultSymbol', //默认股票
|
|
90
|
-
],
|
|
91
|
-
|
|
92
|
-
STOCK_PERIOD:STOCK_PERIOD, //枚举导出
|
|
93
|
-
|
|
94
|
-
data()
|
|
95
|
-
{
|
|
96
|
-
let data =
|
|
97
|
-
{
|
|
98
|
-
ShowPeriod: {MetaPeriod:[],CurrentPeriod:[]},//UI显示的图形 Period=周期 Windows:[指标] Right=复权
|
|
99
|
-
Symbol:'600000.sh',
|
|
100
|
-
}
|
|
101
|
-
return data;
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
created:function()
|
|
105
|
-
{
|
|
106
|
-
if (this.DefaultShowPeriod) this.ShowPeriod.MetaPeriod=this.DefaultShowPeriod;
|
|
107
|
-
if (this.DefaultSymbol) this.Symbol=this.DefaultSymbol;
|
|
108
|
-
var count = this.ShowPeriod.MetaPeriod.length;
|
|
109
|
-
if(count >= 4 && count < 6){
|
|
110
|
-
count = 4
|
|
111
|
-
}else if(count >=6 && count < 9){
|
|
112
|
-
count = 6
|
|
113
|
-
}else if(count >= 9){
|
|
114
|
-
count = 9;
|
|
115
|
-
}
|
|
116
|
-
this.ShowPeriod.CurrentPeriod = this.ShowPeriod.MetaPeriod.slice(0,count);
|
|
117
|
-
},
|
|
118
|
-
|
|
119
|
-
mounted:function()
|
|
120
|
-
{
|
|
121
|
-
this.OnSize();
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
methods:
|
|
125
|
-
{
|
|
126
|
-
GetChartOption(item)
|
|
127
|
-
{
|
|
128
|
-
if (item.Period===STOCK_PERIOD.PERIOD_MINUTE_ID) return DefaultData.GetMinuteOption(item);
|
|
129
|
-
else return DefaultData.GetKLineOption(item);
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
CalculateChartSize:function() //计算布局
|
|
134
|
-
{
|
|
135
|
-
var divMultiPeriod=this.$refs.multiPeriodWrap;
|
|
136
|
-
var height= divMultiPeriod.offsetHeight;
|
|
137
|
-
var width = divMultiPeriod.offsetWidth; //获取外层div的大小
|
|
138
|
-
console.log(`[StockMultiPeriod::CalculateChartSize] height=${height} width=${width}`);
|
|
139
|
-
|
|
140
|
-
var itemHeight = 0;
|
|
141
|
-
var itemWidth = 0;
|
|
142
|
-
var count = this.ShowPeriod.CurrentPeriod.length;
|
|
143
|
-
var rowCount = 0; //一行放几个图
|
|
144
|
-
|
|
145
|
-
if(count == 9)
|
|
146
|
-
{
|
|
147
|
-
itemHeight = height / 3;
|
|
148
|
-
itemWidth = width / 3;
|
|
149
|
-
rowCount = 3;
|
|
150
|
-
}
|
|
151
|
-
else if(count == 6)
|
|
152
|
-
{
|
|
153
|
-
itemHeight = height / 3;
|
|
154
|
-
itemWidth = width / 2;
|
|
155
|
-
rowCount = 2;
|
|
156
|
-
}
|
|
157
|
-
else if(count == 4)
|
|
158
|
-
{
|
|
159
|
-
itemHeight = height / 2;
|
|
160
|
-
itemWidth = width / 2;
|
|
161
|
-
rowCount = 2;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
//调整div位置
|
|
165
|
-
var divPeriods=this.$refs.perioditem;
|
|
166
|
-
for(let i = 0; i < divPeriods.length; i++)
|
|
167
|
-
{
|
|
168
|
-
var divPeriod=divPeriods[i];
|
|
169
|
-
var rowIndex = i % rowCount;
|
|
170
|
-
var colIndex = Math.floor(i / rowCount);
|
|
171
|
-
divPeriod.style.left = itemWidth * rowIndex + 'px';
|
|
172
|
-
divPeriod.style.top = itemHeight * colIndex + 'px';
|
|
173
|
-
divPeriod.style.width = itemWidth + 'px';
|
|
174
|
-
divPeriod.style.height = itemHeight + 'px';
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
|
|
178
|
-
OnSize()
|
|
179
|
-
{
|
|
180
|
-
this.CalculateChartSize();
|
|
181
|
-
var stockcharts = this.$refs.stockchart;
|
|
182
|
-
for(let i = 0; i < stockcharts.length; i++)
|
|
183
|
-
{
|
|
184
|
-
stockcharts[i].OnSize();
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
|
|
188
|
-
//切换股票代码
|
|
189
|
-
ChangeSymbol:function(symbol)
|
|
190
|
-
{
|
|
191
|
-
var stockcharts = this.$refs.stockchart;
|
|
192
|
-
for(let i = 0; i < stockcharts.length; i++)
|
|
193
|
-
{
|
|
194
|
-
stockcharts[i].ChangeSymbol(symbol);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
</script>
|
|
202
|
-
|
|
203
|
-
<style scoped lang="less">
|
|
204
|
-
.multiPeriodWrap{
|
|
205
|
-
position: relative;
|
|
206
|
-
.perioditem {
|
|
207
|
-
position: absolute;
|
|
208
|
-
}
|
|
209
|
-
/* width: 100%;
|
|
210
|
-
height: 100%;
|
|
211
|
-
display: flex;
|
|
212
|
-
flex-direction: column;
|
|
213
|
-
.periodRow{
|
|
214
|
-
flex-grow: 1;
|
|
215
|
-
display: flex;
|
|
216
|
-
flex-direction: row;
|
|
217
|
-
.priodItem{
|
|
218
|
-
flex-grow: 1;
|
|
219
|
-
}
|
|
220
|
-
} */
|
|
221
|
-
}
|
|
222
|
-
</style>
|