This commit is contained in:
李志发
2024-05-17 09:27:15 +08:00
parent c1dd6426c7
commit c3d34b0c66
27 changed files with 500 additions and 245 deletions

View File

@@ -1,12 +1,15 @@
<script>
import {mapActions, mapGetters} from "vuex";
import {getCertificationProcess, getTeacherInfo, setOfflineTutoring, treeList} from "@/api/modules/lecturer"
import processStatus from '@/components/processStatus.vue';
export default {
name: "FirstDraft",
computed: {
...mapGetters(['userInfo'])
},
components:{
processStatus
},
data(){
return{
disabled:false,
@@ -47,6 +50,15 @@ export default {
],
}
}
},
created() {
//获取基本信息
this.teacherId=this.$route.query.teacherId
this.baseInfo()
this.getStatus()
this.getSysTypeTree().then(rs=>{
this.sysTypeListMap=rs;
})
},
methods:{
...mapActions({
@@ -74,46 +86,46 @@ export default {
})
},
onSubmit(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.form.coursewareUrl==''){
this.$message({
message: '未上传文件',
type: 'error'
});
return
}else {
this.form.courseContent = this.form.courseContent_1.join('/');
setOfflineTutoring(
{teacherId:this.teacherId,
courseName:this.form.courseName,
courseContent:this.form.courseContent,
courseIntroduction:this.form.courseIntroduction,
coursewareUrl:this.form.coursewareUrl,
coursewareName:this.form.coursewareName,
version:0
}).then(res=>{
if (res.code==200){
this.$message({
message: '设置成功',
type: 'success'
});
this.$router.push({
path:'/need/onlinelearning',
query:{teacherId:this.teacherId}
})
}else {
this.$message({
message:res.msg,
type: 'error'
});
}
})
}
} else {
return false;
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.form.coursewareUrl==''){
this.$message({
message: '未上传文件',
type: 'error'
});
return
}else {
this.form.courseContent = this.form.courseContent_1.join('/');
setOfflineTutoring(
{teacherId:this.teacherId,
courseName:this.form.courseName,
courseContent:this.form.courseContent,
courseIntroduction:this.form.courseIntroduction,
coursewareUrl:this.form.coursewareUrl,
coursewareName:this.form.coursewareName,
version:0
}).then(res=>{
if (res.code==200){
this.$message({
message: '设置成功',
type: 'success'
});
this.$router.push({
path:'/need/onlinelearning',
query:{teacherId:this.teacherId}
})
}else {
this.$message({
message:res.msg,
type: 'error'
});
}
})
}
});
} else {
return false;
}
});
},
handRemove(file){
this.form.coursewareUrl=''
@@ -136,20 +148,13 @@ export default {
});
}
},
mounted() {
//获取基本信息
this.teacherId=this.$route.query.teacherId
this.baseInfo()
this.getStatus()
this.getSysTypeTree().then(rs=>{
this.sysTypeListMap=rs;
})
}
}
</script>
<template>
<div>
<process-status :teacherId="teacherId"></process-status>
<div class="title">上传初稿</div>
<el-container>
<div class="form-table">
@@ -219,12 +224,11 @@ export default {
.title{
font-size: 16px;
font-weight: 800;
width: 850px;
border-bottom: 1px solid rgba(215, 215, 215, 0.66);
border-bottom: 1px solid rgba(153, 153, 153, 0.2);
padding: 2px 2px 20px 2px;
}
.form-table{
width: 850px;
width: 100%;
margin-top: 20px;
}
.iconImg{