|
@@ -156,39 +156,14 @@
|
|
|
align="left"
|
|
|
:header-cell-style="{'text-align':'center'}"
|
|
|
>
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
+ <el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="文件名称" align="left" prop="docName" />
|
|
|
- <el-table-column
|
|
|
- label="文件大小"
|
|
|
- align="center"
|
|
|
- prop="docSize"
|
|
|
- :formatter="fileSizeData"
|
|
|
- width="100"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="修改时间"
|
|
|
- align="center"
|
|
|
- prop="updateTime"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="文件级别"
|
|
|
- align="center"
|
|
|
- prop="docLevel"
|
|
|
- :formatter="fileLevelData"
|
|
|
- width="90"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="文件年份"
|
|
|
- align="center"
|
|
|
- prop="createYear"
|
|
|
- width="90"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="标签"
|
|
|
- align="center"
|
|
|
- prop="tagName"
|
|
|
- width="250"
|
|
|
- >
|
|
|
+ <el-table-column label="文件大小" align="center" prop="docSize" :formatter="fileSizeData" width="100" />
|
|
|
+ <el-table-column label="修改时间" align="center" prop="updateTime" />
|
|
|
+ <el-table-column label="文件级别" align="center" prop="docLevel" :formatter="fileLevelData" width="90" />
|
|
|
+ <el-table-column label="文件年份" align="center" prop="createYear" width="90" />
|
|
|
+ <el-table-column label="文件类型" align="center" prop="docType" />
|
|
|
+ <el-table-column label="标签" align="center" prop="tagName" width="250">
|
|
|
<template slot-scope="scope">
|
|
|
<div v-if="scope.row.tagList != []">
|
|
|
<el-tag v-for="item in scope.row.tagList" :key="item.tagId">
|
|
@@ -368,7 +343,7 @@
|
|
|
|
|
|
|
|
|
<!-- 预览对话框 -->
|
|
|
- <div class="dhk" v-if="a">
|
|
|
+ <div class="dhk" v-if="preview">
|
|
|
<video :src="vid" controls v-if="vid1"></video>
|
|
|
<audio :src="aud" controls v-if="aud1"></audio>
|
|
|
|
|
@@ -423,7 +398,7 @@ export default {
|
|
|
rotationAngle: 0,
|
|
|
|
|
|
// 预览界面
|
|
|
- a:false,
|
|
|
+ preview:false,
|
|
|
|
|
|
//视频路径和显示
|
|
|
vid:"",
|
|
@@ -651,27 +626,29 @@ export default {
|
|
|
|
|
|
//判断后缀名
|
|
|
if(sp.some(item=>item==row.docType)){
|
|
|
- this.a=true;
|
|
|
+ this.preview=true;
|
|
|
this.vid1=true;
|
|
|
this.aud1=false;
|
|
|
this.img1=false;
|
|
|
this.vid=row.docPath;
|
|
|
}else if(yp.some(item=>item==row.docType)){
|
|
|
- this.a=true;
|
|
|
+ this.preview=true;
|
|
|
this.aud1=true;
|
|
|
this.vid1=false;
|
|
|
this.img1=false;
|
|
|
this.aud=row.docPath;
|
|
|
}else if(tp.some(item=>item==row.docType)){
|
|
|
- this.a=true;
|
|
|
+ this.preview=true;
|
|
|
this.aud1=false;
|
|
|
this.vid1=false;
|
|
|
this.img1=true;
|
|
|
this.imgg=row.docPath;
|
|
|
}
|
|
|
else{
|
|
|
- this.$tab.openPage(
|
|
|
- window.open("/individual/Pre/user/" + row.docId, '_blank'),
|
|
|
+ row.isEdit = false;
|
|
|
+ this.$tab.openPage(
|
|
|
+ window.open('/individual/Pre/user/' + row.docId + "?row=" + JSON.stringify(row),
|
|
|
+ '_blank'),
|
|
|
);
|
|
|
}
|
|
|
},
|
|
@@ -681,18 +658,63 @@ export default {
|
|
|
},
|
|
|
//预览
|
|
|
handlePreview(row) {
|
|
|
- row.isEdit = false;
|
|
|
- this.$tab.openPage("文件[" + row.docName + "]预览", '/doc/oo-edit/index/' + row.docId, row);
|
|
|
- },
|
|
|
- //在线编辑
|
|
|
- handleEdit(row) {
|
|
|
- row.isEdit = true;
|
|
|
- this.$tab.openPage(
|
|
|
- "文件[" + row.docName + "]在线编辑",
|
|
|
- "/doc/oo-edit/index/" + row.docId,
|
|
|
- row
|
|
|
- );
|
|
|
- },
|
|
|
+ console.log(row);
|
|
|
+ // console.log( this.$route.meta.title);
|
|
|
+ // row.isEdit = false;
|
|
|
+ // this.$tab.openPage(
|
|
|
+ // // "文件[" + row.docName + "]预览",
|
|
|
+ // document.title = row.docName,
|
|
|
+ // // window.open("/individual/Pre/user/" + row.docId, '_blank'),
|
|
|
+ // // row
|
|
|
+ // );
|
|
|
+
|
|
|
+ //图片后缀名
|
|
|
+ var pictures = ['jpeg', 'tiff', 'raw', 'bmp', 'gif', 'png', 'jpg'];
|
|
|
+ //音频后缀名
|
|
|
+ var audios = ['mid', 'mp3', 'wav', 'wma', 'ra', 'ogg', 'flac', 'aac', 'ape'];
|
|
|
+ //视频后缀名
|
|
|
+ var videos = ['asf', 'avi', 'mp4', 'ogm', 'ifo', 'mpg', 'mov', 'mpeg', 'mpg', 'vob', 'wmv', 'rm', 'rmvb'];
|
|
|
+
|
|
|
+ //判断后缀名
|
|
|
+ if (videos.some(item => item == row.docType)) {
|
|
|
+ this.preview = true;
|
|
|
+ this.vid1 = true;
|
|
|
+ this.aud1 = false;
|
|
|
+ this.img1 = false;
|
|
|
+ this.vid = row.docPath;
|
|
|
+ } else if (audios.some(item => item == row.docType)) {
|
|
|
+ this.preview = true;
|
|
|
+ this.aud1 = true;
|
|
|
+ this.vid1 = false;
|
|
|
+ this.img1 = false;
|
|
|
+ this.aud = row.docPath;
|
|
|
+ } else if (pictures.some(item => item == row.docType)) {
|
|
|
+ this.preview = true;
|
|
|
+ this.aud1 = false;
|
|
|
+ this.vid1 = false;
|
|
|
+ this.img1 = true;
|
|
|
+ this.imgg = row.docPath;
|
|
|
+ } else {
|
|
|
+ row.isEdit = false;
|
|
|
+ this.$tab.openPage(
|
|
|
+ window.open('/individual/Pre/user/' + row.docId + "?row=" + JSON.stringify(row),
|
|
|
+ '_blank'),
|
|
|
+ // window.open("/individual/Pre/user/" + row.docId +"/title/"+ row.docName, '_blank'),
|
|
|
+ );
|
|
|
+ // console.log(111);
|
|
|
+ }
|
|
|
+ // console.log(row.docPath);
|
|
|
+ // console.log(vid);
|
|
|
+ },
|
|
|
+
|
|
|
+ //在线编辑
|
|
|
+ handleEdit(row) {
|
|
|
+ row.isEdit = true;
|
|
|
+ this.$tab.openPage(
|
|
|
+ window.open('/individual/Pre/user/' + row.docId + "?row=" + JSON.stringify(row),
|
|
|
+ '_blank')
|
|
|
+ );
|
|
|
+ },
|
|
|
//先获取左边目录树,拿到目录ID和spaceId才能查询
|
|
|
dirTree() {
|
|
|
this.loading = true;
|
|
@@ -977,6 +999,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //预览弹窗
|
|
|
.dhk{
|
|
|
width: calc(100vw * (1500 / 1920));
|
|
|
height: calc(100vh * (850 / 1080));
|