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-07 19:46:13 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7bf99fba9c9d302e704b59c42a06140b91c6d7f0
7bf99fba
1 parent
88e27b27
add recent access list
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
21 deletions
front-end/src/components/accessList.vue
front-end/src/store/index.js
front-end/src/views/Home.vue
front-end/src/components/accessList.vue
0 → 100644
View file @
7bf99fb
<template lang="html">
<v-flex>
<h1>빠른액세스</h1>
<v-simple-table>
<template v-slot:default>
<thead>
<tr>
<th class="text-left">Name</th>
<th class="text-left">Date</th>
</tr>
</thead>
<tbody>
<tr v-for="item in recent_list" :key="item.name">
<td>{{ item.file_id }}</td>
<td>{{ item.file_name}}</td>
<td>{{ item.location }}</td>
<td>{{ item.date }}</td>
</tr>
</tbody>
</template>
</v-simple-table>
<v-divider></v-divider>
</v-flex>
</template>
<script>
import { accessed_list } from '../api/index';
import Axios from 'axios';
export default {
data() {
return {
recent_list = []
}
},
async created(){
try {
const curData = {
id : this.$store.state.id,
}
console.log(curData);
const list_reponse = await accessed_list(curData);
this.$store.commit('setRecentList', list_reponse.data)
this.recent_list = this.$stroe.getters.recentL;
console.log(this.$store.getters.recentL);
} catch (error) {
console.log("에러");
console.log(error);
}
},
methods:{
}
}
</script>
<style lang="css" scoped>
</style>
front-end/src/store/index.js
View file @
7bf99fb
...
...
@@ -9,7 +9,8 @@ export default new Vuex.Store({
folders
:
[],
files
:
[],
cur
:
'/'
,
parent
:
'/'
parent
:
'/'
,
recentList
:[]
},
mutations
:
{
setId
(
state
,
userid
)
{
...
...
@@ -29,6 +30,9 @@ export default new Vuex.Store({
},
setParent
(
state
,
parent
)
{
state
.
parent
=
parent
;
},
setRecentList
(
state
,
list
){
state
.
recentList
=
list
;
}
},
getters
:
{
...
...
@@ -44,6 +48,9 @@ export default new Vuex.Store({
fileL
(
state
)
{
return
state
.
files
;
},
recentL
(
state
){
return
state
.
recentList
;
},
cur
(
state
)
{
return
state
.
cur
;
},
...
...
front-end/src/views/Home.vue
View file @
7bf99fb
...
...
@@ -20,26 +20,9 @@
<v-spacer></v-spacer>
</v-flex>
<v-flex><br><v-divider></v-divider><br></v-flex>
<v-flex>
<h1>빠른액세스</h1>
<v-simple-table>
<template v-slot:default>
<thead>
<tr>
<th class="text-left">Name</th>
<th class="text-left">Date</th>
</tr>
</thead>
<tbody>
<tr v-for="item in favorite" :key="item.name">
<td>{{ item.name }}</td>
<td>{{ item.date }}</td>
</tr>
</tbody>
</template>
</v-simple-table>
<v-divider></v-divider>
</v-flex>
<v-container>
</v-container>
</v-flex>
<v-flex><br><v-divider></v-divider><br></v-flex>
<v-flex xs6>
...
...
@@ -72,6 +55,7 @@
<script>
import Filecard from '@/components/accessList.vue'
export default {
data () {
return {
...
...
Please
register
or
login
to post a comment