diff --git a/src/api/boe/teacher.js b/src/api/boe/teacher.js index 1568a2ca..6d2418d6 100644 --- a/src/api/boe/teacher.js +++ b/src/api/boe/teacher.js @@ -136,8 +136,28 @@ const teacherSystem = function(id) { return ajax.postJson('/b1/system/teacher/delete-model-teacher',data); } +//以下是新增加的两个接口,只是修改4个字段内容 +/** + * @param {Object} data + * { + teacher_user_id:用户的kid, + courses:'擅长的课程', + photo:"", + expertise:'', + work:'' + } + */ +const simpleUpdate = function(data) { + return ajax.postJson('/b1/system/teacher/update-teacher',data); +} + +const simpleInfo = function(kid) { + return ajax.postJson('/b1/system/teacher/teacher-info',{teacher_user_id:kid}); +} export default { + simpleUpdate, + simpleInfo, editTeacher, teacherSystem, teacherInfo, diff --git a/src/components/Course/weikeContent.vue b/src/components/Course/weikeContent.vue index 1ff2c599..b3010947 100644 --- a/src/components/Course/weikeContent.vue +++ b/src/components/Course/weikeContent.vue @@ -673,7 +673,7 @@ paperJson:{items:[]}, paperShow:false, customerShow:false, - onlyQuestion:true, + onlyQuestion:false, info:{ courseId:'', contentId:'', @@ -711,7 +711,7 @@ paperJson:{items:[]}, paperShow:false, customerShow:false, - onlyQuestion:true, + onlyQuestion:false, info:{ courseId:'', contentId:'', diff --git a/src/components/HomePage/homePage.vue b/src/components/HomePage/homePage.vue index 4a7b5b81..5d1ba1d7 100644 --- a/src/components/HomePage/homePage.vue +++ b/src/components/HomePage/homePage.vue @@ -75,13 +75,7 @@ --> - - +
教师职业照
@@ -95,15 +89,15 @@
{{ teachtext.courses }}
- +
专长
{{ item }}
- - + +
@@ -116,6 +110,7 @@ import apiStart from '@/api/phase2/stat.js'; import apiFollow from "@/api/phase2/userfollow.js" import apiUser from "@/api/system/user.js"; + import apiBoeTeahcer from "@/api/boe/teacher.js" export default { name: 'UcHeader', computed:{ @@ -142,6 +137,7 @@ totalStudyDays:0, //累计学习天数 uvalue:0 //U币数量 }, + tearchUrl:'', orgInfo:'', sex:'', pageId:'', @@ -175,7 +171,7 @@ this.Teacherprofile(); this.Teacherinfo(); }, - + methods:{ ...mapActions({ getResOwnerTree: 'resOwner/getResOwnerTree', @@ -188,8 +184,24 @@ this.teachtext.workExperience = res.result.workExperience; this.teachtext.courses = res.result.courses; this.tearchUrl = this.fileBaseUrl + res.result.photo; + + apiBoeTeahcer.simpleInfo(this.userInfo.sysId).then(sinfo=>{ + if(sinfo.status=='200'){ + if(sinfo.result.courses){ + this.teachtext.courses = sinfo.result.courses; + } + if(sinfo.result.work){ + this.teachtext.workExperience = sinfo.result.work; + } + if(sinfo.result.photo){ + this.teachtext.photo = sinfo.result.photo; + this.tearchUrl = this.fileBaseUrl + sinfo.result.photo; + } + } + }) + this.teachtext.expertise = res.result.expertise.split( ',' ); - console.log(this.teachtext); + //console.log(this.teachtext); this.sysTypeListtear.forEach(nm =>{ nm.children.forEach(lk =>{ this.childData.push(lk); @@ -201,7 +213,7 @@ console.log(item) this.workname.push(it.name); - + } }) diff --git a/src/components/Portal/course/couresinteract.vue b/src/components/Portal/course/couresinteract.vue index 70179536..f56ce58f 100644 --- a/src/components/Portal/course/couresinteract.vue +++ b/src/components/Portal/course/couresinteract.vue @@ -16,19 +16,19 @@ - {{ data.praises? data.praises:0}} + {{ data.praises>0? data.praises:0}}
- {{ data.favorites? data.favorites:0}} + {{ data.favorites>0? data.favorites:0}}
- - - - + + + + @@ -648,7 +648,7 @@ export default { color: #999; } } - + } // .eyes-view{ // color: #000; diff --git a/src/views/exam/ExamList.vue b/src/views/exam/ExamList.vue index 083fd1d1..f6e67f13 100644 --- a/src/views/exam/ExamList.vue +++ b/src/views/exam/ExamList.vue @@ -134,22 +134,20 @@ - + - + - + + @@ -183,13 +177,13 @@ - + - + 允许查看 不允许查看 @@ -197,7 +191,7 @@ - + 允许查看 不允许查看 @@ -206,8 +200,8 @@ - - + + @@ -215,8 +209,7 @@ - - + 先选择试卷 试卷有 {{qnum}} 道试题 @@ -232,7 +225,7 @@ - + 试题乱序 选项乱序 全部乱序 @@ -244,7 +237,7 @@ - + 最高一次 最后一次 @@ -252,7 +245,7 @@ - + 独立使用 课程内部 @@ -260,10 +253,10 @@ - + - + diff --git a/src/views/portal/case/Index.vue b/src/views/portal/case/Index.vue index d8a2bf13..bfa1de78 100644 --- a/src/views/portal/case/Index.vue +++ b/src/views/portal/case/Index.vue @@ -96,7 +96,7 @@
{{orgDomainTranslate(item.orgDomainParent) }}
-
{{ majorTypeTranslate(item) }}
+
{{ majorTypeTranslate(item) }}
{{ item.keyword1 }}
{{ item.keyword2 }}
{{ item.keyword3 }}
diff --git a/src/views/portal/course/Index.vue b/src/views/portal/course/Index.vue index f2dd8ff7..2577c4b5 100644 --- a/src/views/portal/course/Index.vue +++ b/src/views/portal/course/Index.vue @@ -21,10 +21,10 @@
@@ -35,7 +35,7 @@ @@ -69,7 +69,7 @@ 全部 @@ -557,12 +557,24 @@ export default { } this.searchData(); }, - handleTypeClick(item){ - item.checked=!item.checked; + handleTypeClick(item,list){ + //item.checked=!item.checked; + //使用上面一行是可以多选,使用下面是单选 + list.forEach(row=>{ + row.checked=false; + }) + item.checked=true; + this.searchData(); }, - handleOptionClick(item){ - item.checked=!item.checked; + handleOptionClick(item,list){ + //item.checked=!item.checked; + //使用上面一行是可以多选,使用下面是单选 + list.forEach(row=>{ + row.checked=false; + }) + item.checked=true; + this.handleChangeTypes(); this.searchData(); }, diff --git a/src/views/user/Setting.vue b/src/views/user/Setting.vue index 904428b7..c1db22d0 100644 --- a/src/views/user/Setting.vue +++ b/src/views/user/Setting.vue @@ -244,7 +244,7 @@ import apiPassword from '@/api/boe/login.js' import imageUpload from '@/components/ImageUpload/index.vue'; import apiUserhobby from "@/api/phase2/userhobby.js" - const cityOptions = ['上海', '北京', '广州', '深圳']; + import apiBoeTeahcer from "@/api/boe/teacher.js" export default{ components:{imageUpload}, data(){ @@ -289,53 +289,6 @@ sysTypeListtear:[], teaechswich:false, props: { multiple: true }, - options: [{ - value: 1, - label: '东南', - children: [{ - value: 2, - label: '上海', - children: [ - { value: 3, label: '普陀' }, - { value: 4, label: '黄埔' }, - { value: 5, label: '徐汇' } - ] - }, { - value: 7, - label: '江苏', - children: [ - { value: 8, label: '南京' }, - { value: 9, label: '苏州' }, - { value: 10, label: '无锡' } - ] - }, { - value: 12, - label: '浙江', - children: [ - { value: 13, label: '杭州' }, - { value: 14, label: '宁波' }, - { value: 15, label: '嘉兴' } - ] - }] - }, { - value: 17, - label: '西北', - children: [{ - value: 18, - label: '陕西', - children: [ - { value: 19, label: '西安' }, - { value: 20, label: '延安' } - ] - }, { - value: 21, - label: '新疆维吾尔族自治区', - children: [ - { value: 22, label: '乌鲁木齐' }, - { value: 23, label: '克拉玛依' } - ] - }] - }], Edittearch:true, infoswich:1, dynamicDataEdit:false, @@ -345,7 +298,6 @@ isEdit:false }, hideHome:false,// 是否隐藏个人主页 - cities: cityOptions, checkboxGroup: [], checkboxtearGroup: [], radio: '1', @@ -416,10 +368,7 @@ interestIsEdit(){ this.load(); this.getInfo(); - } - - }, mounted(){ if(this.userInfo.avatar){ @@ -445,11 +394,34 @@ Teacherinfo(){ this.workname=[]; this.checkboxtearGroup=[]; + apiTeach.detailTeacher(this.userInfo.aid).then(res =>{ - this.teachform.courses = res.result.courses; - this.teachform.workExperience = res.result.workExperience; - this.teachform.photo=res.result.photo; - this.tearchUrl = this.fileBaseUrl + res.result.photo; + if(res.result.courses){ + this.teachform.courses = res.result.courses; + } + if(res.result.workExperience){ + this.teachform.workExperience = res.result.workExperience; + } + if(res.result.photo){ + this.teachform.photo = res.result.photo; + this.tearchUrl = this.fileBaseUrl + res.result.photo; + } + + apiBoeTeahcer.simpleInfo(this.userInfo.sysId).then(sinfo=>{ + if(sinfo.status=='200'){ + if(sinfo.result.courses){ + this.teachform.courses = sinfo.result.courses; + } + if(sinfo.result.work){ + this.teachform.workExperience = sinfo.result.work; + } + if(sinfo.result.photo){ + this.teachform.photo = sinfo.result.photo; + this.tearchUrl = this.fileBaseUrl + sinfo.result.photo; + } + } + }) + this.teachform.expertise = res.result.expertise.split( ',' ); let children=[]; this.sysTypeListtear.forEach(nm =>{ @@ -566,6 +538,21 @@ if(res.status==200){ this.Edittearch = true; this.Teacherinfo(); + //更新远程 + let simpleData={ + teacher_user_id:this.userInfo.sysId, + courses:this.teachform.courses, + photo:this.teachform.photo, + expertise:this.teachform.expertise, + work:this.teachform.workExperience + } + apiBoeTeahcer.simpleUpdate(simpleData).then(rs=>{ + if(rs.status!='200'){ + this.$message.error('同步数据错误'); + + } + + }) } })