Browse Source

作业改造优化

1
mo 2 years ago
parent
commit
ac9d38082e

+ 10 - 0
src/api/teamServer.js

@@ -11,6 +11,16 @@ export function getTeamList (data) {
     requestType: 'form'
   })
 }
+export function getTeamListNoLoading (data) {
+  return request2({
+    url: api + '/musicGroup/queryPage',
+    method: 'post',
+    data: data,
+    requestType: 'form',
+    hideLoading:true
+  })
+}
+
 
 // 获取乐团收费类型
 export function getPayType (data) {

+ 11 - 0
src/views/afterSchoolManager/api.js

@@ -35,6 +35,17 @@ export function getHomeworkSubjectPublic (data) {
   })
 }
 
+// 获取进度测评声部
+export function getExaminationSubjectPublic (data) {
+  return request({
+    url: api + '/lessonExamination/querySubject',
+    method: 'get',
+    params: data
+
+  })
+}
+
+
 // 获取进度测评列表
 export function getLessonExamination (data) {
   return request({

+ 10 - 9
src/views/afterSchoolManager/components/examinationDetail.vue

@@ -1,12 +1,11 @@
 <template>
   <div>
     <div>
-      <!-- <el-checkbox-group
+      <el-checkbox-group
         v-if="subjectList.length > 1"
         @change="checkSubject"
         v-model="subjectId"
         size="medium"
-        :max="1"
         style="margin-bottom: 20px"
       >
         <el-checkbox-button
@@ -16,7 +15,7 @@
           :label="item.id"
           >{{ item.name }}</el-checkbox-button
         >
-      </el-checkbox-group> -->
+      </el-checkbox-group>
       <el-table
         style="width: 100%"
         max-height="300px"
@@ -68,7 +67,7 @@
   </div>
 </template>
 <script>
-import { getLessonExaminationStudent, getHomeworkSubjectPublic } from "../api";
+import { getLessonExaminationStudent, getExaminationSubjectPublic } from "../api";
 export default {
   props: ["courseScheduleId", "type"],
   data() {
@@ -82,7 +81,7 @@ export default {
     console.log(this.courseScheduleId, "mounted");
     if (this.courseScheduleId) {
       this.getStudentList(this.courseScheduleId);
-      // this.getPublicSubject();
+      this.getPublicSubject();
     }
   },
 
@@ -91,6 +90,7 @@ export default {
       try {
         const res = await getLessonExaminationStudent({
           lessonExaminationId: this.courseScheduleId,
+          subjectId: this.subjectId,
         });
         this.list = res.data;
       } catch (e) {
@@ -99,9 +99,8 @@ export default {
     },
     async getPublicSubject() {
       try {
-        const res = await getHomeworkSubjectPublic({
-          courseScheduleId: this.courseScheduleId,
-          type: this.type,
+        const res = await getExaminationSubjectPublic({
+          lessonExaminationId: this.courseScheduleId,
         });
         this.subjectList = res.data;
       } catch (e) {
@@ -109,7 +108,9 @@ export default {
       }
     },
     checkSubject(val) {
-      console.log(val, "checkSubject", this.subjectId);
+      if (this.subjectId.length > 1) {
+        this.subjectId.shift();
+      }
       this.getStudentList();
     },
   },

+ 3 - 1
src/views/afterSchoolManager/components/studentWroks.vue

@@ -6,7 +6,6 @@
         @change="checkSubject"
         v-model="subjectId"
         size="medium"
-        :max="1"
         style="margin-bottom: 20px"
       >
         <el-checkbox-button
@@ -113,6 +112,9 @@ export default {
     },
     checkSubject(val) {
       console.log(val, "checkSubject", this.subjectId);
+      if (this.subjectId.length > 1) {
+        this.subjectId.shift();
+      }
       this.getStudentList();
     },
   },

+ 7 - 2
src/views/afterSchoolManager/components/textConment.vue

@@ -6,7 +6,6 @@
       @change="checkSubject"
       v-model="subjectId"
       size="medium"
-      :max="1"
       style="margin-bottom: 20px"
     >
       <el-checkbox-button
@@ -70,9 +69,12 @@ export default {
     },
     checkSubject(val) {
       console.log(val[0], this.trainingDetailList);
+      if (this.subjectId.length > 1) {
+        this.subjectId.shift();
+      }
       if (val[0]) {
         this.fitterTraining = this.trainingDetailList.filter((item) => {
-          return item.subjectId == val[0];
+          return item.subjectId == this.subjectId[0];
         });
       } else {
         this.fitterTraining = this.trainingDetailList.map((item) => item);
@@ -83,6 +85,9 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+::v-deep .el-row {
+  line-height: 40px !important;
+}
 .rowFirst {
   // padding-left: 58px;
   color: #101010;

+ 18 - 10
src/views/afterSchoolManager/examination.vue

@@ -47,12 +47,12 @@
         </el-form-item>
         <el-form-item>
           <el-select
-            collapse-tags
-            :disabled="!searchForm.organId"
+            :disabled="!searchForm.organId || teamList.length <= 0"
             v-model.trim="searchForm.musicGroupId"
             clearable
             filterable
             placeholder="请选择乐团"
+            @change="changeMusicGroup"
           >
             <el-option
               v-for="(item, index) in teamList"
@@ -116,7 +116,7 @@
           :data="tableList"
         >
           <el-table-column align="center" prop="organName" label="分部"></el-table-column>
-          <el-table-column
+          <!-- <el-table-column
             align="center"
             prop="musicGroupName"
             label="乐团"
@@ -125,10 +125,10 @@
             align="center"
             prop="courseScheduleName"
             label="班级"
-          ></el-table-column>
+          ></el-table-column> -->
           <el-table-column
             align="center"
-            prop="actualTeacherName"
+            prop="teacherName"
             label="布置老师"
           ></el-table-column>
           <el-table-column align="center" label="布置时间">
@@ -141,7 +141,7 @@
           <el-table-column align="center" label="截止时间">
             <template slot-scope="scope">
               <div>
-                {{ scope.row.createTime ? scope.row.createTime.substr(0, 16) : "" }}
+                {{ scope.row.expireDate ? scope.row.expireDate.substr(0, 16) : "" }}
               </div>
             </template>
           </el-table-column>
@@ -192,7 +192,7 @@
           width="1000px"
           v-if="classVisible"
         >
-          <examinationDetail :courseScheduleId="activeRow.id" />
+          <examinationDetail :courseScheduleId="activeRow.id" :type="activeRow.type" />
         </el-dialog>
       </div>
     </div>
@@ -206,7 +206,7 @@ import studentWork from "@/views/teamDetail/componentCourse/studentWork";
 import { getLessonExamination } from "./api.js";
 import { getTimes } from "@/utils";
 import examinationDetail from "./components/examinationDetail.vue";
-import { getTeamList } from "@/api/teamServer";
+import { getTeamListNoLoading } from "@/api/teamServer";
 export default {
   components: { pagination, studentWork, examinationDetail },
   data() {
@@ -252,6 +252,9 @@ export default {
   },
   methods: {
     init() {
+      if (this.searchForm.organId) {
+        this.onBranchChange(this.searchForm.organId);
+      }
       this.getList();
     },
     getList() {
@@ -294,6 +297,7 @@ export default {
         groupType: "MUSIC",
         courseTimer: [],
         cloudHomeworkFlag: "",
+        musicGroupId: "",
       };
       // this.courseTimer = [];
       this.search();
@@ -302,15 +306,19 @@ export default {
       this.activeRow = row;
       this.classVisible = true;
     },
+    changeMusicGroup() {
+      this.$forceUpdate();
+    },
     async onBranchChange(val) {
       this.searchForm.musicGroupId = "";
 
       if (val) {
         let organId = val;
         try {
-          await getTeamList({ organId, page: 1, rows: 9999 }).then((res) => {
+          await getTeamListNoLoading({ organId, page: 1, rows: 9999 }).then((res) => {
             if (res.code == 200) {
-              this.teamList = res.data.rows;
+              this.$set(this, "teamList", res.data.rows);
+              // this.teamList = res.data.rows;
             }
           });
         } catch (e) {

+ 3 - 2
src/views/attendanceManager/attendanceList/components/studentWroks.vue

@@ -6,7 +6,6 @@
         @change="checkSubject"
         v-model="subjectId"
         size="medium"
-        :max="1"
         style="margin-bottom: 20px"
       >
         <el-checkbox-button
@@ -111,7 +110,9 @@ export default {
       }
     },
     checkSubject(val) {
-      console.log(val, "checkSubject", this.subjectId);
+      if (this.subjectId.length > 1) {
+        this.subjectId.shift();
+      }
       this.getStudentList();
     },
   },

+ 8 - 3
src/views/attendanceManager/attendanceList/components/textConment.vue

@@ -6,7 +6,6 @@
       @change="checkSubject"
       v-model="subjectId"
       size="medium"
-      :max="1"
       style="margin-bottom: 20px"
     >
       <el-checkbox-button
@@ -70,9 +69,12 @@ export default {
     },
     checkSubject(val) {
       console.log(val[0], this.trainingDetailList);
-      if (val[0]) {
+      if (this.subjectId.length > 1) {
+        this.subjectId.shift();
+      }
+      if (this.subjectId) {
         this.fitterTraining = this.trainingDetailList.filter((item) => {
-          return item.subjectId == val[0];
+          return item.subjectId == this.subjectId[0];
         });
       } else {
         this.fitterTraining = this.trainingDetailList.map((item) => item);
@@ -83,6 +85,9 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+::v-deep .el-row {
+  line-height: 40px !important;
+}
 .rowFirst {
   // padding-left: 58px;
   color: #101010;