Hong

Merge branch 'share,favorite' of http://khuhub.khu.ac.kr/2020-1-CloudComputing/D…

…_Team_Khuloud into share,favorite
...@@ -27,33 +27,41 @@ ...@@ -27,33 +27,41 @@
27 <v-list-item-content> 27 <v-list-item-content>
28 <v-list-item-title v-text="item.folder_name"></v-list-item-title> 28 <v-list-item-title v-text="item.folder_name"></v-list-item-title>
29 </v-list-item-content> 29 </v-list-item-content>
30 -
31 - <v-menu
32 - v-model="showMenu"
33 - :position-x="x"
34 - :position-y="y"
35 - absolute
36 - offset-y
37 - >
38 - <v-list dense>
39 - <v-list-item @click.prevent="dialog2 = !dialog2">
40 - <v-list-item-title>이동</v-list-item-title>
41 </v-list-item> 30 </v-list-item>
42 - <v-list-item @click.prevent="deleteF"> 31 +
43 - <v-list-item-title>삭제</v-list-item-title> 32 + <v-divider inset></v-divider>
33 + <v-subheader inset>Files</v-subheader>
34 + <v-list-item v-for="item in this.$store.getters.fileL" :key="item.title">
35 + <v-list-item-avatar>
36 + <v-icon> mdi-file</v-icon>
37 + </v-list-item-avatar>
38 + <v-list-item-content>
39 + <v-list-item-title v-text="item.file_name"></v-list-item-title>
40 + </v-list-item-content>
41 + <v-list-item-action>
42 + <v-btn icon @click="download_file(item.file_name)">
43 + <v-icon color="grey lighten-1">mdi-download</v-icon>
44 + </v-btn>
45 + <v-btn icon @click="delete_file(item.file_name)">
46 + <v-icon color="grey lighten-1">mdi-delete</v-icon>
47 + </v-btn>
48 + </v-list-item-action>
44 </v-list-item> 49 </v-list-item>
45 </v-list> 50 </v-list>
46 - </v-menu> 51 +
47 - </v-list-item>
48 <v-dialog v-model="dialog2" width="500px"> 52 <v-dialog v-model="dialog2" width="500px">
49 <v-card> 53 <v-card>
50 <v-card-title class="grey darken-2"> 54 <v-card-title class="grey darken-2">
51 Move Folder 55 Move Folder
52 </v-card-title> 56 </v-card-title>
53 <v-container> 57 <v-container>
54 - <v-list-item-group v-for="item2 in folders" :key="item2.folder_id"> 58 + <v-list>
55 - <template v-if="!(item2.folder_name === curfName)"> 59 + <v-list-item
56 - <v-hover @click.left="transferF(item2.folder_name)"> 60 + v-for="item2 in folders"
61 + :key="item2.folder_id"
62 + @click.left="transferF(item2.folder_name)"
63 + v-if="item2.folder_name !== curfName"
64 + >
57 <v-list-item-avatar> 65 <v-list-item-avatar>
58 <v-icon>mdi-folder</v-icon> 66 <v-icon>mdi-folder</v-icon>
59 </v-list-item-avatar> 67 </v-list-item-avatar>
...@@ -62,10 +70,8 @@ ...@@ -62,10 +70,8 @@
62 v-text="item2.folder_name" 70 v-text="item2.folder_name"
63 ></v-list-item-title> 71 ></v-list-item-title>
64 </v-list-item-content> 72 </v-list-item-content>
65 - </v-hover> 73 + </v-list-item>
66 - </template> 74 + </v-list>
67 - <!-- <template v-else></template> -->
68 - </v-list-item-group>
69 </v-container> 75 </v-container>
70 <v-card-actions> 76 <v-card-actions>
71 <v-spacer></v-spacer> 77 <v-spacer></v-spacer>
...@@ -73,25 +79,24 @@ ...@@ -73,25 +79,24 @@
73 </v-card-actions> 79 </v-card-actions>
74 </v-card> 80 </v-card>
75 </v-dialog> 81 </v-dialog>
76 - <v-divider inset></v-divider> 82 +
77 - <v-subheader inset>Files</v-subheader> 83 + <v-menu
78 - <v-list-item v-for="item in this.$store.getters.fileL" :key="item.title"> 84 + v-model="showMenu"
79 - <v-list-item-avatar> 85 + :position-x="x"
80 - <v-icon> mdi-file</v-icon> 86 + :position-y="y"
81 - </v-list-item-avatar> 87 + absolute
82 - <v-list-item-content> 88 + offset-y
83 - <v-list-item-title v-text="item.file_name"></v-list-item-title> 89 + >
84 - </v-list-item-content> 90 + <v-list dense>
85 - <v-list-item-action> 91 + <v-list-item @click.prevent="dialog2 = !dialog2">
86 - <v-btn icon @click="download_file(item.file_name)"> 92 + <v-list-item-title>이동</v-list-item-title>
87 - <v-icon color="grey lighten-1">mdi-download</v-icon> 93 + </v-list-item>
88 - </v-btn> 94 + <v-list-item @click.prevent="deleteF">
89 - <v-btn icon @click="delete_file(item.file_name)"> 95 + <v-list-item-title>삭제</v-list-item-title>
90 - <v-icon color="grey lighten-1">mdi-delete</v-icon>
91 - </v-btn>
92 - </v-list-item-action>
93 </v-list-item> 96 </v-list-item>
94 </v-list> 97 </v-list>
98 + </v-menu>
99 +
95 <input 100 <input
96 id="file-selector" 101 id="file-selector"
97 ref="uploadedfile" 102 ref="uploadedfile"
...@@ -99,38 +104,6 @@ ...@@ -99,38 +104,6 @@
99 v-on:change="handleFileUpload()" 104 v-on:change="handleFileUpload()"
100 /> 105 />
101 <br /> 106 <br />
102 - <!--
103 - <v-file-input
104 - v-model="files"
105 - color="deep-purple accent-4"
106 - counter
107 - label="업로드"
108 - multiple
109 - placeholder="파일을 화면으로 드래그앤 드롭 하거나, 이곳을 클릭하세요."
110 - prepend-icon="mdi-paperclip"
111 - outlined
112 - :show-size="1000"
113 - >
114 - <template v-slot:selection="{ index, text }">
115 - <v-chip
116 - v-if="index < 2"
117 - color="deep-purple accent-4"
118 - dark
119 - label
120 - small
121 - >
122 - {{ text }}
123 - </v-chip>
124 - <span
125 - v-else-if="index === 2"
126 - class="overline grey--text text--darken-3 mx-2"
127 - >
128 - +{{ files.length - 2 }} File(s)
129 - </span>
130 - </template>
131 -
132 - </v-file-input>
133 --->
134 <v-btn color="blue" @click="upload_file">upload</v-btn> 107 <v-btn color="blue" @click="upload_file">upload</v-btn>
135 <v-btn bottom color="blue" dark fab fixed right @click="dialog = !dialog"> 108 <v-btn bottom color="blue" dark fab fixed right @click="dialog = !dialog">
136 <v-icon>mdi-plus</v-icon> 109 <v-icon>mdi-plus</v-icon>
...@@ -210,7 +183,6 @@ export default { ...@@ -210,7 +183,6 @@ export default {
210 this.$store.commit('setFolder', response.data.folders); 183 this.$store.commit('setFolder', response.data.folders);
211 this.$store.commit('setCur', response.data.cur); 184 this.$store.commit('setCur', response.data.cur);
212 this.$store.commit('setParent', response.data.parentPath); 185 this.$store.commit('setParent', response.data.parentPath);
213 - this.folders = this.$store.getters.folderL;
214 this.$store.commit('setFile', file_response.data.files); 186 this.$store.commit('setFile', file_response.data.files);
215 this.folders = this.$store.getters.folderL; 187 this.folders = this.$store.getters.folderL;
216 console.log(this.$store.getters.fileL); 188 console.log(this.$store.getters.fileL);
...@@ -397,7 +369,6 @@ export default { ...@@ -397,7 +369,6 @@ export default {
397 console.log(error); 369 console.log(error);
398 } 370 }
399 }, 371 },
400 - },
401 show(folderN, e) { 372 show(folderN, e) {
402 e.preventDefault(); 373 e.preventDefault();
403 this.curfName = folderN; 374 this.curfName = folderN;
...@@ -408,5 +379,6 @@ export default { ...@@ -408,5 +379,6 @@ export default {
408 this.showMenu = true; 379 this.showMenu = true;
409 }); 380 });
410 }, 381 },
382 + },
411 }; 383 };
412 </script> 384 </script>
......