mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26: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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定审核人,转审核人
|
||||
* 点击“转审” 弹出教师查询窗口,查询教师,填写备注,提交,调用此接口
|
||||
@@ -317,6 +322,22 @@ const audit = function(data) {
|
||||
return ajax.post('/xboe/m/course/manage/audit', data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 审核记录列表,分页查询
|
||||
*/
|
||||
const auditPageRecords = function(data) {
|
||||
return ajax.post('/xboe/m/course/audit/page-records', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核记录列表,要卖课程id,查询出审核列记录信息
|
||||
* { courseId:必须}
|
||||
*/
|
||||
const auditCourseRecords = function(data) {
|
||||
return ajax.post('/xboe/m/course/audit/course-records', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 管理员的课程发布
|
||||
* @param {Object} query {ids:课程id,多个使用逗号分隔,title:课程的名称, Boolean pass 是否发布}
|
||||
@@ -363,8 +384,8 @@ const detailFew=function(id){
|
||||
/*
|
||||
直接审核
|
||||
*/
|
||||
const sumbits=function(id){
|
||||
return ajax.get('/xboe/m/course/manage/sumbits?id='+id);
|
||||
const sumbits=function(data){
|
||||
return ajax.post('/xboe/m/course/manage/sumbits',data);
|
||||
}
|
||||
/*
|
||||
教师授课记录
|
||||
@@ -430,10 +451,13 @@ export default {
|
||||
getHomework,
|
||||
countWaitAudit,
|
||||
auditList,
|
||||
teacherAuditList,
|
||||
auditAppoint,
|
||||
getAuditInfo,
|
||||
getAuditLogs,
|
||||
audit,
|
||||
auditPageRecords,
|
||||
auditCourseRecords,
|
||||
auditAndPublish,
|
||||
getAssess,
|
||||
setTop,
|
||||
|
||||
@@ -21,8 +21,14 @@ const treeList = function (query) {
|
||||
const listByParent = function (parentId) {
|
||||
return ajax.get('/xboe/org/list-by-parent?parentId='+parentId);
|
||||
}
|
||||
|
||||
const getSimple = function (id) {
|
||||
return ajax.get('/xboe/org/simple?id='+id);
|
||||
}
|
||||
|
||||
export default {
|
||||
treeList,
|
||||
getSimple,
|
||||
listByParent
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import ajax from '@/utils/xajax.js'
|
||||
* name 姓名
|
||||
* userNo 工号
|
||||
* departId 部门ID
|
||||
* } query
|
||||
* @returns
|
||||
* } query
|
||||
* @returns
|
||||
*/
|
||||
const list=function(query) {
|
||||
return ajax.get('/xboe/sys/user/page',{params:query});
|
||||
@@ -19,8 +19,8 @@ const list=function(query) {
|
||||
* 通过用户名查询用户信息(该接口限定使用场景为先查本地库后查旧系统)
|
||||
* @param {
|
||||
* 用户名
|
||||
* } name
|
||||
* @returns
|
||||
* } name
|
||||
* @returns
|
||||
*/
|
||||
const searchLoginName = function(name) {
|
||||
return ajax.get('/xboe/sys/user/search-loginname?loginName='+name);
|
||||
@@ -28,8 +28,8 @@ const searchLoginName = function(name) {
|
||||
|
||||
/**
|
||||
* 根据多个人员的id,得到用户的信息(简要信息)
|
||||
* @param {账号ID数组} ids
|
||||
* @returns
|
||||
* @param {账号ID数组} ids
|
||||
* @returns
|
||||
*/
|
||||
const getByIds = function(ids) {
|
||||
return ajax.postJson('/xboe/sys/user/ids',ids);
|
||||
@@ -37,8 +37,8 @@ const getByIds = function(ids) {
|
||||
|
||||
/**
|
||||
* 根据loginName,得到用户的信息(简要信息)
|
||||
* @param {用户名} loginName
|
||||
* @returns
|
||||
* @param {用户名} loginName
|
||||
* @returns
|
||||
*/
|
||||
const getByLoginName = function(loginName) {
|
||||
return ajax.get('/xboe/sys/user/loginname?loginName='+loginName);
|
||||
@@ -46,7 +46,7 @@ const getByLoginName = function(loginName) {
|
||||
|
||||
/**
|
||||
* 根据name,得到用户的信息(简要信息)
|
||||
* @param {用户姓名} name
|
||||
* @param {用户姓名} name
|
||||
* @returns 返回列表
|
||||
*/
|
||||
const findByName = function(name) {
|
||||
@@ -55,18 +55,23 @@ const getByLoginName = function(loginName) {
|
||||
|
||||
/**
|
||||
* 得到用户详情(详细信息)
|
||||
* @param {*} id
|
||||
* @returns
|
||||
* @param {*} id
|
||||
* @returns
|
||||
*/
|
||||
const detail = function(id) {
|
||||
return ajax.get('/xboe/sys/user/detail?id='+id);
|
||||
}
|
||||
|
||||
const getOrgSimpleByUserId = function(id) {
|
||||
return ajax.get('/xboe/sys/user/org/org-byuserid?userId='+id);
|
||||
}
|
||||
|
||||
export default{
|
||||
list,
|
||||
searchLoginName,
|
||||
getByIds,
|
||||
getByLoginName,
|
||||
findByName,
|
||||
detail
|
||||
detail,
|
||||
getOrgSimpleByUserId
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
{{teacher && teacher.join(',')}}</el-form-item>
|
||||
<!-- <el-form-item label="系统标签">{{courseInfo.tags}}</el-form-item> -->
|
||||
<el-form-item label="课程来源">{{courseInfo.source == 2?'外部':'内部'}}</el-form-item>
|
||||
<el-form-item label="资源归属" >{{orgName}}</el-form-item>
|
||||
<el-form-item label="目标人群">{{courseInfo.forUsers}}</el-form-item>
|
||||
<el-form-item label="观看设置">
|
||||
{{courseInfo.device == 3? '多端可见': courseInfo.device == 2?'移动端可见':'PC端可见'}}
|
||||
@@ -60,7 +61,7 @@
|
||||
<el-col :span="8">
|
||||
<div @click.stop="chooseFile">
|
||||
<imageUpload :disabled="true" :value="courseCoverurl" width="160px" height="90px" @success="uploadCoverImgSuccess" @subimage="acceptimage" @remove="removeCoverImgSuccess"></imageUpload>
|
||||
|
||||
|
||||
</div>
|
||||
<div>上传为16:9(如:800*450)的png或jpg图片</div>
|
||||
</el-col>
|
||||
@@ -93,6 +94,11 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="资源归属" required>
|
||||
<el-input placeholder="请选择" v-model="orgName" >
|
||||
<el-button v-if="identity==3 || identity==5" @click="showChooseOrg()" slot="append" icon="el-icon-search">选择</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="目标人群" >
|
||||
<el-input maxlength="50" show-word-limit v-model="courseInfo.forUsers" placeholder="目标人群(限50字以内)"></el-input>
|
||||
</el-form-item>
|
||||
@@ -216,7 +222,7 @@
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<filecloud :show="dlgFileChoose.show" @choose="changeCourseImage" @close="choseChoose"></filecloud>
|
||||
|
||||
<chooseOrg ref="refChooseOrg" @confirm="confirmChooseOrg"></chooseOrg>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -233,6 +239,7 @@ import pdfPreview from "@/components/PdfPreview/index.vue";
|
||||
import weikeContent from "@/components/Course/weikeContent.vue";
|
||||
import catalogCourseware from "@/components/Course/catalogCourseware.vue";
|
||||
import apiCourse from "@/api/modules/course.js";
|
||||
import apiOrg from '../../api/system/organiza.js';
|
||||
import scene from "../../api/modules/scene.js";
|
||||
import exam from "@/components/Course/exam";
|
||||
import homework from "@/components/Course/homework";
|
||||
@@ -244,6 +251,7 @@ import audioPlayer from "@/components/AudioPlayer/index.vue";
|
||||
import apiCourseFile from '@/api/modules/courseFile.js';
|
||||
import filecloud from '@/components/FileCloud/index.vue';
|
||||
import { mapGetters, mapActions } from "vuex";
|
||||
import chooseOrg from '@/components/System/chooseOrg.vue';
|
||||
// import hyperLink from '@/components/Course/hyperLink.vue';
|
||||
export default {
|
||||
name: "auditCourse1",
|
||||
@@ -258,11 +266,12 @@ export default {
|
||||
WxEditor,
|
||||
pdfPreview,
|
||||
videoPlayer,
|
||||
audioPlayer
|
||||
audioPlayer,
|
||||
chooseOrg
|
||||
// hyperLink
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["resOwnerMap", "sysTypeMap"])
|
||||
...mapGetters(["resOwnerMap", "sysTypeMap","identity"])
|
||||
},
|
||||
props: {
|
||||
id: {
|
||||
@@ -326,6 +335,8 @@ export default {
|
||||
label: "name"
|
||||
},
|
||||
courseCoverurl: "",
|
||||
orgName:'',
|
||||
orgKid:'',
|
||||
courseInfo: {}, //基本信息
|
||||
dataList: [],
|
||||
activeName: "info",
|
||||
@@ -360,7 +371,16 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
||||
showChooseOrg(){
|
||||
this.$refs.refChooseOrg.dlgShow = true;
|
||||
},
|
||||
confirmChooseOrg(orgInfo){
|
||||
//console.log(orgInfo,'orgInfo');
|
||||
this.orgName=orgInfo.name;
|
||||
this.orgKid=orgInfo.kid;
|
||||
this.courseInfo.orgId=orgInfo.id;
|
||||
this.$refs.refChooseOrg.dlgShow = false;
|
||||
},
|
||||
chooseFile(){
|
||||
this.dlgFileChoose.show=true;
|
||||
},
|
||||
@@ -570,6 +590,16 @@ export default {
|
||||
apiCoursePortal.detail(this.id,true).then(rs => {
|
||||
if (rs.status == 200) {
|
||||
this.courseInfo = rs.result.course;
|
||||
//加载所属机构名称
|
||||
this.orgKid='';
|
||||
if(this.courseInfo.orgId){
|
||||
apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
|
||||
if(rrs.status==200){
|
||||
this.orgName=rrs.result.name;
|
||||
this.orgKid=rrs.result.kid;
|
||||
}
|
||||
})
|
||||
}
|
||||
this.teacherList = rs.result.teachers;
|
||||
this.teacherName = rs.result.teachers;
|
||||
this.teacher = rs.result.teachers.map(res => res.teacherName);
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<!-- <el-form-item label="系统标签">
|
||||
{{courseInfo.tags}}
|
||||
</el-form-item> -->
|
||||
<el-form-item label="资源归属" >{{orgName}}</el-form-item>
|
||||
<el-form-item label="目标人群" >
|
||||
{{courseInfo.forUsers}}
|
||||
</el-form-item>
|
||||
@@ -75,7 +76,7 @@
|
||||
<el-col :span="8">
|
||||
<div @click.stop="chooseFile">
|
||||
<imageUpload :disabled="true" :value="courseCoverurl" width="160px" height="90px" @subimage="acceptimage" @success="uploadCoverImgSuccess" @remove="removeCoverImgSuccess"></imageUpload>
|
||||
|
||||
|
||||
</div>
|
||||
<div>上传为16:9(如:800*450)的png或jpg图片</div>
|
||||
</el-col>
|
||||
@@ -108,6 +109,11 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="资源归属" required>
|
||||
<el-input placeholder="请选择" v-model="orgName" >
|
||||
<el-button v-if="identity==3 || identity==5" @click="showChooseOrg()" slot="append" icon="el-icon-search">选择</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="目标人群" >
|
||||
<el-input maxlength="50" show-word-limit v-model="courseInfo.forUsers" placeholder="目标人群(限50字以内)"></el-input>
|
||||
</el-form-item>
|
||||
@@ -254,17 +260,19 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<filecloud :show="dlgFileChoose.show" @choose="changeCourseImage" @close="choseChoose"></filecloud>
|
||||
|
||||
<chooseOrg ref="refChooseOrg" @confirm="confirmChooseOrg"></chooseOrg>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import apiCoursePortal from "@/api/modules/coursePortal.js";
|
||||
import apiOrg from '../../api/system/organiza.js';
|
||||
import exam from "@/components/Course/exam";
|
||||
import homework from "@/components/Course/homework";
|
||||
import pdfPreview from "@/components/PdfPreview/index.vue";
|
||||
import assess from "@/components/Course/assess";
|
||||
import apiTag from "../../api/modules/tag.js";
|
||||
import chooseOrg from '@/components/System/chooseOrg.vue';
|
||||
import {
|
||||
formatDate,
|
||||
courseType,
|
||||
@@ -297,7 +305,8 @@ export default {
|
||||
pdfPreview,
|
||||
videoPlayer,
|
||||
audioPlayer,
|
||||
hyperLink
|
||||
hyperLink,
|
||||
chooseOrg
|
||||
},
|
||||
props: {
|
||||
id: {
|
||||
@@ -318,7 +327,7 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['resOwnerMap','sysTypeMap']),
|
||||
...mapGetters(['resOwnerMap','sysTypeMap','identity']),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -358,6 +367,8 @@ export default {
|
||||
typeList: [], // 资源归属
|
||||
showTags: [], //用于显示标签
|
||||
teacherList: [],
|
||||
orgName:'',
|
||||
orgKid:'',
|
||||
courseInfo: {},
|
||||
courseCoverurl: "",
|
||||
sysTypeListMap:[],
|
||||
@@ -401,8 +412,17 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
chooseFile(){
|
||||
showChooseOrg(){
|
||||
this.$refs.refChooseOrg.dlgShow = true;
|
||||
},
|
||||
confirmChooseOrg(orgInfo){
|
||||
//console.log(orgInfo,'orgInfo');
|
||||
this.orgName=orgInfo.name;
|
||||
this.orgKid=orgInfo.kid;
|
||||
this.courseInfo.orgId=orgInfo.id;
|
||||
this.$refs.refChooseOrg.dlgShow = false;
|
||||
},
|
||||
chooseFile(){
|
||||
this.dlgFileChoose.show=true;
|
||||
},
|
||||
choseChoose(){
|
||||
@@ -610,6 +630,16 @@ export default {
|
||||
apiCoursePortal.detail(this.id,true).then(rs => {
|
||||
if (rs.status == 200) {
|
||||
this.courseInfo = rs.result.course;
|
||||
//加载所属机构名称
|
||||
this.orgKid='';
|
||||
if(this.courseInfo.orgId){
|
||||
apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
|
||||
if(rrs.status==200){
|
||||
this.orgName=rrs.result.name;
|
||||
this.orgKid=rrs.result.kid;
|
||||
}
|
||||
})
|
||||
}
|
||||
if(rs.result.course.coverImg !== '') {
|
||||
this.courseCoverurl = this.fileBaseUrl + rs.result.course.coverImg;
|
||||
}
|
||||
|
||||
@@ -73,16 +73,11 @@
|
||||
:props="{ value: 'id', label: 'name' }"
|
||||
:options="sysTypeListMap"></el-cascader>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="资源归属" required>
|
||||
<el-cascader
|
||||
placeholder="选择资源归属"
|
||||
style="width: 100%;"
|
||||
clearable
|
||||
v-model="resOwnerArray"
|
||||
:props="{ value: 'code', label: 'name' }"
|
||||
:options="resOwnerListMap"
|
||||
></el-cascader>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="资源归属" required>
|
||||
<el-input placeholder="请选择" v-model="orgName" >
|
||||
<el-button v-if="identity==3 || identity==5" @click="showChooseOrg()" slot="append" icon="el-icon-search">选择</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="场景" v-show="!weike.onlyRequired">
|
||||
<el-select v-model="courseInfo.forScene" style="width: 100%;">
|
||||
<el-option v-for="item in sceneList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
@@ -219,15 +214,7 @@
|
||||
:options="sysTypeListMap">
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="资源归属" required>
|
||||
<el-cascader
|
||||
placeholder="选择资源归属"
|
||||
style="width: 100%;"
|
||||
clearable
|
||||
v-model="resOwnerArray"
|
||||
:props="{ value: 'code', label: 'name' }"
|
||||
:options="resOwnerListMap"></el-cascader>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="场景">
|
||||
<el-select v-model="courseInfo.forScene" style="width: 100%;">
|
||||
<el-option v-for="item in sceneList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
@@ -254,6 +241,11 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="资源归属" required>
|
||||
<el-input placeholder="请选择" v-model="orgName" >
|
||||
<el-button v-if="identity==3 || identity==5" @click="showChooseOrg()" slot="append" icon="el-icon-search">选择</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="目标人群" required>
|
||||
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
|
||||
</el-form-item>
|
||||
@@ -378,6 +370,7 @@
|
||||
</el-dialog>
|
||||
<!--选择图片-->
|
||||
<filecloud :show="dlgFileChoose.show" @choose="changeCourseImage" @close="choseChoose"></filecloud>
|
||||
<chooseOrg ref="refChooseOrg" @confirm="confirmChooseOrg"></chooseOrg>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -391,19 +384,24 @@ import scene from '../../api/modules/scene.js';
|
||||
import apiUserGroup from '../../api/modules/usergroup.js';
|
||||
import apiTeacher from '../../api/modules/teacher.js';
|
||||
import apiTag from '../../api/modules/tag.js';
|
||||
import apiHRBP from '../../api/boe/HRBP.js';
|
||||
import apiCourse from '../../api/modules/course.js';
|
||||
import apiOrg from '../../api/system/organiza.js';
|
||||
import apiUser from '../../api/system/user.js';
|
||||
import WxEditor from '@/components/Editor/index.vue';
|
||||
import catalogSort from '@/components/Course/catalogSort.vue';
|
||||
import { courseType, getType } from '../../utils/tools.js';
|
||||
import { mapGetters, mapActions } from 'vuex';
|
||||
import filecloud from '@/components/FileCloud/index.vue';
|
||||
import chooseOrg from '@/components/System/chooseOrg.vue';
|
||||
export default {
|
||||
props: {},
|
||||
components: { weikeContent, catalogCourseware, imageUpload, WxEditor, catalogSort,agreement,filecloud,choice},
|
||||
components: { weikeContent, catalogCourseware, imageUpload, WxEditor, catalogSort,agreement,filecloud,choice,chooseOrg},
|
||||
data() {
|
||||
return {
|
||||
checked:false,
|
||||
courseInfoFormCheckedShow:false,
|
||||
orgChooseShow:false,
|
||||
weikeReset: '',
|
||||
onlineReset: '',
|
||||
sysTypeListMap: [],
|
||||
@@ -432,11 +430,14 @@ export default {
|
||||
courseCoverurl: '', //显示的图片
|
||||
btnLoading: false,
|
||||
requireSaveCourse: false,
|
||||
orgName:'',
|
||||
orgKid:'',
|
||||
courseInfo: {
|
||||
id: '',
|
||||
name: '',
|
||||
orderStudy: false,
|
||||
type: 10,
|
||||
orgId:'',
|
||||
coverImg: '',
|
||||
source: 1,
|
||||
forUsers: '',
|
||||
@@ -493,7 +494,7 @@ export default {
|
||||
this.getSceneData();
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['resOwnerMap', 'sysTypeMap']),
|
||||
...mapGetters(['resOwnerMap', 'sysTypeMap','userInfo','identity']),
|
||||
catalogTree() {
|
||||
let treeList = [];
|
||||
let $this = this;
|
||||
@@ -531,8 +532,19 @@ export default {
|
||||
this.loadResOwners();
|
||||
this.loadSysTypes();
|
||||
this.loadUserGroup();
|
||||
|
||||
},
|
||||
methods: {
|
||||
showChooseOrg(){
|
||||
this.$refs.refChooseOrg.dlgShow = true;
|
||||
},
|
||||
confirmChooseOrg(orgInfo){
|
||||
//console.log(orgInfo,'orgInfo');
|
||||
this.orgName=orgInfo.name;
|
||||
this.orgKid=orgInfo.kid;
|
||||
this.courseInfo.orgId=orgInfo.id;
|
||||
this.$refs.refChooseOrg.dlgShow = false;
|
||||
},
|
||||
getTeacherList(res) {
|
||||
this.teacherValues = res;
|
||||
},
|
||||
@@ -652,11 +664,29 @@ export default {
|
||||
this.onlineReset = Math.round(Math.random()) + '';
|
||||
this.courseChooseShow = true;
|
||||
this.biaoke.tabIndex = 'base';
|
||||
|
||||
this.courseInfo.orgId=this.userInfo.departId;
|
||||
|
||||
if(!this.courseInfo.orgId){
|
||||
this.courseInfo.orgId=this.userInfo.departId;
|
||||
}
|
||||
this.orgKid='';
|
||||
if(this.courseInfo.orgId){
|
||||
apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
|
||||
if(rrs.status==200){
|
||||
this.orgName=rrs.result.name;
|
||||
this.orgKid=rrs.result.kid;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
//console.log(editData,'editData');
|
||||
this.weikeReset = editData.id;
|
||||
this.onlineReset = editData.id;
|
||||
//console.log("编辑课程?");
|
||||
this.orgName=editData.orgName;
|
||||
this.courseInfo.orgId=editData.orgId;
|
||||
this.curCourseId = editData.id; //设置
|
||||
this.courseInfo.type = editData.type; //设置课程类型,因为这里的课程对象可能不全,所以只能设置值,不能整个对象附值
|
||||
this.getDetail(editData.id); //获取课程的详细信息
|
||||
@@ -667,6 +697,7 @@ export default {
|
||||
this.biaoke.dlgShow = true;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
resetCurCourseContent() {
|
||||
this.curContent = { id: '', contentType: 0, contentName: '', content: '', csectionId: '', contentName: '', contentRefId: '', courseId: this.courseInfo.id };
|
||||
@@ -747,22 +778,53 @@ export default {
|
||||
this.contentInfo.list = result.contents;
|
||||
this.sectionInfo.list = result.sections;
|
||||
this.courseTeachers = result.teachers; //课程的老师信息
|
||||
|
||||
if(!this.courseInfo.orgId){
|
||||
//根据课程创建者获取机构id
|
||||
apiUser.getOrgSimpleByUserId(result.course.sysCreateAid).then(ors=>{
|
||||
if(ors.status==200){
|
||||
$this.courseInfo.orgId=ors.result.id;
|
||||
apiOrg.getSimple(ors.result.id).then(rrs=>{
|
||||
if(rrs.status==200){
|
||||
$this.orgName=rrs.result.name;
|
||||
$this.orgKid=rrs.result.kid;
|
||||
}
|
||||
})
|
||||
}else{
|
||||
//
|
||||
}
|
||||
})
|
||||
|
||||
}else{
|
||||
apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
|
||||
if(rrs.status==200){
|
||||
$this.orgName=rrs.result.name;
|
||||
$this.orgKid=rrs.result.kid;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.resOwnerArray=[];
|
||||
if (result.course.resOwner1 == '') {
|
||||
this.resOwnerArray.push(result.course.resOwner1);
|
||||
}else if(result.course.resOwner2 == ''){
|
||||
}
|
||||
if(result.course.resOwner2 == ''){
|
||||
this.resOwnerArray.push(result.course.resOwner2);
|
||||
}else if(result.course.resOwner3 == ''){
|
||||
}
|
||||
if(result.course.resOwner3 == ''){
|
||||
this.resOwnerArray.push(result.course.resOwner3);
|
||||
}
|
||||
|
||||
if (result.course.sysType3 == '' && result.course.sysType2 == '') {
|
||||
this.sysTypeList = [result.course.sysType1];
|
||||
} else if (result.course.sysType3 == '') {
|
||||
this.sysTypeList = [result.course.sysType1, result.course.sysType2];
|
||||
} else {
|
||||
this.sysTypeList = [result.course.sysType1, result.course.sysType2, result.course.sysType3];
|
||||
this.sysTypeList=[];
|
||||
if(result.course.sysType1!='' && result.course.sysType1!='0'){
|
||||
this.sysTypeList.push(result.course.sysType1);
|
||||
}
|
||||
if(result.course.sysType2!='' && result.course.sysType2!='0'){
|
||||
this.sysTypeList.push(result.course.sysType2);
|
||||
}
|
||||
if(result.course.sysType3!='' && result.course.sysType3!='0'){
|
||||
this.sysTypeList.push(result.course.sysType3);
|
||||
}
|
||||
//console.log(this.sysTypeList,'this.sysTypeList');
|
||||
//受众处理,crowds
|
||||
let crowdList=[];
|
||||
if(result.crowds && result.crowds.length>0){
|
||||
@@ -1116,6 +1178,7 @@ export default {
|
||||
return pass;
|
||||
},
|
||||
submitCourse() {
|
||||
|
||||
if(this.biaoke.dlgShow && !this.unsavedContent()){
|
||||
this.$message.error('您有未保存的内容,请先保存');
|
||||
return;
|
||||
@@ -1124,6 +1187,18 @@ export default {
|
||||
this.$message.error('您有未保存的内容,请先保存');
|
||||
return;
|
||||
}
|
||||
|
||||
//console.log(this.courseInfo.orgId,'this.courseInfo.orgId');
|
||||
//console.log(this.orgKid,'this.orgKid');
|
||||
if(!this.courseInfo.orgId){
|
||||
this.$message.error('请选择资源归属');
|
||||
return;
|
||||
}
|
||||
if(!this.orgKid){
|
||||
this.$message.error('资源归属无关联HRBP信息');
|
||||
return;
|
||||
}
|
||||
|
||||
//console.log(this.resOwnerListMap[0],'this.resOwnerListMap[0]');
|
||||
//return;
|
||||
let ownerCode=this.resOwnerListMap[0].code;
|
||||
@@ -1214,22 +1289,39 @@ export default {
|
||||
};
|
||||
this.btnLoading = true;
|
||||
let $this = this;
|
||||
apiCourse.submitCourse(postData).then(res => {
|
||||
//this.btnLoading=false;
|
||||
setTimeout(function() {
|
||||
//先获取课程内容
|
||||
apiHRBP.getHRBP(this.orgKid).then(rs=>{
|
||||
if(rs.status==200 && rs.result.length>0){
|
||||
let hrbpUser=rs.result[0];
|
||||
postData.auditUser={
|
||||
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;
|
||||
setTimeout(function() {
|
||||
$this.btnLoading = false;
|
||||
}, 1000);
|
||||
if (res.status === 200) {
|
||||
//提交成功,直接关闭当前窗口
|
||||
this.$message.success('提交成功!!!');
|
||||
this.biaoke.dlgShow = false;
|
||||
this.weike.dlgShow = false;
|
||||
//提交成功回调处理
|
||||
this.$emit('submitSuccess');
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$this.btnLoading = false;
|
||||
}, 1000);
|
||||
if (res.status === 200) {
|
||||
//提交成功,直接关闭当前窗口
|
||||
this.$message.success('提交成功!!!');
|
||||
this.biaoke.dlgShow = false;
|
||||
this.weike.dlgShow = false;
|
||||
//提交成功回调处理
|
||||
this.$emit('submitSuccess');
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
this.$message.error('获取审核HRBP失败:'+rs.message);
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
},
|
||||
// 教师列标,远程查询
|
||||
async remoteFindTeacher(query) {
|
||||
|
||||
123
src/components/System/chooseOrg.vue
Normal file
123
src/components/System/chooseOrg.vue
Normal file
@@ -0,0 +1,123 @@
|
||||
<template>
|
||||
<!--机构树-->
|
||||
<div>
|
||||
<el-dialog title="先择组织机构" :append-to-body="true" :visible.sync="dlgShow" :before-close="handleClose" :close-on-click-modal="false" width="500px" custom-class="g-dialog">
|
||||
<div>
|
||||
<!--
|
||||
<el-input placeholder="" v-model="orgName">
|
||||
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
||||
</el-input>
|
||||
-->
|
||||
</div>
|
||||
<div style="overflow-y: auto;height: 400px;">
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
node-key="id"
|
||||
:lazy="true"
|
||||
:props="departProps"
|
||||
:load="loadNode"
|
||||
@node-click="handleDepartNodeClick"
|
||||
:expand-on-click-node="false"
|
||||
:render-content="renderContent"
|
||||
:default-expanded-keys="['-1']">
|
||||
</el-tree>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dlgShow = false">取 消</el-button>
|
||||
<el-button type="primary" @click="confirm">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import usergroupApi from "@/api/modules/usergroup";
|
||||
import orgApi from "@/api/system/organiza";
|
||||
export default{
|
||||
props:{
|
||||
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
dlgShow:false,
|
||||
orgName:'',
|
||||
chooseOrg:{},
|
||||
departData:[],
|
||||
departProps: {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
handleClose(){
|
||||
this.dlgShow=false
|
||||
},
|
||||
renderContent(h, { node, data, store }) {
|
||||
let checked=data.id==this.chooseOrg.id;
|
||||
if(checked){
|
||||
return (<span class="custom-tree-node">
|
||||
<span>{node.label}</span>
|
||||
<span class="el-icon-check"></span>
|
||||
</span>);
|
||||
}else{
|
||||
return (<span class="custom-tree-node"> <span>{node.label}</span></span>);
|
||||
}
|
||||
|
||||
},
|
||||
loadNode(node, resolve) {
|
||||
var parentId = null;
|
||||
if (node.level === 0) {
|
||||
resolve([{name:'组织机构树',id:'-1'}]);
|
||||
}else{
|
||||
if(node.level === 1){
|
||||
parentId = '-1';
|
||||
}else{
|
||||
parentId = node.data.id;
|
||||
}
|
||||
usergroupApi.userOrgs(parentId).then(res =>{
|
||||
if (res.status == 200) {
|
||||
if(res.result != null && res.result.length > 0){
|
||||
resolve(res.result);
|
||||
}else{
|
||||
resolve([]);
|
||||
}
|
||||
}else{
|
||||
this.$message.error('查询用户的机构失败');
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
handleDepartNodeClick(data){
|
||||
this.chooseOrg.id = data.id;
|
||||
this.chooseOrg.name=data.name;
|
||||
this.chooseOrg.kid=data.kid;
|
||||
},
|
||||
confirm(){
|
||||
if(!this.chooseOrg.id){
|
||||
this.$message.error('请选择一个机构');
|
||||
return;
|
||||
}
|
||||
//this.dlgShow=false;
|
||||
this.$emit('confirm',this.chooseOrg);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* .is-current{
|
||||
background-color: #ffff7f;
|
||||
} */
|
||||
.custom-tree-node {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
</style>
|
||||
@@ -79,11 +79,17 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.sex = this.userInfo.sex;
|
||||
// 判断路由是进入的学员默认页面就重置setCurIdentity
|
||||
if(this.$route.path == '/uc/study/task' || this.$route.path == '/study/index'){
|
||||
this.setCurIdentity(1);
|
||||
this.sex = this.userInfo.sex;
|
||||
let iden=this.$route.query.identity;
|
||||
if(iden){
|
||||
this.setCurIdentity(parseInt(iden));
|
||||
}else{
|
||||
// 判断路由是进入的学员默认页面就重置setCurIdentity
|
||||
if(this.$route.path == '/uc/study/task' || this.$route.path == '/study/index'){
|
||||
this.setCurIdentity(1);
|
||||
}
|
||||
}
|
||||
|
||||
//let testName='京东方科技集团股份有限公司/北京中祥英科技有限公司/技术中心';
|
||||
//this.orgInfo=cutFullName(testName,1);
|
||||
this.orgInfo=cutFullName(this.userInfo.departFullName,1);
|
||||
|
||||
@@ -29,7 +29,7 @@ const jsonRequest=axios.create({
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: process.env.VUE_APP_BASE_API,
|
||||
//超时
|
||||
timeout: 10000,
|
||||
timeout: 20000,
|
||||
});
|
||||
//发送json对象的拦截器
|
||||
jsonRequest.interceptors.request.use(config => {
|
||||
|
||||
@@ -84,7 +84,6 @@
|
||||
<div v-else class="zan-wu">暂无数据</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div></div>
|
||||
<el-dialog title="审核记录" :visible.sync="dialogVisible" width="900px" custom-class="g-dialog">
|
||||
<div>
|
||||
@@ -113,13 +112,14 @@ import courseForm from '@/components/Course/courseForm.vue';
|
||||
import apiCourse from '@/api/modules/course.js';
|
||||
import { courseType } from '@/utils/tools.js';
|
||||
import apiAudit from '@/api/system/audit.js';
|
||||
import apiHRBP from '@/api/boe/HRBP.js';
|
||||
import apiOrg from '@/api/system/organiza.js';
|
||||
export default {
|
||||
name: 'ucStudyIndex',
|
||||
components: { studyItem, courseForm, courseImage },
|
||||
computed: {
|
||||
...mapGetters(['userInfo'])
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
inviteTeacher: [],
|
||||
@@ -194,21 +194,50 @@ export default {
|
||||
});
|
||||
},
|
||||
examine(row) {
|
||||
this.$confirm('您确定要直接提交审核所选课程吗?', '友情提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(()=>{
|
||||
apiCourse.sumbits(row.id).then(res=>{
|
||||
if(res.status==200){
|
||||
this.$message.success('提交成功');
|
||||
row.status=2
|
||||
}
|
||||
if(res.status==400){
|
||||
this.$message.error('课程信息不完整,提交失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
if(!row.orgId){
|
||||
this.$message.error("课程还未设置资源归属,请先设置资源归属");
|
||||
return;
|
||||
}
|
||||
let $this=this;
|
||||
this.$confirm('您确定要直接提交审核所选课程吗?', '友情提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(()=>{
|
||||
apiOrg.getSimple(row.orgId).then(rrs=>{
|
||||
if(rrs.status==200){
|
||||
apiHRBP.getHRBP(rrs.result.kid).then(rs=>{
|
||||
if(rs.status==200 && rs.result.length>0){
|
||||
let hrbpUser=rs.result[0];
|
||||
let req={
|
||||
courseId:row.id,
|
||||
email:hrbpUser.email,
|
||||
courseUser:row.sysCreateBy,
|
||||
courseName:row.name,
|
||||
ucode:hrbpUser.user_no,
|
||||
auditUser:hrbpUser.real_name,
|
||||
ukid:hrbpUser.user_id,
|
||||
orgId:row.orgId,
|
||||
orgName:rrs.result.name
|
||||
}
|
||||
apiCourse.sumbits(req).then(res=>{
|
||||
if(res.status==200){
|
||||
$this.$message.success('提交成功');
|
||||
row.status=2
|
||||
}
|
||||
if(res.status==400){
|
||||
$this.$message.error('提交失败:'+res.message);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$this.$message.error("获取HRBP审核人员失败:"+rs.message);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$this.$message.error("处理资源归属失败,请重新设置资源归属");
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
delItem(row) {
|
||||
this.$confirm('您确定要删除所选课程吗?', '删除提示', {
|
||||
@@ -280,7 +309,7 @@ export default {
|
||||
this.params.pageSize = val;
|
||||
// this.params.pageIndex = 1;
|
||||
|
||||
|
||||
|
||||
this.getList();
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
|
||||
@@ -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">
|
||||
@@ -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();
|
||||
@@ -348,7 +312,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,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;
|
||||
})
|
||||
}
|
||||
|
||||
@@ -395,7 +364,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 +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;
|
||||
|
||||
@@ -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,67 +114,55 @@ 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=>{
|
||||
this.sysTypeListMap=rs;
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
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;
|
||||
@@ -282,7 +252,7 @@ export default {
|
||||
img {
|
||||
width: 110px;
|
||||
height: 110px;
|
||||
|
||||
|
||||
}
|
||||
.info {
|
||||
padding-top: 10px;
|
||||
|
||||
@@ -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(){ // 转审选择教师
|
||||
@@ -430,22 +433,25 @@ 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}`);
|
||||
}
|
||||
|
||||
},
|
||||
// 直接审核
|
||||
//直接审核
|
||||
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 = '';
|
||||
|
||||
@@ -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() {
|
||||
@@ -232,7 +153,7 @@ export default {
|
||||
this.getSysTypeTree().then(rs=>{
|
||||
this.sysTypeListMap=rs;
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
getsearch(){
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -488,7 +261,7 @@ export default {
|
||||
img {
|
||||
width: 110px;
|
||||
height: 110px;
|
||||
|
||||
|
||||
}
|
||||
.info {
|
||||
padding-top: 10px;
|
||||
|
||||
Reference in New Issue
Block a user