| | |
| | | class="showContent" /> |
| | | <img v-if="scope.row.contentType === 'img'" :src="'/api/files/' + scope.row.contentUrl.url" |
| | | class="showContent" /> |
| | | <el-link type="primary" v-if="scope.row.contentType === 'pdf'" :src="'/api/files/' + scope.row.contentUrl.url" |
| | | class="showContent">点击查看</el-link> |
| | | <el-link type="primary" v-if="scope.row.contentType === 'pdf'" |
| | | class="showContent" @click="checkPdf('/api/files/' + scope.row.contentUrl.url)">点击查看</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="attachment" label="附件"> |
| | |
| | | import OnlineStudyAPI from '@/api/online-study'; |
| | | import StudyTypeAPI from '@/api/study-type'; |
| | | import Upload from '@/components/UploadC'; |
| | | |
| | | export default { |
| | | name: 'type', |
| | | components: { Upload, Pagination }, |
| | |
| | | typeList: [], |
| | | searchForm: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | pageSize: 5, |
| | | typeName: '' |
| | | }, |
| | | total: 0, |
| | | tableData: [], |
| | | open: false, |
| | | pdfDialog: false, |
| | | form: { |
| | | contentType: 'video', |
| | | subject: '', |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | checkPdf(url) { |
| | | window.open('/#/online/study/pdf/view?pdfUrl=' + url, '_blank') |
| | | }, |
| | | closePdfDialog() { |
| | | this.pdfDialog = false; |
| | | }, |
| | | fileChange() { |
| | | this.form.contentUrl = []; |
| | | }, |
| | |
| | | contentUrl: [], |
| | | attachment: [], |
| | | temp: [] |
| | | } |
| | | }; |
| | | }, |
| | | handleClose() { |
| | | this.open = false; |