leeseohyeon

Merge branch 'file_additional' of ssh://khuhub.khu.ac.kr:12959/2020-1-CloudCompu…

…ting/D_Team_Khuloud into new_file
...@@ -20,19 +20,40 @@ router.post('/update', function(req, res, next) { ...@@ -20,19 +20,40 @@ router.post('/update', function(req, res, next) {
20 console.log("updating user failed"); 20 console.log("updating user failed");
21 next(err); 21 next(err);
22 } else { 22 } else {
23 - console.log("user updated successfully"); 23 + res.status(200).send('update');
24 - res.redirect('back');
25 } 24 }
26 }); 25 });
27 } 26 }
28 else 27 else
29 { 28 {
30 - console.log("password not match"); 29 + res.status(404).send(err);
31 - res.redirect('back');
32 } 30 }
33 }); 31 });
34 32
33 +router.post('/delete', function(req, res, next) {
34 + var user_id=req.body.user_id;
35 + var user_pw=req.body.user_pw;
36 + var user_pw_temp =cryptoM.encrypt(user_pw); //받아온 비밀번호를 암호화화여 임시변수에 저장
37 +
38 + var sqlquery = "SELECT user_pw FROM users WHERE user_id = ?"; // user_id의 비밀번호를 가져옴
39 + connection.query(sqlquery, [user_id], function (err, rows) {
40 + if (rows[0].user_pw == user_pw_temp) { // 받아온 비밀번호와 user_id의 비밀번호가 같은지 대조
41 + var sql = 'delete from users where user_id = ?'; // 만약 같다면 삭제 진행
42 + var values = [user_id];
43 + connection.query(sql, values, function (err) {
44 + if (err) {
45 + console.log("delete user failed");
46 + throw err;
47 + } else {
48 + res.status(200).send('delete');
35 49
50 + }
51 + });
52 + } else {
53 + res.status(404).send(err);
54 + }
55 + });
36 56
57 +});
37 58
38 module.exports = router; 59 module.exports = router;
......
1 +module.exports = {
2 + root: true,
3 + env: {
4 + node: true,
5 + },
6 + extends: [
7 + 'eslint:recommended',
8 + 'plugin:vue/essential',
9 + 'prettier',
10 + 'plugin:prettier/recommended',
11 + ],
12 +
13 + parserOptions: {
14 + parser: 'babel-eslint',
15 + },
16 + rules: {
17 + 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
18 + 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
19 + 'prettier/prettier': [
20 + 'error',
21 + {
22 + singleQuote: true,
23 + semi: true,
24 + useTabs: true,
25 + tabWidth: 2,
26 + trailingComma: 'all',
27 + printWidth: 80,
28 + bracketSpacing: true,
29 + arrowParens: 'avoid',
30 + },
31 + ],
32 + },
33 + overrides: [
34 + {
35 + files: [
36 + '**/__tests__/*.{j,t}s?(x)',
37 + '**/tests/unit/**/*.spec.{j,t}s?(x)',
38 + ],
39 + env: {
40 + jest: true,
41 + },
42 + },
43 + ],
44 +};
1 module.exports = { 1 module.exports = {
2 - presets: [ 2 + presets: ['@vue/cli-plugin-babel/preset'],
3 - '@vue/cli-plugin-babel/preset' 3 +};
4 - ]
5 -}
......
...@@ -2147,6 +2147,20 @@ ...@@ -2147,6 +2147,20 @@
2147 } 2147 }
2148 } 2148 }
2149 }, 2149 },
2150 + "babel-eslint": {
2151 + "version": "10.1.0",
2152 + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz",
2153 + "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==",
2154 + "dev": true,
2155 + "requires": {
2156 + "@babel/code-frame": "^7.0.0",
2157 + "@babel/parser": "^7.7.0",
2158 + "@babel/traverse": "^7.7.0",
2159 + "@babel/types": "^7.7.0",
2160 + "eslint-visitor-keys": "^1.0.0",
2161 + "resolve": "^1.12.0"
2162 + }
2163 + },
2150 "babel-loader": { 2164 "babel-loader": {
2151 "version": "8.1.0", 2165 "version": "8.1.0",
2152 "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.1.0.tgz", 2166 "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.1.0.tgz",
...@@ -4422,9 +4436,9 @@ ...@@ -4422,9 +4436,9 @@
4422 "dev": true 4436 "dev": true
4423 }, 4437 },
4424 "cross-spawn": { 4438 "cross-spawn": {
4425 - "version": "7.0.2", 4439 + "version": "7.0.3",
4426 - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz", 4440 + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
4427 - "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==", 4441 + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
4428 "dev": true, 4442 "dev": true,
4429 "requires": { 4443 "requires": {
4430 "path-key": "^3.1.0", 4444 "path-key": "^3.1.0",
...@@ -4596,14 +4610,14 @@ ...@@ -4596,14 +4610,14 @@
4596 "dev": true 4610 "dev": true
4597 }, 4611 },
4598 "espree": { 4612 "espree": {
4599 - "version": "7.0.0", 4613 + "version": "7.1.0",
4600 - "resolved": "https://registry.npmjs.org/espree/-/espree-7.0.0.tgz", 4614 + "resolved": "https://registry.npmjs.org/espree/-/espree-7.1.0.tgz",
4601 - "integrity": "sha512-/r2XEx5Mw4pgKdyb7GNLQNsu++asx/dltf/CI8RFi9oGHxmQFgvLbc5Op4U6i8Oaj+kdslhJtVlEZeAqH5qOTw==", 4615 + "integrity": "sha512-dcorZSyfmm4WTuTnE5Y7MEN1DyoPYy1ZR783QW1FJoenn7RailyWFsq/UL6ZAAA7uXurN9FIpYyUs3OfiIW+Qw==",
4602 "dev": true, 4616 "dev": true,
4603 "requires": { 4617 "requires": {
4604 - "acorn": "^7.1.1", 4618 + "acorn": "^7.2.0",
4605 "acorn-jsx": "^5.2.0", 4619 "acorn-jsx": "^5.2.0",
4606 - "eslint-visitor-keys": "^1.1.0" 4620 + "eslint-visitor-keys": "^1.2.0"
4607 }, 4621 },
4608 "dependencies": { 4622 "dependencies": {
4609 "acorn": { 4623 "acorn": {
...@@ -4611,6 +4625,12 @@ ...@@ -4611,6 +4625,12 @@
4611 "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz", 4625 "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz",
4612 "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==", 4626 "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==",
4613 "dev": true 4627 "dev": true
4628 + },
4629 + "eslint-visitor-keys": {
4630 + "version": "1.2.0",
4631 + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.2.0.tgz",
4632 + "integrity": "sha512-WFb4ihckKil6hu3Dp798xdzSfddwKKU3+nGniKF6HfeW6OLd2OUDEPP7TcHtB5+QXOKg2s6B2DaMPE1Nn/kxKQ==",
4633 + "dev": true
4614 } 4634 }
4615 } 4635 }
4616 }, 4636 },
...@@ -10644,9 +10664,9 @@ ...@@ -10644,9 +10664,9 @@
10644 "dev": true 10664 "dev": true
10645 }, 10665 },
10646 "v8-compile-cache": { 10666 "v8-compile-cache": {
10647 - "version": "2.1.0", 10667 + "version": "2.1.1",
10648 - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", 10668 + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz",
10649 - "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", 10669 + "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==",
10650 "dev": true 10670 "dev": true
10651 }, 10671 },
10652 "validate-npm-package-license": { 10672 "validate-npm-package-license": {
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
4 "private": true, 4 "private": true,
5 "scripts": { 5 "scripts": {
6 "serve": "vue-cli-service serve", 6 "serve": "vue-cli-service serve",
7 - "build": "vue-cli-service build" 7 + "build": "vue-cli-service build",
8 + "lint": "vue-cli-service lint"
8 }, 9 },
9 "dependencies": { 10 "dependencies": {
10 "axios": "^0.19.2", 11 "axios": "^0.19.2",
...@@ -19,6 +20,7 @@ ...@@ -19,6 +20,7 @@
19 "@vue/cli-plugin-router": "~4.3.0", 20 "@vue/cli-plugin-router": "~4.3.0",
20 "@vue/cli-plugin-vuex": "~4.3.0", 21 "@vue/cli-plugin-vuex": "~4.3.0",
21 "@vue/cli-service": "~4.3.0", 22 "@vue/cli-service": "~4.3.0",
23 + "babel-eslint": "^10.1.0",
22 "eslint": "^7.1.0", 24 "eslint": "^7.1.0",
23 "eslint-config-prettier": "^6.11.0", 25 "eslint-config-prettier": "^6.11.0",
24 "eslint-plugin-prettier": "^3.1.3", 26 "eslint-plugin-prettier": "^3.1.3",
......
1 -import axios from 'axios' 1 +import axios from 'axios';
2 2
3 const instance = axios.create({ 3 const instance = axios.create({
4 baseURL: process.env.VUE_APP_API_URL, 4 baseURL: process.env.VUE_APP_API_URL,
...@@ -18,8 +18,8 @@ function folder(curData) { ...@@ -18,8 +18,8 @@ function folder(curData) {
18 return axios.get('/api/folder/show', { 18 return axios.get('/api/folder/show', {
19 params: { 19 params: {
20 id: curData.id, 20 id: curData.id,
21 - cur: curData.cur 21 + cur: curData.cur,
22 - } 22 + },
23 }); 23 });
24 } 24 }
25 25
...@@ -35,52 +35,60 @@ function moveFolder(folderData) { ...@@ -35,52 +35,60 @@ function moveFolder(folderData) {
35 return axios.post('/api/folder/move', folderData); 35 return axios.post('/api/folder/move', folderData);
36 } 36 }
37 37
38 -function file(curData){ 38 +function file(curData) {
39 return axios.get('/api/file', { 39 return axios.get('/api/file', {
40 params: { 40 params: {
41 id: curData.id, 41 id: curData.id,
42 - cur: curData.cur 42 + cur: curData.cur,
43 - } 43 + },
44 }); 44 });
45 } 45 }
46 46
47 - 47 +function uploadFile(fileData) {
48 -function uploadFile(fileData){
49 return axios.post('/api/file/upload', fileData, { 48 return axios.post('/api/file/upload', fileData, {
50 - headers :{ 49 + headers: {
51 - 'Content-Type' : 'multipart/form-data' 50 + 'Content-Type': 'multipart/form-data',
52 - } 51 + },
53 }); 52 });
54 } 53 }
55 54
56 -function detailFile(fileData){ 55 +function detailFile(fileData) {
57 return axios.get(`/api/file/${fileData.name}`, { 56 return axios.get(`/api/file/${fileData.name}`, {
58 - params:{ 57 + params: {
59 id: fileData.id, 58 id: fileData.id,
60 - cur: fileData.cur 59 + cur: fileData.cur,
61 - } 60 + },
62 - }) 61 + });
63 } 62 }
64 -function deleteFile(fileData){ 63 +
64 +function deleteFile(fileData) {
65 return axios.get(`/api/file/delete/${fileData.fileName}`, { 65 return axios.get(`/api/file/delete/${fileData.fileName}`, {
66 - params:{ 66 + params: {
67 //현재 접속한 사람의 id와 삭제할 파일의 이름, 현재 폴더위치를 파라미터로 넘긴다. 67 //현재 접속한 사람의 id와 삭제할 파일의 이름, 현재 폴더위치를 파라미터로 넘긴다.
68 id: fileData.user_id, 68 id: fileData.user_id,
69 - cur: fileData.cur 69 + cur: fileData.cur,
70 - } 70 + },
71 }); 71 });
72 } 72 }
73 -function downloadFile(fileData){ 73 +function downloadFile(fileData) {
74 return axios.get(`api/file/download/${fileData.fileName}`, { 74 return axios.get(`api/file/download/${fileData.fileName}`, {
75 - params:{ 75 + params: {
76 //현재 접속한 사람의 id와 다운로드를 위해 선택한 파일의 이름을 파라미터로 넘긴다. 76 //현재 접속한 사람의 id와 다운로드를 위해 선택한 파일의 이름을 파라미터로 넘긴다.
77 id: fileData.id, 77 id: fileData.id,
78 - cur: fileData.cur 78 + cur: fileData.cur,
79 - } 79 + },
80 }); 80 });
81 } 81 }
82 82
83 - 83 +export {
84 - 84 + registerUser,
85 -export { registerUser, loginUser, folder, makeFolder, deleteFolder, moveFolder, 85 + loginUser,
86 - file, uploadFile, deleteFile, downloadFile }; 86 + folder,
87 + makeFolder,
88 + deleteFolder,
89 + moveFolder,
90 + file,
91 + uploadFile,
92 + deleteFile,
93 + downloadFile,
94 +};
......
1 <template> 1 <template>
2 <div> 2 <div>
3 <v-toolbar flat> 3 <v-toolbar flat>
4 - <v-toolbar-title>파일 4 + <v-toolbar-title>파일 </v-toolbar-title>
5 - </v-toolbar-title>
6 <v-spacer></v-spacer> 5 <v-spacer></v-spacer>
7 <v-text-field 6 <v-text-field
8 v-model="search" 7 v-model="search"
...@@ -19,18 +18,16 @@ ...@@ -19,18 +18,16 @@
19 v-for="item in this.$store.getters.folderL" 18 v-for="item in this.$store.getters.folderL"
20 :key="item.title" 19 :key="item.title"
21 :search="search" 20 :search="search"
22 - @click.right="show(item.folder_name,$event)" 21 + @click.right="show(item.folder_name, $event)"
23 @click.left="moveF(item.folder_name)" 22 @click.left="moveF(item.folder_name)"
24 > 23 >
25 - <v-list-item-avatar > 24 + <v-list-item-avatar>
26 <v-icon>mdi-folder</v-icon> 25 <v-icon>mdi-folder</v-icon>
27 </v-list-item-avatar> 26 </v-list-item-avatar>
28 - <v-list-item-content > 27 + <v-list-item-content>
29 <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>
30 </v-list-item-content> 29 </v-list-item-content>
31 30
32 -
33 -
34 <v-menu 31 <v-menu
35 v-model="showMenu" 32 v-model="showMenu"
36 :position-x="x" 33 :position-x="x"
...@@ -48,26 +45,22 @@ ...@@ -48,26 +45,22 @@
48 </v-list> 45 </v-list>
49 </v-menu> 46 </v-menu>
50 </v-list-item> 47 </v-list-item>
51 -<v-dialog 48 + <v-dialog v-model="dialog2" width="500px">
52 - v-model="dialog2"
53 - width="500px"
54 - >
55 <v-card> 49 <v-card>
56 <v-card-title class="grey darken-2"> 50 <v-card-title class="grey darken-2">
57 Move Folder 51 Move Folder
58 </v-card-title> 52 </v-card-title>
59 <v-container> 53 <v-container>
60 - <v-list-item-group 54 + <v-list-item-group v-for="item2 in folders" :key="item2.folder_id">
61 - v-for="item2 in folders"
62 - :key="item2.folder_id"
63 - >
64 <template v-if="!(item2.folder_name === curfName)"> 55 <template v-if="!(item2.folder_name === curfName)">
65 <v-hover @click.left="transferF(item2.folder_name)"> 56 <v-hover @click.left="transferF(item2.folder_name)">
66 <v-list-item-avatar> 57 <v-list-item-avatar>
67 <v-icon>mdi-folder</v-icon> 58 <v-icon>mdi-folder</v-icon>
68 </v-list-item-avatar> 59 </v-list-item-avatar>
69 <v-list-item-content> 60 <v-list-item-content>
70 - <v-list-item-title v-text="item2.folder_name"></v-list-item-title> 61 + <v-list-item-title
62 + v-text="item2.folder_name"
63 + ></v-list-item-title>
71 </v-list-item-content> 64 </v-list-item-content>
72 </v-hover> 65 </v-hover>
73 </template> 66 </template>
...@@ -76,20 +69,13 @@ ...@@ -76,20 +69,13 @@
76 </v-container> 69 </v-container>
77 <v-card-actions> 70 <v-card-actions>
78 <v-spacer></v-spacer> 71 <v-spacer></v-spacer>
79 - <v-btn 72 + <v-btn text color="primary" @click="cancelMove">Cancel</v-btn>
80 - text
81 - color="primary"
82 - @click="cancelMove"
83 - >Cancel</v-btn>
84 </v-card-actions> 73 </v-card-actions>
85 </v-card> 74 </v-card>
86 </v-dialog> 75 </v-dialog>
87 <v-divider inset></v-divider> 76 <v-divider inset></v-divider>
88 <v-subheader inset>Files</v-subheader> 77 <v-subheader inset>Files</v-subheader>
89 - <v-list-item 78 + <v-list-item v-for="item in this.$store.getters.fileL" :key="item.title">
90 - v-for="item in this.$store.getters.fileL"
91 - :key="item.title"
92 - >
93 <v-list-item-avatar> 79 <v-list-item-avatar>
94 <v-icon> mdi-file</v-icon> 80 <v-icon> mdi-file</v-icon>
95 </v-list-item-avatar> 81 </v-list-item-avatar>
...@@ -106,9 +92,13 @@ ...@@ -106,9 +92,13 @@
106 </v-list-item-action> 92 </v-list-item-action>
107 </v-list-item> 93 </v-list-item>
108 </v-list> 94 </v-list>
109 - <input id = "file-selector" ref='uploadedfile' type="file" 95 + <input
110 - v-on:change="handleFileUpload()"> 96 + id="file-selector"
111 - <br> 97 + ref="uploadedfile"
98 + type="file"
99 + v-on:change="handleFileUpload()"
100 + />
101 + <br />
112 <!-- 102 <!--
113 <v-file-input 103 <v-file-input
114 v-model="files" 104 v-model="files"
...@@ -141,22 +131,11 @@ ...@@ -141,22 +131,11 @@
141 131
142 </v-file-input> 132 </v-file-input>
143 --> 133 -->
144 - <v-btn color="blue" @click = "upload_file">upload</v-btn> 134 + <v-btn color="blue" @click="upload_file">upload</v-btn>
145 - <v-btn 135 + <v-btn bottom color="blue" dark fab fixed right @click="dialog = !dialog">
146 - bottom
147 - color="blue"
148 - dark
149 - fab
150 - fixed
151 - right
152 - @click="dialog = !dialog"
153 - >
154 <v-icon>mdi-plus</v-icon> 136 <v-icon>mdi-plus</v-icon>
155 </v-btn> 137 </v-btn>
156 - <v-dialog 138 + <v-dialog v-model="dialog" width="500px">
157 - v-model="dialog"
158 - width="500px"
159 - >
160 <v-card> 139 <v-card>
161 <v-card-title class="grey darken-2"> 140 <v-card-title class="grey darken-2">
162 Create Folder 141 Create Folder
...@@ -164,59 +143,67 @@ ...@@ -164,59 +143,67 @@
164 <v-container> 143 <v-container>
165 <div> 144 <div>
166 <v-icon>mdi-folder</v-icon> 145 <v-icon>mdi-folder</v-icon>
167 - <v-text-field placeholder="name" id="foldername" type="text" v-model="foldername" ></v-text-field> 146 + <v-text-field
147 + placeholder="name"
148 + id="foldername"
149 + type="text"
150 + v-model="foldername"
151 + ></v-text-field>
168 </div> 152 </div>
169 </v-container> 153 </v-container>
170 <v-card-actions> 154 <v-card-actions>
171 <v-spacer></v-spacer> 155 <v-spacer></v-spacer>
172 - <v-btn 156 + <v-btn text color="primary" @click="dialog = false">Cancel</v-btn>
173 - text 157 + <v-btn text @click="makeF">Create</v-btn>
174 - color="primary"
175 - @click="dialog = false"
176 - >Cancel</v-btn>
177 - <v-btn
178 - text
179 - @click="makeF"
180 - >Create</v-btn>
181 </v-card-actions> 158 </v-card-actions>
182 </v-card> 159 </v-card>
183 </v-dialog> 160 </v-dialog>
184 </div> 161 </div>
185 </template> 162 </template>
186 <script> 163 <script>
187 -import { folder, makeFolder, deleteFolder, moveFolder, file, uploadFile, deleteFile, downloadFile } from '../api/index'; 164 +import {
165 + folder,
166 + makeFolder,
167 + deleteFolder,
168 + moveFolder,
169 + file,
170 + uploadFile,
171 + deleteFile,
172 + downloadFile,
173 +} from '../api/index';
188 import Axios from 'axios'; 174 import Axios from 'axios';
189 - export default { 175 +
176 +export default {
190 data() { 177 data() {
191 return { 178 return {
192 - uploadedfile:null, 179 + uploadedfile: null,
193 - foldername:'', 180 + foldername: '',
194 - curfName:'', 181 + curfName: '',
195 folders: [], 182 folders: [],
196 files: [], 183 files: [],
197 - search:'', 184 + search: '',
198 id: '', 185 id: '',
199 - dialog:false, 186 + dialog: false,
200 howMenu: false, 187 howMenu: false,
201 showMenu: false, 188 showMenu: false,
202 x: 0, 189 x: 0,
203 y: 0, 190 y: 0,
204 - dialog2:false, 191 + dialog2: false,
205 - detail : { 192 + detail: {
206 dataname: null, 193 dataname: null,
207 date: null, 194 date: null,
208 - owner_id:null, 195 + owner_id: null,
209 - datasize:null, 196 + datasize: null,
210 - datatype:null 197 + datatype: null,
211 - } 198 + },
212 - } 199 + };
213 }, 200 },
214 - async created(){ 201 + async created() {
215 try { 202 try {
216 const curData = { 203 const curData = {
217 - id : this.$store.state.id, 204 + id: this.$store.state.id,
218 - cur: '/' 205 + cur: '/',
219 - } 206 + };
220 console.log(curData); 207 console.log(curData);
221 const response = await folder(curData); 208 const response = await folder(curData);
222 const file_response = await file(curData); 209 const file_response = await file(curData);
...@@ -228,50 +215,49 @@ import Axios from 'axios'; ...@@ -228,50 +215,49 @@ import Axios from 'axios';
228 this.folders = this.$store.getters.folderL; 215 this.folders = this.$store.getters.folderL;
229 console.log(this.$store.getters.fileL); 216 console.log(this.$store.getters.fileL);
230 this.files = this.$store.getters.fileL; 217 this.files = this.$store.getters.fileL;
231 -
232 } catch (error) { 218 } catch (error) {
233 - console.log("에러"); 219 + console.log('에러');
234 console.log(error); 220 console.log(error);
235 } 221 }
236 }, 222 },
237 methods: { 223 methods: {
238 - handleFileUpload(){ 224 + handleFileUpload() {
239 - this.uploadedfile= this.$refs.uploadedfile.files[0] 225 + this.uploadedfile = this.$refs.uploadedfile.files[0];
240 - console.log(this.uploadedfile) 226 + console.log(this.uploadedfile);
241 }, 227 },
242 - initFolderName(){ 228 + initFolderName() {
243 this.foldername = ''; 229 this.foldername = '';
244 }, 230 },
245 - cancelMove(){ 231 + cancelMove() {
246 this.curfName = ''; 232 this.curfName = '';
247 this.dialog2 = false; 233 this.dialog2 = false;
248 }, 234 },
249 - async makeF(){ 235 + async makeF() {
250 try { 236 try {
251 const folderData = { 237 const folderData = {
252 - user_id : this.$store.state.id, 238 + user_id: this.$store.state.id,
253 - cur : this.$store.state.cur, 239 + cur: this.$store.state.cur,
254 - folder_name : this.foldername 240 + folder_name: this.foldername,
255 }; 241 };
256 const response = await makeFolder(folderData); 242 const response = await makeFolder(folderData);
257 - console.log(response.data) 243 + console.log(response.data);
258 - console.log("폴더 생성 완료"); 244 + console.log('폴더 생성 완료');
259 this.$store.commit('setFolder', response.data.folders); 245 this.$store.commit('setFolder', response.data.folders);
260 - this.folders = respons.data.folders; 246 + this.folders = response.data.folders;
261 } catch (error) { 247 } catch (error) {
262 - console.log("에러"); 248 + console.log('에러');
263 console.log(error.response.data); 249 console.log(error.response.data);
264 - } finally{ 250 + } finally {
265 this.initFolderName(); 251 this.initFolderName();
266 this.dialog = false; 252 this.dialog = false;
267 } 253 }
268 }, 254 },
269 - async moveF(move_folder_name){ 255 + async moveF(move_folder_name) {
270 try { 256 try {
271 const curData = { 257 const curData = {
272 - id : this.$store.state.id, 258 + id: this.$store.state.id,
273 - cur: this.$store.state.cur + move_folder_name + '/' 259 + cur: this.$store.state.cur + move_folder_name + '/',
274 - } 260 + };
275 const response = await folder(curData); 261 const response = await folder(curData);
276 console.log(response.data); 262 console.log(response.data);
277 this.$store.commit('setFolder', response.data.folders); 263 this.$store.commit('setFolder', response.data.folders);
...@@ -279,151 +265,148 @@ import Axios from 'axios'; ...@@ -279,151 +265,148 @@ import Axios from 'axios';
279 this.$store.commit('setParent', response.data.parentPath); 265 this.$store.commit('setParent', response.data.parentPath);
280 this.folders = this.$store.getters.folderL; 266 this.folders = this.$store.getters.folderL;
281 } catch (error) { 267 } catch (error) {
282 - console.log("에러"); 268 + console.log('에러');
283 console.log(error.response.data); 269 console.log(error.response.data);
284 } 270 }
285 }, 271 },
286 - async moveParent(){ 272 + async moveParent() {
287 try { 273 try {
288 const cData = { 274 const cData = {
289 - id : this.$store.state.id, 275 + id: this.$store.state.id,
290 - cur : this.$store.state.parent 276 + cur: this.$store.state.parent,
291 }; 277 };
292 - const response= await folder(cData); 278 + const response = await folder(cData);
293 console.log(response.data); 279 console.log(response.data);
294 this.$store.commit('setFolder', response.data.folders); 280 this.$store.commit('setFolder', response.data.folders);
295 this.$store.commit('setCur', response.data.cur); 281 this.$store.commit('setCur', response.data.cur);
296 this.$store.commit('setParent', response.data.parentPath); 282 this.$store.commit('setParent', response.data.parentPath);
297 this.folders = this.$store.getters.folderL; 283 this.folders = this.$store.getters.folderL;
298 } catch (error) { 284 } catch (error) {
299 - console.log("에러"); 285 + console.log('에러');
300 console.log(error.response.data); 286 console.log(error.response.data);
301 } 287 }
302 }, 288 },
303 - async deleteF(){ 289 + async deleteF() {
304 try { 290 try {
305 const cData = { 291 const cData = {
306 id: this.$store.state.id, 292 id: this.$store.state.id,
307 - cur : this.$store.state.cur, 293 + cur: this.$store.state.cur,
308 - folder_name: this.curfName 294 + folder_name: this.curfName,
309 - } 295 + };
310 const response = await deleteFolder(cData); 296 const response = await deleteFolder(cData);
311 console.log(response); 297 console.log(response);
312 this.$store.commit('setFolder', response.data.folders); 298 this.$store.commit('setFolder', response.data.folders);
313 this.folders = this.$store.getters.folderL; 299 this.folders = this.$store.getters.folderL;
314 } catch (error) { 300 } catch (error) {
315 - console.log("에러"); 301 + console.log('에러');
316 console.log(error.response.data); 302 console.log(error.response.data);
317 - } finally{ 303 + } finally {
318 this.curfName = ''; 304 this.curfName = '';
319 } 305 }
320 }, 306 },
321 - async transferF(folderName){ 307 + async transferF(folderName) {
322 try { 308 try {
323 const cData = { 309 const cData = {
324 id: this.$store.state.id, 310 id: this.$store.state.id,
325 - cur : this.$store.state.cur, 311 + cur: this.$store.state.cur,
326 folder_name: this.curfName, 312 folder_name: this.curfName,
327 isfolder: true, 313 isfolder: true,
328 - newPath: this.$store.state.cur + folderName + '/' 314 + newPath: this.$store.state.cur + folderName + '/',
329 - } 315 + };
330 const response = await moveFolder(cData); 316 const response = await moveFolder(cData);
331 console.log(response); 317 console.log(response);
332 this.$store.commit('setFolder', response.data.folders); 318 this.$store.commit('setFolder', response.data.folders);
333 this.folders = this.$store.getters.folderL; 319 this.folders = this.$store.getters.folderL;
334 } catch (error) { 320 } catch (error) {
335 - console.log("에러"); 321 + console.log('에러');
336 console.log(error.response.data); 322 console.log(error.response.data);
337 - } finally{ 323 + } finally {
338 this.initFolderName(); 324 this.initFolderName();
339 this.curfName = ''; 325 this.curfName = '';
340 this.dialog2 = false; 326 this.dialog2 = false;
341 } 327 }
342 }, 328 },
343 - async upload_file(){ 329 + async upload_file() {
344 - try{ 330 + try {
345 const formData = new FormData(); 331 const formData = new FormData();
346 formData.append('file', this.uploadedfile); 332 formData.append('file', this.uploadedfile);
347 formData.append('user_id', this.$store.state.id); 333 formData.append('user_id', this.$store.state.id);
348 formData.append('cur', this.$store.state.cur); 334 formData.append('cur', this.$store.state.cur);
349 - const currentData={ 335 + const currentData = {
350 id: this.$store.state.id, 336 id: this.$store.state.id,
351 - cur: this.$store.state.cur 337 + cur: this.$store.state.cur,
352 - } 338 + };
353 - console.log(currentData) 339 + console.log(currentData);
354 const response = await uploadFile(formData); 340 const response = await uploadFile(formData);
355 const filelist = await file(currentData); 341 const filelist = await file(currentData);
356 console.log(filelist.data.files); 342 console.log(filelist.data.files);
357 this.$store.commit('setFile', filelist.data.files); 343 this.$store.commit('setFile', filelist.data.files);
358 console.log(this.$store.getters.fileL); 344 console.log(this.$store.getters.fileL);
359 - this.files = this.$store.getters.fileL;; 345 + this.files = this.$store.getters.fileL;
360 - 346 + } catch (error) {
361 - }catch(error){ 347 + console.log('에러');
362 - console.log("에러");
363 console.log(error); 348 console.log(error);
364 } 349 }
365 }, 350 },
366 - async delete_file(itemName){ 351 + async delete_file(itemName) {
367 - try{ 352 + try {
368 var itemlist = this.$store.getters.fileL; 353 var itemlist = this.$store.getters.fileL;
369 - console.log(itemlist) 354 + console.log(itemlist);
370 - console.log(itemName) 355 + console.log(itemName);
371 - const currentData={ 356 + const currentData = {
372 - fileName : null, 357 + fileName: null,
373 user_id: null, 358 user_id: null,
374 - cur: this.$store.state.cur 359 + cur: this.$store.state.cur,
375 - } 360 + };
376 361
377 - for(var i=0; i<itemlist.length; i++){ 362 + for (var i = 0; i < itemlist.length; i++) {
378 - console.log(itemlist[i].file_name) 363 + console.log(itemlist[i].file_name);
379 - if(itemlist[i].file_name == itemName){ 364 + if (itemlist[i].file_name == itemName) {
380 currentData.fileName = itemlist[i].file_name; 365 currentData.fileName = itemlist[i].file_name;
381 currentData.user_id = itemlist[i].user_id; 366 currentData.user_id = itemlist[i].user_id;
382 } 367 }
383 } 368 }
384 - const filelistData={ 369 + const filelistData = {
385 id: currentData.user_id, 370 id: currentData.user_id,
386 - cur: currentData.cur 371 + cur: currentData.cur,
387 - } 372 + };
388 - console.log(currentData) 373 + console.log(currentData);
389 const response = await deleteFile(currentData); 374 const response = await deleteFile(currentData);
390 - setTimeout(function(){}, 500); 375 + setTimeout(function() {}, 500);
391 const filelist = await file(filelistData); 376 const filelist = await file(filelistData);
392 console.log(filelist.data.files); 377 console.log(filelist.data.files);
393 this.$store.commit('setFile', filelist.data.files); 378 this.$store.commit('setFile', filelist.data.files);
394 console.log(this.$store.getters.fileL); 379 console.log(this.$store.getters.fileL);
395 - this.files = this.$store.getters.fileL;; 380 + this.files = this.$store.getters.fileL;
396 - }catch(error){ 381 + } catch (error) {
397 - console.log("에러"); 382 + console.log('에러');
398 console.log(error); 383 console.log(error);
399 } 384 }
400 }, 385 },
401 - async download_file(namedata){ 386 + async download_file(namedata) {
402 - try{ 387 + try {
403 - const currentData={ 388 + const currentData = {
404 - fileName : namedata, 389 + fileName: namedata,
405 id: this.$store.state.id, 390 id: this.$store.state.id,
406 - cur: this.$store.state.cur 391 + cur: this.$store.state.cur,
407 - } 392 + };
408 const result = await downloadFile(currentData); 393 const result = await downloadFile(currentData);
409 - console.log(result) 394 + console.log(result);
410 - 395 + } catch (error) {
411 - }catch(error){ 396 + console.log('에러');
412 - console.log("에러");
413 console.log(error); 397 console.log(error);
414 } 398 }
415 - }
416 }, 399 },
417 - show (folderN, e) { 400 + },
418 - e.preventDefault() 401 + show(folderN, e) {
402 + e.preventDefault();
419 this.curfName = folderN; 403 this.curfName = folderN;
420 - this.showMenu = false 404 + this.showMenu = false;
421 - this.x = e.clientX 405 + this.x = e.clientX;
422 - this.y = e.clientY 406 + this.y = e.clientY;
423 this.$nextTick(() => { 407 this.$nextTick(() => {
424 - this.showMenu = true 408 + this.showMenu = true;
425 - }) 409 + });
426 - } 410 + },
427 - 411 +};
428 - }
429 </script> 412 </script>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 v-if="isUserLogin" 7 v-if="isUserLogin"
8 > 8 >
9 <v-list dense> 9 <v-list dense>
10 - <v-list-item router :to="{name: 'Main'}" exact> 10 + <v-list-item router :to="{ name: 'Main' }" exact>
11 <v-list-item-action> 11 <v-list-item-action>
12 <v-icon>mdi-home</v-icon> 12 <v-icon>mdi-home</v-icon>
13 </v-list-item-action> 13 </v-list-item-action>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
15 <v-list-item-title>홈</v-list-item-title> 15 <v-list-item-title>홈</v-list-item-title>
16 </v-list-item-content> 16 </v-list-item-content>
17 </v-list-item> 17 </v-list-item>
18 - <v-list-item router :to="{name: 'File'}" exact> 18 + <v-list-item router :to="{ name: 'File' }" exact>
19 <v-list-item-action> 19 <v-list-item-action>
20 <v-icon>mdi-file</v-icon> 20 <v-icon>mdi-file</v-icon>
21 </v-list-item-action> 21 </v-list-item-action>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
23 <v-list-item-title>파일</v-list-item-title> 23 <v-list-item-title>파일</v-list-item-title>
24 </v-list-item-content> 24 </v-list-item-content>
25 </v-list-item> 25 </v-list-item>
26 - <v-list-item router :to="{name: 'Fav'}" exact> 26 + <v-list-item router :to="{ name: 'Fav' }" exact>
27 <v-list-item-action> 27 <v-list-item-action>
28 <v-icon>mdi-heart</v-icon> 28 <v-icon>mdi-heart</v-icon>
29 </v-list-item-action> 29 </v-list-item-action>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
31 <v-list-item-title>즐겨찾기</v-list-item-title> 31 <v-list-item-title>즐겨찾기</v-list-item-title>
32 </v-list-item-content> 32 </v-list-item-content>
33 </v-list-item> 33 </v-list-item>
34 - <v-list-item router :to="{name: 'Quick'}" exact> 34 + <v-list-item router :to="{ name: 'Quick' }" exact>
35 <v-list-item-action> 35 <v-list-item-action>
36 <v-icon>mdi-history</v-icon> 36 <v-icon>mdi-history</v-icon>
37 </v-list-item-action> 37 </v-list-item-action>
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
39 <v-list-item-title>빠른 액세스</v-list-item-title> 39 <v-list-item-title>빠른 액세스</v-list-item-title>
40 </v-list-item-content> 40 </v-list-item-content>
41 </v-list-item> 41 </v-list-item>
42 - <v-list-item router :to="{name: 'Contact'}" exact> 42 + <v-list-item router :to="{ name: 'Contact' }" exact>
43 <v-list-item-action> 43 <v-list-item-action>
44 <v-icon>mdi-contacts</v-icon> 44 <v-icon>mdi-contacts</v-icon>
45 </v-list-item-action> 45 </v-list-item-action>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
47 <v-list-item-title>연락처</v-list-item-title> 47 <v-list-item-title>연락처</v-list-item-title>
48 </v-list-item-content> 48 </v-list-item-content>
49 </v-list-item> 49 </v-list-item>
50 - <v-list-item router :to="{name: 'Main'}" exact> 50 + <v-list-item router :to="{ name: 'Main' }" exact>
51 <v-list-item-action> 51 <v-list-item-action>
52 <v-icon>mdi-settings</v-icon> 52 <v-icon>mdi-settings</v-icon>
53 </v-list-item-action> 53 </v-list-item-action>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
63 <v-list-item-title>휴지통</v-list-item-title> 63 <v-list-item-title>휴지통</v-list-item-title>
64 </v-list-item-content> 64 </v-list-item-content>
65 </v-list-item> 65 </v-list-item>
66 - <v-list-item router :to="{name: 'Feedback'}" exact> 66 + <v-list-item router :to="{ name: 'Feedback' }" exact>
67 <v-list-item-action> 67 <v-list-item-action>
68 <v-icon>mdi-message</v-icon> 68 <v-icon>mdi-message</v-icon>
69 </v-list-item-action> 69 </v-list-item-action>
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
71 <v-list-item-title>피드백</v-list-item-title> 71 <v-list-item-title>피드백</v-list-item-title>
72 </v-list-item-content> 72 </v-list-item-content>
73 </v-list-item> 73 </v-list-item>
74 - <v-list-item router :to="{name: 'Main'}" exact> 74 + <v-list-item router :to="{ name: 'Main' }" exact>
75 <v-list-item-action> 75 <v-list-item-action>
76 <v-icon>mdi-help-circle</v-icon> 76 <v-icon>mdi-help-circle</v-icon>
77 </v-list-item-action> 77 </v-list-item-action>
...@@ -82,19 +82,17 @@ ...@@ -82,19 +82,17 @@
82 </v-list> 82 </v-list>
83 </v-navigation-drawer> 83 </v-navigation-drawer>
84 84
85 -
86 <v-app-bar 85 <v-app-bar
87 :clipped-left="$vuetify.breakpoint.lgAndUp" 86 :clipped-left="$vuetify.breakpoint.lgAndUp"
88 app 87 app
89 color="blue darken-3" 88 color="blue darken-3"
90 dark 89 dark
91 > 90 >
92 - 91 + <v-app-bar-nav-icon
93 - <v-app-bar-nav-icon @click.stop="drawer = !drawer" v-if="isUserLogin"></v-app-bar-nav-icon> 92 + @click.stop="drawer = !drawer"
94 - <v-toolbar-title 93 + v-if="isUserLogin"
95 - style="width: 300px" 94 + ></v-app-bar-nav-icon>
96 - class="ml-0 pl-4" 95 + <v-toolbar-title style="width: 300px" class="ml-0 pl-4">
97 - >
98 <span class="hidden-sm-and-down">KhuLoud</span> 96 <span class="hidden-sm-and-down">KhuLoud</span>
99 </v-toolbar-title> 97 </v-toolbar-title>
100 <template v-if="isUserLogin"> 98 <template v-if="isUserLogin">
...@@ -112,23 +110,21 @@ ...@@ -112,23 +110,21 @@
112 </template> 110 </template>
113 <v-spacer></v-spacer> 111 <v-spacer></v-spacer>
114 <template v-if="isUserLogin"> 112 <template v-if="isUserLogin">
115 - <v-btn icon @click = "logoutUser"> 113 + <v-btn icon @click="logoutUser">
116 <v-icon>mdi-login</v-icon> 114 <v-icon>mdi-login</v-icon>
117 </v-btn> 115 </v-btn>
118 </template> 116 </template>
119 <template v-else> 117 <template v-else>
120 - <v-btn icon @click = "$router.push({name: 'Login'})"> 118 + <v-btn icon @click="$router.push({ name: 'Login' })">
121 <v-icon>mdi-login</v-icon> 119 <v-icon>mdi-login</v-icon>
122 </v-btn> 120 </v-btn>
123 - <v-btn icon @click = "$router.push({name: 'RegistUser'})"> 121 + <v-btn icon @click="$router.push({ name: 'RegistUser' })">
124 <v-icon>mdi-account</v-icon> 122 <v-icon>mdi-account</v-icon>
125 </v-btn> 123 </v-btn>
126 </template> 124 </template>
127 </v-app-bar> 125 </v-app-bar>
128 <v-content> 126 <v-content>
129 - <v-container 127 + <v-container>
130 -
131 - >
132 <router-view></router-view> 128 <router-view></router-view>
133 </v-container> 129 </v-container>
134 </v-content> 130 </v-content>
...@@ -144,7 +140,7 @@ export default { ...@@ -144,7 +140,7 @@ export default {
144 { icon: 'mdi-home', text: '홈' }, 140 { icon: 'mdi-home', text: '홈' },
145 { icon: 'mdi-file', text: '파일' }, 141 { icon: 'mdi-file', text: '파일' },
146 { icon: 'mdi-heart', text: '즐겨찾기' }, 142 { icon: 'mdi-heart', text: '즐겨찾기' },
147 - { icon: 'mdi-history', text: '빠른 액세스'}, 143 + { icon: 'mdi-history', text: '빠른 액세스' },
148 { icon: 'mdi-contacts', text: '연락처' }, 144 { icon: 'mdi-contacts', text: '연락처' },
149 { icon: 'mdi-settings', text: '설정' }, 145 { icon: 'mdi-settings', text: '설정' },
150 { icon: 'mdi-message', text: '피드백' }, 146 { icon: 'mdi-message', text: '피드백' },
...@@ -152,19 +148,17 @@ export default { ...@@ -152,19 +148,17 @@ export default {
152 ], 148 ],
153 }), 149 }),
154 computed: { 150 computed: {
155 - isUserLogin(){ 151 + isUserLogin() {
156 return this.$store.getters.isLogin; 152 return this.$store.getters.isLogin;
157 }, 153 },
158 }, 154 },
159 methods: { 155 methods: {
160 - logoutUser(){ 156 + logoutUser() {
161 this.$store.commit('clearid'); 157 this.$store.commit('clearid');
162 this.$router.push('/'); 158 this.$router.push('/');
163 - } 159 + },
164 - } 160 + },
165 -} 161 +};
166 </script> 162 </script>
167 163
168 -<style>
169 -
170 -</style>
...\ No newline at end of file ...\ No newline at end of file
164 +<style></style>
......
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">Name</th>
9 + <th class="text-left">Date</th>
10 + </tr>
11 + </thead>
12 + <tbody>
13 + <tr v-for="item in recent_list" :key="item.name">
14 + <td>{{ item.file_id }}</td>
15 + <td>{{ item.file_name}}</td>
16 + <td>{{ item.location }}</td>
17 + <td>{{ item.date }}</td>
18 + </tr>
19 + </tbody>
20 + </template>
21 + </v-simple-table>
22 + <v-divider></v-divider>
23 + </v-flex>
24 +</template>
25 +
26 +<script>
27 + import { accessed_list } from '../api/index';
28 + import Axios from 'axios';
29 + export default {
30 + data() {
31 + return {
32 + recent_list = []
33 + }
34 + },
35 + async created(){
36 + try {
37 + const curData = {
38 + id : this.$store.state.id,
39 + }
40 + console.log(curData);
41 + const list_reponse = await accessed_list(curData);
42 + this.$store.commit('setRecentList', list_reponse.data)
43 + this.recent_list = this.$stroe.getters.recentL;
44 + console.log(this.$store.getters.recentL);
45 + } catch (error) {
46 + console.log("에러");
47 + console.log(error);
48 + }
49 + },
50 + methods:{
51 +
52 + }
53 + }
54 +</script>
55 +
56 +<style lang="css" scoped>
57 +</style>
1 -import Vue from 'vue' 1 +import Vue from 'vue';
2 -import VueRouter from 'vue-router' 2 +import VueRouter from 'vue-router';
3 // import Home from '../views/Home.vue' 3 // import Home from '../views/Home.vue'
4 // import Login from '../views/Login.vue' 4 // import Login from '../views/Login.vue'
5 // import Main from '../views/Main.vue' 5 // import Main from '../views/Main.vue'
...@@ -12,65 +12,64 @@ import VueRouter from 'vue-router' ...@@ -12,65 +12,64 @@ import VueRouter from 'vue-router'
12 // import RegistUser from '../views/RegistUser' 12 // import RegistUser from '../views/RegistUser'
13 Vue.use(VueRouter); 13 Vue.use(VueRouter);
14 14
15 - 15 +export default new VueRouter({
16 -
17 -export default new VueRouter ({
18 mode: 'history', 16 mode: 'history',
17 +
19 base: process.env.BASE_URL, 18 base: process.env.BASE_URL,
20 - routes : [ 19 + routes: [
21 { 20 {
22 path: '/', 21 path: '/',
23 - redirect: '/Login' 22 + redirect: '/Login',
24 }, 23 },
25 { 24 {
26 path: '/home', 25 path: '/home',
27 name: 'Home', 26 name: 'Home',
28 - component: () => import('../views/Home.vue') 27 + component: () => import('../views/Home.vue'),
29 }, 28 },
30 { 29 {
31 path: '/main', 30 path: '/main',
32 - name:'Main', 31 + name: 'Main',
33 - component: () => import('../views/Main.vue') 32 + component: () => import('../views/Main.vue'),
34 }, 33 },
35 { 34 {
36 path: '/contact', 35 path: '/contact',
37 - name:'Contact', 36 + name: 'Contact',
38 - component: () => import('../views/Contact.vue') 37 + component: () => import('../views/Contact.vue'),
39 }, 38 },
40 { 39 {
41 path: '/registuser', 40 path: '/registuser',
42 name: 'RegistUser', 41 name: 'RegistUser',
43 - component: () => import('../views/SignupPage.vue') 42 + component: () => import('../views/SignupPage.vue'),
44 }, 43 },
45 { 44 {
46 path: '/login', 45 path: '/login',
47 name: 'Login', 46 name: 'Login',
48 - component: () => import('../views/LoginPage.vue') 47 + component: () => import('../views/LoginPage.vue'),
49 }, 48 },
50 { 49 {
51 - path:'/file', 50 + path: '/file',
52 - name:'File', 51 + name: 'File',
53 - component: () => import('../views/File.vue') 52 + component: () => import('../views/File.vue'),
54 }, 53 },
55 { 54 {
56 - path:'/fav', 55 + path: '/fav',
57 - name:'Fav', 56 + name: 'Fav',
58 - component: () => import('../views/FavList.vue') 57 + component: () => import('../views/FavList.vue'),
59 }, 58 },
60 { 59 {
61 - path:'/quick', 60 + path: '/quick',
62 - name:'Quick', 61 + name: 'Quick',
63 - component : () => import('../views/QuickList.vue') 62 + component: () => import('../views/QuickList.vue'),
64 }, 63 },
65 { 64 {
66 - path:'/feedback', 65 + path: '/feedback',
67 - name:'Feedback', 66 + name: 'Feedback',
68 - component: () => import('../views/Feedback.vue') 67 + component: () => import('../views/Feedback.vue'),
69 }, 68 },
70 { 69 {
71 path: '/folder', 70 path: '/folder',
72 name: 'Folder', 71 name: 'Folder',
73 - component: () => import('../views/FolderPage.vue') 72 + component: () => import('../views/FolderPage.vue'),
74 }, 73 },
75 - ] 74 + ],
76 -}) 75 +});
......
...@@ -9,7 +9,8 @@ export default new Vuex.Store({ ...@@ -9,7 +9,8 @@ export default new Vuex.Store({
9 folders: [], 9 folders: [],
10 files: [], 10 files: [],
11 cur: '/', 11 cur: '/',
12 - parent: '/' 12 + parent: '/',
13 + recentList:[]
13 }, 14 },
14 mutations: { 15 mutations: {
15 setId(state, userid) { 16 setId(state, userid) {
...@@ -29,6 +30,9 @@ export default new Vuex.Store({ ...@@ -29,6 +30,9 @@ export default new Vuex.Store({
29 }, 30 },
30 setParent(state, parent) { 31 setParent(state, parent) {
31 state.parent = parent; 32 state.parent = parent;
33 + },
34 + setRecentList(state, list){
35 + state.recentList = list;
32 } 36 }
33 }, 37 },
34 getters: { 38 getters: {
...@@ -44,6 +48,9 @@ export default new Vuex.Store({ ...@@ -44,6 +48,9 @@ export default new Vuex.Store({
44 fileL(state) { 48 fileL(state) {
45 return state.files; 49 return state.files;
46 }, 50 },
51 + recentL(state){
52 + return state.recentList;
53 + },
47 cur(state) { 54 cur(state) {
48 return state.cur; 55 return state.cur;
49 }, 56 },
......
...@@ -20,26 +20,9 @@ ...@@ -20,26 +20,9 @@
20 <v-spacer></v-spacer> 20 <v-spacer></v-spacer>
21 </v-flex> 21 </v-flex>
22 <v-flex><br><v-divider></v-divider><br></v-flex> 22 <v-flex><br><v-divider></v-divider><br></v-flex>
23 - <v-flex> 23 + <v-container>
24 - <h1>빠른액세스</h1> 24 +
25 - <v-simple-table> 25 + </v-container>
26 - <template v-slot:default>
27 - <thead>
28 - <tr>
29 - <th class="text-left">Name</th>
30 - <th class="text-left">Date</th>
31 - </tr>
32 - </thead>
33 - <tbody>
34 - <tr v-for="item in favorite" :key="item.name">
35 - <td>{{ item.name }}</td>
36 - <td>{{ item.date }}</td>
37 - </tr>
38 - </tbody>
39 - </template>
40 - </v-simple-table>
41 - <v-divider></v-divider>
42 - </v-flex>
43 </v-flex> 26 </v-flex>
44 <v-flex><br><v-divider></v-divider><br></v-flex> 27 <v-flex><br><v-divider></v-divider><br></v-flex>
45 <v-flex xs6> 28 <v-flex xs6>
...@@ -72,6 +55,7 @@ ...@@ -72,6 +55,7 @@
72 55
73 56
74 <script> 57 <script>
58 + import Filecard from '@/components/accessList.vue'
75 export default { 59 export default {
76 data () { 60 data () {
77 return { 61 return {
......