瀏覽代碼

Merge branch '0709_OA' into 11/24SAAS

lex 2 年之前
父節點
當前提交
e2c0e32f63

+ 10 - 6
src/views/afterSchoolManager/components/courseWorkeDetail.vue

@@ -4,7 +4,9 @@
       <div class="teacherHeader">
         <el-image
           style="width: 50px; height: 50px"
-          :src="courseDetail.teacherImg ? courseDetail.teacherImg : tetacherIcon"
+          :src="
+            courseDetail.teacherImg ? courseDetail.teacherImg : tetacherIcon
+          "
         ></el-image>
       </div>
       <div class="courseInfo">
@@ -79,7 +81,7 @@
       >
         <div v-if="activeName == 'second'">
           <textConment
-            :trainingDetailList="trainingDetailList"
+            :trainingDetailList="trainingGroupList"
             :courseScheduleId="studentExerciseId"
             :type="courseDetail.type"
           />
@@ -116,9 +118,10 @@ export default {
         courseScheduleId: "",
         finishNum: "",
         studentNum: "",
-        type: "",
+        type: ""
       },
       trainingDetailList: [],
+      trainingGroupList: []
     };
   },
   mounted() {
@@ -128,10 +131,11 @@ export default {
     async getWorkerDetail() {
       try {
         const res = await findCourseHomeworkDetail({
-          studentExerciseId: this.studentExerciseId,
+          studentExerciseId: this.studentExerciseId
         });
         this.courseDetail = { ...res.data };
         this.trainingDetailList = res.data.trainingDetailList;
+        this.trainingGroupList = res.data.trainingGroupList || [];
         this.activeName = "first";
       } catch (e) {
         console.log(e);
@@ -139,8 +143,8 @@ export default {
     },
     permission(str, parent) {
       return permission(str, parent);
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>

+ 49 - 14
src/views/afterSchoolManager/components/textConment.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <!--   -->
-    <el-checkbox-group
+    <!-- <el-checkbox-group
       v-if="subjectList.length > 1"
       @change="checkSubject"
       v-model="subjectId"
@@ -15,8 +15,32 @@
         :label="item.id"
         >{{ item.name }}</el-checkbox-button
       >
-    </el-checkbox-group>
-    <el-row :gutter="20" v-for="(item, index) in fitterTraining" :key="index">
+    </el-checkbox-group> -->
+    <div v-for="(item, index) in fitterTraining" :key="index">
+      <el-alert :title="'练习组' + (index + 1)" :closable="false">
+        {{ item.subjectName }}
+      </el-alert>
+
+      <el-table
+        :data="item.trainingDetailList"
+        :show-header="false"
+        style="width: 100%;margin-bottom: 12px;"
+        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      >
+        <el-table-column prop="musicScoreName"></el-table-column>
+        <el-table-column prop="trainingSpeed">
+          <template slot-scope="scope"
+            >{{ scope.row.trainingSpeed }}速度</template
+          >
+        </el-table-column>
+        <el-table-column prop="times">
+          <template slot-scope="scope"
+            >{{ scope.row.times }}次</template
+          >
+        </el-table-column>
+      </el-table>
+    </div>
+    <!-- <el-row :gutter="20" v-for="(item, index) in fitterTraining" :key="index">
       <el-col :span="12"
         ><div class="rowFirst">{{ item.musicScoreName }}</div></el-col
       >
@@ -27,14 +51,11 @@
       >
       <el-col :span="6"
         ><div class="rowlast">
-          <!-- <span :class="item.trainingTimes >= item.times ? '' : 'red'">{{
-            item.trainingTimes
-          }}</span>  /-->
           <span> {{ item.times }}</span>
         </div></el-col
       >
-    </el-row>
+    </el-row> -->
   </div>
 </template>
 <script>
@@ -46,12 +67,12 @@ export default {
       subjectId: [],
       list: [],
       subjectList: [],
-      fitterTraining: [],
+      fitterTraining: []
     };
   },
   mounted() {
     console.log(this.trainingDetailList);
-    this.fitterTraining = this.trainingDetailList.map((item) => item);
+    this.fitterTraining = this.trainingDetailList.map(item => item);
     this.getPublicSubject();
   },
 
@@ -60,7 +81,7 @@ export default {
       try {
         const res = await getHomeworkSubjectPublic({
           courseScheduleId: this.courseScheduleId,
-          type: this.type,
+          type: this.type
         });
         this.subjectList = res.data;
       } catch (e) {
@@ -73,14 +94,14 @@ export default {
         this.subjectId.shift();
       }
       if (val[0]) {
-        this.fitterTraining = this.trainingDetailList.filter((item) => {
+        this.fitterTraining = this.trainingDetailList.filter(item => {
           return item.subjectId == this.subjectId[0];
         });
       } else {
-        this.fitterTraining = this.trainingDetailList.map((item) => item);
+        this.fitterTraining = this.trainingDetailList.map(item => item);
       }
-    },
-  },
+    }
+  }
 };
 </script>
 
@@ -88,6 +109,20 @@ export default {
 ::v-deep .el-row {
   line-height: 40px !important;
 }
+::v-deep .el-alert__content {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  width: 100%;
+  padding: 0;
+
+  .el-alert__description {
+    margin-top: 0;
+  }
+}
+::v-deep .el-table {
+  width: 100% !important;
+}
 .rowFirst {
   // padding-left: 58px;
   color: #101010;

+ 8 - 4
src/views/afterSchoolManager/index.vue

@@ -6,7 +6,11 @@
       课外练习
     </h2>
     <div class="m-core">
-      <tab-router v-model.trim="activeIndex" type="card" @tab-click="handleClick">
+      <tab-router
+        v-model.trim="activeIndex"
+        type="card"
+        @tab-click="handleClick"
+      >
         <el-tab-pane lazy label="班级布置" name="1">
           <afterSchoolList v-if="activeIndex == 1"></afterSchoolList>
         </el-tab-pane>
@@ -30,7 +34,7 @@ export default {
   data() {
     const query = this.$route.query;
     return {
-      activeIndex: query.opt || "1",
+      activeIndex: query.opt || "1"
     };
   },
   //生命周期 - 创建完成(可以访问当前this实例)
@@ -49,7 +53,7 @@ export default {
 
     handleClick(val) {
       this.activeIndex = val.name;
-    },
-  },
+    }
+  }
 };
 </script>

+ 14 - 7
src/views/attendanceManager/attendanceList/components/courseWorkeDetail.vue

@@ -4,7 +4,9 @@
       <div class="teacherHeader">
         <el-image
           style="width: 50px; height: 50px"
-          :src="courseDetail.teacherImg ? courseDetail.teacherImg : tetacherIcon"
+          :src="
+            courseDetail.teacherImg ? courseDetail.teacherImg : tetacherIcon
+          "
         ></el-image>
       </div>
       <div class="courseInfo">
@@ -64,7 +66,10 @@
         v-if="permission('/teamCourseListDetailStudnetList')"
       >
         <div v-if="activeName == 'first'">
-          <studentWroks ref="studentWroksRef" :courseScheduleId="courseScheduleId" />
+          <studentWroks
+            ref="studentWroksRef"
+            :courseScheduleId="courseScheduleId"
+          />
         </div>
       </el-tab-pane>
       <el-tab-pane
@@ -74,7 +79,7 @@
       >
         <div v-if="activeName == 'second'">
           <textConment
-            :trainingDetailList="trainingDetailList"
+            :trainingDetailList="trainingGroupList"
             :courseScheduleId="courseScheduleId"
           />
         </div>
@@ -109,9 +114,10 @@ export default {
         teacherImg: "",
         courseScheduleId: "",
         finishNum: "",
-        studentNum: "",
+        studentNum: ""
       },
       trainingDetailList: [],
+      trainingGroupList: []
     };
   },
   mounted() {
@@ -121,18 +127,19 @@ export default {
     async getWorkerDetail() {
       try {
         const res = await findCourseHomeworkDetail({
-          courseScheduleId: this.courseScheduleId,
+          courseScheduleId: this.courseScheduleId
         });
         this.courseDetail = { ...res.data };
         this.trainingDetailList = res.data.trainingDetailList;
+        this.trainingGroupList = res.data.trainingGroupList || [];
       } catch (e) {
         console.log(e);
       }
     },
     permission(str, parent) {
       return permission(str, parent);
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>

+ 68 - 68
src/views/attendanceManager/attendanceList/components/studentWroks.vue

@@ -1,69 +1,68 @@
 <template>
-  <div>
-    <div>
-      <el-checkbox-group
-        v-if="subjectList.length > 1"
-        @change="checkSubject"
-        v-model="subjectId"
-        size="medium"
-        style="margin-bottom: 20px"
+  <div class="studentWroks">
+    <el-checkbox-group
+      v-if="subjectList.length > 1"
+      @change="checkSubject"
+      v-model="subjectId"
+      size="medium"
+      style="margin-bottom: 20px"
+    >
+      <el-checkbox-button
+        :class="subjectList.length == 1 ? 'one' : ''"
+        v-for="(item, index) in subjectList"
+        :key="index"
+        :label="item.id"
+        >{{ item.name }}</el-checkbox-button
       >
-        <el-checkbox-button
-          :class="subjectList.length == 1 ? 'one' : ''"
-          v-for="(item, index) in subjectList"
-          :key="index"
-          :label="item.id"
-          >{{ item.name }}</el-checkbox-button
-        >
-      </el-checkbox-group>
-      <el-table
-        style="width: 100%"
-        max-height="300px"
-        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
-        :data="list"
-      >
-        <el-table-column type="expand">
-          <template slot-scope="props">
-            <el-row
-              :gutter="20"
-              v-for="(item, index) in props.row.studentLessonTrainingDetail"
-              :key="index"
+    </el-checkbox-group>
+    <el-table
+      max-height="300px"
+      :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      :data="list"
+    >
+      <el-table-column type="expand">
+        <template slot-scope="props">
+          <el-row
+            :gutter="20"
+            v-for="(item, index) in props.row.studentLessonTrainingDetail"
+            :key="index"
+          >
+            <el-col :span="12"
+              ><div class="rowFirst">{{ item.musicScoreName }}</div></el-col
+            >
+            <el-col :span="6"
+              ><div class="rowSecond">
+                <span>{{ item.trainingSpeed }}</span> 速度
+              </div></el-col
+            >
+            <el-col :span="6"
+              ><div class="rowlast">
+                <span :class="item.trainingTimes >= item.times ? '' : 'red'">{{
+                  item.trainingTimes
+                }}</span>
+                / {{ item.times }} 次
+              </div></el-col
             >
-              <el-col :span="12"
-                ><div class="rowFirst">{{ item.musicScoreName }}</div></el-col
-              >
-              <el-col :span="6"
-                ><div class="rowSecond">
-                  <span>{{ item.trainingSpeed }}</span> 速度
-                </div></el-col
-              >
-              <el-col :span="6"
-                ><div class="rowlast">
-                  <span :class="item.trainingTimes >= item.times ? '' : 'red'">{{
-                    item.trainingTimes
-                  }}</span>
-                  / {{ item.times }} 次
-                </div></el-col
-              >
-            </el-row>
-          </template>
-        </el-table-column>
-        <el-table-column prop="userName" align="left" label="学生姓名"> </el-table-column>
-        <el-table-column prop="phone" align="left" label="手机号"> </el-table-column>
-        <el-table-column prop="subjectName" align="left" label="声部名称">
-        </el-table-column>
-        <el-table-column prop="submitTime" align="left" label="完成时间">
-          <template slot-scope="scope">
-            <div>{{ scope.row.submitTime | dateForMinFormat }}</div>
-          </template>
-        </el-table-column>
-        <el-table-column prop="finishFlag" align="right" label="训练情况">
-          <template slot-scope="scope">
-            <div>{{ scope.row.finishFlag ? "已完成" : "未完成" }}</div>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
+          </el-row>
+        </template>
+      </el-table-column>
+      <el-table-column prop="userName" align="left" label="学生姓名">
+      </el-table-column>
+      <el-table-column prop="phone" align="left" label="手机号">
+      </el-table-column>
+      <el-table-column prop="subjectName" align="left" label="声部名称">
+      </el-table-column>
+      <el-table-column prop="submitTime" align="left" label="完成时间">
+        <template slot-scope="scope">
+          <div>{{ scope.row.submitTime | dateForMinFormat }}</div>
+        </template>
+      </el-table-column>
+      <el-table-column prop="finishFlag" align="right" label="训练情况">
+        <template slot-scope="scope">
+          <div>{{ scope.row.finishFlag ? "已完成" : "未完成" }}</div>
+        </template>
+      </el-table-column>
+    </el-table>
   </div>
 </template>
 <script>
@@ -74,7 +73,7 @@ export default {
     return {
       subjectId: [],
       list: [],
-      subjectList: [],
+      subjectList: []
     };
   },
   mounted() {
@@ -91,7 +90,7 @@ export default {
         const res = await getHomeworkStudent({
           courseScheduleId: this.courseScheduleId,
           type: "HOMEWORK",
-          subjectId: this.subjectId[0] ? this.subjectId[0] : "",
+          subjectId: this.subjectId[0] ? this.subjectId[0] : ""
         });
         this.list = res.data;
       } catch (e) {
@@ -102,7 +101,7 @@ export default {
       try {
         const res = await getHomeworkSubjectPublic({
           courseScheduleId: this.courseScheduleId,
-          type: "HOMEWORK",
+          type: "HOMEWORK"
         });
         this.subjectList = res.data;
       } catch (e) {
@@ -114,8 +113,8 @@ export default {
         this.subjectId.shift();
       }
       this.getStudentList();
-    },
-  },
+    }
+  }
 };
 </script>
 
@@ -125,6 +124,7 @@ export default {
     border-radius: 4px !important;
   }
 }
+
 .rowFirst {
   padding-left: 58px;
   color: #101010;

+ 46 - 27
src/views/attendanceManager/attendanceList/components/textConment.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <!--   -->
-    <el-checkbox-group
+    <!-- <el-checkbox-group
       v-if="subjectList.length > 1"
       @change="checkSubject"
       v-model="subjectId"
@@ -15,26 +15,31 @@
         :label="item.id"
         >{{ item.name }}</el-checkbox-button
       >
-    </el-checkbox-group>
-    <el-row :gutter="20" v-for="(item, index) in fitterTraining" :key="index">
-      <el-col :span="12"
-        ><div class="rowFirst">{{ item.musicScoreName }}</div></el-col
-      >
-      <el-col :span="6"
-        ><div class="rowSecond">
-          <span>{{ item.trainingSpeed }}</span> 速度
-        </div></el-col
-      >
-      <el-col :span="6"
-        ><div class="rowlast">
-          <!-- <span :class="item.trainingTimes >= item.times ? '' : 'red'">{{
-            item.trainingTimes
-          }}</span>  /-->
-          <span> {{ item.times }}</span>
-          次
-        </div></el-col
+    </el-checkbox-group> -->
+    <div v-for="(item, index) in fitterTraining" :key="index">
+      <el-alert :title="'练习组' + (index + 1)" :closable="false">
+        {{ item.subjectName }}
+      </el-alert>
+
+      <el-table
+        :data="item.trainingDetailList"
+        :show-header="false"
+        style="width: 100%;margin-bottom: 12px;"
+        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
       >
-    </el-row>
+        <el-table-column prop="musicScoreName"></el-table-column>
+        <el-table-column prop="trainingSpeed">
+          <template slot-scope="scope"
+            >{{ scope.row.trainingSpeed }}速度</template
+          >
+        </el-table-column>
+        <el-table-column prop="times">
+          <template slot-scope="scope"
+            >{{ scope.row.times }}次</template
+          >
+        </el-table-column>
+      </el-table>
+    </div>
   </div>
 </template>
 <script>
@@ -46,12 +51,12 @@ export default {
       subjectId: [],
       list: [],
       subjectList: [],
-      fitterTraining: [],
+      fitterTraining: []
     };
   },
   mounted() {
     console.log(this.trainingDetailList);
-    this.fitterTraining = this.trainingDetailList.map((item) => item);
+    this.fitterTraining = this.trainingDetailList.map(item => item);
     this.getPublicSubject();
   },
 
@@ -60,7 +65,7 @@ export default {
       try {
         const res = await getHomeworkSubjectPublic({
           courseScheduleId: this.courseScheduleId,
-          type: "HOMEWORK",
+          type: "HOMEWORK"
         });
         this.subjectList = res.data;
       } catch (e) {
@@ -73,14 +78,14 @@ export default {
         this.subjectId.shift();
       }
       if (this.subjectId) {
-        this.fitterTraining = this.trainingDetailList.filter((item) => {
+        this.fitterTraining = this.trainingDetailList.filter(item => {
           return item.subjectId == this.subjectId[0];
         });
       } else {
-        this.fitterTraining = this.trainingDetailList.map((item) => item);
+        this.fitterTraining = this.trainingDetailList.map(item => item);
       }
-    },
-  },
+    }
+  }
 };
 </script>
 
@@ -88,6 +93,20 @@ export default {
 ::v-deep .el-row {
   line-height: 40px !important;
 }
+::v-deep .el-alert__content {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  width: 100%;
+  padding: 0;
+
+  .el-alert__description {
+    margin-top: 0;
+  }
+}
+::v-deep .el-table {
+  width: 100% !important;
+}
 .rowFirst {
   // padding-left: 58px;
   color: #101010;