|
|
@@ -2,32 +2,67 @@
|
|
|
<div class="main-box">
|
|
|
<div class="scroll-box">
|
|
|
<div class="grid-box">
|
|
|
- <div v-permission="'dashboard.head'" class="main-card">
|
|
|
- <div class="hello-text">{{ getTimeWord() }},{{ user.nickname }}!</div>
|
|
|
- <div class="card-content">
|
|
|
- <div class="expo-text">
|
|
|
+ <div v-permission="'dashboard.head'" class="main-card card">
|
|
|
+ <div class="left-box">
|
|
|
+ <div class="title">{{ getTimeWord() }},{{ user.nickname }}!</div>
|
|
|
+ <div class="desc">
|
|
|
<span v-if="currentExpo">距离{{ currentExpo.expo_name }}结束还有{{ getEndDay(currentExpo.end_date) }}天</span>
|
|
|
<span v-else>没有进行中的展会</span>
|
|
|
</div>
|
|
|
- <div class="quick-nav">
|
|
|
- <router-link class="nav-item" to="audience">
|
|
|
- <span class="icon el-icon-user" />
|
|
|
- <span class="text">观众管理</span>
|
|
|
+ <div class="button-list">
|
|
|
+ <router-link to="/audience" class="card-button">
|
|
|
+ <div class="el-icon-user button-icon"></div>
|
|
|
+ <div class="info-box">
|
|
|
+ <div class="text">已预约观众</div>
|
|
|
+ <div class="value">68</div>
|
|
|
+ </div>
|
|
|
</router-link>
|
|
|
- <router-link class="nav-item" to="preRegister">
|
|
|
- <span class="icon el-icon-tickets" />
|
|
|
- <span class="text">表单管理</span>
|
|
|
+ <router-link to="/invitation" class="card-button">
|
|
|
+ <div class="el-icon-key button-icon"></div>
|
|
|
+ <div class="info-box">
|
|
|
+ <div class="text">待审邀请函</div>
|
|
|
+ <div class="value">4</div>
|
|
|
+ </div>
|
|
|
</router-link>
|
|
|
- <router-link class="nav-item" to="exhibitor">
|
|
|
- <span class="icon el-icon-office-building" />
|
|
|
- <span class="text">展商管理</span>
|
|
|
- </router-link>
|
|
|
- <router-link class="nav-item" to="invitation">
|
|
|
- <span class="icon el-icon-files" />
|
|
|
- <span class="text">模板管理</span>
|
|
|
+ <router-link to="/exhibitor" class="card-button">
|
|
|
+ <div class="el-icon-date button-icon"></div>
|
|
|
+ <div class="info-box">
|
|
|
+ <div class="text">进行中展会</div>
|
|
|
+ <div class="value">2</div>
|
|
|
+ </div>
|
|
|
</router-link>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="form">
|
|
|
+ <div class="form-inner" id="form">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="card-box card">
|
|
|
+ <router-link to="/preRegister" class="card-item">
|
|
|
+ <div class="el-icon-tickets card-icon"></div>
|
|
|
+ <div class="card-info">
|
|
|
+ <div class="title">预登记表单</div>
|
|
|
+ <div class="describe">准备展会报名表</div>
|
|
|
+ </div>
|
|
|
+ <div class="goto-icon el-icon-top-right"></div>
|
|
|
+ </router-link>
|
|
|
+ <router-link to="/invitation" class="card-item">
|
|
|
+ <div class="el-icon-files card-icon"></div>
|
|
|
+ <div class="card-info">
|
|
|
+ <div class="title">邀请函模板</div>
|
|
|
+ <div class="describe">准备邀请函以便发送</div>
|
|
|
+ </div>
|
|
|
+ <div class="goto-icon el-icon-top-right"></div>
|
|
|
+ </router-link>
|
|
|
+ <router-link to="share&utm" class="card-item">
|
|
|
+ <div class="el-icon-data-line card-icon"></div>
|
|
|
+ <div class="card-info">
|
|
|
+ <div class="title">分享中心</div>
|
|
|
+ <div class="describe">制作海报、分享展会</div>
|
|
|
+ </div>
|
|
|
+ <div class="goto-icon el-icon-top-right"></div>
|
|
|
+ </router-link>
|
|
|
</div>
|
|
|
<div class="starter-box card">
|
|
|
<div class="icon el-icon-position"></div>
|
|
|
@@ -45,6 +80,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import echartsTheme from '@/lib/echart/v5.json'
|
|
|
+import * as echarts from 'echarts'
|
|
|
import { getExpoList } from '@/api/expo'
|
|
|
export default {
|
|
|
name: 'Dashboard',
|
|
|
@@ -58,8 +95,42 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.init()
|
|
|
+ this.initForm()
|
|
|
},
|
|
|
methods: {
|
|
|
+ initForm() {
|
|
|
+ echarts.registerTheme('blueTheme', echartsTheme)
|
|
|
+ const dom = document.getElementById('form')
|
|
|
+ const form = echarts.init(dom,'blueTheme',{
|
|
|
+ renderer: 'canvas',
|
|
|
+ width: dom.offsetWidth,
|
|
|
+ height: dom.offsetHeight
|
|
|
+ })
|
|
|
+ form.setOption({
|
|
|
+ xAxis: {
|
|
|
+ type: 'category',
|
|
|
+ boundaryGap: false,
|
|
|
+ data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: 'value'
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'axis',
|
|
|
+ formatter: (params) => {
|
|
|
+ return params[0].name + '<br/>新增' + params[0].data + '观众'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ data: [200, 932, 901, 934, 1290, 1330, 1320],
|
|
|
+ type: 'line',
|
|
|
+ smooth: true,
|
|
|
+ areaStyle: {}
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ })
|
|
|
+ },
|
|
|
init() {
|
|
|
getExpoList(1, 20).then(res => {
|
|
|
const expoList = res.data.data
|
|
|
@@ -113,8 +184,8 @@ export default {
|
|
|
.grid-box{
|
|
|
display: grid;
|
|
|
grid-gap: 16px;
|
|
|
- grid-template-rows: 200px 200px 200px;
|
|
|
- grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
|
|
|
+ grid-template-rows: 280px 200px 200px;
|
|
|
+ grid-template-columns: repeat(12, 1fr);
|
|
|
.card{
|
|
|
cursor: pointer;
|
|
|
transition-duration: 300ms;
|
|
|
@@ -127,11 +198,21 @@ export default {
|
|
|
font-weight: bold;
|
|
|
margin-bottom: 16px;
|
|
|
position: relative;
|
|
|
+ .num{
|
|
|
+ margin-right: 4px;
|
|
|
+ font-size: 42px;
|
|
|
+ }
|
|
|
+ &:has(.num){
|
|
|
+ margin-top: -18px;
|
|
|
+ }
|
|
|
}
|
|
|
.desc{
|
|
|
width: 80%;
|
|
|
position: relative;
|
|
|
}
|
|
|
+ .card-content{
|
|
|
+ margin-top: 16px;
|
|
|
+ }
|
|
|
.icon{
|
|
|
opacity: 0.1;
|
|
|
font-size: 150px;
|
|
|
@@ -146,8 +227,51 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .starter-box{
|
|
|
+ .card-box{
|
|
|
+ padding: 0;
|
|
|
grid-column: span 2;
|
|
|
+ display: grid;
|
|
|
+ grid-gap: 16px;
|
|
|
+ grid-template-rows: repeat(3, 1fr);
|
|
|
+ .card-item{
|
|
|
+ position: relative;
|
|
|
+ padding: 0 18px;
|
|
|
+ border-radius: 8px;
|
|
|
+ background-image: linear-gradient(150deg,#759BE8, #8dace6);
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ color: white;
|
|
|
+ gap: 16px;
|
|
|
+ transition-duration: 300ms;
|
|
|
+ text-decoration: none;
|
|
|
+ &:hover{
|
|
|
+ box-shadow: inset 0 0 0 50px #ffffff18;
|
|
|
+ }
|
|
|
+ .goto-icon{
|
|
|
+ font-size: 16px;
|
|
|
+ //font-weight: bold;
|
|
|
+ position: absolute;
|
|
|
+ right: 10px;
|
|
|
+ top: 10px;
|
|
|
+ }
|
|
|
+ .card-icon{
|
|
|
+ //font-weight: bold;
|
|
|
+ font-size: 25px;
|
|
|
+ }
|
|
|
+ .card-info{
|
|
|
+ flex: 1;
|
|
|
+ .title{
|
|
|
+ font-size: 17px;
|
|
|
+ margin-bottom: 2px;
|
|
|
+ }
|
|
|
+ .describe{
|
|
|
+ font-size: 12.4px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .starter-box{
|
|
|
+ grid-column: span 4;
|
|
|
background: #e1f8f8;
|
|
|
color: #117878;
|
|
|
&:hover{
|
|
|
@@ -155,7 +279,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.invitation-box{
|
|
|
- grid-column: span 2;
|
|
|
+ grid-column: span 4;
|
|
|
background: #fbf3e7;
|
|
|
color: #88601f;
|
|
|
&:hover{
|
|
|
@@ -163,42 +287,73 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.main-card{
|
|
|
- grid-column: span 6;
|
|
|
- background: $menuActiveBg;
|
|
|
- padding: 36px 36px 18px;
|
|
|
- border-radius: 8px;
|
|
|
- .hello-text{
|
|
|
- color: $menuActiveText;
|
|
|
- font-size: 28px;
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
- .card-content{
|
|
|
- margin-top: 16px;
|
|
|
- display: grid;
|
|
|
- grid-template-columns: 1fr 2fr;
|
|
|
- .expo-text{
|
|
|
-
|
|
|
+ grid-column: span 10;
|
|
|
+ background: #759be8;
|
|
|
+ color: white;
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: auto 1fr;
|
|
|
+ overflow: hidden;
|
|
|
+ .form{
|
|
|
+ position: relative;
|
|
|
+ .form-inner{
|
|
|
+ position: absolute;
|
|
|
+ bottom: -18px;
|
|
|
+ right: -36px;
|
|
|
+ width: calc(110% + 64px);
|
|
|
+ height: 100%;
|
|
|
+ &::after{
|
|
|
+ pointer-events: none;
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 30%;
|
|
|
+ height: 100%;
|
|
|
+ background-image: linear-gradient(90deg, #759BE8ff, #759BE800);
|
|
|
+ }
|
|
|
}
|
|
|
- .quick-nav{
|
|
|
+ }
|
|
|
+ .left-box{
|
|
|
+ position: relative;
|
|
|
+ z-index: 2;
|
|
|
+ .button-list{
|
|
|
+ margin-top: 60px;
|
|
|
+ height: 70px;
|
|
|
display: flex;
|
|
|
- justify-content: flex-end;
|
|
|
- .nav-item{
|
|
|
- transition-duration: 300ms;
|
|
|
- padding: 16px 32px;
|
|
|
- border-radius: 16px;
|
|
|
- text-decoration: unset;
|
|
|
- color: $menuActiveText;
|
|
|
+ .card-button{
|
|
|
+ width: 180px;
|
|
|
+ padding: 8px 14px 8px 8px;
|
|
|
display: flex;
|
|
|
- flex-direction: column;
|
|
|
- .icon{
|
|
|
- margin-bottom: 4px;
|
|
|
- font-size: 32px;
|
|
|
+ gap: 12px;
|
|
|
+ cursor: pointer;
|
|
|
+ border-radius: 16px;
|
|
|
+ transition-duration: 300ms;
|
|
|
+ color: white;
|
|
|
+ text-decoration: none;
|
|
|
+ &:hover{
|
|
|
+ background-color: #ffffff20;
|
|
|
}
|
|
|
- .text{
|
|
|
- font-size: 16px;
|
|
|
+ .info-box{
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ .text{
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ .value{
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
}
|
|
|
- &:hover{
|
|
|
- background: #004DFF11;
|
|
|
+ .button-icon{
|
|
|
+ font-size: 28px;
|
|
|
+ border-radius: 14px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ background: #ffffff44;
|
|
|
+ height: 54px;
|
|
|
+ width: 54px;
|
|
|
}
|
|
|
}
|
|
|
}
|