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-14 22:30:41 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e48c655d8097411ec246245eaeaaca0051d5cc19
e48c655d
1 parent
8f8644fd
complete
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
7 deletions
backend/routes/modules/awsconfig.json
front-end/src/components/FileList.vue
front-end/src/components/accessList.vue
backend/routes/modules/awsconfig.json
View file @
e48c655
front-end/src/components/FileList.vue
View file @
e48c655
...
...
@@ -46,7 +46,7 @@
<v-list-item
v-for="item in calData2"
:key="item.file_id"
@click.right="showF(item, $event)"
@click.right="showF(item, $event)
; download_file(item);
"
@dblclick="
detailF(item, $event);
file_detail(item);
...
...
@@ -245,7 +245,8 @@
<v-list-item-title>삭제</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-list-item @click.prevent="download_file">
<a :href="currentDLpath">
<v-list-item >
<v-list-item-icon>
<v-icon>mdi-download</v-icon>
</v-list-item-icon>
...
...
@@ -253,6 +254,7 @@
<v-list-item-title>다운로드</v-list-item-title>
</v-list-item-content>
</v-list-item>
</a>
<v-list-item
v-if="cfilename.favorite === 1"
@click.prevent="delete_favorite_file"
...
...
@@ -347,6 +349,7 @@ import Axios from 'axios';
export default {
data() {
return {
currentDLpath:null,
uploadedfile: null,
foldername: '',
curfName: {},
...
...
@@ -574,15 +577,16 @@ export default {
console.log(error);
}
},
async download_file() {
async download_file(
item
) {
try {
const currentData = {
fileName:
this.cfilename
.file_name,
fileName:
item
.file_name,
id: this.$store.state.id,
cur: this.$store.state.cur,
};
const result = await downloadFile(currentData);
console.log(result);
this.currentDLpath = result.data;
console.log(this.currentDLpath);
} catch (error) {
console.log('에러');
console.log(error);
...
...
@@ -759,3 +763,6 @@ export default {
},
};
</script>
<style type"text/css">
</style>
...
...
front-end/src/components/accessList.vue
View file @
e48c655
...
...
@@ -14,7 +14,9 @@
</tr>
</thead>
<tbody>
<tr v-for="item in recent_list" :key="item.name" @dblclick.stop = "dialog = true;download_file(item.file_name, item.location); ">
<tr v-for="item in recent_list" :key="item.name" @click.right="
showMenuF=true; x=$event.clientX; y=$event.clientY; download_file(item.file_name, item.location); "
@contextmenu.prevent>
<td>{{ item.file_id }}</td>
<td>{{ item.file_name }}</td>
<td>{{ item.location }}</td>
...
...
@@ -24,6 +26,26 @@
</template>
</v-simple-table>
<v-divider></v-divider>
<v-menu
v-model="showMenuF"
:position-x="x"
:position-y="y"
absolute
offset-y
>
<v-list dense>
<a :href="currentDLpath">
<v-list-item >
<v-list-item-icon>
<v-icon>mdi-download</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title>다운로드</v-list-item-title>
</v-list-item-content>
</v-list-item>
</a>
</v-list>
</v-menu>
<v-dialog
v-model="dialog"
max-width="290"
...
...
@@ -46,6 +68,10 @@ export default {
return {
recent_list: [],
dialog :false,
showMenuF : false,
currentDLpath :null,
x:0,
y:0
};
},
async created() {
...
...
@@ -64,6 +90,16 @@ export default {
}
},
methods: {
showF(fileObj, e) {
e.preventDefault();
this.showMenuF = false;
this.x = e.clientX;
this.y = e.clientY;
this.$nextTick(() => {
this.showMenuF = true;
});
console.log(this.showMenuF);
},
async download_file(name, dir) {
try {
const currentData = {
...
...
@@ -72,7 +108,8 @@ export default {
cur: dir
};
const result = await downloadFile(currentData);
console.log(result);
this.currentDLpath = result.data;
console.log(this.currentDLpath);
} catch (error) {
console.log('에러');
console.log(error);
...
...
Please
register
or
login
to post a comment