Hong

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

…_Team_Khuloud into share,favorite
...@@ -27,52 +27,8 @@ ...@@ -27,52 +27,8 @@
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>
42 - <v-list-item @click.prevent="deleteF">
43 - <v-list-item-title>삭제</v-list-item-title>
44 - </v-list-item>
45 - </v-list>
46 - </v-menu>
47 </v-list-item> 30 </v-list-item>
48 - <v-dialog v-model="dialog2" width="500px"> 31 +
49 - <v-card>
50 - <v-card-title class="grey darken-2">
51 - Move Folder
52 - </v-card-title>
53 - <v-container>
54 - <v-list-item-group v-for="item2 in folders" :key="item2.folder_id">
55 - <template v-if="!(item2.folder_name === curfName)">
56 - <v-hover @click.left="transferF(item2.folder_name)">
57 - <v-list-item-avatar>
58 - <v-icon>mdi-folder</v-icon>
59 - </v-list-item-avatar>
60 - <v-list-item-content>
61 - <v-list-item-title
62 - v-text="item2.folder_name"
63 - ></v-list-item-title>
64 - </v-list-item-content>
65 - </v-hover>
66 - </template>
67 - <!-- <template v-else></template> -->
68 - </v-list-item-group>
69 - </v-container>
70 - <v-card-actions>
71 - <v-spacer></v-spacer>
72 - <v-btn text color="primary" @click="cancelMove">Cancel</v-btn>
73 - </v-card-actions>
74 - </v-card>
75 - </v-dialog>
76 <v-divider inset></v-divider> 32 <v-divider inset></v-divider>
77 <v-subheader inset>Files</v-subheader> 33 <v-subheader inset>Files</v-subheader>
78 <v-list-item v-for="item in this.$store.getters.fileL" :key="item.title"> 34 <v-list-item v-for="item in this.$store.getters.fileL" :key="item.title">
...@@ -92,6 +48,55 @@ ...@@ -92,6 +48,55 @@
92 </v-list-item-action> 48 </v-list-item-action>
93 </v-list-item> 49 </v-list-item>
94 </v-list> 50 </v-list>
51 +
52 + <v-dialog v-model="dialog2" width="500px">
53 + <v-card>
54 + <v-card-title class="grey darken-2">
55 + Move Folder
56 + </v-card-title>
57 + <v-container>
58 + <v-list>
59 + <v-list-item
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 + >
65 + <v-list-item-avatar>
66 + <v-icon>mdi-folder</v-icon>
67 + </v-list-item-avatar>
68 + <v-list-item-content>
69 + <v-list-item-title
70 + v-text="item2.folder_name"
71 + ></v-list-item-title>
72 + </v-list-item-content>
73 + </v-list-item>
74 + </v-list>
75 + </v-container>
76 + <v-card-actions>
77 + <v-spacer></v-spacer>
78 + <v-btn text color="primary" @click="cancelMove">Cancel</v-btn>
79 + </v-card-actions>
80 + </v-card>
81 + </v-dialog>
82 +
83 + <v-menu
84 + v-model="showMenu"
85 + :position-x="x"
86 + :position-y="y"
87 + absolute
88 + offset-y
89 + >
90 + <v-list dense>
91 + <v-list-item @click.prevent="dialog2 = !dialog2">
92 + <v-list-item-title>이동</v-list-item-title>
93 + </v-list-item>
94 + <v-list-item @click.prevent="deleteF">
95 + <v-list-item-title>삭제</v-list-item-title>
96 + </v-list-item>
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,16 +369,16 @@ export default { ...@@ -397,16 +369,16 @@ export default {
397 console.log(error); 369 console.log(error);
398 } 370 }
399 }, 371 },
400 - }, 372 + show(folderN, e) {
401 - show(folderN, e) { 373 + e.preventDefault();
402 - e.preventDefault(); 374 + this.curfName = folderN;
403 - this.curfName = folderN; 375 + this.showMenu = false;
404 - this.showMenu = false; 376 + this.x = e.clientX;
405 - this.x = e.clientX; 377 + this.y = e.clientY;
406 - this.y = e.clientY; 378 + this.$nextTick(() => {
407 - this.$nextTick(() => { 379 + this.showMenu = true;
408 - this.showMenu = true; 380 + });
409 - }); 381 + },
410 }, 382 },
411 }; 383 };
412 </script> 384 </script>
......