index.vue 6.6 KB
Newer Older
有来技术 已提交
1
<template>
2 3 4
  <div class="dashboard-container">
    <github-corner class="github-corner"/>

郝先瑞 已提交
5
    <!-- 数据 -->
6
    <el-row :gutter="40" class="card-panel-col">
7
      <el-col :xs="24" :lg="6" class="card-panel-col">
8 9
        <div class="card-panel">
          <div class="card-panel-icon-wrapper" style="margin-top: -10px">
10
            <el-image style="width:240px; height: 100px"
11
                      src="https://gitee.com/haoxr/image/raw/master/20210606213932.png"/>
12 13 14 15 16 17 18 19 20 21 22 23 24
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">
              {{ nickname }}
            </div>
            <div class="card-panel-text">
              <el-tag size="mini" type="danger">莫得感情</el-tag>
              <el-tag size="mini" type="success" style="margin-left: 5px">打工人</el-tag>
            </div>
          </div>
        </div>
      </el-col>

25
      <el-col :xs="24"  :lg="6" class="card-panel-col">
26 27 28 29 30 31 32 33
        <div class="card-panel">
          <div class="card-panel-icon-wrapper icon-people">
            <svg-icon icon-class="peoples" class-name="card-panel-icon"/>
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">
              总访问量
            </div>
34
            <div class="card-panel-num">123456</div>
35 36 37
          </div>
        </div>
      </el-col>
38

39
      <el-col :xs="24"  :lg="6" class="card-panel-col">
40 41 42 43 44 45 46 47
        <div class="card-panel">
          <div class="card-panel-icon-wrapper icon-money">
            <svg-icon icon-class="money" class-name="card-panel-icon"/>
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">
              支付金额
            </div>
48
            <div class="card-panel-num">123456</div>
49 50 51
          </div>
        </div>
      </el-col>
52
      <el-col :xs="24"  :lg="6" class="card-panel-col">
53 54 55 56 57 58 59 60
        <div class="card-panel">
          <div class="card-panel-icon-wrapper icon-shopping">
            <svg-icon icon-class="shopping" class-name="card-panel-icon"/>
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">
              订单数
            </div>
61
            <div class="card-panel-num">123456</div>
62 63 64 65 66
          </div>
        </div>
      </el-col>
    </el-row>

67 68 69 70
    <!-- 项目 + 团队成员介绍 -->
    <el-row :gutter="40">

      <!-- 项目介绍 -->
71
      <el-col :md="12" :lg="12" class="card-panel-col">
72
        <Project/>
73 74 75
      </el-col>

      <!-- 团队介绍 -->
76
      <el-col :md="12" :lg="12" class="card-panel-col">
77
        <Team/>
78 79 80 81 82
      </el-col>
    </el-row>


    <!-- Echarts 图表 -->
83
    <el-row :gutter="40" style="margin-top: 20px">
84
      <el-col :sm="24" :lg="8" class="card-panel-col">
85
        <BarChart id="barChart" height="400px" width="100%" class="chart-container"/>
86
      </el-col>
87

88
      <el-col :xs="24" :sm="12" :lg="8" class="card-panel-col">
89 90 91
        <PieChart id="pieChart" height="400px" width="100%" class="chart-container"/>
        <!--订单漏斗图-->
        <!--<FunnelChart id="funnelChart" height="400px" width="100%" class="chart-container"/>-->
92
      </el-col>
93

94
      <el-col :xs="24" :sm="12" :lg="8" class="card-panel-col">
95
        <RadarChart id="radarChart" height="400px" width="100%" class="chart-container"/>
96 97 98 99
      </el-col>
    </el-row>

  </div>
有来技术 已提交
100 101
</template>

102
<script setup lang="ts">
103 104

// Vue引用
郝先瑞 已提交
105
import {computed, nextTick, onMounted, reactive, toRefs, watchEffect} from "vue";
106

107 108 109
// 组件引用
import GithubCorner from '@/components/GithubCorner/index.vue'
import TodoList from './components/TodoList/index.vue'
110
import SvgIcon from '@/components/SvgIcon/index.vue'
111 112 113 114 115 116 117 118
import BarChart from "./components/Chart/BarChart.vue";
import PieChart from "./components/Chart/PieChart.vue";
import RadarChart from "./components/Chart/RadarChart.vue";
import FunnelChart from "./components/Chart/FunnelChart.vue";

import Project from "./components/Project/index.vue";
import Team from "./components/Team/index.vue";

郝先瑞 已提交
119
import BScroll from 'better-scroll'
120 121 122 123 124 125 126

import {useUserStoreHook} from "@/store/modules/user"

const roles = computed(() => useUserStoreHook().roles);
const avatar = computed(() => useUserStoreHook().avatar);
const nickname = computed(() => useUserStoreHook().nickname);

127

有来技术 已提交
128 129 130
</script>


131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217
<style lang="scss" scoped>

.dashboard-container {
  padding: 24px;
  background-color: rgb(240, 242, 245);
  position: relative;

  .github-corner {
    position: absolute;
    top: 0px;
    border: 0;
    right: 0;
    z-index: 99;
  }

  .box-center {
    margin: 0 auto;
    display: table;
  }

  .user-profile {
    .user-name {
    }

    .box-center {
      padding-top: 10px;
    }

    .user-role {
      padding-top: 10px;
      font-weight: 400;
      font-size: 14px;
    }

    .box-social {
      padding-top: 30px;

      .el-table {
        border-top: 1px solid #dfe6ec;
      }
    }

    .user-follow {
      padding-top: 20px;
    }
  }

  .card-panel-col {
    margin-bottom: 12px;
  }

  .card-panel {
    height: 108px;
    cursor: pointer;
    font-size: 12px;
    position: relative;
    overflow: hidden;
    color: #666;
    background: #fff;
    box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
    border-color: rgba(0, 0, 0, .05);

    &:hover {
      .card-panel-icon-wrapper {
        color: #fff;
      }

      .icon-user {
        background: #e77541;
      }

      .icon-people {
        background: #40c9c6;
      }


      .icon-money {
        background: #f4516c;
      }

      .icon-shopping {
        background: #34bfa3
      }
    }

    .icon-people {
      color: #40c9c6;
218 219 220 221

      .svg-icon {
        width: 3em !important;
        height: 3em !important;
222 223 224 225 226
      }
    }

    .icon-message {
      color: #36a3f7;
227 228 229 230

      .svg-icon {
        width: 3em !important;
        height: 3em !important;
231 232 233 234 235
      }
    }

    .icon-money {
      color: #f4516c;
236 237

      .svg-icon {
238 239
        width: 3em !important;
        height: 3em !important;
240 241 242 243 244
      }
    }

    .icon-shopping {
      color: #34bfa3;
245 246 247 248

      .svg-icon {
        width: 3em !important;
        height: 3em !important;
249 250 251 252 253
      }
    }

    .card-panel-icon-wrapper {
      float: left;
254
      margin: 14px 0 0 6px;
255 256 257 258 259 260 261 262
      padding: 16px;
      transition: all 0.38s ease-out;
      border-radius: 6px;
    }

    .card-panel-description {
      float: right;
      font-weight: bold;
263
      margin: 26px 20px 0;
264 265 266 267 268 269 270 271 272 273 274 275 276 277

      .card-panel-text {
        line-height: 18px;
        color: rgba(0, 0, 0, 0.45);
        font-size: 16px;
        margin-bottom: 12px;
      }

      .card-panel-num {
        font-size: 20px;
      }
    }
  }

278

279
  .chart-container {
280 281 282
    background: #ffffff;
  }

283

284 285 286
}

</style>