mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 19:36:43 +08:00
教师课程邀请审核
This commit is contained in:
15
src/api/boe/HRBP.js
Normal file
15
src/api/boe/HRBP.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import ajax from '@/api/boe/boeApiAjax.js'
|
||||
|
||||
/**
|
||||
* 获取课程审核的 HRBP 审核 人信息
|
||||
* 机构的id
|
||||
* organization_id
|
||||
*/
|
||||
const getHRBP = function(orgId) {
|
||||
return ajax.get('/b1/system/user/org-hrbp?organization_id='+orgId);
|
||||
}
|
||||
|
||||
|
||||
export default {
|
||||
getHRBP
|
||||
}
|
||||
@@ -274,13 +274,18 @@ const countWaitAudit = function() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 当前用户需要审核的课程列表
|
||||
* 管理员需要审核的课程列表
|
||||
* @param {Object} query 同pageList
|
||||
*/
|
||||
const auditList = function(query) {
|
||||
return ajax.post('/xboe/m/course/manage/audit-pagelist', query);
|
||||
}
|
||||
|
||||
/**教师需要审核的课程列表*/
|
||||
const teacherAuditList = function(query) {
|
||||
return ajax.post('/xboe/m/course/audit/teacher-course', query);
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定审核人,转审核人
|
||||
* 点击“转审” 弹出教师查询窗口,查询教师,填写备注,提交,调用此接口
|
||||
@@ -430,6 +435,7 @@ export default {
|
||||
getHomework,
|
||||
countWaitAudit,
|
||||
auditList,
|
||||
teacherAuditList,
|
||||
auditAppoint,
|
||||
getAuditInfo,
|
||||
getAuditLogs,
|
||||
|
||||
@@ -1158,13 +1158,14 @@ export default {
|
||||
let $this = this;
|
||||
//先获取课程内容
|
||||
apiHRBP.getHRBP(this.orgKid).then(rs=>{
|
||||
if(rs.status==200){
|
||||
if(rs.status==200 && rs.result.length>0){
|
||||
let hrbpUser=rs.result[0];
|
||||
postData.auditUser={
|
||||
email:rs.result.email,
|
||||
code:rs.result.user_no,
|
||||
name:rs.result.real_name,
|
||||
kid:rs.result.user_id,
|
||||
orgId:rs.result.orgnization_id,
|
||||
email:hrbpUser.email,
|
||||
code:hrbpUser.user_no,
|
||||
name:hrbpUser.real_name,
|
||||
kid:hrbpUser.user_id,
|
||||
orgId:hrbpUser.orgnization_id
|
||||
}
|
||||
apiCourse.submitCourse(postData).then(res => {
|
||||
//this.btnLoading=false;
|
||||
|
||||
@@ -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,12 +22,13 @@
|
||||
<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>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- <div style="padding-left">
|
||||
|
||||
@@ -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">
|
||||
@@ -229,6 +199,7 @@ export default {
|
||||
examin:{
|
||||
detailType: '',
|
||||
examineId: '',
|
||||
auditId:'',
|
||||
examineName: '',
|
||||
},
|
||||
paperJson:{items:[]},
|
||||
@@ -304,15 +275,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();
|
||||
@@ -348,7 +311,7 @@ export default {
|
||||
//预览跳转页面
|
||||
toPreview(row) {
|
||||
if(row.type == 10) {
|
||||
|
||||
|
||||
window.open(`${this.webBaseUrl}/course/microPreview?id=${row.id}`);
|
||||
} else{
|
||||
window.open(`${this.webBaseUrl}/course/rePreview?id=${row.id}`);
|
||||
@@ -359,7 +322,8 @@ export default {
|
||||
examineData(flag) {
|
||||
if(this.isExamine == 1) {
|
||||
let params = {
|
||||
id:this.examin.examineId,//课程id,
|
||||
auditId:this.examin.auditId,
|
||||
courseId:this.examin.examineId,//课程id,
|
||||
title:this.examin.examineName,//课程的名称,
|
||||
pass: this.auditInfo.pass,//Boolean 是否通过,
|
||||
remark: this.auditInfo.remark// 备注
|
||||
@@ -395,7 +359,7 @@ export default {
|
||||
},
|
||||
// 课程查询
|
||||
async searchData() {
|
||||
|
||||
|
||||
this.params.resOwner1 = this.resOwner[0];
|
||||
this.params.resOwner2 = this.resOwner[1];
|
||||
this.params.resOwner3 = this.resOwner[2];
|
||||
@@ -407,7 +371,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 +401,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;
|
||||
|
||||
@@ -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,13 +22,14 @@
|
||||
<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 +70,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 +80,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>
|
||||
@@ -250,6 +252,7 @@ export default {
|
||||
examin:{
|
||||
detailType: '',
|
||||
examineId: '',
|
||||
auditId:'',
|
||||
examineName: '',
|
||||
},
|
||||
paperJson:{items:[]},
|
||||
@@ -347,12 +350,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(){ // 转审选择教师
|
||||
@@ -430,7 +434,7 @@ export default {
|
||||
//预览跳转页面
|
||||
toPreview(row) {
|
||||
if(row.type == 10) {
|
||||
|
||||
|
||||
window.open(`${this.webBaseUrl}/course/microPreview?id=${row.id}`);
|
||||
} else{
|
||||
window.open(`${this.webBaseUrl}/course/rePreview?id=${row.id}`);
|
||||
@@ -441,10 +445,11 @@ 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
|
||||
courseId:this.examin.examineId,//课程id,
|
||||
title:this.examin.examineName,//课程的名称,
|
||||
pass: this.auditInfo.pass,//Boolean 是否通过,
|
||||
remark: this.auditInfo.remark// 备注
|
||||
}
|
||||
if(flag){
|
||||
apiCourse.auditAndPublish(params).then(res=>{
|
||||
@@ -514,6 +519,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 +548,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 = '';
|
||||
|
||||
Reference in New Issue
Block a user