zhouwx
2024-10-12 9b0cdc49f16ff49e050ed161da9a8ce9207da97f
修改
已修改6个文件
94 ■■■■ 文件已修改
src/api/onlineEducation/course.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/onlineEducation/student.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/onlineEducation/count/components/studentList.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/onlineEducation/courseSupervision/components/courseDialog.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/onlineEducation/courseSupervision/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/onlineEducation/course.js
@@ -15,3 +15,11 @@
    params: query
  })
}
export function checkCourse(data) {
  return request({
    url: '/th/course/checkCourse',
    method: 'post',
    data: data
  })
}
src/api/onlineEducation/student.js
@@ -64,3 +64,9 @@
  })
}
export function sendMessage(idcard) {
  return request({
    url: '/th/batch/sendMessage/' + idcard,
    method: 'get'
  })
}
src/utils/request.js
@@ -7,6 +7,7 @@
import cache from '@/plugins/cache'
import { saveAs } from 'file-saver'
const JSONBig = require('json-bigint')({ "storeAsString": true });
let downloadLoadingInstance;
// 是否显示重新登录
export let isRelogin = { show: false };
@@ -17,7 +18,17 @@
  // axios中请求配置有baseURL选项,表示请求URL公共部分
  baseURL: process.env.VUE_APP_BASE_API,
  // 超时
  timeout: 60000
  timeout: 60000,
  transformResponse: [
    function (data) {
      // 对 data 进行任意转换处理
      try {
        return JSONBig.parse(data)
      } catch (err) {
        return data
      }
    }
  ]
})
// request拦截器
src/views/onlineEducation/count/components/studentList.vue
@@ -21,7 +21,7 @@
        label="身份证号"
        prop="idcard"
        align="center"
        width="160" :show-overflow-tooltip="true">
        width="180" :show-overflow-tooltip="true">
      </el-table-column>
      <el-table-column
        prop="lessonTocal"
@@ -84,7 +84,7 @@
<script >
import lessonReport from '@/views/onlineEducation/studentSupervision/compontents/lessonReport.vue'
import { studentCourseDetail, studentDetail } from '@/api/onlineEducation/student'
import { sendMessage, studentCourseDetail, studentDetail } from '@/api/onlineEducation/student'
import { listCourse } from '@/api/onlineEducation/course'
export default {
  name: 'addUser',
@@ -169,7 +169,20 @@
        cancelButtonText: '取消',
        type: 'warning'
      }).then(async () => {
        sendMessage(row.idcard).then((res) => {
          if (res.code == 200) {
            this.$message({
              message: '发送成功',
              type: 'success'
            })
            this.handleClose()
          }else {
            this.$message({
              message: res.msg,
              type: 'warning'
            })
          }
        })
      }).catch(() => {
      });
src/views/onlineEducation/courseSupervision/components/courseDialog.vue
@@ -74,13 +74,15 @@
    </div>
    <span slot="footer" class="dialog-footer" v-if="showBtn">
    <el-button type="primary" @click="dialogVisible = false">审核通过</el-button>
    <el-button type="warning" @click="dialogVisible = false">审核驳回</el-button>
    <el-button type="primary" @click="examine('pass')">审核通过</el-button>
    <el-button type="warning" @click="examine('reject')">审核驳回</el-button>
    </span>
  </el-dialog>
</template>
<script >
import { checkCourse, listCourse } from '@/api/onlineEducation/course'
export default {
  name: 'addUser',
  components: {
@@ -101,7 +103,8 @@
  methods: {
    openDialog (data,type,courseType) {
      this.dialogVisible = true;
      console.log('this.showBtn ',type,courseType )
      this.dataForm = data;
      console.log('dataForm ',this.dataForm )
      if(type === 'course'){
        this.courseList = data.outline
        this.courseTable = this.recursion(data.outline,type)
@@ -175,6 +178,40 @@
        this.$emit("getList");
        this.dialogVisible = false;
    },
    examine(type){
      let msg = '';
      const param = {
        id: this.dataForm.id,
        status: null
      }
      if(type === 'pass'){
        param.status = 2
        msg = '审核通过'
      }else {
        param.status = 3
        msg = '审核驳回'
      }
      this.$confirm(`确定${msg}该条数据?`, '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(async () => {
        checkCourse(param).then((res) => {
          if (res.code == 200) {
            this.$message({
              message: '成功',
              type: 'success'
            })
            this.handleClose()
          }else {
            this.$message({
              message: res.msg,
              type: 'warning'
            })
          }
        })
      })
    },
    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
      if(columnIndex === 0) {
        const currentValue = row[column.property];
src/views/onlineEducation/courseSupervision/index.vue
@@ -47,7 +47,7 @@
      <el-table-column label="最近修改时间" align="center" prop="updateTime" width="100" />
      <el-table-column label="审核状态" align="center" prop="" >
        <template #default="scope">
          <span>{{scope.row.state == 0 ? '待审核' :scope.row.state == 1 ? '审核通过' :scope.row.state == 2 ? '审核驳回' : '待审核'  }}</span>
          <span>{{scope.row.status == 1 ? '待审核' :scope.row.status == 2 ? '审核通过' :scope.row.status == 3 ? '审核驳回' : ''  }}</span>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@@ -59,7 +59,7 @@
            @click="handleViewCourse(scope.row,'')"
          >详情</el-button>
          <el-button
            v-if="scope.row.state == 0"
            v-if="scope.row.status == 1"
            size="mini"
            type="text"
            style="color: #1890ff"
@@ -120,7 +120,6 @@
            return {
              ...item,
              courseNum: item.outline ? item.outline.length : '',
              state: 0 // 假数据后期删掉
            }
          })
          this.total = res.total