|
@@ -1,15 +1,15 @@
|
|
|
<script setup lang="ts">
|
|
|
import DataCard from "@/views/dashboard/components/DataCard.vue";
|
|
|
-import ExampleDialog from "@/views/dashboard/components/ExampleDialog.vue";
|
|
|
import LiquidChart from "@/views/dashboard/components/liquidChart.vue";
|
|
|
import CircleChart from "@/views/dashboard/components/CircleChart.vue";
|
|
|
+import BarChart from "@/views/dashboard/components/BarChart.vue";
|
|
|
defineOptions({
|
|
|
// eslint-disable-next-line vue/no-reserved-component-names
|
|
|
name: "Dashboard",
|
|
|
inheritAttrs: false,
|
|
|
});
|
|
|
// import { getClassList, getSchoolList } from "@/api/school";
|
|
|
-import { ClassList } from "@/api/school/types";
|
|
|
+import { ClassList, SchoolList } from "@/api/school/types";
|
|
|
import { watch } from "vue";
|
|
|
import { useUserStore } from "@/store/modules/user";
|
|
|
const userStore = useUserStore();
|
|
@@ -38,10 +38,16 @@ const trainingCount = 2000;
|
|
|
*/
|
|
|
// 班级编号
|
|
|
let classNumber = ref(0);
|
|
|
-const classData = ref<ClassList[]>([]);
|
|
|
+const classData = ref<ClassList[]>([
|
|
|
+ {
|
|
|
+ id: 0,
|
|
|
+ school_id: 0,
|
|
|
+ name: "全部班级",
|
|
|
+ },
|
|
|
+]);
|
|
|
// function queryClassList() {
|
|
|
// getClassList().then(({ data }) => {
|
|
|
-// classData.value = data;
|
|
|
+// classData.value.concat(data);
|
|
|
// });
|
|
|
// }
|
|
|
watch(
|
|
@@ -71,85 +77,124 @@ const dialogVisible = ref(false);
|
|
|
/>
|
|
|
|
|
|
<!-- 班级选择 及 案例展示 -->
|
|
|
- <el-row class="row-bg">
|
|
|
- <el-col :span="12">
|
|
|
- <el-select v-model="classNumber" placeholder="全部班级" size="large">
|
|
|
- <el-option
|
|
|
- v-for="item in classData"
|
|
|
- :key="item.id"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-button text @click="dialogVisible = true"
|
|
|
- >优秀教学效果示例</el-button
|
|
|
- >
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
-
|
|
|
- <!-- Echarts 图表 -->
|
|
|
- <el-row :gutter="40">
|
|
|
- <el-col :sm="24" :lg="6" class="mb-4">
|
|
|
- <LiquidChart
|
|
|
- id="liquidChart1"
|
|
|
- data="37.5"
|
|
|
- height="200px"
|
|
|
- width="200px"
|
|
|
- color="#56a2ff"
|
|
|
- bg-color="#e6edf9"
|
|
|
- class="bg-[var(--el-bg-color-overlay)]"
|
|
|
- />
|
|
|
- </el-col>
|
|
|
- <el-col :sm="24" :lg="6" class="mb-4">
|
|
|
- <LiquidChart
|
|
|
- id="liquidChart2"
|
|
|
- data="57.6"
|
|
|
- height="200px"
|
|
|
- width="200px"
|
|
|
- color="#646bfa"
|
|
|
- bg-color="#e6e8f9"
|
|
|
- class="bg-[var(--el-bg-color-overlay)]"
|
|
|
+ <div class="class-select clear">
|
|
|
+ <el-select v-model="classNumber" placeholder="全部班级" size="large">
|
|
|
+ <el-option
|
|
|
+ v-for="item in classData"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
/>
|
|
|
+ </el-select>
|
|
|
+ <router-link to="/dashboard/example">优秀教学效果示例</router-link>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- Echarts 图表-->
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :md="24" :lg="8">
|
|
|
+ <div class="charts-item">
|
|
|
+ <p class="title">学员专注力平均值整体对比分析</p>
|
|
|
+ <el-row justify="space-between">
|
|
|
+ <el-col :span="12">
|
|
|
+ <div class="item">
|
|
|
+ <LiquidChart
|
|
|
+ id="liquidChart1"
|
|
|
+ data="37.5"
|
|
|
+ height="200px"
|
|
|
+ width="200px"
|
|
|
+ color="#3a7fc2"
|
|
|
+ bg-color="#accded"
|
|
|
+ class="chart"
|
|
|
+ />
|
|
|
+ <p>全体学员初期</p>
|
|
|
+ <p>专注力评估均值</p>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <div class="item">
|
|
|
+ <LiquidChart
|
|
|
+ id="liquidChart2"
|
|
|
+ data="57.6"
|
|
|
+ height="200px"
|
|
|
+ width="200px"
|
|
|
+ color="#5563ac"
|
|
|
+ bg-color="#e4e7f4"
|
|
|
+ class="chart"
|
|
|
+ />
|
|
|
+ <p>全体学员训练近期</p>
|
|
|
+ <p>专注力评估均值</p>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row justify="space-between">
|
|
|
+ <el-col :span="12">
|
|
|
+ <div class="item">
|
|
|
+ <CircleChart
|
|
|
+ id="circleChart1"
|
|
|
+ data="37.5"
|
|
|
+ height="200px"
|
|
|
+ width="200px"
|
|
|
+ color="#3a7fc2"
|
|
|
+ bg-color="#e4e7f4"
|
|
|
+ class="chart"
|
|
|
+ />
|
|
|
+ <p>初期训练</p>
|
|
|
+ <p>专注力50以上人数比例</p>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <div class="item">
|
|
|
+ <CircleChart
|
|
|
+ id="circleChart2"
|
|
|
+ data="57.6"
|
|
|
+ height="200px"
|
|
|
+ width="200px"
|
|
|
+ color="#5563ac"
|
|
|
+ bg-color="#e4e7f4"
|
|
|
+ class="chart"
|
|
|
+ />
|
|
|
+ <p>近期训练</p>
|
|
|
+ <p>专注力50以上人数比例</p>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
</el-col>
|
|
|
- <el-col :sm="24" :lg="6" class="mb-4">
|
|
|
- <CircleChart
|
|
|
- id="circleChart1"
|
|
|
- data="37.5"
|
|
|
- height="200px"
|
|
|
- width="200px"
|
|
|
- color="#56a2ff"
|
|
|
- bg-color="#e6edf9"
|
|
|
- class="bg-[var(--el-bg-color-overlay)]"
|
|
|
- />
|
|
|
- </el-col>
|
|
|
- <el-col :sm="24" :lg="6" class="mb-4">
|
|
|
- <CircleChart
|
|
|
- id="circleChart2"
|
|
|
- data="57.6"
|
|
|
- height="200px"
|
|
|
- width="200px"
|
|
|
- color="#646bfa"
|
|
|
- bg-color="#e6e8f9"
|
|
|
- class="bg-[var(--el-bg-color-overlay)]"
|
|
|
- />
|
|
|
+ <!-- 学员专注力评分分级占比分析 -->
|
|
|
+ <el-col :md="24" :lg="16">
|
|
|
+ <div class="charts-item">
|
|
|
+ <p class="title">学员专注力评分分级占比分析</p>
|
|
|
+ <el-row justify="space-between">
|
|
|
+ <el-col :span="12">
|
|
|
+ <div class="bar">
|
|
|
+ <BarChart
|
|
|
+ id="barChart1"
|
|
|
+ width="460px"
|
|
|
+ height="500px"
|
|
|
+ title="全体学员初期训练专注力评分占比"
|
|
|
+ percent-data="5,5,65,10,10"
|
|
|
+ number-data="1,2,13,2,2"
|
|
|
+ class="chart"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <div class="bar">
|
|
|
+ <BarChart
|
|
|
+ id="barChart2"
|
|
|
+ width="460px"
|
|
|
+ height="500px"
|
|
|
+ title="全体学员初期训练专注力评分占比"
|
|
|
+ percent-data="10,25,65,30,10"
|
|
|
+ number-data="1,2,13,6,10"
|
|
|
+ class="chart"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
-
|
|
|
- <!-- 优秀教学效果示例弹出层 -->
|
|
|
- <el-dialog
|
|
|
- v-model="dialogVisible"
|
|
|
- title="学员每次训练专注力评分均值整体变化曲线"
|
|
|
- center
|
|
|
- >
|
|
|
- <ExampleDialog />
|
|
|
- <template #footer>
|
|
|
- <span class="dialog-footer">
|
|
|
- <el-button @click="dialogVisible = false">关闭</el-button>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -158,4 +203,76 @@ const dialogVisible = ref(false);
|
|
|
position: relative;
|
|
|
padding: 24px;
|
|
|
}
|
|
|
+.class-select {
|
|
|
+ margin: 30px auto;
|
|
|
+ .el-select {
|
|
|
+ width: 160px;
|
|
|
+ margin: 0 20px 0 0;
|
|
|
+ }
|
|
|
+ a {
|
|
|
+ display: inline-block;
|
|
|
+ height: 38px;
|
|
|
+ line-height: 38px;
|
|
|
+ padding: 0 30px;
|
|
|
+ background: #4284f2;
|
|
|
+ border-radius: 12px;
|
|
|
+ color: #ffffff;
|
|
|
+ }
|
|
|
+}
|
|
|
+/* 自定义 el-select 样式 */
|
|
|
+:deep(.el-input__wrapper) {
|
|
|
+ background: #ffffff;
|
|
|
+ border-radius: 12px;
|
|
|
+}
|
|
|
+
|
|
|
+/* el-select 各种边框线隐藏**/
|
|
|
+:deep(.el-select) {
|
|
|
+ --el-select-input-focus-border-color: none !important;
|
|
|
+}
|
|
|
+:deep(.el-input__wrapper) {
|
|
|
+ box-shadow: none !important;
|
|
|
+}
|
|
|
+:deep(.el-select .el-input.is-focus .el-input__wrapper) {
|
|
|
+ box-shadow: none !important;
|
|
|
+}
|
|
|
+:deep(.el-select .el-input__wrapper.is-focus) {
|
|
|
+ box-shadow: none !important;
|
|
|
+}
|
|
|
+:deep(.el-select:hover:not(.el-select--disabled) .el-input__wrapper) {
|
|
|
+ box-shadow: none !important;
|
|
|
+}
|
|
|
+
|
|
|
+.charts-item {
|
|
|
+ background: #ffffff;
|
|
|
+ border: 1px solid #e8eaec;
|
|
|
+ border-radius: 24px;
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ .title {
|
|
|
+ margin: 0;
|
|
|
+ height: 78px;
|
|
|
+ line-height: 78px;
|
|
|
+ text-align: left;
|
|
|
+ text-indent: 2em;
|
|
|
+ font-size: 18px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .item {
|
|
|
+ padding-bottom: 30px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .chart {
|
|
|
+ margin: 0 auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ p {
|
|
|
+ margin: 0;
|
|
|
+ line-height: 24px;
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .bar {
|
|
|
+ margin-top: 60px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|