Tower.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  1. <template>
  2. <div class="tower">
  3. <Wave></Wave>
  4. <Windmill class="windmill-1"></Windmill>
  5. <Windmill class="windmill-2"></Windmill>
  6. <Windmill class="windmill-3"></Windmill>
  7. <Windmill class="windmill-4"></Windmill>
  8. <Windmill class="windmill-5"></Windmill>
  9. <WindTower></WindTower>
  10. <toolbar-panel class="rose-chart" title="日发电量">
  11. <template v-slot:tools>
  12. <div class="tools">
  13. <div class="tool-block">
  14. <div class="legend bg-green"></div>
  15. <div class="legend-text">风速</div>
  16. </div>
  17. <div class="tool-block">
  18. <div class="legend bg-purple"></div>
  19. <div class="legend-text">实际功率</div>
  20. </div>
  21. <div class="tool-block">
  22. <div class="legend bg-orange"></div>
  23. <div class="legend-text">理论功率</div>
  24. </div>
  25. <div class="tool-block">
  26. <div class="legend bg-yellow"></div>
  27. <div class="legend-text">保证功率</div>
  28. </div>
  29. <div class="tool-block">
  30. <div class="legend bg-blue"></div>
  31. <div class="legend-text">预测功率4小时</div>
  32. </div>
  33. <div class="tool-block">
  34. <div class="legend bg-pink"></div>
  35. <div class="legend-text">预测功率72小时</div>
  36. </div>
  37. </div>
  38. </template>
  39. <template v-slot:default>
  40. <!-- 日发电量 -->
  41. <multiple-line-chart :list="Powertrend.value" :units="Powertrend.units" height="28vh" />
  42. </template>
  43. </toolbar-panel>
  44. </div>
  45. </template>
  46. <script>
  47. import Wave from "@com/three/wave.vue";
  48. import Windmill from "../components/Windmill.vue";
  49. import ToolbarPanel from "@com/coms/panel/toolbar-panel.vue";
  50. import MultipleLineChart from "@com/chart/line/multiple-line-chart.vue";
  51. import WindTower from "./Tower/WindTower.vue";
  52. export default {
  53. // 名称
  54. name: "Tower",
  55. // 使用组件
  56. components: {
  57. Wave,
  58. Windmill,
  59. ToolbarPanel,
  60. MultipleLineChart,
  61. WindTower,
  62. },
  63. // 传入参数
  64. props: {},
  65. // 自定义事件
  66. emits: {},
  67. // 数据
  68. data() {
  69. return {
  70. // 日发电量
  71. Powertrend: {
  72. // 图表所用单位
  73. units: ["(风速)", "(万KWh)", "(万KWh)", "(万KWh)", "(万KWh)", "(万KWh)"],
  74. value: [
  75. {
  76. title: "风速",
  77. yAxisIndex: 0, // 使用单位
  78. value: [
  79. {
  80. text: "1日",
  81. value: 1,
  82. },
  83. {
  84. text: "2日",
  85. value: 10,
  86. },
  87. {
  88. text: "3日",
  89. value: 60,
  90. },
  91. {
  92. text: "4日",
  93. value: 50,
  94. },
  95. {
  96. text: "5日",
  97. value: 55,
  98. },
  99. {
  100. text: "6日",
  101. value: 40,
  102. },
  103. {
  104. text: "7日",
  105. value: 20,
  106. },
  107. ],
  108. },
  109. {
  110. title: "实际功率",
  111. yAxisIndex: 0,
  112. value: [
  113. {
  114. text: "1日",
  115. value: 2,
  116. },
  117. {
  118. text: "2日",
  119. value: 22,
  120. },
  121. {
  122. text: "3日",
  123. value: 32,
  124. },
  125. {
  126. text: "4日",
  127. value: 24,
  128. },
  129. {
  130. text: "5日",
  131. value: 56,
  132. },
  133. {
  134. text: "6日",
  135. value: 70,
  136. },
  137. {
  138. text: "7日",
  139. value: 65,
  140. },
  141. ],
  142. },
  143. {
  144. title: "理论功率",
  145. yAxisIndex: 0,
  146. value: [
  147. {
  148. text: "1日",
  149. value: 3,
  150. },
  151. {
  152. text: "2日",
  153. value: 33,
  154. },
  155. {
  156. text: "3日",
  157. value: 23,
  158. },
  159. {
  160. text: "4日",
  161. value: 56,
  162. },
  163. {
  164. text: "5日",
  165. value: 43,
  166. },
  167. {
  168. text: "6日",
  169. value: 25,
  170. },
  171. {
  172. text: "7日",
  173. value: 30,
  174. },
  175. ],
  176. },
  177. {
  178. title: "保证功率",
  179. yAxisIndex: 1,
  180. value: [
  181. {
  182. text: "1日",
  183. value: 43,
  184. },
  185. {
  186. text: "2日",
  187. value: 14,
  188. },
  189. {
  190. text: "3日",
  191. value: 24,
  192. },
  193. {
  194. text: "4日",
  195. value: 44,
  196. },
  197. {
  198. text: "5日",
  199. value: 34,
  200. },
  201. {
  202. text: "6日",
  203. value: 64,
  204. },
  205. {
  206. text: "7日",
  207. value: 54,
  208. },
  209. ],
  210. },
  211. {
  212. title: "预测功率4小时",
  213. yAxisIndex: 1,
  214. value: [
  215. {
  216. text: "1日",
  217. value: 45,
  218. },
  219. {
  220. text: "2日",
  221. value: 55,
  222. },
  223. {
  224. text: "3日",
  225. value: 64,
  226. },
  227. {
  228. text: "4日",
  229. value: 24,
  230. },
  231. {
  232. text: "5日",
  233. value: 34,
  234. },
  235. {
  236. text: "6日",
  237. value: 42,
  238. },
  239. {
  240. text: "7日",
  241. value: 14,
  242. },
  243. ],
  244. },
  245. {
  246. title: "预测功率72小时",
  247. yAxisIndex: 1,
  248. value: [
  249. {
  250. text: "1日",
  251. value: 46,
  252. },
  253. {
  254. text: "2日",
  255. value: 64,
  256. },
  257. {
  258. text: "3日",
  259. value: 44,
  260. },
  261. {
  262. text: "4日",
  263. value: 24,
  264. },
  265. {
  266. text: "5日",
  267. value: 54,
  268. },
  269. {
  270. text: "6日",
  271. value: 14,
  272. },
  273. {
  274. text: "7日",
  275. value: 34,
  276. },
  277. ],
  278. },
  279. ],
  280. },
  281. };
  282. },
  283. // 函数
  284. methods: {},
  285. // 生命周期钩子
  286. beforeCreate() {
  287. // 创建前
  288. },
  289. created() {
  290. // 创建后
  291. },
  292. beforeMount() {
  293. // 渲染前
  294. },
  295. mounted() {
  296. // 渲染后
  297. },
  298. beforeUpdate() {
  299. // 数据更新前
  300. },
  301. updated() {
  302. // 数据更新后
  303. },
  304. };
  305. </script>
  306. <style lang="less">
  307. .tower {
  308. position: relative;
  309. width: 100%;
  310. height: 100%;
  311. .windmill-1,
  312. .windmill-2,
  313. .windmill-3,
  314. .windmill-4,
  315. .windmill-5 {
  316. position: absolute;
  317. }
  318. .windmill-1 {
  319. top: 23.148vh;
  320. left: 28.333vh;
  321. width: 4.167vh;
  322. }
  323. .windmill-2 {
  324. top: 8.333vh;
  325. left: 11.111vh;
  326. width: 3.426vh;
  327. }
  328. .windmill-3 {
  329. top: 4.63vh;
  330. left: 38.889vh;
  331. width: 2.593vh;
  332. }
  333. .windmill-4 {
  334. top: 21.296vh;
  335. left: 122.87vh;
  336. width: 3.426vh;
  337. }
  338. .windmill-5 {
  339. top: 5.556vh;
  340. left: 121.296vh;
  341. width: 2.407vh;
  342. }
  343. .rose-chart {
  344. position: absolute;
  345. left: 0;
  346. bottom: 1.852vh;
  347. height: 31.481vh;
  348. width: 100%;
  349. }
  350. .tools {
  351. display: flex;
  352. .tool-block {
  353. display: flex;
  354. align-items: center;
  355. margin-left: 0.741vh;
  356. .legend {
  357. flex: auto;
  358. width: 0.741vh;
  359. height: 0.741vh;
  360. margin-right: 0.741vh;
  361. &.long {
  362. width: 2.963vh;
  363. height: 0.37vh;
  364. }
  365. }
  366. .legend-text {
  367. color: #ffffff4d;
  368. }
  369. }
  370. }
  371. }
  372. </style>