diff --git a/package.json b/package.json index 7403f62..814e581 100755 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "vue": "^2.6.11", "vue-i18n": "^8.4.0", "vue-router": "^3.5.1", - "vuex": "^3.6.2" + "vuex": "^3.6.2", + "vuedraggable": "^2.24.3" }, "devDependencies": { "@vue/cli-plugin-babel": "~4.5.0", diff --git a/src/api/apis/apis.js b/src/api/apis/apis.js index 415a2d6..f35936d 100644 --- a/src/api/apis/apis.js +++ b/src/api/apis/apis.js @@ -1425,8 +1425,6 @@ export default { data, }); }, - - //修改密码 changePwd(data) { return service({ @@ -1435,4 +1433,39 @@ export default { data, }); }, + /** + * v1.4 + */ + //班级管理 + classManager(data) { + return service({ + url: setUpUrls.classManager, + method: "POST", + data, + }); + }, + //班级排序 + classSort(data) { + return service({ + url: setUpUrls.classSort, + method: "POST", + data, + }); + }, + //学生分班轨迹 + studentClassLogs(data) { + return service({ + url: setUpUrls.studentClassLogs, + method: "POST", + data, + }); + }, + //修改科目 + updateSubject(data) { + return service({ + url: setUpUrls.updateSubject, + method: "POST", + data, + }); + }, }; diff --git a/src/api/urls/apis.js b/src/api/urls/apis.js index 2fc9d29..10a346e 100644 --- a/src/api/urls/apis.js +++ b/src/api/urls/apis.js @@ -367,4 +367,17 @@ export default { // 修改密码 changePwd: "/api_html/changePwd", + + + /** + * v1.4 + */ + //班级管理 + classManager: "/api_html/school/manager/classManager", + //班级排序 + classSort: "/api_html/school/manager/classSort", + //学生分班轨迹 + studentClassLogs: "/api_html/school/manager/studentClassLogs", + //修改科目 + updateSubject: "/api_html/school/manager/updateSubject", } diff --git a/src/router/index.js b/src/router/index.js index c301590..e1914a6 100755 --- a/src/router/index.js +++ b/src/router/index.js @@ -42,6 +42,7 @@ const SetUpConglomerate = () => import("@/views/standard/setUp/conglomerate") const SetUpSchool = () => import("@/views/standard/setUp/school") const SetUpTeacher = () => import("@/views/standard/setUp/teacher") const SetUpStudent = () => import("@/views/standard/setUp/student") +const SetUpClazz = () => import("@/views/standard/setUp/clazz") const ArchivedClazz = () => import("@/views/standard/setUp/archivedClazz") const PersonalAsk = () => import("@/views/personal/ask/index") @@ -295,6 +296,13 @@ let addrouters = [ children: [] }, { + path: "/setUpClazz", + iconCls: "fa fa-sitemap", + name: '班级管理', + component: SetUpClazz, + children: [] + }, + { path: "/setUpTeacher", iconCls: "fa fa-male", name: '教师管理', diff --git a/src/views/standard/setUp/clazz.vue b/src/views/standard/setUp/clazz.vue new file mode 100644 index 0000000..1107451 --- /dev/null +++ b/src/views/standard/setUp/clazz.vue @@ -0,0 +1,599 @@ + + + + + \ No newline at end of file diff --git a/src/views/standard/setUp/school.vue b/src/views/standard/setUp/school.vue index 27debf5..6b47c5c 100644 --- a/src/views/standard/setUp/school.vue +++ b/src/views/standard/setUp/school.vue @@ -72,7 +72,6 @@ class="grade-item" v-for="item in tableData" :key="item.grade" - @click="setGrade(item)" >

{{ item.gradeName }}

@@ -113,55 +112,6 @@ 取 消
- - - -
- {{ showAll ? "收起" : "更多..." }} - -

- {{ item }} - -

-
-
- - - - - -
- - {{ - `${item.className}${ - index == formGrade.classList.length - 1 ? "" : "、" - }` - }} - -
- -
+ + + + + + +
-
-
-
- - - - -
+
+
班级列表
  • - {{ item.className }}({{ item.studentCount }})
-
+

+ 共筛选出{{ studentList.length }}名学生。 +

+
  • -

    - {{ item.studentName }} -

    -

    - {{ item.gradeName }}﹒{{ item.className }} -

    -

    答题器:{{ item.clickerSn || "--" }}

    -

    长学号:{{ item.studentCode }}

    -

    短学号:{{ item.shortNumber || "--" }}

    +
    +

    + {{ item.studentName }} +

    +

    + {{ item.gradeName }}﹒{{ item.className }} +

    +

    答题器:{{ item.clickerSn || "--" }}

    +

    长学号:{{ item.studentCode }}

    +

    短学号:{{ item.shortNumber || "--" }}

    +
取 消
+ + + + {{ formClassTrack.studentName }} + + +

+ {{ `${item.grade}-${item.className}(${item.createdTime})` }} +

+
+
+ +
取 消
- - - - {{ formClass.gradeName }} - - - - - - - - - - - - - - - 取 消
- -

- 注意班级归档后,学生解除班级关系且相关老师任课信息将不存在,确认要将班级归档吗? -

- -
@@ -326,11 +290,18 @@ export default { return { code: "", role: "", + loading: false, + loadingDown: false, + loadingClassLogs: false, diaUp: false, url: "/api_html/school/manager/importStudentClicker", diaStu: false, - diaClass: false, diaChangeClass: false, + diaChangeClassTrack: false, + formClassTrack: { + studentName: "", + classList: [], + }, clazzDetail: { stationSn: "", pairingCode: "", frequency: "" }, query: { gradeName: "", @@ -354,16 +325,6 @@ export default { { required: true, message: "请输入学生长学号", trigger: "blur" }, ], }, - formClass: { - gradeName: "", - className: "", - intoSchoolYear: "", - }, - rulesClass: { - className: [ - { required: true, message: "请输入班级名称", trigger: "blur" }, - ], - }, formStuCla: { studentName: "", studentId: "", @@ -393,10 +354,6 @@ export default { teacherCourseList: [], teacherGradeList: [], }, - diaArchiving: false, - archivedTotal: 0, //已归档班级 - archivingObj: {}, //即将归档班级信息 - archivingIndex: 0, //即将归档班级下标 }; }, async created() { @@ -404,7 +361,6 @@ export default { this.role = this.$store.getters.info.showRole || this.$store.getters.info.permissions[0].role; - this._QueryArchivedNum(); await this._QueryDataGrade(); await this._QueryClass(); this._QueryData(3); @@ -435,34 +391,6 @@ export default { this._QueryData(3); }, - setClass(obj) { - this.formClass.gradeName = obj.gradeName; - this.formClass.classId = obj.id; - this.formClass.className = obj.className; - this.formClass.intoSchoolYear = obj.intoSchoolYear + ""; - this.diaClass = true; - }, - saveClass() { - this.$refs.formClass.validate(async (valid) => { - if (valid) { - const { data, status, info } = await this.$request.updateClass({ - classId: this.formClass.classId, - className: this.formClass.className, - intoSchoolYear: this.formClass.intoSchoolYear, - }); - if (status === 0) { - this.$message.success("修改成功"); - this.diaClass = false; - this._QueryClass(); - } else { - this.$message.error(info); - } - } else { - this.$message.warning("输入有误请检查!"); - return false; - } - }); - }, upSuccess(res) { this.$message.closeAll(); this.$message({ @@ -513,6 +441,11 @@ export default { } }); }, + //学生调班轨迹 + sayChange(obj) { + this._StudentClassLogs(obj); + this.diaChangeClassTrack = true; + }, //学生调班弹窗 openChangeClazz(obj) { this.formStuCla.studentId = obj.id; @@ -551,32 +484,21 @@ export default { { leading: true, trailing: false } ), - openArchivingDia(obj, index) { - this.archivingObj = { ...obj }; - this.archivingIndex = index; - this.diaArchiving = true; - }, - //班级归档 - async archivingClass() { - const { data, status, info } = await this.$request.classArchiving({ - classId: this.archivingObj.id, + //学生调班轨迹 + async _StudentClassLogs(obj) { + this.loadingClassLogs = true; + let { data, info, status } = await this.$request.studentClassLogs({ + studentId: obj.id, }); - this.diaArchiving = false; - if (status === 0) { - this.$message.success("归档成功"); - this.classList.splice(this.archivingIndex, 1); - if (this.archivingIndex == this.classList.length) { - this.classDetail(this.classList[this.archivingIndex - 1]); - } else { - this.classDetail(this.classList[this.archivingIndex]); - } - this._QueryArchivedNum(); - this._QueryData(3); + this.loadingClassLogs = false; + if (status == 0) { + this.formClassTrack.studentName = obj.studentName; + this.formClassTrack.classList = (data.list && [...data.list]) || []; } else { this.$message.error(info); } }, - async removeStu(obj, index) { + async removeStu(obj, index, $event) { const { data, status, info } = await this.$request.delStudent({ studentId: obj.id, }); @@ -589,28 +511,33 @@ export default { } }, async changeGrade(val) { + if (!val) return; this.query.classId = ""; + this.query.studentName = ""; + this.query.studentCode = ""; await this._QueryClass(val); this._QueryData(3); }, - async _QueryArchivedNum() { - const { data, status, info } = await this.$request.archivingClassList(); - if (status === 0) { - this.archivedTotal = data?.count || 0; - } else { - this.$message.error(info); - } - }, async _QueryData(type) { let query = {}; if (type == 1) { + if (!this.query.studentName) { + this.$message.warning("输入学生姓名~"); + return; + } this.query.classId = ""; query.studentName = this.query.studentName; this.query.studentCode = ""; + this.query.gradeName = ""; } else if (type == 2) { + if (!this.query.studentName) { + this.$message.warning("输入学生学号~"); + return; + } this.query.classId = ""; query.studentCode = this.query.studentCode; this.query.studentName = ""; + this.query.gradeName = ""; } else if (type == 3) { this.query.studentName = ""; this.query.studentCode = ""; @@ -619,6 +546,15 @@ export default { } else { query = this.query; } + if (query.gradeName == 80) { + query.status = 1; + delete query.gradeName; + } else if (query.gradeName == 81) { + query.status = 2; + delete query.gradeName; + } else { + query.status = 0; + } this.loading = true; const { data, status, info } = await this.$request.studentList({ ...query, @@ -702,6 +638,7 @@ export default { padding-top: 10px; } .stu-list { + min-width: 200px; max-height: 80vh; .h-title { height: 40px; @@ -766,18 +703,26 @@ export default { .stu-detail { flex: 1; border-left: 0.5px solid #eee; + .total { + padding: 15px 12px; + font-size: 14px; + color: #666; + } .s-ul { display: flex; flex-wrap: wrap; padding-left: 20px; .s-li { - width: 180px; - min-height: 120px; + position: relative; box-shadow: 2px 2px 5px #7f7f7f; - border-radius: 10px; margin: 0 20px 20px 0; - padding: 0 12px 5px; - position: relative; + .s-li-box { + width: 180px; + border-radius: 10px; + min-height: 120px; + padding: 0 12px 5px; + cursor: pointer; + } .el-icon-user-solid { position: absolute; top: 8px;