CenterPage.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <div class="homePage">
  3. <div class="center-bar" style="height: 100%">
  4. <el-row :gutter="10" style="height: 100%">
  5. <el-col :span="8" style="padding-left: 0px">
  6. <ProblemArea ref="problempg" :problems="problems" />
  7. </el-col>
  8. <el-col :span="8" style="padding-left: 5px; padding-right: 5px">
  9. <el-row>
  10. <el-col :span="24">
  11. <ControlArea
  12. :windturbineList="windturbineList"
  13. ref="controlArea"
  14. :current="current"
  15. />
  16. </el-col>
  17. </el-row>
  18. <el-row>
  19. <el-col :span="24">
  20. <CheckArea />
  21. </el-col>
  22. </el-row>
  23. </el-col>
  24. <el-col :span="8">
  25. <el-row>
  26. <el-col :span="23">
  27. <ModeControl
  28. ref="modeControl"
  29. :current="current"
  30. @clicks="handleClick"
  31. ></ModeControl>
  32. </el-col>
  33. </el-row>
  34. <el-row>
  35. <el-col :span="23">
  36. <FocusArea />
  37. </el-col>
  38. </el-row>
  39. <el-row>
  40. <el-col :span="23">
  41. <WarningArea></WarningArea>
  42. </el-col>
  43. </el-row>
  44. </el-col>
  45. </el-row>
  46. <!-- <WindturbineDetailPages v-model="dialogVisible"></WindturbineDetailPages> -->
  47. </div>
  48. </div>
  49. </template>
  50. <script>
  51. // @ is an alias to /src
  52. import MessageBridge from "utils/MessageBridge";
  53. import ProblemArea from "components/problem/ProblemArea.vue";
  54. import ControlArea from "components/control/controlArea.vue";
  55. import CheckArea from "components/check/checkArea.vue";
  56. import ModeControl from "components/modeControl/modeControl.vue";
  57. import FocusArea from "components/focus/focusArea.vue";
  58. import WarningArea from "components/warning/warningArea.vue";
  59. import { debounce } from "lodash";
  60. export default {
  61. name: "Home",
  62. components: {
  63. ProblemArea,
  64. ControlArea,
  65. CheckArea,
  66. ModeControl,
  67. FocusArea,
  68. WarningArea,
  69. },
  70. created() {},
  71. data() {
  72. return {
  73. url: process.env.VUE_APP_SHARDINGURL,
  74. current: 1,
  75. windturbineList: "",
  76. };
  77. },
  78. mounted() {
  79. let start =
  80. 86400000 -
  81. (new Date().getTime() -
  82. new Date(new Date().toDateString() + " 3:00").getTime());
  83. setTimeout(() => {
  84. this.$router.go(0);
  85. }, start);
  86. const { current } = this.$route.query;
  87. current ? this.$store.commit("current", Number(current)) : "";
  88. this.current = current ? Number(current) : 1;
  89. this.$refs.controlArea.control(Number(current));
  90. },
  91. methods: {
  92. handleClick(value) {
  93. this.current = value;
  94. },
  95. },
  96. };
  97. </script>
  98. <style scoped>
  99. .homePage {
  100. height: 87%;
  101. z-index: 2;
  102. margin-left: 45px;
  103. }
  104. </style>