同步Dev中课程审核的修改

This commit is contained in:
daihh
2022-09-25 11:58:56 +08:00
parent c31f9fdf62
commit 7c0dd1a7e7
4 changed files with 167 additions and 472 deletions

View File

@@ -5,7 +5,7 @@
<!-- <el-col :span="6">
<el-cascader placeholder="资源归属" clearable v-model="resOwner" :props="defaultProps" :options="resOwnerListMap"></el-cascader>
</el-col> -->
<el-col :span="4">
<el-col :span="6">
<el-cascader placeholder="内容分类" clearable v-model="sysTypeList" :props="defaultTypeProps" :options="sysTypeListMap"></el-cascader>
</el-col>
<el-col :span="4">
@@ -14,6 +14,7 @@
<el-col :span="4">
<el-input placeholder="名称" v-model="params.keyword" clearable></el-input>
</el-col>
<!--
<el-col :span="4">
<el-select v-model="params.publish" placeholder="是否发布" clearable>
<el-option label="全部" :value="null"></el-option>
@@ -21,6 +22,7 @@
<el-option label="未发布" :value="false"></el-option>
</el-select>
</el-col>
-->
<el-col :span="8">
<el-button type="primary" @click="getseatch();" icon="el-icon-search">搜索</el-button>
<el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button>
@@ -66,17 +68,10 @@
<span v-if="scope.row.status == 3">审核未通过</span>
</template>
</el-table-column>
<el-table-column label="是否发布" width="130px">
<template slot-scope="scope">
{{ scope.row.published !== true ? '未发布' : '已发布' }}
</template>
</el-table-column>
<el-table-column label="创建人" prop="sysCreateBy"></el-table-column>
<el-table-column label="创建时间" prop="sysCreateTime" width="200px" show-overflow-tooltip></el-table-column>
<el-table-column label="邀请" prop="auditInfo" width="150px">
<template slot-scope="scope">
{{remarksInterception(scope.row.auditInfo)}}
</template>
<el-table-column label="邀请审核" prop="auditInfo" width="150px">
<template slot-scope="scope">{{scope.row.auditInfo}}</template>
</el-table-column>
<el-table-column label="操作" width="100px" fixed="right">
<template slot-scope="scope">
@@ -97,32 +92,7 @@
:total="page.count"
></el-pagination>
</div>
<div style="height: 100px;"></div>
<!--邀请审核-->
<el-dialog custom-class="g-dialog" title="邀请教师审核课程" :visible.sync="inviteTeacher.dlgShow">
<div style="display: flex;justify-content:flex-start;padding-bottom: 10px;">
<div style="padding: 0px 5px;"><el-input placeholder="姓名" v-model="inviteTeacher.params.name"></el-input></div>
<div style="padding: 0px 5px;"><el-button @click="findTeachers()" icon="el-icon-search" type="primary" size="small">搜索</el-button></div>
</div>
<div>
<el-table max-height="500" border :data="inviteTeacher.list" style="width: 100%">
<el-table-column prop="name" label="姓名" width="180"></el-table-column>
<el-table-column prop="sex" label="性别"></el-table-column>
<el-table-column prop="code" label="工号"></el-table-column>
<el-table-column prop="orgInfo" label="组织"></el-table-column>
<el-table-column prop="orgInfo" label="选择">
<template slot-scope="scope">
<el-radio v-model="scope.row.checked">选择</el-radio>
</template>
</el-table-column>
</el-table>
</div>
<template #footer>
<el-button @click="inviteTeacher.dlgShow = false"> </el-button>
<el-button type="primary" @click="enSure">确认</el-button>
</template>
</el-dialog>
<!-- 审核 -->
<el-dialog title="审核" :visible.sync="dialogVisible" width="900px" custom-class="g-dialog" @close="examin={}">
<div v-show="expandDetails">
@@ -184,7 +154,7 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false;examin={}"> </el-button>
<el-button type="primary" @click="examineData(true)">提交</el-button>
<el-button :loading="btnLoading" type="primary" @click="examineData(true)">提交</el-button>
<!-- <el-button type="primary" @click="examineData(true)">提交并发布</el-button> -->
</span>
</el-dialog>
@@ -221,6 +191,7 @@ export default {
data() {
return {
loading: true,
btnLoading:false,
sysTypeList: [],
sysTypeListMap:[],
resOwnerListMap:[],
@@ -229,6 +200,7 @@ export default {
examin:{
detailType: '',
examineId: '',
auditId:'',
examineName: '',
},
paperJson:{items:[]},
@@ -304,15 +276,7 @@ export default {
this.loadSysTypes();
},
methods: {
remarksInterception(info){
let name = '';
if(info == '' || info == null || info == undefined) {
name = '--';
} else {
name = info.split('请')[0];
}
return name;
},
getseatch(){
this.params.pageIndex= 1;
this.searchData();
@@ -359,11 +323,14 @@ export default {
examineData(flag) {
if(this.isExamine == 1) {
let params = {
id:this.examin.examineId,//课程id,
auditId:this.examin.auditId,
from:2,
courseId:this.examin.examineId,//课程id,
title:this.examin.examineName,//课程的名称,
pass: this.auditInfo.pass,//Boolean 是否通过,
remark: this.auditInfo.remark// 备注
}
this.btnLoading=true;
if(flag){
apiCourse.auditAndPublish(params).then(res=>{
if(res.status === 200) {
@@ -374,6 +341,7 @@ export default {
}else{
this.$message.error(res.message);
}
this.btnLoading=false;
})
}else{
apiCourse.audit(params).then(res=>{
@@ -385,6 +353,7 @@ export default {
}else{
this.$message.error(res.message);
}
this.btnLoading=false;
})
}
@@ -407,7 +376,7 @@ export default {
this.params.sysType3 = this.sysTypeList[2];
try {
this.loading = true;
const {result, status,message} = await apiCourse.auditList(this.params);
const {result, status,message} = await apiCourse.teacherAuditList(this.params);
if(status === 200) {
this.pageData = result.list;
@@ -437,6 +406,7 @@ export default {
},
toExamine(row) {
this.audit = {};
this.examin.auditId=row.auditId;
this.examin.detailType = row.type;
this.examin.examineId = row.id;
this.examin.examineName = row.name;
@@ -469,11 +439,7 @@ export default {
this.inviteTeacher.dlgShow = true;
},
findTeachers() {
this.inviteTeacher.list = [
{ id: '1', name: '李玉冰', type:'通过',text: '实用',sex: '男', code: '1023123', orgInfo: '教育技术中心', checked: false },
{ id: '2', name: '李玉冰', type:'未通过',text: '内容在调整',sex: '男', code: '1023123', orgInfo: '教育技术中心', checked: false },
{ id: '3', name: '李玉冰', type:'驳回',text: '内容重复',sex: '男', code: '1023123', orgInfo: '教育技术中心', checked: false }
];
this.inviteTeacher.list = [];
},
showQrimage() {
this.qrcodeShow = true;

View File

@@ -2,38 +2,27 @@
<template>
<div class="u-page">
<div style="padding: 2px 0px 10px 0px;">
<el-row :gutter="10">
<!-- <el-col :span="6">
<el-cascader placeholder="资源归属" clearable v-model="resOwner" :props="defaultProps" :options="resOwnerListMap"></el-cascader>
</el-col> -->
<el-row :gutter="20">
<el-col :span="4">
<el-cascader placeholder="内容分类" clearable v-model="sysTypeList" :props="defaultTypeProps" :options="sysTypeListMap"></el-cascader>
</el-col>
<el-col :span="4">
<el-input placeholder="创建人" v-model="params.createUser" clearable></el-input>
<el-input placeholder="创建人" v-model="params.courseUser" clearable></el-input>
</el-col>
<el-col :span="4">
<el-input placeholder="名称" v-model="params.keyword" clearable></el-input>
<el-input placeholder="课程名称" style="width:100%" v-model="params.courseName" clearable></el-input>
</el-col>
<el-col :span="4">
<el-select v-model="params.publish" placeholder="是否发布" clearable>
<el-option label="全部" :value="null"></el-option>
<el-option label="已发布" :value="true"></el-option>
<el-option label="未发布" :value="false"></el-option>
</el-select>
</el-col>
<el-col :span="8">
<el-button type="primary" @click="searchData()" icon="el-icon-search">搜索</el-button>
<el-col :span="8">
<el-button type="primary" @click="getsearch()" icon="el-icon-search">搜索</el-button>
<el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button>
</el-col>
</el-row>
</div>
<el-table :data="pageData" border stripe>
<el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="名称" prop="name" show-overflow-tooltip width="200px">
<el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="课程名称" prop="courseName" show-overflow-tooltip width="200px">
<template slot-scope="scope">
<span class="previewStyle" @click="viewTopic(scope.row)">{{ scope.row.name }}</span>
<span class="previewStyle" @click="viewTopic(scope.row)">{{ scope.row.courseName }}</span>
</template>
</el-table-column>
<el-table-column label="内容分类" prop="sysType" sortable width="240px">
@@ -43,37 +32,24 @@
<span v-if="scope.row.sysType3 != ''">/{{sysTypeName(scope.row.sysType3)}}</span>
</template>
</el-table-column>
<!-- <el-table-column label="资源归属" sortable prop="author" width="240px">
<el-table-column label="审核状态" prop="status" width="120px">
<template slot-scope="scope">
<span>{{resOwnerName(scope.row.resOwner1)}}</span>
<span v-if="scope.row.resOwner2 != ''">/{{resOwnerName(scope.row.resOwner2)}}</span>
<span v-if="scope.row.resOwner3 != ''">/{{resOwnerName(scope.row.resOwner3)}}</span>
</template>
</el-table-column> -->
<el-table-column label="状态" prop="status" width="120px">
<template slot-scope="scope">
<!-- 1未提交 2.已提交 = 未审核 5 已审核 -->
<span v-if="scope.row.status == 1">未提交</span>
<span v-if="scope.row.status == 2">待审核</span>
<span v-if="scope.row.status == 5">已审核</span>
<span v-if="scope.row.status == 3">审核未通过</span>
<span v-if="scope.row.status == 2">不通过</span>
<span v-if="scope.row.status == 9">通过</span>
</template>
</el-table-column>
<el-table-column label="是否发布" width="130px">
<template slot-scope="scope">
{{ scope.row.published !== true ? '未发布' : '已发布' }}
</template>
</el-table-column>
<el-table-column label="创建人" prop="sysCreateBy"></el-table-column>
<el-table-column label="创建时间" prop="sysCreateTime" width="200px" show-overflow-tooltip></el-table-column>
<el-table-column label="创建人" prop="courseUser"></el-table-column>
<el-table-column label="审核时间" prop="auditTime" width="200px" show-overflow-tooltip></el-table-column>
<el-table-column label="审核说明" prop="auditRemark" width="200px" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="100px" fixed="right">
<template slot-scope="scope">
<el-button @click="toExamine(scope.row)" type="text" >审核记录</el-button>
<el-button @click="toExamine(scope.row)" type="text" >审核日志</el-button>
</template>
</el-table-column>
</el-table>
<div v-if="pageData.length > 0" style="text-align: center;margin-top:70px">
<div v-if="pageData.length > 0" style="text-align: center;margin-top: 50px;">
<el-pagination background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
@@ -84,14 +60,15 @@
:total="page.count"
></el-pagination>
</div>
<div style="height: 100px;"></div>
<el-dialog title="审核记录" :visible.sync="dialogVisible" width="900px" custom-class="g-dialog">
<div>
<el-table max-height="500" border :data="inviteTeacher.list" style="width: 100%;">
<el-table-column prop="sysCreateBy" label="姓名" width="180"></el-table-column>
<el-table max-height="500" border :data="auditRecords" style="width: 100%;">
<el-table-column prop="auditUser" label="审核人" width="180"></el-table-column>
<el-table-column prop="type" label="审核状态">
<template slot-scope="scope">{{scope.row.auditState? '通过': '不通过'}}
<template slot-scope="scope">
<span v-if="scope.row.status==9">通过</span>
<span v-if="scope.row.status==2">不通过</span>
</template>
</el-table-column>
<el-table-column prop="auditTime" label="审核时间"></el-table-column>
@@ -105,10 +82,9 @@
<el-dialog title="课程详情" :visible.sync="showDetails" @close="examin = {};" width="900px" custom-class="g-dialog">
<div v-if="examin.detailType == 10"><auditCourse1 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse1></div>
<div v-if="examin.detailType == 20"><auditCourse2 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse2></div>
<span slot="footer" class="dialog-footer">
<el-button @click="showDetails = false;examin = {};"> </el-button>
</span>
<span slot="footer" class="dialog-footer">
<el-button @click="showDetails = false;examin = {};"> </el-button>
</span>
</el-dialog>
</div>
</template>
@@ -116,9 +92,11 @@
<script>
import courseForm from '@/components/Course/courseForm.vue';
import manager from '@/components/Study/manager.vue';
import QRCode from 'qrcodejs2';
import auditCourse1 from '@/components/Course/auditCourse1.vue';
import auditCourse2 from '@/components/Course/auditCourse2.vue';
import adminPage from '@/components/Administration/adminPage.vue';
import {courseType} from '../../utils/tools.js';//resOwnerListMap
import apiType from '../../api/modules/type.js';
import apiCourse from '../../api/modules/course.js';
import apiAudit from '@/api/system/audit.js';
@@ -128,7 +106,7 @@ export default {
name: 'manageCourse',
components: {courseForm, manager, auditCourse1, auditCourse2,adminPage },
computed: {
...mapGetters(['resOwnerMap','sysTypeMap']),
...mapGetters(['resOwnerMap','sysTypeMap','userInfo']),
},
data() {
return {
@@ -136,43 +114,31 @@ export default {
sysTypeListMap:[],
resOwnerListMap:[],
showDetails:false,
examin:{
detailType: '',
examineId: '',
examineName: '',
},
examin:{ detailType: '', examineId: '', examineName: ''},
courseType: courseType,
page: {
pageIndex: 1,//第几页
pageSize: 10, // 每页多少条
count: 0
},
resOwner: [],
defaultProps:{
value: 'code',
label: 'name',
},
defaultTypeProps:{
value: 'id',
label: 'name',
},
isExamine: 1,
detailType: 1,
dialogVisible: false,
inviteTeacher: {
//邀请
dlgShow: false,
params: { name: '' },
list: []
},
params: {},
params: {status:'',courseUser:'',courseName:''},
pageData:[],
courseChooseShow: false,
courseChooseId: '',
auditRecords:[]
};
},
mounted() {
this.loadResOwners();
this.searchData();
this.getResOwnerTree().then(rs=>{
this.getResOwnerTree().then(rs=>{
this.resOwnerListMap=rs;
});
this.getSysTypeTree().then(rs=>{
@@ -181,22 +147,22 @@ export default {
},
methods: {
getseatch(){
this.params.pageIndex= 1;
getsearch(){
this.params.pageIndex = 1;
this.searchData();
},
},
reset(){
this.resOwner = ''
this.resOwner = ''
this.params.sysType = ''
this.params.createUser = ''
this.params.keyword = ''
this.params.courseName = ''
this.params.courseUser = ''
this.params.type = ''
this.params.publish = ''
this.sysTypeList = [];
this.params.sysType1 = '';
this.params.sysType2 = '';
this.params.sysType3 = '';
this.params.pageIndex= 1;
this.params.pageIndex = 1;
this.searchData();
},
...mapActions({
@@ -213,18 +179,17 @@ export default {
if(code==''){return '';}
return this.sysTypeMap.get(code);
},
async searchData() {
this.params.resOwner1 = this.resOwner[0];
this.params.resOwner2 = this.resOwner[1];
this.params.resOwner3 = this.resOwner[2];
this.params.status = 5;
async searchData() {
this.params.status = 9;
this.params.forward=2;//未转发的处理
this.params.toAid=this.userInfo.aid;
this.params.pageIndex = this.page.pageIndex;
this.params.pageSize = this.page.pageSize;
this.params.sysType1 = this.sysTypeList[0];
this.params.sysType2 = this.sysTypeList[1];
this.params.sysType3 = this.sysTypeList[2];
this.params.courseType1 = this.sysTypeList[0];
this.params.courseType2 = this.sysTypeList[1];
this.params.courseType3 = this.sysTypeList[2];
try {
const {result, status} = await apiCourse.auditList(this.params);
const {result, status} = await apiCourse.auditPageRecords(this.params);
if(status === 200) {
this.pageData = result.list;
this.page.count = result.count;
@@ -234,19 +199,22 @@ export default {
}
},
viewTopic(row) {
this.examin.detailType = row.type;
this.examin.examineId = row.id;
this.examin.detailType = row.courseType;
this.examin.examineId = row.courseId;
this.examin.examineName = row.name;
this.showDetails = true;
},
toExamine(row) {
this.detailType = row.type;
this.dialogVisible = true;
apiAudit.page(1,row.id).then(res=>{
let req={
courseId:row.courseId
}
apiCourse.auditCourseRecords(req).then(res=>{
if (res.status === 200) {
this.inviteTeacher.list = res.result;
this.auditRecords = res.result;
} else {
this.$message.error(res.message);
this.$message.error(res.message);
}
})
},
@@ -258,16 +226,18 @@ export default {
handleCurrentChange(val) {
this.page.pageIndex = val;
this.searchData();
},
}
}
};
</script>
<style lang="scss" scoped>
.list-wu{
text-align: center;
margin: 40px;
color: #333;
.el-col {
padding: 0 0 0 10px !important;
}
.grid-content {
padding-right: 0px;
}
.course-types {
display: flex;

View File

@@ -5,7 +5,7 @@
<!-- <el-col :span="6">
<el-cascader placeholder="资源归属" clearable v-model="resOwner" :props="defaultProps" :options="resOwnerListMap"></el-cascader>
</el-col> -->
<el-col :span="3" >
<el-col :span="6" >
<el-cascader placeholder="内容分类" clearable v-model="sysTypeList" :props="defaultTypeProps" :options="sysTypeListMap"></el-cascader>
</el-col>
<el-col :span="4">
@@ -14,6 +14,7 @@
<el-col :span="4">
<el-input placeholder="名称" v-model="params.keyword" clearable></el-input>
</el-col>
<!--
<el-col :span="4">
<el-select v-model="params.publish" placeholder="是否发布" clearable>
<el-option label="全部" :value="null"></el-option>
@@ -21,14 +22,13 @@
<el-option label="未发布" :value="false"></el-option>
</el-select>
</el-col>
-->
<el-col :span="8">
<el-button type="primary" @click="getsearch()" icon="el-icon-search">搜索</el-button>
<el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button>
</el-col>
</el-row>
<el-row :gutter="10" style="margin-top:10px">
</el-row>
</div>
<!-- <div style="padding-left">
@@ -68,9 +68,9 @@
<span v-if="scope.row.status == 3">审核未通过</span>
</template>
</el-table-column>
<el-table-column label="是否发布" width="130px">
<el-table-column label="转审" width="130px">
<template slot-scope="scope">
{{ scope.row.published !== true ? '未发布' : '已发布' }}
<el-tag v-if="scope.row.auditForward == 2">已转审</el-tag>
</template>
</el-table-column>
<el-table-column label="创建人" prop="sysCreateBy"></el-table-column>
@@ -78,7 +78,7 @@
<el-table-column label="操作" width="180px" fixed="right">
<template slot-scope="scope">
<el-button @click="toExamine(scope.row)" type="text">审核</el-button>
<el-button @click="toReferral(scope.row)" type="text">邀请审核</el-button>
<el-button v-if="scope.row.auditForward == 1" @click="toReferral(scope.row)" type="text">邀请审核</el-button>
<el-button @click="toPreview(scope.row)" type="text">预览</el-button>
</template>
</el-table-column>
@@ -172,7 +172,7 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false;examin={}"> </el-button>
<el-button type="primary" @click="examineData(true)">提交</el-button>
<el-button :loading="btnLoading" type="primary" @click="examineData(true)">提交</el-button>
<!-- <el-button type="primary" @click="examineData(true)">提交并发布</el-button> -->
</span>
</el-dialog>
@@ -230,6 +230,7 @@ export default {
},
data() {
return {
btnLoading:false,
selectedTeacher:'',
teacherInfo:{
show:false,
@@ -250,6 +251,7 @@ export default {
examin:{
detailType: '',
examineId: '',
auditId:'',
examineName: '',
},
paperJson:{items:[]},
@@ -347,12 +349,13 @@ export default {
this.teacherInfo.list = [];
this.referralData={
teacherId:'',
courseId:row.id,
auditId:row.auditId,
teacherName:'',
remark:'',
};
this.selectedTeacher = '';
this.teacherInfo.name = '';
this.referralData.courseId = row.id;
this.teacherInfo.show = true;
},
keyupEnter(){ // 转审选择教师
@@ -437,15 +440,18 @@ export default {
}
},
// 直接审核
//直接审核
examineData(flag) {
if(this.isExamine == 1) {
let params = {
id:this.examin.examineId,//课程id,
title:this.examin.examineName,//课程的名称,
pass: this.auditInfo.pass,//Boolean 是否通过,
remark: this.auditInfo.remark// 备注
auditId:this.examin.auditId,//审核记录的id
from:1,
courseId:this.examin.examineId,//课程id,
title:this.examin.examineName,//课程的名称,
pass: this.auditInfo.pass,//Boolean 是否通过,
remark: this.auditInfo.remark// 备注
}
this.btnLoading=true;
if(flag){
apiCourse.auditAndPublish(params).then(res=>{
if(res.status === 200) {
@@ -456,6 +462,7 @@ export default {
}else{
this.$message.error(res.message);
}
this.btnLoading=false;
})
}else{
apiCourse.audit(params).then(res=>{
@@ -467,6 +474,7 @@ export default {
}else{
this.$message.error(res.message);
}
this.btnLoading=false;
})
}
@@ -480,7 +488,7 @@ export default {
this.params.resOwner1 = this.resOwner[0];
this.params.resOwner2 = this.resOwner[1];
this.params.resOwner3 = this.resOwner[2];
this.params.status = 2;
this.params.auditStatus = 1;
this.params.pageIndex = this.page.pageIndex;
this.params.pageSize = this.page.pageSize;
this.params.sysType1 = this.sysTypeList[0];
@@ -514,6 +522,7 @@ export default {
},
toExamine(row) {
this.examin.detailType = row.type;
this.examin.auditId=row.auditId;
this.examin.examineId = row.id;
this.examin.examineName = row.name;
this.auditInfo.remark = '';
@@ -542,29 +551,6 @@ export default {
{ id: '3', name: '李玉冰', type:'驳回',text: '内容重复',sex: '男', code: '1023123', orgInfo: '教育技术中心', checked: false }
];
},
showQrimage() {
this.qrcodeShow = true;
// 二维码内容,一般是由后台返回的跳转链接,这里是写死的一个链接
this.qrcode = 'https://yuchengkai.cn/docs/frontend/#typeof';
// 使用$nextTick确保数据渲染
this.$nextTick(() => {
this.crateQrcode();
});
},
// creatQrCode() {
// },
// 生成二维码
crateQrcode() {
this.qr = new QRCode('qrcode', {
width: 150,
height: 150, // 高度
text: this.qrcode // 二维码内容
// render: 'canvas' // 设置渲染方式(有两种方式 table和canvas默认是canvas
// background: '#f0f'
// foreground: '#ff0'
});
},
// 关闭弹框,清除已经生成的二维码
closeCode() {
this.$refs.qrcode.innerHTML = '';

View File

@@ -2,41 +2,36 @@
<template>
<div class="u-page">
<div style="padding: 2px 0px 10px 0px;">
<el-row :gutter="20">
<!-- <el-col :span="6">
<el-cascader placeholder="资源归属" clearable v-model="resOwner" :props="defaultProps" :options="resOwnerListMap"></el-cascader>
</el-col> -->
<el-col :span="3">
<el-row :gutter="20">
<el-col :span="4">
<el-cascader placeholder="内容分类" clearable v-model="sysTypeList" :props="defaultTypeProps" :options="sysTypeListMap"></el-cascader>
</el-col>
<el-col :span="4">
<el-input placeholder="创建人" v-model="params.createUser" clearable></el-input>
<el-input placeholder="创建人" v-model="params.courseUser" clearable></el-input>
</el-col>
<el-col :span="4">
<el-input placeholder="名称" style="width:100%" v-model="params.keyword" clearable></el-input>
<el-input placeholder="课程名称" style="width:100%" v-model="params.courseName" clearable></el-input>
</el-col>
<!--
<el-col :span="4">
<el-select v-model="params.publish" placeholder="是否发布" clearable>
<el-select v-model="params.status" placeholder="审核结果" clearable>
<el-option label="全部" :value="null"></el-option>
<el-option label="已发布" :value="true"></el-option>
<el-option label="未发布" :value="false"></el-option>
<el-option label="通过" :value="9"></el-option>
<el-option label="未通过" :value="2"></el-option>
</el-select>
</el-col>
-->
<el-col :span="8">
<el-button type="primary" @click="getsearch()" icon="el-icon-search">搜索</el-button>
<el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button>
</el-col>
</el-row>
<el-row :gutter="10" style="margin-top:10px">
</el-row>
</div>
<el-table :data="pageData" border stripe>
<el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="名称" prop="name" show-overflow-tooltip width="200px">
<el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="课程名称" prop="courseName" show-overflow-tooltip width="200px">
<template slot-scope="scope">
<span class="previewStyle" @click="viewTopic(scope.row)">{{ scope.row.name }}</span>
<span class="previewStyle" @click="viewTopic(scope.row)">{{ scope.row.courseName }}</span>
</template>
</el-table-column>
<el-table-column label="内容分类" prop="sysType" sortable width="240px">
@@ -46,44 +41,25 @@
<span v-if="scope.row.sysType3 != ''">/{{sysTypeName(scope.row.sysType3)}}</span>
</template>
</el-table-column>
<!-- <el-table-column label="资源归属" sortable prop="author" width="240px">
<el-table-column label="审核状态" prop="status" width="120px">
<template slot-scope="scope">
<span>{{resOwnerName(scope.row.resOwner1)}}</span>
<span v-if="scope.row.resOwner2 != ''">/{{resOwnerName(scope.row.resOwner2)}}</span>
<span v-if="scope.row.resOwner3 != ''">/{{resOwnerName(scope.row.resOwner3)}}</span>
</template>
</el-table-column> -->
<!-- <el-table-column label="授课方式" prop="type" width="120px">
<template slot-scope="scope">
{{ courseType(scope.row.type)}}
</template>
</el-table-column> -->
<el-table-column label="状态" prop="status" width="120px">
<template slot-scope="scope">
<!-- 1未提交 2.已提交 = 未审核 5 已审核 -->
<span v-if="scope.row.status == 1">未提交</span>
<span v-if="scope.row.status == 2">待审核</span>
<span v-if="scope.row.status == 5">已审核</span>
<span v-if="scope.row.status == 3">审核未通过</span>
<span v-if="scope.row.status == 2">不通过</span>
<span v-if="scope.row.status == 9">通过</span>
</template>
</el-table-column>
<el-table-column label="是否发布" width="130px">
<template slot-scope="scope">
{{ scope.row.published !== true ? '未发布' : '已发布' }}
</template>
</el-table-column>
<el-table-column label="创建人" prop="sysCreateBy"></el-table-column>
<el-table-column label="创建时间" prop="sysCreateTime" width="200px" show-overflow-tooltip></el-table-column>
<el-table-column label="创建人" prop="courseUser"></el-table-column>
<el-table-column label="审核时间" prop="auditTime" width="200px" show-overflow-tooltip></el-table-column>
<el-table-column label="审核说明" prop="auditRemark" width="200px" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="100px" fixed="right">
<template slot-scope="scope">
<el-button @click="toExamine(scope.row)" type="text" >审核记录</el-button>
<el-button @click="toExamine(scope.row)" type="text" >审核日志</el-button>
</template>
</el-table-column>
</el-table>
<div v-if="pageData.length > 0" style="text-align: center;margin-top: 50px;">
<el-pagination
background
<el-pagination background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page.pageIndex"
@@ -96,10 +72,12 @@
<div style="height: 100px;"></div>
<el-dialog title="审核记录" :visible.sync="dialogVisible" width="900px" custom-class="g-dialog">
<div>
<el-table max-height="500" border :data="inviteTeacher.list" style="width: 100%;">
<el-table-column prop="sysCreateBy" label="姓名" width="180"></el-table-column>
<el-table max-height="500" border :data="auditRecords" style="width: 100%;">
<el-table-column prop="auditUser" label="审核人" width="180"></el-table-column>
<el-table-column prop="type" label="审核状态">
<template slot-scope="scope">{{scope.row.auditState? '通过': '不通过'}}
<template slot-scope="scope">
<span v-if="scope.row.status==9">通过</span>
<span v-if="scope.row.status==2">不通过</span>
</template>
</el-table-column>
<el-table-column prop="auditTime" label="审核时间"></el-table-column>
@@ -113,10 +91,9 @@
<el-dialog title="课程详情" :visible.sync="showDetails" @close="examin = {};" width="900px" custom-class="g-dialog">
<div v-if="examin.detailType == 10"><auditCourse1 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse1></div>
<div v-if="examin.detailType == 20"><auditCourse2 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse2></div>
<span slot="footer" class="dialog-footer">
<el-button @click="showDetails = false;examin = {};"> </el-button>
</span>
<span slot="footer" class="dialog-footer">
<el-button @click="showDetails = false;examin = {};"> </el-button>
</span>
</el-dialog>
</div>
</template>
@@ -138,7 +115,7 @@ export default {
name: 'manageCourse',
components: {courseForm, manager, auditCourse1, auditCourse2,adminPage },
computed: {
...mapGetters(['resOwnerMap','sysTypeMap']),
...mapGetters(['resOwnerMap','sysTypeMap','userInfo']),
},
data() {
return {
@@ -146,81 +123,25 @@ export default {
sysTypeListMap:[],
resOwnerListMap:[],
showDetails:false,
examin:{
detailType: '',
examineId: '',
examineName: '',
},
paperJson:{items:[]},
courseType: courseType,
examin:{ detailType: '', examineId: '', examineName: ''},
courseType: courseType,
page: {
pageIndex: 1,//第几页
pageSize: 10, // 每页多少条
count: 0
},
resOwner: [],
defaultProps:{
value: 'code',
label: 'name',
},
defaultTypeProps:{
value: 'id',
label: 'name',
},
manageStudyData: {},
qrcode: '',
isExamine: 1,
auditInfo: {
pass: true,
remark: ''
},
detailType: 1,
dialogVisible: false,
qrcodeShow: false,
currentPage4: 4,
inviteTeacher: {
//邀请
dlgShow: false,
params: { name: '' },
list: []
},
manageStudy: {
dlgShow: false
},
params: {},
// optionsList: [],
// typeList: [],
params: {status:'',courseUser:'',courseName:''},
pageData:[],
courseChooseShow: false,
courseChooseId: '',
weike: {
onlyRequired: false,
dlgShow: false,
fileType: '',
info: {
shebei: ''
}
},
biaoke: {
dlgShow: false
},
recommend: {
dlgShow: false,
records: [
{ addTime: '2022-02-14 11:30:00', toType: 2, status: 9, toAid: '', toName: '受众名称', toInfo: '', remark: '' },
{ addTime: '2022-02-14 11:30:00', toType: 2, status: 3, toAid: '', toName: '受众名称', toInfo: '', remark: '' },
{ addTime: '2022-02-14 11:30:00', toType: 2, status: 9, toAid: '', toName: '受众名称', toInfo: '', remark: '' }
]
},
catalogs: {
addNewZhang: false,
addNewCell: false,
treeList: [
{ id: '1', name: '第一章', children: [{ id: '11', name: '第一单元' }, { id: '12', name: '第二单元' }, { id: '13', name: '第三单元' }] },
{ id: '2', name: '第二章', children: [{ id: '21', name: '第一单元' }, { id: '22', name: '第二单元' }, { id: '23', name: '第三单元' }] }
]
}
auditRecords:[]
};
},
mounted() {
@@ -240,10 +161,10 @@ export default {
this.searchData();
},
reset(){
this.resOwner = ''
this.resOwner = ''
this.params.sysType = ''
this.params.createUser = ''
this.params.keyword = ''
this.params.courseUser = ''
this.params.courseName = ''
this.params.type = ''
this.params.publish = ''
this.sysTypeList = [];
@@ -267,18 +188,17 @@ export default {
if(code==''){return '';}
return this.sysTypeMap.get(code);
},
async searchData() {
this.params.resOwner1 = this.resOwner[0];
this.params.resOwner2 = this.resOwner[1];
this.params.resOwner3 = this.resOwner[2];
this.params.status = 5;
async searchData() {
this.params.status = 9;
this.params.forward=1;//未转发的处理
this.params.aid=this.userInfo.aid;
this.params.pageIndex = this.page.pageIndex;
this.params.pageSize = this.page.pageSize;
this.params.sysType1 = this.sysTypeList[0];
this.params.sysType2 = this.sysTypeList[1];
this.params.sysType3 = this.sysTypeList[2];
this.params.courseType1 = this.sysTypeList[0];
this.params.courseType2 = this.sysTypeList[1];
this.params.courseType3 = this.sysTypeList[2];
try {
const {result, status} = await apiCourse.auditList(this.params);
const {result, status} = await apiCourse.auditPageRecords(this.params);
if(status === 200) {
this.pageData = result.list;
this.page.count = result.count;
@@ -287,46 +207,26 @@ export default {
console.log(error);
}
},
// async getTypeData() {
// try {
// const {result, status} = await apiType.tree(1);
// if(status === 200) {
// this.optionsList = result;
// }
// } catch (error) {
// console.log(error);
// }
// },
viewTopic(row) {
this.examin.detailType = row.type;
this.examin.examineId = row.id;
this.examin.detailType = row.courseType;
this.examin.examineId = row.courseId;
this.examin.examineName = row.name;
this.showDetails = true;
},
editCurriculum(row) {
this.editData = row;
},
jumpDetails() {
// this.$router.push('/course/micro');
// 跳转打开新页面
let routeData = this.$router.resolve({ path: '/course/micro'}); // , query: { id: 1 }
window.open(this.webBaseUrl+routeData.href, '_blank');
},
toExamine(row) {
this.detailType = row.type;
this.dialogVisible = true;
apiAudit.page(1,row.id).then(res=>{
let req={
courseId:row.courseId
}
apiCourse.auditCourseRecords(req).then(res=>{
if (res.status === 200) {
this.inviteTeacher.list = res.result;
this.auditRecords = res.result;
} else {
this.$message.error(res.message);
this.$message.error(res.message);
}
})
},
enSure() {
// 确认事件
},
handleSizeChange(val) {
this.page.pageSize = val;
this.page.pageIndex = 1;
@@ -335,133 +235,6 @@ export default {
handleCurrentChange(val) {
this.page.pageIndex = val;
this.searchData();
},
chooseInvite(row) {
//邀请老师审核
this.inviteTeacher.dlgShow = true;
},
findTeachers() {
this.inviteTeacher.list = [
{ id: '1', name: '李玉冰', type:'通过',text: '实用',sex: '男', code: '1023123', orgInfo: '教育技术中心', checked: false },
{ id: '2', name: '李玉冰', type:'未通过',text: '内容在调整',sex: '男', code: '1023123', orgInfo: '教育技术中心', checked: false },
{ id: '3', name: '李玉冰', type:'驳回',text: '内容重复',sex: '男', code: '1023123', orgInfo: '教育技术中心', checked: false }
];
},
showQrimage() {
this.qrcodeShow = true;
// 二维码内容,一般是由后台返回的跳转链接,这里是写死的一个链接
this.qrcode = 'https://yuchengkai.cn/docs/frontend/#typeof';
// 使用$nextTick确保数据渲染
this.$nextTick(() => {
this.crateQrcode();
});
},
// creatQrCode() {
// },
// 生成二维码
crateQrcode() {
this.qr = new QRCode('qrcode', {
width: 150,
height: 150, // 高度
text: this.qrcode // 二维码内容
// render: 'canvas' // 设置渲染方式(有两种方式 table和canvas默认是canvas
// background: '#f0f'
// foreground: '#ff0'
});
},
// 关闭弹框,清除已经生成的二维码
closeCode() {
this.$refs.qrcode.innerHTML = '';
},
showManageStudy(row) {
console.log(row);
this.manageStudyData = row;
this.manageStudy.dlgShow = true;
},
releaseData(row) {
this.$confirm('正在发布考试, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.pageData.list.forEach((item, index) => {
if (item.id === row.id) {
item.collectNumber = 1;
}
});
this.$message({
type: 'success',
message: '发布成功!'
});
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
showChooseCourse() {
this.courseChooseShow = true;
},
chooseCourseType(item, idx) {
this.courseChooseId = item.id;
},
toInputCourse() {
if (this.courseChooseId == '1') {
this.showWeike();
} else if (this.courseChooseId == '2') {
this.showBiaoke();
}
this.courseChooseShow = false;
},
newHandleClick() {},
showRecords(item) {
this.recommend.dlgShow = true;
},
showWeike() {
this.weike.dlgShow = true;
},
showBiaoke() {
this.biaoke.dlgShow = true;
},
setTop(item, idx) {
let msg = '已设置置顶';
if (item.isTop) {
item.isTop = false;
msg = '已取消置顶';
} else {
item.isTop = true;
}
this.$message({ message: msg, type: 'success', offset: 50 });
},
delItem(item, idx) {
this.$confirm('您确定要删除所选课程吗?', '删除提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.items.splice(idx, 1);
this.$message({ type: 'success', message: '删除成功!', offset: 50 });
})
.catch(() => {
this.$message({ type: 'info', message: '已取消删除', offset: 50 });
});
},
showAddCatalogZhang(bal) {
this.catalogs.addNewZhang = bal;
},
saveNewCatalogZhang() {
this.catalogs.addNewZhang = false;
},
filterType(value, row) {
return row.type === value;
},
filterStatus(value, row) {
return row.status === value;
}
}
};