diff --git a/src/components/Course/courseForm.vue b/src/components/Course/courseForm.vue
index 888f6573..1641dfc3 100644
--- a/src/components/Course/courseForm.vue
+++ b/src/components/Course/courseForm.vue
@@ -5,15 +5,15 @@
-
- 是
- 否
-
+
+ 是
+ 否
+
-
-
+
+
@@ -77,9 +77,9 @@
-
- 选择
-
+
+ 选择
+
@@ -112,11 +112,11 @@
-
+
-
+
@@ -153,11 +153,11 @@
+ maxlength="255"
+ show-word-limit
+ :rows="3"
+ v-model="courseInfo.summary"
+ placeholder="请尽量填写课程简介,用于列表中显示,可以让用户更容易了解课程信息">
@@ -261,16 +261,16 @@
-
- {{ tag }}
-
+
+ {{ tag }}
+
-
- 选择
-
+
+ 选择
+
@@ -278,13 +278,13 @@
-
+
-
+
@@ -397,8 +397,8 @@
-
-
@@ -620,14 +620,14 @@ export default {
this.$emit('change', tags.slice(0, 5)); // 确保传出数据也不超过5个
},
showChooseOrg(){
- this.$refs.refChooseOrg.dlgShow = true;
+ this.$refs.refChooseOrg.dlgShow = true;
},
removeCrowd(e){
//console.log(e);
if(e.disabled){
- this.$message.error("您不能移除创建人加的受众");
- this.courseCrowds.push(e);
- return false;
+ this.$message.error("您不能移除创建人加的受众");
+ this.courseCrowds.push(e);
+ return false;
}
},
confirmChooseOrg(orgInfo,parentInfo){
@@ -696,17 +696,17 @@ export default {
// }
// });
apiUserBasic.getUserAudiences(params).then(rs=>{
- if(rs.status==200){
- let crowdList=[];
- rs.result.list.forEach(item=>{
- crowdList.push({
- id:item.id,
- name:item.audienceName,
- disabled:false
- })
- });
- this.userGroupList=crowdList;
- }
+ if(rs.status==200){
+ let crowdList=[];
+ rs.result.list.forEach(item=>{
+ crowdList.push({
+ id:item.id,
+ name:item.audienceName,
+ disabled:false
+ })
+ });
+ this.userGroupList=crowdList;
+ }
})
},
resOwnerName(code) {
@@ -799,9 +799,9 @@ export default {
if (!editData) {
this.tips=[];
this.courseTags=[],
- //console.log("新建课程?");
- //以下为了保证初始化处理
- this.weikeReset = Math.round(Math.random()) + '';
+ //console.log("新建课程?");
+ //以下为了保证初始化处理
+ this.weikeReset = Math.round(Math.random()) + '';
this.onlineReset = Math.round(Math.random()) + '';
this.courseChooseShow = true;
this.biaoke.tabIndex = 'base';
@@ -822,11 +822,11 @@ export default {
// });
apiUserBasic.getOrgInfo(this.courseInfo.orgId).then(rs=>{
if(rs.status==200){
- this.orgName=rs.result.name;
- this.courseInfo.orgName=rs.result.name;
- //this.orgKid=rs.result.kid;
- this.orgNamePath=rs.result.namePath;
- }
+ this.orgName=rs.result.name;
+ this.courseInfo.orgName=rs.result.name;
+ //this.orgKid=rs.result.kid;
+ this.orgNamePath=rs.result.namePath;
+ }
});
}
@@ -956,29 +956,29 @@ export default {
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;
- // $this.orgNamePath=rrs.result.namePath;
- // }
- // })
- apiUserBasic.getOrgInfo(ors.result.id).then(rrs=>{
- if(rrs.status==200){
- $this.orgName=rrs.result.name;
- this.courseInfo.orgName=rrs.result.name;
- //$this.orgKid=rrs.result.kid;
- $this.orgNamePath=rrs.result.namePath;
- }else{
- this.courseInfo.orgId='';
- //this.$message.error('资源归属已变更,请重新选择');
- }
- })
- }else{
- //this.$message.error('无机构关联,不需要提示');
- }
+ 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;
+ // $this.orgNamePath=rrs.result.namePath;
+ // }
+ // })
+ apiUserBasic.getOrgInfo(ors.result.id).then(rrs=>{
+ if(rrs.status==200){
+ $this.orgName=rrs.result.name;
+ this.courseInfo.orgName=rrs.result.name;
+ //$this.orgKid=rrs.result.kid;
+ $this.orgNamePath=rrs.result.namePath;
+ }else{
+ this.courseInfo.orgId='';
+ //this.$message.error('资源归属已变更,请重新选择');
+ }
+ })
+ }else{
+ //this.$message.error('无机构关联,不需要提示');
+ }
})
}else{
@@ -994,14 +994,14 @@ export default {
// });
apiUserBasic.getOrgInfo(this.courseInfo.orgId).then(rs=>{
if(rs.status==200){
- $this.orgName=rs.result.name;
- $this.courseInfo.orgName=rs.result.name;
- //$this.orgKid=rs.result.kid;
- $this.orgNamePath=rs.result.namePath;
- }else{
- $this.courseInfo.orgId='';
- $this.$message.error('资源归属已变更,请重新选择');
- }
+ $this.orgName=rs.result.name;
+ $this.courseInfo.orgName=rs.result.name;
+ //$this.orgKid=rs.result.kid;
+ $this.orgNamePath=rs.result.namePath;
+ }else{
+ $this.courseInfo.orgId='';
+ $this.$message.error('资源归属已变更,请重新选择');
+ }
});
}
this.resOwnerArray=[];
@@ -1016,33 +1016,33 @@ export default {
}
this.sysTypeList=[];
if(result.course.sysType1!='' && result.course.sysType1!='0'){
- this.sysTypeList.push(result.course.sysType1);
+ this.sysTypeList.push(result.course.sysType1);
}
if(result.course.sysType2!='' && result.course.sysType2!='0'){
- this.sysTypeList.push(result.course.sysType2);
+ this.sysTypeList.push(result.course.sysType2);
}
if(result.course.sysType3!='' && result.course.sysType3!='0'){
- this.sysTypeList.push(result.course.sysType3);
+ this.sysTypeList.push(result.course.sysType3);
}
//console.log(this.sysTypeList,'this.sysTypeList');
//受众处理,crowds
let crowdList=[];
if(result.crowds && result.crowds.length>0){
- result.crowds.forEach(crowd=>{
- let newCrowd={
- id:crowd.groupId,
- name:crowd.groupName,
- disabled:false
- }
- crowdList.push(newCrowd);
- let hasUG=$this.userGroupList.some(ug=>{
- return ug.id==crowd.groupId;
- });
- if(!hasUG){
- newCrowd.disabled=true;
- $this.userGroupList.push(newCrowd);
- }
+ result.crowds.forEach(crowd=>{
+ let newCrowd={
+ id:crowd.groupId,
+ name:crowd.groupName,
+ disabled:false
+ }
+ crowdList.push(newCrowd);
+ let hasUG=$this.userGroupList.some(ug=>{
+ return ug.id==crowd.groupId;
});
+ if(!hasUG){
+ newCrowd.disabled=true;
+ $this.userGroupList.push(newCrowd);
+ }
+ });
}
this.courseCrowds=crowdList;
//反向看userGroupList是否有
@@ -1110,7 +1110,7 @@ export default {
inputValue: sec.name,
confirmButtonText: '确定',
cancelButtonText: '取消',
- inputPattern:/^(a-z|A-Z|0-9)*[^$%^&*;:,<>?()\""\']{1,20}$/,
+ inputPattern:/^(a-z|A-Z|0-9)*[^$%^&*;:,<>?()\""\']{1,20}$/,
inputErrorMessage:'不要超过20个字'
})
.then(({ value }) => {
@@ -1171,7 +1171,7 @@ export default {
let order = [];
if(cha.contents.length > 0) {
cha.contents.forEach(con=>{
- order.push(con.sortIndex);
+ order.push(con.sortIndex);
})
let addOrder = order.sort(function(a,b) {return b-a;})
this.addOrder = addOrder[0] + 1;
@@ -1339,9 +1339,9 @@ export default {
if(this.curContent.id == '') {// 新增
if(this.curContent.contentType == 60) { // 判断作业是否保存
- if(courseware.homework.content || courseware.homework.name || courseware.homework.deadTime){
- pass = false;
- }
+ if(courseware.homework.content || courseware.homework.name || courseware.homework.deadTime){
+ pass = false;
+ }
} else if(this.curContent.contentType == 61) { //考试
// if(courseware.exam.paperContent != '') {
@@ -1352,11 +1352,11 @@ export default {
// }
}else if(this.curContent.contentType == 41) { //图文
if(courseware.htmlContent.length > 7){
- pass = false;
+ pass = false;
}
}else if(this.curContent.contentType == 52) { //外部链接
if(courseware.linkInfo.url != '') {
- pass = false;
+ pass = false;
}
}
} else {// 编辑
@@ -1371,15 +1371,15 @@ export default {
// }
} else if(this.curContent.contentType == 41) { //图文
if(this.curContent.content !== courseware.htmlContent) {
- pass = false;
+ pass = false;
}
} else if(this.curContent.contentType == 52) { //外部链接
if(this.curContent.content !== JSON.stringify(courseware.linkInfo)) {
- pass = false;
+ pass = false;
}
} else if(this.curContent.contentType == 10 || this.curContent.contentType == 20) {// 视频
if(this.curContent.content !== JSON.stringify(courseware.curriculumData)) {
- pass = false;
+ pass = false;
}
}
}
@@ -1541,61 +1541,61 @@ export default {
//2023-1-5 对于默认管理员,不需要提交hrbp。直接提交并发布
let adminType=this.userInfo.adminType;
if(adminType==1){ //默认管理员,直接审核通过
- apiCourseAudit.submitAndPublish(postData).then(res=>{
- setTimeout(function() {
- $this.btnLoading = false;
- }, 1000);
- if (res.status === 200) {
- //提交成功,直接关闭当前窗口
- this.$message.success('提交成功!!!');
- } else {
- this.$message.error(res.message);
- }
- this.biaoke.dlgShow = false;
- this.weike.dlgShow = false;
- this.$emit('submitSuccess');
- });
+ apiCourseAudit.submitAndPublish(postData).then(res=>{
+ setTimeout(function() {
+ $this.btnLoading = false;
+ }, 1000);
+ if (res.status === 200) {
+ //提交成功,直接关闭当前窗口
+ this.$message.success('提交成功!!!');
+ } else {
+ this.$message.error(res.message);
+ }
+ this.biaoke.dlgShow = false;
+ this.weike.dlgShow = false;
+ this.$emit('submitSuccess');
+ });
}else{
- //先获取HRBP审核 人员信息,姓名,机构路径,工号,用于邮件中的信息
- apiUserBasic.getOrgHrbpInfo(this.courseInfo.orgId).then(rs=>{
- if(rs.status==200 && rs.result){
- postData.auditUser={
- email:rs.result.email,
- code:rs.result.userNo,
- name:rs.result.name,
- aid:rs.result.id,
- orgId:rs.result.orgId
- }
- //下面的机构名称,路径不对,应该取课程的资源归属(机构)的路径
- postData.course.orgName=rs.result.orgNamePath+'/'+rs.result.orgName;
- 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);
- this.biaoke.dlgShow = false;
- this.weike.dlgShow = false;
- this.$emit('submitSuccess');
- }
- });
- }else{
- $this.btnLoading = false;
- this.$message.error('获取审核HRBP失败:'+rs.message);
+ //先获取HRBP审核 人员信息,姓名,机构路径,工号,用于邮件中的信息
+ apiUserBasic.getOrgHrbpInfo(this.courseInfo.orgId).then(rs=>{
+ if(rs.status==200 && rs.result){
+ postData.auditUser={
+ email:rs.result.email,
+ code:rs.result.userNo,
+ name:rs.result.name,
+ aid:rs.result.id,
+ orgId:rs.result.orgId
}
- }).catch(err=>{
- //this.$message.error('获取审核HRBP失败:'+err);
- this.$message.error('获取审核HRBP失败,请检查资源归属下是否有HRBP审核人员');
- $this.btnLoading = false;
- })
+ //下面的机构名称,路径不对,应该取课程的资源归属(机构)的路径
+ postData.course.orgName=rs.result.orgNamePath+'/'+rs.result.orgName;
+ 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);
+ this.biaoke.dlgShow = false;
+ this.weike.dlgShow = false;
+ this.$emit('submitSuccess');
+ }
+ });
+ }else{
+ $this.btnLoading = false;
+ this.$message.error('获取审核HRBP失败:'+rs.message);
+ }
+ }).catch(err=>{
+ //this.$message.error('获取审核HRBP失败:'+err);
+ this.$message.error('获取审核HRBP失败,请检查资源归属下是否有HRBP审核人员');
+ $this.btnLoading = false;
+ })
}
},
// 教师列标,远程查询
@@ -1704,19 +1704,19 @@ export default {
diff --git a/src/components/Course/courseTag.vue b/src/components/Course/courseTag.vue
index abde483b..a6c9860e 100644
--- a/src/components/Course/courseTag.vue
+++ b/src/components/Course/courseTag.vue
@@ -261,24 +261,10 @@ export default {
console.log("----------newTag---------->",this.searchResults)
this.tagMap.set(newTag.id, newTag)
this.$emit('change', this.displayTags)
- this.clearInput();
} finally {
this.loading = false
}
},
-
- clearInput() {
- if (this.$refs.tagSelect) {
- const input = this.$refs.tagSelect.$refs.input;
- if (input) {
- input.value = '';
- // 触发输入事件以确保组件状态同步
- input.dispatchEvent(new Event('input'));
- }
- }
- },
-
-
// 修改doSearch方法,添加搜索结果为空时的提示
async doSearch(query) {
// 不再在空查询时清空搜索结果