|
@@ -0,0 +1,311 @@
|
|
|
+<template>
|
|
|
+ <el-container>
|
|
|
+ <el-header> <div class="header-title">考试概览</div> </el-header>
|
|
|
+ <el-main>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form>
|
|
|
+ <el-form-item label="考试批次">
|
|
|
+ <el-select
|
|
|
+ v-model="examId"
|
|
|
+ filterable
|
|
|
+ remote
|
|
|
+ :remote-method="getExams"
|
|
|
+ clearable
|
|
|
+ @clear="getExams"
|
|
|
+ @change="changeExam"
|
|
|
+ placeholder="请选择考试批次"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in examList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="10" class="chart-border">
|
|
|
+ <div class="chart-header">考试进度情况</div>
|
|
|
+ <examSummaryPie :examId="examId"></examSummaryPie>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1"> </el-col>
|
|
|
+ <el-col :span="13" class="chart-border">
|
|
|
+ <div class="chart-header">课程完成进度TOP5</div>
|
|
|
+ <examSummaryLine :examId="examId"></examSummaryLine>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="margin-top:10px;">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-tabs type="card" v-model="activeName" @tab-click="handleClick">
|
|
|
+ <el-tab-pane label="学习中心完成进度" name="first">
|
|
|
+ <el-row style="margin-top:20px;">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form>
|
|
|
+ <el-form-item label="学习中心">
|
|
|
+ <el-select
|
|
|
+ v-model="orgId"
|
|
|
+ filterable
|
|
|
+ remote
|
|
|
+ :remote-method="getOrgs"
|
|
|
+ clearable
|
|
|
+ @clear="getOrgs"
|
|
|
+ @change="getOrgExamInfos"
|
|
|
+ placeholder="请选择学习中心"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in orgList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-table
|
|
|
+ element-loading-text="数据加载中"
|
|
|
+ :data="orgExamInfos"
|
|
|
+ border
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ sortable
|
|
|
+ label="学习中心代码"
|
|
|
+ prop="orgCode"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ sortable
|
|
|
+ label="学习中心名称"
|
|
|
+ prop="orgName"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ sortable
|
|
|
+ label="报考人数"
|
|
|
+ prop="totalCount"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ sortable
|
|
|
+ label="实考人数"
|
|
|
+ prop="finishedCount"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ sortable
|
|
|
+ label="完成比率"
|
|
|
+ prop="finishedPercent"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="课程完成进度" name="two">
|
|
|
+ <el-row style="margin-top:20px;">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form>
|
|
|
+ <el-form-item label="课程">
|
|
|
+ <el-select
|
|
|
+ v-model="courseId"
|
|
|
+ filterable
|
|
|
+ remote
|
|
|
+ :remote-method="getCourses"
|
|
|
+ clearable
|
|
|
+ @clear="getCourses"
|
|
|
+ @change="getCourseProgress"
|
|
|
+ placeholder="请选择课程"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in courseList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-table
|
|
|
+ element-loading-text="数据加载中"
|
|
|
+ :data="courseProgressList"
|
|
|
+ border
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ sortable
|
|
|
+ label="课程名称"
|
|
|
+ prop="courseName"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ sortable
|
|
|
+ label="课程代码"
|
|
|
+ prop="courseCode"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column sortable label="报考人数" prop="allNum">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ sortable
|
|
|
+ label="实考人数"
|
|
|
+ prop="completedNum"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ sortable
|
|
|
+ label="完成比率"
|
|
|
+ prop="completedProportion"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-main>
|
|
|
+ </el-container>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import { mapState } from "vuex";
|
|
|
+import examSummaryPie from "../component/examSummaryPie.vue";
|
|
|
+import examSummaryLine from "../component/examSummaryLine.vue";
|
|
|
+export default {
|
|
|
+ components: { examSummaryPie, examSummaryLine },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ examList: [],
|
|
|
+ orgList: [],
|
|
|
+ courseList: [],
|
|
|
+ examId: "",
|
|
|
+ orgId: "",
|
|
|
+ courseId: "",
|
|
|
+ activeName: "first",
|
|
|
+ orgExamInfos: [],
|
|
|
+ courseProgressList: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState({ user: state => state.user })
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getExams(examName) {
|
|
|
+ if (!examName) {
|
|
|
+ examName = "";
|
|
|
+ }
|
|
|
+ this.$http
|
|
|
+ .get("/api/ecs_exam_work/exam/queryByNameLike", {
|
|
|
+ params: { name: examName }
|
|
|
+ })
|
|
|
+ .then(response => {
|
|
|
+ this.examList = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getOrgs(orgName) {
|
|
|
+ if (!orgName) {
|
|
|
+ orgName = "";
|
|
|
+ }
|
|
|
+ var rootOrgId = this.user.rootOrgId;
|
|
|
+ this.$http
|
|
|
+ .get("/api/ecs_core/org/query", {
|
|
|
+ params: {
|
|
|
+ name: orgName,
|
|
|
+ rootOrgId: rootOrgId,
|
|
|
+ enable: true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .then(response => {
|
|
|
+ this.orgList = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleClick(tab, event) {
|
|
|
+ console.log(tab, event);
|
|
|
+ },
|
|
|
+ getOrgExamInfos() {
|
|
|
+ this.$http
|
|
|
+ .post(
|
|
|
+ "/api/ecs_oe_admin/exam/student/statistic/by/org?examId=" +
|
|
|
+ this.examId +
|
|
|
+ "&orgId=" +
|
|
|
+ this.orgId
|
|
|
+ )
|
|
|
+ .then(response => {
|
|
|
+ if (response.data && response.data.length > 0) {
|
|
|
+ this.orgExamInfos = response.data;
|
|
|
+ } else {
|
|
|
+ this.orgExamInfos = [];
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getCourseProgress() {
|
|
|
+ this.$http
|
|
|
+ .get("/api/ecs_oe_admin/exam/student/courseProgress/list", {
|
|
|
+ params: {
|
|
|
+ examId: this.examId,
|
|
|
+ courseId: this.courseId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .then(response => {
|
|
|
+ if (response.data && response.data.length > 0) {
|
|
|
+ this.courseProgressList = response.data;
|
|
|
+ } else {
|
|
|
+ this.courseProgressList = [];
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getCourses() {
|
|
|
+ if (!this.examId) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ this.$http
|
|
|
+ .get("/api/ecs_oe_admin/exam/student/findCoursesByExamIdAndOrgId", {
|
|
|
+ params: {
|
|
|
+ examId: this.examId,
|
|
|
+ orgId: this.orgId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .then(response => {
|
|
|
+ if (response.data && response.data.length > 0) {
|
|
|
+ this.courseList = response.data;
|
|
|
+ } else {
|
|
|
+ this.courseList = [];
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ changeExam() {
|
|
|
+ this.getCourses();
|
|
|
+ this.getOrgExamInfos();
|
|
|
+ this.getCourseProgress();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getExams();
|
|
|
+ this.getOrgs();
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style>
|
|
|
+.chart-border {
|
|
|
+ border: 1px solid #ddd;
|
|
|
+}
|
|
|
+.chart-header {
|
|
|
+ color: #333;
|
|
|
+ font-size: 14px;
|
|
|
+ background-color: #f5f5f5;
|
|
|
+ border-color: #ddd;
|
|
|
+ padding: 10px 15px;
|
|
|
+ border-bottom: 1px solid transparent;
|
|
|
+ border-top-left-radius: 3px;
|
|
|
+ border-top-right-radius: 3px;
|
|
|
+}
|
|
|
+</style>
|