agc-panel.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  1. <template>
  2. <div class="dark-grid">
  3. <div
  4. class="grid-content"
  5. style="width: 443px"
  6. :class="{
  7. activeError: data?.agc009 == 1,
  8. flash: data?.add,
  9. }"
  10. @click="handleMousenter"
  11. >
  12. <ul>
  13. <li class="agc_title">
  14. <p>
  15. <span>{{ data?.wpname || "---" }}</span>
  16. <i
  17. style="cursor: pointer"
  18. class="svg-icon svg-icon-sm svg-icon-green"
  19. @click="handleClick(data)"
  20. >
  21. <SvgIcon svgid="svg-line"></SvgIcon>
  22. </i>
  23. </p>
  24. <p class="agc_name" :class="{ activeBaC: data?.agc009 == 1 }"></p>
  25. </li>
  26. <li class="agc_content">
  27. <div>
  28. <p>
  29. 有功设定限值<span class="agc_val">{{
  30. (data?.agc002 / 1000).toFixed(2) || "--"
  31. }}</span
  32. ><span class="agc_units">MW</span>
  33. </p>
  34. <p class="pw_val">
  35. 出线功率
  36. <span
  37. class="agc_val agc_ch"
  38. :class="{
  39. activeChao: Number(data?.agc001) > Number(data?.agc002),
  40. activeXiao: Number(data?.agc001) < Number(data?.agc002),
  41. }"
  42. >{{ (data?.agc001 / 1000).toFixed(2) || "--" }}</span
  43. ><span class="agc_unit">MW</span>
  44. </p>
  45. </div>
  46. <div>
  47. <p>
  48. AGC可调上限<span class="agc_val">{{
  49. (data?.agc003 / 1000).toFixed(2) || "--"
  50. }}</span
  51. ><span class="agc_units">MW</span>
  52. </p>
  53. <p>
  54. 理论功率<span class="agc_val">{{
  55. (data?.agc010 / 1000).toFixed(2) || "--"
  56. }}</span
  57. ><span class="agc_unit">MW</span>
  58. </p>
  59. </div>
  60. <div>
  61. <p>
  62. AGC可调下限<span class="agc_val">{{
  63. (data?.agc004 / 1000).toFixed(2) || "--"
  64. }}</span
  65. ><span class="agc_units">MW</span>
  66. </p>
  67. <p>
  68. 预测功率<span class="agc_val">{{
  69. (data?.ycgl / 1000).toFixed(2) || "--"
  70. }}</span
  71. ><span class="agc_unit">MW</span>
  72. </p>
  73. </div>
  74. </li>
  75. <li class="agc_footer">
  76. <!-- 1红其他绿 -->
  77. <div>
  78. <img src="@assets/imgs/zhaung.png" v-if="data?.agc006 == 1" />
  79. <img src="@assets/imgs/zheng.png" v-else />
  80. <p>AGC投入</p>
  81. </div>
  82. <div>
  83. <img src="@assets/imgs/zhaung.png" v-if="data?.agc005 == 1" />
  84. <img src="@assets/imgs/zheng.png" v-else />
  85. <p>AGC远方</p>
  86. </div>
  87. <div>
  88. <img src="@assets/imgs/zhaung.png" v-if="data?.agc008 == 1" />
  89. <img src="@assets/imgs/zheng.png" v-else />
  90. <p>有功增闭锁</p>
  91. </div>
  92. <div>
  93. <img src="@assets/imgs/zhaung.png" v-if="data?.agc007 == 1" />
  94. <img src="@assets/imgs/zheng.png" v-else />
  95. <p>有功减闭锁</p>
  96. </div>
  97. </li>
  98. </ul>
  99. <qushi-dialog ref="child"></qushi-dialog>
  100. </div>
  101. </div>
  102. </template>
  103. <script>
  104. import qushiDialog from "@/components/qushi/qushiDialog.vue";
  105. import { deepClone } from "@/utills/func.js";
  106. import SvgIcon from "@/components/coms/icon/svg-icon.vue";
  107. export default {
  108. // 名称
  109. name: "AgcPanel",
  110. // 使用组件
  111. components: {
  112. SvgIcon,
  113. qushiDialog,
  114. },
  115. // 传入参数
  116. props: {
  117. obj: Object,
  118. },
  119. // 数据
  120. data() {
  121. return {
  122. dialogVisible: false,
  123. stse: [
  124. {
  125. statiomName: "预测功率",
  126. stse: "BDSAMC",
  127. sts: "FCFGDQDT0001",
  128. },
  129. {
  130. statiomName: "有功设定限值",
  131. stse: "BDSAMC",
  132. sts: "AGC002",
  133. },
  134. {
  135. statiomName: "出线功率",
  136. stse: "BDSAMC",
  137. sts: "AGC001",
  138. },
  139. {
  140. statiomName: "理论功率",
  141. stse: "BDSAMC",
  142. sts: "AGC010",
  143. },
  144. ],
  145. data: {},
  146. };
  147. },
  148. created() {
  149. this.data = this.obj;
  150. },
  151. // 函数
  152. methods: {
  153. deepClone,
  154. handleClick(item) {
  155. let y = this.deepClone(this.stse);
  156. y?.forEach((val) => {
  157. val.stse = item.wpname;
  158. });
  159. this.$refs.child.openCurvDatas(y, 4, item.wpid);
  160. },
  161. handleMousenter() {
  162. this.data.add = false;
  163. },
  164. },
  165. };
  166. </script>
  167. <style lang="less" scoped>
  168. .unitChart {
  169. font-size: 12px;
  170. margin-top: 3px;
  171. }
  172. .panel-table {
  173. width: 100%;
  174. .data-item {
  175. background-color: fade(@gray, 20);
  176. padding: 0.278vh;
  177. padding-left: 0.7407vh;
  178. font-size: 1.204vh;
  179. display: flex;
  180. flex-direction: row;
  181. .data-item-name {
  182. color: @gray;
  183. }
  184. .data-item-count {
  185. color: @green;
  186. margin-left: auto;
  187. margin-right: 0.556vh;
  188. }
  189. .data-item-unit {
  190. color: @gray;
  191. }
  192. .data-item-icon {
  193. margin: auto;
  194. margin-right: 0;
  195. font-size: @fontsize-s;
  196. }
  197. }
  198. }
  199. .green {
  200. color: @green;
  201. }
  202. .red {
  203. color: @red;
  204. }
  205. ul,
  206. ul li,
  207. p {
  208. margin: 0;
  209. padding: 0;
  210. list-style: none;
  211. }
  212. .light-grid {
  213. .grid-content {
  214. height: 227px;
  215. background: #fff;
  216. border-radius: 8px;
  217. margin-bottom: 10px;
  218. .agc_title {
  219. position: relative;
  220. padding: 11px 0 8px 16px;
  221. display: flex;
  222. .agc_name {
  223. width: 35px;
  224. height: 35px;
  225. position: absolute;
  226. right: -1px;
  227. top: -1px;
  228. border-radius: 8px;
  229. background: linear-gradient(
  230. to right top,
  231. rgba(5, 148, 60, 0),
  232. rgba(5, 148, 60, 0),
  233. rgba(5, 148, 60, 0.5)
  234. );
  235. }
  236. .activeBaC {
  237. background: linear-gradient(
  238. to right top,
  239. rgba(5, 148, 60, 0),
  240. rgba(251, 77, 0, 0),
  241. rgba(251, 77, 0, 0.5)
  242. );
  243. }
  244. span {
  245. font-size: 16px;
  246. color: #36348e;
  247. font-weight: 700;
  248. }
  249. i {
  250. position: absolute;
  251. right: 15px;
  252. font-size: 20px;
  253. color: green;
  254. z-index: 1;
  255. }
  256. .activeImg {
  257. color: red;
  258. }
  259. }
  260. .agc_content {
  261. line-height: 37px;
  262. padding: 0 10px 0 20px;
  263. div {
  264. display: flex;
  265. justify-content: space-between;
  266. border-bottom: 1px solid rgba(72, 75, 83, 0.5);
  267. .pw_val {
  268. }
  269. > p:last-of-type {
  270. position: relative;
  271. left: -12px;
  272. width: 162px;
  273. }
  274. p {
  275. font-size: 14px;
  276. color: #606769;
  277. position: relative;
  278. font-weight: 700;
  279. .agc_unit {
  280. position: absolute;
  281. left: 140px;
  282. top: 1px;
  283. }
  284. .agc_units {
  285. position: absolute;
  286. left: 168px;
  287. top: 1px;
  288. }
  289. span {
  290. font-size: 12px;
  291. font-family: "SourceHanSansCN";
  292. color: #606769;
  293. position: relative;
  294. left: 18px;
  295. }
  296. .agc_val {
  297. font-family: "Arial";
  298. font-size: 14px;
  299. color: #36348e;
  300. }
  301. .agc_ch {
  302. position: absolute;
  303. left: 75px;
  304. }
  305. }
  306. }
  307. }
  308. .agc_footer {
  309. //width: 280px;
  310. text-align: center;
  311. margin-top: 13px;
  312. padding: 0 16px;
  313. display: flex;
  314. justify-content: space-between;
  315. img {
  316. width: 20px;
  317. height: 20px;
  318. }
  319. p {
  320. font-size: 14px;
  321. color: #606769;
  322. font-weight: 700;
  323. }
  324. i {
  325. display: inline-block;
  326. width: 10px;
  327. height: 10px;
  328. border-radius: 10px;
  329. }
  330. i.red {
  331. background: red;
  332. }
  333. i.green {
  334. background: green;
  335. }
  336. }
  337. }
  338. }
  339. .dark-grid {
  340. .grid-content {
  341. height: 227px;
  342. background: rgba(30, 37, 36, 0.45);
  343. border-radius: 8px;
  344. margin-bottom: 10px;
  345. &.activeError {
  346. box-shadow: 0 0 14px #f00 inset;
  347. }
  348. @keyframes twinkle {
  349. from {
  350. box-shadow: 0 0 14px #f00 inset;
  351. }
  352. 50% {
  353. box-shadow: 0 0 14px transparent inset;
  354. }
  355. to {
  356. box-shadow: 0 0 14px #f00 inset;
  357. }
  358. }
  359. &.flash {
  360. animation: twinkle 1s;
  361. animation-iteration-count: infinite;
  362. }
  363. .agc_title {
  364. position: relative;
  365. padding: 11px 0 8px 16px;
  366. display: flex;
  367. .agc_name {
  368. width: 35px;
  369. height: 35px;
  370. position: absolute;
  371. right: -1px;
  372. top: -1px;
  373. border-radius: 8px;
  374. background: linear-gradient(
  375. to right top,
  376. rgba(5, 148, 60, 0),
  377. rgba(5, 148, 60, 0),
  378. rgba(5, 148, 60, 0.5)
  379. );
  380. }
  381. .activeBaC {
  382. background: transparent;
  383. }
  384. span {
  385. font-size: 14px;
  386. color: #b3b3b3;
  387. }
  388. i {
  389. position: absolute;
  390. right: 15px;
  391. font-size: 20px;
  392. color: green;
  393. z-index: 1;
  394. }
  395. .activeImg {
  396. color: red;
  397. }
  398. }
  399. .agc_content {
  400. line-height: 37px;
  401. padding: 0 10px 0 20px;
  402. div {
  403. display: flex;
  404. justify-content: space-between;
  405. border-bottom: 1px solid rgba(72, 75, 83, 0.5);
  406. .pw_val {
  407. .scs {
  408. position: absolute;
  409. left: 60px;
  410. top: 12px;
  411. }
  412. }
  413. > p:last-of-type {
  414. position: relative;
  415. left: -12px;
  416. width: 162px;
  417. }
  418. p {
  419. font-size: 14px;
  420. color: #949595;
  421. position: relative;
  422. .agc_unit {
  423. position: absolute;
  424. left: 140px;
  425. top: 1px;
  426. }
  427. .agc_units {
  428. position: absolute;
  429. left: 168px;
  430. top: 1px;
  431. }
  432. span {
  433. font-size: 12px;
  434. font-family: "SourceHanSansCN";
  435. color: #606769;
  436. position: relative;
  437. left: 18px;
  438. }
  439. .agc_val {
  440. font-family: "Arial";
  441. font-size: 14px;
  442. color: @green;
  443. }
  444. .agc_ch {
  445. position: absolute;
  446. left: 75px;
  447. }
  448. }
  449. }
  450. }
  451. .agc_footer {
  452. //width: 280px;
  453. text-align: center;
  454. margin-top: 13px;
  455. padding: 0 16px;
  456. display: flex;
  457. justify-content: space-between;
  458. img {
  459. width: 20px;
  460. height: 20px;
  461. }
  462. p {
  463. font-size: 14px;
  464. color: #b3b3b3;
  465. }
  466. i {
  467. display: inline-block;
  468. width: 10px;
  469. height: 10px;
  470. border-radius: 10px;
  471. }
  472. i.red {
  473. background: red;
  474. }
  475. i.green {
  476. background: green;
  477. }
  478. }
  479. }
  480. }
  481. </style>