Commit ed6e05ac authored by 王's avatar

期数修改

parent aea35002
......@@ -12,8 +12,8 @@ module.exports = {
//本地代理设置
proxyTable: {
'/api': {
target: 'http://local.base-api.sing.com', // 接口的域名
// target: 'http://wechat.test.singsingenglish.com/',
// target: 'http://local.base-api.sing.com', // 接口的域名
target: 'http://wechat.test.singsingenglish.com/',
changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
}
},
......
......@@ -29,10 +29,6 @@
<el-table
:data="userList"
style="width: 100%">
<el-table-column
prop="id"
label="id">
</el-table-column>
<el-table-column
prop="title"
label="课程名">
......
......@@ -226,7 +226,6 @@
this.newDialog.form.start_at = row.start_at;
this.newDialog.form.title = row.title;
this.newDialog.form.goods_id = row.goods_id;
console.log('row', row)
let weekList = [];
if(row.rest_week_day){
row.rest_week_day.split(',').forEach((val)=>{
......@@ -235,6 +234,7 @@
}
this.newDialog.form.rest_week_day = weekList;
let teacherList = [];
console.log('row edit', row);
if(row.teacher_ids){
row.teacher_ids.split(',').forEach((val)=>{
teacherList.push(parseInt(val));
......
......@@ -11,7 +11,7 @@
<el-row>
<el-col :span="10">
<el-form-item label="商品名称" prop="goods_id">
<el-select v-model="form.goods_id" placeholder="请选择" clearable @change="onOptionChange">
<el-select v-model="form.goods_id" placeholder="请选择" clearable @change="onOptionChange" :disabled="form.id ? true : false">
<el-option
v-for="(data,index) in goodList"
:key="index"
......@@ -45,7 +45,7 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="带班老师" prop="teacherList">
<el-form-item label="带班老师" prop="teacherList" v-if = "!form.id">
<el-select v-model="form.teacherList" multiple placeholder="请选择">
<el-option
v-for="item in teacherOptions"
......@@ -55,7 +55,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="观摩老师" prop="viewTeacher">
<el-form-item label="观摩老师" prop="viewTeacher" v-if = "!form.id">
<el-select v-model="form.viewTeacher" placeholder="请选择">
<el-option
v-for="item in teacherOptions"
......@@ -202,19 +202,19 @@
title: this.form.title,
start_num: this.form.start_num,
start_at: this.form.start_at,
rest_week_day: this.form.rest_week_day ? this.form.rest_week_day.join(',') : '',
teacher_ids: this.form.teacherList.join(','),
view_teacher_id: parseInt(this.form.viewTeacher)
rest_week_day: this.form.rest_week_day ? this.form.rest_week_day.join(',') : ''
}
if (this.form.id) {
getEditPeriodsApi(this.form.id,json).then(res=>{
this.$message({
type: 'success',
message: '添加成功!'
message: '编辑成功!'
});
this.$emit("reflash");
})
} else {
json.teacher_ids = this.form.teacherList.join(',');
json.view_teacher_id = parseInt(this.form.viewTeacher);
getAddPeriodsApi(_id,json).then(res=>{
this.$message({
type: 'success',
......
......@@ -4,7 +4,7 @@
<div>
<ul class="media-navs">
<!---->
<!--<li class="media-nav js_top" :class="type === 'view' ? 'media-current-nav' : ''" @click="getMediaType('view')">-->
<!--<li class="media-nav js_top" :class="type === 'news' ? 'media-current-nav' : ''" @click="getMediaType('news')">-->
<!--<a href="javascript:void(0);">图文消息<br /></a>-->
<!--</li>-->
<li class="media-nav js_top" :class="type === 'image' ? 'media-current-nav' : ''" @click="getMediaType('image')">
......@@ -55,17 +55,23 @@
<el-table-column
label="URL">
<template slot-scope="scope">
<a :href="scope.row.url" v-if="type === 'image'">
<a :href="scope.row.url" v-if="type === 'image'" target="_blank">
<img style="width: 60px;" :src="scope.row.url"/>
</a>
<video v-if="type === 'video'" width="100" height="100" controls="controls">
<source :src="scope.row.url"/>
Your browser does not support the video tag.
</video>
<!--<video v-if="type === 'video'" width="100" height="100" controls="controls">-->
<!--<source :src="scope.row.info.down_url"/>-->
<!--Your browser does not support the video tag.-->
<!--</video>-->
<a :href="scope.row.info.down_url" v-if="type === 'video'" target="_blank">
{{scope.row.info.title}}
</a>
<audio v-if="type === 'voice'" id="myAudio" controls>
<source :src="scope.row.url"/>
Your browser does not support the audio element.
</audio>
<!--<div v-if="type === 'news'">-->
<!--<div v-html="scope.row.content.news_item[0].content"></div>-->
<!--</div>-->
</template>
</el-table-column>
</el-table>
......
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