|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div>
|
|
|
|
|
|
|
+ <div style="overflow: hidden;">
|
|
|
<div class="bigBox">
|
|
<div class="bigBox">
|
|
|
<div class="settingBox">
|
|
<div class="settingBox">
|
|
|
<!-- 设置盒子顶部搜索 -->
|
|
<!-- 设置盒子顶部搜索 -->
|
|
@@ -11,9 +11,10 @@
|
|
|
</el-icon>
|
|
</el-icon>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
- <el-icon style="font-size: 24px;" @click="createNewFile">
|
|
|
|
|
|
|
+ <el-icon style="font-size: 24px;" @click="createNewMenu">
|
|
|
<Plus />
|
|
<Plus />
|
|
|
</el-icon>
|
|
</el-icon>
|
|
|
|
|
+ <!-- @click="createNewFile" -->
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- 方块点击盒子 -->
|
|
<!-- 方块点击盒子 -->
|
|
@@ -71,7 +72,8 @@
|
|
|
style="display: flex;width: 82px;height: 32px;justify-content: flex-start;align-items: center;">
|
|
style="display: flex;width: 82px;height: 32px;justify-content: flex-start;align-items: center;">
|
|
|
<div style="margin-left: 5px;">
|
|
<div style="margin-left: 5px;">
|
|
|
<el-icon
|
|
<el-icon
|
|
|
- style="background-color: #7084B4;width: 24px;height: 24px;border-radius: 50%;color: white;">
|
|
|
|
|
|
|
+ style="background-color: #7084B4;width: 24px;height: 24px;border-radius: 50%;color: white;"
|
|
|
|
|
+ @click="createNewMenu">
|
|
|
<Plus />
|
|
<Plus />
|
|
|
</el-icon>
|
|
</el-icon>
|
|
|
</div>
|
|
</div>
|
|
@@ -107,7 +109,7 @@
|
|
|
<div style="display: flex;justify-content: space-around;align-items: center;">
|
|
<div style="display: flex;justify-content: space-around;align-items: center;">
|
|
|
<!-- 前进后退 -->
|
|
<!-- 前进后退 -->
|
|
|
<div style="display: flex;justify-content: space-around;align-items: center;">
|
|
<div style="display: flex;justify-content: space-around;align-items: center;">
|
|
|
- <img style="display:block;width: 11px;height: 11px;" :src="blueLeft" alt="">
|
|
|
|
|
|
|
+ <img style="display:block;width: 11px;height: 11px;" :src="blueLeft" alt="" @click="getAllTop()">
|
|
|
<img style="display:block;width: 16px;height: 16px;" :src="grayRight" alt="">
|
|
<img style="display:block;width: 16px;height: 16px;" :src="grayRight" alt="">
|
|
|
</div>
|
|
</div>
|
|
|
<!-- 面包屑 -->
|
|
<!-- 面包屑 -->
|
|
@@ -121,6 +123,9 @@
|
|
|
<img :src="squre" alt="">
|
|
<img :src="squre" alt="">
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div v-else>
|
|
|
|
|
+ <el-button @click="editOnline = true">返回</el-button>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- 展示文件夹盒子 -->
|
|
<!-- 展示文件夹盒子 -->
|
|
|
<div v-if="editOnline">
|
|
<div v-if="editOnline">
|
|
@@ -274,7 +279,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<!-- 新增文件夹弹窗 -->
|
|
<!-- 新增文件夹弹窗 -->
|
|
|
<div>
|
|
<div>
|
|
|
- <el-dialog v-model="addBoser" title="Tips" width="30%">
|
|
|
|
|
|
|
+ <el-dialog v-model="addBoser" title="新建文件夹" width="30%">
|
|
|
<el-form :model="boserForm" label-width="120px">
|
|
<el-form :model="boserForm" label-width="120px">
|
|
|
<!-- <el-form-item label="空间id">
|
|
<!-- <el-form-item label="空间id">
|
|
|
<el-input v-model="boserForm.spaceId" />
|
|
<el-input v-model="boserForm.spaceId" />
|
|
@@ -305,24 +310,19 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <!-- 废弃的顶层目录新增 -->
|
|
|
<div>
|
|
<div>
|
|
|
<el-dialog v-model="addFile" title="Tips" width="30%">
|
|
<el-dialog v-model="addFile" title="Tips" width="30%">
|
|
|
<el-form :model="fileForm" label-width="120px">
|
|
<el-form :model="fileForm" label-width="120px">
|
|
|
<el-form-item label="空间类型">
|
|
<el-form-item label="空间类型">
|
|
|
- <el-input v-model="fileForm.spaceType" />
|
|
|
|
|
|
|
+ <el-select v-model="spaceValue" placeholder="请选择空间类型">
|
|
|
|
|
+ <el-option v-for="(item, index) in spaceSelect" :key="item.value" :label="item.label"
|
|
|
|
|
+ :value="item.value" :disabled="item.disabled" />
|
|
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="空间名称">
|
|
<el-form-item label="空间名称">
|
|
|
<el-input v-model="fileForm.spaceName" />
|
|
<el-input v-model="fileForm.spaceName" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="空间容量">
|
|
|
|
|
- <el-input v-model="fileForm.spaceCap" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="已使用空间">
|
|
|
|
|
- <el-input v-model="fileForm.usedCap" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="剩余空间">
|
|
|
|
|
- <el-input v-model="fileForm.freeCap" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
<el-form-item label="备注">
|
|
<el-form-item label="备注">
|
|
|
<el-input v-model="fileForm.remark" />
|
|
<el-input v-model="fileForm.remark" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -437,7 +437,7 @@ import fileShare from '../../api/fileShare/fileShare'
|
|
|
import collect from '../../api/collect/collect'
|
|
import collect from '../../api/collect/collect'
|
|
|
import fileCount from '../../api/fileCount/fileCount'
|
|
import fileCount from '../../api/fileCount/fileCount'
|
|
|
import BreadMenu from './components/BreadMenu.vue'
|
|
import BreadMenu from './components/BreadMenu.vue'
|
|
|
-import FileEdit from './components/fileedit.vue'
|
|
|
|
|
|
|
+import FileEdit from './components/FileEdit.vue'
|
|
|
import ImgFile from "./jsComponents/ImgFile"
|
|
import ImgFile from "./jsComponents/ImgFile"
|
|
|
import { Search } from '@element-plus/icons-vue'
|
|
import { Search } from '@element-plus/icons-vue'
|
|
|
import blueLeft from '../../assets/images/blueLeft.png'
|
|
import blueLeft from '../../assets/images/blueLeft.png'
|
|
@@ -500,9 +500,6 @@ export default {
|
|
|
let fileForm = ref({
|
|
let fileForm = ref({
|
|
|
spaceType: '',
|
|
spaceType: '',
|
|
|
spaceName: "",
|
|
spaceName: "",
|
|
|
- spaceCap: "",
|
|
|
|
|
- usedCap: "",
|
|
|
|
|
- freeCap: "",
|
|
|
|
|
remark: "",
|
|
remark: "",
|
|
|
})
|
|
})
|
|
|
let fileList = ref([
|
|
let fileList = ref([
|
|
@@ -624,10 +621,26 @@ export default {
|
|
|
let fileMenu = ref([])
|
|
let fileMenu = ref([])
|
|
|
let collectList = ref([])
|
|
let collectList = ref([])
|
|
|
let copyRow = ref({})
|
|
let copyRow = ref({})
|
|
|
- // 获取所有文件
|
|
|
|
|
- function getAll() {
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ let spaceValue = ref("")
|
|
|
|
|
+ let newDirId = ref('')
|
|
|
|
|
+ let newSpaceId = ref('')
|
|
|
|
|
+ let spaceSelect = ref([
|
|
|
|
|
+ {
|
|
|
|
|
+ label: "个人空间",
|
|
|
|
|
+ value: 3,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: "部门空间",
|
|
|
|
|
+ value: 2,
|
|
|
|
|
+ disabled: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: "公共空间",
|
|
|
|
|
+ value: 1,
|
|
|
|
|
+ disabled: true
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ ])
|
|
|
// 获取用户树
|
|
// 获取用户树
|
|
|
function getAllUser() {
|
|
function getAllUser() {
|
|
|
userTree.getUserTree({}).then(res => {
|
|
userTree.getUserTree({}).then(res => {
|
|
@@ -664,28 +677,36 @@ export default {
|
|
|
// 获取文件夹,中栏,文件
|
|
// 获取文件夹,中栏,文件
|
|
|
function getAllTop() {
|
|
function getAllTop() {
|
|
|
documents.getTop(3).then(res => {
|
|
documents.getTop(3).then(res => {
|
|
|
- fileMenu.value = [res]
|
|
|
|
|
- documents.getALLdocument({ parentId: fileMenu.value[0].parentId - 0, spaceId: fileMenu.value[0].spaceId - 0 }).then(res => {
|
|
|
|
|
|
|
+ let userMe = [res]
|
|
|
|
|
+ documents.getALLdocument({ dirId: userMe[0].dirId - 0, spaceId: userMe[0].spaceId }).then(res => {
|
|
|
|
|
+ fileMenu.value = res.data
|
|
|
folderList.value = res.data
|
|
folderList.value = res.data
|
|
|
})
|
|
})
|
|
|
- myfile.getAllFileMenu({ dirId: fileMenu.value[0].dirId - 0 }).then(res => {
|
|
|
|
|
- if (res.code === 200) {
|
|
|
|
|
- fileList.value = res.rows
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ myfile.getAllFileMenu({ dirId: userMe[0].dirId - 0 }).then(res => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ fileList.value = res.rows
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
- // 获取所有文件夹
|
|
|
|
|
- function getAllFolder() {
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
function changeFile(row, num) {
|
|
function changeFile(row, num) {
|
|
|
copyParentId.value = row.parentId
|
|
copyParentId.value = row.parentId
|
|
|
- getAllFolder()
|
|
|
|
|
|
|
+ newDirId.value = row.dirId
|
|
|
|
|
+ newSpaceId.value = row.spaceId
|
|
|
|
|
+ documents.getALLdocument({ parentId: row.dirId - 0, spaceId: row.spaceId - 0 }).then(res => {
|
|
|
|
|
+ folderList.value = res.data
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ myfile.getAllFileMenu({ dirId: res.data[0].dirId - 0 }).then(res => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ fileList.value = res.rows
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
this.selectedIndex = num
|
|
this.selectedIndex = num
|
|
|
const newItem = {
|
|
const newItem = {
|
|
|
- name: row.spaceName,
|
|
|
|
|
- choose: row.spaceId
|
|
|
|
|
|
|
+ name: row.dirName,
|
|
|
|
|
+ choose: row.dirName
|
|
|
};
|
|
};
|
|
|
// 检查 newItem 是否已存在于 menuList 中
|
|
// 检查 newItem 是否已存在于 menuList 中
|
|
|
const isItemExist = menuList.value.some(item => item.choose === newItem.choose);
|
|
const isItemExist = menuList.value.some(item => item.choose === newItem.choose);
|
|
@@ -757,7 +778,7 @@ export default {
|
|
|
type: "success",
|
|
type: "success",
|
|
|
message: "删除成功"
|
|
message: "删除成功"
|
|
|
})
|
|
})
|
|
|
- getAll()
|
|
|
|
|
|
|
+ getAllTop()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -793,6 +814,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
if (row.name === '在线编辑') {
|
|
if (row.name === '在线编辑') {
|
|
|
editOnline.value = false
|
|
editOnline.value = false
|
|
|
|
|
+ cliCC.value = false
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
function chooseSet1() {
|
|
function chooseSet1() {
|
|
@@ -806,16 +828,19 @@ export default {
|
|
|
function createNewMenu() {
|
|
function createNewMenu() {
|
|
|
addBoser.value = true
|
|
addBoser.value = true
|
|
|
}
|
|
}
|
|
|
- // 新增文件夹
|
|
|
|
|
|
|
+ // 新建文件夹
|
|
|
function sureAddBoser() {
|
|
function sureAddBoser() {
|
|
|
- documents.addDocument({
|
|
|
|
|
- "dirName": boserForm.value.dirName,
|
|
|
|
|
- // "dirRole": boserForm.value.dirPower,
|
|
|
|
|
- // "dirType": boserForm.value.dirType,
|
|
|
|
|
- "parentId": copyParentId.value - 0,
|
|
|
|
|
- // "remark": boserForm.value.remark,
|
|
|
|
|
- "spaceId": fileMenu.value[0].spaceId-0,
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
|
|
+ if (newDirId.value === '' || newSpaceId.value === "") {
|
|
|
|
|
+ newDirId.value = fileMenu.value[0].dirId
|
|
|
|
|
+ newSpaceId.value = fileMenu.value[0].spaceId
|
|
|
|
|
+ }
|
|
|
|
|
+ documents.addDocument(
|
|
|
|
|
+ {
|
|
|
|
|
+ "dirName": boserForm.value.dirName,
|
|
|
|
|
+ "parentId": newDirId.value - 0,
|
|
|
|
|
+ "spaceId": newSpaceId.value - 0,
|
|
|
|
|
+ }
|
|
|
|
|
+ ).then(res => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
ElMessage({
|
|
ElMessage({
|
|
|
message: '添加成功',
|
|
message: '添加成功',
|
|
@@ -836,9 +861,6 @@ export default {
|
|
|
{
|
|
{
|
|
|
"spaceName": fileForm.value.spaceName,
|
|
"spaceName": fileForm.value.spaceName,
|
|
|
"spaceType": fileForm.value.spaceType,
|
|
"spaceType": fileForm.value.spaceType,
|
|
|
- "spaceCap": fileForm.value.spaceCap - 0,//空间容量
|
|
|
|
|
- "usedCap": fileForm.value.usedCap - 0,//已用空间
|
|
|
|
|
- "freeCap": fileForm.value.freeCap - 0,//剩余空间
|
|
|
|
|
"remark": fileForm.value.remark,//备注
|
|
"remark": fileForm.value.remark,//备注
|
|
|
}
|
|
}
|
|
|
).then(res => {
|
|
).then(res => {
|
|
@@ -847,7 +869,7 @@ export default {
|
|
|
message: "新增成功",
|
|
message: "新增成功",
|
|
|
type: "success"
|
|
type: "success"
|
|
|
})
|
|
})
|
|
|
- getAllMiddle()
|
|
|
|
|
|
|
+ getAllTop()
|
|
|
addFile.value = false
|
|
addFile.value = false
|
|
|
} else {
|
|
} else {
|
|
|
ElMessage({
|
|
ElMessage({
|
|
@@ -867,10 +889,14 @@ export default {
|
|
|
// 确认上传
|
|
// 确认上传
|
|
|
function sureUpload() {
|
|
function sureUpload() {
|
|
|
if (fileArr.value.length > 0) {
|
|
if (fileArr.value.length > 0) {
|
|
|
|
|
+ if (newDirId.value === '' || newSpaceId.value === "") {
|
|
|
|
|
+ newDirId.value = fileMenu.value[0].dirId
|
|
|
|
|
+ newSpaceId.value = fileMenu.value[0].spaceId
|
|
|
|
|
+ }
|
|
|
for (var i = 0; i <= fileArr.value.length; i++) {
|
|
for (var i = 0; i <= fileArr.value.length; i++) {
|
|
|
myfile.uploadFile({
|
|
myfile.uploadFile({
|
|
|
- spaceId: fileMenu.value[0].spaceId-0,
|
|
|
|
|
- dirId: fileMenu.value[0].dirId-0,
|
|
|
|
|
|
|
+ spaceId: newSpaceId.value - 0,
|
|
|
|
|
+ dirId: newDirId.value - 0,
|
|
|
file: fileArr.value[i]
|
|
file: fileArr.value[i]
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -956,7 +982,7 @@ export default {
|
|
|
message: "删除成功",
|
|
message: "删除成功",
|
|
|
type: "success"
|
|
type: "success"
|
|
|
})
|
|
})
|
|
|
- getAll()
|
|
|
|
|
|
|
+ getAllTop()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -982,8 +1008,17 @@ export default {
|
|
|
}
|
|
}
|
|
|
// 文件夹每行点击事件
|
|
// 文件夹每行点击事件
|
|
|
function folderClick(row, list) {
|
|
function folderClick(row, list) {
|
|
|
- folderId.value = row.dirId
|
|
|
|
|
- getAll()
|
|
|
|
|
|
|
+ // 上一级dirId就是下一级的parentId
|
|
|
|
|
+ newDirId.value = row.dirId
|
|
|
|
|
+ newSpaceId.value = row.spaceId
|
|
|
|
|
+ documents.getALLdocument({ parentId: row.dirId - 0, spaceId: row.spaceId - 0 }).then(res => {
|
|
|
|
|
+ folderList.value = res.data
|
|
|
|
|
+ myfile.getAllFileMenu({ dirId: res.data[0].dirId - 0 }).then(res => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ fileList.value = res.rows
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
// 确认文件重命名
|
|
// 确认文件重命名
|
|
|
function sureChangeName() {
|
|
function sureChangeName() {
|
|
@@ -1003,7 +1038,7 @@ export default {
|
|
|
type: "success"
|
|
type: "success"
|
|
|
})
|
|
})
|
|
|
fileNameChange.value = false
|
|
fileNameChange.value = false
|
|
|
- getAll()
|
|
|
|
|
|
|
+ getAllTop()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -1083,7 +1118,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
if (this.folderId === '') {
|
|
if (this.folderId === '') {
|
|
|
this.folderId = 0
|
|
this.folderId = 0
|
|
|
- this.getAll()
|
|
|
|
|
|
|
+ this.getAllTop()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
// 中栏重命名
|
|
// 中栏重命名
|
|
@@ -1106,7 +1141,6 @@ export default {
|
|
|
allBag,
|
|
allBag,
|
|
|
folderList,//文件夹的数据
|
|
folderList,//文件夹的数据
|
|
|
fileList,//文件夹的数据
|
|
fileList,//文件夹的数据
|
|
|
- getAll,//拿到数据的方法
|
|
|
|
|
searchFire,//搜索文件的model
|
|
searchFire,//搜索文件的model
|
|
|
changeFile,//切换右侧视图的file
|
|
changeFile,//切换右侧视图的file
|
|
|
menuList,//右侧切换
|
|
menuList,//右侧切换
|
|
@@ -1204,22 +1238,22 @@ export default {
|
|
|
isId,
|
|
isId,
|
|
|
editOnline,//在线编辑
|
|
editOnline,//在线编辑
|
|
|
copyParentId,
|
|
copyParentId,
|
|
|
- getAllFolder,
|
|
|
|
|
folderName,
|
|
folderName,
|
|
|
sureFolderName,
|
|
sureFolderName,
|
|
|
copyRow,
|
|
copyRow,
|
|
|
getAllTop,
|
|
getAllTop,
|
|
|
|
|
+ spaceValue,
|
|
|
|
|
+ spaceSelect,
|
|
|
|
|
+ newDirId,
|
|
|
|
|
+ newSpaceId,
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
this.getAllTop()
|
|
this.getAllTop()
|
|
|
- this.getAll();
|
|
|
|
|
this.getSpace()
|
|
this.getSpace()
|
|
|
- // this.getAllMiddle()
|
|
|
|
|
this.getAllUser()
|
|
this.getAllUser()
|
|
|
this.getAllCollect()
|
|
this.getAllCollect()
|
|
|
this.isId()
|
|
this.isId()
|
|
|
- this.getAllFolder()
|
|
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -1387,7 +1421,7 @@ p {
|
|
|
|
|
|
|
|
.setCli {
|
|
.setCli {
|
|
|
width: 156px;
|
|
width: 156px;
|
|
|
- height: auto;
|
|
|
|
|
|
|
+ height: 400px;
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
top: -70px;
|
|
top: -70px;
|
|
|
left: 300px;
|
|
left: 300px;
|
|
@@ -1395,11 +1429,12 @@ p {
|
|
|
border: 1px solid gray;
|
|
border: 1px solid gray;
|
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
|
z-index: 2;
|
|
z-index: 2;
|
|
|
|
|
+ overflow-y: auto;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.setCli1 {
|
|
.setCli1 {
|
|
|
width: 156px;
|
|
width: 156px;
|
|
|
- height: auto;
|
|
|
|
|
|
|
+ height: 400px;
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
top: 185px;
|
|
top: 185px;
|
|
|
left: 155px;
|
|
left: 155px;
|
|
@@ -1407,6 +1442,7 @@ p {
|
|
|
border: 1px solid gray;
|
|
border: 1px solid gray;
|
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
|
z-index: 2;
|
|
z-index: 2;
|
|
|
|
|
+ overflow-y: auto;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.chooseSet {
|
|
.chooseSet {
|