| | |
| | | component: () => import('@/views/onlineStudy/file'), |
| | | name: 'File', |
| | | meta: { title: '学习文件', noCache: true } |
| | | }, |
| | | { |
| | | path: 'pdf/view', |
| | | component: () => import('@/components/PDF'), |
| | | name: 'PDFView', |
| | | meta: { title: 'PDF查看', noCache: true } |
| | | } |
| | | ] |
| | | }, |
| | |
| | | postWithOutLoadTip, |
| | | get, |
| | | form, |
| | | download |
| | | download, |
| | | bestDownload |
| | | } |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="attachment" label="附件"> |
| | | <template slot-scope="scope"> |
| | | <el-link type="primary" v-for="item in scope.row.attachment">{{ item.name }}</el-link> |
| | | <el-link type="primary" :href="'/api/upload/download?url=' + item.url +'&fileName=' + item.name" v-for="item in scope.row.attachment" :key="item.url">{{ item.name }}</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" width="140"> |
| | |
| | | <el-button type="primary" @click="handlerSubmit">保 存</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="PDF查看" :visible.sync="pdfDialog" width="80%" :before-close="closePdfDialog"> |
| | | <vue-office-pdf :src="pdf" @rendered="rendered" /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import StudyTypeAPI from '@/api/study-type'; |
| | | import Upload from '@/components/UploadC'; |
| | | |
| | | import VueOfficePdf from '@vue-office/pdf'; |
| | | export default { |
| | | name: 'type', |
| | | components: { Upload, Pagination }, |
| | | components: { Upload, Pagination, VueOfficePdf }, |
| | | computed: { |
| | | fileContentUrl: () => { |
| | | return this.form ? this.form.contentUrl ? [this.form.contentUrl] : [] : []; |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | pdf: '', |
| | | dialogTitle: '添加学习内容', |
| | | ids: [], |
| | | typeList: [], |
| | |
| | | }, |
| | | methods: { |
| | | checkPdf(url) { |
| | | window.open('/#/online/study/pdf/view?pdfUrl=' + url, '_blank') |
| | | this.pdf = url; |
| | | this.pdfDialog = true; |
| | | }, |
| | | closePdfDialog() { |
| | | this.pdfDialog = false; |
| | | }, |
| | | rendered() { |
| | | |
| | | }, |
| | | fileChange() { |
| | | this.form.contentUrl = []; |
| | | }, |