Commit 7b28e250 authored by 赵茹林's avatar 赵茹林

update

parent 5bb62fd3
...@@ -92,9 +92,13 @@ ...@@ -92,9 +92,13 @@
:data="list" :data="list"
@sort-change="sortMethod" @sort-change="sortMethod"
:style="{width: width+'px'}" :style="{width: width+'px'}"
fixed fixed>
> <!--<el-table-column prop="periods_title" label="期数名称"></el-table-column>-->
<el-table-column prop="periods_title" label="期数名称"></el-table-column> <el-table-column prop="periods_title" label="期数名称" width="170px">
<template slot-scope="scope">
<div v-html="periodName(scope.row)"></div>
</template>
</el-table-column>
<el-table-column <el-table-column
prop="duration_over_at" prop="duration_over_at"
label="开课看课时间" label="开课看课时间"
...@@ -281,6 +285,29 @@ export default { ...@@ -281,6 +285,29 @@ export default {
}, },
components: { page }, components: { page },
methods: { methods: {
periodName(val) {
let str = '';
if (!val.periods_title) {
str = '-'
} else {
if (val.goods_id) {
str += `【${val.goods_id}】`
}
if (val.periods_title) {
str += `${val.periods_title}<br>`
}
if (val.watch_num) {
str += `${val.watch_num}课时`
}
if (val.start_at) {
str += `(${val.start_at.slice(5).replace('-', '')})`
}
if (val.has_watch_num || val.has_watch_num == 0) {
str += `-d${val.has_watch_num}`
}
}
return str
},
rendertip(h, { column }) { rendertip(h, { column }) {
// console.log(h) // console.log(h)
return h("span", [ return h("span", [
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
<template slot-scope="scope"> <template slot-scope="scope">
<img class="avatar" :src="scope.row.avatar"> <img class="avatar" :src="scope.row.avatar">
{{scope.row.nickname}}(ID:{{scope.row.user_id}}) {{scope.row.nickname}}(ID:{{scope.row.user_id}})
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="class_name" label="班级名称"></el-table-column> <el-table-column prop="class_name" label="班级名称"></el-table-column>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="periods"> <div class="periods">
<div class="form-block"> <div class="form-block">
<el-form label-width="85px" inline size="small"> <el-form label-width="85px" inline size="small">
<el-form-item label="期数标题"> <el-form-item label="期数名称">
<el-input v-model="title" placeholder="请输入内容" style="width: 150px" clearable></el-input> <el-input v-model="title" placeholder="请输入内容" style="width: 150px" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="商品名称"> <el-form-item label="商品名称">
...@@ -98,25 +98,19 @@ ...@@ -98,25 +98,19 @@
</el-table> </el-table>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="期数名称" width="150px">
label="期数标题">
<template slot-scope="scope"> <template slot-scope="scope">
<router-link :to="{name:'class', query: { goods_id: scope.row.goods_id, periods_id: scope.row.id}}" > <router-link :to="{name:'class', query: { goods_id: scope.row.goods_id, periods_id: scope.row.id}}" >
{{scope.row.title}} <div v-html="periodName(scope.row)"></div>
</router-link> </router-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="goods_name" label="商品名称">
prop="goods_name"
label="商品名称">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.goods_price/ 100 }}元】{{scope.row.goods_name}} {{scope.row.goods_price/ 100 }}元】{{scope.row.goods_name}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="course_title" label="课程名称"></el-table-column>
prop="course_title"
label="课程名称">
</el-table-column>
<el-table-column <el-table-column
prop="start_name" prop="start_name"
label="开始主题/歌"> label="开始主题/歌">
...@@ -242,6 +236,29 @@ ...@@ -242,6 +236,29 @@
page page
}, },
methods: { methods: {
periodName(val) {
let str = '';
if (!val.title) {
str = '-'
} else {
if (val.goods_id) {
str += `【${val.goods_id}】`
}
if (val.title) {
str += `${val.title}<br>`
}
if (val.watch_num) {
str += `${val.watch_num}课时`
}
if (val.start_at) {
str += `(${val.start_at.slice(5).replace('-', '')})`
}
if (val.has_watch_num || val.has_watch_num == 0) {
str += `-d${val.has_watch_num}`
}
}
return str
},
rendertip(h, { column }) { rendertip(h, { column }) {
// common.tipFilter(h,column,tipArr2) // common.tipFilter(h,column,tipArr2)
return h("span", [ return h("span", [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment