| | |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function checkCourse(data) { |
| | | return request({ |
| | | url: '/th/course/checkCourse', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | export function sendMessage(idcard) { |
| | | return request({ |
| | | url: '/th/batch/sendMessage/' + idcard, |
| | | method: 'get' |
| | | }) |
| | | } |
| | |
| | | import cache from '@/plugins/cache' |
| | | import { saveAs } from 'file-saver' |
| | | |
| | | const JSONBig = require('json-bigint')({ "storeAsString": true }); |
| | | let downloadLoadingInstance; |
| | | // 是否显示重新登录 |
| | | export let isRelogin = { show: false }; |
| | |
| | | // 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拦截器 |
| | |
| | | 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" |
| | |
| | | |
| | | <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', |
| | |
| | | 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(() => { |
| | | |
| | | }); |
| | |
| | | |
| | | </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: { |
| | |
| | | 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) |
| | |
| | | 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]; |
| | |
| | | <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"> |
| | |
| | | @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" |
| | |
| | | return { |
| | | ...item, |
| | | courseNum: item.outline ? item.outline.length : '', |
| | | state: 0 // 假数据后期删掉 |
| | | } |
| | | }) |
| | | this.total = res.total |