dj1.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. <template>
  2. <div class="dj-1">
  3. <div class="action-bar">
  4. <div class="selections mg-b-16">
  5. <div class="item" @click="tabSelect(0)" :class="{ active: tabIndex == 0 }">风机运行情况信息</div>
  6. <div class="item" @click="tabSelect(1)" :class="{ active: tabIndex == 1 }">风机日详细信息</div>
  7. <div class="item" @click="tabSelect(2)" :class="{ active: tabIndex == 2 }">风场玫瑰图</div>
  8. <div class="item" @click="tabSelect(3)" :class="{ active: tabIndex == 3 }">风机玫瑰图</div>
  9. <div class="item" @click="tabSelect(3)" :class="{ active: tabIndex == 4 }">风机切入切出分析</div>
  10. </div>
  11. <div class="query mg-b-16">
  12. <div class="query-items">
  13. <div class="query-item">
  14. <div class="lable">风场:</div>
  15. <div class="search-input">
  16. <el-select v-model="value1" clearable placeholder="请选择" popper-class="select">
  17. <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
  18. </el-select>
  19. </div>
  20. </div>
  21. <div class="query-item">
  22. <div class="lable">风机:</div>
  23. <div class="search-input">
  24. <el-select v-model="value2" multiple placeholder="请选择" popper-class="select">
  25. <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
  26. </el-select>
  27. </div>
  28. </div>
  29. <div class="query-item">
  30. <div class="lable">日期:</div>
  31. <div class="search-input">
  32. <el-date-picker v-model="value4" type="date" placeholder="选择日期" popper-class="date-select"> </el-date-picker>
  33. </div>
  34. </div>
  35. </div>
  36. <div class="query-actions">
  37. <button class="btn green">搜索</button>
  38. </div>
  39. </div>
  40. </div>
  41. <!-- tab2 -->
  42. <div v-if="tabIndex == 0" class="tab-1">
  43. <panel :title="'损失电量分析'" class="mg-b-16">
  44. <area-bar-chart :height="'23.1481vh'" />
  45. </panel>
  46. <panel :title="'电量'" class="mg-b-16">
  47. <multiple-bar-line-chart :height="'16.6667vh'" />
  48. </panel>
  49. <div class="table-info">
  50. <panel class="table-panel" :title="'当日报警记录'" :showLine="false">
  51. <Table :data="tableData" :canScroll="true" :height="'32.5vh'" />
  52. </panel>
  53. <panel class="table-panel" :title="'当日报警记录'" :showLine="false">
  54. <Table :data="tableData" :canScroll="true" :height="'32.5vh'" />
  55. </panel>
  56. <panel class="table-panel" :title="'当日报警记录'" :showLine="false">
  57. <Table :data="tableData" :canScroll="true" :height="'32.5vh'" />
  58. </panel>
  59. </div>
  60. </div>
  61. <!-- tab2 -->
  62. <div v-if="tabIndex == 1" class="tab-2">
  63. <el-row>
  64. <el-col :span="15">
  65. <panel :title="'功率曲线'" class="mg-b-16">
  66. <marker-line-chart :height="'28vh'" />
  67. </panel>
  68. <panel :title="'日发电量信息'" class="mg-b-16 outline" :showLine="false">
  69. <div class="power-info">
  70. <div class="info-item" v-for="index in 20" :key="index">
  71. <div class="text">设备可利用率:</div>
  72. <div class="value green">115.01</div>
  73. </div>
  74. </div>
  75. </panel>
  76. <div class="month-info">
  77. <div class="month-info-left">
  78. <panel :title="'月发电量信息'" class="mg-b-16 outline" :showLine="false">
  79. <div class="power-info month-3">
  80. <div class="info-item" v-for="index in 15" :key="index">
  81. <div class="text">月实际/保证:</div>
  82. <div class="value green">115.01</div>
  83. </div>
  84. </div>
  85. </panel>
  86. </div>
  87. <div class="month-info-right">
  88. <panel :title="'月发电量信息'" class="mg-b-16 outline" :showLine="false">
  89. <div class="power-info month-2">
  90. <div class="info-item" v-for="index in 2" :key="index">
  91. <div class="text">月实际/保证:</div>
  92. <div class="value green">115.01</div>
  93. </div>
  94. </div>
  95. </panel>
  96. <panel :title="'风资源'" class="radar-panel" :icon="'svg-wind-site'">
  97. <div class="wind-info">
  98. <div class="legend mg-r-16">
  99. <span class="dot"></span>
  100. <span>静风频率为2</span>
  101. </div>
  102. <direction-radar-chart :width="'60%'" :height="'180px'" />
  103. </div>
  104. </panel>
  105. </div>
  106. </div>
  107. </el-col>
  108. <el-col :span="9">
  109. <panel class="table-panel outline mg-b-16" :title="'当日报警记录'" :showLine="false">
  110. <Table :data="tableData" :canScroll="true" :height="'23vh'" />
  111. </panel>
  112. <panel class="table-panel outline mg-b-16" :title="'当日报警记录'" :showLine="false">
  113. <Table :data="tableData" :canScroll="true" :height="'23vh'" />
  114. </panel>
  115. <panel class="table-panel outline" :title="'当日报警记录'" :showLine="false">
  116. <Table :data="tableData" :canScroll="true" :height="'23vh'" />
  117. </panel>
  118. </el-col>
  119. </el-row>
  120. </div>
  121. <div v-if="tabIndex == 2" class="tab-3">
  122. <el-row>
  123. <el-col :span="8">
  124. <panel :title="'日最大风速'" class="radar-panel" :icon="'svg-wind-site'">
  125. <div class="wind-info">
  126. <div class="legend mg-r-16">
  127. <span class="dot"></span>
  128. <span>静风频率为2</span>
  129. </div>
  130. <direction-radar-chart :width="'100%'" :height="'350px'" />
  131. </div>
  132. </panel>
  133. </el-col>
  134. <el-col :span="8">
  135. <panel :title="'日最大风速'" class="radar-panel" :icon="'svg-wind-site'">
  136. <div class="wind-info">
  137. <div class="legend mg-r-16">
  138. <span class="dot"></span>
  139. <span>静风频率为2</span>
  140. </div>
  141. <direction-radar-chart :width="'100%'" :height="'350px'" />
  142. </div>
  143. </panel>
  144. </el-col>
  145. <el-col :span="8">
  146. <panel :title="'日最大风速'" class="radar-panel" :icon="'svg-wind-site'">
  147. <div class="wind-info">
  148. <div class="legend mg-r-16">
  149. <span class="dot"></span>
  150. <span>静风频率为2</span>
  151. </div>
  152. <direction-radar-chart :width="'100%'" :height="'350px'" />
  153. </div>
  154. </panel>
  155. </el-col>
  156. </el-row>
  157. <el-row>
  158. <el-col :span="8">
  159. <panel :title="'日最大风速'" class="radar-panel" :icon="'svg-wind-site'">
  160. <div class="wind-info">
  161. <div class="legend mg-r-16">
  162. <span class="dot"></span>
  163. <span>静风频率为2</span>
  164. </div>
  165. <direction-radar-chart :width="'100%'" :height="'350px'" />
  166. </div>
  167. </panel>
  168. </el-col>
  169. <el-col :span="8">
  170. <panel :title="'日最大风速'" class="radar-panel" :icon="'svg-wind-site'">
  171. <div class="wind-info">
  172. <div class="legend mg-r-16">
  173. <span class="dot"></span>
  174. <span>静风频率为2</span>
  175. </div>
  176. <direction-radar-chart :width="'100%'" :height="'350px'" />
  177. </div>
  178. </panel>
  179. </el-col>
  180. <el-col :span="8">
  181. <panel :title="'日最大风速'" class="radar-panel" :icon="'svg-wind-site'">
  182. <div class="wind-info">
  183. <div class="legend mg-r-16">
  184. <span class="dot"></span>
  185. <span>静风频率为2</span>
  186. </div>
  187. <direction-radar-chart :width="'100%'" :height="'350px'" />
  188. </div>
  189. </panel>
  190. </el-col>
  191. </el-row>
  192. </div>
  193. <div v-if="tabIndex == 3" class="tab-4">
  194. <el-row>
  195. <el-col :span="8">
  196. <panel title="日度损失电量分析">
  197. <dual-pie-chart height="350px" />
  198. </panel>
  199. </el-col>
  200. <el-col :span="8">
  201. <panel title="日度损失电量分析">
  202. <dual-pie-chart height="350px" />
  203. </panel>
  204. </el-col>
  205. <el-col :span="8">
  206. <panel title="日度损失电量分析">
  207. <dual-pie-chart height="350px" />
  208. </panel>
  209. </el-col>
  210. </el-row>
  211. <el-row>
  212. <el-col :span="8">
  213. <panel title="日度损失电量分析">
  214. <dual-pie-chart height="350px" />
  215. </panel>
  216. </el-col>
  217. <el-col :span="8">
  218. <panel title="日度损失电量分析">
  219. <dual-pie-chart height="350px" />
  220. </panel>
  221. </el-col>
  222. <el-col :span="8">
  223. <panel title="日度损失电量分析">
  224. <dual-pie-chart height="350px" />
  225. </panel>
  226. </el-col>
  227. </el-row>
  228. </div>
  229. </div>
  230. </template>
  231. <script>
  232. import AreaBarChart from "../../components/chart/combination/area-bar-chart.vue";
  233. import MultipleBarLineChart from "../../components/chart/combination/multiple-bar-line-chart.vue";
  234. import MarkerLineChart from "../../components/chart/line/marker-line-chart.vue";
  235. import DualPieChart from "../../components/chart/pie/dual-pie-chart.vue";
  236. import DirectionRadarChart from "../../components/chart/radar/direction-radar-chart.vue";
  237. import panel from "../../components/coms/panel/panel.vue";
  238. import Table from "../../components/coms/table/table.vue";
  239. export default {
  240. components: { panel, AreaBarChart, MultipleBarLineChart, Table, MarkerLineChart, DirectionRadarChart, DualPieChart },
  241. setup() {},
  242. data() {
  243. return {
  244. tabIndex: 0,
  245. tableData: {
  246. column: [
  247. {
  248. name: "风机",
  249. field: "name",
  250. is_num: false,
  251. is_light: false,
  252. },
  253. {
  254. name: "描述",
  255. field: "desc",
  256. is_num: false,
  257. is_light: false,
  258. },
  259. {
  260. name: "报警时间",
  261. field: "date",
  262. is_num: false,
  263. is_light: false,
  264. },
  265. ],
  266. data: [
  267. {
  268. name: "MG01-01",
  269. desc: "描述描述描述描述描述描述描述描述描述描述",
  270. date: "2020-01-01",
  271. },
  272. ],
  273. },
  274. options: [
  275. {
  276. value: "选项1",
  277. label: "黄金糕",
  278. },
  279. {
  280. value: "选项2",
  281. label: "双皮奶",
  282. },
  283. {
  284. value: "选项3",
  285. label: "蚵仔煎",
  286. },
  287. {
  288. value: "选项4",
  289. label: "龙须面",
  290. },
  291. {
  292. value: "选项5",
  293. label: "北京烤鸭",
  294. },
  295. ],
  296. value1: [],
  297. value2: [],
  298. value3: [],
  299. value4: "",
  300. value5: "",
  301. };
  302. },
  303. methods: {
  304. tabSelect(state) {
  305. this.tabIndex = state;
  306. },
  307. },
  308. created() {
  309. for (let i = 1; i < 50; i++) {
  310. this.tableData.data.push(JSON.parse(JSON.stringify(this.tableData.data[0])));
  311. }
  312. },
  313. };
  314. </script>
  315. <style lang="less">
  316. .dj-1 {
  317. .action-bar {
  318. display: flex;
  319. .selections {
  320. flex: 1 0 auto;
  321. display: flex;
  322. .item {
  323. flex: 0 0 164px;
  324. text-align: center;
  325. height: 33px;
  326. line-height: 33px;
  327. margin-right: 8px;
  328. color: @font-color;
  329. font-size: @fontsize-s;
  330. background: fade(@gray, 20);
  331. border: 1px solid fade(@gray, 20);
  332. &:hover,
  333. &.active {
  334. background: fade(@green, 20);
  335. border: 1px solid @green;
  336. color: @green;
  337. cursor: pointer;
  338. }
  339. }
  340. }
  341. }
  342. .outline {
  343. outline: 1px solid fade(@gray, 50);
  344. }
  345. .com-panel .panel-header {
  346. margin-bottom: 0px;
  347. }
  348. .table-info {
  349. display: flex;
  350. .table-panel {
  351. flex: 1 0 calc(100% / 3 - 8px);
  352. outline: 1px solid fade(@gray, 50);
  353. height: 100%;
  354. & + .table-panel {
  355. margin-left: 8px;
  356. }
  357. }
  358. }
  359. .tab-2 {
  360. .power-info {
  361. display: flex;
  362. flex-wrap: wrap;
  363. justify-content: space-between;
  364. &.month-3 {
  365. .info-item {
  366. flex: 0 0 calc(100% / 3 - 6px);
  367. &:nth-child(-n + 5) {
  368. margin-top: 8px;
  369. }
  370. &:nth-child(-n + 3) {
  371. margin-top: 0px;
  372. }
  373. }
  374. }
  375. &.month-2 {
  376. .info-item {
  377. flex: 0 0 calc(100% / 2 - 4px);
  378. &:nth-child(-n + 5) {
  379. margin-top: 8px;
  380. }
  381. &:nth-child(-n + 2) {
  382. margin-top: 0px;
  383. }
  384. }
  385. }
  386. .info-item {
  387. display: flex;
  388. align-items: center;
  389. flex: 0 0 calc(100% / 5 - 8px);
  390. background: fade(@gray, 20);
  391. height: 4.6296vh;
  392. line-height: 4.6296vh;
  393. margin-top: 8px;
  394. &:nth-child(-n + 5) {
  395. margin-top: 0px;
  396. }
  397. .text {
  398. font-size: 12px;
  399. flex: 0 0 110px;
  400. text-align: right;
  401. margin-right: 24px;
  402. color: @gray-l;
  403. }
  404. .value {
  405. font-size: 16px;
  406. }
  407. }
  408. }
  409. .month-info {
  410. display: flex;
  411. .month-info-left {
  412. flex: 0 0 705px;
  413. margin-right: 10px;
  414. }
  415. .month-info-right {
  416. flex: 1 0 auto;
  417. }
  418. }
  419. .moon-other {
  420. flex: 1 0 auto;
  421. }
  422. .radar-panel {
  423. height: 20.5vh;
  424. .panel-body {
  425. height: 100%;
  426. }
  427. }
  428. .wind-info {
  429. display: flex;
  430. .legend {
  431. font-size: 12px;
  432. flex: 0 0 140px;
  433. height: 20px;
  434. display: flex;
  435. align-items: center;
  436. justify-content: center;
  437. margin-top: 32px;
  438. margin-bottom: 16px;
  439. .dot {
  440. width: 7px;
  441. height: 7px;
  442. background: @green;
  443. display: inline-block;
  444. margin-right: 8px;
  445. }
  446. }
  447. }
  448. }
  449. .tab-3 {
  450. .wind-info {
  451. position: relative;
  452. .legend {
  453. position: absolute;
  454. left: 32px;
  455. top: 32px;
  456. font-size: 12px;
  457. flex: 0 0 140px;
  458. height: 20px;
  459. display: flex;
  460. align-items: center;
  461. justify-content: center;
  462. margin-top: 32px;
  463. margin-bottom: 16px;
  464. .dot {
  465. width: 7px;
  466. height: 7px;
  467. background: @green;
  468. display: inline-block;
  469. margin-right: 8px;
  470. }
  471. }
  472. }
  473. }
  474. .tab-4 {
  475. .panel-body {
  476. padding: 16px;
  477. }
  478. }
  479. }
  480. </style>