|
@@ -69,13 +69,27 @@
|
|
|
>
|
|
|
<template #default="scope">
|
|
|
<div class="operations">
|
|
|
- <el-button type="primary" class="bt1" size="mini" @click="lookDetails(scope.rows.id)" style="background: #477edd">详情查看</el-button>
|
|
|
+ <el-button type="primary" class="bt1" size="mini" @click="checkFile(scope.row.url)" style="background: #477edd">详情查看</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<!-- 表格结束 -->
|
|
|
-
|
|
|
+ <!-- 展示文档开始 -->
|
|
|
+ <el-dialog
|
|
|
+ title="展示文件"
|
|
|
+ :visible.sync="showFile"
|
|
|
+ width="80vw"
|
|
|
+ class="addDialog showDialog"
|
|
|
+ >
|
|
|
+ <div class="addDialogLogo">LOGO</div>
|
|
|
+ <div class="showFileArea">
|
|
|
+ <!-- <vpdf v-if="/^\s*$/g.test(showFileUrl)&&showFileUrl.split('.')[showFileUrl.split('.').length-1]=='pdf'" :pdfUrl="showFileUrl"></vpdf> -->
|
|
|
+ <vword v-if="showFileType == 0" :pdfUrl="showFileUrl"></vword>
|
|
|
+ <vpdf v-else :pdfUrl="showFileUrl"></vpdf>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 展示文档结束 -->
|
|
|
<!-- 分页 -->
|
|
|
<el-pagination
|
|
|
@current-change="handleCurrentChange"
|
|
@@ -92,9 +106,10 @@
|
|
|
|
|
|
<script>
|
|
|
import beUpload from '../../components/tool/beUpload'
|
|
|
-
|
|
|
+ import vpdf from "@/components/vpdf.vue";
|
|
|
+ import vword from "@/components/vword.vue";
|
|
|
export default {
|
|
|
- components:{beUpload},
|
|
|
+ components: { beUpload, vpdf, vword },
|
|
|
data() {
|
|
|
return {
|
|
|
accept:".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
@@ -103,10 +118,28 @@
|
|
|
packageSize:8,
|
|
|
currentPage:1
|
|
|
},
|
|
|
+ showFile:false,
|
|
|
+ showFileType: 0,
|
|
|
+ showFileUrl: "",
|
|
|
tableData:[],
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
+ //展示文件
|
|
|
+ checkFile(url) {
|
|
|
+ console.log(url);
|
|
|
+ if (
|
|
|
+ url.split(".")[url.split(".").length - 1].toLocaleUpperCase() == "PDF"
|
|
|
+ ) {
|
|
|
+ this.showFileUrl = url;
|
|
|
+ this.showFileType = 1;
|
|
|
+ } else {
|
|
|
+ this.showFileUrl =
|
|
|
+ "https://view.officeapps.live.com/op/view.aspx?src=" + url;
|
|
|
+ this.showFileType = 0;
|
|
|
+ }
|
|
|
+ this.showFile = true;
|
|
|
+ },
|
|
|
getFile(val) { //上传文件
|
|
|
this.file = val;
|
|
|
let oldData = [];
|
|
@@ -195,23 +228,78 @@
|
|
|
float: right;
|
|
|
margin: 20px 55px 10px;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- .pm1Tit{
|
|
|
- display: flex;
|
|
|
- margin-left: 20px;
|
|
|
- div{
|
|
|
- width: 130px;
|
|
|
- cursor: pointer;
|
|
|
- font-weight: 550;
|
|
|
+ .addDialog {
|
|
|
+ font-size: 18px;
|
|
|
+ .el-dialog {
|
|
|
+ border-radius: 5px;
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
- .pr1TitBass{
|
|
|
- height: 2px;
|
|
|
+ .deleteContent {
|
|
|
width: 100%;
|
|
|
- background: #3D67BC;
|
|
|
+ margin: 30px 0;
|
|
|
+ font-size: 22px;
|
|
|
+ color: #000;
|
|
|
}
|
|
|
- }
|
|
|
+ .addDialogLogo {
|
|
|
+ width: 60px;
|
|
|
+ height: 30px;
|
|
|
+ line-height: 30px;
|
|
|
+ background: #f2f2f2;
|
|
|
+ position: absolute;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ left: 20px;
|
|
|
+ top: 15px;
|
|
|
+ }
|
|
|
+ .el-dialog__header {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ background: #32455b;
|
|
|
+ }
|
|
|
+ .el-dialog__title {
|
|
|
+ color: #fff;
|
|
|
+ font-size: 22px;
|
|
|
+ }
|
|
|
+ .addDialogMid {
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 0 60px 0 10px;
|
|
|
+ .addDialogTit {
|
|
|
+ display: flex;
|
|
|
+ span {
|
|
|
+ width: 80px;
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 40px;
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .addDialogTit1 {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin-bottom: 15px;
|
|
|
+ }
|
|
|
+ .addDialogTit2 {
|
|
|
+ margin-top: 10px;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #000;
|
|
|
+ text-indent: 2em;
|
|
|
+ }
|
|
|
+ .addDialogCon {
|
|
|
+ margin-top: 20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .dialog-footer {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ box-sizing: border-box;
|
|
|
+ .btn5 {
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
.pmInp{
|
|
|
width: 100%;
|
|
|
display: flex;
|