From db905ecd14f63dba9337b4f4715584ef2d7e8c7e Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: Fri, 07 Mar 2025 14:45:00 +0800
Subject: [PATCH] 修改
---
src/views/onlineEducation/courseSupervision/components/courseDialog.vue | 49 ++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 44 insertions(+), 5 deletions(-)
diff --git a/src/views/onlineEducation/courseSupervision/components/courseDialog.vue b/src/views/onlineEducation/courseSupervision/components/courseDialog.vue
index 7078a23..0c113ae 100644
--- a/src/views/onlineEducation/courseSupervision/components/courseDialog.vue
+++ b/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)
@@ -137,7 +140,8 @@
resourceType: child.haveResource == 0 ? '视频' : '音频' ,
lessonNum: child.lessonNum,
url: child.url,
- children: this.recursion(child.children)
+ children: this.recursion(child.children),
+ teacher: child.teacher
})
})
}else {
@@ -150,7 +154,8 @@
resourceType: child.haveResource == 0 ? '视频' : '音频' ,
lessonNum: child.lessonNum,
url: child.url,
- children: this.recursion(child.children)
+ children: this.recursion(child.children),
+ teacher: child.teacher
})
})
}
@@ -175,6 +180,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];
--
Gitblit v1.9.2