跳板机管理web端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

180 lines
4.4 KiB

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
  1. <template>
  2. <el-row class="panel">
  3. <el-col :span="24" class="panel-top">
  4. <el-col :span="20" style="font-size:26px;">
  5. <img src="../assets/logo4.png" class="logo"> <span>AD<i style="color:#20a0ff">MIN</i></span>
  6. </el-col>
  7. <el-col :span="4">
  8. <el-tooltip class="item tip-logout" effect="dark" content="退出" placement="bottom" style="padding:0px;">
  9. <!--<i class="logout" v-on:click="logout"></i>-->
  10. <i class="fa fa-sign-out" aria-hidden="true" v-on:click="logout"></i>
  11. </el-tooltip>
  12. </el-col>
  13. </el-col>
  14. <el-col :span="24" class="panel-center">
  15. <!--<el-col :span="4">-->
  16. <aside style="width:230px;">
  17. <h5 class="admin"><i class="fa fa-user" aria-hidden="true" style="margin-right:5px;"></i>欢迎系统管理员测试</h5>
  18. <el-menu style="border-top: 1px solid #475669;" default-active="/table" class="el-menu-vertical-demo" @open="handleopen"
  19. @close="handleclose" @select="handleselect" theme="dark" unique-opened router>
  20. <el-submenu index="1">
  21. <template slot="title"><i class="el-icon-message"></i>导航一</template>
  22. <el-menu-item index="/table">Table</el-menu-item>
  23. <el-menu-item index="/form">Form</el-menu-item>
  24. <el-menu-item index="/page3">页面3</el-menu-item>
  25. </el-submenu>
  26. <el-submenu index="2">
  27. <template slot="title"><i class="fa fa-id-card-o"></i>导航二</template>
  28. <el-menu-item index="/page4">选项4</el-menu-item>
  29. <el-menu-item index="/page5">选项5</el-menu-item>
  30. </el-submenu>
  31. <el-menu-item index="/page6"><i class="fa fa-line-chart"></i>导航三</el-menu-item>
  32. </el-menu>
  33. </aside>
  34. <!--</el-col>-->
  35. <!--<el-col :span="20" class="panel-c-c">-->
  36. <section class="panel-c-c">
  37. <div class="grid-content bg-purple-light">
  38. <el-col :span="24" style="margin-bottom:15px;">
  39. <strong style="width:200px;float:left;color: #475669;">{{currentPathName}}</strong>
  40. <el-breadcrumb separator="/" style="float:right;">
  41. <el-breadcrumb-item :to="{ path: '/table' }">首页</el-breadcrumb-item>
  42. <el-breadcrumb-item>{{currentPathNameParent}}</el-breadcrumb-item>
  43. <el-breadcrumb-item>{{currentPathName}}</el-breadcrumb-item>
  44. </el-breadcrumb>
  45. </el-col>
  46. <el-col :span="24" style="background-color:#fff;box-sizing: border-box;">
  47. <transition name="fade">
  48. <router-view></router-view>
  49. </transition>
  50. </el-col>
  51. </div>
  52. </section>
  53. <!--</el-col>-->
  54. </el-col>
  55. </el-row>
  56. </template>
  57. <script>
  58. export default {
  59. data() {
  60. return {
  61. currentPathName:'Table',
  62. currentPathNameParent:'导航一',
  63. form: {
  64. name: '',
  65. region: '',
  66. date1: '',
  67. date2: '',
  68. delivery: false,
  69. type: [],
  70. resource: '',
  71. desc: ''
  72. }
  73. }
  74. },
  75. watch: {
  76. '$route' (to, from) {//监听路由改变
  77. this.currentPathName=to.name;
  78. this.currentPathNameParent=to.matched[0].name;
  79. }
  80. },
  81. methods: {
  82. onSubmit() {
  83. console.log('submit!');
  84. },
  85. handleopen(){
  86. //console.log('handleopen');
  87. },
  88. handleclose(){
  89. //console.log('handleclose');
  90. },
  91. handleselect:function(a,b){
  92. },
  93. //退出登录
  94. logout:function(){
  95. var _this=this;
  96. this.$confirm('确认退出吗?', '提示', {
  97. //type: 'warning'
  98. }).then(() => {
  99. _this.$router.replace('/login');
  100. }).catch(() => {
  101. });
  102. }
  103. }
  104. }
  105. </script>
  106. <style scoped>
  107. .fade-enter-active,
  108. .fade-leave-active {
  109. transition: opacity .5s
  110. }
  111. .fade-enter,
  112. .fade-leave-active {
  113. opacity: 0
  114. }
  115. .panel {
  116. position: absolute;
  117. top: 0px;
  118. bottom: 0px;
  119. width: 100%;
  120. }
  121. .panel-top {
  122. height: 60px;
  123. line-height: 60px;
  124. background: #1F2D3D;
  125. color: #c0ccda;
  126. }
  127. .panel-center {
  128. background: #324057;
  129. position: absolute;
  130. top: 60px;
  131. bottom: 0px;
  132. overflow: hidden;
  133. }
  134. .panel-c-c {
  135. background: #f1f2f7;
  136. position: absolute;
  137. right: 0px;
  138. top: 0px;
  139. bottom: 0px;
  140. left: 230px;
  141. overflow-y: scroll;
  142. padding: 20px;
  143. }
  144. .logout {
  145. background: url(../assets/logout_36.png);
  146. background-size: contain;
  147. width: 20px;
  148. height: 20px;
  149. float: left;
  150. }
  151. .logo {
  152. width: 40px;
  153. float: left;
  154. margin: 10px 10px 10px 18px;
  155. }
  156. .tip-logout {
  157. float: right;
  158. margin-right: 20px;
  159. padding-top: 5px;
  160. cursor: pointer;
  161. }
  162. .admin {
  163. color: #c0ccda;
  164. text-align: center;
  165. }
  166. </style>