index.vue 8.3 KB
Newer Older
Mr.奇淼('s avatar
Mr.奇淼( 已提交
1
<template>
范庆磊 已提交
2 3 4 5 6 7 8 9
    <div class="page">
        <div class="mycard dashbord1">
            <div class="dashbord1-left">
                <div class="dashbord1-left-title">早安,管理员,请开始一天的工作吧</div>
                <div class="dashbord1-left-dot">今日晴,0℃ - 10℃,天气寒冷,注意添加衣物。</div>
                <div class="dashbord1-left-rows">
                    <el-row :gutter="20">
                        <el-col :span="8" :xs="24" :sm="8">
范庆磊 已提交
10
                            <div class="flex-center">
范庆磊 已提交
11 12 13 14
                                <i class="el-icon-sort icon"></i>今日流量 (1231231)
                            </div>
                        </el-col>
                        <el-col :span="8" :xs="24" :sm="8">
范庆磊 已提交
15
                            <div class="flex-center">
范庆磊 已提交
16 17 18 19
                                <i class="el-icon-s-custom icon"></i>总用户数 (24001)
                            </div>
                        </el-col>
                        <el-col :span="8" :xs="24" :sm="8">
范庆磊 已提交
20
                            <div class="flex-center">
范庆磊 已提交
21 22 23 24 25 26 27
                                <i class="el-icon-s-comment icon"></i>好评率 (99%)
                            </div>
                        </el-col>
                    </el-row>
                </div>
            </div>
            <img src="@/assets/dashbord.png" class="dashbord1-right" alt />
28
        </div>
范庆磊 已提交
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
        <div class="mycard dashbord2">
            <div>
                <div class="dashbord2-item">
                    使用教学:
                    <a
                        style="color:#409EFF"
                        target="view_window"
                        href="https://www.bilibili.com/video/BV1Rg411u7xH/"
                    >https://www.bilibili.com/video/BV1Rg411u7xH</a>
                </div>
                <div class="dashbord2-item">
                    插件仓库:
                    <a
                        style="color:#409EFF"
                        target="view_window"
                        href="https://github.com/flipped-aurora/gva-plugins"
                    >https://github.com/flipped-aurora/gva-plugins</a>
                </div>
            </div>
        </div>

范庆磊 已提交
50 51 52 53 54 55 56
            <el-card class="mycard quick-entrance">
                <template #header>
                    <div class="card-header">
                        <span>快捷入口</span>
                    </div>
                </template>
                 <el-row :gutter="20">
范庆磊 已提交
57 58 59 60 61 62 63 64 65
                <el-col
                    v-for="(card, key) in toolCards"
                    :key="key"
                    :span="4"
                    :xs="8"
                    @click="toTarget(card.name)"
                    class="quick-entrance-items"
                >
                    <div class="quick-entrance-item">
范庆磊 已提交
66
                        <div class="quick-entrance-item-icon" :style="{ backgroundColor: card.bg }">
范庆磊 已提交
67 68 69 70 71 72
                            <i :class="card.icon" :style="{ color: card.color }" />
                        </div>
                        <p>{{ card.label }}</p>
                    </div>
                </el-col>
            </el-row>
范庆磊 已提交
73 74 75 76 77 78 79 80 81 82 83 84 85
            </el-card>
            <!-- <div class="quick-entrance-title"></div> -->
        

        <div class="mycard">
            <el-row :gutter="0">
                <el-col :xs="24" :sm="16">
                    <echarts-line></echarts-line>
                </el-col>
                <el-col :xs="24" :sm="8">
                    <dashbord-table></dashbord-table>
                </el-col>
            </el-row>
86
        </div>
1
1319612909 已提交
87
    </div>
Mr.奇淼('s avatar
Mr.奇淼( 已提交
88 89
</template>
<script>
范庆磊 已提交
90 91
import echartsLine from '@/components/dashbordCharts/echartsLine.vue'
import dashbordTable from '@/components/dashbordTable/dashbordTable.vue'
Mr.奇淼('s avatar
Mr.奇淼( 已提交
92
export default {
范庆磊 已提交
93 94 95 96
    components: {
        echartsLine,
        dashbordTable
    },
范庆磊 已提交
97 98 99 100 101 102 103 104
    data() {
        return {
            toolCards: [
                {
                    label: '用户管理',
                    icon: 'el-icon el-icon-monitor',
                    name: 'user',
                    color: '#ff9c6e',
范庆磊 已提交
105
                    bg: 'rgba(255, 156, 110,.3)'
范庆磊 已提交
106 107 108 109 110 111
                },
                {
                    label: '角色管理',
                    icon: 'el-icon el-icon-setting',
                    name: 'authority',
                    color: '#69c0ff',
范庆磊 已提交
112
                    bg: 'rgba(105, 192, 255,.3)'
范庆磊 已提交
113 114 115 116 117 118
                },
                {
                    label: '菜单管理',
                    icon: 'el-icon el-icon-menu',
                    name: 'menu',
                    color: '#b37feb',
范庆磊 已提交
119
                    bg: 'rgba(179, 127, 235,.3)'
范庆磊 已提交
120 121 122 123 124 125
                },
                {
                    label: '代码生成器',
                    icon: ' el-icon-cpu',
                    name: 'autoCode',
                    color: '#ffd666',
范庆磊 已提交
126
                    bg: 'rgba(255, 214, 102,.3)'
范庆磊 已提交
127 128 129 130 131 132
                },
                {
                    label: '表单生成器',
                    icon: 'el-icon-document-checked',
                    name: 'formCreate',
                    color: '#ff85c0',
范庆磊 已提交
133
                    bg: 'rgba(255, 133, 192,.3)'
范庆磊 已提交
134 135 136 137 138 139
                },
                {
                    label: '关于我们',
                    icon: ' el-icon-user',
                    name: 'about',
                    color: '#5cdbd3',
范庆磊 已提交
140
                    bg: 'rgba(92, 219, 211,.3)'
范庆磊 已提交
141 142
                }
            ]
何秀钢 已提交
143
        }
范庆磊 已提交
144 145 146 147 148
    },
    methods: {
        toTarget(name) {
            this.$router.push({ name })
        }
何秀钢 已提交
149 150
    }
}
Mr.奇淼('s avatar
Mr.奇淼( 已提交
151 152
</script>

153
<style lang="scss" scoped>
范庆磊 已提交
154 155 156 157
@mixin flex-center {
    display: flex;
    align-items: center;
}
范庆磊 已提交
158
.page {
范庆磊 已提交
159 160
    background: #f0f2f5;
    padding: 0;
范庆磊 已提交
161 162 163 164 165 166 167

    .mycard {
        background-color: #fff;
        border-radius: 10px;
        height: auto;
        padding: 10px 30px;
        overflow: hidden;
范庆磊 已提交
168 169
        margin-bottom: 15px;
        box-shadow: 0 0 7px 1px rgba(0, 0, 0, 0.03);
K
klausY 已提交
170
    }
范庆磊 已提交
171
    .dashbord1 {
范庆磊 已提交
172 173
        height: 120px;
        @include flex-center;
范庆磊 已提交
174 175 176 177
        justify-content: space-between;
        color: #777;
        &-left {
            &-title {
范庆磊 已提交
178
                margin-top: 15px;
范庆磊 已提交
179 180 181 182 183 184 185 186
                font-size: 22px;
                color: #000;
            }
            &-dot {
                font-size: 14px;
                margin-top: 10px;
            }
            &-rows {
范庆磊 已提交
187
                // margin-top: 15px;
范庆磊 已提交
188 189 190 191 192 193 194 195 196
                width: 600px;
                align-items: center;
            }
        }
        &-right {
            height: 600px;
            width: 600px;
            margin-top: -20px;
        }
1
1319612909 已提交
197
    }
范庆磊 已提交
198
    .dashbord2 {
范庆磊 已提交
199
        @include flex-center;
范庆磊 已提交
200 201 202 203 204
        justify-content: flex-start;
        height: 60px;
        &-item {
            line-height: 25px;
        }
1
1319612909 已提交
205
    }
范庆磊 已提交
206 207 208 209 210 211 212
    .quick-entrance-title {
        height: 30px;
        font-size: 22px;
        color: #333;
        width: 100%;
        border-bottom: 1px solid #eee;
    }
范庆磊 已提交
213
    .quick-entrance-items {
范庆磊 已提交
214
        @include flex-center;
范庆磊 已提交
215 216 217 218 219
        justify-content: center;
        text-align: center;
        color: #333;
        .quick-entrance-item {
            height: auto;
范庆磊 已提交
220 221
            text-align: center;
            // align-items: center;
范庆磊 已提交
222 223 224 225
            &-icon {
                width: 50px;
                height: 50px !important;
                border-radius: 8px;
范庆磊 已提交
226
                @include flex-center;
范庆磊 已提交
227
                justify-content: center;
范庆磊 已提交
228 229
                margin: 0 auto;
                i {
范庆磊 已提交
230 231 232
                    font-size: 24px;
                }
            }
范庆磊 已提交
233
            p {
范庆磊 已提交
234 235 236
                margin-top: 10px;
            }
        }
1
1319612909 已提交
237
    }
范庆磊 已提交
238 239
}
.icon {
范庆磊 已提交
240
    font-size: 20px;
范庆磊 已提交
241 242 243 244
    color: rgb(85, 160, 248);
    width: 30px;
    height: 30px;
    margin-right: 10px;
范庆磊 已提交
245 246 247 248
    @include flex-center;
}
.flex-center {
    @include flex-center;
范庆磊 已提交
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277
}

//小屏幕不显示右侧,将登陆框居中
@media (max-width: 750px) {
    .mycard {
        padding: 20px 10px !important;
        .dashbord1 {
            height: auto;
            &-left {
                &-title {
                    font-size: 20px !important;
                }
                &-rows {
                    margin-top: 15px;
                    align-items: center;
                }
            }
            &-right {
                display: none;
            }
        }
        .dashbord2 {
            &-item {
                line-height: 20px;
            }
        }
        .icon {
            font-size: 18px;
        }
K
klausY 已提交
278
    }
1
1319612909 已提交
279
}
范庆磊 已提交
280
</style>