|
@@ -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,17 @@ 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;
|
|
|
+ }
|
|
|
+}
|
|
|
.rowFirst {
|
|
|
// padding-left: 58px;
|
|
|
color: #101010;
|