index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  1. <template>
  2. <div class="app-container">
  3. <div class="topBanner">
  4. <div class="topLogo"></div>
  5. <div v-if="status == '4'" class="topStatus b-disable">
  6. <div class="textStatus">
  7. 离 线 运 行
  8. </div>
  9. </div>
  10. <div v-if="status == '1'" class="topStatus b-running">
  11. <div class="textStatus">
  12. 日 前 调 度
  13. </div>
  14. </div>
  15. <div v-if="status == '2'" class="topStatus b-running">
  16. <div class="textStatus">
  17. 实 时 调 度
  18. </div>
  19. </div>
  20. <div v-if="status == '3'" class="topStatus b-running">
  21. <div class="textStatus">
  22. 完 全 运 行
  23. </div>
  24. </div>
  25. <div v-if="status == '0'" class="topStatus b-stop">
  26. <div class="textStatus">
  27. 停 止 运 行
  28. </div>
  29. </div>
  30. <div class="crumb left33">
  31. <div class="textCrumb" onclick="window.open('/#/rqdd','_self')">
  32. 日前调度监控
  33. </div>
  34. </div>
  35. <div class="partition" style="left: 43%"/>
  36. <div class="crumb left44">
  37. <div class="textCrumb" onclick="window.open('/#/ssddjk','_self')">
  38. 实时调度监控
  39. </div>
  40. </div>
  41. <div class="partition" style="left: 54%"/>
  42. <div class="crumb left55">
  43. <div class="textCrumb1" onclick="window.open('/#/xtpz','_self')">
  44. 系统配置与日志
  45. </div>
  46. </div>
  47. <div class="partition" style="left: 65%"/>
  48. <div class="crumb-c" style="left: 66%">
  49. <div class="textCrumb-c" @click="showDialog()">
  50. 虚拟电厂指令切换
  51. </div>
  52. </div>
  53. <div style="position: absolute;right: 19%;top: 8px">
  54. <img alt="" src="../ssddjk/img/返回首页.png" @click="logout">
  55. </div>
  56. </div>
  57. <div class="main-container">
  58. <div class="main-card">
  59. <div class="barBox">
  60. <div class="barTitle">
  61. 信息总览
  62. </div>
  63. <LeftTop/>
  64. </div>
  65. <div class="barBox1">
  66. <div class="barTitle">
  67. 告警信息
  68. </div>
  69. <CenterTop/>
  70. </div>
  71. <div class="barBox">
  72. <div class="barTitle">
  73. 风电发电功率
  74. </div>
  75. <RightTop/>
  76. </div>
  77. </div>
  78. <div class="main-card">
  79. <div class="barBox">
  80. <div class="barTitle">
  81. 负荷用电功率
  82. </div>
  83. <LeftMiddle/>
  84. </div>
  85. <div class="barBox">
  86. <div class="barTitle">
  87. 联络线信息
  88. </div>
  89. <CenterMiddle/>
  90. </div>
  91. <div class="barBox">
  92. <div class="barTitle">
  93. 光伏发电功率
  94. </div>
  95. <RightMiddle/>
  96. </div>
  97. </div>
  98. <div class="main-card">
  99. <div class="barBox">
  100. <div class="barTitle">
  101. 储能发电/用电功率
  102. </div>
  103. <LeftBottom/>
  104. </div>
  105. <div class="barBox">
  106. <div class="barTitle">
  107. 断面信息
  108. </div>
  109. <CenterBottom/>
  110. </div>
  111. <div class="barBox">
  112. <div class="barTitle">
  113. 火电发电功率
  114. </div>
  115. <RightBottom/>
  116. </div>
  117. </div>
  118. </div>
  119. <!-- 指令切换弹框 -->
  120. <div v-if="dialogShow" class="dialogInfoBg">
  121. <!-- 弹框头 -->
  122. <div class="rightTitleTextBg">
  123. <div class="rightMainTitle">
  124. <span>{{ dialogTitle }}</span>
  125. <div @click="dialogShow = false"/>
  126. </div>
  127. </div>
  128. <!-- 弹框主体 -->
  129. <div style="height: 150px">
  130. <el-radio-group v-model="selected">
  131. <table id="radioTable">
  132. <tr v-if="status=='4'">
  133. <td>
  134. <el-radio label="1">在线运行:日前调度</el-radio>
  135. </td>
  136. <td>
  137. <el-radio label="2">在线运行:实时调度</el-radio>
  138. </td>
  139. </tr>
  140. <tr v-if="status=='4'">
  141. <td>
  142. <el-radio label="3">在线运行:完全</el-radio>
  143. </td>
  144. <td>
  145. <el-radio label="0">停止运行</el-radio>
  146. </td>
  147. </tr>
  148. <tr v-if="status=='4'">
  149. <td>
  150. <el-radio label="4">离线状态</el-radio>
  151. </td>
  152. </tr>
  153. <tr v-if="status=='1' || status=='2'">
  154. <td>
  155. <el-radio label="4">离线状态</el-radio>
  156. </td>
  157. <td>
  158. <el-radio label="3">在线运行:完全</el-radio>
  159. </td>
  160. </tr>
  161. <tr v-if="status=='3'">
  162. <td>
  163. <el-radio label="4">离线状态</el-radio>
  164. </td>
  165. </tr>
  166. <tr v-if="status=='0'">
  167. <td>
  168. <el-radio label="4">离线状态</el-radio>
  169. </td>
  170. </tr>
  171. </table>
  172. </el-radio-group>
  173. </div>
  174. <el-divider></el-divider>
  175. <div style="position: absolute;margin-left: 135px;margin-top: 20px">
  176. <el-button type="primary" @click="confirm">确 认</el-button>
  177. <el-button type="info" @click="cancel">取 消</el-button>
  178. </div>
  179. </div>
  180. </div>
  181. </template>
  182. <script>
  183. import LeftTop from "./modules/left-top"
  184. import LeftMiddle from "./modules/left-middle"
  185. import LeftBottom from "./modules/left-bottom"
  186. import CenterTop from "./modules/center-top"
  187. import CenterMiddle from "./modules/center-middle"
  188. import CenterBottom from "./modules/center-bottom"
  189. import RightTop from "./modules/right-top"
  190. import RightMiddle from "./modules/right-middle"
  191. import RightBottom from "./modules/right-bottom"
  192. import {addCommand, listCommandRunType} from "@/api/vpp/type";
  193. export default {
  194. components: {
  195. LeftTop,
  196. LeftMiddle,
  197. LeftBottom,
  198. CenterTop,
  199. CenterMiddle,
  200. CenterBottom,
  201. RightTop,
  202. RightMiddle,
  203. RightBottom,
  204. },
  205. data() {
  206. return {
  207. status: '',
  208. dialogTitle: '虚拟电厂指令切换',
  209. dialogShow: false,
  210. selected: null,
  211. table: {
  212. status: ''
  213. }
  214. }
  215. },
  216. /*created() {
  217. this.listCommandRunType()
  218. },*/
  219. mounted() {
  220. this.listCommandRunType()
  221. },
  222. methods: {
  223. listCommandRunType() {
  224. listCommandRunType().then(response => {
  225. if (response.rows.length > 0) {
  226. this.status = response.rows[0].status
  227. }
  228. })
  229. },
  230. showDialog() {
  231. this.selected = null
  232. this.dialogShow = true
  233. },
  234. confirm() {
  235. if (this.selected) {
  236. this.$confirm('确认执行所选指令操作?', '提示', {
  237. confirmButtonText: '确定',
  238. cancelButtonText: '取消',
  239. type: 'warning'
  240. }).then(() => {
  241. this.table.status = this.selected
  242. addCommand(this.table).then(response => {
  243. this.$message({
  244. type: 'success',
  245. message: '操作成功'
  246. });
  247. this.listCommandRunType()
  248. this.dialogShow = false
  249. });
  250. }).catch(() => {
  251. })
  252. }
  253. },
  254. cancel() {
  255. this.dialogShow = false
  256. },
  257. async logout() {
  258. this.$confirm('确定注销并退出系统吗?', '提示', {
  259. confirmButtonText: '确定',
  260. cancelButtonText: '取消',
  261. type: 'warning'
  262. }).then(() => {
  263. this.$store.dispatch('LogOut').then(() => {
  264. location.href = '/index';
  265. })
  266. }).catch(() => {
  267. });
  268. }
  269. }
  270. }
  271. </script>
  272. <style scoped>
  273. .topStatus {
  274. position: absolute;
  275. left: 19.5%;
  276. width: 179px;
  277. height: 42px;
  278. display: flex;
  279. background-size: 100% 100%;
  280. }
  281. .b-disable {
  282. background-image: url('../../../assets/vpp/images/b-disable.png')
  283. }
  284. .b-running {
  285. background-image: url('../../../assets/vpp/images/b-running.png')
  286. }
  287. .b-stop {
  288. background-image: url('../../../assets/vpp/images/b-stop.png')
  289. }
  290. .textStatus {
  291. display: flex;
  292. align-items: center;
  293. margin-left: 24%;
  294. font-size: 18px;
  295. font-weight: bold;
  296. text-shadow: 0 0 5px #fff, 0 1px 2px rgba(0, 0, 0, 1);
  297. }
  298. .crumb {
  299. position: absolute;
  300. top: 5px;
  301. width: 182px;
  302. height: 42px;
  303. display: flex;
  304. background-size: 100% 100%;
  305. background-image: url('../../../assets/vpp/images/crumb.png');
  306. }
  307. #radioTable td {
  308. height: 50px;
  309. text-align: left;
  310. }
  311. .left33 {
  312. left: 33%;
  313. }
  314. .left44 {
  315. left: 44%;
  316. }
  317. .left55 {
  318. left: 55%;
  319. }
  320. .textCrumb {
  321. display: flex;
  322. /*align-items: center;*/
  323. margin-left: 20%;
  324. margin-top: 2.5%;
  325. font-size: 18px;
  326. font-weight: bold;
  327. }
  328. .textCrumb1 {
  329. display: flex;
  330. /*align-items: center;*/
  331. margin-left: 16.5%;
  332. margin-top: 2.5%;
  333. font-size: 18px;
  334. font-weight: bold;
  335. }
  336. .crumb-c {
  337. position: absolute;
  338. top: 5px;
  339. width: 222px;
  340. height: 42px;
  341. display: flex;
  342. background-size: 100% 100%;
  343. background-image: url('../../../assets/vpp/images/crumb-c.png');
  344. }
  345. .textCrumb-c {
  346. display: flex;
  347. /*align-items: center;*/
  348. margin-left: 18%;
  349. margin-top: 2.5%;
  350. font-size: 18px;
  351. font-weight: bold;
  352. color: aqua;
  353. cursor: pointer;
  354. }
  355. .userHead {
  356. position: absolute;
  357. right: 15.5%;
  358. margin-top: 0.2%;
  359. }
  360. .userName {
  361. text-align: left;
  362. position: absolute;
  363. right: 10%;
  364. margin-top: 0.2%;
  365. }
  366. .split {
  367. position: absolute;
  368. right: 9.2%;
  369. margin-top: 0.2%;
  370. }
  371. .userDept {
  372. text-align: left;
  373. position: absolute;
  374. right: 2%;
  375. margin-top: 0.5%;
  376. font-size: 22px;
  377. }
  378. .partition {
  379. position: absolute;
  380. top: 7px;
  381. width: 17px;
  382. height: 35px;
  383. display: flex;
  384. background-size: 100% 100%;
  385. background-image: url('../../../assets/vpp/images/partition.png');
  386. }
  387. .barBox1 {
  388. height: 100%;
  389. width: 100%;
  390. display: flex;
  391. flex-direction: column;
  392. background: url(../../../assets/vpp/images/bg/bg-bar1.png) -2px -1px no-repeat;
  393. margin-right: 1%;
  394. }
  395. .dialogInfoBg {
  396. background: url(../../../assets/vpp/images/dialog/bg.png) 100% no-repeat;
  397. background-size: 100% 100%;
  398. padding: 1%;
  399. width: 30%;
  400. height: 320px;
  401. position: absolute;
  402. top: 30%;
  403. left: 34%;
  404. }
  405. .rightTitleTextBg {
  406. height: 28%;
  407. background-size: 100% 100%;
  408. background: url(../../../assets/vpp/images/dialog/t-line.png) no-repeat center;
  409. }
  410. .rightMainTitle {
  411. color: rgb(255, 255, 255);
  412. font-size: 18px;
  413. font-weight: 550;
  414. /*font-style: italic;*/
  415. text-shadow: 0 0 5px #fff, 0 1px 2px rgba(0, 0, 0, 1);
  416. margin-left: 36.5%;
  417. position: relative;
  418. top: 0;
  419. display: flex;
  420. justify-content: space-between;
  421. }
  422. /deep/ .el-divider--horizontal {
  423. margin: 20px auto 0;
  424. background: 0 0;
  425. border-top: 1px dashed #767676;
  426. width: 90%;
  427. text-align: center;
  428. }
  429. /deep/ .el-button--primary {
  430. background: url(../../../assets/vpp/images/dialog/b-confirm.png) no-repeat center !important;
  431. color: white !important;
  432. font-size: 20px;
  433. font-weight: bold;
  434. width: 145px;
  435. height: 42px;
  436. border-color: transparent;
  437. }
  438. /deep/ .el-button--info {
  439. background: url(../../../assets/vpp/images/dialog/b-cancel.png) no-repeat center !important;
  440. color: #FFFFFF !important;
  441. font-size: 20px;
  442. font-weight: bold;
  443. width: 145px;
  444. height: 42px;
  445. border-color: transparent;
  446. }
  447. /deep/ .el-radio__input.is-checked + .el-radio__label {
  448. color: #FFFFFF;
  449. }
  450. /deep/ .el-radio__input.is-checked .el-radio__inner {
  451. border-color: #40ffff;
  452. background: transparent;
  453. }
  454. /deep/ .el-radio__inner {
  455. border: 2px solid rgba(242, 242, 242, 0.45);
  456. border-radius: 100%;
  457. width: 18px;
  458. height: 18px;
  459. background-color: transparent;
  460. cursor: pointer;
  461. box-sizing: border-box;
  462. }
  463. /deep/ .el-radio__inner::after {
  464. width: 8px;
  465. height: 8px;
  466. border-radius: 100%;
  467. background-color: #40ffff;
  468. content: "";
  469. position: absolute;
  470. left: 50%;
  471. top: 50%;
  472. transform: translate(-50%, -50%) scale(0);
  473. transition: transform .15s ease-in;
  474. }
  475. /deep/ .el-radio__input {
  476. white-space: nowrap;
  477. cursor: pointer;
  478. outline: 0;
  479. line-height: 1;
  480. vertical-align: middle;
  481. }
  482. /deep/ .el-radio-button__inner {
  483. width: 100% !important;
  484. padding-left: 0 !important;
  485. padding-right: 0 !important;
  486. text-align: left;
  487. }
  488. /deep/ .el-radio__label {
  489. padding-left: 10px;
  490. font-size: 20px;
  491. font-weight: 500;
  492. vertical-align: middle;
  493. }
  494. /deep/ .el-radio {
  495. color: #ffffff;
  496. line-height: 1;
  497. cursor: pointer;
  498. white-space: nowrap;
  499. outline: 0;
  500. margin-right: 30px;
  501. }
  502. /deep/ .el-radio-group {
  503. margin-left: calc(6vh);
  504. }
  505. </style>