ColorWhiteDeveloper
2022-09-19 c1e14a5b3e91f92c2ee40bcf0c880fa5dfd09e4d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<template>
  <div class="Menu">
    <!-- 菜单栏 -->
    <el-aside width="200px" class="menu">
      <h2 class="siderbar-title">遂昌执法平台</h2>
      <el-scrollbar class="MenuScroll">
        <!-- 路由 -->
        <el-menu class="el-menu-vertical">
          <el-menu-item v-for="item in menu" :key="item.name" class="firstMenu" @click="Jump(item.index)">
            <template slot="title" class="firstSpan">
              <span slot="prefix" class="icon-padding fisrtSpan">
                <svg-icon :icon-class="item.icon"></svg-icon>
              </span>
              <span class="fisrtSpan">{{item.name}}</span>
            </template>
          </el-menu-item>
        </el-menu>
      </el-scrollbar>
    </el-aside>
  </div>
</template>
 
<script>
export default {
  data() {
    return {
      menu: [
        {
          name: "系统设置", icon: "system", index: "/home/system", 
        },
        {
          name: "运营管理", icon: "operate", index: "/home/operate",
        },
        {
          name: "视频巡查", icon: "video", index: "/home/video",
        },
        {
          name: "油烟信息查询", icon: "intelligence", index: "/home/lampblack",
        },
        {
          name: "执法管理", icon: "intelligence", index: "/home/law",
        },
        {
          name: "智能巡查", icon: "intelligence", index: "/home/intellect",
        },
        {
          name: "平台基本信息", icon: "intelligence", index: "/home/info",
        }
      ],
    }
  },
  methods:{
    Jump(url){
      this.$router.push(url);
    }
  }
};
</script>
 
<style lang="scss" scpoed>
.icon-padding {
  padding-right: 10px;
}
.menu {
  background: #07162e;
  color: #e9eef3;
  text-align: center;
  box-sizing: border-box;
  position: relative;
  //    固定标题
  .siderbar-title {
    position: fixed;
    text-align: center;
    margin: 0;
    font-size: 26px;
    width: 200px;
    line-height: 66px;
    top: 0;
    left: 0;
    z-index: 999;
    background-color: #08162f;
  }
 
  .MenuScroll {
    height: calc(100vh - 66px);
    box-sizing: border-box;
    margin-top: 66px;
    .el-menu {
      background: linear-gradient(#07162e, #0f2b56);
      border: 0;
 
      .firstMenu {
        background:  #07162e;
        text-align: left;
        &:hover .fisrtSpan {
          color: #fff;
        }
 
        span {
          color: #e9eef3;
        }
 
        .el-menu-item {
          color: #c3c3c4;
          background-color: #07162e;
          &:hover {
            color: #fff;
            background-color: #0c2c4c;
          }
        }
 
        .is-active {
          background-color: #07162e;
          color: #22d3eb;
        }
      }
 
      .is-active {
        background-color: #07162e;
      }
    }
 
    .el-scrollbar__wrap {
      overflow-x: hidden;
    }
  }
}
</style>