leftSide.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <template>
  2. <div class="side">
  3. <div class="top">
  4. <span v-if="!isCollapse">导 航</span>
  5. <a @click="collapseClick"><i v-if="!isCollapse" class="el-icon-d-arrow-left"></i><i v-if="isCollapse" class="el-icon-d-arrow-right"></i></a>
  6. </div>
  7. <div class="side_info">
  8. <template v-if="isTab === 'client'">
  9. <el-menu unique-opened router :default-active="$route.path" :collapse="isCollapse">
  10. <el-menu-item-group>
  11. <div v-for="item in listClient">
  12. <el-menu-item :index="String(item.link)">
  13. <i :class="item.icon"></i>
  14. <span slot="title" v-text="item.title">账号管理</span>
  15. </el-menu-item>
  16. </div>
  17. </el-menu-item-group>
  18. </el-menu>
  19. </template>
  20. <template v-if="isTab === 'sever'">
  21. <el-menu unique-opened router :default-active="$route.path" :collapse="isCollapse">
  22. <div v-for="type in listSever">
  23. <el-submenu :index="type.label">
  24. <template slot="title">
  25. <i :class="type.icon"></i>
  26. <span v-text="type.label" class="menu-title">委托报关申请</span>
  27. </template>
  28. <el-menu-item-group>
  29. <div v-for="item in type.sub">
  30. <el-menu-item :index="String(item.link)" :route="item.link" :disabled="item.isDisabled" v-text="item.title">账号管理</el-menu-item>
  31. </div>
  32. </el-menu-item-group>
  33. </el-submenu>
  34. </div>
  35. </el-menu>
  36. </template>
  37. </div>
  38. </div>
  39. </template>
  40. <script>
  41. export default {
  42. name: 'AdminSide',
  43. props: ['isTab'],
  44. data () {
  45. return {
  46. isCollapse: false,
  47. listClient: [{
  48. icon: 'iconfont icon-weituo',
  49. title: '委托报关申请',
  50. link: '/clientPage/entrustApply'
  51. }, {
  52. icon: 'iconfont icon-ziliao-copy-copy',
  53. title: '企业资料信息管理',
  54. link: '/clientPage/entrustInfo'
  55. }, {
  56. icon: 'iconfont icon-danju',
  57. title: '单证管理',
  58. link: '/clientPage'
  59. }, {
  60. icon: 'iconfont icon-xitongshezhi',
  61. title: '系统设置',
  62. link: '/clientPage/config'
  63. }, {
  64. icon: 'iconfont icon-quanxian',
  65. title: '权限管理',
  66. link: '/clientPage/jurisdiction'
  67. }, {
  68. icon: 'iconfont icon-dizhi',
  69. title: '地址管理',
  70. link: '/clientPage/address'
  71. }, {
  72. icon: 'iconfont icon-zhanghu',
  73. title: '付汇账号管理',
  74. link: '/clientPage/paymentAccount'
  75. }],
  76. listSever: [{
  77. icon: 'iconfont icon-fuwushang',
  78. label: '服务商管理中心',
  79. sub: [{
  80. title: '单证管理',
  81. link: '/severPage'
  82. }, {
  83. title: '委托报关申请',
  84. link: '/severPage/entrustApply'
  85. },{
  86. title: '客户资料管理',
  87. link: '/severPage/customer'
  88. },{
  89. title: '汇率管理',
  90. link: '/severPage/exchange'
  91. },{
  92. title: '地址管理',
  93. link: '/severPage/address'
  94. }, {
  95. title: '关务汇总单',
  96. link: '/severPage/customs',
  97. }, {
  98. title: '申报要素维护',
  99. link: '/severPage/elements'
  100. }]}, {
  101. icon: 'iconfont icon-fengxian',
  102. label: '信用风险管理',
  103. sub: [{
  104. title: '信用风险管理',
  105. // link: '/severPage',
  106. isDisabled: true
  107. }]}
  108. ]
  109. }
  110. },
  111. methods: {
  112. collapseClick () {
  113. this.isCollapse = !this.isCollapse
  114. this.$emit('collapseEvent', this.isCollapse)
  115. }
  116. }
  117. }
  118. </script>
  119. <style type="text/scss" lang="scss">
  120. .side{
  121. -moz-box-shadow: 0 5px 5px #bcd2ff;;
  122. box-shadow:0 5px 5px #bcd2ff;
  123. margin:0 3px 3px 3px;
  124. .top{
  125. position:relative;
  126. line-height: 30px;
  127. height:30px;
  128. text-align: center;
  129. font-size: 14px;
  130. color:#fff;
  131. background: #b9dbfa;
  132. margin-bottom:1px;
  133. a{
  134. position:absolute;
  135. right:5px;
  136. color:#fff;
  137. }
  138. }
  139. .side_info{}
  140. .el-submenu__title{
  141. padding: 0 !important;
  142. background: #6093f6;
  143. color:#fff;
  144. i{
  145. color:#fff;
  146. padding: 0 5px;
  147. }
  148. }
  149. .menu-title{
  150. font-weight: bold;
  151. color:#fff;
  152. }
  153. .el-menu-item.is-active{
  154. background: #40a9ff;
  155. color:#fff;
  156. }
  157. .el-menu-item{
  158. height:40px;
  159. line-height: 40px;
  160. padding: 0!important;
  161. i{
  162. padding: 0 5px;
  163. }
  164. .el-tooltip{
  165. padding: 0 !important;
  166. }
  167. }
  168. .el-submenu__icon-arrow{
  169. right:5px;
  170. margin-top:-5px;
  171. }
  172. .el-submenu .el-menu-item{
  173. min-width:10px;
  174. padding-left: 30px !important;
  175. background: #e7f2fb;
  176. margin-bottom:1px;
  177. line-height: 40px;
  178. height:40px;
  179. }
  180. .el-menu-item.is-active{
  181. position:relative;
  182. background: #d6edff;
  183. color:#0d5ffe;
  184. &:after{
  185. content: '';
  186. position:absolute;
  187. top:0;
  188. right:0;
  189. display:block;
  190. width:2px;
  191. height:40px;
  192. background: #0d5ffe;
  193. }
  194. }
  195. .el-menu-item-group__title{
  196. height:0;
  197. display:none;
  198. }
  199. .el-menu--collapse{
  200. width:25px;
  201. }
  202. }
  203. </style>