mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 10:56:44 +08:00
Merge branch 'teacher' of https://codeup.aliyun.com/6265f483e4166464dc2f9c14/boeu/portal into case
# Conflicts: # .gitignore
This commit is contained in:
@@ -14,7 +14,10 @@ VUE_APP_BOE_WEB_URL = 'https://u.boe.com'
|
||||
VUE_APP_BOE_MOBILE_URL = 'http://192.168.0.10:8082/mobile'
|
||||
|
||||
# File路径的基础url
|
||||
VUE_APP_FILE_BASE_URL = 'http://localhost:9090/cdn/upload'
|
||||
VUE_APP_FILE_BASE_URL = 'http://192.168.0.10:9090/cdn/upload'
|
||||
|
||||
# File路径的基础url的相对路径,加此项是为了不影响之前的路径配置
|
||||
VUE_APP_FILE_RELATIVE_PATH = '/upload'
|
||||
|
||||
# 登录地址
|
||||
VUE_APP_LOGIN_URL='/pc/login'
|
||||
|
||||
@@ -26,6 +26,13 @@ import ajax from '@/api/boe/boeApiAjax.js'
|
||||
const editTeacher = function(data) {
|
||||
return ajax.postJson('/b1/system/teacher/add-and-edit-teacher',data);
|
||||
}
|
||||
// api
|
||||
/**
|
||||
* 发薪地接口
|
||||
*/
|
||||
const getPayrollPlace = function(id) {
|
||||
return ajax.get('/b1/system/teacher/payroll-place');
|
||||
}
|
||||
/**
|
||||
* 教师体系和级别接口
|
||||
* @param {
|
||||
@@ -41,8 +48,8 @@ const teacherSystem = function(id) {
|
||||
teacher_id 教师id
|
||||
* } data 查询条件
|
||||
*/
|
||||
const teacherInfo = function(data) {
|
||||
return ajax.get('/b1/system/teacher/teacher-info',data);
|
||||
const teacherInfo = function(sysId) {
|
||||
return ajax.get('/b1/system/teacher/teacher-info?teacher_id='+sysId);
|
||||
}
|
||||
/**
|
||||
* 教师删除接口
|
||||
@@ -56,18 +63,91 @@ const teacherSystem = function(id) {
|
||||
/**
|
||||
* 教师启用禁用接口
|
||||
* @param {
|
||||
teacher_id
|
||||
teacher_id
|
||||
status 状态;0:临时;1:正式;2:停用
|
||||
* } 查询条件
|
||||
*/
|
||||
const updateStatus = function(data) {
|
||||
return ajax.postJson('/b1/system/teacher/update-status',data);
|
||||
}
|
||||
/**
|
||||
* 教师授课记录查询接口
|
||||
* @param {
|
||||
```json
|
||||
id // 教师id
|
||||
courseType // 课程类型:‘1,2’:面授,训练班;‘0’:在线班
|
||||
pageSize // 每页数据条数
|
||||
page // 返回第几页数据
|
||||
isPage // 是否分页:0分页返回,1:不分页直接返回全部
|
||||
```
|
||||
*/
|
||||
const getCourseScore = function(data) {
|
||||
return ajax.get(`/b1/system/teacher/course-score?id=${data.id}&courseType=${data.courseType}&pageSize=${data.pageSize}&page=${data.page}&isPage=${data.isPage}`);
|
||||
}
|
||||
/**
|
||||
* 内部讲师-授课资格 查询接口
|
||||
* @param {
|
||||
id // 教师id
|
||||
pageSize // 每页数据条数
|
||||
page // 返回第几页数据
|
||||
```}
|
||||
*/
|
||||
const getTeachingQualify = function(data) {
|
||||
return ajax.get(`/b1/system/teacher/teaching-qualify?id=${data.id}&pageSize=${data.pageSize}&page=${data.page}`);
|
||||
}
|
||||
/**
|
||||
* 内部讲师-未开班资源查询接口
|
||||
* @param {
|
||||
id // 教师id
|
||||
```
|
||||
*/
|
||||
const getCourseInfo = function(id) {
|
||||
return ajax.get('/b1/system/teacher/course-info?id='+id);
|
||||
}
|
||||
/**
|
||||
* 内部讲师-晋级过程查询接口
|
||||
* @param {
|
||||
id // 教师id
|
||||
```
|
||||
*/
|
||||
const teacherUpgradePrecess = function(id) {
|
||||
return ajax.get('/b1/system/teacher/teacher-upgrade-precess?id='+id);
|
||||
}
|
||||
/**
|
||||
* 内部讲师-修改模块讲师信息
|
||||
* @param {
|
||||
courseId // 课程id
|
||||
modId // 模块id
|
||||
teacherId // 教师id
|
||||
teachingTime // 授课时间
|
||||
*/
|
||||
const editModelTeacher = function(data) {
|
||||
return ajax.postJson('/b1/system/teacher/edit-model-teacher',data);
|
||||
}
|
||||
/**
|
||||
* 内部讲师-删除模块讲师接口
|
||||
* @param {
|
||||
courseId // 课程id
|
||||
modId // 模块id
|
||||
teacherId // 教师id
|
||||
remark // 备注
|
||||
*/
|
||||
const deleteModelTeacher = function(data) {
|
||||
return ajax.postJson('/b1/system/teacher/delete-model-teacher',data);
|
||||
}
|
||||
|
||||
|
||||
export default {
|
||||
editTeacher,
|
||||
teacherSystem,
|
||||
teacherInfo,
|
||||
deleteTeacher,
|
||||
updateStatus
|
||||
}
|
||||
updateStatus,
|
||||
getCourseScore,
|
||||
getTeachingQualify,
|
||||
getCourseInfo,
|
||||
teacherUpgradePrecess,
|
||||
deleteModelTeacher,
|
||||
editModelTeacher,
|
||||
getPayrollPlace
|
||||
}
|
||||
|
||||
@@ -23,6 +23,10 @@ const getInfoById = function(id) {
|
||||
* pageIndex 起始页
|
||||
* pageSize 每页条数
|
||||
* name 姓名
|
||||
* tlevelId级别
|
||||
* salaryId发薪地
|
||||
* tsystemId
|
||||
|
||||
* } query
|
||||
* @returns
|
||||
*/
|
||||
@@ -104,7 +108,7 @@ const save = function(data) {
|
||||
* @param {teacherId->sysId : 原系统的id,接口返回} sysId
|
||||
*/
|
||||
const updateSysId = function(id,sysId) {
|
||||
return ajax.postJson('/xboe/teacher/update-sysid',{id,sysId});
|
||||
return ajax.post('/xboe/teacher/update-sysid',{id,sysId});
|
||||
|
||||
}
|
||||
|
||||
@@ -173,6 +177,28 @@ const end=function(id){
|
||||
const exports=function(query){
|
||||
return ajax.post('/xboe/teacher/export',query);
|
||||
}
|
||||
|
||||
/**
|
||||
* courseType // 课程类型:‘1,2’:面授,训练班;‘0’:在线班
|
||||
* sysId:教师的sysId
|
||||
* tid: 教师的id
|
||||
* @param {tid,sysId,countType,pageSize:100,pageIndex} query
|
||||
*/
|
||||
const findAllCourses=function(query){
|
||||
return ajax.post('/xboe/teacher/compose/find/courses',query);
|
||||
}
|
||||
/**
|
||||
* 内部讲师-删除模块讲师接口
|
||||
* @param {
|
||||
courseId // 课程id
|
||||
modId // 模块id
|
||||
teacherId // 教师id
|
||||
remark // 备注
|
||||
*/
|
||||
const syncUpdate = function(data) {
|
||||
return ajax.postJson('/xboe/teacher/update-sync',data);
|
||||
}
|
||||
|
||||
export default {
|
||||
findByName,
|
||||
getInfoById,
|
||||
@@ -186,5 +212,6 @@ export default {
|
||||
has,
|
||||
start,
|
||||
end,
|
||||
exports
|
||||
exports,
|
||||
syncUpdate
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.one-line-ellipsis{
|
||||
display: -webkit-box;
|
||||
// white-space:pre-wrap;
|
||||
white-space:pre-wrap;
|
||||
word-wrap: break-word;
|
||||
word-break:break-all;
|
||||
overflow: hidden;
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
<el-image :src="fileBaseUrl+cware.content.content" fit="fill"></el-image>
|
||||
</div>
|
||||
<div v-if="cware.content.contentType==40">
|
||||
<div style="padding: 10px;color: #767676; ">如果pdf无法显示,请稍后再试,文档转化是异步处理,有可能是文档还未转化完成 </div>
|
||||
<div style="padding: 10px;color: #767676; ">如果pdf无法显示,请稍后再试,文档转化是异步处理,有可能是文档还未转化完成,您可以先提交课程内容 </div>
|
||||
<pdfPreview v-if="cware.content.contentType == 40" :filePath="fileBaseUrl+cware.content.pdfPath"></pdfPreview>
|
||||
</div>
|
||||
</div>
|
||||
@@ -580,6 +580,7 @@
|
||||
setupTage:0,
|
||||
},
|
||||
},
|
||||
pdfTip:'',//pdf文件的提示
|
||||
hasCWare:{ keyword:'', count: 0, pageSize: 10, pageIndex: 1, list:[]},
|
||||
homework:{
|
||||
show:1,
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
<div style="padding-bottom: 10px;">
|
||||
<div style="display: flex;justify-content:flex-start;">
|
||||
<div style="padding: 0px 5px;">
|
||||
<el-select v-model="tSystemData" value-key="id" clearable @change="changeSystem" placeholder="请选择教师体系">
|
||||
<el-option v-for="item in systemData" :key="item.id" :label="item.name" :value="item"></el-option>
|
||||
<el-select v-model="query.tsystemId" value-key="id" clearable @change="queryChangeSystem" placeholder="请选择教师体系">
|
||||
<el-option v-for="item in systemData" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 要在换一个变量与新建区别开 -->
|
||||
<div style="padding: 0px 5px;">
|
||||
<el-select v-model="tLevelData" clearable value-key="id" placeholder="请选择教师级别">
|
||||
<el-option v-for="item in levelData" :key="item.id" :label="item.name" :value="item"></el-option>
|
||||
<el-select v-model="query.tlevelId" clearable value-key="id" placeholder="请选择教师级别">
|
||||
<el-option v-for="item in queryLevelData" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div style="padding: 0px 5px;"><el-input placeholder="请输入姓名" v-model="queryName" clearable></el-input></div>
|
||||
<div style="padding: 0px 5px;"><el-input placeholder="请输入姓名" v-model="query.name" clearable></el-input></div>
|
||||
<div style="padding: 0px 5px;">
|
||||
<el-select v-model="tLevelData" clearable value-key="id" placeholder="请选择发薪地">
|
||||
<el-option v-for="item in levelData" :key="item.id" :label="item.name" :value="item"></el-option>
|
||||
<el-select v-model="query.salaryId" clearable value-key="id" placeholder="请选择发薪地">
|
||||
<el-option v-for="item in placeList" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -31,21 +31,24 @@
|
||||
<el-table-column type="selection"></el-table-column>
|
||||
<el-table-column label="姓名" prop="name" fixed>
|
||||
<template slot-scope="scope">
|
||||
<span @click="handleName(scope.row)">{{scope.row.name}}</span>
|
||||
<span class="previewStyle" @click="handleName(scope.row)">{{scope.row.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="部门" prop="departName"></el-table-column>
|
||||
<!-- <el-table-column label="创建时间" sortable prop="sysCreateTime"></el-table-column> -->
|
||||
<el-table-column label="修改时间" sortable width="155" prop="sysUpdateTime"></el-table-column>
|
||||
<el-table-column label="授课时长" prop="teaching"></el-table-column>
|
||||
<el-table-column label="教师体系" prop="tsystemName"></el-table-column>
|
||||
<el-table-column label="教师级别" prop="tlevelName"></el-table-column>
|
||||
<el-table-column label="发薪地" prop="salaryName"></el-table-column>
|
||||
<el-table-column label="在职状态" width="90" :filters="[{ text: '在职', value: '0'}, { text: '离职', value: '1' }]"
|
||||
:filter-method="filterWork">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.waitStatus=='0'?'在职': scope.row.waitStatus=='1' ? '离职' :''}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="认证状态" width="90" :filters="[{ text: '未认证', value: '0'}, { text: '已认证', value: '1' }]"
|
||||
<el-table-column label="认证状态" width="90" :filters="[{ text: '未认证', value: 0}, { text: '已认证', value: 1 }]"
|
||||
:filter-method="filterCertification">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.certStatus==0 ?'未认证': scope.row.certStatus==1 ? '已认证' :''}}
|
||||
@@ -74,9 +77,9 @@
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="pageIndex"
|
||||
:current-page="query.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize"
|
||||
:page-size="query.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="count">
|
||||
</el-pagination>
|
||||
@@ -86,7 +89,7 @@
|
||||
<el-form label-width="100px" :model="form" ref="form" :rules="rules">
|
||||
<el-form-item>
|
||||
<div class="avator">
|
||||
<imageUpload dir="avatar" :value="fileBaseUrl + form.account.avatar" @success="handleUploadSuccess" @remove="removeHandle"></imageUpload>
|
||||
<imageUpload dir="avatar" :value="coverImage" @success="handleUploadSuccess" @remove="removeHandle"></imageUpload>
|
||||
<div class="avatorText">
|
||||
<p>上传头像</p>
|
||||
<p>图片尺寸建议在:宽100px,高100px</p>
|
||||
@@ -143,7 +146,8 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.description" clearable type="textarea" :autosize='{ minRows: 3, maxRows: 6 }'></el-input>
|
||||
<!-- <el-input v-model="form.description" clearable type="textarea" :autosize='{ minRows: 3, maxRows: 6 }'></el-input> -->
|
||||
<WxEditor v-model="form.description" :minHeight="50"></WxEditor>
|
||||
</el-form-item>
|
||||
<el-form-item label="擅长课程">
|
||||
<el-input v-model="form.courses" clearable placeholder="请输入"></el-input>
|
||||
@@ -154,14 +158,10 @@
|
||||
<el-button :loading="saveLoading" type="primary" @click="saveHandle">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="教师详情"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="showTeacherDetails"
|
||||
width="800px">
|
||||
<teacher-details v-if="teacherDetailsId != ''" :id="teacherDetailsId"></teacher-details>
|
||||
<el-dialog title="教师详情" :close-on-click-modal="false" :visible.sync="showTeacherDetails" width="800px">
|
||||
<teacher-details v-if="teacherDetailId != ''" :id="teacherDetailsId" :newId="teacherDetailId"></teacher-details>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button @click="handleCloseOne()">取 消</el-button>
|
||||
<!-- <el-button type="primary" @click="showTeacherDetails = false">确 定</el-button> -->
|
||||
</span>
|
||||
</el-dialog>
|
||||
@@ -169,6 +169,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import WxEditor from '@/components/Editor/index.vue';
|
||||
import teacherApi from "@/api/modules/teacher";
|
||||
import teacherBoeApi from "@/api/boe/teacher";
|
||||
import userApi from "@/api/system/user";
|
||||
@@ -177,10 +178,20 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
name: 'teacher',
|
||||
components:{imageUpload,teacherDetails},
|
||||
components:{imageUpload,teacherDetails,WxEditor},
|
||||
data(){
|
||||
return {
|
||||
teacherDetailsId: '',
|
||||
query:{
|
||||
tsystemId:'',
|
||||
tsystemIds:'',
|
||||
tlevelId:'',
|
||||
name:'',
|
||||
salaryId:'',
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
teacherDetailId:'',//新数据id
|
||||
teacherDetailsId: '',// sid
|
||||
showTeacherDetails:false,
|
||||
tSystemData:{},
|
||||
tLevelData:{},
|
||||
@@ -217,7 +228,6 @@
|
||||
]
|
||||
},
|
||||
selectList:[],
|
||||
queryName:"",
|
||||
dialogVisible:false,
|
||||
tableData:[],
|
||||
searchName:null,
|
||||
@@ -238,31 +248,50 @@
|
||||
systemLevelTree:[],
|
||||
systemData:[],//体系数组{id,name}
|
||||
levelData:[],//级别数组{id,name}
|
||||
queryLevelData:[],
|
||||
teacherSystemids:[],
|
||||
coverImage:'',
|
||||
placeList:[],
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
showTeacherDetails(val) {
|
||||
if(!val) {
|
||||
this.teacherDetailsId = '';
|
||||
this.teacherDetailId = '';
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadData(1);
|
||||
this.getTeachersystem();
|
||||
mounted() {
|
||||
this.getTeachersystem();
|
||||
this.getPayrollPlace();
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['userInfo'])
|
||||
},
|
||||
methods:{
|
||||
handleClose() {
|
||||
console.log("1111");
|
||||
getPayrollPlace(){
|
||||
teacherBoeApi.getPayrollPlace().then(res=>{
|
||||
// console.log(res,'res');
|
||||
if(res.status == '200') {
|
||||
for(let i in res.result){
|
||||
this.placeList.push({
|
||||
value:i,
|
||||
label:res.result[i]
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCloseOne() {
|
||||
// this.teacherDetailsId = '';
|
||||
this.showTeacherDetails = false;
|
||||
},
|
||||
handleName(row) {
|
||||
this.showTeacherDetails = true;
|
||||
this.teacherDetailsId = row.id;
|
||||
this.teacherDetailsId = row.sysId;
|
||||
this.teacherDetailId = row.id;
|
||||
// this.teacherDetailsId = '13BEBDBD-3D28-244D-648D-0CBD6796717C'
|
||||
},
|
||||
getTeachersystem() {
|
||||
teacherBoeApi.teacherSystem(this.userInfo.sysId).then(res=>{
|
||||
@@ -270,18 +299,38 @@
|
||||
this.systemLevelTree=res.result;
|
||||
this.systemData=[];
|
||||
res.result.forEach(item => {
|
||||
this.teacherSystemids.push(item.teacher_system_id);
|
||||
this.systemData.push({
|
||||
id:item.teacher_system_id,
|
||||
name:item.system_name
|
||||
})
|
||||
});
|
||||
this.loadData(1);
|
||||
} else {
|
||||
this.$message.error('教师体系数据获取失败!')
|
||||
this.loadData(1);
|
||||
}
|
||||
})
|
||||
},
|
||||
queryChangeSystem(val) {
|
||||
this.query.tLevelId = '';
|
||||
let array=[];
|
||||
this.systemLevelTree.forEach(sl=>{
|
||||
if(sl.teacher_system_id==val){
|
||||
sl.teacher_level.forEach(lev=>{
|
||||
array.push({
|
||||
id:lev.teacher_level_id,
|
||||
name:lev.level_name
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
this.queryLevelData=array;
|
||||
},
|
||||
changeSystem(val){
|
||||
//console.log(val,'val');
|
||||
this.tLevelData = {};
|
||||
this.form.tlevelId = '';
|
||||
this.form.tlevelName='';
|
||||
let array=[];
|
||||
this.systemLevelTree.forEach(sl=>{
|
||||
if(sl.teacher_system_id==val.id){
|
||||
@@ -296,7 +345,12 @@
|
||||
this.levelData=array;
|
||||
},
|
||||
reset (){
|
||||
this.queryName = '';
|
||||
this.query.name = '';
|
||||
this.query.tsystemId='',
|
||||
this.query.tlevelId='',
|
||||
this.query.salaryId='',
|
||||
this.query.pageIndex= 1,
|
||||
this.query.pageSize= 10,
|
||||
this.$refs.teacherTable.clearFilter();
|
||||
this.loadData(1);
|
||||
},
|
||||
@@ -314,6 +368,9 @@
|
||||
waitStatus:0,//在职
|
||||
certStatus:0,//未认证
|
||||
}
|
||||
this.tSystemData = {};
|
||||
this.tLevelData= {};
|
||||
this.coverImage = '';
|
||||
this.dialogVisible=true
|
||||
},
|
||||
filterWork(value,row){
|
||||
@@ -382,8 +439,9 @@
|
||||
if (res.status == 200 && res.result != null) {
|
||||
this.havaInfo = true;
|
||||
this.form.account = res.result.account;
|
||||
// this.fileBaseUrl +
|
||||
this.form.account.avatar = this.fileBaseUrl + res.result.account.avatar;
|
||||
if(res.result.account.avatar != '') {
|
||||
this.coverImage = this.fileBaseUrl+res.result.account.avatar;
|
||||
}
|
||||
this.form.user = res.result;
|
||||
} else {
|
||||
this.havaInfo = false;
|
||||
@@ -396,13 +454,15 @@
|
||||
},
|
||||
removeHandle(){
|
||||
this.form.account.avatar = '';
|
||||
this.coverImage = '';
|
||||
this.form.photo = '';
|
||||
},
|
||||
handleUploadSuccess(res){
|
||||
this.coverImage = this.fileBaseUrl + res.result.filePath;
|
||||
this.form.account.avatar = res.result.filePath;
|
||||
this.form.photo = res.result.filePath;
|
||||
},
|
||||
saveHandle(){
|
||||
//console.log(this.tSystemData,'tSystemData');
|
||||
//console.log(this.tLevelData,'tLevelData');
|
||||
this.form.tsystemId = this.tSystemData.id;
|
||||
this.form.tsystemName=this.tSystemData.name;
|
||||
this.form.tlevelId = this.tLevelData.id;
|
||||
@@ -417,10 +477,12 @@
|
||||
this.saveBoe();
|
||||
this.dialogVisible = false;
|
||||
this.loadData(1);
|
||||
this.saveLoading = false;
|
||||
}else{
|
||||
this.$message({ type: "error", message: res.message });
|
||||
}
|
||||
}).catch(err => {
|
||||
this.saveLoading = false;
|
||||
this.$message({ type: "error", message: err });
|
||||
});
|
||||
}else{
|
||||
@@ -431,9 +493,11 @@
|
||||
this.dialogVisible = false;
|
||||
this.loadData(1);
|
||||
}else{
|
||||
this.saveLoading = false;
|
||||
this.$message({ type: "error", message: res.message });
|
||||
}
|
||||
}).catch(err => {
|
||||
this.saveLoading = false;
|
||||
this.$message({ type: "error", message: err });
|
||||
});
|
||||
}
|
||||
@@ -462,7 +526,7 @@
|
||||
teacherBoeApi.editTeacher(data).then(res=>{
|
||||
this.saveLoading=false;
|
||||
if(res.status == 200) {
|
||||
this.updateSysId(this.form.user.id,res.result.sysId);
|
||||
this.updateSysId(this.form.user.id,res.result.teacher_id);
|
||||
this.$message({ type: "success", message: "保存成功" });
|
||||
}else{
|
||||
this.$message({ type: "warning", message: "同步失败,本地已保存" });
|
||||
@@ -470,7 +534,7 @@
|
||||
})
|
||||
},
|
||||
updateSysId(id,sysId) {
|
||||
teacherBoeApi.updateSysId(id,sysId).then(res=>{
|
||||
teacherApi.updateSysId(id,sysId).then(res=>{
|
||||
if(res.status == 200) {
|
||||
this.$message.success('教师同步成功!')
|
||||
} else {
|
||||
@@ -479,6 +543,7 @@
|
||||
})
|
||||
},
|
||||
updateHandle(data){
|
||||
this.coverImage = '';
|
||||
this.saveLoading=false;
|
||||
this.newOrEdit='编辑教师';
|
||||
this.allowInput=true;
|
||||
@@ -486,19 +551,40 @@
|
||||
if (res.status == 200) {
|
||||
const result = res.result;
|
||||
this.form = result;
|
||||
this.dialogVisible = true;
|
||||
this.tSystemData = {
|
||||
id:result.tsystemId,
|
||||
name:result.tlevelName
|
||||
};
|
||||
this.tLevelData = {
|
||||
id:result.tlevelId,
|
||||
name: result.tlevelName
|
||||
};
|
||||
if(res.result.photo != '') {
|
||||
this.coverImage = this.fileBaseUrl+res.result.photo;
|
||||
}
|
||||
this.updateSystem(result.tsystemId)
|
||||
this.dialogVisible = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
updateSystem(val) {
|
||||
let array=[];
|
||||
this.systemLevelTree.forEach(sl=>{
|
||||
if(sl.teacher_system_id==val){
|
||||
sl.teacher_level.forEach(lev=>{
|
||||
array.push({
|
||||
id:lev.teacher_level_id,
|
||||
name:lev.level_name
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
this.levelData=array;
|
||||
},
|
||||
loadData(pageIndex) {
|
||||
this.pageIndex = pageIndex;
|
||||
teacherApi
|
||||
.page({
|
||||
pageIndex: this.pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
name: this.queryName ,
|
||||
})
|
||||
.then((res) => {
|
||||
this.query.pageIndex = pageIndex;
|
||||
this.query.tsystemIds = this.query.tsystemId || this.teacherSystemids.join();
|
||||
teacherApi.page(this.query).then((res) => {
|
||||
if (res.status == 200) {
|
||||
const result = res.result;
|
||||
this.tableData = result.list;
|
||||
@@ -569,50 +655,49 @@
|
||||
})
|
||||
ids = ids.join();
|
||||
}
|
||||
//如果是勾选的,那需要传id的值,使用逗号分隔
|
||||
//get请求
|
||||
// var eleLink = document.createElement('a');
|
||||
// eleLink.download = '教师列表';
|
||||
// eleLink.style.display = 'none';
|
||||
// eleLink.href = `${process.env.VUE_APP_BASE_API}/xboe/teacher/export?name=${this.queryName}`;
|
||||
// document.body.appendChild(eleLink);
|
||||
// eleLink.click();
|
||||
// 然后移除
|
||||
// document.body.removeChild(eleLink);
|
||||
|
||||
//post请求
|
||||
var eleForm=document.createElement('form');
|
||||
eleForm.style="display:none;";
|
||||
eleForm.method='post';
|
||||
eleForm.action=`${process.env.VUE_APP_BASE_API}/xboe/teacher/export?name=${this.queryName}`;
|
||||
|
||||
eleForm.action=`${process.env.VUE_APP_BASE_API}/xboe/teacher/export?name=${this.query.name}`;
|
||||
//添加ids条件
|
||||
var hdnFilePath = document.createElement('input');
|
||||
hdnFilePath.type = 'hidden';
|
||||
hdnFilePath.name = 'ids';
|
||||
hdnFilePath.value = ids;
|
||||
eleForm.appendChild(hdnFilePath);
|
||||
//添加查询姓名
|
||||
var hdnName = document.createElement('input');
|
||||
hdnName.type = 'hidden';
|
||||
hdnName.name = 'name';
|
||||
hdnName.value = this.query.name;
|
||||
eleForm.appendChild(hdnName);
|
||||
|
||||
document.body.appendChild(eleForm);
|
||||
eleForm.submit();
|
||||
document.body.removeChild(eleForm);
|
||||
},
|
||||
exportCourse(row){
|
||||
if(!row.sysId){
|
||||
this.$message({message:'无原系统教师关联,只导出新系统的教师课程',type:'warning'});
|
||||
}
|
||||
var eleLink = document.createElement('a');
|
||||
eleLink.download = '教师授课信息';
|
||||
eleLink.style.display = 'none';
|
||||
eleLink.setAttribute('target', '_blank');
|
||||
eleLink.href = `${process.env.VUE_APP_BASE_API}/xboe/m/course/manage/export-teacher-course?teacherId=${row.id}`;
|
||||
eleLink.href = `${process.env.VUE_APP_BASE_API}/xboe/teacher/compose/export/courses?tid=${row.id}&sysId=${row.sysId}&courseType=0,1,2`;
|
||||
document.body.appendChild(eleLink);
|
||||
eleLink.click();
|
||||
document.body.removeChild(eleLink);
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageIndex = 1
|
||||
this.loadData(this.pageIndex)
|
||||
this.query.pageSize = val
|
||||
this.query.pageIndex = 1
|
||||
this.loadData(this.query.pageIndex)
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageIndex = val
|
||||
this.loadData(this.pageIndex)
|
||||
this.query.pageIndex = val
|
||||
this.loadData(this.query.pageIndex)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,64 +3,67 @@
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="个人详情" name="first">
|
||||
<div class="one">
|
||||
<el-row :gutter="10">
|
||||
<el-row :gutter="10" style="width:720px">
|
||||
<el-col :span="24">
|
||||
<el-form label-width="120px" size="mini">
|
||||
<el-form-item label="头像:">
|
||||
<div style="width: 90px;height: 90px" v-if="form.account.avatar == ''">
|
||||
<img style="width:100%;height:100%" v-if="form.gender == 1" :src="webBaseUrl + '/images/Avatarman.png'" alt="" srcset="">
|
||||
<div style="width: 90px;height: 90px" v-if="newForm && newForm.photo == ''">
|
||||
<img style="width:100%;height:100%" v-if="newForm.gender == 1" :src="webBaseUrl + '/images/Avatarman.png'" alt="" srcset="">
|
||||
<img style="width:100%;height:100%" v-else :src="webBaseUrl + '/images/Avatarwoman.png'" alt="" srcset="">
|
||||
</div>
|
||||
<div style="width: 90px;height: 90px" v-else>
|
||||
<img style="width:100%;height:100%" :src="form.account.avatar" alt="" srcset="">
|
||||
<img style="width:100%;height:100%" :src="fileBaseUrl + newForm.photo" alt="" srcset="">
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="讲师账号:">
|
||||
<el-col :span="12">{{form.user.userNo}}</el-col>
|
||||
<el-col :span="12">{{newForm.user.userNo}}</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="讲师姓名:">{{form.user.name}}</el-form-item>
|
||||
<el-form-item label="讲师姓名:">{{newForm.user.name}}</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="讲师组织:" >
|
||||
<el-col :span="12">--</el-col>
|
||||
<el-col :span="12">{{form.company_name? form.company_name:'--'}}</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="初始授课时长:">12分账</el-form-item></el-col>
|
||||
<el-form-item label="初始授课时长:">{{form.default_teaching_time? formatSeconds(form.default_teaching_time):'--'}}</el-form-item></el-col>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="讲师体系:">
|
||||
<el-col :span="12">波ue</el-col>
|
||||
<el-col :span="12">{{newForm.tsystemName? newForm.tsystemName:'--'}}</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="讲师级别:">
|
||||
2级
|
||||
{{newForm.tlevelName? newForm.tlevelName:'--'}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="总计授课时长:">
|
||||
<el-col :span="12">12分账</el-col>
|
||||
<el-col :span="12">{{form.teaching_time? formatSeconds(form.teaching_time):'--'}}</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="认证状态:">
|
||||
未认证
|
||||
{{form.is_certify == 1? '已认证':'未认证'}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="认证时间:">
|
||||
<el-col :span="12">--</el-col>
|
||||
<el-col :span="12">{{form.certify_at? formatsec(form.certify_at *1000):'--'}}</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="认证资料:"> --</el-form-item>
|
||||
<el-form-item label="认证资料:">
|
||||
<i style="color:blue" v-if="form.certification" title="点击下载" @click="downloadActioon(form.certification)" class="el-icon-download"></i>
|
||||
<span v-else>--</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="认证人:">
|
||||
<el-col :span="12">认证人</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="讲师介绍:">
|
||||
讲师介绍
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-form-item label="认证人:"> -->
|
||||
<!-- <el-col :span="12">--</el-col> -->
|
||||
<!-- <el-col :span="12"> -->
|
||||
<el-form-item label="讲师介绍:">
|
||||
<div v-html="newForm.description"></div>
|
||||
</el-form-item>
|
||||
<el-form-item label="讲师备注:">
|
||||
--
|
||||
<!-- </el-col>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="讲师备注:">
|
||||
{{newForm.remark}}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
@@ -69,8 +72,8 @@
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="授课记录" name="second">
|
||||
<div style="display:flex">
|
||||
<div><el-button type="primary">导出授课记录</el-button></div>
|
||||
<div style="margin: 0 5px"><el-select v-model="value" placeholder="请选择" clearable >
|
||||
<!-- <div><el-button type="primary" @click="exportCourse()">导出授课记录</el-button></div> -->
|
||||
<div style="margin: 0 5px"><el-select v-model="records.courseType" placeholder="请选择" clearable @change="getCourseScore()">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
@@ -79,143 +82,150 @@
|
||||
</el-option>
|
||||
</el-select></div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
<el-table height="430"
|
||||
:data="records.list"
|
||||
style="width: 100%;margin-top:10px">
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="班级编号"
|
||||
width="180">
|
||||
prop="courseCode" width="120"
|
||||
label="班级编号">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="类型"
|
||||
width="180">
|
||||
prop="courseType"
|
||||
label="类型">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.courseType == '1'">面授班</span>
|
||||
<span v-if="scope.row.courseType == '2'">训练班</span>
|
||||
<span v-if="scope.row.courseType == '0'">在线班</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="班级名称">
|
||||
prop="courseName" show-overflow-tooltip
|
||||
label="班级名称" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
prop="modName" show-overflow-tooltip
|
||||
label="模块名称"
|
||||
width="180">
|
||||
width="100">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="授课时长(min)"
|
||||
width="180">
|
||||
prop="teachingTime"
|
||||
label="授课时长(min)" width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="开班时间">
|
||||
prop="openStartTime"
|
||||
label="开班时间" width="140">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
prop="courseStatus"
|
||||
label="班级状态"
|
||||
width="180">
|
||||
width="100">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
prop="teacherScore"
|
||||
label="评分">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="180">
|
||||
width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="update()">修改</el-button>
|
||||
<el-button type="text">删除</el-button>
|
||||
<el-button type="text" @click="recordsUpdate(scope.row)">修改</el-button>
|
||||
<el-button type="text" @click="recordsDel(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <div style="text-align:center;margin-top:20px">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="records.page"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="records.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="records.count">
|
||||
</el-pagination>
|
||||
</div> -->
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="授课资格" name="third">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="课程编号"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="课程名称"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="班级名称">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="课程分类"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="课程类型"
|
||||
width="180">
|
||||
<el-table height="430" :data="qualify.list" style="width: 100%">
|
||||
<el-table-column prop="courseCode" label="课程编号" width="180"> </el-table-column>
|
||||
<el-table-column prop="courseName" show-overflow-tooltip label="课程名称" width="250"> </el-table-column>
|
||||
<el-table-column prop="dictionaryName" label="课程分类" width="180"> </el-table-column>
|
||||
<el-table-column prop="courseType" label="课程类型" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.courseType == '0'">录播</span>
|
||||
<span v-if="scope.row.courseType == '1'">面授</span>
|
||||
<span v-if="scope.row.courseType == '2'">线下课</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <div style="text-align:center;margin-top:20px">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="qualifySizeChange"
|
||||
@current-change="qualifyCurrentChange"
|
||||
:current-page="records.page"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="records.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="records.count">
|
||||
</el-pagination>
|
||||
</div> -->
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="未开班资源" name="fourth">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
<el-table height="430"
|
||||
:data="courseInfoList"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="date"
|
||||
prop="courseCode"
|
||||
label="班级编号"
|
||||
width="180">
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
prop="courseName" show-overflow-tooltip
|
||||
label="班级名称"
|
||||
width="180">
|
||||
width="200">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
prop="modName" width="150" show-overflow-tooltip
|
||||
label="模块名称">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
prop="teachingTime"
|
||||
label="授课时长"
|
||||
width="180">
|
||||
width="100">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
prop="openStartTime"
|
||||
label="开班时间"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="晋级过程" name="five">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
<el-table height="370"
|
||||
:data="precessList"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="date"
|
||||
prop="operatorTime"
|
||||
label="变更时间"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="变更方式"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="模块名称">
|
||||
prop="type"
|
||||
label="变更方式">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.type == '0'">手动</span>
|
||||
<span v-if="scope.row.type == '1'">自动</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="变更结果"
|
||||
width="180">
|
||||
prop="afterLevelName"
|
||||
label="变更结果">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="操作人"
|
||||
width="180">
|
||||
prop="operatorName"
|
||||
label="操作人">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
@@ -225,38 +235,73 @@
|
||||
:visible.sync="dialogVisible"
|
||||
width="300px"
|
||||
top="20%"
|
||||
:modal="false"
|
||||
:before-close="handleClose">
|
||||
:modal="false">
|
||||
<div>请输入授课时长(分钟)</div>
|
||||
<div><el-input v-model="input" placeholder="请输入内容"></el-input></div>
|
||||
<div style="margin-top:20px"><el-input v-model="records.row.teachingTime" placeholder="请输入内容"></el-input></div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
||||
<el-button type="primary" @click="editModelTeacher()">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import qs from 'qs'
|
||||
import teacherApi from "@/api/modules/teacher";
|
||||
import teacherBoeApi from "@/api/boe/teacher";
|
||||
import userApi from "@/api/system/user";
|
||||
import { formatSeconds,formatsec } from '@/utils/datetime.js'
|
||||
import imageUpload from "@/components/ImageUpload/index.vue";
|
||||
import { mapGetters } from "vuex";
|
||||
export default {
|
||||
name: "teacherDetails",
|
||||
components: { imageUpload },
|
||||
props: {
|
||||
id:{
|
||||
id:{// sysId
|
||||
type: String,
|
||||
},
|
||||
newId:{// id
|
||||
type: String,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formatsec,
|
||||
formatSeconds,
|
||||
baseUrl: process.env.VUE_APP_BASE_API,
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
newForm:{
|
||||
account:{},
|
||||
user:{},
|
||||
photo:''
|
||||
},
|
||||
dialogVisible:false,
|
||||
activeName: "first",
|
||||
value: "",
|
||||
options: [],
|
||||
options: [//‘1,2’:面授,训练班;‘0’:在线班
|
||||
{label:'录播',value:'0'},
|
||||
{label:'面授',value:'1'},
|
||||
{label:'线下课',value:'2'},
|
||||
],
|
||||
records:{// 授课记录
|
||||
courseType:'',
|
||||
// pageSize: 1,
|
||||
// page:5,
|
||||
count:0,
|
||||
list:[],
|
||||
row:{
|
||||
teachingTime:'',
|
||||
},
|
||||
},
|
||||
qualify:{//授课资格
|
||||
pageSize: 1,
|
||||
page:5,
|
||||
count:0,
|
||||
list:[]
|
||||
},
|
||||
courseInfoList: [],//未开班资源
|
||||
precessList:[],//晋级过程
|
||||
tableData: [],
|
||||
input:'',
|
||||
form:{
|
||||
@@ -266,29 +311,236 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.id,'id');
|
||||
this.getDetail(this.id)
|
||||
this.getAvatar();
|
||||
if(this.id) {
|
||||
this.getDetail();
|
||||
}
|
||||
|
||||
},
|
||||
watch:{
|
||||
id(newVal){
|
||||
if(newVal){
|
||||
this.getDetail(newVal);
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["userInfo"])
|
||||
},
|
||||
methods: {
|
||||
update(row) {
|
||||
console.log(row,'row');
|
||||
downloadActioon(filePath) {
|
||||
if (!filePath) return;
|
||||
let link = document.createElement('a'); //创建a标签
|
||||
link.style.display = 'none'; //使其隐藏
|
||||
link.download = this.fileBaseUrl + filePath;
|
||||
link.setAttribute('target', '_blank');
|
||||
link.href = this.fileBaseUrl + filePath; //赋予文件下载地址
|
||||
link.setAttribute('download', '资料'); //设置下载属性 以及文件名
|
||||
document.body.appendChild(link); //a标签插至页面中
|
||||
link.click(); //强制触发a标签事件
|
||||
document.body.removeChild(link);
|
||||
},
|
||||
getAvatar(){
|
||||
teacherApi.detail(this.newId).then(res => {
|
||||
if (res.status == 200) {
|
||||
// const result = res.result;
|
||||
this.newForm = res.result;
|
||||
// if(res.result.account.avatar != '') {
|
||||
// this.newForm.account.avatar = this.baseUrl + res.result.account.avatar;
|
||||
// }
|
||||
}
|
||||
})
|
||||
},
|
||||
exportCourse(row){
|
||||
var eleLink = document.createElement('a');
|
||||
eleLink.download = '教师授课信息';
|
||||
eleLink.style.display = 'none';
|
||||
eleLink.setAttribute('target', '_blank');
|
||||
eleLink.href = `${process.env.VUE_APP_BASE_API}/xboe/teacher/compose/export/courses?tid=${row.id}&sysId=${row.sysId}&courseType=0,1,3`;
|
||||
document.body.appendChild(eleLink);
|
||||
eleLink.click();
|
||||
document.body.removeChild(eleLink);
|
||||
},
|
||||
recordsDel(row) {
|
||||
this.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let data = {
|
||||
courseId:row.courseId, // 课程id
|
||||
modId:row.modId, // 模块id
|
||||
teacherId:row.teacherId, // 教师id
|
||||
remark:'', // 备注
|
||||
}
|
||||
teacherBoeApi.deleteModelTeacher(data).then(res=>{
|
||||
if(res.status == '200') {
|
||||
this.getCourseScore();
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
})
|
||||
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
recordsUpdate(row) {
|
||||
this.records.row = row;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
handleClick() {},
|
||||
getDetail(id) {
|
||||
this.saveLoading = false;
|
||||
this.newOrEdit = "编辑教师";
|
||||
this.allowInput = true;
|
||||
teacherApi.detail(id).then(res => {
|
||||
handleClick(tab, event) {
|
||||
if(tab.name == 'second') {// 授课记录
|
||||
this.getCourseScore();
|
||||
} else if(tab.name == 'third') {// 授课资格
|
||||
this.getTeachingQualify();
|
||||
}else if(tab.name == 'fourth') {// 为开班资源
|
||||
this.getCourseInfo();
|
||||
}if(tab.name == 'five') {// 晋级过程
|
||||
this.teacherUpgradePrecess();
|
||||
}
|
||||
},
|
||||
// 晋级过程
|
||||
teacherUpgradePrecess() {
|
||||
teacherBoeApi.teacherUpgradePrecess(this.id).then(res=>{
|
||||
if(res.status == '200') {
|
||||
this.precessList = res.result.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 未开班资源
|
||||
getCourseInfo() {
|
||||
teacherBoeApi.getCourseInfo(this.id).then(res=>{
|
||||
if(res.status == '200') {
|
||||
this.courseInfoList = res.result.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 授课资格
|
||||
getTeachingQualify() {
|
||||
let data = {
|
||||
id:this.id, // 教师id
|
||||
pageSize:this.qualify.pageSize, // 每页数据条数
|
||||
page:this.qualify.page, // 返回第几页数据
|
||||
}
|
||||
teacherBoeApi.getTeachingQualify(data).then(res=>{
|
||||
if(res.status == '200') {
|
||||
this.qualify.list = res.result.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
qualifySizeChange(val) {
|
||||
this.qualify.pageSize = val
|
||||
this.qualify.page = 1
|
||||
this.getTeachingQualify()
|
||||
},
|
||||
qualifyCurrentChange(val) {
|
||||
this.qualify.page = val
|
||||
this.getTeachingQualify()
|
||||
},
|
||||
editModelTeacher() {
|
||||
let data = {
|
||||
courseId:this.records.row.courseId, // 课程id
|
||||
modId:this.records.row.modId, // 模块id
|
||||
teacherId:this.records.row.teacherId, // 教师id
|
||||
teachingTime:this.records.row.teachingTime, // 授课时间
|
||||
}
|
||||
teacherBoeApi.editModelTeacher(data).then(res=>{
|
||||
if(res.status == '200') {
|
||||
this.$message.success('修改成功');
|
||||
this.dialogVisible = false;
|
||||
this.getCourseScore();
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
// 授课记录
|
||||
getCourseScore() {
|
||||
let data = {
|
||||
id:this.id,// 教师id
|
||||
courseType:this.records.courseType || '0,1,2', // 课程类型:‘1,2’:面授,训练班;‘0’:在线班
|
||||
// pageSize:this.records.pageSize, // 每页数据条数
|
||||
// page:this.records.page, // 返回第几页数据
|
||||
isPage:1, // 是否分页:0分页返回,1:不分页直接返回全部
|
||||
}
|
||||
teacherBoeApi.getCourseScore(data).then(res=>{
|
||||
if(res.status === '200') {
|
||||
this.records.list = res.result.data;
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.records.pageSize = val
|
||||
this.records.page = 1
|
||||
this.getCourseScore()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.records.page = val
|
||||
this.getCourseScore()
|
||||
},
|
||||
getDetail() {
|
||||
//应该是自己系统的教师信息呀
|
||||
// teacherApi.detail(this.newId).then(rs=>{
|
||||
// if(rs.status==200){
|
||||
|
||||
// }
|
||||
// });
|
||||
|
||||
teacherBoeApi.teacherInfo(this.id).then(res => {
|
||||
if (res.status == 200) {
|
||||
const result = res.result;
|
||||
this.form = result;
|
||||
this.synchronization(res.result);
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
synchronization(result) {
|
||||
let param = {
|
||||
id: this.newId,//当前老师记录的id
|
||||
/**因为有可能部分老师没有这个字段,对应返回的teacher_id*/
|
||||
sysId: result.teacher_id,
|
||||
/**因为有可能部分老师没有这个字段*/
|
||||
companyId: result.company_id,
|
||||
companyName: result.company_name,
|
||||
teacherCode: result.teacher_code,
|
||||
/**返回的字段,不知道什么意义*/
|
||||
teacherType: result.teacher_type,
|
||||
userId: result.user_id,
|
||||
userNo: result.user_no,
|
||||
gender: result.gender,
|
||||
teachingTime: result.teaching_time,
|
||||
certification: result.certification,
|
||||
language: result.language,
|
||||
timezone: result.timezone,
|
||||
tsystemId: result.system_id,
|
||||
tsystemName: result.system_name,
|
||||
tlevelId: result.level_id,
|
||||
tlevelName: result.level_name,
|
||||
/**认证人*/
|
||||
certifyby: result.certify_by,
|
||||
/**状态;0:临时;1:正式;2:停用*/
|
||||
pstatus: result.status,
|
||||
/**员工状态 2:正常 3:离职*/
|
||||
pemployeeStatus: result.employee_status,
|
||||
}
|
||||
teacherApi.syncUpdate(param).then(res=>{
|
||||
if(res.status != 200) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -297,6 +549,8 @@ export default {
|
||||
.teacher-details {
|
||||
height: 500px;
|
||||
.one{
|
||||
height: 460px;
|
||||
overflow-y: auto;
|
||||
.el-form-item{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</div>
|
||||
<span class="more"></span>
|
||||
</el-row>
|
||||
<div class="data-content">
|
||||
<div class="data-content" v-if="articleList.list.length > 0">
|
||||
<div :span="24" v-for="(article, aidx) in articleList.list" :key="aidx" class="article-list">
|
||||
<div class="article-info">
|
||||
<!--title-->
|
||||
@@ -77,7 +77,11 @@
|
||||
<div class="pagination-div">
|
||||
<span class="pag-text" @click="loadMore()" v-if="moreState == 1">加载更多</span>
|
||||
<span class="pag-text-msg" v-else-if="moreState == 2">数据加载中</span>
|
||||
<span class="pag-text-msg" v-else-if="moreState == 3">没有更多数据了</span>
|
||||
<span class="pag-text-msg" v-else-if="moreState == 3 && !isSeach">没有更多数据了</span>
|
||||
<span class="pag-text-msg" v-else-if="isSeach">没有查询到相关内容</span>
|
||||
</div>
|
||||
<div v-if="isSeach" style="height:382px">
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
</el-row>
|
||||
@@ -193,6 +197,7 @@ export default {
|
||||
ankingFixed:false,
|
||||
diagSync:false,//控制弹窗
|
||||
// articleList: []
|
||||
isSeach:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -200,7 +205,9 @@ export default {
|
||||
// this.ankingWidth=el_anking.clientWidth;
|
||||
//console.log(el_anking.clientWidth,'clientWidth');
|
||||
this.articleList.keyword = this.$route.query.keyword;
|
||||
|
||||
if(this.articleList.keyword != '') {
|
||||
this.isSeach = true;
|
||||
}
|
||||
this.getArticleList();
|
||||
this.getAnkingData();
|
||||
this.searchterm();
|
||||
@@ -217,6 +224,7 @@ export default {
|
||||
methods: {
|
||||
emitInput(val){
|
||||
this.articleList.keyword = val;
|
||||
this.isSeach =true;
|
||||
this.searchData();
|
||||
},
|
||||
saveSuccess(data){
|
||||
@@ -329,6 +337,7 @@ export default {
|
||||
// portalPageList接口换了,这是原来的
|
||||
apiArticle.findPortal(query).then(res => {
|
||||
if (res.status == 200 && res.result.list.length > 0) {
|
||||
this.isSeach =false;
|
||||
let ids = [];
|
||||
res.result.list.forEach(item => {
|
||||
item.authorInfo = { name: '', avatar: '', orgInfo: '' ,sex:null};
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</el-radio-group> -->
|
||||
</span>
|
||||
</el-row>
|
||||
<div class="data-content">
|
||||
<div class="data-content" v-if="qaList.length > 0">
|
||||
<div :span="24" v-for="(qa, qaidx) in qaList" :key="qaidx" class="qa-list">
|
||||
<div class="qa-info-box">
|
||||
<div class="qa-info">
|
||||
@@ -85,7 +85,11 @@
|
||||
<div class="pagination-div">
|
||||
<span class="pag-text" @click="loadMore()" v-if="moreState == 1">加载更多</span>
|
||||
<span class="pag-text-msg" v-else-if="moreState == 2">数据加载中</span>
|
||||
<span class="pag-text-msg" v-else-if="moreState == 3">没有更多数据了</span>
|
||||
<span class="pag-text-msg" v-else-if="moreState == 3 && !isSeach">没有更多数据了</span>
|
||||
<span class="pag-text-msg" v-else-if="isSeach">没有查询到相关内容</span>
|
||||
</div>
|
||||
<div v-if="isSeach" style="height:382px">
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
</el-row>
|
||||
@@ -215,12 +219,16 @@ export default {
|
||||
//以上是整理后的数据
|
||||
anking: 2, //排行榜
|
||||
ankingList: [],
|
||||
styleControl:2
|
||||
styleControl:2,
|
||||
isSeach:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.queryKeyWord = this.$route.query.keyword;
|
||||
this.queryConditions.keyword = this.queryKeyWord;
|
||||
if(this.queryConditions.keyword != '') {
|
||||
this.isSeach = true;
|
||||
}
|
||||
this.getQaData(true);
|
||||
this.getAnkingData();
|
||||
window.addEventListener("scroll", this.handleScroll);
|
||||
@@ -232,6 +240,7 @@ export default {
|
||||
methods: {
|
||||
emitInput(val){
|
||||
this.queryKeyWord = val;
|
||||
this.isSeach =true;
|
||||
this.search();
|
||||
},
|
||||
//发布回答
|
||||
@@ -373,6 +382,7 @@ export default {
|
||||
.potallist(this.queryConditions)
|
||||
.then(res => {
|
||||
if (res.status == 200 && res.result.list.length > 0) {
|
||||
this.isSeach = false;
|
||||
res.result.list.forEach(item => {
|
||||
item.authorInfo = { aid: '', name: '', orgInfo: '', avatar: '',sex:null, };
|
||||
});
|
||||
|
||||
@@ -110,6 +110,7 @@ module.exports = {
|
||||
// 使用代理
|
||||
// 172.16.6.175
|
||||
// 114.115.162.187 测试环境
|
||||
// 192.168.0.107 晋宇
|
||||
proxy: {
|
||||
'/systemapi': {
|
||||
// 目标代理服务器地址
|
||||
|
||||
Reference in New Issue
Block a user