|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<el-main>
|
|
|
- <div class="mb-4 flex items-center gap-2 flex-wrap">
|
|
|
+ <div class="mb-4 flex items-center gap-2 flex-wrap" v-if="isAdmin">
|
|
|
<el-select v-model="selectedChannel" placeholder="请选择渠道" @change="handleChannelChange" v-if="isAdmin">
|
|
|
<el-option label="全部渠道" value="" />
|
|
|
<el-option v-for="item in channelStore.channelOptions" :key="item" :label="item" :value="item" />
|
|
|
@@ -9,7 +9,7 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 今日数据表格 -->
|
|
|
- <el-card class="mb-4">
|
|
|
+ <el-card class="mb-4" v-if="isAdmin">
|
|
|
<template #header>
|
|
|
<div class="flex items-center justify-between">
|
|
|
<span>今日数据统计</span>
|
|
|
@@ -51,7 +51,7 @@
|
|
|
</el-card>
|
|
|
|
|
|
<!-- 折线图 -->
|
|
|
- <el-card>
|
|
|
+ <el-card v-if="isAdmin">
|
|
|
<template #header>
|
|
|
<div class="flex items-center justify-between">
|
|
|
<span>数据统计</span>
|
|
|
@@ -74,6 +74,7 @@
|
|
|
</template>
|
|
|
<div ref="chartRef" style="width: 100%; height: 400px"></div>
|
|
|
</el-card>
|
|
|
+ <div class="text-center text-2xl" v-if="!isAdmin">Welcome</div>
|
|
|
</el-main>
|
|
|
</template>
|
|
|
|