power-forecast-1.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. <template>
  2. <div class="power-forecast-1">
  3. <div class="left">
  4. <el-row class="mg-b-16">
  5. <el-col :span="4">
  6. <panel :title="'预测电量'">
  7. <list-bar-chart :list="listBarData1" :colors="listBarData1Color" :height="'15vh'" />
  8. <div class="dashboard">
  9. <dashboard-2 :height="'8vh'" :width="'115px'" :value="25" />
  10. <div class="lengends">
  11. <div class="item">
  12. <span class="label">本日预测电量</span>
  13. <span class="lengend gary"></span>
  14. <span class="value">123</span>
  15. </div>
  16. <div class="item">
  17. <span class="label">本日已发电量</span>
  18. <span class="lengend green"></span>
  19. <span class="value">123</span>
  20. </div>
  21. </div>
  22. </div>
  23. <div class="dashboard">
  24. <dashboard-2 :height="'8vh'" :width="'115px'" :value="34" />
  25. <div class="lengends">
  26. <div class="item">
  27. <span class="label">本日预测电量</span>
  28. <span class="lengend gary"></span>
  29. <span class="value">123</span>
  30. </div>
  31. <div class="item">
  32. <span class="label">本日已发电量</span>
  33. <span class="lengend green"></span>
  34. <span class="value">123</span>
  35. </div>
  36. </div>
  37. </div>
  38. </panel>
  39. </el-col>
  40. <el-col :span="20">
  41. <toolbar-panel :title="'预测电量'">
  42. <template v-slot:tools>
  43. <div class="tools">
  44. <div class="action" :class="{ active: ForecastPowerTab == 0 }" @click="ForecastPowerTabClick(0)">未来4小时</div>
  45. <div class="action" :class="{ active: ForecastPowerTab == 1 }" @click="ForecastPowerTabClick(1)">未来24小时</div>
  46. <div class="action" :class="{ active: ForecastPowerTab == 2 }" @click="ForecastPowerTabClick(2)">未来3天</div>
  47. <div class="action" :class="{ active: ForecastPowerTab == 3 }" @click="ForecastPowerTabClick(3)">未来1周</div>
  48. </div>
  49. </template>
  50. <normal-line-chart :height="'37.037vh'" :showLegend="true" />
  51. </toolbar-panel>
  52. </el-col>
  53. </el-row>
  54. <div>
  55. <panel :title="'月发电量指标对比'">
  56. <multiple-bar-line-chart :height="'44.4444vh'" :barData="barData" />
  57. <div class="pie-chart">
  58. <dual-pie-chart height="100%" :width="'100%'" :showLegend="false" />
  59. </div>
  60. </panel>
  61. </div>
  62. </div>
  63. <div class="right">
  64. <panel-3 class="right-panel">
  65. <div class="title">
  66. 预测准确率
  67. </div>
  68. <div class="items">
  69. <div class="item" v-for="index in 6" :key="index">
  70. <percent-bar-2 width="100px" height="90px" :value="percent" :name="'牛首山'" :color="'purple'" />
  71. </div>
  72. </div>
  73. </panel-3>
  74. </div>
  75. </div>
  76. </template>
  77. <script>
  78. import ListBarChart from "../../components/chart/bar/list-bar-chart.vue";
  79. import PercentBar2 from "../../components/chart/bar/percent-bar-2.vue";
  80. import MultipleBarLineChart from "../../components/chart/combination/multiple-bar-line-chart.vue";
  81. import NormalLineChart from "../../components/chart/line/normal-line-chart.vue";
  82. import Dashboard2 from "../../components/chart/other/Dashboard2.vue";
  83. import DualPieChart from "../../components/chart/pie/dual-pie-chart.vue";
  84. import Panel from "../../components/coms/panel/panel.vue";
  85. import panel3 from "../../components/coms/panel/panel3.vue";
  86. import ToolbarPanel from "../../components/coms/panel/toolbar-panel.vue";
  87. export default {
  88. components: { panel3, Panel, NormalLineChart, ListBarChart, Dashboard2, MultipleBarLineChart, ToolbarPanel, PercentBar2, DualPieChart },
  89. setup() {},
  90. data() {
  91. return {
  92. listBarData1: [
  93. { name: "未来 {c1|15分钟} 预测电量", value: 123.62 },
  94. { name: "未来 {c1|4小时} 预测电量", value: 123.62 },
  95. ],
  96. listBarData1Color: ["purple", "purple"],
  97. ForecastPowerTab: 0,
  98. barData: [
  99. {
  100. title: "日发电量",
  101. yAxisIndex: 0,
  102. value: [
  103. {
  104. text: "1日",
  105. value: 1,
  106. },
  107. {
  108. text: "2日",
  109. value: 2,
  110. },
  111. {
  112. text: "3日",
  113. value: 1,
  114. },
  115. {
  116. text: "4日",
  117. value: 0,
  118. },
  119. {
  120. text: "5日",
  121. value: 0,
  122. },
  123. {
  124. text: "6日",
  125. value: 0,
  126. },
  127. {
  128. text: "7日",
  129. value: 0,
  130. },
  131. ],
  132. },
  133. {
  134. title: "上网电量",
  135. yAxisIndex: 0,
  136. value: [
  137. {
  138. text: "1日",
  139. value: 1,
  140. },
  141. {
  142. text: "2日",
  143. value: 2,
  144. },
  145. {
  146. text: "3日",
  147. value: 1,
  148. },
  149. {
  150. text: "4日",
  151. value: 0,
  152. },
  153. {
  154. text: "5日",
  155. value: 0,
  156. },
  157. {
  158. text: "6日",
  159. value: 0,
  160. },
  161. {
  162. text: "7日",
  163. value: 0,
  164. },
  165. ],
  166. },
  167. {
  168. title: "购网电量",
  169. yAxisIndex: 0,
  170. value: [
  171. {
  172. text: "1日",
  173. value: 1,
  174. },
  175. {
  176. text: "2日",
  177. value: 2,
  178. },
  179. {
  180. text: "3日",
  181. value: 1,
  182. },
  183. {
  184. text: "4日",
  185. value: 0,
  186. },
  187. {
  188. text: "5日",
  189. value: 0,
  190. },
  191. {
  192. text: "6日",
  193. value: 0,
  194. },
  195. {
  196. text: "7日",
  197. value: 0,
  198. },
  199. ],
  200. },
  201. {
  202. title: "风速",
  203. yAxisIndex: 1,
  204. value: [
  205. {
  206. text: "1日",
  207. value: 1,
  208. },
  209. {
  210. text: "2日",
  211. value: 2,
  212. },
  213. {
  214. text: "3日",
  215. value: 1,
  216. },
  217. {
  218. text: "4日",
  219. value: 0,
  220. },
  221. {
  222. text: "5日",
  223. value: 0,
  224. },
  225. {
  226. text: "6日",
  227. value: 0,
  228. },
  229. {
  230. text: "7日",
  231. value: 0,
  232. },
  233. ],
  234. },
  235. ],
  236. };
  237. },
  238. methods: {
  239. ForecastPowerTabClick(tab) {
  240. this.ForecastPowerTab = tab;
  241. },
  242. },
  243. };
  244. </script>
  245. <style lang="less">
  246. .power-forecast-1 {
  247. display: flex;
  248. .left {
  249. flex: 1 0 auto;
  250. margin-right: 16px;
  251. .tools {
  252. display: flex;
  253. .action {
  254. font-size: 12px;
  255. line-height: 20px;
  256. border-bottom: 1px solid transparent;
  257. margin-left: 8px;
  258. cursor: pointer;
  259. padding-top: 2px;
  260. &.active,
  261. &:hover {
  262. color: @green;
  263. border-bottom: 1px solid @green;
  264. }
  265. }
  266. }
  267. .dashboard {
  268. position: relative;
  269. display: flex;
  270. align-items: center;
  271. .lengends {
  272. font-size: 12px;
  273. line-height: 20px;
  274. padding-left: 12px;
  275. .item {
  276. display: flex;
  277. align-items: center;
  278. .label {
  279. margin-right: 8px;
  280. color: @gray;
  281. }
  282. .lengend {
  283. display: inline-block;
  284. width: 6px;
  285. height: 6px;
  286. background: @gray;
  287. border-radius: 50%;
  288. margin-right: 8px;
  289. &.green {
  290. background: @green;
  291. }
  292. }
  293. .value {
  294. color: fade(@white, 75);
  295. }
  296. }
  297. }
  298. }
  299. .pie-chart {
  300. position: absolute;
  301. width: 350px;
  302. height: 150px;
  303. top: 40px;
  304. right: 16px;
  305. }
  306. }
  307. .right {
  308. flex: 0 0 145px;
  309. .right-panel {
  310. width: 100%;
  311. height: 100%;
  312. .title {
  313. font-size: 12px;
  314. text-align: center;
  315. }
  316. .items {
  317. position: relative;
  318. &::before {
  319. content: " ";
  320. position: absolute;
  321. left: 50%;
  322. height: 94%;
  323. border-left: 1px dashed fade(@gray, 40);
  324. }
  325. display: flex;
  326. flex-direction: column;
  327. height: 100%;
  328. justify-content: space-evenly;
  329. .item {
  330. flex: 0 0 auto;
  331. }
  332. }
  333. }
  334. }
  335. }
  336. </style>