|
@@ -231,13 +231,14 @@
|
|
|
<el-table-column prop="createTime" label="时间" width="180" />
|
|
|
<el-table-column prop="dirType" label="类型">
|
|
|
<template #default="scope">
|
|
|
- <span>文件夹</span>
|
|
|
+ <span v-if="scope.row.isEncrypt == 'N'">公开目录</span>
|
|
|
+ <span v-else>加密目录</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="大小">
|
|
|
+ <el-table-column label="加密等级">
|
|
|
<template #default="scope">
|
|
|
<span>
|
|
|
- 10KB
|
|
|
+ {{setTablelevel(scope.row.encryptLevel)}}
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -271,7 +272,7 @@
|
|
|
<template #title>
|
|
|
<span class="file-title">文件</span>
|
|
|
</template>
|
|
|
- <el-table v-el-table-infinite-scroll="setScroll" :infinite-scroll-distance="10"
|
|
|
+ <el-table v-el-table-infinite-scroll="setScroll" :infinite-scroll-distance="30"
|
|
|
:infinite-scroll-disabled="tableBeEnd" v-if="fileGrid" height="38vh"
|
|
|
:data="fileList" :scrollbar-always-on="true" style="width: 100%;"
|
|
|
@row-contextmenu="handleRowClick" @selection-change="handleSelectionChange"
|
|
@@ -481,6 +482,7 @@ import { getLeveldetail } from '../../api/level/level';
|
|
|
import { encrypt, decrypt } from "@/utils/jsencrypt";
|
|
|
import Cookies from "js-cookie";
|
|
|
import elTableInfiniteScroll from 'el-table-infinite-scroll'
|
|
|
+import { getLevel } from '@/api/level/level.js';
|
|
|
|
|
|
export default {
|
|
|
directives: {
|
|
@@ -488,6 +490,7 @@ export default {
|
|
|
},
|
|
|
setup() {
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
+ const levelList = ref()
|
|
|
let fileTrees = ref(false)//filetree父传子
|
|
|
let thanks = ref(false)//transfer父传子
|
|
|
let collects = ref(false)//文件收藏父传子
|
|
@@ -704,6 +707,7 @@ export default {
|
|
|
documents.getALLdocumentByType({ parentId: userMe[0].dirId - 0, spaceId: userMe[0].spaceId, pageNum: obj.pageNum, pageSize: obj.pageSize }, 3).then(res => {
|
|
|
fileMenu.value = res.data
|
|
|
folderList.value = res.data
|
|
|
+ console.log('folderList.value',folderList.value);
|
|
|
})
|
|
|
myfile.getById(userMe[0].dirId - 0, obj).then(res => {
|
|
|
if (res.code === 200) {
|
|
@@ -714,6 +718,7 @@ export default {
|
|
|
for (var i = 1; i <= x; i++) {
|
|
|
obj.pageNum = i
|
|
|
myfile.getById(userMe[0].dirId - 0, obj).then(res => {
|
|
|
+ // console.log('topallfn');
|
|
|
fileList.value = fileList.value.concat(res.rows)
|
|
|
const uniqueFileList = Array.from(new Set(fileList.value.map(item => item.docId)))
|
|
|
.map(docId => fileList.value.find(item => item.docId === docId));
|
|
@@ -741,7 +746,7 @@ export default {
|
|
|
name: row.dirName,
|
|
|
clickRowId: toRaw(row)
|
|
|
}
|
|
|
- // addFolderAdd(addData) //加了这句代码界面会渲染两次
|
|
|
+ addFolderAdd(addData) //加了这句代码界面会渲染两次
|
|
|
thisFolder.value = row
|
|
|
topPath.value = row.dirPath
|
|
|
if (row.isEncrypt === "Y") {
|
|
@@ -984,14 +989,24 @@ export default {
|
|
|
// selectedIndex.value = selectedIndex.value + 1
|
|
|
}
|
|
|
if (row.name === '文字识别') {
|
|
|
- router.push({
|
|
|
- path: '/identifyFont',
|
|
|
- query: {
|
|
|
- docId: copyRow.value.docId,
|
|
|
- fileId: copyRow.value.fileId,
|
|
|
- fileType: copyFileType.value
|
|
|
+ // router.push({
|
|
|
+ // path: '/identifyFont',
|
|
|
+ // query: {
|
|
|
+ // docId: copyRow.value.docId,
|
|
|
+ // fileId: copyRow.value.fileId,
|
|
|
+ // fileType: copyFileType.value
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ const itemData = {
|
|
|
+ name: '文字识别',
|
|
|
+ path: 'identifyFont',
|
|
|
+ clickRowId: {
|
|
|
+ docId: copyRow.value.docId,
|
|
|
+ fileId: copyRow.value.fileId,
|
|
|
+ fileType: copyFileType.value
|
|
|
+ }
|
|
|
}
|
|
|
- })
|
|
|
+ addFolderAdd(itemData)
|
|
|
}
|
|
|
if (row.name === '预览') {
|
|
|
loadingPreview.value = true
|
|
@@ -1308,14 +1323,16 @@ export default {
|
|
|
folderList.value = res.data
|
|
|
if (res.data.length === 0) {
|
|
|
myfile.getById(query).then(res => {
|
|
|
+ // console.log('res = ',res);
|
|
|
if (res.code === 200) {
|
|
|
tableTotal.value = res.total
|
|
|
if (res.rows.length < res.total) {
|
|
|
//第一次拿到的数据少于总数开启下拉事件
|
|
|
tableBeEnd.value = false
|
|
|
}
|
|
|
- fileList.value = res.rows
|
|
|
+ fileList.value = JSON.parse(JSON.stringify(res.rows))
|
|
|
}
|
|
|
+ // console.log('folderClickshijian1',tableTotal.value,tableBeEnd.value);
|
|
|
})
|
|
|
} else {
|
|
|
myfile.getById(query).then(res => {
|
|
@@ -1327,6 +1344,7 @@ export default {
|
|
|
}
|
|
|
fileList.value = JSON.parse(JSON.stringify(res.rows))
|
|
|
}
|
|
|
+ // console.log('folderClickshijian2',tableTotal.value,tableBeEnd.value);
|
|
|
})
|
|
|
}
|
|
|
})
|
|
@@ -1432,7 +1450,7 @@ export default {
|
|
|
const filterMouseCli = () => {
|
|
|
const canPreviewArray = ['.doc', '.wps', '.docm', '.docx', '.dot', '.dotm', '.dotx', '.epub', '.fodt', '.htm', '.html', '.mht', '.odt', '.ott', '.pdf', '.rtf', '.txt', '.djvu', '.xps', '.csv', '.fods', '.ods', '.ots', '.xls', '.xlsm', '.xlsx', '.xlt', '.xltm', '.xltx', '.fodp', '.odp', '.otp', '.pot', '.potm', '.potx', '.pps', '.ppsm', '.ppsx', '.ppt', '.pptm', '.pptx']
|
|
|
const typeArr = ['.png', '.jpg', '.jpeg', '.JPG', '.mp3', '.mp4']
|
|
|
- const imgTypeArr = ['.png', '.jpg', '.jpeg', '.JPG']
|
|
|
+ const imgTypeArr = ['.png', '.jpg', '.jpeg', '.JPG','.PNG']
|
|
|
const canEditArr = ['.doc', '.docm', '.docx', '.dot', '.dotm', '.dotx', '.txt', '.djvu', '.xps', '.csv', '.fods', '.ods', '.ots', '.xls', '.xlsm', '.xlsx', '.xlt', '.xltm', '.xltx', '.fodp', '.odp', '.otp', '.doc', '.docm', '.docx', '.dot', '.dotm', '.dotx', '.epub', '.fodt', '.htm', '.html', '.mht', '.odt', '.ott', '.rtf', '.txt', '.djvu', '.xps', '.wps', '.pptx']
|
|
|
let arr = []
|
|
|
if (!(typeArr.includes(copyFileType.value) || canPreviewArray.includes(copyFileType.value))) {
|
|
@@ -1629,6 +1647,26 @@ export default {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ const getLevelList = async ()=>{
|
|
|
+ const res = await getLevel()
|
|
|
+ if(res.rows){
|
|
|
+ levelList.value = res.rows.map(item=>{
|
|
|
+ return {
|
|
|
+ levelCode:item.levelCode,
|
|
|
+ levelName:item.levelName
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log('levelList',levelList.value);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const setTablelevel = (level)=>{
|
|
|
+ const thisItem = levelList.value.find(item=>item.levelCode == level)
|
|
|
+ if(thisItem){
|
|
|
+ return thisItem.levelName
|
|
|
+ }else{
|
|
|
+ return '未加密'
|
|
|
+ }
|
|
|
+ }
|
|
|
//获取权限详情
|
|
|
const getLeveldetailFn = async (data) => {
|
|
|
const res = await getLeveldetail(data)
|
|
@@ -1734,6 +1772,7 @@ export default {
|
|
|
getAllTop()
|
|
|
// }
|
|
|
getSpaceList()
|
|
|
+ getLevelList()
|
|
|
// console.log('!thisFolder.value',thisFolder.value);
|
|
|
// refreshFile()
|
|
|
// 添加监听,点击其他地方关闭文件夹右键菜单
|
|
@@ -1976,6 +2015,9 @@ export default {
|
|
|
isList,
|
|
|
throttled,
|
|
|
throttleSureUpload,
|
|
|
+ getLevelList,
|
|
|
+ levelList,
|
|
|
+ setTablelevel
|
|
|
}
|
|
|
},
|
|
|
watch: {
|