| | |
| | | :visible.sync="dialogVisible" |
| | | :modal-append-to-body="false" |
| | | :close-on-click-modal="false" |
| | | width="600px" |
| | | width="50%" |
| | | :before-close="handleClose" |
| | | > |
| | | <div style="margin: 0 25px"> |
| | |
| | | |
| | | <!-- </div>--> |
| | | <div style="display: flex;flex-direction: column"> |
| | | <span style="font-size: 20px;font-weight: 550">课程章节资源</span> |
| | | <span style="font-size: 20px;font-weight: 550">课程内容</span> |
| | | <el-table |
| | | border |
| | | :data="courseTable" |
| | |
| | | <el-table-column |
| | | prop="chapterName" |
| | | label="小节名称" align="center"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="teacher" |
| | | label="讲师" align="center"> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.teacher ? scope.row.teacher : '--'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="资源类别" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | <span slot="footer" class="dialog-footer" v-if="showBtn"> |
| | | <el-button type="primary" @click="dialogVisible = false">审核通过</el-button> |
| | | <el-button type="warning" @click="dialogVisible = false">审核驳回</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | |
| | | dialogStatus: '', |
| | | dataForm: {}, |
| | | courseTable: [], |
| | | courseList: [] |
| | | courseList: [], |
| | | showBtn:false |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | openDialog (data,type) { |
| | | openDialog (data,type,courseType) { |
| | | this.dialogVisible = true; |
| | | |
| | | console.log('this.showBtn ',type,courseType ) |
| | | if(type === 'course'){ |
| | | this.courseList = data.outline |
| | | this.courseTable = this.recursion(data.outline,type) |
| | | |
| | | if(courseType == 'check'){ |
| | | this.showBtn = true |
| | | console.log('this.showBtn ',this.showBtn ) |
| | | } |
| | | }else { |
| | | console.log('courseT2222222222able',data.chapterList) |
| | | this.courseList = data.chapterList |
| | | this.courseTable = this.recursion(data.chapterList,type) |
| | | } |
| | | |
| | | console.log('courseT2222222222able',this.courseTable) |
| | | console.log('coursee',this.courseTable) |
| | | }, |
| | | recursion (data,type) { |
| | | let tmp = [] |
| | |
| | | this.isClose = !this.isClose |
| | | }, |
| | | handleClose() { |
| | | this.showBtn = false |
| | | this.dialogVisible = false; |
| | | this.$emit("getList"); |
| | | }, |
| | | onSubmit() { |
| | | this.$emit("getList"); |
| | | this.dialogVisible = false; |
| | | this.$emit("getList"); |
| | | this.dialogVisible = false; |
| | | }, |
| | | objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
| | | if(columnIndex === 0) { |
| | |
| | | .open{ |
| | | height: 15px; |
| | | } |
| | | .dialog-footer{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-around; |
| | | } |
| | | </style> |