박기범

complete

...@@ -3,4 +3,4 @@ ...@@ -3,4 +3,4 @@
3 "secretAccessKey": "", 3 "secretAccessKey": "",
4 "sessionToken": "", 4 "sessionToken": "",
5 "region": "ap-northeast-2" 5 "region": "ap-northeast-2"
6 -}
...\ No newline at end of file ...\ No newline at end of file
6 +}
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
46 <v-list-item 46 <v-list-item
47 v-for="item in calData2" 47 v-for="item in calData2"
48 :key="item.file_id" 48 :key="item.file_id"
49 - @click.right="showF(item, $event)" 49 + @click.right="showF(item, $event); download_file(item);"
50 @dblclick=" 50 @dblclick="
51 detailF(item, $event); 51 detailF(item, $event);
52 file_detail(item); 52 file_detail(item);
...@@ -245,14 +245,16 @@ ...@@ -245,14 +245,16 @@
245 <v-list-item-title>삭제</v-list-item-title> 245 <v-list-item-title>삭제</v-list-item-title>
246 </v-list-item-content> 246 </v-list-item-content>
247 </v-list-item> 247 </v-list-item>
248 - <v-list-item @click.prevent="download_file"> 248 + <a :href="currentDLpath">
249 - <v-list-item-icon> 249 + <v-list-item >
250 - <v-icon>mdi-download</v-icon> 250 + <v-list-item-icon>
251 - </v-list-item-icon> 251 + <v-icon>mdi-download</v-icon>
252 - <v-list-item-content> 252 + </v-list-item-icon>
253 - <v-list-item-title>다운로드</v-list-item-title> 253 + <v-list-item-content>
254 - </v-list-item-content> 254 + <v-list-item-title>다운로드</v-list-item-title>
255 - </v-list-item> 255 + </v-list-item-content>
256 + </v-list-item>
257 + </a>
256 <v-list-item 258 <v-list-item
257 v-if="cfilename.favorite === 1" 259 v-if="cfilename.favorite === 1"
258 @click.prevent="delete_favorite_file" 260 @click.prevent="delete_favorite_file"
...@@ -347,6 +349,7 @@ import Axios from 'axios'; ...@@ -347,6 +349,7 @@ import Axios from 'axios';
347 export default { 349 export default {
348 data() { 350 data() {
349 return { 351 return {
352 + currentDLpath:null,
350 uploadedfile: null, 353 uploadedfile: null,
351 foldername: '', 354 foldername: '',
352 curfName: {}, 355 curfName: {},
...@@ -574,15 +577,16 @@ export default { ...@@ -574,15 +577,16 @@ export default {
574 console.log(error); 577 console.log(error);
575 } 578 }
576 }, 579 },
577 - async download_file() { 580 + async download_file(item) {
578 try { 581 try {
579 const currentData = { 582 const currentData = {
580 - fileName: this.cfilename.file_name, 583 + fileName: item.file_name,
581 id: this.$store.state.id, 584 id: this.$store.state.id,
582 cur: this.$store.state.cur, 585 cur: this.$store.state.cur,
583 }; 586 };
584 const result = await downloadFile(currentData); 587 const result = await downloadFile(currentData);
585 - console.log(result); 588 + this.currentDLpath = result.data;
589 + console.log(this.currentDLpath);
586 } catch (error) { 590 } catch (error) {
587 console.log('에러'); 591 console.log('에러');
588 console.log(error); 592 console.log(error);
...@@ -759,3 +763,6 @@ export default { ...@@ -759,3 +763,6 @@ export default {
759 }, 763 },
760 }; 764 };
761 </script> 765 </script>
766 +<style type"text/css">
767 +
768 +</style>
......
...@@ -14,7 +14,9 @@ ...@@ -14,7 +14,9 @@
14 </tr> 14 </tr>
15 </thead> 15 </thead>
16 <tbody> 16 <tbody>
17 - <tr v-for="item in recent_list" :key="item.name" @dblclick.stop = "dialog = true;download_file(item.file_name, item.location); "> 17 + <tr v-for="item in recent_list" :key="item.name" @click.right="
18 + showMenuF=true; x=$event.clientX; y=$event.clientY; download_file(item.file_name, item.location); "
19 + @contextmenu.prevent>
18 <td>{{ item.file_id }}</td> 20 <td>{{ item.file_id }}</td>
19 <td>{{ item.file_name }}</td> 21 <td>{{ item.file_name }}</td>
20 <td>{{ item.location }}</td> 22 <td>{{ item.location }}</td>
...@@ -24,6 +26,26 @@ ...@@ -24,6 +26,26 @@
24 </template> 26 </template>
25 </v-simple-table> 27 </v-simple-table>
26 <v-divider></v-divider> 28 <v-divider></v-divider>
29 + <v-menu
30 + v-model="showMenuF"
31 + :position-x="x"
32 + :position-y="y"
33 + absolute
34 + offset-y
35 + >
36 + <v-list dense>
37 + <a :href="currentDLpath">
38 + <v-list-item >
39 + <v-list-item-icon>
40 + <v-icon>mdi-download</v-icon>
41 + </v-list-item-icon>
42 + <v-list-item-content>
43 + <v-list-item-title>다운로드</v-list-item-title>
44 + </v-list-item-content>
45 + </v-list-item>
46 + </a>
47 + </v-list>
48 + </v-menu>
27 <v-dialog 49 <v-dialog
28 v-model="dialog" 50 v-model="dialog"
29 max-width="290" 51 max-width="290"
...@@ -46,6 +68,10 @@ export default { ...@@ -46,6 +68,10 @@ export default {
46 return { 68 return {
47 recent_list: [], 69 recent_list: [],
48 dialog :false, 70 dialog :false,
71 + showMenuF : false,
72 + currentDLpath :null,
73 + x:0,
74 + y:0
49 }; 75 };
50 }, 76 },
51 async created() { 77 async created() {
...@@ -64,6 +90,16 @@ export default { ...@@ -64,6 +90,16 @@ export default {
64 } 90 }
65 }, 91 },
66 methods: { 92 methods: {
93 + showF(fileObj, e) {
94 + e.preventDefault();
95 + this.showMenuF = false;
96 + this.x = e.clientX;
97 + this.y = e.clientY;
98 + this.$nextTick(() => {
99 + this.showMenuF = true;
100 + });
101 + console.log(this.showMenuF);
102 + },
67 async download_file(name, dir) { 103 async download_file(name, dir) {
68 try { 104 try {
69 const currentData = { 105 const currentData = {
...@@ -72,7 +108,8 @@ export default { ...@@ -72,7 +108,8 @@ export default {
72 cur: dir 108 cur: dir
73 }; 109 };
74 const result = await downloadFile(currentData); 110 const result = await downloadFile(currentData);
75 - console.log(result); 111 + this.currentDLpath = result.data;
112 + console.log(this.currentDLpath);
76 } catch (error) { 113 } catch (error) {
77 console.log('에러'); 114 console.log('에러');
78 console.log(error); 115 console.log(error);
......