vNav.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <template>
  2. <div class="vNavCom">
  3. <div class="logo">
  4. <!-- <img src="../../../public/img/logo.png" alt=""> -->
  5. 上海梵天软件
  6. </div>
  7. <el-menu
  8. background-color="#4ddcf5"
  9. @select="handleSelect"
  10. text-color="#F1F1F1"
  11. unique-opened
  12. active-text-color="#fff">
  13. <el-submenu v-for="(item,index) in route||filterOne" :key="index" :index="`${index}`">
  14. <template slot="title" >
  15. <span :class="'iconfont '+item.icon"></span>
  16. <span class="a_menu">{{item.name}}</span>
  17. </template>
  18. <el-menu-item
  19. v-for="(child,childIndex) in item.child||item.child.filter(j => menuIdList.includes(j.menuid))"
  20. @click="jump(child.to)"
  21. :class="$route.name===child.to ? 'is-active' : ''"
  22. :key="childIndex"
  23. :index="`${index}-${childIndex}`"
  24. :style="childIndex!==item.child.length-1?'margin-bottom: 15px':''"
  25. >
  26. <div>{{child.name}}</div>
  27. </el-menu-item>
  28. </el-submenu>
  29. </el-menu>
  30. </div>
  31. </template>
  32. <script>
  33. export default {
  34. data () {
  35. return {
  36. list: [],
  37. number: 0,
  38. menuIdList: [],
  39. route: [
  40. {
  41. name: '公司设置',
  42. // menuid: 100,
  43. to: '',
  44. icon: 'iconshangpinguanlix f-16',
  45. child: [
  46. {
  47. name: '基本信息设置',
  48. // menuid: 101,
  49. to: 'basicInfo'
  50. },
  51. {
  52. name: '职位信息设置',
  53. // menuid: 101,
  54. to: 'positionInfo'
  55. },
  56. {
  57. name: '简历信息设置',
  58. // menuid: 101,
  59. to: 'formManage'
  60. },
  61. {
  62. name: '面试问题设置',
  63. // menuid: 101,
  64. to: 'procedureManage'
  65. },
  66. {
  67. name: '视频库管理',
  68. // menuid: 101,
  69. to: 'videoManage'
  70. },
  71. {
  72. name: '应用场景管理',
  73. // menuid: 101,
  74. to: 'sceneManage'
  75. },
  76. {
  77. name: '模板管理',
  78. // menuid: 101,
  79. to: 'templateManage'
  80. },
  81. {
  82. name: '邮箱管理',
  83. // menuid: 202,
  84. to: 'mailManage'
  85. }
  86. ]
  87. },
  88. {
  89. name: '候选人管理',
  90. // menuid: 200,
  91. to: '',
  92. icon: 'iconshangpinguanlix f-16',
  93. child: [
  94. {
  95. name: '人才库',
  96. // menuid: 202,
  97. to: 'candidateAll'
  98. },
  99. {
  100. name: '简历管理',
  101. // menuid: 202,
  102. to: 'resumeList'
  103. },
  104. {
  105. name: '面试管理',
  106. // menuid: 202,
  107. to: 'candidateList'
  108. }
  109. ]
  110. },
  111. {
  112. name: '用户管理',
  113. // menuid: 200,
  114. to: '',
  115. icon: 'iconshangpinguanlix f-16',
  116. child: [
  117. {
  118. name: '密码设置',
  119. // menuid: 101,
  120. to: 'passwordSettings'
  121. },
  122. {
  123. name: '数据统计',
  124. // menuid: 202,
  125. to: 'statistics'
  126. }
  127. ]
  128. }
  129. ]
  130. }
  131. },
  132. created () {
  133. // localStorage.getItem('token') && this.queryNumber()
  134. // this.menuIdList = localStorage.getItem('menuId') ? localStorage.getItem('menuId').split(',').map(item => item - 0) : []
  135. },
  136. mounted () {
  137. this.handleSelect('0-0', this.route)
  138. },
  139. computed: {
  140. // filterOne () {
  141. // return this.route.filter(item => item.child.filter(j => this.menuIdList.includes(j.menuid)).length)
  142. // }
  143. },
  144. methods: {
  145. queryNumber () {
  146. let reqdata = {}
  147. this.$api.post('/platform/company/platformNotExamineCompanyCount', { reqdata }).then(res => {
  148. // this.number = res.object.notExamineCompanyCount
  149. this.$store.commit('setNumber', res.object.notExamineCompanyCount)
  150. })
  151. },
  152. handleSelect (key, keyPath) {
  153. this.$emit('keyPath', key, this.route || this.filterOne)
  154. },
  155. jump (to) {
  156. if (this.$route.name === to) {
  157. return false
  158. }
  159. this.$router.push({ name: to })
  160. }
  161. }
  162. }
  163. </script>
  164. <style lang='scss' scoped>
  165. @import './vNav.scss';
  166. /deep/.el-submenu__title i{
  167. color: #ffffff;
  168. }
  169. .logo{
  170. color: #ffffff;
  171. font-size: 20px;
  172. padding: 15% 0 13% 0;
  173. }
  174. // .vNavCom{
  175. // overflow-y: scroll;
  176. // }
  177. // .vNavCom::-webkit-scrollbar{
  178. // display:none;
  179. // }
  180. </style>
  181. <style lang="scss">
  182. .el-submenu{
  183. .el-badge__content{
  184. margin-top: 25%!important;
  185. position: relative;
  186. width: 20px;
  187. left: 25px;
  188. }
  189. }
  190. </style>