zhouwx
2024-07-17 c1823a7f91775fd157d4e4683b597d7e426cd2ed
bug修改
已修改6个文件
123 ■■■■ 文件已修改
src/views/onlineEducation/classHourBatch/components/classHourChange.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/onlineEducation/classHourBatch/components/handleStudent.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/onlineEducation/classHourBatch/index.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/onlineEducation/courseManage/courseChapters/index.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/onlineEducation/groupExams/components/examDialog.vue 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/onlineEducation/groupExams/components/student.vue 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/onlineEducation/classHourBatch/components/classHourChange.vue
@@ -11,7 +11,7 @@
      <el-table v-loading="state.loading" :data="state.dataList" :border="true">
        <el-table-column label="创建时间" prop="createTime" align="center"  width="180" />
        <el-table-column label="变动来源" prop="origin" align="center"  />
        <el-table-column label="变动情况" prop="modifyPeriodMin" align="center"  />
        <el-table-column label="变动情况" prop="modifyPeriodMin" align="center" />
        <el-table-column label="变动后剩余" prop="remainPeriodMin" align="center"  />
<!--        <el-table-column label="操作" align="center" class-name="small-padding fixed-width"  width="180">-->
<!--          <template #default="scope">-->
@@ -76,7 +76,7 @@
    state.dataList = res.data.list.map(item => {
      return {
        ...item,
        modifyPeriodMin: item.modifyPeriod ? (item.modifyPeriod /60).toFixed(2).replace(/\.00$/, '')+'分钟' : '',
        modifyPeriodMin: item.modifyPeriod ? item.modifyPeriod >0 ?'新增 '+(item.modifyPeriod /60).toFixed(2).replace(/\.00$/, '')+'分钟':'减少 '+ (Math.abs(item.modifyPeriod /60)).toFixed(2).replace(/\.00$/, '')+'分钟'  : '',
        remainPeriodMin: item.remainPeriod ? (item.remainPeriod  /60).toFixed(2).replace(/\.00$/, '')+'分钟' : ''
      }
    })
src/views/onlineEducation/classHourBatch/components/handleStudent.vue
@@ -1,12 +1,19 @@
<template>
  <div class="app-container">
    <div style="margin-bottom: 10px;display: flex;align-items: center;justify-content: space-between">
      <el-button
          type="primary"
          plain
          icon="Plus"
          @click="openDialog()"
      >选择学员</el-button>
      <div>
        <el-button
            type="primary"
            plain
            icon="Plus"
            @click="openDialog()"
        >选择学员</el-button>
        <el-button
            type="primary"
            plain
            @click="back"
        >返回</el-button>
      </div>
      <el-button
          type="danger"
          plain
@@ -49,7 +56,7 @@
import Cookies from "js-cookie";
import {delQuestionBank, getQuestionBank} from "@/api/onlineEducation/questionBank";
import {batchDelStudent, delBatchStu, getBatchStudent} from "@/api/onlineEducation/batch";
import {useRoute} from 'vue-router'
import {useRoute, useRouter} from 'vue-router'
const route = useRoute()
@@ -57,6 +64,7 @@
const loading = ref(false);
const dialogRef = ref();
const tableRef = ref();
const router = useRouter();
const data = reactive({
  queryParams: {
    pageId: null,
@@ -164,5 +172,9 @@
        }
      })
}
const back = () => {
  router.push("/class");
}
</script>
src/views/onlineEducation/classHourBatch/index.vue
@@ -26,8 +26,8 @@
      <el-table-column label="课程" prop="courseName" align="center"  />
      <el-table-column label="学习人数" prop="studentCount" align="center"  />
      <el-table-column label="总课时" prop="coursePeriodNum" align="center"  />
      <el-table-column label="已完成人数" prop="" align="center"  />
      <el-table-column label="完成率" prop="" align="center"  />
      <el-table-column label="已完成人数" prop="finishCount" align="center"  />
      <el-table-column label="完成率" prop="finishRate" align="center"  />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width"  width="180">
        <template #default="scope">
          <el-button link type="primary" @click="toStuChoose(scope.row)">学生数据</el-button>
@@ -105,7 +105,8 @@
    data.dataList = res.data.list.map(item => {
      return {
        ...item,
        coursePeriodNum: item.coursePeriod ? (item.coursePeriod /60).toFixed(2).replace(/\.00$/, '') + '分钟':''
        coursePeriodNum: item.coursePeriod ? (item.coursePeriod /60).toFixed(2).replace(/\.00$/, '') + '分钟':'',
        finishRate: item.finishCount ?  item.finishCount ===0 && item.studentCount ===0  ? '0%': (item.finishCount / item.studentCount).toFixed(2) *100 + '%' : ''
      }
    })
    data.total = res.data.total
src/views/onlineEducation/courseManage/courseChapters/index.vue
@@ -2,7 +2,7 @@
  <div class="app-container">
    <div style="margin-bottom: 10px">
      <el-button type="success" plain @click="openDialog('addFirst',{courseId: data.courseId})">章添加</el-button>
      <el-button type="primary" plain @click="back">返回</el-button>
    </div>
    <!-- 表格数据 -->
    <el-table v-loading="loading" :data="dataList" :border="true" row-key="id" :tree-props="{ children: 'chapterPeriods' }">
@@ -33,11 +33,12 @@
import {delArea, getArea} from "@/api/backManage/area";
import {getDictList} from "@/api/backManage/evaluate";
import {delMonitor} from "@/api/sysUsers";
import {useRoute} from 'vue-router'
import {useRoute,useRouter} from 'vue-router'
import {delClassification, getClassification} from "@/api/onlineEducation/courseClass";
import {delChapter, delPeriod, getChapters} from "@/api/onlineEducation/chapters";
const { proxy } = getCurrentInstance();
const route = useRoute()
const router = useRouter();
const loading = ref(false);
const areaRef = ref();
const cityList = ref([])
@@ -70,7 +71,13 @@
    dataList.value = res.data.map(item => {
      return {
        ...item,
        timeFormat: item.resourceType === 1 || item.resourceType === 2 ? secondsToTime(item.resourceLength)  : item.docPage + '页'
        chapterPeriods: item.chapterPeriods.map(r => {
          return {
            ...r,
            timeFormat: r.resource.resourceType === 1 || r.resource.resourceType === 2 ? secondsToTime(r.resource.resourceLength)  : r.resource.docPage + '页'
          }
        })
      }
    })
  }else{
@@ -139,6 +146,9 @@
      })
}
const back = () => {
  router.push("/courseManage/course");
}
</script>
src/views/onlineEducation/groupExams/components/examDialog.vue
@@ -62,8 +62,11 @@
            </el-select>
          <el-radio-group v-model="state.form.singleMethod"  >
            <el-radio :label="1" style="max-width: 30px">随机</el-radio>
            <el-radio :label="2">顺序</el-radio>
          </el-radio-group>
            <el-radio :label="2" style="max-width: 30px">顺序</el-radio>
          </el-radio-group >
            <el-radio-group v-model="state.form.singleRebuild" style="margin-left: 30px" >
              <el-radio :label="3" v-if="title === '编辑'" style="max-width: 30px">重新出题</el-radio>
            </el-radio-group>
          </div>
        </div>
        <div  style="display: flex">
@@ -100,7 +103,10 @@
            </el-select>
            <el-radio-group v-model="state.form.multiMethod"  >
              <el-radio :label="1" style="max-width: 30px">随机</el-radio>
              <el-radio :label="2">顺序</el-radio>
              <el-radio :label="2" style="max-width: 30px">顺序</el-radio>
            </el-radio-group>
            <el-radio-group v-model="state.form.multiRebuild" style="margin-left: 30px" >
              <el-radio :label="3" v-if="title === '编辑'" style="max-width: 30px">重新出题</el-radio>
            </el-radio-group>
          </div>
        </div>
@@ -138,7 +144,10 @@
            </el-select>
            <el-radio-group v-model="state.form.judgeMethod"  >
              <el-radio :label="1" style="max-width: 30px">随机</el-radio>
              <el-radio :label="2">顺序</el-radio>
              <el-radio :label="2" style="max-width: 30px">顺序</el-radio>
            </el-radio-group>
            <el-radio-group v-model="state.form.judgeRebuild" style="margin-left: 30px" >
              <el-radio :label="3" v-if="title === '编辑'" style="max-width: 30px">重新出题</el-radio>
            </el-radio-group>
          </div>
        </div>
@@ -190,6 +199,7 @@
  getQuestionBank
} from "@/api/onlineEducation/questionBank";
import {addExam, checkExamName, editExam} from "@/api/onlineEducation/exam";
import Student from "@/views/onlineEducation/groupExams/components/student.vue";
const dialogVisible = ref(false);
const title = ref("");
@@ -249,7 +259,10 @@
    singleScore: null,
    limited: 1,
    limitTime: null,
    passScore: null
    passScore: null,
    judgeRebuild: null,
    multiRebuild: null,
    singleRebuild: null,
  },
  formRules: {
@@ -403,7 +416,10 @@
    singleScore: null,
    limited: 0,
    limitTime: null,
    passScore: null
    passScore: null,
    judgeRebuild: null,
    multiRebuild: null,
    singleRebuild: null,
  }
}
const handleScroll = () => {
@@ -456,7 +472,7 @@
    align-items:center;
    font-size: 15px;
    font-weight: 700;
    margin: 20px 0 0 70px;
    margin: 20px 0 0 35px;
  }
}
src/views/onlineEducation/groupExams/components/student.vue
@@ -1,12 +1,19 @@
<template>
  <div class="app-container">
    <div style="margin-bottom: 10px;display: flex;align-items: center;justify-content: space-between">
      <el-button
          type="primary"
          plain
          icon="Plus"
          @click="openDialog()"
      >选择学员</el-button>
      <div>
        <el-button
            type="primary"
            plain
            icon="Plus"
            @click="openDialog()"
        >选择学员</el-button>
        <el-button
            type="primary"
            plain
            @click="back"
        >返回</el-button>
      </div>
      <el-button
          type="danger"
          plain
@@ -33,10 +40,19 @@
          <span>{{scope.row.student.phone}}</span>
        </template>
      </el-table-column>
      <el-table-column label="成绩" prop="score" align="center"  />
      <el-table-column label="考试是否完成" prop="completed" align="center" >
        <template #default="scope">
          <span>{{scope.row.completed ===0 ? '未完成' : '已完成'}}</span>
        </template>
      </el-table-column>
      <el-table-column label="成绩" prop="score" align="center" >
        <template #default="scope">
          <span>{{scope.row.completed ===0 ? '--' : scope.row.score}}</span>
        </template>
      </el-table-column>
      <el-table-column label="是否合格" prop="passed" align="center"  >
        <template #default="scope">
          <span>{{scope.row.passed === 0 ? '不合格' : '合格'}}</span>
          <span>{{scope.row.completed ===0 ? '--' : scope.row.passed === 0 ? '不合格' : '合格'}}</span>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width"  width="180">
@@ -64,11 +80,11 @@
import Cookies from "js-cookie";
import {delQuestionBank, getQuestionBank} from "@/api/onlineEducation/questionBank";
import {batchDelStudent, delBatchStu, getBatchStudent} from "@/api/onlineEducation/batch";
import {useRoute} from 'vue-router'
import {useRoute, useRouter} from 'vue-router'
import {delExamStu, examDelStudent, getExamStudent} from "@/api/onlineEducation/exam";
import ExamChooseStudent from "@/views/onlineEducation/groupExams/components/examChooseStudent.vue";
const route = useRoute()
const router = useRouter();
const { proxy } = getCurrentInstance();
const loading = ref(false);
@@ -109,6 +125,10 @@
const getRowKey = (row) => {
  return row.id
}
const back = () => {
  router.push("/group");
}
const getList = async () => {
  loading.value = true
  const res = await getExamStudent(data.queryParams)