index.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <template>
  2. <el-aside class="MainAside">
  3. <el-menu class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" background-color="transparent"
  4. text-color="#fff" active-text-color="#19c3eb" :default-active="$route.path" :collapse="isCollapse" router>
  5. <!-- <h3 style="
  6. color: #7ec699;
  7. text-shadow: 0 0 3px #7acaec;
  8. margin-left: 30%;
  9. height: 50px;
  10. ">
  11. 任务菜单
  12. </h3> -->
  13. <!-- <dv-decoration-4 :reverse="true" style="width: 200px; height: 5px" /> -->
  14. <!-- <el-menu-item index="/home/taskManagement">
  15. <div style="padding-left: 25%; background-color: slategrey;">
  16. <span slot="title">协同任务管理</span>
  17. </div>
  18. </el-menu-item>
  19. <el-menu-item index="/home/situation">
  20. <div style="padding-left: 33%; background-color: slategrey;">
  21. <span slot="title">态势显示</span>
  22. </div>
  23. </el-menu-item> -->
  24. <!-- <el-menu-item index="/home/dataManagement">
  25. <div style="padding-left: 25%; background-color: slategrey;">
  26. <span slot="title">侦察数据管理</span>
  27. </div>
  28. </el-menu-item> -->
  29. <!-- <el-menu-item index="/home/dataFusion">
  30. <div style="padding-left: 25%; background-color: slategrey;">
  31. <span slot="title">数据融合管理</span>
  32. </div>
  33. </el-menu-item> -->
  34. <el-menu-item index="/home/networkManagement">
  35. <div style="padding-left: 25%; background-color: slategrey;">
  36. <span slot="title">链路状态管理</span>
  37. </div>
  38. <!-- <dv-decoration-11 style="width: 200px; height: 60px">链路状态查询</dv-decoration-11> -->
  39. </el-menu-item>
  40. <el-submenu index="5">
  41. <template slot="title">
  42. <div style="padding-left:24%; background-color: slategrey;">
  43. <span style="width: 200px; height: 80px;">传感器管理</span>
  44. </div>
  45. <!-- <dv-decoration-11 style="width: 200px; height: 60px"><i
  46. class="el-icon-location"></i>侦察传感器管理</dv-decoration-11> -->
  47. </template>
  48. <el-menu-item index="/home/scoutRadar">
  49. <dv-decoration-7 style="width:200px;height:30px;">雷达管理</dv-decoration-7>
  50. </el-menu-item>
  51. <el-menu-item index="/home/scoutESM">
  52. <dv-decoration-7 style="width:200px;height:30px;">电子攻击管理</dv-decoration-7>
  53. </el-menu-item>
  54. <!-- <el-menu-item index="/home/scoutImage">
  55. <dv-decoration-7 style="width:200px;height:30px;">成像传感器管理</dv-decoration-7>
  56. </el-menu-item> -->
  57. </el-submenu>
  58. <!-- <el-menu-item index="/home/intelESMProcess">
  59. <dv-decoration-11 style="width: 200px; height: 60px"
  60. >情报处理分发</dv-decoration-11
  61. >
  62. </el-menu-item> -->
  63. </el-menu>
  64. </el-aside>
  65. </template>
  66. <script>
  67. import { mapGetters } from "vuex";
  68. export default {
  69. name: "Aside",
  70. data() {
  71. return {
  72. timer: null,
  73. value: 0,
  74. };
  75. },
  76. computed: {
  77. ...mapGetters(["isCollapse", "platformID", "coopMsg"]),
  78. },
  79. mounted() {
  80. this.setTimer();
  81. },
  82. methods: {
  83. handleOpen(key, keyPath) {
  84. console.log(key, keyPath);
  85. },
  86. handleClose(key, keyPath) {
  87. console.log(key, keyPath);
  88. },
  89. setTimer() {
  90. if (this.timer == null) {
  91. this.timer = setInterval(() => {
  92. setTimeout(this.timerRefresh, 0);
  93. }, 2000);
  94. }
  95. },
  96. timerDestory() {
  97. if (this.timer) {
  98. clearInterval(this.timer);
  99. this.timer = null;
  100. }
  101. },
  102. timerRefresh() {
  103. axios.get(`http://localhost:5100/api/platform/${this.platformID}/getIsReal`)
  104. .then(response => {
  105. console.log('response.data :>> ', response.data);
  106. this.$store.commit("app/setIsReal", response.data.s);
  107. })
  108. },
  109. getMessgaeNum() {
  110. let number = 0;
  111. for (let i = 0; i < this.coopMsg.length; i++) {
  112. if (this.coopMsg[i].answer == "暂无应答") number++;
  113. }
  114. if (this.value < number && this.platformID != 8015) {
  115. //this.$message("有新的协同任务消息!!!");
  116. this.$notify({
  117. title: "提示",
  118. message: "有新的协同任务消息,请尽快前往侦侦协同页面应答",
  119. duration: 0,
  120. });
  121. }
  122. this.value = number;
  123. },
  124. },
  125. };
  126. </script>
  127. <style scoped>
  128. .MainAside {
  129. width: unset !important;
  130. max-width: 300px;
  131. position: relative;
  132. background: transparent;
  133. }
  134. .MainAside::-webkit-scrollbar {
  135. display: none;
  136. }
  137. .el-menu-vertical-demo:not(.el-menu--collapse) {
  138. width: 200px;
  139. min-height: 400px;
  140. }
  141. .el-menu-item:hover {
  142. color: #f46827 !important;
  143. background: none !important;
  144. text-decoration: underline;
  145. }
  146. .el-menu-item:hover i {
  147. color: #f46827 !important;
  148. }
  149. .el-menu-item {
  150. padding-left: 0px !important;
  151. height: 70px;
  152. margin-top: 10px;
  153. margin-bottom: 10px;
  154. }
  155. /deep/ .el-submenu__title {
  156. padding-left: 0px !important;
  157. height: 70px;
  158. }
  159. /deep/ .el-submenu__title:hover {
  160. color: #f46827 !important;
  161. background: none !important;
  162. text-decoration: underline;
  163. }
  164. /deep/ .el-submenu__title:hover i {
  165. color: #f46827 !important;
  166. background: none !important;
  167. text-decoration: underline;
  168. }
  169. /deep/ .el-submenu.is-opened>.el-submenu__title .el-submenu__icon-arrow {
  170. display: none;
  171. }
  172. /deep/ .el-submenu>.el-submenu__title .el-submenu__icon-arrow {
  173. display: none;
  174. }
  175. .el-menu {
  176. border: none;
  177. }
  178. .el-menu--collapse {
  179. width: 0px;
  180. }
  181. .collapse {
  182. position: absolute;
  183. bottom: 40px;
  184. width: 100%;
  185. }
  186. /deep/.item .el-badge__content {
  187. top: 17px !important;
  188. right: 1px !important;
  189. }
  190. </style>