|
@@ -184,7 +184,22 @@
|
|
|
<!-- 右侧 -->
|
|
|
<div>
|
|
|
<img :src="sort" alt="">
|
|
|
- <img :src="squre" alt="" @click="gridChange" class="shouzhi">
|
|
|
+ <!-- //控制宫格展示 -->
|
|
|
+ <img
|
|
|
+ v-if="isList"
|
|
|
+ src="@/assets/images/squre.png"
|
|
|
+ class="shouzhi palace-grid"
|
|
|
+ alt=""
|
|
|
+ @click="changeShow(true)"
|
|
|
+ />
|
|
|
+ <img
|
|
|
+ v-else
|
|
|
+ src="@/assets/images/Frame_187.png"
|
|
|
+ class="shouzhi palace-grid"
|
|
|
+ alt=""
|
|
|
+ @click="changeShow(false)"
|
|
|
+ />
|
|
|
+ <!-- <img :src="squre" alt="" @click="gridChange" class="shouzhi"> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- </div> -->
|
|
@@ -210,17 +225,6 @@
|
|
|
<img v-else @click.stop="delCollect(scope.row,true)" src="../../assets/images/yellowstar.png" alt="">
|
|
|
<img src="../../assets/images/fileBox.png" style="width: 20px;height: 24px;margin-right: 5px;"
|
|
|
alt="">
|
|
|
- <!-- <el-tooltip
|
|
|
- class="box-item"
|
|
|
- effect="dark"
|
|
|
- :content="scope.row.dirName"
|
|
|
- placement="top"
|
|
|
- :show-after="1000"
|
|
|
- v-if="scope.row.encryptLevel"
|
|
|
- >
|
|
|
- <template #content> {{ scope.row.encryptLevel == 'L1'?'敏感':(scope.row.encryptLevel == 'L2'?'涉密':(scope.row.encryptLevel == 'L3'?'机密':'绝密')) }} </template>
|
|
|
- <span class="shouzhi">{{ scope.row.dirName }}</span>
|
|
|
- </el-tooltip> -->
|
|
|
<span class="shouzhi">{{ scope.row.dirName }}</span>
|
|
|
</span>
|
|
|
</template>
|
|
@@ -238,10 +242,9 @@
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
</el-table>
|
|
|
- <PlaceGridFolder v-else :folderClick="folderClick" :restName="restName"
|
|
|
- :collectFolder="collectFolder" :getAllTop="getAllTop" @folderBack="folderBack">
|
|
|
+ <PlaceGridFolder v-else @folderClick="folderClick" :restName="restName"
|
|
|
+ :collectFolder="collectFolder" :getAllTop="getAllTop" @folderBack="folderBack" :thisFolder="thisFolder">
|
|
|
</PlaceGridFolder>
|
|
|
</el-collapse-item>
|
|
|
</el-collapse>
|
|
@@ -255,7 +258,7 @@
|
|
|
<div class="menu_item" @click="restName(null, null)">
|
|
|
<img src="@/assets/images/textbox.png" alt="" />
|
|
|
<span>重命名</span>
|
|
|
- </div>
|
|
|
+ </div>shareBack
|
|
|
<div class="menu_item" @click="collectFolder">
|
|
|
<img src="@/assets/images/collect.png" alt="" />
|
|
|
<span>收藏</span>
|
|
@@ -265,7 +268,7 @@
|
|
|
<!-- 文件 -->
|
|
|
<div class="fileTable">
|
|
|
<el-collapse v-model="files">
|
|
|
- <el-collapse-item name="folder" class="custom-collapse-item">
|
|
|
+ <el-collapse-item name="2" class="custom-collapse-item">
|
|
|
<template #title>
|
|
|
<span class="file-title">文件</span>
|
|
|
</template>
|
|
@@ -307,8 +310,8 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <PalaceGridFile v-else @showFile="showFile" :getAllTop="getAllTop" @navBack="navBack"
|
|
|
- @lastBB="lastBB" @onlineCase="onlineCase" @shareBack="shareBack"></PalaceGridFile>
|
|
|
+ <PalaceGridFile v-else :getAllTop="getAllTop" @navBack="navBack"
|
|
|
+ @lastBB="lastBB" @onlineCase="onlineCase" @shareBack="shareBack" :thisFolder="thisFolder" :fileList="fileList"></PalaceGridFile>
|
|
|
</el-collapse-item>
|
|
|
</el-collapse>
|
|
|
<div class="setCli" v-if="cliCC" :style="{ left: xz + 'px', top: yz - 260 + 'px' }">
|
|
@@ -674,7 +677,14 @@ export default {
|
|
|
const tableBeEnd = ref(true)//控制下拉是否到底
|
|
|
const tableTotal = ref(0)//表格数据总数
|
|
|
const clickFileData = ref(null);
|
|
|
- let fileBig = ref(0)
|
|
|
+ let fileBig = ref(0);
|
|
|
+ //控制宫格展示
|
|
|
+ const isList = ref(false); //控制显示方式
|
|
|
+ const changeShow = (fileGrids) => {
|
|
|
+ isList.value = !isList.value;
|
|
|
+ fileGrid.value = fileGrids
|
|
|
+ folderGrid.value = fileGrids;
|
|
|
+ };
|
|
|
// 获取文件夹,中栏,文件
|
|
|
function getAllTop() {
|
|
|
documents.getTop(3).then(res => {
|
|
@@ -725,13 +735,12 @@ export default {
|
|
|
}
|
|
|
function changeFile(row, num) {
|
|
|
// 创建标签
|
|
|
-
|
|
|
const addData = {
|
|
|
path: '/myfile' + row.dirId,
|
|
|
name: row.dirName,
|
|
|
clickRowId: toRaw(row)
|
|
|
}
|
|
|
- addFolderAdd(addData)
|
|
|
+ // addFolderAdd(addData) //加了这句代码界面会渲染两次
|
|
|
thisFolder.value = row
|
|
|
console.log('row2', row);
|
|
|
topPath.value = row.dirPath
|
|
@@ -1278,9 +1287,7 @@ export default {
|
|
|
} else {
|
|
|
thisFolderRole.value = null
|
|
|
}
|
|
|
- // console.log('row1', toRaw(row));
|
|
|
topPath.value = row.dirPath
|
|
|
- // console.log('topPath',toRaw(topPath.value));
|
|
|
newDirId.value = row.dirId
|
|
|
newSpaceId.value = row.spaceId
|
|
|
clickFileData.value = row
|
|
@@ -1303,7 +1310,6 @@ export default {
|
|
|
})
|
|
|
} else {
|
|
|
myfile.getById(query).then(res => {
|
|
|
- console.log('folerFile', res);
|
|
|
if (res.code === 200) {
|
|
|
tableTotal.value = res.total
|
|
|
if (res.rows.length < res.total) {
|
|
@@ -1311,7 +1317,6 @@ export default {
|
|
|
tableBeEnd.value = false
|
|
|
}
|
|
|
fileList.value = JSON.parse(JSON.stringify(res.rows))
|
|
|
- // console.log('fileList',toRaw(fileList.value));
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -1363,7 +1368,6 @@ export default {
|
|
|
thanks.value = data
|
|
|
}
|
|
|
function getChildrenC(data) {
|
|
|
- console.log('data====', data)
|
|
|
folderCase.value = data
|
|
|
}
|
|
|
function getCollects(data) {
|
|
@@ -1545,18 +1549,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- function gridChange() {
|
|
|
- if (fileGrid.value) {
|
|
|
- fileGrid.value = false
|
|
|
- } else {
|
|
|
- fileGrid.value = true
|
|
|
- }
|
|
|
- if (folderGrid.value) {
|
|
|
- folderGrid.value = false
|
|
|
- } else {
|
|
|
- folderGrid.value = true
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
//点击收藏后刷新文件
|
|
|
const refreshFile = () => {
|
|
|
if (toRaw(thisFolder.value).dirId && !leftNewFile.value) {//如果点开了文件夹
|
|
@@ -1771,7 +1764,6 @@ export default {
|
|
|
if (to.name == 'myfile') {
|
|
|
loadingPreview.value = true
|
|
|
const thisdirId = to.params.dirId
|
|
|
- console.log('thisdirId', thisdirId);
|
|
|
setTimeout(() => {
|
|
|
if (thisdirId) {
|
|
|
myfile.getDir(thisdirId).then(res => {
|
|
@@ -1925,7 +1917,6 @@ export default {
|
|
|
copySpaceCup,
|
|
|
fileGrid,
|
|
|
folderGrid,
|
|
|
- gridChange,
|
|
|
collectFolder,
|
|
|
arrowLift,
|
|
|
formatStorage,
|
|
@@ -1968,7 +1959,10 @@ export default {
|
|
|
fileBlur,
|
|
|
fileBig,
|
|
|
loadingUpload,
|
|
|
- closeUpload
|
|
|
+ closeUpload,
|
|
|
+ //控制宫格展示
|
|
|
+ changeShow,
|
|
|
+ isList
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -2360,4 +2354,8 @@ p {
|
|
|
color: #2e6bc8;
|
|
|
right: 97%;
|
|
|
}
|
|
|
+.palace-grid{
|
|
|
+ margin-left: 4px;
|
|
|
+ margin-right: 20px;
|
|
|
+}
|
|
|
</style>
|