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

update

parent 5bb62fd3
......@@ -92,9 +92,13 @@
:data="list"
@sort-change="sortMethod"
:style="{width: width+'px'}"
fixed
>
<el-table-column prop="periods_title" label="期数名称"></el-table-column>
fixed>
<!--<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
prop="duration_over_at"
label="开课看课时间"
......@@ -281,6 +285,29 @@ export default {
},
components: { page },
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 }) {
// console.log(h)
return h("span", [
......
......@@ -32,7 +32,6 @@
<template slot-scope="scope">
<img class="avatar" :src="scope.row.avatar">
{{scope.row.nickname}}(ID:{{scope.row.user_id}})
</template>
</el-table-column>
<el-table-column prop="class_name" label="班级名称"></el-table-column>
......
......@@ -2,7 +2,7 @@
<div class="periods">
<div class="form-block">
<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-form-item>
<el-form-item label="商品名称">
......@@ -98,25 +98,19 @@
</el-table>
</template>
</el-table-column>
<el-table-column
label="期数标题">
<el-table-column label="期数名称" width="150px">
<template slot-scope="scope">
<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>
</template>
</el-table-column>
<el-table-column
prop="goods_name"
label="商品名称">
<el-table-column prop="goods_name" label="商品名称">
<template slot-scope="scope">
{{scope.row.goods_price/ 100 }}元】{{scope.row.goods_name}}
</template>
</el-table-column>
<el-table-column
prop="course_title"
label="课程名称">
</el-table-column>
<el-table-column prop="course_title" label="课程名称"></el-table-column>
<el-table-column
prop="start_name"
label="开始主题/歌">
......@@ -242,6 +236,29 @@
page
},
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 }) {
// common.tipFilter(h,column,tipArr2)
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