|
@@ -1,70 +1,48 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <!-- -->
|
|
|
- <!-- <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-group> -->
|
|
|
<div v-for="(item, index) in fitterTraining" :key="index">
|
|
|
<el-alert :title="'练习组' + (index + 1)" :closable="false">
|
|
|
{{ item.subjectName }}
|
|
|
</el-alert>
|
|
|
- <div style="padding: 8px 16px 8px;">练习说明:{{ item.memo }}</div>
|
|
|
- <el-table
|
|
|
- :data="item.trainingDetailList"
|
|
|
- :show-header="true"
|
|
|
- style="width: 100%;margin-bottom: 12px;"
|
|
|
- :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
- >
|
|
|
- <el-table-column label="名称" prop="musicScoreName"></el-table-column>
|
|
|
- <el-table-column label="类型" prop="type"
|
|
|
- ><template slot-scope="scope">{{
|
|
|
- scope.row.homeworkType === "MUSIC_SCORE" ? "曲目" : "视频"
|
|
|
- }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="速度" prop="trainingSpeed">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="scope.row.homeworkType === 'MUSIC_SCORE'">
|
|
|
- {{ scope.row.trainingSpeed }}速度
|
|
|
- </span>
|
|
|
- <span v-else>--</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="times" label="总计">
|
|
|
- <template slot-scope="scope"
|
|
|
- >{{ scope.row.times }}次</template
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <!-- <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> -->
|
|
|
+ <template v-if="item.trainingVideoAndMusic.length > 0">
|
|
|
+ <div style="padding: 8px 16px 8px;">练习说明:{{ item.memo }}</div>
|
|
|
+ <el-table
|
|
|
+ :data="item.trainingVideoAndMusic"
|
|
|
+ :show-header="true"
|
|
|
+ style="width: 100%;margin-bottom: 12px;"
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
+ >
|
|
|
+ <el-table-column label="名称" prop="musicScoreName"></el-table-column>
|
|
|
+ <el-table-column label="类型" prop="type"
|
|
|
+ ><template slot-scope="scope">{{
|
|
|
+ scope.row.homeworkType === "MUSIC_SCORE" ? "曲目" : "视频"
|
|
|
+ }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="速度" prop="trainingSpeed">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.homeworkType === 'MUSIC_SCORE'">
|
|
|
+ {{ scope.row.trainingSpeed }}速度
|
|
|
+ </span>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="times" label="总计">
|
|
|
+ <template slot-scope="scope"
|
|
|
+ >{{ scope.row.times }}次</template
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </template>
|
|
|
+ <template v-if="item.trainingTxt.length > 0">
|
|
|
+ <el-table
|
|
|
+ :data="item.trainingTxt"
|
|
|
+ style="width: 100%;margin-bottom: 12px;"
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
+ >
|
|
|
+ <el-table-column prop="desc" label="练习内容">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -81,9 +59,26 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- console.log(this.trainingDetailList);
|
|
|
- this.fitterTraining = this.trainingDetailList.map(item => item);
|
|
|
- // this.getPublicSubject();
|
|
|
+ const list = this.trainingDetailList
|
|
|
+ const temp = []
|
|
|
+ list.forEach((item) => {
|
|
|
+ const child = item.trainingDetailList || []
|
|
|
+ const videoMusic = []
|
|
|
+ const txt = []
|
|
|
+ child.forEach(c => {
|
|
|
+ if(c === "DESCRIPTION") {
|
|
|
+ txt.push(c)
|
|
|
+ } else {
|
|
|
+ videoMusic.push(c)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ temp.push({
|
|
|
+ ...item,
|
|
|
+ trainingVideoAndMusic: videoMusic,
|
|
|
+ trainingTxt: txt
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.fitterTraining = temp.map(item => item);
|
|
|
},
|
|
|
|
|
|
methods: {
|