|
|
@@ -243,27 +243,14 @@
|
|
|
<template v-else-if="parseInt(drawerType) === 4"> </template>
|
|
|
<template v-else-if="parseInt(drawerType) === 5">
|
|
|
<div class="file-name">
|
|
|
- <span>
|
|
|
- <SvgIcon icon-class="file" size="24" />
|
|
|
- <p>
|
|
|
- <span>{{ item.file_name }}</span>
|
|
|
- </p>
|
|
|
- </span>
|
|
|
- <div>
|
|
|
- <SvgIcon
|
|
|
- v-show="item.file_id"
|
|
|
- icon-class="uploadPreview"
|
|
|
- size="24"
|
|
|
- @click="viewDialog(item)"
|
|
|
- />
|
|
|
-
|
|
|
- <img
|
|
|
- style="width: 24px; height: 24px; cursor: pointer"
|
|
|
- src="@/assets/download.png"
|
|
|
- alt="download"
|
|
|
- @click="downLoad(item)"
|
|
|
- />
|
|
|
- </div>
|
|
|
+ <el-link>
|
|
|
+ <span @click="openFile(item)">
|
|
|
+ <SvgIcon icon-class="file" size="24" />
|
|
|
+ <p>
|
|
|
+ <span>{{ item.file_name }}</span>
|
|
|
+ </p>
|
|
|
+ </span>
|
|
|
+ </el-link>
|
|
|
</div>
|
|
|
</template>
|
|
|
<!-- 资源底部的操作 -->
|
|
|
@@ -390,20 +377,6 @@
|
|
|
/>
|
|
|
<SimAnswerPermissionControl :visible.sync="visiblePermissionControl" :permission-control.sync="permissionControl" />
|
|
|
<PreviewURL :url="preview_url" :visible.sync="visiblePreviewURL" />
|
|
|
-
|
|
|
- <el-dialog
|
|
|
- v-if="fileViewVisible"
|
|
|
- :visible.sync="fileViewVisible"
|
|
|
- :show-close="true"
|
|
|
- :close-on-click-modal="true"
|
|
|
- :modal-append-to-body="true"
|
|
|
- :append-to-body="true"
|
|
|
- :lock-scroll="true"
|
|
|
- :width="isMobile ? '100%' : '80%'"
|
|
|
- top="0"
|
|
|
- >
|
|
|
- <iframe v-if="fileViewVisible" :src="newpath" width="100%" :height="iframeHeight" frameborder="0"></iframe>
|
|
|
- </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -533,10 +506,6 @@ export default {
|
|
|
|
|
|
return {
|
|
|
select_node: this.id,
|
|
|
- file_preview_url: getConfig() ? getConfig().doc_preview_service_address : '',
|
|
|
- newpath: '',
|
|
|
- fileViewVisible: false,
|
|
|
- iframeHeight: `${window.innerHeight - 100}px`,
|
|
|
courseware_info: {
|
|
|
book_name: '',
|
|
|
is_can_start_edit: 'false',
|
|
|
@@ -1218,23 +1187,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- downLoad(file) {
|
|
|
- let userInfor = getToken();
|
|
|
- let AccessToken = '';
|
|
|
- if (userInfor) {
|
|
|
- AccessToken = userInfor.access_token;
|
|
|
+ openFile(file) {
|
|
|
+ if (file && file.file_url) {
|
|
|
+ window.open(file.file_url);
|
|
|
}
|
|
|
- let FileID = file.file_id;
|
|
|
- let data = {
|
|
|
- AccessToken,
|
|
|
- FileID,
|
|
|
- };
|
|
|
- location.href = `${process.env.VUE_APP_EEP}/FileServer/WebFileDownload?AccessToken=${data.AccessToken}&FileID=${data.FileID}`;
|
|
|
- },
|
|
|
- // 预览
|
|
|
- viewDialog(file) {
|
|
|
- this.newpath = `${this.file_preview_url}onlinePreview?url=${Base64.encode(file.file_url)}`;
|
|
|
- this.fileViewVisible = true;
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
@@ -1900,8 +1856,10 @@ $total-width: $courseware-width + $courseware-left-margin + $courseware-right-ma
|
|
|
}
|
|
|
|
|
|
p {
|
|
|
+ max-width: 140px;
|
|
|
color: #999;
|
|
|
text-align: center;
|
|
|
+ word-break: break-all;
|
|
|
}
|
|
|
|
|
|
.card-box li {
|