openatc-components 0.0.1 → 0.0.2

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 (154) hide show
  1. package/.babelrc +18 -18
  2. package/.editorconfig +9 -9
  3. package/.eslintignore +5 -5
  4. package/.eslintrc.js +29 -29
  5. package/.postcssrc.js +10 -10
  6. package/README.md +30 -30
  7. package/build/build.js +41 -41
  8. package/build/check-versions.js +54 -54
  9. package/build/package.config.js +58 -58
  10. package/build/package.dev.config.js +25 -25
  11. package/build/package.prod.config.js +60 -60
  12. package/build/utils.js +101 -101
  13. package/build/vue-loader.conf.js +22 -22
  14. package/build/webpack.base.conf.js +109 -109
  15. package/build/webpack.dev.conf.js +95 -95
  16. package/build/webpack.prod.conf.js +149 -149
  17. package/config/dev.env.js +7 -7
  18. package/config/index.js +76 -76
  19. package/config/prod.env.js +4 -4
  20. package/config/test.env.js +7 -7
  21. package/index.html +12 -12
  22. package/package/kisscomps/components/CircleMenu/KissCircleMenu.vue +398 -398
  23. package/package/kisscomps/components/CircleMenu/index.js +2 -2
  24. package/package/kisscomps/components/DashBoard/MakeGradientColor.js +84 -84
  25. package/package/kisscomps/components/DashBoard/dashboard.js +471 -471
  26. package/package/kisscomps/components/DashBoard/dashboard.vue +57 -57
  27. package/package/kisscomps/components/DashBoard/index.js +2 -2
  28. package/package/kisscomps/components/Horizontal/KissHorizontal.vue +146 -146
  29. package/package/kisscomps/components/Horizontal/index.js +2 -2
  30. package/package/kisscomps/components/HorizontalChildren/KissHorizontalChildren.vue +196 -196
  31. package/package/kisscomps/components/HorizontalChildren/index.js +2 -2
  32. package/package/kisscomps/components/KissCircleMenu/CircleMenu.vue +113 -113
  33. package/package/kisscomps/components/KissCircleMenu/index.js +2 -2
  34. package/package/kisscomps/components/KissCircleMenu/style/index.less +1 -1
  35. package/package/kisscomps/components/KissCircleMenu/style/main/core.less +161 -161
  36. package/package/kisscomps/components/KissCircleMenu/style/main/other.less +94 -94
  37. package/package/kisscomps/components/KissCircleMenu/style/mixin/mixin.less +36 -36
  38. package/package/kisscomps/components/KissCircleMenu/style/var/var.less +21 -21
  39. package/package/kisscomps/components/KissCircleMenu/utils/colorRE.js +5 -5
  40. package/package/kisscomps/components/KissMessageBox/KissMessageBox.vue +108 -108
  41. package/package/kisscomps/components/KissMessageBox/index.js +2 -2
  42. package/package/kisscomps/components/KissSearchInput/index.js +2 -2
  43. package/package/kisscomps/components/KissSearchInput/kisssearchinput.vue +77 -77
  44. package/package/kisscomps/components/KissSimulationProgress/KissSimulationProgress.vue +294 -294
  45. package/package/kisscomps/components/KissSimulationProgress/index.js +2 -2
  46. package/package/kisscomps/components/StatusBar/StatusBar.vue +222 -222
  47. package/package/kisscomps/components/StatusBar/index.js +2 -2
  48. package/package/kisscomps/components/TragResize/index.js +2 -2
  49. package/package/kisscomps/components/TragResize/kissdragresize.vue +536 -536
  50. package/package/kisscomps/components/TragResize/util/dom.js +23 -23
  51. package/package/kisscomps/components/TragResize/util/fns.js +3 -3
  52. package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.1.vue +320 -320
  53. package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +345 -345
  54. package/package/kisscomps/components/XRDDirSelector/index.js +2 -2
  55. package/package/kisscomps/components/button/index.js +2 -2
  56. package/package/kisscomps/components/button/kissbutton.vue +168 -168
  57. package/package/kisscomps/components/compass3D/compass.vue +180 -180
  58. package/package/kisscomps/components/compass3D/index.js +2 -2
  59. package/package/kisscomps/components/header/index.js +2 -2
  60. package/package/kisscomps/components/header/kissHead.vue +83 -83
  61. package/package/kisscomps/components/horizontalMenu/index.js +2 -2
  62. package/package/kisscomps/components/horizontalMenu/kissHorizontalMenu.vue +254 -254
  63. package/package/kisscomps/components/input/index.js +2 -2
  64. package/package/kisscomps/components/input/kissinput.vue +57 -57
  65. package/package/kisscomps/components/menu/index.js +2 -2
  66. package/package/kisscomps/components/menu/kissmenu.vue +324 -324
  67. package/package/kisscomps/components/mutipletips/Tdrag.js +585 -585
  68. package/package/kisscomps/components/mutipletips/index.js +2 -2
  69. package/package/kisscomps/components/mutipletips/kissmutipletips.vue +192 -192
  70. package/package/kisscomps/components/panel/index.js +2 -2
  71. package/package/kisscomps/components/panel/kissPanel.vue +151 -151
  72. package/package/kisscomps/components/select/chosen.jquery.min.js +3 -3
  73. package/package/kisscomps/components/select/index.js +2 -2
  74. package/package/kisscomps/components/select/kissselect.vue +527 -527
  75. package/package/kisscomps/components/tablebutton/index.js +2 -2
  76. package/package/kisscomps/components/tablebutton/tablebutton.vue +97 -97
  77. package/package/kisscomps/components/timectrl/KissTimeCtrl.vue +67 -67
  78. package/package/kisscomps/components/timectrl/index.js +2 -2
  79. package/package/kisscomps/components/timectrl/timectrl.css +851 -851
  80. package/package/kisscomps/components/tip/Tdrag.js +585 -585
  81. package/package/kisscomps/components/tip/index.js +2 -2
  82. package/package/kisscomps/components/tip/kisstips.1.vue +154 -154
  83. package/package/kisscomps/components/tip/kisstips.vue +154 -154
  84. package/package/kisscomps/components/tip/kisstips.vue.bak +211 -211
  85. package/package/kisscomps/index.js +71 -71
  86. package/package/kissui.js +203 -203
  87. package/package/kissui.min.js +203 -203
  88. package/package.json +1 -1
  89. package/src/App.vue +25 -25
  90. package/src/kisscomps/components/CircleMenu/KissCircleMenu.vue +398 -398
  91. package/src/kisscomps/components/CircleMenu/index.js +2 -2
  92. package/src/kisscomps/components/DashBoard/MakeGradientColor.js +84 -84
  93. package/src/kisscomps/components/DashBoard/dashboard.js +471 -471
  94. package/src/kisscomps/components/DashBoard/dashboard.vue +57 -57
  95. package/src/kisscomps/components/DashBoard/index.js +2 -2
  96. package/src/kisscomps/components/KissCircleMenu/CircleMenu.vue +113 -113
  97. package/src/kisscomps/components/KissCircleMenu/index.js +2 -2
  98. package/src/kisscomps/components/KissCircleMenu/style/index.less +1 -1
  99. package/src/kisscomps/components/KissCircleMenu/style/main/core.less +161 -161
  100. package/src/kisscomps/components/KissCircleMenu/style/main/other.less +94 -94
  101. package/src/kisscomps/components/KissCircleMenu/style/mixin/mixin.less +36 -36
  102. package/src/kisscomps/components/KissCircleMenu/style/var/var.less +21 -21
  103. package/src/kisscomps/components/KissCircleMenu/utils/colorRE.js +5 -5
  104. package/src/kisscomps/components/KissSearchInput/index.js +2 -2
  105. package/src/kisscomps/components/KissSearchInput/kisssearchinput.vue +77 -77
  106. package/src/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +193 -0
  107. package/src/kisscomps/components/SchemeConfig/index.js +2 -0
  108. package/src/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +214 -0
  109. package/src/kisscomps/components/SchemeConfig/manualControlModal/index.vue +176 -0
  110. package/src/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +294 -0
  111. package/src/kisscomps/components/SchemeConfig/schemeconfig.vue +711 -0
  112. package/src/kisscomps/components/StatusBar/StatusBar.vue +222 -222
  113. package/src/kisscomps/components/StatusBar/index.js +2 -2
  114. package/src/kisscomps/components/TragResize/index.js +2 -2
  115. package/src/kisscomps/components/TragResize/kissdragresize.vue +536 -536
  116. package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.1.vue +320 -320
  117. package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +345 -345
  118. package/src/kisscomps/components/XRDDirSelector/index.js +2 -2
  119. package/src/kisscomps/components/button/index.js +2 -2
  120. package/src/kisscomps/components/button/kissbutton.vue +168 -168
  121. package/src/kisscomps/components/compass3D/compass.vue +180 -180
  122. package/src/kisscomps/components/compass3D/index.js +2 -2
  123. package/src/kisscomps/components/horizontalMenu/index.js +2 -2
  124. package/src/kisscomps/components/horizontalMenu/kissHorizontalMenu.vue +254 -254
  125. package/src/kisscomps/components/input/index.js +2 -2
  126. package/src/kisscomps/components/input/kissinput.vue +57 -57
  127. package/src/kisscomps/components/menu/index.js +2 -2
  128. package/src/kisscomps/components/menu/kissmenu.vue +324 -324
  129. package/src/kisscomps/components/mutipletips/Tdrag.js +585 -585
  130. package/src/kisscomps/components/mutipletips/index.js +2 -2
  131. package/src/kisscomps/components/mutipletips/kissmutipletips.vue +192 -192
  132. package/src/kisscomps/components/select/chosen.jquery.min.js +3 -3
  133. package/src/kisscomps/components/select/index.js +2 -2
  134. package/src/kisscomps/components/select/kissselect.vue +527 -527
  135. package/src/kisscomps/components/timectrl/KissTimeCtrl.vue +67 -67
  136. package/src/kisscomps/components/timectrl/index.js +2 -2
  137. package/src/kisscomps/components/tip/Tdrag.js +585 -585
  138. package/src/kisscomps/components/tip/index.js +2 -2
  139. package/src/kisscomps/components/tip/kisstips.1.vue +154 -154
  140. package/src/kisscomps/components/tip/kisstips.vue +154 -154
  141. package/src/kisscomps/components/tip/kisstips.vue.bak +211 -211
  142. package/src/kisscomps/index.js +73 -71
  143. package/src/main.js +23 -23
  144. package/src/router/index.js +15 -15
  145. package/src/views/home.1.vue +479 -479
  146. package/src/views/home.vue +196 -196
  147. package/test/e2e/custom-assertions/elementCount.js +27 -27
  148. package/test/e2e/nightwatch.conf.js +46 -46
  149. package/test/e2e/runner.js +48 -48
  150. package/test/e2e/specs/test.js +19 -19
  151. package/test/unit/.eslintrc +7 -7
  152. package/test/unit/jest.conf.js +30 -30
  153. package/test/unit/setup.js +3 -3
  154. package/test/unit/specs/HelloWorld.spec.js +11 -11
@@ -1,320 +1,320 @@
1
- <template>
2
- <svg t="1545378648902" class="icon"
3
- style=""
4
- viewBox="0 0 1024 1024"
5
- version="1.1"
6
- xmlns="http://www.w3.org/2000/svg"
7
- p-id="2200"
8
- xmlns:xlink="http://www.w3.org/1999/xlink"
9
- :width="Width" :height="Height">
10
- <!-- ====================================[1 East-Straight 东向直行] :fill="this.getStatus(0).color"
11
- :class="this.getStatus(0).isshow ? '' : 'invisible'"============================================= -->
12
- <path d="M854.231579 262.736842H269.473684l18.863158-43.115789-118.568421 49.852631 118.568421 49.852632-18.863158-43.11579h584.757895z"
13
- p-id="2201"
14
- :stroke-width="PathWidth"
15
- :fill="status[0].color"
16
- :class="status[0].isshow ? '' : 'invisible'"
17
- ></path>
18
- <!-- ====================================[2 East-Left 东向左转]============================================= -->
19
- <path d="M679.073684 262.736842c-2.694737 0-216.926316-6.736842-319.326316 161.684211L327.410526 390.736842l2.694737 128 90.273684-91.621053-45.810526 1.347369C471.578947 269.473684 676.378947 276.210526 679.073684 276.210526h175.157895v-13.473684h-175.157895z"
20
- p-id="2202"
21
- :stroke-width="PathWidth"
22
- :fill="status[1].color"
23
- :class="status[1].isshow ? '' : 'invisible'"
24
- ></path>
25
- <!-- ====================================[3 East-Right 东向右转]============================================= -->
26
- <path d="M679.073684 262.736842c-2.694737 0-207.494737 6.736842-304.505263-152.252631l45.810526 1.347368-90.273684-91.621053-2.694737 128 33.684211-33.68421c92.968421 154.947368 282.947368 161.684211 313.936842 161.68421h179.2v-13.473684h-175.157895z"
27
- p-id="2203"
28
- :stroke-width="PathWidth"
29
- :fill="status[2].color"
30
- :class="status[2].isshow ? '' : 'invisible'"
31
- ></path>
32
- <!-- ====================================[4 East-Back 东向掉头]============================================= -->
33
- <path d="M619.789474 276.210526h234.442105v-13.473684H619.789474c-48.505263 0-87.578947 39.073684-87.578948 87.578947s39.073684 87.578947 87.578948 87.578948h48.505263l-18.863158 43.115789L768 431.157895l-118.568421-49.852632 18.863158 43.11579H619.789474c-40.421053 0-74.105263-33.684211-74.105263-74.105264s33.684211-74.105263 74.105263-74.105263z"
34
- p-id="2204"
35
- :stroke-width="PathWidth"
36
- :fill="status[3].color"
37
- :class="status[3].isshow ? '' : 'invisible'"
38
- ></path>
39
- <!-- ====================================[5 West-Straight 西向直行]============================================= -->
40
- <path d="M854.231579 754.526316l-118.568421-49.852632 18.863158 43.11579H169.768421v13.473684H754.526316l-18.863158 43.115789z"
41
- p-id="2205"
42
- :stroke-width="PathWidth"
43
- :fill="status[4].color"
44
- :class="status[4].isshow ? '' : 'invisible'"
45
- ></path>
46
- <!-- ====================================[6 West-Left 西向左转]============================================= -->
47
- <path d="M696.589474 633.263158l-2.694737-128-90.273684 91.621053 45.810526-1.347369C552.421053 754.526316 347.621053 747.789474 344.926316 747.789474h-175.157895v13.473684h179.2c32.336842 0 220.968421-6.736842 313.936842-161.684211l33.684211 33.684211z"
48
- p-id="2206"
49
- :stroke-width="PathWidth"
50
- :fill="status[5].color"
51
- :class="status[5].isshow ? '' : 'invisible'"
52
- ></path>
53
- <!-- ====================================[7 West-Right 西向右转]============================================= -->
54
- <path xmlns="http://www.w3.org/2000/svg" d="M662.905263 909.473684c-101.052632-168.421053-316.631579-161.684211-317.978947-161.68421h-175.157895v13.473684h175.157895c2.694737 0 206.147368-6.736842 304.505263 152.252631l-45.810526-1.347368 90.273684 91.621053 2.694737-128-33.684211 33.68421z"
55
- p-id="2207"
56
- :stroke-width="PathWidth"
57
- :fill="status[6].color"
58
- :class="status[6].isshow ? '' : 'invisible'"
59
- ></path>
60
- <!-- ====================================[8 West-Back 西向掉头]============================================= -->
61
- <path d="M404.210526 586.105263h-48.505263l18.863158-43.115789L256 592.842105l118.568421 49.852632-18.863158-43.11579H404.210526c40.421053 0 74.105263 33.684211 74.105263 74.105264S444.631579 747.789474 404.210526 747.789474H169.768421v13.473684H404.210526c48.505263 0 87.578947-39.073684 87.578948-87.578947s-39.073684-87.578947-87.578948-87.578948z"
62
- p-id="2205"
63
- :stroke-width="PathWidth"
64
- :fill="status[7].color"
65
- :class="status[7].isshow ? '' : 'invisible'"
66
- ></path>
67
- <!-- ====================================[9 North-Straight北向直行]============================================= -->
68
- <path d="M262.736842 169.768421V754.526316l-43.115789-18.863158 49.852631 118.568421 49.852632-118.568421-43.11579 18.863158V169.768421z"
69
- p-id="2209"
70
- :stroke-width="PathWidth"
71
- :fill="status[8].color"
72
- :class="status[8].isshow ? '' : 'invisible'"
73
- ></path>
74
- <!-- ====================================[10 North-Left 北向左转]============================================= -->
75
- <path d="M262.736842 344.926316c0 2.694737-6.736842 216.926316 161.684211 319.326316L390.736842 696.589474l128-2.694737-91.621053-90.273684 1.347369 45.810526C269.473684 552.421053 276.210526 347.621053 276.210526 344.926316v-175.157895h-13.473684v175.157895z"
76
- p-id="2210"
77
- :stroke-width="PathWidth"
78
- :fill="status[9].color"
79
- :class="status[9].isshow ? '' : 'invisible'"
80
- ></path>
81
- <!-- ====================================[11 North-Right 北向右转]============================================ -->
82
- <path d="M262.736842 344.926316c0 2.694737 6.736842 206.147368-152.252631 304.505263l1.347368-45.810526-91.621053 90.273684 128 2.694737-33.68421-33.684211c154.947368-92.968421 161.684211-282.947368 161.68421-313.936842V169.768421h-13.473684v175.157895z"
83
- p-id="2211"
84
- :stroke-width="PathWidth"
85
- :fill="status[10].color"
86
- :class="status[10].isshow ? '' : 'invisible'"
87
- ></path>
88
- <!-- ====================================[12 North-Back 北向掉头]============================================= -->
89
- <path xmlns="http://www.w3.org/2000/svg" d="M276.210526 404.210526V169.768421h-13.473684V404.210526c0 48.505263 39.073684 87.578947 87.578947 87.578948s87.578947-39.073684 87.578948-87.578948v-48.505263l43.115789 18.863158L431.157895 256l-49.852632 118.568421 43.11579-18.863158V404.210526c0 40.421053-33.684211 74.105263-74.105264 74.105263S276.210526 444.631579 276.210526 404.210526z"
90
- p-id="2212"
91
- :stroke-width="PathWidth"
92
- :fill="status[11].color"
93
- :class="status[11].isshow ? '' : 'invisible'"
94
- ></path>
95
- <!-- ====================================[13 South-Straight 南向直行]============================================= -->
96
- <path d="M754.526316 169.768421l-49.852632 118.568421 43.11579-18.863158v584.757895h13.473684V269.473684l43.115789 18.863158z"
97
- p-id="2213"
98
- :stroke-width="PathWidth"
99
- :fill="status[12].color"
100
- :class="status[12].isshow ? '' : 'invisible'"
101
- ></path>
102
- <!-- ====================================[14 South-Letf 南向左转]============================================= -->
103
- <path d="M633.263158 327.410526l-128 2.694737 91.621053 90.273684-1.347369-45.810526C754.526316 471.578947 747.789474 676.378947 747.789474 679.073684v175.157895h13.473684v-175.157895-4.042105c0-32.336842-6.736842-220.968421-161.684211-313.936842l33.684211-33.684211z"
104
- p-id="2214"
105
- :stroke-width="PathWidth"
106
- :fill="status[13].color"
107
- :class="status[13].isshow ? '' : 'invisible'"
108
- ></path>
109
- <!-- ====================================[15 South-Right 南向右转]============================================= -->
110
- <path d="M909.473684 361.094737c-168.421053 101.052632-161.684211 316.631579-161.68421 317.978947v175.157895h13.473684v-175.157895c0-2.694737-6.736842-206.147368 152.252631-304.505263l-1.347368 45.810526 91.621053-90.273684-128-2.694737 33.68421 33.684211z"
111
- p-id="2215"
112
- :stroke-width="PathWidth"
113
- :fill="status[14].color"
114
- :class="status[14].isshow ? '' : 'invisible'"
115
- ></path>
116
- <!-- ====================================[16 South-Back 南向掉头]============================================ -->
117
- <path xmlns="http://www.w3.org/2000/svg"
118
- d="M586.105263 619.789474v48.505263l-43.115789-18.863158L592.842105 768l49.852632-118.568421-43.11579 18.863158V619.789474c0-40.421053 33.684211-74.105263 74.105264-74.105263s74.105263 33.684211 74.105263 74.105263v234.442105h13.473684V619.789474c0-48.505263-39.073684-87.578947-87.578947-87.578948s-87.578947 39.073684-87.578948 87.578948z"
119
- p-id="2216"
120
- :stroke-width="PathWidth"
121
- :fill="status[15].color"
122
- :class="status[15].isshow ? '' : 'invisible'"
123
- ></path>
124
- </svg>
125
- </template>
126
- <script>
127
- export default {
128
- name: 'xdr-dir-selector',
129
- props: {
130
- showlist: {
131
- type: Array,
132
- default: function () {
133
- return [
134
- {
135
- id: 1,
136
- color: 'red'
137
- },
138
- {
139
- id: 2,
140
- color: 'yellow'
141
- }
142
- ]
143
- }
144
- },
145
- Width: {
146
- type: String,
147
- default: '200px'
148
- },
149
- Height: {
150
- type: String,
151
- default: '200px'
152
- },
153
- PathWidth: {
154
- type: Number,
155
- default: 18
156
- }
157
- },
158
- data () {
159
- return {
160
- status: [
161
- {
162
- id: 1,
163
- name: 'East-Straight',
164
- isshow: false,
165
- color: '#0096ba'
166
- },
167
- {
168
- id: 2,
169
- name: 'East-Left',
170
- isshow: false,
171
- color: '#0096ba'
172
- },
173
- {
174
- id: 3,
175
- name: 'East-Right',
176
- isshow: false,
177
- color: '#0096ba'
178
- },
179
- {
180
- id: 4,
181
- name: 'East-Back ',
182
- isshow: false,
183
- color: '#0096ba'
184
- },
185
- {
186
- id: 5,
187
- name: 'West-Straight',
188
- isshow: false,
189
- color: '#0096ba'
190
- },
191
- {
192
- id: 6,
193
- name: 'West-Left',
194
- isshow: false,
195
- color: '#0096ba'
196
- },
197
- {
198
- id: 7,
199
- name: 'West-Right',
200
- isshow: false,
201
- color: '#0096ba'
202
- },
203
- {
204
- id: 8,
205
- name: 'West-Back',
206
- isshow: false,
207
- color: '#0096ba'
208
- },
209
- {
210
- id: 9,
211
- name: 'North-Straight',
212
- isshow: false,
213
- color: '#0096ba'
214
- },
215
- {
216
- id: 10,
217
- name: 'North-Left',
218
- isshow: false,
219
- color: '#0096ba'
220
- },
221
- {
222
- id: 11,
223
- name: 'North-Right',
224
- isshow: false,
225
- color: '#0096ba'
226
- },
227
- {
228
- id: 12,
229
- name: 'North-Back',
230
- isshow: false,
231
- color: '#0096ba'
232
- },
233
- {
234
- id: 13,
235
- name: 'South-Straight',
236
- isshow: false,
237
- color: '#0096ba'
238
- },
239
- {
240
- id: 14,
241
- name: 'South-Left',
242
- isshow: false,
243
- color: '#0096ba'
244
- },
245
- {
246
- id: 15,
247
- name: 'South-Right',
248
- isshow: false,
249
- color: '#0096ba'
250
- },
251
- {
252
- id: 16,
253
- name: 'South-Back',
254
- isshow: false,
255
- color: '#0096ba'
256
- }
257
- ]
258
- }
259
- },
260
- methods: {
261
- randShow () {
262
- let num1 = parseInt(Math.random() * (15 - 0 + 1) + 0)
263
- let num2 = parseInt(Math.random() * (15 - 0 + 1) + 0)
264
- console.log(num1)
265
- console.log(num2)
266
- for (let i = 0; i < 16; i++) {
267
- if (this.status[i].isshow) {
268
- this.status[i].isshow = false
269
- }
270
- if (i === num1 || i === num2) {
271
- this.status[i].isshow = true
272
- }
273
- }
274
- },
275
- refreshShow (showList) {
276
- if (showList.length > 16) {
277
- console.log('list can not be bigger than 16!')
278
- }
279
- for (let i = 0; i < 16; i++) {
280
- if (this.status[i].isshow) {
281
- this.status[i].isshow = false
282
- }
283
- }
284
- for (let i = 0; i < 16; i++) {
285
- if (i < showList.length) {
286
- let id = showList[i].id
287
- if (id > 16 || id <= 0) {
288
- console.log('Id is invalied!')
289
- continue
290
- }
291
- this.status[id - 1].isshow = true
292
- this.status[id - 1].color = showList[i].color
293
- }
294
- }
295
- }
296
- },
297
- created () {
298
- // console.log('start.......')
299
- // setInterval(() => {
300
- // this.randShow()
301
- // }, 3000)
302
- this.refreshShow(this.showlist)
303
- },
304
- watch: {
305
- showlist: {
306
- handler: function (newList) {
307
- console.log(newList)
308
- this.refreshShow(newList)
309
- },
310
- deep: true // 深度监听
311
- }
312
- }
313
- }
314
- </script>
315
-
316
- <style scoped>
317
- .invisible {
318
- visibility: hidden;
319
- }
320
- </style>
1
+ <template>
2
+ <svg t="1545378648902" class="icon"
3
+ style=""
4
+ viewBox="0 0 1024 1024"
5
+ version="1.1"
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ p-id="2200"
8
+ xmlns:xlink="http://www.w3.org/1999/xlink"
9
+ :width="Width" :height="Height">
10
+ <!-- ====================================[1 East-Straight 东向直行] :fill="this.getStatus(0).color"
11
+ :class="this.getStatus(0).isshow ? '' : 'invisible'"============================================= -->
12
+ <path d="M854.231579 262.736842H269.473684l18.863158-43.115789-118.568421 49.852631 118.568421 49.852632-18.863158-43.11579h584.757895z"
13
+ p-id="2201"
14
+ :stroke-width="PathWidth"
15
+ :fill="status[0].color"
16
+ :class="status[0].isshow ? '' : 'invisible'"
17
+ ></path>
18
+ <!-- ====================================[2 East-Left 东向左转]============================================= -->
19
+ <path d="M679.073684 262.736842c-2.694737 0-216.926316-6.736842-319.326316 161.684211L327.410526 390.736842l2.694737 128 90.273684-91.621053-45.810526 1.347369C471.578947 269.473684 676.378947 276.210526 679.073684 276.210526h175.157895v-13.473684h-175.157895z"
20
+ p-id="2202"
21
+ :stroke-width="PathWidth"
22
+ :fill="status[1].color"
23
+ :class="status[1].isshow ? '' : 'invisible'"
24
+ ></path>
25
+ <!-- ====================================[3 East-Right 东向右转]============================================= -->
26
+ <path d="M679.073684 262.736842c-2.694737 0-207.494737 6.736842-304.505263-152.252631l45.810526 1.347368-90.273684-91.621053-2.694737 128 33.684211-33.68421c92.968421 154.947368 282.947368 161.684211 313.936842 161.68421h179.2v-13.473684h-175.157895z"
27
+ p-id="2203"
28
+ :stroke-width="PathWidth"
29
+ :fill="status[2].color"
30
+ :class="status[2].isshow ? '' : 'invisible'"
31
+ ></path>
32
+ <!-- ====================================[4 East-Back 东向掉头]============================================= -->
33
+ <path d="M619.789474 276.210526h234.442105v-13.473684H619.789474c-48.505263 0-87.578947 39.073684-87.578948 87.578947s39.073684 87.578947 87.578948 87.578948h48.505263l-18.863158 43.115789L768 431.157895l-118.568421-49.852632 18.863158 43.11579H619.789474c-40.421053 0-74.105263-33.684211-74.105263-74.105264s33.684211-74.105263 74.105263-74.105263z"
34
+ p-id="2204"
35
+ :stroke-width="PathWidth"
36
+ :fill="status[3].color"
37
+ :class="status[3].isshow ? '' : 'invisible'"
38
+ ></path>
39
+ <!-- ====================================[5 West-Straight 西向直行]============================================= -->
40
+ <path d="M854.231579 754.526316l-118.568421-49.852632 18.863158 43.11579H169.768421v13.473684H754.526316l-18.863158 43.115789z"
41
+ p-id="2205"
42
+ :stroke-width="PathWidth"
43
+ :fill="status[4].color"
44
+ :class="status[4].isshow ? '' : 'invisible'"
45
+ ></path>
46
+ <!-- ====================================[6 West-Left 西向左转]============================================= -->
47
+ <path d="M696.589474 633.263158l-2.694737-128-90.273684 91.621053 45.810526-1.347369C552.421053 754.526316 347.621053 747.789474 344.926316 747.789474h-175.157895v13.473684h179.2c32.336842 0 220.968421-6.736842 313.936842-161.684211l33.684211 33.684211z"
48
+ p-id="2206"
49
+ :stroke-width="PathWidth"
50
+ :fill="status[5].color"
51
+ :class="status[5].isshow ? '' : 'invisible'"
52
+ ></path>
53
+ <!-- ====================================[7 West-Right 西向右转]============================================= -->
54
+ <path xmlns="http://www.w3.org/2000/svg" d="M662.905263 909.473684c-101.052632-168.421053-316.631579-161.684211-317.978947-161.68421h-175.157895v13.473684h175.157895c2.694737 0 206.147368-6.736842 304.505263 152.252631l-45.810526-1.347368 90.273684 91.621053 2.694737-128-33.684211 33.68421z"
55
+ p-id="2207"
56
+ :stroke-width="PathWidth"
57
+ :fill="status[6].color"
58
+ :class="status[6].isshow ? '' : 'invisible'"
59
+ ></path>
60
+ <!-- ====================================[8 West-Back 西向掉头]============================================= -->
61
+ <path d="M404.210526 586.105263h-48.505263l18.863158-43.115789L256 592.842105l118.568421 49.852632-18.863158-43.11579H404.210526c40.421053 0 74.105263 33.684211 74.105263 74.105264S444.631579 747.789474 404.210526 747.789474H169.768421v13.473684H404.210526c48.505263 0 87.578947-39.073684 87.578948-87.578947s-39.073684-87.578947-87.578948-87.578948z"
62
+ p-id="2205"
63
+ :stroke-width="PathWidth"
64
+ :fill="status[7].color"
65
+ :class="status[7].isshow ? '' : 'invisible'"
66
+ ></path>
67
+ <!-- ====================================[9 North-Straight北向直行]============================================= -->
68
+ <path d="M262.736842 169.768421V754.526316l-43.115789-18.863158 49.852631 118.568421 49.852632-118.568421-43.11579 18.863158V169.768421z"
69
+ p-id="2209"
70
+ :stroke-width="PathWidth"
71
+ :fill="status[8].color"
72
+ :class="status[8].isshow ? '' : 'invisible'"
73
+ ></path>
74
+ <!-- ====================================[10 North-Left 北向左转]============================================= -->
75
+ <path d="M262.736842 344.926316c0 2.694737-6.736842 216.926316 161.684211 319.326316L390.736842 696.589474l128-2.694737-91.621053-90.273684 1.347369 45.810526C269.473684 552.421053 276.210526 347.621053 276.210526 344.926316v-175.157895h-13.473684v175.157895z"
76
+ p-id="2210"
77
+ :stroke-width="PathWidth"
78
+ :fill="status[9].color"
79
+ :class="status[9].isshow ? '' : 'invisible'"
80
+ ></path>
81
+ <!-- ====================================[11 North-Right 北向右转]============================================ -->
82
+ <path d="M262.736842 344.926316c0 2.694737 6.736842 206.147368-152.252631 304.505263l1.347368-45.810526-91.621053 90.273684 128 2.694737-33.68421-33.684211c154.947368-92.968421 161.684211-282.947368 161.68421-313.936842V169.768421h-13.473684v175.157895z"
83
+ p-id="2211"
84
+ :stroke-width="PathWidth"
85
+ :fill="status[10].color"
86
+ :class="status[10].isshow ? '' : 'invisible'"
87
+ ></path>
88
+ <!-- ====================================[12 North-Back 北向掉头]============================================= -->
89
+ <path xmlns="http://www.w3.org/2000/svg" d="M276.210526 404.210526V169.768421h-13.473684V404.210526c0 48.505263 39.073684 87.578947 87.578947 87.578948s87.578947-39.073684 87.578948-87.578948v-48.505263l43.115789 18.863158L431.157895 256l-49.852632 118.568421 43.11579-18.863158V404.210526c0 40.421053-33.684211 74.105263-74.105264 74.105263S276.210526 444.631579 276.210526 404.210526z"
90
+ p-id="2212"
91
+ :stroke-width="PathWidth"
92
+ :fill="status[11].color"
93
+ :class="status[11].isshow ? '' : 'invisible'"
94
+ ></path>
95
+ <!-- ====================================[13 South-Straight 南向直行]============================================= -->
96
+ <path d="M754.526316 169.768421l-49.852632 118.568421 43.11579-18.863158v584.757895h13.473684V269.473684l43.115789 18.863158z"
97
+ p-id="2213"
98
+ :stroke-width="PathWidth"
99
+ :fill="status[12].color"
100
+ :class="status[12].isshow ? '' : 'invisible'"
101
+ ></path>
102
+ <!-- ====================================[14 South-Letf 南向左转]============================================= -->
103
+ <path d="M633.263158 327.410526l-128 2.694737 91.621053 90.273684-1.347369-45.810526C754.526316 471.578947 747.789474 676.378947 747.789474 679.073684v175.157895h13.473684v-175.157895-4.042105c0-32.336842-6.736842-220.968421-161.684211-313.936842l33.684211-33.684211z"
104
+ p-id="2214"
105
+ :stroke-width="PathWidth"
106
+ :fill="status[13].color"
107
+ :class="status[13].isshow ? '' : 'invisible'"
108
+ ></path>
109
+ <!-- ====================================[15 South-Right 南向右转]============================================= -->
110
+ <path d="M909.473684 361.094737c-168.421053 101.052632-161.684211 316.631579-161.68421 317.978947v175.157895h13.473684v-175.157895c0-2.694737-6.736842-206.147368 152.252631-304.505263l-1.347368 45.810526 91.621053-90.273684-128-2.694737 33.68421 33.684211z"
111
+ p-id="2215"
112
+ :stroke-width="PathWidth"
113
+ :fill="status[14].color"
114
+ :class="status[14].isshow ? '' : 'invisible'"
115
+ ></path>
116
+ <!-- ====================================[16 South-Back 南向掉头]============================================ -->
117
+ <path xmlns="http://www.w3.org/2000/svg"
118
+ d="M586.105263 619.789474v48.505263l-43.115789-18.863158L592.842105 768l49.852632-118.568421-43.11579 18.863158V619.789474c0-40.421053 33.684211-74.105263 74.105264-74.105263s74.105263 33.684211 74.105263 74.105263v234.442105h13.473684V619.789474c0-48.505263-39.073684-87.578947-87.578947-87.578948s-87.578947 39.073684-87.578948 87.578948z"
119
+ p-id="2216"
120
+ :stroke-width="PathWidth"
121
+ :fill="status[15].color"
122
+ :class="status[15].isshow ? '' : 'invisible'"
123
+ ></path>
124
+ </svg>
125
+ </template>
126
+ <script>
127
+ export default {
128
+ name: 'xdr-dir-selector',
129
+ props: {
130
+ showlist: {
131
+ type: Array,
132
+ default: function () {
133
+ return [
134
+ {
135
+ id: 1,
136
+ color: 'red'
137
+ },
138
+ {
139
+ id: 2,
140
+ color: 'yellow'
141
+ }
142
+ ]
143
+ }
144
+ },
145
+ Width: {
146
+ type: String,
147
+ default: '200px'
148
+ },
149
+ Height: {
150
+ type: String,
151
+ default: '200px'
152
+ },
153
+ PathWidth: {
154
+ type: Number,
155
+ default: 18
156
+ }
157
+ },
158
+ data () {
159
+ return {
160
+ status: [
161
+ {
162
+ id: 1,
163
+ name: 'East-Straight',
164
+ isshow: false,
165
+ color: '#0096ba'
166
+ },
167
+ {
168
+ id: 2,
169
+ name: 'East-Left',
170
+ isshow: false,
171
+ color: '#0096ba'
172
+ },
173
+ {
174
+ id: 3,
175
+ name: 'East-Right',
176
+ isshow: false,
177
+ color: '#0096ba'
178
+ },
179
+ {
180
+ id: 4,
181
+ name: 'East-Back ',
182
+ isshow: false,
183
+ color: '#0096ba'
184
+ },
185
+ {
186
+ id: 5,
187
+ name: 'West-Straight',
188
+ isshow: false,
189
+ color: '#0096ba'
190
+ },
191
+ {
192
+ id: 6,
193
+ name: 'West-Left',
194
+ isshow: false,
195
+ color: '#0096ba'
196
+ },
197
+ {
198
+ id: 7,
199
+ name: 'West-Right',
200
+ isshow: false,
201
+ color: '#0096ba'
202
+ },
203
+ {
204
+ id: 8,
205
+ name: 'West-Back',
206
+ isshow: false,
207
+ color: '#0096ba'
208
+ },
209
+ {
210
+ id: 9,
211
+ name: 'North-Straight',
212
+ isshow: false,
213
+ color: '#0096ba'
214
+ },
215
+ {
216
+ id: 10,
217
+ name: 'North-Left',
218
+ isshow: false,
219
+ color: '#0096ba'
220
+ },
221
+ {
222
+ id: 11,
223
+ name: 'North-Right',
224
+ isshow: false,
225
+ color: '#0096ba'
226
+ },
227
+ {
228
+ id: 12,
229
+ name: 'North-Back',
230
+ isshow: false,
231
+ color: '#0096ba'
232
+ },
233
+ {
234
+ id: 13,
235
+ name: 'South-Straight',
236
+ isshow: false,
237
+ color: '#0096ba'
238
+ },
239
+ {
240
+ id: 14,
241
+ name: 'South-Left',
242
+ isshow: false,
243
+ color: '#0096ba'
244
+ },
245
+ {
246
+ id: 15,
247
+ name: 'South-Right',
248
+ isshow: false,
249
+ color: '#0096ba'
250
+ },
251
+ {
252
+ id: 16,
253
+ name: 'South-Back',
254
+ isshow: false,
255
+ color: '#0096ba'
256
+ }
257
+ ]
258
+ }
259
+ },
260
+ methods: {
261
+ randShow () {
262
+ let num1 = parseInt(Math.random() * (15 - 0 + 1) + 0)
263
+ let num2 = parseInt(Math.random() * (15 - 0 + 1) + 0)
264
+ console.log(num1)
265
+ console.log(num2)
266
+ for (let i = 0; i < 16; i++) {
267
+ if (this.status[i].isshow) {
268
+ this.status[i].isshow = false
269
+ }
270
+ if (i === num1 || i === num2) {
271
+ this.status[i].isshow = true
272
+ }
273
+ }
274
+ },
275
+ refreshShow (showList) {
276
+ if (showList.length > 16) {
277
+ console.log('list can not be bigger than 16!')
278
+ }
279
+ for (let i = 0; i < 16; i++) {
280
+ if (this.status[i].isshow) {
281
+ this.status[i].isshow = false
282
+ }
283
+ }
284
+ for (let i = 0; i < 16; i++) {
285
+ if (i < showList.length) {
286
+ let id = showList[i].id
287
+ if (id > 16 || id <= 0) {
288
+ console.log('Id is invalied!')
289
+ continue
290
+ }
291
+ this.status[id - 1].isshow = true
292
+ this.status[id - 1].color = showList[i].color
293
+ }
294
+ }
295
+ }
296
+ },
297
+ created () {
298
+ // console.log('start.......')
299
+ // setInterval(() => {
300
+ // this.randShow()
301
+ // }, 3000)
302
+ this.refreshShow(this.showlist)
303
+ },
304
+ watch: {
305
+ showlist: {
306
+ handler: function (newList) {
307
+ console.log(newList)
308
+ this.refreshShow(newList)
309
+ },
310
+ deep: true // 深度监听
311
+ }
312
+ }
313
+ }
314
+ </script>
315
+
316
+ <style scoped>
317
+ .invisible {
318
+ visibility: hidden;
319
+ }
320
+ </style>