zhouwx
2024-07-18 026b72ee0218e9cf93c2ba2d4f944e7a7d3b56ae
src/views/onlineEducation/groupExams/index.vue
@@ -30,14 +30,17 @@
        </template>
      </el-table-column>
      <el-table-column label="合格率" prop="passRate" align="center" />
      <el-table-column label="限制时长" prop="limitTime" align="center"  >
      <el-table-column label="限制时长/分钟" prop="limitTime" align="center"  width="120" >
        <template #default="scope">
          <span v-if="scope.row.limitTime == 0">不限时</span>
          <span v-else>{{scope.row.limitTime}}</span>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width"  width="180">
      <el-table-column label="考试截止时间" prop="deadlineNum" align="center"  width="120" >
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width"  width="260">
        <template #default="scope">
          <el-button link type="primary" @click="viewQuestion(scope.row)">预览</el-button>
          <el-button link type="primary" @click="toStuChoose(scope.row)">学生数据</el-button>
          <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button>
          <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button>
@@ -53,7 +56,8 @@
        @pagination="getList"
    />
    <exam-dialog ref="dialogRef" @getList=getList></exam-dialog>
<!--    <class-hour-change ref="classHourRef" @getList=getList></class-hour-change>-->
    <exam-question ref="questionRef" @getList=getList></exam-question>
  </div>
</template>
@@ -61,7 +65,7 @@
import {getCurrentInstance, onMounted, onUnmounted, reactive, ref, toRefs} from "vue";
import {ElMessage, ElMessageBox} from "element-plus";
import examDialog from './components/examDialog.vue'
// import classHourChange from './components/classHourChange.vue'
import examQuestion from './components/viewExamQuestion.vue'
import Cookies from "js-cookie";
import {useRouter} from 'vue-router'
const router = useRouter()
@@ -73,7 +77,7 @@
const { proxy } = getCurrentInstance();
const loading = ref(false);
const dialogRef = ref();
const classHourRef = ref();
const questionRef = ref();
const data = reactive({
  queryParams: {
    pageNum: 1,
@@ -111,7 +115,8 @@
    data.dataList = res.data.list.map(item => {
      return {
        ...item,
        passRate: item.paperStudentInfoVO.passStudentCount ===0 && item.paperStudentInfoVO.studentCount ===0  ? '0%': (item.paperStudentInfoVO.passStudentCount / item.paperStudentInfoVO.studentCount).toFixed(2) *100 + '%'
        passRate: item.paperStudentInfoVO.passStudentCount ===0 && item.paperStudentInfoVO.studentCount ===0  ? '0%': (item.paperStudentInfoVO.passStudentCount / item.paperStudentInfoVO.studentCount).toFixed(2) *100 + '%',
        deadlineNum: item.deadline ? item.deadline.slice(0,10) : ''
      }
    })
@@ -153,8 +158,7 @@
  const v = JSON.stringify(val)
  router.push({ path: "/examStu", query: { val: v } });
}
const openDetail = () => {
  classHourRef.value.openDialog()
const viewQuestion = (val) => {
  questionRef.value.openDialog(val)
}
</script>