| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="部门:" v-if="true"> |
| | | <el-select v-model="queryParam.departmentId" placeholder="部门" clearable> |
| | | <el-select v-model="queryParam.departmentId" filterable placeholder="部门" clearable> |
| | | <el-option v-for="item in levelEnum" :key="item.key" :value="item.key" :label="item.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { mapGetters, mapState, mapActions } from 'vuex'; |
| | | import { mapGetters, mapState } from 'vuex'; |
| | | import dashboardApi from '@/api/dashboard'; |
| | | |
| | | const colorList = ['#3498DB', '#E74C3C', '#F1C40F', '#95A5A6', '#8E44AD', '#F39C12', '#D35400']; |
| | |
| | | }; |
| | | const scoreLabel = { |
| | | 'score0To59': '小于60分', |
| | | 'score60To79': '60-79分', |
| | | 'score80To100': '80-100分' |
| | | 'score60To69': '60-69分', |
| | | 'score70To79': '70-79分', |
| | | 'score80To89': '80-89分', |
| | | 'score90To100': '90-100分' |
| | | }; |
| | | const pieLabel = { |
| | | 'totalAbsent': '参与考试', |
| | | 'totalAttended': '未参与考试' |
| | | 'totalAttended': '参与考试', |
| | | 'totalAbsent': '未参与考试' |
| | | }; |
| | | let ageChart = null; |
| | | let scroeChart = null; |
| | |
| | | data() { |
| | | return { |
| | | examPaperList: [], |
| | | max: '', |
| | | min: '', |
| | | avg: '', |
| | | chartLoading1: false, |
| | | chartLoading2: false, |
| | | chartLoading3: false, |
| | | loading: false, |
| | | examPaperCount: 0, |
| | | questionCount: 0, |
| | | doExamPaperCount: 0, |
| | | doQuestionCount: 0, |
| | | echartsUserAction: null, |
| | | queryParam: { |
| | | examPaperId: '85', |
| | | departmentId: '', |
| | | subjectId: null, |
| | | pageIndex: 1, |
| | | pageSize: 10 |
| | | }, |
| | | listLoading: false |
| | | examPaperId: '', |
| | | departmentId: '' |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | dashboardApi.examPaperList().then(res => { |
| | | this.examPaperList = res.response; |
| | | }); |
| | | }, |
| | | mounted() { |
| | | ageChart = echarts.init(this.$refs.ageChart); |
| | | scroeChart = echarts.init(this.$refs.scoreChart); |
| | | peopleChart = echarts.init(this.$refs.peopleChart); |
| | | this.getChartData(); |
| | | this.observe(); |
| | | dashboardApi.examPaperList().then(res => { |
| | | this.examPaperList = res.response; |
| | | this.queryParam.examPaperId = this.examPaperList[0].id |
| | | this.getChartData(); |
| | | this.observe(); |
| | | }); |
| | | }, |
| | | methods: { |
| | | getChartData() { |
| | |
| | | const { age, score, examPeopleNum } = re.response; |
| | | |
| | | const ageOption = this.barOption('年龄段统计', age, ageLabel); |
| | | const scoreOption = this.barOption('考试成绩统计', score, scoreLabel); |
| | | const peopleOption = this.pieOption('考试情况', examPeopleNum, pieLabel); |
| | | const scoreOption = this.barOption('分数段统计', score, scoreLabel); |
| | | const peopleOption = this.pieOption('考试人数', examPeopleNum, pieLabel); |
| | | |
| | | ageChart.setOption(ageOption, true); |
| | | scroeChart.setOption(scoreOption, true); |
| | |
| | | text: title, |
| | | x: 'left' |
| | | }, |
| | | color: colorList, |
| | | color: ['#E74C3C', '#3498DB', '#F1C40F', '#95A5A6', '#8E44AD', '#F39C12', '#D35400'], |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | |
| | | |
| | | }, |
| | | submitForm() { |
| | | this.queryParam.pageIndex = 1; |
| | | this.getChartData(); |
| | | }, |
| | | |
| | |
| | | <el-table-column prop="nowDepartmentName" label="原部门名称" /> |
| | | <el-table-column prop="result" label="审核结果"> |
| | | <template slot-scope="{row}"> |
| | | <el-tag :type="row.result === '审核通过' ? 'success' : row.result === '审核失败' ? 'danger' : 'info'">{{row.result}}</el-tag> |
| | | <el-tag :type="row.result === '审核通过' ? 'success' : row.result === '审核驳回' ? 'danger' : 'info'">{{row.result}}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createUserName" label="创建人" /> |