|
@@ -24,36 +24,35 @@
|
|
|
color: '#333',
|
|
|
}"
|
|
|
>
|
|
|
- <template v-for="(item, index) in tableSetChild">
|
|
|
- <el-table-column
|
|
|
- :width="item.width"
|
|
|
- :key="index"
|
|
|
- :label="item.label"
|
|
|
- align="center"
|
|
|
- >
|
|
|
- <template slot-scope="scope1">
|
|
|
- <span v-if="item.scope === 'types'">
|
|
|
- {{
|
|
|
- scope1.row[item.prop] === 1
|
|
|
- ? "开课"
|
|
|
- : scope1.row[item.prop] === 0
|
|
|
- ? "未开课"
|
|
|
- : "未知"
|
|
|
- }}
|
|
|
- </span>
|
|
|
- <span v-else-if="item.scope === 'sectionType'">
|
|
|
- {{ getTypes(scope1.row[item.prop]) }}
|
|
|
- </span>
|
|
|
- <span v-else-if="item.scope === 'studentStatus'">
|
|
|
- 已观看{{ scope1.row[item.prop1] }}节
|
|
|
- <span style="color: green">{{
|
|
|
- compons(scope1.row[item.prop1], scope1.row[item.prop2])
|
|
|
- }}</span>
|
|
|
- </span>
|
|
|
- <span v-else> {{ scope1.row[item.prop] }} </span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </template>
|
|
|
+ <el-table-column
|
|
|
+ v-for="(item, index) in tableSetChild"
|
|
|
+ :width="item.width"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope1">
|
|
|
+ <span v-if="item.scope === 'types'">
|
|
|
+ {{
|
|
|
+ scope1.row[item.prop] === 1
|
|
|
+ ? "开课"
|
|
|
+ : scope1.row[item.prop] === 0
|
|
|
+ ? "未开课"
|
|
|
+ : "未知"
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
+ <span v-else-if="item.scope === 'sectionType'">
|
|
|
+ {{ getTypes(scope1.row[item.prop]) }}
|
|
|
+ </span>
|
|
|
+ <span v-else-if="item.scope === 'studentStatus'">
|
|
|
+ 已观看{{ scope1.row[item.prop1] }}节
|
|
|
+ <span style="color: green">{{
|
|
|
+ compons(scope1.row[item.prop1], scope1.row[item.prop2])
|
|
|
+ }}</span>
|
|
|
+ </span>
|
|
|
+ <span v-else> {{ scope1.row[item.prop] }} </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
label="操作"
|
|
|
align="center"
|
|
@@ -64,7 +63,7 @@
|
|
|
<el-button
|
|
|
type="text"
|
|
|
@click="
|
|
|
- wantInfo(scope1s.row, scope1s.$index, scope.row.goodsId)
|
|
|
+ wantInfo(scope1s.row, scope1s.$index, scope.row.goodsId,scope.row.gradeId)
|
|
|
"
|
|
|
>查看</el-button
|
|
|
>
|
|
@@ -73,32 +72,31 @@
|
|
|
</el-table>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <template v-for="(item, index) in tableSet">
|
|
|
- <el-table-column
|
|
|
- :width="item.width"
|
|
|
- :key="index"
|
|
|
- :label="item.label"
|
|
|
- align="center"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="item.scope === 'yewu'">
|
|
|
- {{ scope.row[item.prop1] }}-{{ scope.row[item.prop2] }}-{{
|
|
|
- scope.row[item.prop3]
|
|
|
- }}
|
|
|
- </span>
|
|
|
- <span v-else-if="item.scope === 'time'">
|
|
|
- {{ $methodsTools.onlyForma(scope.row[item.prop]) }}
|
|
|
- </span>
|
|
|
- <span v-else-if="item.scope === 'moreTime'">
|
|
|
- {{ $methodsTools.onlyForma(scope.row[item.prop1]) }}
|
|
|
- {{ $methodsTools.onlyForma(scope.row[item.prop2]) }}-
|
|
|
- </span>
|
|
|
- <span v-else>
|
|
|
- {{ scope.row[item.prop] }}{{ item.ch ? item.ch : "" }}
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </template>
|
|
|
+ <el-table-column
|
|
|
+ v-for="(item, index) in tableSet"
|
|
|
+ :width="item.width"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="item.scope === 'yewu'">
|
|
|
+ {{ scope.row[item.prop1] }}-{{ scope.row[item.prop2] }}-{{
|
|
|
+ scope.row[item.prop3]
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
+ <span v-else-if="item.scope === 'time'">
|
|
|
+ {{ $methodsTools.onlyForma(scope.row[item.prop]) }}
|
|
|
+ </span>
|
|
|
+ <span v-else-if="item.scope === 'moreTime'">
|
|
|
+ {{ $methodsTools.onlyForma(scope.row[item.prop1]) }}
|
|
|
+ {{ $methodsTools.onlyForma(scope.row[item.prop2]) }}-
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
+ {{ scope.row[item.prop] }}{{ item.ch ? item.ch : "" }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
<el-dialog
|
|
|
:visible.sync="dialogVisible"
|
|
@@ -127,43 +125,46 @@
|
|
|
>
|
|
|
<el-table-column label="序号" align="center" type="index" width="70">
|
|
|
</el-table-column>
|
|
|
- <template v-for="(item, index) in studyListRemard">
|
|
|
- <el-table-column
|
|
|
- :width="item.width"
|
|
|
- :key="index"
|
|
|
- :label="item.label"
|
|
|
- align="center"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="item.scope === 'studyTime'">
|
|
|
- {{ $methodsTools.onlyForma(scope.row[item.prop1])
|
|
|
- }}{{
|
|
|
- scope.row[item.prop1] && scope.row[item.prop2] ? "至" : ""
|
|
|
- }}
|
|
|
- {{ $methodsTools.onlyForma(scope.row[item.prop2]) }}
|
|
|
- </span>
|
|
|
- <span v-else-if="item.scope === 'status'">
|
|
|
- {{
|
|
|
- scope.row[item.prop] === 1
|
|
|
- ? "完成"
|
|
|
- : scope.row[item.prop] === 0
|
|
|
- ? "未学习"
|
|
|
- : scope.row[item.prop] === 2
|
|
|
- ? "学习中"
|
|
|
- : "未知"
|
|
|
- }}
|
|
|
- </span>
|
|
|
- <span v-else-if="item.scope === 'computerTimes'">
|
|
|
- {{
|
|
|
- $methodsTools.secondToDate(
|
|
|
- scope.row[item.prop]
|
|
|
- )
|
|
|
- }}
|
|
|
- </span>
|
|
|
- <span v-else> {{ scope.row[item.prop] }} </span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </template>
|
|
|
+ <el-table-column
|
|
|
+ v-for="(item, index) in studyListRemard"
|
|
|
+ :width="item.width"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="item.scope === 'studyTime'">
|
|
|
+ {{ $methodsTools.onlyForma(scope.row[item.prop1])
|
|
|
+ }}{{
|
|
|
+ scope.row[item.prop1] && scope.row[item.prop2] ? "至" : ""
|
|
|
+ }}
|
|
|
+ {{ $methodsTools.onlyForma(scope.row[item.prop2]) }}
|
|
|
+ </span>
|
|
|
+ <span v-else-if="item.scope === 'timeCg'">{{
|
|
|
+ $methodsTools.secondToDate(scope.row[item.prop], false)
|
|
|
+ }}</span>
|
|
|
+ <span v-else-if="item.scope === 'status'">
|
|
|
+ {{
|
|
|
+ scope.row[item.prop] === 1
|
|
|
+ ? "完成"
|
|
|
+ : scope.row[item.prop] === 0
|
|
|
+ ? "未学习"
|
|
|
+ : scope.row[item.prop] === 2
|
|
|
+ ? "学习中"
|
|
|
+ : "未知"
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
+ <span v-else-if="item.scope === 'computerTimes'">
|
|
|
+ {{
|
|
|
+ computerTimesFunc(
|
|
|
+ scope.row[item.prop1],
|
|
|
+ scope.row[item.prop2]
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
+ <span v-else> {{ scope.row[item.prop] }} </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
@@ -292,6 +293,7 @@ export default {
|
|
|
{
|
|
|
label: "节时长",
|
|
|
prop: "durationTime",
|
|
|
+ scope: "timeCg",
|
|
|
},
|
|
|
{
|
|
|
label: "学习时间",
|
|
@@ -302,9 +304,10 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: "学习时长",
|
|
|
- prop: "videoCurrentTime",
|
|
|
+ prop1: "startTime",
|
|
|
+ prop2: "endTime",
|
|
|
width: "100px",
|
|
|
- scope:"computerTimes"
|
|
|
+ scope: "computerTimes",
|
|
|
},
|
|
|
{
|
|
|
label: "学习状态",
|
|
@@ -317,6 +320,18 @@ export default {
|
|
|
loading: false,
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ computerTimesFunc: function () {
|
|
|
+ return function (val1, val2) {
|
|
|
+ if (val1 && val2) {
|
|
|
+ var ast = this.$methodsTools.secondToDate(val2 - val1, false);
|
|
|
+ return ast;
|
|
|
+ } else {
|
|
|
+ return "00:00";
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.loading = true;
|
|
|
this.$api
|
|
@@ -345,13 +360,13 @@ export default {
|
|
|
let str = [];
|
|
|
for (let i = 0; i < arrays.length; i++) {
|
|
|
if (arrays[i] == 1) {
|
|
|
- str.push("直播");
|
|
|
+ str.push("录播");
|
|
|
}
|
|
|
if (arrays[i] == 2) {
|
|
|
- str.push("回放");
|
|
|
+ str.push("直播");
|
|
|
}
|
|
|
if (arrays[i] == 3) {
|
|
|
- str.push("录播");
|
|
|
+ str.push("回放");
|
|
|
}
|
|
|
}
|
|
|
return str.toString();
|
|
@@ -361,12 +376,13 @@ export default {
|
|
|
this.dialogVisible = false;
|
|
|
},
|
|
|
//获取弹出窗内容
|
|
|
- wantInfo(item, index, goodsId) {
|
|
|
+ wantInfo(item, index, goodsId,gradeId) {
|
|
|
this.$api
|
|
|
.inquiregradestudentlistSection({
|
|
|
userId: this.$route.query.id,
|
|
|
courseId: item.courseId,
|
|
|
goodsId: goodsId,
|
|
|
+ gradeId:gradeId
|
|
|
})
|
|
|
.then((res) => {
|
|
|
this.RemardList = res.rows;
|