龚焕茏
2024-05-24 614663b6d7a0be4c577693a65667133350c7590d
feat:人数分布统计支持随机试卷
1个文件已修改
11 ■■■■ 已修改文件
src/views/answer/sheetStatistics.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/answer/sheetStatistics.vue
@@ -2,7 +2,7 @@
  <div style="padding: 10px" ref="pageContent">
    <el-form :model="queryParam" ref="queryForm" :inline="true" style="display: flex">
      <el-form-item label="试卷:">
        <el-select v-model="queryParam.examPaperId" filterable placeholder="试卷">
        <el-select v-model="queryParam.examPaperId" filterable placeholder="试卷" @change="getType">
          <el-option v-for="item in examPaperList" :key="item.id" :value="item.id" :label="item.name" />
        </el-select>
      </el-form-item>
@@ -173,7 +173,8 @@
      chartLoading2: false,
      queryParam: {
        examPaperId: '',
        departmentId: []
        departmentId: [],
        examPaperType: 1
      },
      admin: true
    };
@@ -187,11 +188,17 @@
    dashboardApi.examPaperList().then(res => {
      this.examPaperList = res.response;
      this.queryParam.examPaperId = this.examPaperList[0].id
      this.queryParam.examPaperType = this.examPaperList[0].paperType
      this.getChartData();
      this.observe();
    });
  },
  methods: {
    getType(val) {
      const selectedItem = this.examPaperList.find(item => item.id === val);
      this.queryParam.examPaperType = selectedItem.paperType;
      this.getChartData();
    },
    getChartData() {
      this.chartLoading1 = true;
      this.chartLoading2 = true;