App.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. <template>
  2. <div id="app" :class="{}">
  3. <div
  4. style="width: 100%; height: 100%"
  5. :class="{
  6. ggheight: true,
  7. }"
  8. >
  9. <!-- main 内容 -->
  10. <keep-alive v-if="$route.meta.keepAlive">
  11. <!-- 这里是会被缓存的视图组件 -->
  12. <router-view
  13. v-if="$route.meta.keepAlive"
  14. :class="{ pb_body: isShowNav }"
  15. />
  16. </keep-alive>
  17. <!-- 这里是不被缓存的视图组件 -->
  18. <router-view
  19. v-if="!$route.meta.keepAlive"
  20. :class="{ pb_body: isShowNav }"
  21. />
  22. <!-- 底部导航 -->
  23. <!-- <footer-nav
  24. v-if="isShowNav"
  25. :nav="nav"
  26. :luyou="this.$store.state.luyou"
  27. ></footer-nav> -->
  28. </div>
  29. </div>
  30. </template>
  31. <script>
  32. import leftBar from "./components/tools/leftBar";
  33. import { Message } from "element-ui";
  34. export default {
  35. name: "App",
  36. data() {
  37. return {
  38. isShowNav: false, // 是否显示导航 Tab
  39. navTabs: [
  40. ],
  41. nav: [],
  42. };
  43. },
  44. components: {
  45. "footer-nav": leftBar,
  46. },
  47. methods: {
  48. },
  49. watch: {
  50. $route(to, from) {
  51. const { navTabs, navTabs2, navTabs3 } = this.$data;
  52. const { userInfo } = this.$store.state;
  53. const toPath = to.path;
  54. const fromName = from.name;
  55. },
  56. },
  57. created() {
  58. },
  59. };
  60. </script>
  61. <style>
  62. * {
  63. margin: 0;
  64. padding: 0;
  65. }
  66. body {
  67. font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
  68. "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  69. }
  70. #app {
  71. height: 100%;
  72. width: 100%;
  73. background: #e6eaf0;
  74. /* min-width: 1380px; */
  75. /* min-width: 1250px; */
  76. }
  77. .appNoWidth {
  78. min-width: unset !important;
  79. display: inline-block !important;
  80. min-width: 550px;
  81. }
  82. .appNoHeight {
  83. min-height: 750px;
  84. }
  85. .app_head,
  86. .app_headBg {
  87. height: 50px;
  88. width: 100%;
  89. background-color: #293e68;
  90. display: flex;
  91. align-items: center;
  92. min-width: 1000px;
  93. }
  94. /* .app_headBg {
  95. background: url("./assets/icon/topBg.png");
  96. } */
  97. /* .logo {
  98. height: 40px;
  99. width: 40px;
  100. background: url("./assets/logo1.png");
  101. background-size: 100% 100%;
  102. margin-left: 20px;
  103. } */
  104. .pb_body {
  105. margin-left: 220px;
  106. width: calc(100% - 240px) !important;
  107. /* min-width: 1140px; */
  108. min-width: 750px;
  109. display: inline-block;
  110. /* height: calc(100% - 100px); */
  111. /* min-height: 750px; */
  112. background: #fff;
  113. margin-top: 20px;
  114. border-radius: 5px;
  115. position: absolute;
  116. height: calc(100% - 100px);
  117. overflow: auto;
  118. }
  119. .ggheight {
  120. height: calc(100% - 67.5px) !important;
  121. }
  122. .pb_head {
  123. font-size: 26px;
  124. /* font-weight: 600; */
  125. width: 95%;
  126. margin: 10px auto;
  127. padding: 10px 5px;
  128. border-bottom: 1px solid #eee;
  129. }
  130. .pb_content {
  131. /* height: 100%; */
  132. }
  133. .pb_content_body {
  134. width: 94%;
  135. margin: 10px auto;
  136. /* overflow: auto;
  137. height: calc(100% - 120px); */
  138. }
  139. .user_head {
  140. display: flex;
  141. align-items: center;
  142. margin-left: auto;
  143. margin-right: 20px;
  144. font-size: 18px;
  145. font-weight: 600;
  146. }
  147. .user_head .user_name {
  148. color: #fff;
  149. margin-right: 10px;
  150. }
  151. .user_head div {
  152. display: flex;
  153. align-items: center;
  154. cursor: pointer;
  155. }
  156. /* .user_head .exitI {
  157. background-image: url("./assets/exit.png");
  158. width: 25px;
  159. height: 25px;
  160. background-size: 100% 100%;
  161. margin-top: 1px;
  162. line-height: 25px;
  163. vertical-align: text-top;
  164. background-repeat: no-repeat;
  165. } */
  166. .noticeBox {
  167. position: relative;
  168. margin-right: 10px;
  169. }
  170. /* .user_head .noticeI {
  171. background-image: url("./assets/icon/noticeA.png");
  172. width: 25px;
  173. height: 25px;
  174. background-size: 100% 100%;
  175. margin-top: 1px;
  176. line-height: 25px;
  177. vertical-align: text-top;
  178. background-repeat: no-repeat;
  179. cursor: pointer;
  180. } */
  181. .noticeBox span {
  182. position: absolute;
  183. background: red;
  184. width: 15px;
  185. height: 15px;
  186. border-radius: 30px;
  187. color: #fff;
  188. text-align: center;
  189. font-size: 12px;
  190. display: flex;
  191. align-items: center;
  192. justify-content: center;
  193. top: -3px;
  194. right: -3px;
  195. }
  196. .stuWidth {
  197. min-width: 1180px;
  198. }
  199. .gHeight {
  200. height: 100%;
  201. }
  202. html::-webkit-scrollbar {
  203. /*滚动条整体样式*/
  204. width: 6px;
  205. /*高宽分别对应横竖滚动条的尺寸*/
  206. height: 6px;
  207. }
  208. /*定义滚动条轨道 内阴影+圆角*/
  209. html::-webkit-scrollbar {
  210. border-radius: 10px;
  211. background-color: #eee;
  212. }
  213. /*定义滑块 内阴影+圆角*/
  214. html::-webkit-scrollbar-thumb {
  215. border-radius: 10px;
  216. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  217. background-color: rgba(0, 0, 0, 0.1);
  218. }
  219. .btnClassGM {
  220. background: #8681b7 !important;
  221. border-color: #8681b7 !important;
  222. }
  223. .btnClassGM:focus,
  224. .btnClassGM:hover {
  225. background: #8681b7 !important;
  226. border-color: #8681b7 !important;
  227. }
  228. .GMBg {
  229. background: rgb(184, 181, 202) !important;
  230. }
  231. .cancelbtnGM:focus,
  232. .cancelbtnGM:hover {
  233. color: rgb(92, 84, 159) !important;
  234. border-color: #5c549f !important;
  235. background-color: #dbd7ff !important;
  236. }
  237. </style>