Commit e8bc5fc7 authored by 王's avatar

期数管理bug

parent 1af2d454
...@@ -215,6 +215,7 @@ ...@@ -215,6 +215,7 @@
this.newDialog.show = true; this.newDialog.show = true;
}, },
onEdit(row){ onEdit(row){
console.log('onEdit', row);
let weekList = []; let weekList = [];
if(row.rest_week_day){ if(row.rest_week_day){
row.rest_week_day.split(',').forEach((val)=>{ row.rest_week_day.split(',').forEach((val)=>{
...@@ -234,7 +235,8 @@ ...@@ -234,7 +235,8 @@
title: row.title, title: row.title,
goods_id: row.goods_id, goods_id: row.goods_id,
rest_week_day: weekList, rest_week_day: weekList,
teacher_ids: teacherList teacher_ids: teacherList,
course_id: row.course_id
} }
this.newDialog.title = '编辑期数'; this.newDialog.title = '编辑期数';
this.newDialog.show = true; this.newDialog.show = true;
......
...@@ -263,8 +263,6 @@ ...@@ -263,8 +263,6 @@
this.form.start_num='' this.form.start_num=''
getLessonDetailApi(id,{}).then((res) => { getLessonDetailApi(id,{}).then((res) => {
this.itemOptions = res.detail[res.type] this.itemOptions = res.detail[res.type]
console.log('getLessonDetail id', id)
console.log('getLessonDetailthis.itemOptions', this.itemOptions)
}) })
}, },
getGoodsOption(){ getGoodsOption(){
...@@ -282,9 +280,8 @@ ...@@ -282,9 +280,8 @@
this.form = this.dialogObj.form; this.form = this.dialogObj.form;
this.getTeachers(); this.getTeachers();
this.getGoodsOption(); this.getGoodsOption();
console.log('this.dialogObj.form', this.dialogObj.form) if(this.dialogObj.form.course_id){
if(this.dialogObj.form.goods_id){ this.getLessonDetail(this.dialogObj.form.course_id);
this.getLessonDetail(this.dialogObj.form.goods_id);
} }
this.teacherList = this.dialogObj.form.teacher_ids; this.teacherList = this.dialogObj.form.teacher_ids;
} }
......
...@@ -32,11 +32,12 @@ ...@@ -32,11 +32,12 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="用户信息" label="用户信息"
min-width="140"
className="userInfo"
> >
<template slot-scope="scope"> <template slot-scope="scope">
id:{{scope.row.user_id}} <img class="avatar" :src="scope.row.user_avatar">
<br> {{scope.row.user_nickname}}(ID:{{scope.row.user_id}})
名称:{{scope.row.user_nickname}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -172,4 +173,17 @@ ...@@ -172,4 +173,17 @@
.refund{ .refund{
padding: 20px 0; padding: 20px 0;
} }
.avatar {
width:50px;
height: 50px;
border-radius: 50%;
}
</style>
<style>
.userInfo >div{
display: flex;
flex-flow: row nowrap;
justify-content: flex-start;
align-items: center;
}
</style> </style>
...@@ -31,9 +31,12 @@ ...@@ -31,9 +31,12 @@
<a v-else-if="scope.row.type === 'image' && scope.row.content" :href="scope.row.content" target="_blank"> <a v-else-if="scope.row.type === 'image' && scope.row.content" :href="scope.row.content" target="_blank">
<img class="shotcut" :src="scope.row.content"> <img class="shotcut" :src="scope.row.content">
</a> </a>
<div v-else-if="scope.row.variable"> <div v-else-if="scope.row.type === 'image' && scope.row.variable">
老师二维码 老师二维码
</div> </div>
<div v-else-if="scope.row.type === 'news'">
图文消息
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -148,6 +151,8 @@ ...@@ -148,6 +151,8 @@
return '文字' return '文字'
} else if(value === 'image') { } else if(value === 'image') {
return '图片' return '图片'
} else if(value === 'news'){
return '图文'
} else { } else {
return val return val
} }
......
This diff is collapsed.
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<div class="progress" v-if="showProgress"> <div class="progress" v-if="showProgress">
<el-progress :percentage="progress" status="success"></el-progress> <el-progress :percentage="progress" status="success"></el-progress>
</div> </div>
<div class="media-panel-top-right"> <div class="media-panel-top-right" v-if="type !== 'news'">
<el-upload <el-upload
class="upload-demo" class="upload-demo"
ref="upload" ref="upload"
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</el-upload> </el-upload>
</div> </div>
</div> </div>
<div v-if="mediaList.length > 0 && type === 'news'" class="d-start"> <div v-if="mediaList.length > 0 && type === 'news'" class="d-start" style="margin-bottom: 20px">
<div v-for="(item,index) in mediaList" :key="index" class="news-media"> <div v-for="(item,index) in mediaList" :key="index" class="news-media">
<el-card :body-style="{ padding: '0px' }"> <el-card :body-style="{ padding: '0px' }">
<div v-for="(child, childIndex) in item.content.news_item" style="position: relative"> <div v-for="(child, childIndex) in item.content.news_item" style="position: relative">
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
</el-card> </el-card>
</div> </div>
</div> </div>
<page v-if="mediaList.length > 0 && type === 'news'" :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/>
<div v-if="mediaList.length > 0 && type !== 'news'"> <div v-if="mediaList.length > 0 && type !== 'news'">
<el-table <el-table
:data="mediaList" :data="mediaList"
......
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