Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-CloudComputing
/
D_Team_Khuloud
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
최동원
2020-06-11 00:04:00 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
01b8754b5137cf91dec8d55df88e9ca95c43e8a4
01b8754b
1 parent
2fc289bc
search folder,file
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
88 additions
and
15 deletions
front-end/src/components/Fav_list.vue
front-end/src/components/FileList.vue
front-end/src/components/TrashList.vue
front-end/src/components/folderc.vue
front-end/src/components/Fav_list.vue
View file @
01b8754
...
...
@@ -11,7 +11,7 @@
hide-details
></v-text-field>
</v-toolbar>
<v-list
two-line subheader
>
<v-list>
<!-- <v-subheader inset>Folders</v-subheader> -->
<!-- Folder view -->
<v-list-item
...
...
@@ -21,7 +21,7 @@
>...</v-list-item
>
<v-list-item
v-for="item in
this.$store.getters.favFolderL
"
v-for="item in
calData
"
:key="item.folder_id"
:search="search"
@click.right="show(item, $event)"
...
...
@@ -50,7 +50,7 @@
</v-list-item>
<!-- File view -->
<v-list-item
v-for="item in
this.$store.getters.favFileL
"
v-for="item in
calData2
"
:key="item.title"
@click.right="showF(item, $event)"
@dblclick="
...
...
@@ -319,6 +319,26 @@ export default {
created() {
this.fetchData();
},
computed: {
calData() {
return this.folders
.filter(data => {
return data.folder_name
.toLowerCase()
.includes(this.search.toLowerCase());
})
.slice(0);
},
calData2() {
return this.files
.filter(data => {
return data.file_name
.toLowerCase()
.includes(this.search.toLowerCase());
})
.slice(0);
},
},
watch: {
$route: 'fetchData',
},
...
...
@@ -329,6 +349,8 @@ export default {
console.log(response.data);
this.$store.commit('setfavFolderList', response.data.folders);
this.$store.commit('setfavFileList', response.data.files);
this.folders = response.data.folders;
this.files = response.data.files;
} catch (error) {
console.log('에러');
console.log(error);
...
...
@@ -521,6 +543,7 @@ export default {
const del = await delFavorite(cData);
const response = await getFavoriteList(this.$store.state.id);
this.$store.commit('setfavFolderList', response.data.folders);
this.folders = response.data.folders;
} catch (error) {
console.log('에러');
}
...
...
@@ -550,6 +573,7 @@ export default {
const del = await delFavoriteFile(fData);
const response = await getFavoriteList(this.$store.state.id);
this.$store.commit('setfavFileList', response.data.files);
this.files = response.data.files;
} catch (error) {
console.log('에러');
}
...
...
front-end/src/components/FileList.vue
View file @
01b8754
...
...
@@ -11,11 +11,11 @@
hide-details
></v-text-field>
</v-toolbar>
<v-list
two-line subheader
>
<v-list>
<!-- <v-subheader inset>Folders</v-subheader> -->
<!-- Folder view -->
<v-list-item
v-for="item in
this.$store.getters.folderL
"
v-for="item in
calData
"
:key="item.folder_id"
:search="search"
@click.right="show(item, $event)"
...
...
@@ -44,8 +44,8 @@
</v-list-item>
<!-- File view -->
<v-list-item
v-for="item in
this.$store.getters.fileL
"
:key="item.
title
"
v-for="item in
calData2
"
:key="item.
file_id
"
@click.right="showF(item, $event)"
@dblclick="
detailF(item, $event);
...
...
@@ -124,8 +124,8 @@
<v-container>
<v-list>
<v-list-item
v-for="
item2
in folders"
:key="i
tem2.folder_id
"
v-for="
(item2, index)
in folders"
:key="i
ndex
"
@click.left="transferF(item2.folder_name)"
v-if="item2.folder_name !== curfName.folder_name"
>
...
...
@@ -199,8 +199,8 @@
<v-container>
<v-list>
<v-list-item
v-for="
item2
in folders"
:key="i
tem2.folder_id
"
v-for="
(item2, index)
in folders"
:key="i
ndex
"
@click.left="transferFile(item2.folder_name)"
>
<v-list-item-avatar>
...
...
@@ -353,6 +353,7 @@ export default {
files: [],
search: '',
id: '',
searchD: '',
share_file_name: '',
showShareF: false,
targetUid: '',
...
...
@@ -379,6 +380,26 @@ export default {
created() {
this.fetchData();
},
computed: {
calData() {
return this.folders
.filter(data => {
return data.folder_name
.toLowerCase()
.includes(this.search.toLowerCase());
})
.slice(0);
},
calData2() {
return this.files
.filter(data => {
return data.file_name
.toLowerCase()
.includes(this.search.toLowerCase());
})
.slice(0);
},
},
watch: {
$route: 'fetchData',
},
...
...
@@ -569,6 +590,7 @@ export default {
console.log(cData);
const response = await delFavorite(cData);
this.$store.commit('setFolder', response.data.folders);
this.folders = response.data.folders;
} catch (error) {
console.log('에러');
}
...
...
@@ -583,6 +605,7 @@ export default {
console.log(cData);
const response = await addFavorite(cData);
this.$store.commit('setFolder', response.data.folders);
this.folders = response.data.folders;
} catch (error) {
console.log('에러');
}
...
...
@@ -597,6 +620,7 @@ export default {
console.log(fData);
const response = await delFavoriteFile(fData);
this.$store.commit('setFile', response.data.files);
this.files = response.data.files;
} catch (error) {
console.log('에러');
}
...
...
@@ -611,6 +635,7 @@ export default {
console.log(fData);
const response = await addFavoriteFile(fData);
this.$store.commit('setFile', response.data.files);
this.files = response.data.files;
} catch (error) {
console.log('에러');
}
...
...
front-end/src/components/TrashList.vue
View file @
01b8754
...
...
@@ -5,7 +5,7 @@
<v-spacer></v-spacer>
<v-btn @click="delAll">비우기</v-btn>
</v-toolbar>
<v-list
two-line subheader
>
<v-list>
<!-- <v-subheader inset>Folders</v-subheader> -->
<!-- Folder view -->
<v-list-item
...
...
front-end/src/components/folderc.vue
View file @
01b8754
...
...
@@ -11,12 +11,12 @@
hide-details
></v-text-field>
</v-toolbar>
<v-list
two-line subheader
>
<v-list>
<!-- <v-subheader inset>Folders</v-subheader> -->
<!-- Folder view -->
<v-list-item @click="" @dblclick="$router.go(-1)">...</v-list-item>
<v-list-item
v-for="item in
this.$store.getters.folderL
"
v-for="item in
calData
"
:key="item.folder_id"
:search="search"
@click.right="show(item, $event)"
...
...
@@ -45,7 +45,7 @@
</v-list-item>
<!-- File view -->
<v-list-item
v-for="item in
this.$store.getters.fileL
"
v-for="item in
calData2
"
:key="item.title"
@click.right="showF(item, $event)"
@dblclick="
...
...
@@ -382,6 +382,26 @@ export default {
created() {
this.fetchData();
},
computed: {
calData() {
return this.folders
.filter(data => {
return data.folder_name
.toLowerCase()
.includes(this.search.toLowerCase());
})
.slice(0);
},
calData2() {
return this.files
.filter(data => {
return data.file_name
.toLowerCase()
.includes(this.search.toLowerCase());
})
.slice(0);
},
},
watch: {
$route: 'fetchData',
},
...
...
@@ -574,6 +594,7 @@ export default {
console.log(cData);
const response = await delFavorite(cData);
this.$store.commit('setFolder', response.data.folders);
this.folders = response.data.folders;
} catch (error) {
console.log('에러');
}
...
...
@@ -588,6 +609,7 @@ export default {
console.log(cData);
const response = await addFavorite(cData);
this.$store.commit('setFolder', response.data.folders);
this.folders = response.data.folders;
} catch (error) {
console.log('에러');
}
...
...
@@ -602,6 +624,7 @@ export default {
console.log(fData);
const response = await delFavoriteFile(fData);
this.$store.commit('setFile', response.data.files);
this.files = response.data.files;
} catch (error) {
console.log('에러');
}
...
...
@@ -616,6 +639,7 @@ export default {
console.log(fData);
const response = await addFavoriteFile(fData);
this.$store.commit('setFile', response.data.files);
this.files = response.data.files;
} catch (error) {
console.log('에러');
}
...
...
Please
register
or
login
to post a comment