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-10 01:11:39 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e0a9f8fc2d6175ef2593deee8bf28c8ee2d9a5df
e0a9f8fc
1 parent
4d5430b3
change
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
47 deletions
front-end/src/components/FileList.vue
front-end/src/components/folderc.vue
front-end/src/components/FileList.vue
View file @
e0a9f8f
...
...
@@ -27,7 +27,6 @@
$router.push({
name: 'Folder',
params: { id: item.folder_id },
props: { folderId: item.id },
})
"
>
...
...
@@ -343,28 +342,34 @@ export default {
},
};
},
async created() {
try {
const curData = {
id: this.$store.state.id,
folder_id: -1,
};
console.log(curData);
const response = await folder(curData);
const file_response = await file(curData);
this.$store.commit('setFolder', response.data.folders);
this.$store.commit('setCur', response.data.cur);
this.$store.commit('setParent', response.data.parentPath);
this.$store.commit('setFile', file_response.data.files);
this.folders = this.$store.getters.folderL;
console.log(this.$store.getters.fileL);
this.files = this.$store.getters.fileL;
} catch (error) {
console.log('에러');
console.log(error);
}
created() {
this.fetchData();
},
watch: {
$route: 'fetchData',
},
methods: {
async fetchData() {
try {
const curData = {
id: this.$store.state.id,
folder_id: -1,
};
console.log(curData);
const response = await folder(curData);
const file_response = await file(curData);
this.$store.commit('setFolder', response.data.folders);
this.$store.commit('setCur', response.data.cur);
this.$store.commit('setParent', response.data.parentPath);
this.$store.commit('setFile', file_response.data.files);
this.folders = this.$store.getters.folderL;
console.log(this.$store.getters.fileL);
this.files = this.$store.getters.fileL;
} catch (error) {
console.log('에러');
console.log(error);
}
},
handleFileUpload() {
this.uploadedfile = this.$refs.uploadedfile.files[0];
console.log(this.uploadedfile);
...
...
front-end/src/components/folderc.vue
View file @
e0a9f8f
...
...
@@ -14,9 +14,7 @@
<v-list two-line subheader>
<!-- <v-subheader inset>Folders</v-subheader> -->
<!-- Folder view -->
<v-list-item v-if="this.$store.state.cur !== '/'" @click="moveParent"
>...</v-list-item
>
<v-list-item @click="$router.go(-1)">...</v-list-item>
<v-list-item
v-for="item in this.$store.getters.folderL"
:key="item.folder_id"
...
...
@@ -27,7 +25,6 @@
$router.push({
name: 'Folder',
params: { id: item.folder_id },
props: { folderId: item.folder_name },
})
"
>
...
...
@@ -312,13 +309,14 @@ import {
modifyFile,
} from '../api/index';
import Axios from 'axios';
export default {
props: {
folderId: Number,
},
data() {
return {
folder_id: this.
folderI
d,
folder_id: this.
$route.params.i
d,
uploadedfile: null,
foldername: '',
curfName: {},
...
...
@@ -347,29 +345,35 @@ export default {
},
};
},
async created() {
try {
console.log(this.$route.params.id);
const curData = {
id: this.$store.state.id,
folder_id: this.$route.params.id,
};
console.log(curData);
const response = await folder(curData);
// const file_response = await file(curData);
this.$store.commit('setFolder', response.data.folders);
this.$store.commit('setCur', response.data.cur);
this.$store.commit('setParent', response.data.parentPath);
this.$store.commit('setFile', response.data.files);
this.folders = this.$store.getters.folderL;
console.log(this.$store.getters.fileL);
this.files = this.$store.getters.fileL;
} catch (error) {
console.log('에러');
console.log(error);
}
created() {
this.fetchData();
},
watch: {
$route: 'fetchData',
},
methods: {
async fetchData() {
try {
console.log(this.$route.params.id);
const curData = {
id: this.$store.state.id,
folder_id: this.$route.params.id,
};
console.log(curData);
const response = await folder(curData);
// const file_response = await file(curData);
this.$store.commit('setFolder', response.data.folders);
this.$store.commit('setCur', response.data.cur);
this.$store.commit('setParent', response.data.parentPath);
this.$store.commit('setFile', response.data.files);
this.folders = this.$store.getters.folderL;
console.log(this.$store.getters.fileL);
this.files = this.$store.getters.fileL;
} catch (error) {
console.log('에러');
console.log(error);
}
},
handleFileUpload() {
this.uploadedfile = this.$refs.uploadedfile.files[0];
console.log(this.uploadedfile);
...
...
Please
register
or
login
to post a comment