|
|
@@ -182,7 +182,18 @@
|
|
|
</div>
|
|
|
<!-- 右侧 -->
|
|
|
<div>
|
|
|
- <img :src="sort" alt="">
|
|
|
+ <img
|
|
|
+ src="@/assets/images/sort.png"
|
|
|
+ @click="changeSort"
|
|
|
+ v-if="isAsc == 'asc'"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ <img
|
|
|
+ src="@/assets/images/Frame_188.png"
|
|
|
+ @click="changeSort"
|
|
|
+ v-else
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
<!-- //控制宫格展示 -->
|
|
|
<img
|
|
|
v-if="fileGrid"
|
|
|
@@ -735,13 +746,28 @@ export default {
|
|
|
const delMoreFolder = ref([])
|
|
|
const inputTitle = ref()//验证框标题
|
|
|
const isCode = ref(false)// 验证的类型
|
|
|
+ const isAsc = ref("desc");
|
|
|
+ const changeSort = async () => {
|
|
|
+ isAsc.value == "asc" ? (isAsc.value = "desc") : (isAsc.value = "asc")
|
|
|
+ refreshFile()
|
|
|
+ let obj = {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ isAsc: isAsc.value,
|
|
|
+ orderByColumn: "createTime"
|
|
|
+ }
|
|
|
+ documents.getALLdocumentByType({ parentId: impDirId.value, spaceId: impSpaceId.value,isAsc: isAsc.value,orderByColumn: "createTime", pageNum: obj.pageNum, pageSize: obj.pageSize },3).then(res => {
|
|
|
+ fileMenu.value = res.rows
|
|
|
+ // folderList.value = res.rows
|
|
|
+ })
|
|
|
+ }
|
|
|
const changeShow =async (fileGrids) => {
|
|
|
filePageNum.value = 1
|
|
|
if(fileGrid.value == 1){
|
|
|
fileGrid.value = 0 // 变宫格
|
|
|
pageSize.value = 30+pageSize.value
|
|
|
if(!thisFolder.value.dirId)return
|
|
|
- const query = `${thisFolder.value.dirId}?pageSize=${pageSize.value}&pageNum=${filePageNum.value}`
|
|
|
+ const query = `${thisFolder.value.dirId}?isAsc=${isAsc.value}&orderByColumn=createTime&pageSize=${pageSize.value}&pageNum=${filePageNum.value}`
|
|
|
const res = await myfile.getById(query)
|
|
|
console.log('filessetScrollres',res);
|
|
|
if (res.code === 200) {
|
|
|
@@ -782,9 +808,11 @@ export default {
|
|
|
spaceName.value = userMe[0].dirPath
|
|
|
let obj = {
|
|
|
pageNum: 1,
|
|
|
- pageSize: 10
|
|
|
+ pageSize: 10,
|
|
|
+ isAsc: isAsc.value,
|
|
|
+ orderByColumn: "createTime",
|
|
|
}
|
|
|
- documents.getALLdocumentByType({ parentId: userMe[0].dirId - 0, spaceId: userMe[0].spaceId, pageNum: obj.pageNum, pageSize: obj.pageSize },2).then(res => {
|
|
|
+ documents.getALLdocumentByType({ parentId: userMe[0].dirId - 0, spaceId: userMe[0].spaceId,isAsc: isAsc.value,orderByColumn: "createTime", pageNum: obj.pageNum, pageSize: obj.pageSize },2).then(res => {
|
|
|
fileMenu.value = res.rows
|
|
|
folderList.value = res.rows
|
|
|
})
|
|
|
@@ -816,7 +844,7 @@ export default {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10
|
|
|
}
|
|
|
- documents.getALLdocumentByType({ parentId: impDirId.value, spaceId: impSpaceId.value, pageNum: obj.pageNum, pageSize: obj.pageSize },2).then(res => {
|
|
|
+ documents.getALLdocumentByType({ parentId: impDirId.value, spaceId: impSpaceId.value,isAsc: isAsc.value,orderByColumn: "createTime", pageNum: obj.pageNum, pageSize: obj.pageSize },2).then(res => {
|
|
|
fileMenu.value = res.rows
|
|
|
folderList.value = res.rows
|
|
|
})
|
|
|
@@ -862,7 +890,7 @@ export default {
|
|
|
copyParentId.value = row.parentId
|
|
|
newDirId.value = row.dirId
|
|
|
newSpaceId.value = row.spaceId
|
|
|
- documents.getALLdocumentByType({ parentId: row.dirId - 0, spaceId: row.spaceId - 0 },2).then(res => {
|
|
|
+ documents.getALLdocumentByType({ parentId: row.dirId - 0, spaceId: row.spaceId - 0 ,isAsc: isAsc.value,orderByColumn: "createTime"},2).then(res => {
|
|
|
folderList.value = res.rows
|
|
|
// if (res.code === 200) {
|
|
|
if (res.rows.length === 0) {
|
|
|
@@ -1347,10 +1375,12 @@ export default {
|
|
|
// console.log('topPath',toRaw(topPath.value));
|
|
|
newDirId.value = row.dirId
|
|
|
newSpaceId.value = row.spaceId
|
|
|
- const query = `${newDirId.value}?pageSize=${pageSize.value}&pageNum=${filePageNum.value}`
|
|
|
+ const query = `${newDirId.value}?isAsc=${isAsc.value}&orderByColumn=createTime&pageSize=${pageSize.value}&pageNum=${filePageNum.value}`
|
|
|
documents.getALLdocumentByType({
|
|
|
parentId: newDirId.value - 0,
|
|
|
- spaceId: newSpaceId.value - 0
|
|
|
+ spaceId: newSpaceId.value - 0,
|
|
|
+ isAsc: isAsc.value,
|
|
|
+ orderByColumn: "createTime"
|
|
|
},2).then(res => {
|
|
|
folderList.value = res.rows
|
|
|
if (res.rows.length === 0) {
|
|
|
@@ -2284,7 +2314,9 @@ export default {
|
|
|
isCode,
|
|
|
sureCode,
|
|
|
upFileData,
|
|
|
- fileBig
|
|
|
+ fileBig,
|
|
|
+ isAsc,
|
|
|
+ changeSort
|
|
|
}
|
|
|
},
|
|
|
watch: {
|