mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-18 19:16:37 +08:00
commit:权限模块新增分配详情功能
commit:修改前端样式
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
<el-scrollbar class="custom-scroll" style="height: calc(620px - 50px);">
|
||||
<el-row :gutter="20">
|
||||
<el-col class="table-box" :span="24">
|
||||
<el-table ref="StudentClass" :data="formClass.StudentClass.impl.dataList" size="mini" @sort-change="formClass.StudentClass.impl.onSortChange"
|
||||
<el-table ref="studentClass" :data="formClass.StudentClass.impl.dataList" size="mini" @sort-change="formClass.StudentClass.impl.onSortChange"
|
||||
header-cell-class-name="table-header-gray"
|
||||
highlight-current-row @current-change="formClass.StudentClass.impl.currentRowChange">
|
||||
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="formClass.StudentClass.impl.getTableIndex" />
|
||||
@@ -92,7 +92,7 @@
|
||||
<el-scrollbar class="custom-scroll" style="height: calc(300px - 50px);">
|
||||
<el-row :gutter="20">
|
||||
<el-col class="table-box" :span="24">
|
||||
<el-table ref="Course" :data="formClass.Course.impl.dataList" size="mini" @sort-change="formClass.Course.impl.onSortChange"
|
||||
<el-table ref="course" :data="formClass.Course.impl.dataList" size="mini" @sort-change="formClass.Course.impl.onSortChange"
|
||||
header-cell-class-name="table-header-gray">
|
||||
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="formClass.Course.impl.getTableIndex" />
|
||||
<el-table-column label="课程名称" prop="courseName">
|
||||
@@ -140,7 +140,7 @@
|
||||
<el-scrollbar class="custom-scroll" style="height: calc(300px - 50px);">
|
||||
<el-row :gutter="20">
|
||||
<el-col class="table-box" :span="24">
|
||||
<el-table ref="Student" :data="formClass.Student.impl.dataList" size="mini" @sort-change="formClass.Student.impl.onSortChange"
|
||||
<el-table ref="student" :data="formClass.Student.impl.dataList" size="mini" @sort-change="formClass.Student.impl.onSortChange"
|
||||
header-cell-class-name="table-header-gray">
|
||||
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="formClass.Student.impl.getTableIndex" />
|
||||
<el-table-column label="学生姓名" prop="studentName">
|
||||
@@ -234,11 +234,14 @@ export default {
|
||||
schoolId: undefined,
|
||||
className: undefined
|
||||
},
|
||||
classCourseCard: {
|
||||
isInit: false
|
||||
},
|
||||
schoolId: {
|
||||
impl: new DropdownWidget(this.loadSchoolIdDropdownList)
|
||||
},
|
||||
classCourseCard: {
|
||||
isInit: false
|
||||
Student: {
|
||||
impl: new TableWidget(this.loadStudentData, this.loadStudentVerify, true, false)
|
||||
},
|
||||
StudentClass: {
|
||||
impl: new TableWidget(this.loadStudentClassData, this.loadStudentClassVerify, true, true, 'createTime', 1)
|
||||
@@ -246,9 +249,6 @@ export default {
|
||||
Course: {
|
||||
impl: new TableWidget(this.loadCourseData, this.loadCourseVerify, true, false, 'createTime', 1)
|
||||
},
|
||||
Student: {
|
||||
impl: new TableWidget(this.loadStudentData, this.loadStudentVerify, true, false)
|
||||
},
|
||||
classStudentCard: {
|
||||
isInit: false
|
||||
},
|
||||
@@ -263,6 +263,38 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 班级学生数据获取函数,返回Promise
|
||||
*/
|
||||
loadStudentData (params) {
|
||||
if (
|
||||
(this.formClass.StudentClass.impl.currentRow || {}).classId == null
|
||||
) {
|
||||
this.formClass.Student.impl.clearTable();
|
||||
return Promise.reject();
|
||||
}
|
||||
if (params == null) params = {};
|
||||
params = {
|
||||
...params,
|
||||
classId: (this.formClass.StudentClass.impl.currentRow || {}).classId
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
StudentClassController.listClassStudent(this, params).then(res => {
|
||||
resolve({
|
||||
dataList: res.data.dataList,
|
||||
totalCount: res.data.totalCount
|
||||
});
|
||||
}).catch(e => {
|
||||
reject(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 班级学生数据获取检测函数,返回true正常获取数据,返回false停止获取数据
|
||||
*/
|
||||
loadStudentVerify () {
|
||||
return true;
|
||||
},
|
||||
/**
|
||||
* 班级数据数据获取函数,返回Promise
|
||||
*/
|
||||
@@ -305,8 +337,10 @@ export default {
|
||||
* 班级课程数据获取函数,返回Promise
|
||||
*/
|
||||
loadCourseData (params) {
|
||||
if (this.formClass.StudentClass.impl.currentRow == null) {
|
||||
this.formAdvanceClass.Course.impl.clearTable();
|
||||
if (
|
||||
(this.formClass.StudentClass.impl.currentRow || {}).classId == null
|
||||
) {
|
||||
this.formClass.Course.impl.clearTable();
|
||||
return Promise.reject();
|
||||
}
|
||||
if (params == null) params = {};
|
||||
@@ -331,36 +365,6 @@ export default {
|
||||
loadCourseVerify () {
|
||||
return true;
|
||||
},
|
||||
/**
|
||||
* 班级学生数据获取函数,返回Promise
|
||||
*/
|
||||
loadStudentData (params) {
|
||||
if (this.formClass.StudentClass.impl.currentRow == null) {
|
||||
this.formAdvanceClass.Student.impl.clearTable();
|
||||
return Promise.reject();
|
||||
}
|
||||
if (params == null) params = {};
|
||||
params = {
|
||||
...params,
|
||||
classId: (this.formClass.StudentClass.impl.currentRow || {}).classId
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
StudentClassController.listClassStudent(this, params).then(res => {
|
||||
resolve({
|
||||
dataList: res.data.dataList,
|
||||
totalCount: res.data.totalCount
|
||||
});
|
||||
}).catch(e => {
|
||||
reject(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 班级学生数据获取检测函数,返回true正常获取数据,返回false停止获取数据
|
||||
*/
|
||||
loadStudentVerify () {
|
||||
return true;
|
||||
},
|
||||
/**
|
||||
* 所属校区下拉数据获取函数
|
||||
*/
|
||||
@@ -419,6 +423,11 @@ export default {
|
||||
* 更新班级管理
|
||||
*/
|
||||
refreshFormClass (reloadData = false) {
|
||||
if (reloadData) {
|
||||
this.formClass.Student.impl.refreshTable(true, 1);
|
||||
} else {
|
||||
this.formClass.Student.impl.refreshTable();
|
||||
}
|
||||
if (reloadData) {
|
||||
this.formClass.StudentClass.impl.refreshTable(true, 1);
|
||||
} else {
|
||||
@@ -429,11 +438,6 @@ export default {
|
||||
} else {
|
||||
this.formClass.Course.impl.refreshTable();
|
||||
}
|
||||
if (reloadData) {
|
||||
this.formClass.Student.impl.refreshTable(true, 1);
|
||||
} else {
|
||||
this.formClass.Student.impl.refreshTable();
|
||||
}
|
||||
if (!this.formClass.isInit) {
|
||||
// 初始化下拉数据
|
||||
}
|
||||
@@ -457,6 +461,12 @@ export default {
|
||||
* 删除
|
||||
*/
|
||||
onDeleteClick (row) {
|
||||
if (
|
||||
row.classId == null
|
||||
) {
|
||||
this.$message.error('请求失败,发现必填参数为空!');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
classId: row.classId
|
||||
};
|
||||
@@ -472,6 +482,13 @@ export default {
|
||||
* 移除
|
||||
*/
|
||||
onDeleteClassCourseClick (row) {
|
||||
if (
|
||||
(this.formClass.StudentClass.impl.currentRow || {}).classId == null ||
|
||||
row.courseId == null
|
||||
) {
|
||||
this.$message.error('请求失败,发现必填参数为空!');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
classId: (this.formClass.StudentClass.impl.currentRow || {}).classId,
|
||||
courseId: row.courseId
|
||||
@@ -488,6 +505,13 @@ export default {
|
||||
* 移除
|
||||
*/
|
||||
onDeleteClassStudentClick (row) {
|
||||
if (
|
||||
(this.formClass.StudentClass.impl.currentRow || {}).classId == null ||
|
||||
row.studentId == null
|
||||
) {
|
||||
this.$message.error('请求失败,发现必填参数为空!');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
classId: (this.formClass.StudentClass.impl.currentRow || {}).classId,
|
||||
studentId: row.studentId
|
||||
@@ -539,6 +563,34 @@ export default {
|
||||
},
|
||||
initFormData () {
|
||||
},
|
||||
/**
|
||||
* 重置表单数据
|
||||
*/
|
||||
resetFormData () {
|
||||
this.formData = {
|
||||
StudentClass: {
|
||||
classId: undefined,
|
||||
className: undefined,
|
||||
schoolId: undefined,
|
||||
leaderId: undefined,
|
||||
finishClassHour: undefined,
|
||||
classLevel: undefined,
|
||||
createUserId: undefined,
|
||||
createTime: undefined,
|
||||
status: undefined,
|
||||
course: {
|
||||
classCourse: {
|
||||
classId: undefined,
|
||||
courseId: undefined,
|
||||
courseOrder: undefined
|
||||
}
|
||||
},
|
||||
student: {
|
||||
},
|
||||
isDatasourceInit: false
|
||||
}
|
||||
}
|
||||
},
|
||||
formInit () {
|
||||
this.refreshFormClass();
|
||||
}
|
||||
@@ -564,8 +616,8 @@ export default {
|
||||
// 班级数据选择行数据变化
|
||||
'formClass.StudentClass.impl.currentRow': {
|
||||
handler (newValue) {
|
||||
this.formClass.Course.impl.refreshTable(true, 1);
|
||||
this.formClass.Student.impl.refreshTable(true, 1);
|
||||
this.formClass.Course.impl.refreshTable(true, 1);
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-table ref="Course" :data="formCourse.Course.impl.dataList" size="mini" @sort-change="formCourse.Course.impl.onSortChange"
|
||||
<el-table ref="course" :data="formCourse.Course.impl.dataList" size="mini" @sort-change="formCourse.Course.impl.onSortChange"
|
||||
header-cell-class-name="table-header-gray">
|
||||
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="formCourse.Course.impl.getTableIndex" />
|
||||
<el-table-column label="课程名称" prop="courseName">
|
||||
@@ -281,6 +281,12 @@ export default {
|
||||
* 删除
|
||||
*/
|
||||
onDeleteClick (row) {
|
||||
if (
|
||||
row.courseId == null
|
||||
) {
|
||||
this.$message.error('请求失败,发现必填参数为空!');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
courseId: row.courseId
|
||||
};
|
||||
|
||||
@@ -301,6 +301,26 @@ export default {
|
||||
},
|
||||
initFormData () {
|
||||
},
|
||||
/**
|
||||
* 重置表单数据
|
||||
*/
|
||||
resetFormData () {
|
||||
this.formData = {
|
||||
CourseTransStats: {
|
||||
statsId: undefined,
|
||||
statsDate: undefined,
|
||||
subjectId: undefined,
|
||||
gradeId: undefined,
|
||||
gradeName: undefined,
|
||||
courseId: undefined,
|
||||
courseName: undefined,
|
||||
studentAttendCount: undefined,
|
||||
studentFlowerAmount: undefined,
|
||||
studentFlowerCount: undefined,
|
||||
isDatasourceInit: false
|
||||
}
|
||||
}
|
||||
},
|
||||
formInit () {
|
||||
this.refreshFormCourseStats();
|
||||
}
|
||||
|
||||
@@ -223,6 +223,16 @@ export default {
|
||||
onAddClick () {
|
||||
this.$refs.formCreateClass.validate((valid) => {
|
||||
if (!valid) return;
|
||||
if (
|
||||
this.formData.StudentClass.className == null ||
|
||||
this.formData.StudentClass.schoolId == null ||
|
||||
this.formData.StudentClass.leaderId == null ||
|
||||
this.formData.StudentClass.finishClassHour == null ||
|
||||
this.formData.StudentClass.classLevel == null
|
||||
) {
|
||||
this.$message.error('请求失败,发现必填参数为空!');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
studentClass: {
|
||||
className: this.formData.StudentClass.className,
|
||||
@@ -241,6 +251,34 @@ export default {
|
||||
},
|
||||
initFormData () {
|
||||
},
|
||||
/**
|
||||
* 重置表单数据
|
||||
*/
|
||||
resetFormData () {
|
||||
this.formData = {
|
||||
StudentClass: {
|
||||
classId: undefined,
|
||||
className: undefined,
|
||||
schoolId: undefined,
|
||||
leaderId: undefined,
|
||||
finishClassHour: undefined,
|
||||
classLevel: undefined,
|
||||
createUserId: undefined,
|
||||
createTime: undefined,
|
||||
status: undefined,
|
||||
course: {
|
||||
classCourse: {
|
||||
classId: undefined,
|
||||
courseId: undefined,
|
||||
courseOrder: undefined
|
||||
}
|
||||
},
|
||||
student: {
|
||||
},
|
||||
isDatasourceInit: false
|
||||
}
|
||||
}
|
||||
},
|
||||
formInit () {
|
||||
this.refreshFormCreateClass();
|
||||
}
|
||||
|
||||
@@ -249,6 +249,18 @@ export default {
|
||||
onAddClick () {
|
||||
this.$refs.formCreateCourse.validate((valid) => {
|
||||
if (!valid) return;
|
||||
if (
|
||||
this.formData.Course.courseName == null ||
|
||||
this.formData.Course.price == null ||
|
||||
this.formData.Course.difficulty == null ||
|
||||
this.formData.Course.gradeId == null ||
|
||||
this.formData.Course.subjectId == null ||
|
||||
this.formData.Course.classHour == null ||
|
||||
this.formData.Course.pictureUrl == null
|
||||
) {
|
||||
this.$message.error('请求失败,发现必填参数为空!');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
course: {
|
||||
courseName: this.formData.Course.courseName,
|
||||
@@ -297,6 +309,28 @@ export default {
|
||||
onUploadLimit (files, fileList) {
|
||||
this.$message.error('已经超出最大上传个数限制');
|
||||
},
|
||||
/**
|
||||
* 重置表单数据
|
||||
*/
|
||||
resetFormData () {
|
||||
this.formData = {
|
||||
Course: {
|
||||
courseId: undefined,
|
||||
courseName: undefined,
|
||||
price: undefined,
|
||||
description: undefined,
|
||||
difficulty: undefined,
|
||||
gradeId: undefined,
|
||||
subjectId: undefined,
|
||||
classHour: undefined,
|
||||
pictureUrl: undefined,
|
||||
createUserId: undefined,
|
||||
createTime: undefined,
|
||||
updateTime: undefined,
|
||||
isDatasourceInit: false
|
||||
}
|
||||
}
|
||||
},
|
||||
formInit () {
|
||||
this.refreshFormCreateCourse();
|
||||
}
|
||||
|
||||
@@ -168,6 +168,14 @@ export default {
|
||||
onAddClick () {
|
||||
this.$refs.formCreateSchool.validate((valid) => {
|
||||
if (!valid) return;
|
||||
if (
|
||||
this.formData.SchoolInfo.schoolName == null ||
|
||||
this.formData.SchoolInfo.provinceId == null ||
|
||||
this.formData.SchoolInfo.cityId == null
|
||||
) {
|
||||
this.$message.error('请求失败,发现必填参数为空!');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
schoolInfo: {
|
||||
schoolName: this.formData.SchoolInfo.schoolName,
|
||||
@@ -184,6 +192,20 @@ export default {
|
||||
},
|
||||
initFormData () {
|
||||
},
|
||||
/**
|
||||
* 重置表单数据
|
||||
*/
|
||||
resetFormData () {
|
||||
this.formData = {
|
||||
SchoolInfo: {
|
||||
schoolId: undefined,
|
||||
schoolName: undefined,
|
||||
provinceId: undefined,
|
||||
cityId: undefined,
|
||||
isDatasourceInit: false
|
||||
}
|
||||
}
|
||||
},
|
||||
formInit () {
|
||||
this.refreshFormCreateSchool();
|
||||
}
|
||||
|
||||
@@ -390,6 +390,21 @@ export default {
|
||||
onAddClick () {
|
||||
this.$refs.formCreateStudent.validate((valid) => {
|
||||
if (!valid) return;
|
||||
if (
|
||||
this.formData.Student.loginMobile == null ||
|
||||
this.formData.Student.studentName == null ||
|
||||
this.formData.Student.provinceId == null ||
|
||||
this.formData.Student.cityId == null ||
|
||||
this.formData.Student.districtId == null ||
|
||||
this.formData.Student.gender == null ||
|
||||
this.formData.Student.birthday == null ||
|
||||
this.formData.Student.experienceLevel == null ||
|
||||
this.formData.Student.gradeId == null ||
|
||||
this.formData.Student.schoolId == null
|
||||
) {
|
||||
this.$message.error('请求失败,发现必填参数为空!');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
student: {
|
||||
loginMobile: this.formData.Student.loginMobile,
|
||||
@@ -416,6 +431,31 @@ export default {
|
||||
},
|
||||
initFormData () {
|
||||
},
|
||||
/**
|
||||
* 重置表单数据
|
||||
*/
|
||||
resetFormData () {
|
||||
this.formData = {
|
||||
Student: {
|
||||
studentId: undefined,
|
||||
loginMobile: undefined,
|
||||
studentName: undefined,
|
||||
provinceId: undefined,
|
||||
cityId: undefined,
|
||||
districtId: undefined,
|
||||
gender: undefined,
|
||||
birthday: undefined,
|
||||
experienceLevel: undefined,
|
||||
totalCoin: undefined,
|
||||
leftCoin: undefined,
|
||||
gradeId: undefined,
|
||||
schoolId: undefined,
|
||||
registerTime: undefined,
|
||||
status: undefined,
|
||||
isDatasourceInit: false
|
||||
}
|
||||
}
|
||||
},
|
||||
formInit () {
|
||||
this.refreshFormCreateStudent();
|
||||
}
|
||||
|
||||
@@ -228,6 +228,17 @@ export default {
|
||||
onUpdateClick () {
|
||||
this.$refs.formEditClass.validate((valid) => {
|
||||
if (!valid) return;
|
||||
if (
|
||||
this.classId == null ||
|
||||
this.formData.StudentClass.className == null ||
|
||||
this.formData.StudentClass.schoolId == null ||
|
||||
this.formData.StudentClass.leaderId == null ||
|
||||
this.formData.StudentClass.finishClassHour == null ||
|
||||
this.formData.StudentClass.classLevel == null
|
||||
) {
|
||||
this.$message.error('请求失败,发现必填参数为空!');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
studentClass: {
|
||||
classId: this.classId,
|
||||
@@ -251,14 +262,27 @@ export default {
|
||||
loadStudentClassData () {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!this.formData.StudentClass.isDatasourceInit) {
|
||||
if (
|
||||
this.classId == null
|
||||
) {
|
||||
this.resetFormData();
|
||||
reject();
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
classId: this.classId
|
||||
};
|
||||
StudentClassController.view(this, params).then(res => {
|
||||
this.formData.StudentClass = {...res.data, isDatasourceInit: true};
|
||||
if (this.formData.StudentClass.classLevelDictMap) this.formEditClass.classLevel.impl.dropdownList = [this.formData.StudentClass.classLevelDictMap];
|
||||
if (this.formData.StudentClass.schoolIdDictMap) this.formEditClass.schoolId.impl.dropdownList = [this.formData.StudentClass.schoolIdDictMap];
|
||||
if (this.formData.StudentClass.leaderIdDictMap) this.formEditClass.leaderId.impl.dropdownList = [this.formData.StudentClass.leaderIdDictMap];
|
||||
if (this.formData.StudentClass.classLevelDictMap && this.formEditClass.classLevel.impl.dirty) {
|
||||
this.formEditClass.classLevel.impl.dropdownList = [this.formData.StudentClass.classLevelDictMap];
|
||||
}
|
||||
if (this.formData.StudentClass.schoolIdDictMap && this.formEditClass.schoolId.impl.dirty) {
|
||||
this.formEditClass.schoolId.impl.dropdownList = [this.formData.StudentClass.schoolIdDictMap];
|
||||
}
|
||||
if (this.formData.StudentClass.leaderIdDictMap && this.formEditClass.leaderId.impl.dirty) {
|
||||
this.formEditClass.leaderId.impl.dropdownList = [this.formData.StudentClass.leaderIdDictMap];
|
||||
}
|
||||
resolve();
|
||||
}).catch(e => {
|
||||
reject();
|
||||
@@ -270,6 +294,34 @@ export default {
|
||||
},
|
||||
initFormData () {
|
||||
},
|
||||
/**
|
||||
* 重置表单数据
|
||||
*/
|
||||
resetFormData () {
|
||||
this.formData = {
|
||||
StudentClass: {
|
||||
classId: undefined,
|
||||
className: undefined,
|
||||
schoolId: undefined,
|
||||
leaderId: undefined,
|
||||
finishClassHour: undefined,
|
||||
classLevel: undefined,
|
||||
createUserId: undefined,
|
||||
createTime: undefined,
|
||||
status: undefined,
|
||||
course: {
|
||||
classCourse: {
|
||||
classId: undefined,
|
||||
courseId: undefined,
|
||||
courseOrder: undefined
|
||||
}
|
||||
},
|
||||
student: {
|
||||
},
|
||||
isDatasourceInit: false
|
||||
}
|
||||
}
|
||||
},
|
||||
formInit () {
|
||||
this.refreshFormEditClass();
|
||||
}
|
||||
|
||||
@@ -108,6 +108,14 @@ export default {
|
||||
* 保存
|
||||
*/
|
||||
onUpdateClassCourseClick () {
|
||||
if (
|
||||
this.classId == null ||
|
||||
this.courseId == null ||
|
||||
this.formData.StudentClass.course.classCourse.courseOrder == null
|
||||
) {
|
||||
this.$message.error('请求失败,发现必填参数为空!');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
classCourse: {
|
||||
classId: this.classId,
|
||||
@@ -127,6 +135,14 @@ export default {
|
||||
loadStudentClassData () {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!this.formData.StudentClass.isDatasourceInit) {
|
||||
if (
|
||||
this.classId == null ||
|
||||
this.courseId == null
|
||||
) {
|
||||
this.resetFormData();
|
||||
reject();
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
classId: this.classId,
|
||||
courseId: this.courseId
|
||||
@@ -144,6 +160,34 @@ export default {
|
||||
},
|
||||
initFormData () {
|
||||
},
|
||||
/**
|
||||
* 重置表单数据
|
||||
*/
|
||||
resetFormData () {
|
||||
this.formData = {
|
||||
StudentClass: {
|
||||
classId: undefined,
|
||||
className: undefined,
|
||||
schoolId: undefined,
|
||||
leaderId: undefined,
|
||||
finishClassHour: undefined,
|
||||
classLevel: undefined,
|
||||
createUserId: undefined,
|
||||
createTime: undefined,
|
||||
status: undefined,
|
||||
course: {
|
||||
classCourse: {
|
||||
classId: undefined,
|
||||
courseId: undefined,
|
||||
courseOrder: undefined
|
||||
}
|
||||
},
|
||||
student: {
|
||||
},
|
||||
isDatasourceInit: false
|
||||
}
|
||||
}
|
||||
},
|
||||
formInit () {
|
||||
this.refreshFormEditClassCourseOrder();
|
||||
}
|
||||
|
||||
@@ -254,6 +254,19 @@ export default {
|
||||
onUpdateClick () {
|
||||
this.$refs.formEditCourse.validate((valid) => {
|
||||
if (!valid) return;
|
||||
if (
|
||||
this.courseId == null ||
|
||||
this.formData.Course.courseName == null ||
|
||||
this.formData.Course.price == null ||
|
||||
this.formData.Course.difficulty == null ||
|
||||
this.formData.Course.gradeId == null ||
|
||||
this.formData.Course.subjectId == null ||
|
||||
this.formData.Course.classHour == null ||
|
||||
this.formData.Course.pictureUrl == null
|
||||
) {
|
||||
this.$message.error('请求失败,发现必填参数为空!');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
course: {
|
||||
courseId: this.courseId,
|
||||
@@ -280,14 +293,27 @@ export default {
|
||||
loadCourseData () {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!this.formData.Course.isDatasourceInit) {
|
||||
if (
|
||||
this.courseId == null
|
||||
) {
|
||||
this.resetFormData();
|
||||
reject();
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
courseId: this.courseId
|
||||
};
|
||||
CourseController.view(this, params).then(res => {
|
||||
this.formData.Course = {...res.data, isDatasourceInit: true};
|
||||
if (this.formData.Course.difficultyDictMap) this.formEditCourse.difficulty.impl.dropdownList = [this.formData.Course.difficultyDictMap];
|
||||
if (this.formData.Course.gradeIdDictMap) this.formEditCourse.gradeId.impl.dropdownList = [this.formData.Course.gradeIdDictMap];
|
||||
if (this.formData.Course.subjectIdDictMap) this.formEditCourse.subjectId.impl.dropdownList = [this.formData.Course.subjectIdDictMap];
|
||||
if (this.formData.Course.difficultyDictMap && this.formEditCourse.difficulty.impl.dirty) {
|
||||
this.formEditCourse.difficulty.impl.dropdownList = [this.formData.Course.difficultyDictMap];
|
||||
}
|
||||
if (this.formData.Course.gradeIdDictMap && this.formEditCourse.gradeId.impl.dirty) {
|
||||
this.formEditCourse.gradeId.impl.dropdownList = [this.formData.Course.gradeIdDictMap];
|
||||
}
|
||||
if (this.formData.Course.subjectIdDictMap && this.formEditCourse.subjectId.impl.dirty) {
|
||||
this.formEditCourse.subjectId.impl.dropdownList = [this.formData.Course.subjectIdDictMap];
|
||||
}
|
||||
let pictureUrlDownloadParams = {
|
||||
courseId: this.formData.Course.courseId,
|
||||
fieldName: 'pictureUrl',
|
||||
@@ -332,6 +358,28 @@ export default {
|
||||
onUploadLimit (files, fileList) {
|
||||
this.$message.error('已经超出最大上传个数限制');
|
||||
},
|
||||
/**
|
||||
* 重置表单数据
|
||||
*/
|
||||
resetFormData () {
|
||||
this.formData = {
|
||||
Course: {
|
||||
courseId: undefined,
|
||||
courseName: undefined,
|
||||
price: undefined,
|
||||
description: undefined,
|
||||
difficulty: undefined,
|
||||
gradeId: undefined,
|
||||
subjectId: undefined,
|
||||
classHour: undefined,
|
||||
pictureUrl: undefined,
|
||||
createUserId: undefined,
|
||||
createTime: undefined,
|
||||
updateTime: undefined,
|
||||
isDatasourceInit: false
|
||||
}
|
||||
}
|
||||
},
|
||||
formInit () {
|
||||
this.refreshFormEditCourse();
|
||||
}
|
||||
|
||||
@@ -173,6 +173,15 @@ export default {
|
||||
onUpdateClick () {
|
||||
this.$refs.formEditSchool.validate((valid) => {
|
||||
if (!valid) return;
|
||||
if (
|
||||
this.schoolId == null ||
|
||||
this.formData.SchoolInfo.schoolName == null ||
|
||||
this.formData.SchoolInfo.provinceId == null ||
|
||||
this.formData.SchoolInfo.cityId == null
|
||||
) {
|
||||
this.$message.error('请求失败,发现必填参数为空!');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
schoolInfo: {
|
||||
schoolId: this.schoolId,
|
||||
@@ -194,13 +203,24 @@ export default {
|
||||
loadSchoolInfoData () {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!this.formData.SchoolInfo.isDatasourceInit) {
|
||||
if (
|
||||
this.schoolId == null
|
||||
) {
|
||||
this.resetFormData();
|
||||
reject();
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
schoolId: this.schoolId
|
||||
};
|
||||
SchoolInfoController.view(this, params).then(res => {
|
||||
this.formData.SchoolInfo = {...res.data, isDatasourceInit: true};
|
||||
if (this.formData.SchoolInfo.provinceIdDictMap) this.formEditSchool.provinceId.impl.dropdownList = [this.formData.SchoolInfo.provinceIdDictMap];
|
||||
if (this.formData.SchoolInfo.cityIdDictMap) this.formEditSchool.cityId.impl.dropdownList = [this.formData.SchoolInfo.cityIdDictMap];
|
||||
if (this.formData.SchoolInfo.provinceIdDictMap && this.formEditSchool.provinceId.impl.dirty) {
|
||||
this.formEditSchool.provinceId.impl.dropdownList = [this.formData.SchoolInfo.provinceIdDictMap];
|
||||
}
|
||||
if (this.formData.SchoolInfo.cityIdDictMap && this.formEditSchool.cityId.impl.dirty) {
|
||||
this.formEditSchool.cityId.impl.dropdownList = [this.formData.SchoolInfo.cityIdDictMap];
|
||||
}
|
||||
resolve();
|
||||
}).catch(e => {
|
||||
reject();
|
||||
@@ -212,6 +232,20 @@ export default {
|
||||
},
|
||||
initFormData () {
|
||||
},
|
||||
/**
|
||||
* 重置表单数据
|
||||
*/
|
||||
resetFormData () {
|
||||
this.formData = {
|
||||
SchoolInfo: {
|
||||
schoolId: undefined,
|
||||
schoolName: undefined,
|
||||
provinceId: undefined,
|
||||
cityId: undefined,
|
||||
isDatasourceInit: false
|
||||
}
|
||||
}
|
||||
},
|
||||
formInit () {
|
||||
this.refreshFormEditSchool();
|
||||
}
|
||||
|
||||
@@ -451,6 +451,25 @@ export default {
|
||||
onUpdateClick () {
|
||||
this.$refs.formEditStudent.validate((valid) => {
|
||||
if (!valid) return;
|
||||
if (
|
||||
this.studentId == null ||
|
||||
this.formData.Student.loginMobile == null ||
|
||||
this.formData.Student.studentName == null ||
|
||||
this.formData.Student.provinceId == null ||
|
||||
this.formData.Student.cityId == null ||
|
||||
this.formData.Student.districtId == null ||
|
||||
this.formData.Student.gender == null ||
|
||||
this.formData.Student.birthday == null ||
|
||||
this.formData.Student.experienceLevel == null ||
|
||||
this.formData.Student.totalCoin == null ||
|
||||
this.formData.Student.leftCoin == null ||
|
||||
this.formData.Student.gradeId == null ||
|
||||
this.formData.Student.schoolId == null ||
|
||||
this.formData.Student.status == null
|
||||
) {
|
||||
this.$message.error('请求失败,发现必填参数为空!');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
student: {
|
||||
studentId: this.studentId,
|
||||
@@ -482,19 +501,42 @@ export default {
|
||||
loadStudentData () {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!this.formData.Student.isDatasourceInit) {
|
||||
if (
|
||||
this.studentId == null
|
||||
) {
|
||||
this.resetFormData();
|
||||
reject();
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
studentId: this.studentId
|
||||
};
|
||||
StudentController.view(this, params).then(res => {
|
||||
this.formData.Student = {...res.data, isDatasourceInit: true};
|
||||
if (this.formData.Student.genderDictMap) this.formEditStudent.gender.impl.dropdownList = [this.formData.Student.genderDictMap];
|
||||
if (this.formData.Student.gradeIdDictMap) this.formEditStudent.gradeId.impl.dropdownList = [this.formData.Student.gradeIdDictMap];
|
||||
if (this.formData.Student.experienceLevelDictMap) this.formEditStudent.experienceLevel.impl.dropdownList = [this.formData.Student.experienceLevelDictMap];
|
||||
if (this.formData.Student.provinceIdDictMap) this.formEditStudent.provinceId.impl.dropdownList = [this.formData.Student.provinceIdDictMap];
|
||||
if (this.formData.Student.cityIdDictMap) this.formEditStudent.cityId.impl.dropdownList = [this.formData.Student.cityIdDictMap];
|
||||
if (this.formData.Student.districtIdDictMap) this.formEditStudent.districtId.impl.dropdownList = [this.formData.Student.districtIdDictMap];
|
||||
if (this.formData.Student.schoolIdDictMap) this.formEditStudent.schoolId.impl.dropdownList = [this.formData.Student.schoolIdDictMap];
|
||||
if (this.formData.Student.statusDictMap) this.formEditStudent.status.impl.dropdownList = [this.formData.Student.statusDictMap];
|
||||
if (this.formData.Student.genderDictMap && this.formEditStudent.gender.impl.dirty) {
|
||||
this.formEditStudent.gender.impl.dropdownList = [this.formData.Student.genderDictMap];
|
||||
}
|
||||
if (this.formData.Student.gradeIdDictMap && this.formEditStudent.gradeId.impl.dirty) {
|
||||
this.formEditStudent.gradeId.impl.dropdownList = [this.formData.Student.gradeIdDictMap];
|
||||
}
|
||||
if (this.formData.Student.experienceLevelDictMap && this.formEditStudent.experienceLevel.impl.dirty) {
|
||||
this.formEditStudent.experienceLevel.impl.dropdownList = [this.formData.Student.experienceLevelDictMap];
|
||||
}
|
||||
if (this.formData.Student.provinceIdDictMap && this.formEditStudent.provinceId.impl.dirty) {
|
||||
this.formEditStudent.provinceId.impl.dropdownList = [this.formData.Student.provinceIdDictMap];
|
||||
}
|
||||
if (this.formData.Student.cityIdDictMap && this.formEditStudent.cityId.impl.dirty) {
|
||||
this.formEditStudent.cityId.impl.dropdownList = [this.formData.Student.cityIdDictMap];
|
||||
}
|
||||
if (this.formData.Student.districtIdDictMap && this.formEditStudent.districtId.impl.dirty) {
|
||||
this.formEditStudent.districtId.impl.dropdownList = [this.formData.Student.districtIdDictMap];
|
||||
}
|
||||
if (this.formData.Student.schoolIdDictMap && this.formEditStudent.schoolId.impl.dirty) {
|
||||
this.formEditStudent.schoolId.impl.dropdownList = [this.formData.Student.schoolIdDictMap];
|
||||
}
|
||||
if (this.formData.Student.statusDictMap && this.formEditStudent.status.impl.dirty) {
|
||||
this.formEditStudent.status.impl.dropdownList = [this.formData.Student.statusDictMap];
|
||||
}
|
||||
resolve();
|
||||
}).catch(e => {
|
||||
reject();
|
||||
@@ -506,6 +548,31 @@ export default {
|
||||
},
|
||||
initFormData () {
|
||||
},
|
||||
/**
|
||||
* 重置表单数据
|
||||
*/
|
||||
resetFormData () {
|
||||
this.formData = {
|
||||
Student: {
|
||||
studentId: undefined,
|
||||
loginMobile: undefined,
|
||||
studentName: undefined,
|
||||
provinceId: undefined,
|
||||
cityId: undefined,
|
||||
districtId: undefined,
|
||||
gender: undefined,
|
||||
birthday: undefined,
|
||||
experienceLevel: undefined,
|
||||
totalCoin: undefined,
|
||||
leftCoin: undefined,
|
||||
gradeId: undefined,
|
||||
schoolId: undefined,
|
||||
registerTime: undefined,
|
||||
status: undefined,
|
||||
isDatasourceInit: false
|
||||
}
|
||||
}
|
||||
},
|
||||
formInit () {
|
||||
this.refreshFormEditStudent();
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-table ref="SchoolInfo" :data="formSchool.SchoolInfo.impl.dataList" size="mini" @sort-change="formSchool.SchoolInfo.impl.onSortChange"
|
||||
<el-table ref="schoolInfo" :data="formSchool.SchoolInfo.impl.dataList" size="mini" @sort-change="formSchool.SchoolInfo.impl.onSortChange"
|
||||
header-cell-class-name="table-header-gray">
|
||||
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="formSchool.SchoolInfo.impl.getTableIndex" />
|
||||
<el-table-column label="学校名称" prop="schoolName">
|
||||
@@ -236,6 +236,12 @@ export default {
|
||||
* 删除
|
||||
*/
|
||||
onDeleteClick (row) {
|
||||
if (
|
||||
row.schoolId == null
|
||||
) {
|
||||
this.$message.error('请求失败,发现必填参数为空!');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
schoolId: row.schoolId
|
||||
};
|
||||
|
||||
@@ -147,6 +147,12 @@ export default {
|
||||
* 班级课程数据获取函数,返回Promise
|
||||
*/
|
||||
loadCourseData (params) {
|
||||
if (
|
||||
this.classId == null
|
||||
) {
|
||||
this.formSetClassCourse.Course.impl.clearTable();
|
||||
return Promise.reject();
|
||||
}
|
||||
if (params == null) params = {};
|
||||
params = {
|
||||
...params,
|
||||
@@ -251,6 +257,12 @@ export default {
|
||||
* 添加
|
||||
*/
|
||||
onAddClassCourseClick () {
|
||||
if (
|
||||
this.classId == null
|
||||
) {
|
||||
this.$message.error('请求失败,发现必填参数为空!');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
classId: this.classId,
|
||||
classCourseList: this.tableSelectRowList.map((item) => {
|
||||
|
||||
@@ -115,6 +115,12 @@ export default {
|
||||
* 班级学生数据获取函数,返回Promise
|
||||
*/
|
||||
loadStudentData (params) {
|
||||
if (
|
||||
this.classId == null
|
||||
) {
|
||||
this.formSetClassStudent.Student.impl.clearTable();
|
||||
return Promise.reject();
|
||||
}
|
||||
if (params == null) params = {};
|
||||
params = {
|
||||
...params,
|
||||
@@ -177,6 +183,12 @@ export default {
|
||||
* 添加
|
||||
*/
|
||||
onAddClassStudentClick () {
|
||||
if (
|
||||
this.classId == null
|
||||
) {
|
||||
this.$message.error('请求失败,发现必填参数为空!');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
classId: this.classId,
|
||||
classStudentList: this.tableSelectRowList.map((item) => {
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-table ref="Student" :data="formStudent.Student.impl.dataList" size="mini" @sort-change="formStudent.Student.impl.onSortChange"
|
||||
<el-table ref="student" :data="formStudent.Student.impl.dataList" size="mini" @sort-change="formStudent.Student.impl.onSortChange"
|
||||
header-cell-class-name="table-header-gray">
|
||||
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="formStudent.Student.impl.getTableIndex" />
|
||||
<el-table-column label="学生姓名" prop="studentName">
|
||||
@@ -266,6 +266,12 @@ export default {
|
||||
* 删除
|
||||
*/
|
||||
onDeleteClick (row) {
|
||||
if (
|
||||
row.studentId == null
|
||||
) {
|
||||
this.$message.error('请求失败,发现必填参数为空!');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
studentId: row.studentId
|
||||
};
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-table ref="StudentActionTrans" :data="formStudentActionDetail.StudentActionTrans.impl.dataList" size="mini" @sort-change="formStudentActionDetail.StudentActionTrans.impl.onSortChange"
|
||||
<el-table ref="studentActionTrans" :data="formStudentActionDetail.StudentActionTrans.impl.dataList" size="mini" @sort-change="formStudentActionDetail.StudentActionTrans.impl.onSortChange"
|
||||
header-cell-class-name="table-header-gray">
|
||||
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="formStudentActionDetail.StudentActionTrans.impl.getTableIndex" />
|
||||
<el-table-column label="学生名称" prop="studentName">
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-table ref="StudentActionStats" :data="formStudentActionStats.StudentActionStats.impl.dataList" size="mini" @sort-change="formStudentActionStats.StudentActionStats.impl.onSortChange"
|
||||
<el-table ref="studentActionStats" :data="formStudentActionStats.StudentActionStats.impl.dataList" size="mini" @sort-change="formStudentActionStats.StudentActionStats.impl.onSortChange"
|
||||
header-cell-class-name="table-header-gray">
|
||||
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="formStudentActionStats.StudentActionStats.impl.getTableIndex" />
|
||||
<el-table-column label="统计日期">
|
||||
|
||||
Reference in New Issue
Block a user