修改bug
This commit is contained in:
parent
a411ef4ab7
commit
210b0cacc8
@ -35,19 +35,21 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="subjectName" align="center" width="180" label="课程封面">
|
<!-- <el-table-column prop="subjectName" align="center" width="180" label="课程封面">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span class="value" v-if="scope.row.coverImg && JSON.parse(scope.row.coverImg).length > 0"
|
<span class="value" v-if="scope.row.coverImg && JSON.parse(scope.row.coverImg).length > 0"
|
||||||
style="display: flex;justify-content:center;word-wrap: break-word;white-space: normal; flex-wrap: wrap">
|
style="display: flex;justify-content:center;word-wrap: break-word;white-space: normal; flex-wrap: wrap">
|
||||||
<div v-for="(item,index) in JSON.parse(scope.row.coverImg)" :key="index" style="">
|
<div v-for="(item,index) in JSON.parse(scope.row.coverImg)" :key="index" style="">
|
||||||
<!-- <img :preview="item ? $store.state.FILEURL + item.url : ''"
|
需要注释
|
||||||
:src="item ? $store.state.FILEURL + item.url : ''" alt="" width="50px" height="50px" style="margin-right: 10px;"/> -->
|
<img :preview="item ? $store.state.FILEURL + item.url : ''"
|
||||||
|
:src="item ? $store.state.FILEURL + item.url : ''" alt="" width="50px" height="50px" style="margin-right: 10px;"/>
|
||||||
|
需要注释
|
||||||
<img :preview="item.url ? item.url : ''"
|
<img :preview="item.url ? item.url : ''"
|
||||||
:src="item.url ? item.url : ''" alt="" width="50px" height="50px" style="margin-right: 10px;cursor:pointer"/>
|
:src="item.url ? item.url : ''" alt="" width="50px" height="50px" style="margin-right: 10px;cursor:pointer"/>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column prop="remark" align="center" label="备注">
|
<el-table-column prop="remark" align="center" label="备注">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- <el-tooltip class="item" effect="dark" :content="scope.row.remark" placement="left">
|
<!-- <el-tooltip class="item" effect="dark" :content="scope.row.remark" placement="left">
|
||||||
@ -58,10 +60,10 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="240" label="操作" align="center">
|
<el-table-column width="240" label="操作" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" style="color:#5886f6" icon="el-icon-edit" @click="editBefore(scope.row,'编辑课程')" >
|
<el-button size="medium" type="text" style="color:#5886f6" icon="el-icon-edit" @click="editBefore(scope.row,'编辑课程')" >
|
||||||
<span style="color:black">编辑</span>
|
<span style="color:black">编辑</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="mini" type="text" style="color:#ec4b52" class="delete-btn" icon="el-icon-delete" @click.native.stop="remove(scope.row) ">
|
<el-button size="medium" type="text" style="color:#ec4b52" class="delete-btn" icon="el-icon-delete" @click.native.stop="remove(scope.row) ">
|
||||||
<span style="color:black">删除</span>
|
<span style="color:black">删除</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@ -99,7 +101,7 @@
|
|||||||
<div class="el-upload__text"><i style="font-size: 18px;" class="el-icon-upload"></i>将文件拖到此处,或<em>点击上传</em></div>
|
<div class="el-upload__text"><i style="font-size: 18px;" class="el-icon-upload"></i>将文件拖到此处,或<em>点击上传</em></div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="课程封面" prop="coverImg"
|
<!-- <el-form-item label="课程封面" prop="coverImg"
|
||||||
:rules="[{required:true,message:' ',trigger:['blur','change']}]">
|
:rules="[{required:true,message:' ',trigger:['blur','change']}]">
|
||||||
<el-upload :action="$store.state.UPLOADURL" list-type="picture-card" name="files" :limit="1"
|
<el-upload :action="$store.state.UPLOADURL" list-type="picture-card" name="files" :limit="1"
|
||||||
:on-remove="(file, fileList) => coverHandleRemove(file, fileList)"
|
:on-remove="(file, fileList) => coverHandleRemove(file, fileList)"
|
||||||
@ -109,7 +111,7 @@
|
|||||||
>
|
>
|
||||||
<i slot="default" class="el-icon-plus"></i>
|
<i slot="default" class="el-icon-plus"></i>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input type="textarea" :autosize="{minRows: 2, maxRows: 5}" v-model="addCourseForm.remark"></el-input>
|
<el-input type="textarea" :autosize="{minRows: 2, maxRows: 5}" v-model="addCourseForm.remark"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -317,7 +319,7 @@ export default {
|
|||||||
editBefore(item,title){
|
editBefore(item,title){
|
||||||
this.title = title
|
this.title = title
|
||||||
this.addCourseForm = JSON.parse(JSON.stringify(item))
|
this.addCourseForm = JSON.parse(JSON.stringify(item))
|
||||||
this.coverFileList = JSON.parse(item.coverImg)
|
// this.coverFileList = JSON.parse(item.coverImg)
|
||||||
this.materialFileList = JSON.parse(item.fileUrl)
|
this.materialFileList = JSON.parse(item.fileUrl)
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
},
|
},
|
||||||
@ -405,10 +407,10 @@ export default {
|
|||||||
this.$message.error('请上传视频文件')
|
this.$message.error('请上传视频文件')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(!this.addCourseForm.coverImg){
|
// if(!this.addCourseForm.coverImg){
|
||||||
this.$message.error('请上传课程封面')
|
// this.$message.error('请上传课程封面')
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
if(this.title === '新增课程'){
|
if(this.title === '新增课程'){
|
||||||
addCourseApi(this.addCourseForm).then((res)=>{
|
addCourseApi(this.addCourseForm).then((res)=>{
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user