|
@@ -358,6 +358,24 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 预览对话框 -->
|
|
|
+ <div class="dhk" v-if="a">
|
|
|
+ <video :src="vid" controls v-if="vid1"></video>
|
|
|
+ <audio :src="aud" controls v-if="aud1"></audio>
|
|
|
+
|
|
|
+ <div class="image-container" v-if="img1">
|
|
|
+ <el-image :src="imgg" ref="imageRef" style="max-width: 100%"/>
|
|
|
+ <el-button-group>
|
|
|
+ <el-button icon="el-icon-refresh" @click="rotate(-90)"></el-button>
|
|
|
+ <el-button icon="el-icon-refresh-right" @click="rotate(90)"></el-button>
|
|
|
+ <el-button icon="el-icon-zoom-in" @click="scale(0.1)"></el-button>
|
|
|
+ <el-button icon="el-icon-zoom-out" @click="scale(-0.1)"></el-button>
|
|
|
+ </el-button-group>
|
|
|
+ </div>
|
|
|
+ <el-button class="gb" icon="el-icon-close" circle @click="gb" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -367,21 +385,19 @@
|
|
|
import "@/styles1/element-ui1.scss";
|
|
|
|
|
|
import {
|
|
|
- listInfo,
|
|
|
- getInfo,
|
|
|
- delInfo,
|
|
|
- addInfo,
|
|
|
- updateInfo,
|
|
|
-} from "@/api/doc/info";
|
|
|
-import {
|
|
|
- listDir,
|
|
|
- getDir,
|
|
|
- delDir,
|
|
|
- addDir,
|
|
|
- updateDir,
|
|
|
- personalList,
|
|
|
-} from "@/api/doc/dir";
|
|
|
-import { listLevel } from "@/api/doc/level";
|
|
|
+ listInfo,
|
|
|
+ getInfo,
|
|
|
+ delInfo,
|
|
|
+ addInfo,
|
|
|
+ updateInfo
|
|
|
+ } from "@/api/doc/info";
|
|
|
+ import {
|
|
|
+ deptList
|
|
|
+ } from "@/api/doc/dir";
|
|
|
+ import {
|
|
|
+ listLevel
|
|
|
+ } from "@/api/doc/level";
|
|
|
+
|
|
|
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
@@ -393,6 +409,22 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ //预览图片的旋转缩放
|
|
|
+ scalePercentage: 1,
|
|
|
+ rotationAngle: 0,
|
|
|
+
|
|
|
+ // 预览界面
|
|
|
+ a:false,
|
|
|
+
|
|
|
+ //视频路径和显示
|
|
|
+ vid:"",
|
|
|
+ vid1:false,
|
|
|
+ //音频路径和显示
|
|
|
+ aud:"",
|
|
|
+ aud1:false,
|
|
|
+ //图片路径和显示
|
|
|
+ imgg:"",
|
|
|
+ img1:false,
|
|
|
//标签列表
|
|
|
tags: [
|
|
|
{ name: '十四大', id:0 },
|
|
@@ -484,6 +516,23 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ //预览图片的缩放
|
|
|
+ rotate(angle) {
|
|
|
+ this.rotationAngle += angle;
|
|
|
+ const image = this.$refs.imageRef.$el.querySelector("img");
|
|
|
+ image.style.transform = `rotate(${this.rotationAngle}deg)`;
|
|
|
+ },
|
|
|
+ //预览图片的旋转
|
|
|
+ scale(delta) {
|
|
|
+ this.scalePercentage += delta;
|
|
|
+ const image = this.$refs.imageRef.$el.querySelector("img");
|
|
|
+ image.style.transform = `scale(${this.scalePercentage})`;
|
|
|
+ },
|
|
|
+
|
|
|
+ // 预览关闭
|
|
|
+ gb(){
|
|
|
+ this.a=false;
|
|
|
+ },
|
|
|
//选择标签
|
|
|
handleClose(tag) {
|
|
|
this.form.tagList.map((i,index)=>{
|
|
@@ -547,7 +596,38 @@ export default {
|
|
|
},
|
|
|
//分享
|
|
|
handleShare(row) {
|
|
|
- this.$router.push("/home/file/individual/share/user/" + row.docId);
|
|
|
+ //图片后缀名
|
|
|
+ var tp= ['jpeg','tiff','raw','bmp','gif','png' , 'jpg'];
|
|
|
+ //音频后缀名
|
|
|
+ var yp=['mid', 'mp3', 'wav', 'wma', 'ra', 'ogg', 'flac', 'aac', 'ape'];
|
|
|
+ //视频后缀名
|
|
|
+ var sp= ['asf', 'avi', 'mp4', 'ogm', 'ifo', 'mpg', 'mov', 'mpeg', 'mpg', 'vob', 'wmv', 'rm' , 'rmvb'];
|
|
|
+
|
|
|
+ //判断后缀名
|
|
|
+ if(sp.some(item=>item==row.docType)){
|
|
|
+ this.a=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.aud1=true;
|
|
|
+ this.vid1=false;
|
|
|
+ this.img1=false;
|
|
|
+ this.aud=row.docPath;
|
|
|
+ }else if(tp.some(item=>item==row.docType)){
|
|
|
+ this.a=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'),
|
|
|
+ );
|
|
|
+ }
|
|
|
},
|
|
|
/**下载按钮操作*/
|
|
|
handleDownload(row) {
|
|
@@ -569,22 +649,22 @@ export default {
|
|
|
},
|
|
|
//先获取左边目录树,拿到目录ID和spaceId才能查询
|
|
|
dirTree() {
|
|
|
- this.loading = true;
|
|
|
- personalList().then((response) => {
|
|
|
- this.dirId = response.data[0].dirId;
|
|
|
- this.spaceId = response.data[0].spaceId;
|
|
|
- this.dirList = this.handleTree(response.data, "dirId");
|
|
|
+ this.loading = true;
|
|
|
+ deptList().then(response => {
|
|
|
+ this.dirId = response.data[0].dirId;
|
|
|
+ this.spaceId = response.data[0].spaceId;
|
|
|
+ this.dirList = this.handleTree(response.data, "dirId");
|
|
|
|
|
|
- this.queryParams.dirId = this.dirId;
|
|
|
- this.queryParams.searchValue = this.spaceId;
|
|
|
- this.getList();
|
|
|
- //获取文件级别数据
|
|
|
- listLevel().then((response) => {
|
|
|
- this.levelOptions = response.rows;
|
|
|
+ this.queryParams.dirId = this.dirId;
|
|
|
+ this.queryParams.searchValue = this.spaceId;
|
|
|
+ this.getList();
|
|
|
+ //获取文件级别数据
|
|
|
+ listLevel().then(response => {
|
|
|
+ this.levelOptions = response.rows;
|
|
|
+ });
|
|
|
+ this.loading = false;
|
|
|
});
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
- },
|
|
|
+ },
|
|
|
/**处理文档级别数据*/
|
|
|
fileLevelData(row, col, value) {
|
|
|
const obj = this.levelOptions.find((item) => item.levelId == value);
|
|
@@ -644,15 +724,10 @@ export default {
|
|
|
tagList:[],
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
+ this.dynamicTags=[]
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
- const para = {
|
|
|
- tagId: 123,
|
|
|
- }
|
|
|
- console.log(this.queryParams.params);
|
|
|
- this.queryParams.params = para;
|
|
|
-
|
|
|
this.queryParams.pageNum = 1;
|
|
|
this.getList();
|
|
|
},
|
|
@@ -661,6 +736,7 @@ export default {
|
|
|
this.resetForm("queryForm");
|
|
|
this.queryParams.dirId = this.dirId;
|
|
|
this.queryParams.searchValue = this.spaceId;
|
|
|
+ this.queryParams.params.tagId = null;
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
// 多选框选中数据
|
|
@@ -683,6 +759,7 @@ export default {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
this.title = "修改文件基本信息";
|
|
|
+ this.dynamicTags = this.form.tagList.map(item=>item.tagName);
|
|
|
});
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
@@ -847,6 +924,37 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .dhk{
|
|
|
+ width: calc(100vw * (1500 / 1920));
|
|
|
+ height: calc(100vh * (850 / 1080));
|
|
|
+ // background: salmon;
|
|
|
+ background: #0F1540FF;
|
|
|
+ position: absolute;
|
|
|
+ top: 10%;
|
|
|
+ left: 10%;
|
|
|
+ z-index: 99;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ .gb{
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ right: 0;
|
|
|
+ }
|
|
|
+ video{
|
|
|
+ width: calc(100vw * (1440 / 1920));
|
|
|
+ height: calc(100vh * (810 / 1080));
|
|
|
+ }
|
|
|
+ .el-image{
|
|
|
+ width: calc(100vw * (960 / 1920));
|
|
|
+ height: calc(100vh * (720 / 1080));
|
|
|
+ }
|
|
|
+ .el-button-group {
|
|
|
+ position: absolute;
|
|
|
+ top: 10%;
|
|
|
+ right: 1%;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
//标签按钮
|
|
|
::v-deep .el-tag {
|