Showing
1 changed file
with
59 additions
and
0 deletions
front-end/src/components/accessList.vue
0 → 100644
1 | +<template lang="html"> | ||
2 | + <v-flex> | ||
3 | + <h1>빠른액세스</h1> | ||
4 | + <v-simple-table> | ||
5 | + <template v-slot:default> | ||
6 | + <thead> | ||
7 | + <tr> | ||
8 | + <th class="text-left">File ID</th> | ||
9 | + <th class="text-left">Name</th> | ||
10 | + <th class="text-left">Dir</th> | ||
11 | + <th class="text-left">Date</th> | ||
12 | + </tr> | ||
13 | + </thead> | ||
14 | + <tbody> | ||
15 | + <tr v-for="item in recent_list" :key="item.name"> | ||
16 | + <td>{{ item.file_id }}</td> | ||
17 | + <td>{{ item.file_name}}</td> | ||
18 | + <td>{{ item.location }}</td> | ||
19 | + <td>{{ item.date }}</td> | ||
20 | + </tr> | ||
21 | + </tbody> | ||
22 | + </template> | ||
23 | + </v-simple-table> | ||
24 | + <v-divider></v-divider> | ||
25 | + </v-flex> | ||
26 | +</template> | ||
27 | + | ||
28 | +<script> | ||
29 | + import { accessedList } from '../api/index'; | ||
30 | + import Axios from 'axios'; | ||
31 | + export default { | ||
32 | + data() { | ||
33 | + return { | ||
34 | + recent_list : [] | ||
35 | + } | ||
36 | + }, | ||
37 | + async created(){ | ||
38 | + try { | ||
39 | + const curData = { | ||
40 | + id : this.$store.state.id, | ||
41 | + } | ||
42 | + console.log(curData); | ||
43 | + const list_reponse = await accessedList(curData); | ||
44 | + this.$store.commit('setRecentList', list_reponse.data) | ||
45 | + this.recent_list = this.$store.getters.recentL; | ||
46 | + console.log(this.$store.getters.recentL); | ||
47 | + } catch (error) { | ||
48 | + console.log("에러"); | ||
49 | + console.log(error); | ||
50 | + } | ||
51 | + }, | ||
52 | + methods:{ | ||
53 | + | ||
54 | + } | ||
55 | + } | ||
56 | +</script> | ||
57 | + | ||
58 | +<style lang="css" scoped> | ||
59 | +</style> |
-
Please register or login to post a comment