zhouwx
2024-07-23 bfa061edf56598f05b5817565bf181c64b149f99
提交
已修改10个文件
155 ■■■■ 文件已修改
src/views/homePage.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/onlineEducation/classHourBatch/components/handleStudent.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/onlineEducation/classHourBatch/index.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/onlineEducation/courseManage/components/courseManageDialog.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/onlineEducation/courseManage/courseChapters/index.vue 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/onlineEducation/courseManage/index.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/onlineEducation/groupExams/components/examDialog.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/onlineEducation/groupExams/components/student.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/onlineEducation/groupExams/index.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/onlineEducation/offlineEducation/index.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/homePage.vue
@@ -458,7 +458,7 @@
  padding-left: 7px;
}
@media screen and (max-width: 980px) {
@media screen and (max-width: 1050px) {
  .imG {
    display: none;
  }
src/views/onlineEducation/classHourBatch/components/handleStudent.vue
@@ -101,6 +101,7 @@
const { queryParams, total, dataList } = toRefs(data);
const backValue = ref()
onMounted(async ()=>{
  const userInfo = JSON.parse(Cookies.get('userInfo'))
  console.log("userInfo",userInfo)
@@ -110,6 +111,7 @@
    data.isAdmin = false;
  }
  const val = JSON.parse(route.query.val)
  backValue.value = val
  // data.queryParams.pageId = val.id
  data.queryParams.phaseId = val.id
  await getList()
@@ -201,7 +203,13 @@
      })
}
const back = () => {
  router.push("/class");
  const obj = {
    pageNum: backValue.value.pageNum,
    pageSize: backValue.value.pageSize,
  }
  const v = JSON.stringify(obj)
  router.push({ path: "/class", query: { val: v } });
}
src/views/onlineEducation/classHourBatch/index.vue
@@ -84,11 +84,11 @@
import batchDialog from './components/batchDialog.vue'
import classHourChange from './components/classHourChange.vue'
import Cookies from "js-cookie";
import {useRouter} from 'vue-router'
import {useRoute, useRouter} from 'vue-router'
const router = useRouter()
import {delQuestionBank, getQuestionBank} from "@/api/onlineEducation/questionBank";
import {delBatch, getBatch} from "@/api/onlineEducation/batch";
const route = useRoute()
const { proxy } = getCurrentInstance();
const loading = ref(false);
@@ -131,6 +131,14 @@
const { queryParams, total, dataList } = toRefs(data);
onMounted(async ()=>{
  if(route.query.val){
    const val = JSON.parse(route.query.val)
    if(val){
      data.queryParams.pageNum = val.pageNum;
      data.queryParams.pageSize = val.pageSize;
    }
  }
  const userInfo = JSON.parse(Cookies.get('userInfo'))
  console.log("userInfo",userInfo)
  if(userInfo.userType === 0){
@@ -199,6 +207,8 @@
      })
}
const toStuChoose = (val) => {
  val.pageNum = data.queryParams.pageNum;
  val.pageSize = data.queryParams.pageSize
  const v = JSON.stringify(val)
  router.push({ path: "/chooseStu", query: { val: v } });
}
src/views/onlineEducation/courseManage/components/courseManageDialog.vue
@@ -212,6 +212,9 @@
  console.log("label====",classifyRef.value.getCheckedNodes()[0].value)
  state.form.categoryId = classifyRef.value.getCheckedNodes()[0].value
  // 我这里只是打印了一下label的值哦,需要赋值的话自己去赋值哦
  if (classifyRef.value.popperVisible) {
    classifyRef.value.togglePopperVisible()
  }
}
src/views/onlineEducation/courseManage/courseChapters/index.vue
@@ -1,7 +1,7 @@
<template>
  <div class="app-container">
    <div style="margin-bottom: 10px">
      <el-button type="success" plain @click="openDialog('addFirst',{courseId: data.courseId})">章添加</el-button>
    <div style="margin-bottom: 10px;display:flex;justify-content: space-between;align-items: center">
      <el-button type="success" plain @click="openDialog('addFirst',{courseId: data.courseId})" :disabled="disabled">章添加</el-button>
      <el-button type="primary" plain @click="back">返回</el-button>
    </div>
    <!-- 表格数据 -->
@@ -16,9 +16,9 @@
      <el-table-column label="排序" prop="sort" align="center" width="80" />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250" >
        <template #default="scope">
          <el-button type="success" plain @click="openDialog('add',scope.row)" v-if="!scope.row.chapterId">节添加</el-button>
          <el-button type="primary" plain @click="openDialog('edit',scope.row)">编辑</el-button>
          <el-button type="danger" plain @click="handleDelete(scope.row)">删除</el-button>
          <el-button type="success" plain @click="openDialog('add',scope.row)" v-if="!scope.row.chapterId" :disabled="disabled">节添加</el-button>
          <el-button type="primary" plain @click="openDialog('edit',scope.row)" :disabled="disabled">编辑</el-button>
          <el-button type="danger" plain @click="handleDelete(scope.row)" :disabled="disabled">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
@@ -36,6 +36,7 @@
import {useRoute,useRouter} from 'vue-router'
import {delClassification, getClassification} from "@/api/onlineEducation/courseClass";
import {delChapter, delPeriod, getChapters} from "@/api/onlineEducation/chapters";
import Cookies from "js-cookie";
const { proxy } = getCurrentInstance();
const route = useRoute()
const router = useRouter();
@@ -53,11 +54,16 @@
});
const { queryParams, total, dataList } = toRefs(data);
const backValue = ref()
const disabled = ref(false)
//页面加载
onMounted(() => {
  data.courseId = route.query.courseId
  backValue.value =  JSON.parse(route.query.val)
  const userInfo = JSON.parse(Cookies.get('userInfo'))
  if((backValue.value.state === 2 || backValue.value.state === 1 ) && userInfo.userType == 1){
    disabled.value = true;
  }
  data.courseId = backValue.value.id
  console.log("rou",data.courseId)
  getList();
});
@@ -147,7 +153,13 @@
      })
}
const back = () => {
  router.push("/courseManage/course");
  const obj = {
    pageNum: backValue.value.pageNum,
    pageSize: backValue.value.pageSize,
  }
  const v = JSON.stringify(obj)
  router.push({ path: "/courseManage/course", query: { val: v } });
}
src/views/onlineEducation/courseManage/index.vue
@@ -89,17 +89,19 @@
              <el-button link type="primary" @click="toChapters(scope.row)">章节</el-button>
              <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button>
            </div>
            <div v-else>--</div>
            <div v-else><el-button link type="primary" @click="toChapters(scope.row)">章节</el-button></div>
          </div>
          <div v-else-if="!data.isAdmin">
            <div v-if="scope.row.state !== 2">
              <el-button link type="primary" v-if="scope.row.state == 0 || scope.row.state == 3" @click="submitApprove(scope.row)">提交审核</el-button>
              <el-button link type="primary" v-if="scope.row.state == 1" @click="submitApprove(scope.row)">取消审核</el-button>
              <el-button link type="primary" v-if="scope.row.state !== 1" @click="openDialog('edit',scope.row)" >编辑</el-button>
              <el-button link type="primary" v-if="scope.row.state !== 1" @click="toChapters(scope.row)">章节</el-button>
              <el-button link type="primary"  @click="toChapters(scope.row)">章节</el-button>
              <el-button link type="danger" v-if="scope.row.state !== 1" @click="handleDelete(scope.row)">删除</el-button>
            </div>
            <div v-else>--</div>
            <div v-else>
              <el-button link type="primary"  @click="toChapters(scope.row)">章节</el-button>
            </div>
          </div>
<!--          <div v-if="scope.row.state == 2">-->
@@ -154,17 +156,19 @@
<script setup>
import {getCurrentInstance, onMounted, onUnmounted, reactive, ref, toRefs} from "vue";
import {ElMessage, ElMessageBox} from "element-plus";
import {delCompany, getCompany} from "@/api/onlineEducation/company";
import courseManageDialog from  './components/courseManageDialog.vue'
import {delBanner, getBanner} from "@/api/onlineEducation/banner";
import {useRouter} from 'vue-router'
import {useRoute, useRouter} from 'vue-router'
import Cookies from "js-cookie";
import {changeCourseStatus, delCourse, doCourse, getCourse} from "@/api/onlineEducation/courseManage";
const { proxy } = getCurrentInstance();
const router = useRouter()
const loading = ref(false);
const dialogRef = ref();
const route = useRoute()
const data = reactive({
  queryParams: {
    pageNum: 1,
@@ -184,6 +188,13 @@
const { queryParams, total, dataList } = toRefs(data);
onMounted(async ()=>{
  if(route.query.val){
    const val = JSON.parse(route.query.val)
    if(val){
      data.queryParams.pageNum = val.pageNum;
      data.queryParams.pageSize = val.pageSize;
    }
  }
  const userInfo = JSON.parse(Cookies.get('userInfo'))
  console.log("userInfo",userInfo)
  if(userInfo.userType === 0){
@@ -312,7 +323,10 @@
  }
}
const toChapters = (val) => {
  router.push({ path: "/chapters", query: { courseId: val.id } });
  val.pageNum = data.queryParams.pageNum;
  val.pageSize = data.queryParams.pageSize
  const v = JSON.stringify(val)
  router.push({ path: "/chapters", query: { val: v } });
}
</script>
src/views/onlineEducation/groupExams/components/examDialog.vue
@@ -282,9 +282,9 @@
  formRules: {
    name: [{required: true, trigger: "blur", validator: validateName}],
    categoryId: [{required: true, message: '请选择课程分类', trigger: 'blur'}],
    limited: [{required: true, message: '请选择课程分类', trigger: 'blur'}],
    limitTime: [{required: true, message: '请选择课程分类', trigger: 'blur'}],
    passScore: [{required: true, message: '请选择课程分类', trigger: 'blur'}],
    limited: [{required: true, message: '请选择是否限制考试时长', trigger: 'blur'}],
    limitTime: [{required: true, message: '请输入考试限制时长', trigger: 'blur'}],
    passScore: [{required: true, message: '请输入合格分数', trigger: 'blur'}],
    deadline: [{required: true, message: '请选择考试截止时间', trigger: 'blur'}]
  },
  classifyList: [],
@@ -330,6 +330,21 @@
  //   });
  //   return;
  // }
  const total = state.form.judgeNum * state.form.judgeScore+state.form.multiNum * state.form.multiScore+state.form.singleNum * state.form.singleScore
  if(state.form.passScore > total){
      ElMessage({
        type: 'warning',
        message: '合格分数不能大于总分'
      });
      return;
  }
  if(!(state.form.judgeBankId || state.form.multiBankId || state.form.singleBankId)){
      ElMessage({
        type: 'warning',
        message: '请选择题库'
      });
      return;
  }
  const valid = await busRef.value.validate();
  if(valid){
    if(title.value === '新增'){
@@ -429,7 +444,7 @@
    singleMethod: 1,
    singleNum: null,
    singleScore: null,
    limited: 0,
    limited: 1,
    limitTime: null,
    passScore: null,
    judgeRebuild: 0,
@@ -437,6 +452,9 @@
    singleRebuild: 0,
    deadline: ''
  }
  state.bankListSingle = [];
  state.bankSinglePageNum = 1;
  state.bankSinglePageSize = 10;
}
const handleScroll = () => {
  if(state.bankSinglePageNum >= state.hasMoreItemsSingle) return
src/views/onlineEducation/groupExams/components/student.vue
@@ -147,7 +147,9 @@
const { queryParams, total, dataList } = toRefs(data);
const backValue = ref()
onMounted(async ()=>{
  const userInfo = JSON.parse(Cookies.get('userInfo'))
  console.log("userInfo",userInfo)
  if(userInfo.userType === 0){
@@ -156,6 +158,7 @@
    data.isAdmin = false;
  }
  const val = JSON.parse(route.query.val)
  backValue.value = val
  // data.queryParams.pageId = val.id
  data.queryParams.paperId = val.id
  await getList()
@@ -169,7 +172,14 @@
}
const back = () => {
  router.push("/group");
  // router.push("/group");
  const obj = {
    pageNum: backValue.value.pageNum,
    pageSize: backValue.value.pageSize,
  }
  const v = JSON.stringify(obj)
  router.push({ path: "/group", query: { val: v } });
}
const getList = async () => {
  loading.value = true
src/views/onlineEducation/groupExams/index.vue
@@ -59,6 +59,11 @@
          <span>{{scope.row.paperStudentInfoVO.avgScore}}</span>
        </template>
      </el-table-column>
      <el-table-column label="合格分/总分" prop="" align="center" width="120" >
        <template #default="scope">
          <span>{{scope.row.passScore}}/{{scope.row.judgeNum * scope.row.judgeScore + scope.row.multiNum * scope.row.multiScore + scope.row.singleNum * scope.row.singleScore}}</span>
        </template>
      </el-table-column>
      <el-table-column label="合格率" prop="passRate" align="center" />
      <el-table-column label="限制时长/分钟" prop="limitTime" align="center"  width="120" >
        <template #default="scope">
@@ -97,13 +102,13 @@
import examDialog from './components/examDialog.vue'
import examQuestion from './components/viewExamQuestion.vue'
import Cookies from "js-cookie";
import {useRouter} from 'vue-router'
import {useRoute, useRouter} from 'vue-router'
const router = useRouter()
import {delQuestionBank, getQuestionBank} from "@/api/onlineEducation/questionBank";
import {delBatch, getBatch} from "@/api/onlineEducation/batch";
import {delExam, getExam} from "@/api/onlineEducation/exam";
import {getClassification} from "@/api/onlineEducation/courseClass";
const route = useRoute()
const { proxy } = getCurrentInstance();
const loading = ref(false);
@@ -132,6 +137,13 @@
const { queryParams, total, dataList } = toRefs(data);
onMounted(async ()=>{
  if(route.query.val){
    const val = JSON.parse(route.query.val)
    if(val){
      data.queryParams.pageNum = val.pageNum;
      data.queryParams.pageSize = val.pageSize;
    }
  }
  const userInfo = JSON.parse(Cookies.get('userInfo'))
  console.log("userInfo",userInfo)
  if(userInfo.userType === 0){
@@ -200,6 +212,8 @@
      })
}
const toStuChoose = (val) => {
  val.pageNum = data.queryParams.pageNum;
  val.pageSize = data.queryParams.pageSize
  const v = JSON.stringify(val)
  router.push({ path: "/examStu", query: { val: v } });
}
src/views/onlineEducation/offlineEducation/index.vue
@@ -44,13 +44,21 @@
      <el-table-column label="序号" type="index" align="center" width="80" />
      <el-table-column label="企业名称" prop="companyName" align="center"  />
      <el-table-column label="计划名称" prop="planName" align="center"  />
      <el-table-column label="学员姓名" prop="studentName" align="center"  />
      <el-table-column label="性别" prop="sex" align="center" >
      <el-table-column label="学员姓名" prop="studentName" align="center">
        <template #default="scope">
          <span>{{scope.row.sex == 0 ? '男':'女'}}</span>
          <span>{{scope.row.student.name}}</span>
        </template>
      </el-table-column>
      <el-table-column label="身份证号" prop="idNo" align="center" width="200" :show-overflow-tooltip="true"/>
<!--      <el-table-column label="性别" prop="sex" align="center" >-->
<!--        <template #default="scope">-->
<!--          <span>{{scope.row.sex == 0 ? '男':'女'}}</span>-->
<!--        </template>-->
<!--      </el-table-column>-->
      <el-table-column label="身份证号" prop="idNo" align="center" width="200" :show-overflow-tooltip="true">
        <template #default="scope">
          <span>{{scope.row.student.idNo}}</span>
        </template>
      </el-table-column>
      <el-table-column label="课程名称" prop="courseName" align="center"/>
      <el-table-column label="培训等级" prop="level" align="center">
        <template #default="scope">