Commit d1b0d129 authored by zhengke's avatar zhengke

1

parents cd2ec11f 4131000f
...@@ -67,28 +67,17 @@ ...@@ -67,28 +67,17 @@
import { import {
queryClassPage, queryClassPage,
queryClassStatusList, queryClassStatusList,
saveClassStatus, //修改班级状态
} from '../../api/course/class'; } from '../../api/course/class';
//获取校区列表 //获取校区列表
import { import {
getSchoolDropdown, getSchoolDropdown,
deleteClass
} from '../../api/school/index'; } from '../../api/school/index';
import classForm from '../../components/course/class-form';
import classinfoForm from '../../components/course/classinfo-form';
import othercourseForm from '../../components/course/othercourse-form';
import classconflictForm from '../../components/course/classconflict-form';
import classlist from '../../components/course/classlist'; import classlist from '../../components/course/classlist';
export default { export default {
meta: { meta: {
title: "班级管理" title: "班级管理"
}, },
components: { components: {
classForm,
classinfoForm,
othercourseForm,
classconflictForm,
classlist classlist
}, },
data() { data() {
...@@ -183,12 +172,6 @@ ...@@ -183,12 +172,6 @@
//关联校区列表 //关联校区列表
schoolList: [], schoolList: [],
pageCount: 0, pageCount: 0,
isShowEdit: false,
statusMsg: {
ClassId: 0,
ClassStatus: 0
},
isShowConflict: false, //是否显示上课计划冲突
ClassId: 0, //传入到冲突表单参数 ClassId: 0, //传入到冲突表单参数
//权限判断 //权限判断
authObj: { authObj: {
...@@ -199,9 +182,10 @@ ...@@ -199,9 +182,10 @@
isShowLessonCost: true, //显示月度课耗 isShowLessonCost: true, //显示月度课耗
isShowStatusChange: true, //显示状态变更 isShowStatusChange: true, //显示状态变更
isShowStudentMenu: true, //显示未完成学员名单 isShowStudentMenu: true, //显示未完成学员名单
isShowApply:true //显示调课申请 isShowApply: true //显示调课申请
}, },
loading:false loading:false
} }
}, },
created() { created() {
...@@ -215,100 +199,6 @@ ...@@ -215,100 +199,6 @@
this.getClassList(); this.getClassList();
}, },
methods: { methods: {
closeClassConflictForm() {
this.isShowConflict = false;
},
//删除班级
removeClass(item, status) {
let delMsg = {
ClassId: item.ClassId,
Status: status
};
var message = "是否要删除该班级?";
if (status == 0) {
message = "是否要恢复该班级?";
}
this.$q.dialog({
title: '提示信息',
message: message,
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
deleteClass(delMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '删除成功!',
position: 'top'
})
this.getClassList();
} else {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: res.Message,
position: 'top'
})
}
})
}).onCancel(() => {
});
},
//当前点击的班级
getClassItem(item) {
this.isShowEdit = true;
var Obj = JSON.parse(JSON.stringify(item));
this.statusMsg.ClassStatus = Obj.ClassStatus;
this.statusMsg.ClassId = Obj.ClassId;
},
//更新班级状态
setClassStatus() {
saveClassStatus(this.statusMsg).then(res => {
this.isShowEdit = false;
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '设置成功!',
position: 'top'
})
this.getClassList();
} else {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: res.Message,
position: 'top'
})
}
});
},
gotoOrder(item) {
var tempStr = '/course/classorder?ClassId=' + item.ClassId;
this.$router.push({
path: tempStr
});
},
//跳转到收支明细
goPayment(item) {
this.$router.push({
path: 'paymentDetail',
query: {
ClassId: item.ClassId,
School_Id: item.School_Id,
ClassName: encodeURI(item.ClassName),
blank: 'y'
}
})
},
//获取校区列表 //获取校区列表
getSchool() { getSchool() {
getSchoolDropdown({}).then(res => { getSchoolDropdown({}).then(res => {
...@@ -352,27 +242,8 @@ ...@@ -352,27 +242,8 @@
}, },
//刷新页面 //刷新页面
refreshPage() { refreshPage() {
this.isShowClassForm = false;
this.getClassList(); this.getClassList();
}, },
GetFirst(val) {
if (val) {
return val.substr(0, 1);
}
},
//获取进度条
getProgress(num, total) {
if (num == 0 || total == 0) {
return 0;
}
return (Math.round(num / total * 100) / 100.00);
},
//跳转到课程大纲
goChapter(CouseId) {
this.OpenNewUrl('/course/chapter', {
CourseId: CouseId
});
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment