提交调整

This commit is contained in:
daihh
2022-12-28 12:08:17 +08:00
parent fe78a0930b
commit 1dffc6ee40
8 changed files with 136 additions and 112 deletions

View File

@@ -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,

View File

@@ -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:'',

View File

@@ -75,13 +75,7 @@
-->
</div>
</div>
<el-dialog
title="教师信息"
:visible.sync="dialogVisible"
width="42%"
class="teardiabox"
>
<el-dialog title="教师信息" :visible.sync="dialogVisible" width="42%" class="teardiabox">
<div class="teachphoto">
<h6>教师职业照</h6>
<img :src="tearchUrl" alt="">
@@ -95,15 +89,15 @@
<div>
{{ teachtext.courses }}
</div>
</div>
<div class="teachphoto" style="height:70px">
<h6>专长</h6>
<div v-for="(item,idx) in workname" :key="idx" class="teachexcel">
{{ item }}
</div>
</div>
</el-dialog>
</div>
@@ -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);
}
})

View File

@@ -16,19 +16,19 @@
<el-tooltip effect="light" content="点赞" placement="top" :visible-arrow="false" popper-class="text-tooltip">
<svg-icon style="margin-right: 0;font-size: 18px;" icon-class="dianzan"></svg-icon>
</el-tooltip>
<span class="interact-bar-value"> {{ data.praises? data.praises:0}}</span>
<span class="interact-bar-value"> {{ data.praises>0? data.praises:0}}</span>
</div>
<div :style="`min-width: ${nodeWidth};`" class="interact-bar-btn" :class="{cursor:!readonly}">
<el-tooltip effect="light" content="收藏" placement="top" :visible-arrow="false" popper-class="text-tooltip">
<svg-icon style="font-size: 18px;margin-right: 0;" icon-class="xihuan"></svg-icon>
</el-tooltip>
<span class="interact-bar-value"> {{ data.favorites? data.favorites:0}}</span>
<span class="interact-bar-value"> {{ data.favorites>0? data.favorites:0}}</span>
</div>
</div>
</template>
@@ -648,7 +648,7 @@ export default {
color: #999;
}
}
}
// .eyes-view{
// color: #000;

View File

@@ -134,22 +134,20 @@
<el-col :span="24" >
<el-form-item label="考试名称" prop="testName">
<el-input :disabled="swichpublished" v-model="examForm.testName" maxlength="50"
show-word-limit placeholder="请输入名称"></el-input>
<el-input :disabled="swichpublished" v-model="examForm.testName" maxlength="50" show-word-limit placeholder="请输入名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="考试描述">
<el-input v-model="examForm.testRemark" maxlength="200"
show-word-limit type="textarea" placeholder="请输入考试描述"></el-input>
<el-input :disabled="swichpublished" v-model="examForm.testRemark" maxlength="200" show-word-limit type="textarea" placeholder="请输入考试描述"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="考前描述">
<el-input
v-model="examForm.testFront"
v-model="examForm.testFront" :disabled="swichpublished"
type="textarea"
maxlength="200"
show-word-limit
@@ -157,12 +155,8 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="考后描述"><el-input
v-model="examForm.testUp"
type="textarea"
maxlength="200"
show-word-limit
placeholder="请输入考后描述"></el-input>
<el-form-item label="考后描述">
<el-input v-model="examForm.testUp" :disabled="swichpublished" type="textarea" maxlength="200" show-word-limit placeholder="请输入考后描述"></el-input>
</el-form-item>
</el-col>
@@ -183,13 +177,13 @@
<!-- <el-input v-model="examForm.testDuration" placeholder="20-120">
<template slot="append"> 分钟 </template>
</el-input> -->
<el-input-number v-model="examForm.testDuration" controls-position="right" :min="10" :max="120" placeholder="分钟"></el-input-number>
<el-input-number :disabled="swichpublished" v-model="examForm.testDuration" controls-position="right" :min="10" :max="120" placeholder="分钟"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="显示解析">
<el-radio-group v-model="examForm.showAnalysis">
<el-radio-group :disabled="swichpublished" v-model="examForm.showAnalysis">
<el-radio :label="true">允许查看</el-radio>
<el-radio :label="false">不允许查看</el-radio>
</el-radio-group>
@@ -197,7 +191,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="显示答案">
<el-radio-group v-model="examForm.showAnswer">
<el-radio-group :disabled="swichpublished" v-model="examForm.showAnswer">
<el-radio :label="true">允许查看</el-radio>
<el-radio :label="false">不允许查看</el-radio>
</el-radio-group>
@@ -206,8 +200,8 @@
</el-row>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="随机模式">
<el-radio-group v-model="examForm.randomMode" @change="changeRandomMode">
<el-form-item label="随机模式">
<el-radio-group :disabled="swichpublished" v-model="examForm.randomMode" @change="changeRandomMode">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
@@ -215,8 +209,7 @@
</el-col>
<el-col :span="12">
<el-form-item v-if="examForm.randomMode" label="随机数量" required>
<el-input-number v-model="examForm.randomCount" controls-position="right" :min="1" :max="qnum">
</el-input-number>
<el-input-number :disabled="swichpublished" v-model="examForm.randomCount" controls-position="right" :min="1" :max="qnum"></el-input-number>
<span style="margin-left:10px;" v-if="qnum==0">先选择试卷</span>
<span style="margin-left:10px;" v-if="qnum>0">试卷有 {{qnum}} 道试题</span>
<!-- <el-input v-model="examForm.randomCount"><template slot="append"> 不能大于{{qnum}} </template></el-input> -->
@@ -232,7 +225,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="试题排列">
<el-radio-group v-model="examForm.arrange">
<el-radio-group :disabled="swichpublished" v-model="examForm.arrange">
<el-radio :label="1" style="margin-right: 15px">试题乱序</el-radio>
<el-radio :label="2" style="margin-right: 15px">选项乱序</el-radio>
<el-radio :label="3" style="margin-right: 15px">全部乱序</el-radio>
@@ -244,7 +237,7 @@
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="评分模式">
<el-radio-group v-model="examForm.scoringType">
<el-radio-group :disabled="swichpublished" v-model="examForm.scoringType">
<el-radio :label="1">最高一次</el-radio>
<el-radio :label="2">最后一次</el-radio>
</el-radio-group>
@@ -252,7 +245,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="范围">
<el-radio-group v-model="examForm.rangeType">
<el-radio-group :disabled="swichpublished" v-model="examForm.rangeType">
<el-radio :label="1">独立使用</el-radio>
<el-radio :label="2" disabled>课程内部</el-radio>
</el-radio-group>
@@ -260,10 +253,10 @@
</el-col>
<el-col :span="12">
<el-form-item v-if="examForm.rangeType === 1" label="及格线">
<el-form-item v-if="examForm.rangeType === 1" label="及格线">
<!-- <el-input placeholder="20-120" v-model="examForm.passLine">
</el-input> -->
<el-input-number v-model="examForm.passLine" controls-position="right" :min="20" :max="120" placeholder="20-120"></el-input-number>
<el-input-number :disabled="swichpublished" v-model="examForm.passLine" controls-position="right" :min="20" :max="120" placeholder="20-120"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">

View File

@@ -96,7 +96,7 @@
<div class="keyword-text clearfix">
<div style="color:#2974D6;font-weight: 450;" v-if="item.orgDomainParent">{{orgDomainTranslate(item.orgDomainParent) }}</div>
<!-- <div style="color:#2974D6;font-weight: 450;" v-if="item.orgDomain">{{ orgDomainTranslate(item.orgDomain) }}</div> -->
<div style="color:#2974D6;font-weight: 450;" v-for="item,idx in item.majorType" :key="idx" >{{ majorTypeTranslate(item) }}</div>
<div style="color:#2974D6;font-weight: 450;" v-for="(item,idx) in item.majorType" :key="idx" >{{ majorTypeTranslate(item) }}</div>
<div v-if="item.keyword1">{{ item.keyword1 }}</div>
<div v-if="item.keyword2">{{ item.keyword2 }}</div>
<div v-if="item.keyword3">{{ item.keyword3 }}</div>

View File

@@ -21,10 +21,10 @@
<!-- // 10微课21在线课(直播)20:在线课( 录播)30:面授课40:学习项目,90:混合式, -->
<div>
<a @click="handleTypeAllClick(1)" class="option-item" :class="{'option-active':ctypeTagAll}">全部</a>
<a @click="handleTypeClick(ctypeList[0])" class="option-item" :class="{'option-active':ctypeList[0].checked}">录播课</a>
<a @click="handleTypeClick(ctypeList[1])" class="option-item" :class="{'option-active':ctypeList[1].checked}">线下课</a>
<a @click="handleTypeClick(ctypeList[0],ctypeList)" class="option-item" :class="{'option-active':ctypeList[0].checked}">录播课</a>
<a @click="handleTypeClick(ctypeList[1],ctypeList)" class="option-item" :class="{'option-active':ctypeList[1].checked}">线下课</a>
<a class="option-border"> </a>
<a @click="handleTypeClick(ctypeList[2])" class="option-item" :class="{'option-active':ctypeList[2].checked}">学习项目</a>
<a @click="handleTypeClick(ctypeList[2],ctypeList)" class="option-item" :class="{'option-active':ctypeList[2].checked}">学习项目</a>
</div>
</div>
</div>
@@ -35,7 +35,7 @@
</div>
<div>
<a @click="handleTypeAllClick(11)" class="option-item" :class="{'option-active':oneTagAll}">全部</a>
<a v-for="one in oneList" @click="handleOptionClick(one)" class="option-item" :class="{'option-active':one.checked}">{{one.name}}</a>
<a v-for="one in oneList" @click="handleOptionClick(one,oneList)" class="option-item" :class="{'option-active':one.checked}">{{one.name}}</a>
<a class="option-border"> </a>
<a class="option-item">
<span @click="jumUX()" class="Uxtext" style=""> U选小课堂
@@ -56,7 +56,7 @@
<a @click="handleTypeAllClick(12)" class="option-item" :class="{'option-active':twoTagAll}">全部</a>
</div>
<div>
<a v-for="two in twoList" @click="handleOptionClick(two)" class="option-item" :class="{'option-active':two.checked}">{{two.name}}</a>
<a v-for="two in twoList" @click="handleOptionClick(two,twoList)" class="option-item" :class="{'option-active':two.checked}">{{two.name}}</a>
</div>
</div>
</div>
@@ -69,7 +69,7 @@
<a @click="handleTypeAllClick(13)" class="option-item" :class="{'option-active':threeTagAll}">全部</a>
</div>
<div>
<a v-for="three in threeList" :key="three.id" @click="handleOptionClick(three)" class="option-item" :class="{'option-active':three.checked}">{{three.name}}</a>
<a v-for="three in threeList" :key="three.id" @click="handleOptionClick(three,threeList)" class="option-item" :class="{'option-active':three.checked}">{{three.name}}</a>
</div>
</div>
</div>
@@ -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();
},

View File

@@ -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('同步数据错误');
}
})
}
})