From c3a61d1272c2da0b568e7c5d4898cb323a5845dc Mon Sep 17 00:00:00 2001 From: daihh Date: Mon, 6 Jun 2022 20:43:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/manage/TeacherList.vue | 58 ++++++++++++----------------- src/views/manage/teacherDetails.vue | 25 +++++++------ 2 files changed, 37 insertions(+), 46 deletions(-) diff --git a/src/views/manage/TeacherList.vue b/src/views/manage/TeacherList.vue index d51b232f..57e2bf90 100644 --- a/src/views/manage/TeacherList.vue +++ b/src/views/manage/TeacherList.vue @@ -3,17 +3,17 @@
- +
- +
-
+
@@ -186,10 +186,10 @@ data(){ return { query:{ - tSystemId:'', - tSystemIds:'', - tLevelId:'', - queryName:'', + tsystemId:'', + tsystemIds:'', + tlevelId:'', + name:'', salaryId:'', pageIndex: 1, pageSize: 10, @@ -232,7 +232,6 @@ ] }, selectList:[], - queryName:"", dialogVisible:false, tableData:[], searchName:null, @@ -349,10 +348,9 @@ this.levelData=array; }, reset (){ - this.query.queryName = ''; - this.query.tSystemId='', - this.query.tLevelId='', - this.query.queryName='', + this.query.name = ''; + this.query.tsystemId='', + this.query.tlevelId='', this.query.salaryId='', this.query.pageIndex= 1, this.query.pageSize= 10, @@ -588,15 +586,8 @@ }, loadData(pageIndex) { this.query.pageIndex = pageIndex; - this.query.tSystemIds = this.query.tSystemId || this.teacherSystemids.join(); - teacherApi - .page( - this.query - // pageIndex: this.pageIndex, - // pageSize: this.pageSize, - // name: this.queryName, - ) - .then((res) => { + 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; @@ -667,33 +658,32 @@ }) 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'; diff --git a/src/views/manage/teacherDetails.vue b/src/views/manage/teacherDetails.vue index 38d3e7a9..20504d32 100644 --- a/src/views/manage/teacherDetails.vue +++ b/src/views/manage/teacherDetails.vue @@ -26,7 +26,7 @@ {{formatSeconds(form.default_teaching_time)}} - + {{form.system_name}} @@ -52,7 +52,7 @@ - + @@ -374,8 +374,8 @@ export default { type: 'warning' }).then(() => { let data = { - courseId:row.courseId, // 课程id - modId:row.modId, // 模块id + courseId:row.courseId, // 课程id + modId:row.modId, // 模块id teacherId:row.teacherId, // 教师id remark:'', // 备注 } @@ -387,17 +387,17 @@ export default { message: '删除成功!' }); } else { - this.$message.error(res.message); + this.$message.error(res.message); } }) - + }).catch(() => { this.$message({ type: 'info', message: '已取消删除' - }); + }); }); - + }, recordsUpdate(row) { this.records.row = row; @@ -454,8 +454,8 @@ export default { }, editModelTeacher() { let data = { - courseId:this.records.row.courseId, // 课程id - modId:this.records.row.modId, // 模块id + courseId:this.records.row.courseId, // 课程id + modId:this.records.row.modId, // 模块id teacherId:this.records.row.teacherId, // 教师id teachingTime:this.records.row.teachingTime, // 授课时间 } @@ -495,13 +495,14 @@ export default { this.getCourseScore() }, getDetail() { + //应该是自己系统的教师信息呀 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); + this.$message.error(res.message); } }); }, @@ -539,7 +540,7 @@ export default { console.log(res) } }) - } + } } };