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.
Files changed (225) hide show
  1. package/package.json +15 -47
  2. package/src/jscommon/umychart.resource/js/codemirror/javascript.js +1 -1
  3. package/.babelrc +0 -6
  4. package/.vscode/settings.json +0 -4
  5. package/Makefile +0 -9
  6. package/README.md +0 -452
  7. package/index.js +0 -17
  8. package/postcss.config.js +0 -5
  9. package/src/index.html +0 -18
  10. package/src/jscommon/backup/announcement.png +0 -0
  11. package/src/jscommon/backup/announcement2.png +0 -0
  12. package/src/jscommon/backup/blocktrading.png +0 -0
  13. package/src/jscommon/backup/investor.png +0 -0
  14. package/src/jscommon/backup/pforecast.png +0 -0
  15. package/src/jscommon/backup/research.png +0 -0
  16. package/src/jscommon/backup/tradedetail.png +0 -0
  17. package/src/jscommon/backup/umychart - backup.js +0 -17631
  18. package/src/jscommon/backup/umychart.macro.js +0 -4
  19. package/src/jscommon/backup/umychart.macro.vue.js +0 -3
  20. package/src/jscommon/commonindextree.json +0 -92
  21. package/src/jscommon/index.html +0 -13
  22. package/src/jscommon/jschinamapdata.js +0 -3
  23. package/src/jscommon/umychart.NetworkFilterTest.js +0 -48803
  24. package/src/jscommon/umychart.aliYunnetwork.js +0 -47
  25. package/src/jscommon/umychart.cninfo.components/readme.txt +0 -1
  26. package/src/jscommon/umychart.complier.js +0 -25293
  27. package/src/jscommon/umychart.complier.node/umychart.complier.controller.js +0 -559
  28. package/src/jscommon/umychart.complier.node/umychart.complier.node.js +0 -7043
  29. package/src/jscommon/umychart.complier.node/umychart.data.node.js +0 -816
  30. package/src/jscommon/umychart.console.js +0 -12
  31. package/src/jscommon/umychart.deal.js +0 -1452
  32. package/src/jscommon/umychart.dragdiv.js +0 -48
  33. package/src/jscommon/umychart.index.data.js +0 -4132
  34. package/src/jscommon/umychart.js +0 -90542
  35. package/src/jscommon/umychart.keyboard.js +0 -1659
  36. package/src/jscommon/umychart.listctrl.js +0 -690
  37. package/src/jscommon/umychart.mind.js +0 -2203
  38. package/src/jscommon/umychart.network.js +0 -44
  39. package/src/jscommon/umychart.news.js +0 -823
  40. package/src/jscommon/umychart.node.build/buildall.bat +0 -1
  41. package/src/jscommon/umychart.node.build/umychart.node.bat +0 -1
  42. package/src/jscommon/umychart.node.build/umychart.node.export.js +0 -40
  43. package/src/jscommon/umychart.regressiontest.js +0 -400
  44. package/src/jscommon/umychart.report.js +0 -5803
  45. package/src/jscommon/umychart.scrollbar.js +0 -1345
  46. package/src/jscommon/umychart.stock.js +0 -4218
  47. package/src/jscommon/umychart.style.js +0 -625
  48. package/src/jscommon/umychart.testdata.js +0 -150
  49. package/src/jscommon/umychart.uniapp.build/buildall.bat +0 -1
  50. package/src/jscommon/umychart.uniapp.build/umychart.bat +0 -1
  51. package/src/jscommon/umychart.uniapp.build/umychart.export.js +0 -70
  52. package/src/jscommon/umychart.user.js +0 -137
  53. package/src/jscommon/umychart.version.js +0 -30
  54. package/src/jscommon/umychart.vue/umychart.aliYunnetwork.vue.js +0 -56
  55. package/src/jscommon/umychart.vue.build/buildall.bat +0 -4
  56. package/src/jscommon/umychart.vue.build/copy_codemirror.bat +0 -2
  57. package/src/jscommon/umychart.vue.build/umychart.aliYunnetwork.vue.export.js +0 -9
  58. package/src/jscommon/umychart.vue.build/umychart.dragdiv.bat +0 -1
  59. package/src/jscommon/umychart.vue.build/umychart.dragdiv.export.js +0 -6
  60. package/src/jscommon/umychart.vue.build/umychart.index.data.bat +0 -1
  61. package/src/jscommon/umychart.vue.build/umychart.index.data.export.js +0 -4
  62. package/src/jscommon/umychart.vue.build/umychart.listctrl.vue.export.js +0 -15
  63. package/src/jscommon/umychart.vue.build/umychart.regressiontest.vue.export.js +0 -7
  64. package/src/jscommon/umychart.vue.build/umychart.regressiontest.wechat.export.js +0 -12
  65. package/src/jscommon/umychart.vue.build/umychart.stock.bat +0 -1
  66. package/src/jscommon/umychart.vue.build/umychart.stock.vue.export.js +0 -16
  67. package/src/jscommon/umychart.vue.build/umychart.testdata.bat +0 -3
  68. package/src/jscommon/umychart.vue.build/umychart.testdata.vue.export.js +0 -7
  69. package/src/jscommon/umychart.vue.build/umychart.vue.bat +0 -8
  70. package/src/jscommon/umychart.vue.build/umychart.vue.export.js +0 -112
  71. package/src/jscommon/umychart.vue.components/empyt.vue +0 -51
  72. package/src/jscommon/umychart.vue.components/historydayline.vue +0 -240
  73. package/src/jscommon/umychart.vue.components/jsloader.adddialog.vue +0 -315
  74. package/src/jscommon/umychart.vue.components/jsloader.vue +0 -93
  75. package/src/jscommon/umychart.vue.components/jsvuecontainer.vue +0 -160
  76. package/src/jscommon/umychart.vue.components/jsvuecontainer2.0.vue +0 -391
  77. package/src/jscommon/umychart.vue.components/login.vue +0 -178
  78. package/src/jscommon/umychart.vue.components/queryContent.vue +0 -750
  79. package/src/jscommon/umychart.vue.components/readme.txt +0 -8
  80. package/src/jscommon/umychart.vue.components/searchsymbol.vue +0 -299
  81. package/src/jscommon/umychart.vue.components/simulatetrade.vue +0 -1471
  82. package/src/jscommon/umychart.vue.components/stockchart.vue +0 -343
  83. package/src/jscommon/umychart.vue.components/stockchartV2.vue +0 -195
  84. package/src/jscommon/umychart.vue.components/stockdeal.vue +0 -358
  85. package/src/jscommon/umychart.vue.components/stockdealcount.vue +0 -262
  86. package/src/jscommon/umychart.vue.components/stockdeallastest.vue +0 -316
  87. package/src/jscommon/umychart.vue.components/stockdrawtool.vue +0 -343
  88. package/src/jscommon/umychart.vue.components/stockfull.vue +0 -355
  89. package/src/jscommon/umychart.vue.components/stockinfo.demo.vue +0 -153
  90. package/src/jscommon/umychart.vue.components/stockinfo.vue +0 -685
  91. package/src/jscommon/umychart.vue.components/stockkline.demo.vue +0 -1904
  92. package/src/jscommon/umychart.vue.components/stockmultiorder.vue +0 -174
  93. package/src/jscommon/umychart.vue.components/stockmultiperiod.vue +0 -222
  94. package/src/jscommon/umychart.vue.components/stockorder.vue +0 -320
  95. package/src/jscommon/umychart.vue.components/stocktradeinfo.demo.vue +0 -250
  96. package/src/jscommon/umychart.vue.components/stocktradeinfo.vue +0 -1907
  97. package/src/jscommon/umychart.vue.components/test.vue +0 -0
  98. package/src/jscommon/umychart.wechat/getDate.wechat.js +0 -91
  99. package/src/jscommon/umychart.wechat/lighter.news.wechat.js +0 -262
  100. package/src/jscommon/umychart.wechat/readme.txt +0 -3
  101. package/src/jscommon/umychart.wechat/umychart.analyze.wechat.js +0 -551
  102. package/src/jscommon/umychart.wechat/umychart.apidraw.wechat.js +0 -126
  103. package/src/jscommon/umychart.wechat/umychart.bigV.wechat.js +0 -2510
  104. package/src/jscommon/umychart.wechat/umychart.chartframe.wechat.js +0 -2942
  105. package/src/jscommon/umychart.wechat/umychart.chartpaint.wechat.js +0 -9752
  106. package/src/jscommon/umychart.wechat/umychart.charttitle.wechat.js +0 -2023
  107. package/src/jscommon/umychart.wechat/umychart.complier.wechat.js +0 -14726
  108. package/src/jscommon/umychart.wechat/umychart.console.wechat.js +0 -8
  109. package/src/jscommon/umychart.wechat/umychart.coordinatedata.wechat.js +0 -3654
  110. package/src/jscommon/umychart.wechat/umychart.data.wechat.js +0 -2243
  111. package/src/jscommon/umychart.wechat/umychart.element.wechart.js +0 -132
  112. package/src/jscommon/umychart.wechat/umychart.explainer.wechat.js +0 -1077
  113. package/src/jscommon/umychart.wechat/umychart.extendchart.wechat.js +0 -1140
  114. package/src/jscommon/umychart.wechat/umychart.framesplit.wechat.js +0 -2247
  115. package/src/jscommon/umychart.wechat/umychart.hqIndexformula.wechat.js +0 -941
  116. package/src/jscommon/umychart.wechat/umychart.index.data.wechat.js +0 -3628
  117. package/src/jscommon/umychart.wechat/umychart.index.wechat.js +0 -4074
  118. package/src/jscommon/umychart.wechat/umychart.klineinfo.wechat.js +0 -836
  119. package/src/jscommon/umychart.wechat/umychart.markethot.js +0 -50
  120. package/src/jscommon/umychart.wechat/umychart.network.wechart.js +0 -62
  121. package/src/jscommon/umychart.wechat/umychart.news.wechat.js +0 -3568
  122. package/src/jscommon/umychart.wechat/umychart.regressiontest.wechat.js +0 -412
  123. package/src/jscommon/umychart.wechat/umychart.report.wechat.js +0 -3983
  124. package/src/jscommon/umychart.wechat/umychart.resource.wechat.js +0 -919
  125. package/src/jscommon/umychart.wechat/umychart.shareimage.wechat.js +0 -681
  126. package/src/jscommon/umychart.wechat/umychart.simulatetrade.wechat.js +0 -238
  127. package/src/jscommon/umychart.wechat/umychart.stock.wechat.js +0 -4035
  128. package/src/jscommon/umychart.wechat/umychart.style.wechat.js +0 -419
  129. package/src/jscommon/umychart.wechat/umychart.uniapp.canvas.helper.js +0 -99
  130. package/src/jscommon/umychart.wechat/umychart.user.wechat.js +0 -588
  131. package/src/jscommon/umychart.wechat/umychart.userlog.wechat.js +0 -240
  132. package/src/jscommon/umychart.wechat/umychart.vedio.wechat.js +0 -112
  133. package/src/jscommon/umychart.wechat/umychart.version.wechat.js +0 -36
  134. package/src/jscommon/umychart.wechat/umychart.wechat.3.0.js +0 -12055
  135. package/src/jscommon/umychart.wechat/umychart.wechat.js +0 -15460
  136. package/src/jscommon/umychart.worker.js +0 -114
  137. package/src/jscommon/umychart.ws.stock.js +0 -110
  138. package/src/jscommon/umychart_python/.vscode/launch.json +0 -15
  139. package/src/jscommon/umychart_python/__init__.py +0 -4
  140. package/src/jscommon/umychart_python/build.cmd +0 -2
  141. package/src/jscommon/umychart_python/setup.py +0 -25
  142. package/src/jscommon/umychart_python/umychart_cache_testcase.py +0 -165
  143. package/src/jscommon/umychart_python/umychart_complier_data.py +0 -781
  144. package/src/jscommon/umychart_python/umychart_complier_help.py +0 -175
  145. package/src/jscommon/umychart_python/umychart_complier_job.py +0 -193
  146. package/src/jscommon/umychart_python/umychart_complier_jsalgorithm.py +0 -4144
  147. package/src/jscommon/umychart_python/umychart_complier_jscomplier.py +0 -177
  148. package/src/jscommon/umychart_python/umychart_complier_jsexecute.py +0 -517
  149. package/src/jscommon/umychart_python/umychart_complier_jsparser.py +0 -864
  150. package/src/jscommon/umychart_python/umychart_complier_jssymboldata.py +0 -1238
  151. package/src/jscommon/umychart_python/umychart_complier_jssymboldata_cache.py +0 -146
  152. package/src/jscommon/umychart_python/umychart_complier_jssymboldata_json.py +0 -106
  153. package/src/jscommon/umychart_python/umychart_complier_pandas_help.py +0 -80
  154. package/src/jscommon/umychart_python/umychart_complier_scanner.py +0 -554
  155. package/src/jscommon/umychart_python/umychart_complier_testcase.py +0 -362
  156. package/src/jscommon/umychart_python/umychart_complier_util.py +0 -30
  157. package/src/jscommon/umychart_python/umychart_webtemplate.py +0 -131
  158. package/src/jscommon/umychart_python/updatehqchartweb.bat +0 -5
  159. package/src/jscommon/vendor.js +0 -2
  160. package/src/pages/block.list.demo.page/App.vue +0 -117
  161. package/src/pages/block.list.demo.page/index.js +0 -12
  162. package/src/pages/brushTool.demo.page/App.vue +0 -19
  163. package/src/pages/brushTool.demo.page/index.js +0 -12
  164. package/src/pages/container.demo.page/App.vue +0 -118
  165. package/src/pages/container.demo.page/index.js +0 -18
  166. package/src/pages/dataZoom.demo.page/App.vue +0 -265
  167. package/src/pages/dataZoom.demo.page/components/dataZoom.vue +0 -303
  168. package/src/pages/dataZoom.demo.page/index.js +0 -12
  169. package/src/pages/historydayline.demo.page/App.vue +0 -57
  170. package/src/pages/historydayline.demo.page/index.js +0 -12
  171. package/src/pages/hq.demo.page/App.vue +0 -163
  172. package/src/pages/hq.demo.page/index.js +0 -12
  173. package/src/pages/hqchart.black/App.vue +0 -90
  174. package/src/pages/hqchart.black/components/searchsymbol.vue +0 -299
  175. package/src/pages/hqchart.black/components/stockdrawtool.vue +0 -300
  176. package/src/pages/hqchart.black/components/stockfull.vue +0 -313
  177. package/src/pages/hqchart.black/components/stockinfo.vue +0 -428
  178. package/src/pages/hqchart.black/components/stockkline.demo.vue +0 -1652
  179. package/src/pages/hqchart.black/components/stocktradeinfo.vue +0 -1337
  180. package/src/pages/hqchart.black/index.js +0 -30
  181. package/src/pages/hqchart.black/router/candlestickChart.vue +0 -108
  182. package/src/pages/hqchart.black/router/pricePointsTable.vue +0 -294
  183. package/src/pages/hqchart.black/router/stockDeallas.vue +0 -417
  184. package/src/pages/hqchart.black/router/timeShareChart.vue +0 -108
  185. package/src/pages/hqchart.page/App.vue +0 -101
  186. package/src/pages/hqchart.page/index.js +0 -18
  187. package/src/pages/index/App.vue +0 -1408
  188. package/src/pages/index/index.js +0 -7
  189. package/src/pages/indexHq/App.vue +0 -110
  190. package/src/pages/indexHq/index.js +0 -18
  191. package/src/pages/login.demo.page/App.vue +0 -22
  192. package/src/pages/login.demo.page/index.js +0 -12
  193. package/src/pages/queryContent.demo.page/App.vue +0 -29
  194. package/src/pages/queryContent.demo.page/index.js +0 -18
  195. package/src/pages/ranking.black/App.vue +0 -199
  196. package/src/pages/ranking.black/index.js +0 -18
  197. package/src/pages/search.demo.page/App.vue +0 -28
  198. package/src/pages/search.demo.page/index.js +0 -12
  199. package/src/pages/simulatetrade.demo.page/app.vue +0 -121
  200. package/src/pages/simulatetrade.demo.page/index.js +0 -17
  201. package/src/pages/stockdeal.demo.page/App.vue +0 -63
  202. package/src/pages/stockdeal.demo.page/index.js +0 -19
  203. package/src/pages/stockdealcount.demo.page/App.vue +0 -37
  204. package/src/pages/stockdealcount.demo.page/index.js +0 -12
  205. package/src/pages/stockdeallastest.demo.page/App.vue +0 -74
  206. package/src/pages/stockdeallastest.demo.page/index.js +0 -18
  207. package/src/pages/stockinfo.demo.page/App.vue +0 -92
  208. package/src/pages/stockinfo.demo.page/index.html +0 -13
  209. package/src/pages/stockinfo.demo.page/index.js +0 -19
  210. package/src/pages/stockkline.demo.page/App.vue +0 -55
  211. package/src/pages/stockkline.demo.page/index.js +0 -18
  212. package/src/pages/stockmultiorder.demo.page/App.vue +0 -149
  213. package/src/pages/stockmultiorder.demo.page/index.js +0 -18
  214. package/src/pages/stockmultiperiod.demo.page/App.vue +0 -87
  215. package/src/pages/stockmultiperiod.demo.page/index.js +0 -18
  216. package/src/pages/stockorder.demo.page/App.vue +0 -69
  217. package/src/pages/stockorder.demo.page/index.js +0 -18
  218. package/src/pages/test/App.vue +0 -22
  219. package/src/pages/test/index.js +0 -7
  220. package/src/pages/tradeinfopage/app.vue +0 -40
  221. package/src/pages/tradeinfopage/index.js +0 -7
  222. package/src/pages/tradeinfopage/tradeinfo.html +0 -12
  223. package/src/utils/urlObj.js +0 -81
  224. package/src/vendor.js +0 -2
  225. package/webpack.config.js +0 -104
@@ -1,118 +0,0 @@
1
- <template>
2
- <div id="app2" >
3
- <button @click='ClickAddKLine'>添加K线</button>
4
- <button @click='ClickOrder'>添加沪深A5分钟涨速排名</button>
5
- <button @click='ClickDelControl'>删除</button>
6
- <button @click='ClickChangeControl'>切换</button>
7
- <div ref='divcontainer' style="width:80%;">
8
- <JSVueContainer ref='jsvuecontainer'/>
9
- </div>
10
- </div>
11
- </template>
12
-
13
- <script>
14
- import JSVueContainer from '../../jscommon/umychart.vue.components/jsvuecontainer2.0.vue'
15
-
16
- export default
17
- {
18
-
19
- data ()
20
- {
21
- return {
22
- Test:''
23
- }
24
- },
25
-
26
- components: { JSVueContainer },
27
-
28
- created:function()
29
- {
30
-
31
- },
32
-
33
- mounted:function()
34
- {
35
- var self=this;
36
- window.onresize = function () { self.OnSize(); }
37
-
38
- //mounted执行完成一个调用
39
- this.$nextTick(function () { this.OnSize(); })
40
- },
41
-
42
-
43
- methods:
44
- {
45
- OnChangeSymbol:function(symbol)
46
- {
47
-
48
- },
49
-
50
- OnSize()
51
- {
52
- this.$refs.jsvuecontainer.OnSize();
53
- },
54
-
55
- ClickAddKLine()
56
- {
57
- console.log('ClickAddKLine');
58
- var jsVueContainer=this.$refs.jsvuecontainer;
59
- var symbol=jsVueContainer.Symbol;
60
- var minSize=jsVueContainer.MinSize;
61
- var ID=jsVueContainer.CreateID();
62
- var self=this;
63
- jsVueContainer.Control.push( { ClassName:'StockChart', ID:ID,Symbol:symbol,
64
- Option:
65
- {
66
- Type: '历史K线图',
67
- IsShowCorssCursorInfo:false,
68
- KLine:
69
- {
70
- Right:1, //复权 0 不复权 1 前复权 2 后复权
71
- Period:1, //周期 0 日线 1 周线 2 月线 3 年线
72
- }
73
- },
74
- Size:{ Width:minSize.Width, Height:minSize.Height },
75
- CreateComplete:function(jsLoader) { jsVueContainer.OnControlCreateCompete(jsLoader); }
76
- });
77
- },
78
-
79
- ClickOrder()
80
- {
81
- console.log('ClickOrder');
82
- var jsVueContainer=this.$refs.jsvuecontainer;
83
- var minSize=jsVueContainer.MinSize;
84
- var ID=jsVueContainer.CreateID();
85
- jsVueContainer.Control.push( { ClassName:'StockOrder', ID:ID,Symbol:"CNA.ci", Option: { OrderFiled:39, Order:-1 } ,
86
- Size:{ Width:minSize.Width, Height:minSize.Height },
87
- CreateComplete:function(jsLoader) { jsVueContainer.OnControlCreateCompete(jsLoader); }
88
- });
89
- },
90
-
91
- ClickDelControl()
92
- {
93
- console.log('ClickDelControl');
94
- this.$refs.jsvuecontainer.Control.splice(1,1);
95
- },
96
-
97
- ClickChangeControl()
98
- {
99
- console.log('ClickChangeControl');
100
-
101
- var jsVueContainer=this.$refs.jsvuecontainer;
102
- var symbol=jsVueContainer.Symbol;
103
- var minSize=jsVueContainer.MinSize;
104
- var ID=jsVueContainer.CreateID();
105
- //jsVueContainer.Control.splice(1,1);
106
- jsVueContainer.Control.splice(1,1,{ClassName:'StockChart',ID:ID, Symbol:'600000.sh',Size:{ Width:minSize.Width, Height:minSize.Height }});
107
- //this.$set(jsVueContainer.Control, 1, {ClassName:'StockChart',Symbol:'600000.sh',Size:{ Width:minSize.Width, Height:minSize.Height }});
108
- }
109
-
110
- }
111
- }
112
-
113
- </script>
114
-
115
- <style>
116
-
117
-
118
- </style>
@@ -1,18 +0,0 @@
1
- import Promise from 'promise-polyfill'
2
- import Vue from 'vue'
3
- import ElementUI from 'element-ui'
4
- import 'element-ui/lib/theme-default/index.css';
5
- import locale from 'element-ui/lib/locale/lang/en'
6
- import App from './App.vue'
7
-
8
- if (!window.Promise) {
9
- window.Promise = Promise;
10
- }
11
-
12
-
13
- Vue.use(ElementUI,{ locale })
14
-
15
- new Vue({
16
- el: '#app',
17
- render: h => h(App)
18
- })
@@ -1,265 +0,0 @@
1
- <template>
2
- <div class="demoWrap" ref='demoWrap'>
3
- <div id="kline" ref='kline'></div>
4
- <DataZoom ref='dataZoom'
5
- :lineAndNameAry='lineAndNameAry'
6
- :startPosition='startPosition'
7
- :endPosition='endPosition'
8
- @move='moveChart'
9
- ></DataZoom>
10
- </div>
11
- </template>
12
-
13
- <script>
14
- import DataZoom from './components/dataZoom.vue'
15
- import JSCommon from '../../jscommon/umychart.vue/umychart.vue.js'
16
- function DefaultData() {}
17
- DefaultData.GetKlineOption = function(symbol){
18
- let data = {
19
- Type: '历史K线图',
20
- Windows: [
21
- { Index: "均线",Modify:false,Change:false},
22
- { Index: "VOL",Modify:false,Change:false },
23
- ], //窗口指标
24
- Symbol: symbol,
25
- IsAutoUpate: true, //是自动更新数据
26
-
27
- IsShowRightMenu: false, //右键菜单
28
-
29
- KLine: {
30
- DragMode: 1, //拖拽模式 0 禁止拖拽 1 数据拖拽 2 区间选择
31
- Right: 1, //复权 0 不复权 1 前复权 2 后复权
32
- Period: 0, //周期 0 日线 1 周线 2 月线 3 年线
33
- MaxReqeustDataCount: 3000, //日线数据最近1000天
34
- MaxRequestMinuteDayCount: 15, //分钟数据最近15天
35
- PageSize: 50, //一屏显示多少数据
36
- IsShowTooltip: false //是否显示K线提示信息
37
- },
38
-
39
- KLineTitle: //标题设置
40
- {
41
- IsShowName: false, //不显示股票名称
42
- IsShowSettingInfo: false //不显示周期/复权
43
- },
44
-
45
- Border: //边框
46
- {
47
- Left: 0, //左边间距
48
- Right: 1, //右边间距
49
- Top: 20
50
- },
51
-
52
- Frame: //子框架设置
53
- [
54
- { SplitCount: 3, StringFormat: 0 },
55
- { SplitCount: 3, StringFormat: 0 },
56
- { SplitCount: 3, StringFormat: 0 },
57
- { SplitCount: 3, StringFormat: 0 }
58
- ]
59
- };
60
- return data;
61
- }
62
-
63
- export default {
64
- data () {
65
- return {
66
- Kline:{
67
- JSChart:null,
68
- // IsShow:false,
69
- Option:null
70
- },
71
- Symbol: '600000.sh',
72
- lineAndNameAry: [],
73
- PageSize: 50, //初始一屏展示的数据
74
- startPosition: 0.5,
75
- endPosition: 1,
76
- lineCount: 0
77
- }
78
- },
79
- created () {
80
- this.Kline.Option = DefaultData.GetKlineOption(this.Symbol);
81
- },
82
- mounted () {
83
- this.OnSize();
84
- window.onresize = () => {
85
- this.OnSize();
86
- };
87
-
88
- this.createKlineChart(0);
89
- },
90
- components: {
91
- DataZoom
92
- },
93
- watch: {
94
- startPosition: function(){
95
- this.OnSize();
96
- }
97
- },
98
- methods: {
99
- OnSize(){
100
- var width = this.$refs.demoWrap.clientWidth;
101
- var height = this.$refs.demoWrap.clientHeight;
102
-
103
- var chartHeight = height - this.$refs.dataZoom.getHeight();
104
- console.log(height+', ',chartHeight);
105
- this.$refs.kline.style.width = width + 'px';
106
- this.$refs.kline.style.height = chartHeight + 'px';
107
-
108
- this.$refs.dataZoom.OnSize(width,this.startPosition,this.endPosition);
109
-
110
- },
111
- IncreasLeftShowCount (bIncrease,step) //左边增加或减少
112
- {
113
- // var step=document.getElementById("left_zoom_step").value;
114
-
115
- if (bIncrease==true)
116
- {
117
- var obj={ID:8, Step:parseInt(step) };
118
- this.Kline.JSChart.JSChartContainer.ChartOperator(obj);
119
- }
120
- else
121
- {
122
- var obj={ID:7, Step:parseInt(step)};
123
- this.Kline.JSChart.JSChartContainer.ChartOperator(obj);
124
- }
125
-
126
- },
127
-
128
- IncreasRightShowCount (bIncrease,step) //右边边增加或减少
129
- {
130
- // var step=document.getElementById("right_zoom_step").value;
131
-
132
- if (bIncrease==true) //放大
133
- {
134
- var obj={ID:10, Step:parseInt(step) };
135
- this.Kline.JSChart.JSChartContainer.ChartOperator(obj);
136
- }
137
- else //缩小
138
- {
139
- var obj={ID:9, Step:parseInt(step)};
140
- this.Kline.JSChart.JSChartContainer.ChartOperator(obj);
141
- }
142
-
143
- },
144
- moveChart(moveInfo){
145
- let {movePercent, direction, isCountChange} = moveInfo;
146
- console.log('moveChart::',movePercent,direction, isCountChange);
147
- let step = this.lineCount * movePercent;
148
- switch(isCountChange){
149
- case 'no':
150
- console.log('整体移动,step:',step);
151
- if(direction == 'toleft') { //鼠标向左,图形向右
152
- this.MoveRight(step);
153
- }else{
154
- this.MoveLeft(step);
155
- }
156
- break;
157
- case 'increase':
158
- console.log('整体增加,step:',step);
159
- if(direction == 'toleft'){
160
- this.IncreasLeftShowCount(true,step);
161
- }else{
162
- this.IncreasRightShowCount(true,step);
163
- }
164
- break;
165
- case 'reduce':
166
- console.log('整体减少,step:',step);
167
- if(direction == 'toleft'){
168
- this.IncreasRightShowCount(false,step);
169
- }else{
170
- this.IncreasLeftShowCount(false,step);
171
- }
172
- break;
173
- }
174
- },
175
- //接受到历史数据
176
- OnRecvHistoryData (event,data,obj)
177
- {
178
- console.log("[KLineChart::OnRecvHistoryData] data=", data);
179
- var hisData=data.HistoryData;
180
- var count=hisData.Data.length;
181
- this.lineCount = count;
182
- // let yearAry = [];
183
- hisData.Data.forEach(item => {
184
- let year = item.Date.toString().substring(0,4);
185
- // debugger;
186
- if(this.lineAndNameAry.find(lineName => lineName.name == year) != undefined){
187
- this.lineAndNameAry.find(lineName => lineName.name == year).dataCount++;
188
- }else{
189
- this.lineAndNameAry.push(
190
- {
191
- dataCount: 0,
192
- width: '',
193
- name: year
194
- }
195
- );
196
- }
197
- });
198
- // console.log('年分割:',this.lineAndNameAry);
199
- this.startPosition = Number(this.PageSize / count).toFixed(2);
200
- // debugger;
201
- // console.log('年分割:',this.startPosition);
202
- // document.getElementById("kline_count").innerText=`K线个数${count}`;
203
- },
204
-
205
- OnDrawFinish (event,data,obj)
206
- {
207
- var showCount=this.Kline.JSChart.JSChartContainer.Frame.SubFrame[0].Frame.XPointCount; //获取一屏显示的数据个数
208
- var count=this.Kline.JSChart.JSChartContainer.ChartPaint[0].Data.Data.length;
209
- var offset=this.Kline.JSChart.JSChartContainer.ChartPaint[0].Data.DataOffset;
210
-
211
- // document.getElementById("kline_showcount").innerText=`当前屏数据个数${showCount}`;
212
- // document.getElementById("kline_count").innerText=`K线个数${count}`;
213
- // document.getElementById("kline_offset").innerText=`起始数据索引${offset}`;
214
-
215
- },
216
- MoveLeft (step)
217
- {
218
- // var step=document.getElementById("left_step").value;
219
-
220
- var obj = { ID: 1, Step:parseInt(step) };
221
- this.Kline.JSChart.JSChartContainer.ChartOperator(obj);
222
- },
223
- MoveRight (step)
224
- {
225
- // var step=document.getElementById("right_step").value;
226
-
227
- var obj = { ID: 2, Step:parseInt(step) };
228
- this.Kline.JSChart.JSChartContainer.ChartOperator(obj);
229
- },
230
- createKlineChart (value) {
231
- this.Kline.JSChart = JSCommon.JSChart.Init(document.getElementById('kline'));
232
- this.Kline.Option.KLine.PageSize = this.PageSize;
233
- this.Kline.Option.KLine.Period = value;
234
- this.Kline.JSChart.SetOption(this.Kline.Option);
235
-
236
- //选中图形事件
237
- this.Kline.JSChart.AddEventCallback( {
238
- event:JSCommon.JSCHART_EVENT_ID.RECV_HISTROY_DATA,
239
- callback:(event,data,obj)=>{ this.OnRecvHistoryData(event,data,obj); }
240
- });
241
-
242
-
243
- this.Kline.JSChart.AddEventCallback({
244
- event:JSCommon.JSCHART_EVENT_ID.CHART_STATUS,
245
- callback:(event,data,obj)=>{ this.OnDrawFinish(event,data,obj); }
246
- });
247
- }
248
- }
249
- }
250
-
251
- </script>
252
-
253
- <style lang="less">
254
- html,body{
255
- width: 100%;
256
- height: 100%;
257
- }
258
- .demoWrap{
259
- width: 900px;
260
- height: 700px;
261
- position: relative;
262
- margin: 0 auto;
263
- margin-top: 50px;
264
- }
265
- </style>
@@ -1,303 +0,0 @@
1
- <template>
2
- <div class="miniMap">
3
- <div class="splitLines">
4
- <div class="lineAndName" v-for="(lineName, index) in lineAndNameAry" :key='index' :style="{width: lineName.width}">
5
- <div class="line" v-if='index != 0'></div>
6
- <div class="name" v-if='index != 0'>{{lineName.name}}</div>
7
- </div>
8
- </div>
9
- <div class="slideBar" :style="{left:slideBarStyle.left+'px',right:slideBarStyle.right+'px'}" @mousedown='commonMouseDown'>
10
- <div class="sbLeft" @mousedown.stop='commonMouseDown'></div>
11
- <div class="sbRight" @mousedown.stop='commonMouseDown'></div>
12
- </div>
13
- <!-- <div class="slideBarWrap">
14
-
15
- </div> -->
16
-
17
- </div>
18
- </template>
19
-
20
- <script>
21
- export default {
22
- props: ['lineAndNameAry'],
23
- data () {
24
- return {
25
- // miniMapStyle: {
26
- // height: "49.73px",
27
- // left: "59px",
28
- // right: "65px",
29
- // bottom: "20px"
30
- // },
31
- isSlideBarMove: false,
32
- isLeftMove: false,
33
- isRightMove: false,
34
- slideBarStyle: {
35
- left: 0,
36
- right: 0,
37
- MaxWidth: 0,
38
- width: 0
39
- },
40
- PointPosition: {
41
- x: 0,
42
- y: 0
43
- },
44
- beforeMoveX: 0, //滑动前的位置-左
45
- beforeMoveXRight: 0 //滑动前的位置-右
46
- // lineAndNameAry: [
47
- // ]
48
- }
49
- },
50
- created () {
51
- let totalWidth = 0;
52
- this.lineAndNameAry.forEach(item => {
53
- totalWidth += item.dataCount;
54
- });
55
- this.lineAndNameAry.forEach(item => {
56
- item.width = parseInt(item.dataCount / totalWidth * 100) + '%';
57
- });
58
-
59
- const _this = this;
60
- document.onmouseup = function(e) {
61
- _this.commonMouseUp(e);
62
- }
63
- },
64
- mounted () {
65
-
66
- },
67
- methods: {
68
- OnSize (boxWidth,startPosition,endPosition) {
69
- this.slideBarStyle.MaxWidth = boxWidth;
70
- this.slideBarStyle.left = parseInt(boxWidth * (1- startPosition));
71
- this.slideBarStyle.right = parseInt(boxWidth * (1 - endPosition));
72
- this.slideBarStyle.width = boxWidth - this.slideBarStyle.left - this.slideBarStyle.right;
73
- // console.log('OnSize::left,right,width:',this.slideBarStyle);
74
- this.beforeMoveX = this.slideBarStyle.left;
75
- this.beforeMoveXRight = this.slideBarStyle.right;
76
- },
77
- getHeight(){
78
- return 50;
79
- },
80
- changeSlideBarPosition () {
81
-
82
- },
83
- slideBarMouseMove (e) {
84
- if(this.isSlideBarMove) {
85
- let offsetWidth = e.clientX - this.PointPosition.x; //左移为负值
86
- this.PointPosition.x = e.clientX;
87
- // console.log('偏移:',offsetWidth);
88
- const oldLeft = this.slideBarStyle.left;
89
- const oldRight = this.slideBarStyle.right;
90
- this.slideBarStyle.left += offsetWidth;
91
- this.slideBarStyle.right -= offsetWidth;
92
- // let realOffset = -offsetWidth;
93
- if(this.slideBarStyle.left < 0) {
94
- this.slideBarStyle.left = 0;
95
- this.slideBarStyle.right = this.slideBarStyle.MaxWidth - this.slideBarStyle.width;
96
- // realOffset = oldLeft;
97
- }
98
- if(this.slideBarStyle.right < 0) {
99
- this.slideBarStyle.right = 0;
100
- this.slideBarStyle.left = this.slideBarStyle.MaxWidth - this.slideBarStyle.width;
101
- realOffset = oldRight;
102
- }
103
- }
104
- },
105
- sbLeftMouseMove (e) {
106
- if(this.isLeftMove) {
107
- let offsetWidth = e.clientX - this.PointPosition.x;
108
- this.PointPosition.x = e.clientX;
109
- // console.log('偏移:',offsetWidth);
110
- this.slideBarStyle.left += offsetWidth;
111
- if(this.slideBarStyle.left < 0) {
112
- this.slideBarStyle.left = 0;
113
- }else if(this.slideBarStyle.left + 10 > this.slideBarStyle.MaxWidth - this.slideBarStyle.right) { //sbLeft 与 sbRight紧挨着的位置,left与right最小间隔是10px
114
- this.slideBarStyle.left = this.slideBarStyle.MaxWidth - this.slideBarStyle.right - 10
115
- }
116
- // console.log('偏移:', this.slideBarStyle.left, this.slideBarStyle.right);
117
- }
118
- },
119
- sbRightMouseMove (e) {
120
- if(this.isRightMove){
121
- let offsetWidth = e.clientX - this.PointPosition.x;
122
- this.PointPosition.x = e.clientX;
123
- // console.log('偏移:',offsetWidth);
124
- this.slideBarStyle.right -= offsetWidth;
125
- if(this.slideBarStyle.right < 0) {
126
- this.slideBarStyle.right = 0;
127
- }else if(this.slideBarStyle.right + 10 > this.slideBarStyle.MaxWidth - this.slideBarStyle.left){
128
- this.slideBarStyle.right = this.slideBarStyle.MaxWidth - this.slideBarStyle.left - 10;
129
- }
130
- console.log('偏移:', this.slideBarStyle.left, this.slideBarStyle.right);
131
- }
132
- },
133
- commonMouseDown (e) {
134
- if(e.target.className == "slideBar") { //点击透明色互动块,保存初始宽度
135
- this.slideBarStyle.width = this.slideBarStyle.MaxWidth - this.slideBarStyle.left - this.slideBarStyle.right;
136
- this.isSlideBarMove = true;
137
- }else if(e.target.className == "sbLeft"){
138
- this.isLeftMove = true;
139
- }else if(e.target.className == "sbRight"){
140
- this.isRightMove = true;
141
- }
142
-
143
- this.PointPosition.x = e.clientX;
144
- // this.PointPosition.y = e.clientY;
145
- // console.log('down::',e,e.target, e.clientX, e.clientY);
146
-
147
- document.onmousemove= (ev) => { //写在mousedown,保证快速拖动时扔能有效
148
- if(e.target.className == "slideBar"){
149
- this.slideBarMouseMove(ev);
150
- }else if(e.target.className == "sbLeft"){
151
- this.sbLeftMouseMove(ev);
152
- }else if(e.target.className == "sbRight"){
153
- this.sbRightMouseMove(ev);
154
- }
155
- };
156
-
157
- },
158
- commonMouseUp (e) {
159
- // console.log('哪个移动,',this.isSlideBarMove,);
160
- let realOffset = 0;
161
- let movePercent = 0;
162
- let direction = '';
163
- let isCountChange = 'no';
164
- if(this.isSlideBarMove){
165
- console.log('块 滑动');
166
- realOffset = this.slideBarStyle.left - this.beforeMoveX;
167
- if(realOffset < 0){
168
- realOffset = -realOffset;
169
- direction = 'toleft';
170
- }else{
171
- direction = 'toright';
172
- }
173
-
174
- }else if(this.isLeftMove){
175
- console.log('左 滑动');
176
- realOffset = this.slideBarStyle.left - this.beforeMoveX;
177
- if(realOffset < 0){
178
- realOffset = -realOffset;
179
- direction = 'toleft';
180
- isCountChange = 'increase';
181
- }else{
182
- direction = 'toright';
183
- isCountChange = 'reduce';
184
- }
185
-
186
- }else if(this.isRightMove){
187
- console.log('右 滑动');
188
- realOffset = this.slideBarStyle.right - this.beforeMoveXRight;
189
- if(realOffset < 0) {
190
- realOffset = -realOffset;
191
- direction = 'toright';
192
- isCountChange = 'increase';
193
- }else{
194
- direction = 'toleft';
195
- isCountChange = 'reduce';
196
- }
197
- }
198
- movePercent = (realOffset / this.slideBarStyle.MaxWidth).toFixed(2);
199
- this.isSlideBarMove = false;
200
- this.isLeftMove = false;
201
- this.isRightMove = false;
202
- this.beforeMoveX = this.slideBarStyle.left; //保存滑动前位置
203
- this.beforeMoveXRight = this.slideBarStyle.right; //保存滑动前位置
204
-
205
- let moveInfo = {
206
- movePercent,
207
- direction,
208
- isCountChange
209
- };
210
- console.log('moveInfo::', realOffset, moveInfo);
211
- this.$emit('move', moveInfo);
212
- // console.log('isSlideBarMove::', this.isSlideBarMove);
213
-
214
- }
215
- }
216
- }
217
- </script>
218
-
219
- <style lang="less">
220
- html,body{ /*鼠标移动时禁止选中文字*/
221
- -moz-user-select: none;
222
- -khtml-user-select: none;
223
- user-select: none;
224
- }
225
- .miniMap{
226
- position: absolute;
227
- bottom: 0;
228
- z-index: 30;
229
- overflow: visible;
230
- /* clear: both; */
231
- border: 1px solid #ccc;
232
- font: 14px 'Microsoft Yahei';
233
- height: 50px;
234
- width: 100%;
235
- left: 0;
236
- bottom: 0;
237
- box-sizing: border-box;
238
-
239
- .splitLines{
240
- height: 100%;
241
- display: flex;
242
-
243
- .lineAndName{
244
- width: 20%;
245
- height: 100%;
246
- position: relative;
247
- }
248
-
249
- .line {
250
- position: absolute;
251
- top: 25px;
252
- bottom: 0;
253
- width: 1px;
254
- background-color: #333;
255
- }
256
-
257
- .name {
258
- position: absolute;
259
- top: 25px;
260
- left: 5px;
261
- font-size: 12px;
262
- color: #333;
263
- }
264
- }
265
-
266
- .slideBarWrap{
267
- position: absolute;
268
- width: 100%;
269
- height: 100%;
270
- top: 0;
271
- left: 0;
272
- background-color: transparent;
273
- }
274
-
275
- .slideBar{
276
- position: absolute;
277
- height: 100%;
278
- left: 0;
279
- right: 0;
280
- top: 0;
281
- background-color: rgba(0, 0, 0, 0.1);
282
- cursor: move;
283
- transition: all .5 ease;
284
-
285
- .sbLeft,
286
- .sbRight {
287
- position: absolute;
288
- cursor: w-resize;
289
- width: 10px;
290
- height: 50%;
291
- top: 25%;
292
- background-color: #999999;
293
- }
294
-
295
- .sbLeft {
296
- left: -5px;
297
- }
298
- .sbRight{
299
- right: -5px;
300
- }
301
- }
302
- }
303
- </style>