| | |
| | | <el-row :gutter="40" class="panel-group"> |
| | | <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> |
| | | <div class="card-panel"> |
| | | <div class="card-panel-icon-wrapper icon-people"> |
| | | <svg-icon icon-class="exam" class-name="card-panel-icon"/> |
| | | </div> |
| | | <div class="card-panel-description"> |
| | | <div class="card-panel-text"> |
| | | 试卷总数 |
| | | <el-row class="panel-group"> |
| | | <div class="card-panel-icon-wrapper icon-people"> |
| | | <svg-icon icon-class="list" class-name="card-panel-icon"/> |
| | | </div> |
| | | <count-to :start-val="0" :end-val="examPaperCount" :duration="2600" class="card-panel-num" v-loading="loading"/> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> |
| | | <div class="card-panel" > |
| | | <div class="card-panel-icon-wrapper icon-message"> |
| | | <svg-icon icon-class="question" class-name="card-panel-icon"/> |
| | | </div> |
| | | <div class="card-panel-description"> |
| | | <div class="card-panel-text"> |
| | | 题目总数 |
| | | <div class="card-panel-description"> |
| | | <div class="card-panel-text"> |
| | | <p>考试列表</p> |
| | | </div> |
| | | </div> |
| | | <count-to :start-val="0" :end-val="questionCount" :duration="3000" class="card-panel-num" v-loading="loading"/> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> |
| | | <div class="card-panel"> |
| | | <div class="card-panel-icon-wrapper icon-shopping"> |
| | | <svg-icon icon-class="doexampaper" class-name="card-panel-icon"/> |
| | | </div> |
| | | <div class="card-panel-description"> |
| | | <div class="card-panel-text"> |
| | | 答卷总数 |
| | | </div> |
| | | <count-to :start-val="0" :end-val="doExamPaperCount" :duration="3600" class="card-panel-num" v-loading="loading"/> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> |
| | | <div class="card-panel"> |
| | | <div class="card-panel-icon-wrapper icon-money"> |
| | | <svg-icon icon-class="doquestion" class-name="card-panel-icon"/> |
| | | </div> |
| | | <div class="card-panel-description"> |
| | | <div class="card-panel-text"> |
| | | 答题总数 |
| | | </div> |
| | | <count-to :start-val="0" :end-val="doQuestionCount" :duration="3200" class="card-panel-num" v-loading="loading"/> |
| | | </div> |
| | | </el-row> |
| | | <el-row class="panel-group"> |
| | | <el-input v-model="query.examName" placeholder="请输入考试名称" style="width: 70%;margin-bottom: 10px;margin-left: 10px;" size="small" @input="getExamList"/> |
| | | <el-button type="primary" size="small" @click="getExamList">查询</el-button> |
| | | </el-row> |
| | | <el-row class="panel-group"> |
| | | <el-table :data="examList" style="width: 100%;" height="430"> |
| | | <el-table-column label="考试名称" prop="examName"></el-table-column> |
| | | <el-table-column label="考试状态" prop="status"></el-table-column> |
| | | </el-table> |
| | | </el-row> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | import resize from './components/mixins/resize' |
| | | import CountTo from 'vue-count-to' |
| | | import dashboardApi from '@/api/dashboard' |
| | | import {getExamList} from "@/api/exam"; |
| | | import exam from "@/store/modules/exam"; |
| | | export default { |
| | | mixins: [resize], |
| | | components: { |
| | |
| | | }, |
| | | data () { |
| | | return { |
| | | // 考试列表 |
| | | examList: [], |
| | | // 考试查询条件 |
| | | query:{ |
| | | examName: '', |
| | | }, |
| | | examPaperCount: 0, |
| | | questionCount: 0, |
| | | doExamPaperCount: 0, |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | getExamList() { |
| | | let _this = this |
| | | getExamList(this.query).then(res => { |
| | | let response = res.data |
| | | _this.examList = response.data |
| | | }) |
| | | }, |
| | | option (title, formatter, label, vaule) { |
| | | return { |
| | | title: { |
| | |
| | | }] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.getExamList() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | |
| | | .dashboard-container { |
| | | padding: 32px; |
| | | background-color: rgb(240, 242, 245); |
| | | .dashboard-container { |
| | | padding: 32px; |
| | | background-color: rgb(240, 242, 245); |
| | | position: relative; |
| | | |
| | | .chart-wrapper { |
| | | background: #fff; |
| | | padding: 16px 16px 0; |
| | | margin-bottom: 32px; |
| | | } |
| | | } |
| | | |
| | | @media (max-width: 1024px) { |
| | | .chart-wrapper { |
| | | padding: 8px; |
| | | } |
| | | } |
| | | |
| | | .dashboard-editor-container { |
| | | padding: 32px; |
| | | background-color: rgb(240, 242, 245); |
| | | position: relative; |
| | | |
| | | .github-corner { |
| | | position: absolute; |
| | | top: 0px; |
| | | border: 0; |
| | | right: 0; |
| | | } |
| | | |
| | | .chart-wrapper { |
| | | background: #fff; |
| | | padding: 16px 16px 0; |
| | | margin-bottom: 32px; |
| | | } |
| | | } |
| | | |
| | | @media (max-width: 1024px) { |
| | | .chart-wrapper { |
| | | padding: 8px; |
| | | } |
| | | } |
| | | |
| | | .panel-group { |
| | | margin-top: 8px; |
| | | |
| | | .card-panel-col { |
| | | margin-bottom: 32px; |
| | | } |
| | | |
| | | .card-panel { |
| | | height: 600px; |
| | | 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); |
| | | |
| | | .chart-wrapper { |
| | | background: #fff; |
| | | padding: 16px 16px 0; |
| | | margin-bottom: 32px; |
| | | } |
| | | } |
| | | |
| | | @media (max-width: 1024px) { |
| | | .chart-wrapper { |
| | | padding: 8px; |
| | | } |
| | | } |
| | | |
| | | .dashboard-editor-container { |
| | | padding: 32px; |
| | | background-color: rgb(240, 242, 245); |
| | | position: relative; |
| | | |
| | | .github-corner { |
| | | position: absolute; |
| | | top: 0px; |
| | | border: 0; |
| | | right: 0; |
| | | } |
| | | |
| | | .chart-wrapper { |
| | | background: #fff; |
| | | padding: 16px 16px 0; |
| | | margin-bottom: 32px; |
| | | } |
| | | } |
| | | |
| | | @media (max-width: 1024px) { |
| | | .chart-wrapper { |
| | | padding: 8px; |
| | | } |
| | | } |
| | | |
| | | .panel-group { |
| | | margin-top: 18px; |
| | | |
| | | .card-panel-col { |
| | | margin-bottom: 32px; |
| | | } |
| | | |
| | | .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-people { |
| | | background: #40c9c6; |
| | | } |
| | | |
| | | .icon-message { |
| | | background: #36a3f7; |
| | | } |
| | | |
| | | .icon-money { |
| | | background: #f4516c; |
| | | } |
| | | |
| | | .icon-shopping { |
| | | background: #34bfa3 |
| | | } |
| | | &:hover { |
| | | .card-panel-icon-wrapper { |
| | | color: #fff; |
| | | } |
| | | |
| | | .icon-people { |
| | | color: #40c9c6; |
| | | background: #40c9c6; |
| | | } |
| | | |
| | | .icon-message { |
| | | color: #36a3f7; |
| | | background: #36a3f7; |
| | | } |
| | | |
| | | .icon-money { |
| | | color: #f4516c; |
| | | background: #f4516c; |
| | | } |
| | | |
| | | .icon-shopping { |
| | | color: #34bfa3 |
| | | } |
| | | |
| | | .card-panel-icon-wrapper { |
| | | float: left; |
| | | margin: 14px 0 0 14px; |
| | | padding: 16px; |
| | | transition: all 0.38s ease-out; |
| | | border-radius: 6px; |
| | | } |
| | | |
| | | .card-panel-icon { |
| | | float: left; |
| | | font-size: 48px; |
| | | } |
| | | |
| | | .card-panel-description { |
| | | float: right; |
| | | font-weight: bold; |
| | | margin: 26px; |
| | | margin-left: 0px; |
| | | |
| | | .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; |
| | | } |
| | | background: #34bfa3 |
| | | } |
| | | } |
| | | } |
| | | |
| | | @media (max-width: 550px) { |
| | | .card-panel-description { |
| | | display: none; |
| | | .icon-people { |
| | | color: #40c9c6; |
| | | } |
| | | |
| | | .icon-message { |
| | | color: #36a3f7; |
| | | } |
| | | |
| | | .icon-money { |
| | | color: #f4516c; |
| | | } |
| | | |
| | | .icon-shopping { |
| | | color: #34bfa3 |
| | | } |
| | | |
| | | .card-panel-icon-wrapper { |
| | | float: none !important; |
| | | width: 100%; |
| | | height: 100%; |
| | | margin: 0 !important; |
| | | float: left; |
| | | margin: 14px 0 0 14px; |
| | | padding: 16px; |
| | | transition: all 0.38s ease-out; |
| | | border-radius: 6px; |
| | | } |
| | | |
| | | .svg-icon { |
| | | display: block; |
| | | margin: 14px auto !important; |
| | | float: none !important; |
| | | .card-panel-icon { |
| | | float: left; |
| | | font-size: 48px; |
| | | } |
| | | |
| | | .card-panel-description { |
| | | float: right; |
| | | font-weight: bold; |
| | | margin: 26px; |
| | | margin-left: 0px; |
| | | |
| | | .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; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .echarts-line{ |
| | | background:#fff; |
| | | padding:16px 16px 0; |
| | | margin-bottom:32px; |
| | | @media (max-width: 550px) { |
| | | .card-panel-description { |
| | | display: none; |
| | | } |
| | | |
| | | .card-panel-icon-wrapper { |
| | | float: none !important; |
| | | width: 100%; |
| | | height: 100%; |
| | | margin: 0 !important; |
| | | |
| | | .svg-icon { |
| | | display: block; |
| | | margin: 14px auto !important; |
| | | float: none !important; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .echarts-line{ |
| | | background:#fff; |
| | | padding:16px 16px 0; |
| | | margin-bottom:32px; |
| | | } |
| | | </style> |