diff --git a/src/App.vue b/src/App.vue index 799c927eec34031f3c326e41cb56cf9e286ed1d7..0e97c4706d19bd04a8f571679919d9318183aa84 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,6 @@ <template> <v-app> - <core-filter /> + <!-- <core-filter /> --> <core-toolbar /> diff --git a/src/components/core/Drawer.vue b/src/components/core/Drawer.vue index 3a20e4a3c94bb1b33f0504dc00eb31aaf2f8769f..eae2123f2a70bedcb8b6d00e1dc8e14b66a17d78 100644 --- a/src/components/core/Drawer.vue +++ b/src/components/core/Drawer.vue @@ -71,16 +71,16 @@ export default { icon: 'mdi-chart-bubble', text: 'Icons' }, - { - to: '/maps', - icon: 'mdi-map-marker', - text: 'Maps' - }, - { - to: '/notifications', - icon: 'mdi-bell', - text: 'Notifications' - } + // { + // to: '/maps', + // icon: 'mdi-map-marker', + // text: 'Maps' + // }, + // { + // to: '/notifications', + // icon: 'mdi-bell', + // text: 'Notifications' + // } ] }), computed: { diff --git a/src/router/paths.js b/src/router/paths.js index 3a76d7e9a51c490ffbcfbf1b5af10c0d5111baf5..196f0aecf510fa4b1426024da2089c02716847da 100644 --- a/src/router/paths.js +++ b/src/router/paths.js @@ -18,7 +18,7 @@ export default [ { path: '/losterboard', name: 'LosterBoard', - view: 'UserProfile' + view: 'LosterBoard' }, { path: '/mypage', diff --git a/src/views/FinderBoard.vue b/src/views/FinderBoard.vue index 26282e41448506e0cc5baada04ed0674270d24d2..c3353f0352f0f92a21694bf4382c535a23a05d80 100644 --- a/src/views/FinderBoard.vue +++ b/src/views/FinderBoard.vue @@ -1,19 +1,29 @@ <template> <v-container fill-height fluid grid-list-xl> <v-layout justify-center wrap> + <v-flex xs12 sm4 offset-sm8> + <v-btn class="ma-2" outlined color="cyan">글쓰기</v-btn> + <v-text-field outlined label="검색" v-model="search" class="d-inline" single-line hide-details clearable></v-text-field> + </v-flex> <v-flex md12> <material-card color="green" title="발견 게시판" text="실종견을 발견한 사람들의 게시글입니다."> - <v-data-table :headers="headers" :items="items" hide-actions> + <v-data-table + :headers="headers" + :items="items" + :items-per-page="5" + class="elevation-1" + :search="search"> <template slot="headerCell" slot-scope="{ header }"> <span class="subheading font-weight-light text-success text--darken-3" v-text="header.text"/> </template> <template slot="items" slot-scope="{item}" v-if="items"> - <!-- <tr v-for="p in paginatedData" :key="p"> --> <td>{{ item.writer }}</td> - <td>{{ item.title }}</td> + <td> + <!-- <v-btn solo :to="{name: 'Icons', params: {_id: item._id}}">{{ item.title }}</v-btn> --> + <v-btn class="ma-2" outlined color="indigo">{{ item.title }}</v-btn> + </td> <td>{{ item.writer }}</td> - <td class="text-xs-right">{{ item.findPlace }}</td> - <!-- </tr> --> + <td class="text-xs-right">{{ item.created }}</td> </template> </v-data-table> </material-card> @@ -26,35 +36,18 @@ export default { data: () => ({ headers: [ - { - sortable: false, - text: '사진', - value: 'img' - }, - { - sortable: false, - text: '제목', - value: 'title' - }, - { - sortable: false, - text: '작성자', - value: 'writer' - }, - { - sortable: false, - text: '위치', - value: 'location', - align: 'right' - } + { text: '사진', value: 'img', sortable: false, filterable: false}, + { text: '제목', value: 'title', sortable: false}, + { text: '작성자', value: 'writer', sortable: false}, + { text: '작성날짜', value: 'created', sortable: false, align: 'right'} ], - items: [] + items: [], + search: '' }), created() { this.$http.get('/finderboard') .then(response => { if(JSON.stringify(response.data.success) === "true"){ - alert("response"+JSON.stringify(response.data.success)) this.items = response.data.finderboards; console.log(this.items); console.log(this.items[0].body) @@ -64,6 +57,11 @@ export default { }).catch(err => { alert("ERR while FET finderboard" + err) }); + }, + methods: { + onClicked: function(){ + this.$router.push('/icons') + }, } } -</script> +</script> \ No newline at end of file diff --git a/src/views/LosterBoard.vue b/src/views/LosterBoard.vue new file mode 100644 index 0000000000000000000000000000000000000000..33a9270bd1f4c361c965857b804dce73cf5da951 --- /dev/null +++ b/src/views/LosterBoard.vue @@ -0,0 +1,67 @@ +<template> + <v-container fill-height fluid grid-list-xl> + <v-layout justify-center wrap> + <v-flex xs12 sm4 offset-sm8> + <v-btn class="ma-2" outlined color="cyan">글쓰기</v-btn> + <v-text-field outlined label="검색" v-model="search" class="d-inline" single-line hide-details clearable></v-text-field> + </v-flex> + <v-flex md12> + <material-card color="green" title="발견 게시판" text="실종견을 발견한 사람들의 게시글입니다."> + <v-data-table + :headers="headers" + :items="items" + :items-per-page="5" + class="elevation-1" + :search="search"> + <template slot="headerCell" slot-scope="{ header }"> + <span class="subheading font-weight-light text-success text--darken-3" v-text="header.text"/> + </template> + <template slot="items" slot-scope="{item}" v-if="items"> + <td>{{ item.writer }}</td> + <td> + <!-- <v-btn solo :to="{name: 'Icons', params: {_id: item._id}}">{{ item.title }}</v-btn> --> + <v-btn class="ma-2" outlined color="indigo">{{ item.title }}</v-btn> + </td> + <td>{{ item.writer }}</td> + <td class="text-xs-right">{{ item.created }}</td> + </template> + </v-data-table> + </material-card> + </v-flex> + </v-layout> + </v-container> +</template> + +<script> +export default { + data: () => ({ + headers: [ + { text: '사진', value: 'img', sortable: false, filterable: false}, + { text: '제목', value: 'title', sortable: false}, + { text: '작성자', value: 'writer', sortable: false}, + { text: '작성날짜', value: 'created', sortable: false, align: 'right'} + ], + items: [], + search: '' + }), + created() { + this.$http.get('/losterboard') + .then(response => { + if(JSON.stringify(response.data.success) === "true"){ + this.items = response.data.losterboards; + console.log(this.items); + console.log(this.items[0].body) + }else{ + alert("로그인이 필요합니다." + response.data.message) + } + }).catch(err => { + alert("ERR while FET losterboard" + err) + }); + }, + methods: { + onClicked: function(){ + this.$router.push('/icons') + }, + } +} +</script> \ No newline at end of file diff --git a/src/views/UserProfile.vue b/src/views/UserProfile.vue deleted file mode 100644 index 4ebe088d269f4c10a2c297941669a2972bc520dd..0000000000000000000000000000000000000000 --- a/src/views/UserProfile.vue +++ /dev/null @@ -1,68 +0,0 @@ -<template> - <v-container fill-height fluid grid-list-xl> - <v-layout justify-center wrap> - <v-flex xs12 md8> - <material-card color="green" title="Edit Profile" text="Complete your profile"> - <v-form> - <v-container py-0> - <v-layout wrap> - <v-flex xs12 md4> - <v-text-field label="Company (disabled)" disabled/> - </v-flex> - <v-flex xs12 md4> - <v-text-field class="purple-input" label="User Name"/> - </v-flex> - <v-flex xs12 md4> - <v-text-field label="Email Address" class="purple-input"/> - </v-flex> - <v-flex xs12 md6> - <v-text-field label="First Name" class="purple-input"/> - </v-flex> - <v-flex xs12 md6> - <v-text-field label="Last Name" class="purple-input"/> - </v-flex> - <v-flex xs12 md12> - <v-text-field label="Adress" class="purple-input"/> - </v-flex> - <v-flex xs12 md4> - <v-text-field label="City" class="purple-input"/> - </v-flex> - <v-flex xs12 md4> - <v-text-field label="Country" class="purple-input"/> - </v-flex> - <v-flex xs12 md4> - <v-text-field class="purple-input" label="Postal Code" type="number"/> - </v-flex> - <v-flex xs12> - <v-textarea class="purple-input" label="About Me" value="Lorem ipsum dolor sit amet, consectetur adipiscing elit."/> - </v-flex> - <v-flex xs12 text-xs-right> - <v-btn class="mx-0 font-weight-light" color="success">Update Profile</v-btn> - </v-flex> - </v-layout> - </v-container> - </v-form> - </material-card> - </v-flex> - <v-flex xs12 md4> - <material-card class="v-card-profile"> - <v-avatar slot="offset" class="mx-auto d-block" size="130"> - <img src="https://demos.creative-tim.com/vue-material-dashboard/img/marc.aba54d65.jpg"> - </v-avatar> - <v-card-text class="text-xs-center"> - <h6 class="category text-gray font-weight-thin mb-3">CEO / CO-FOUNDER</h6> - <h4 class="card-title font-weight-light">Alec Thompson</h4> - <p class="card-description font-weight-light">Don't be scared of the truth because we need to restart the human foundation in truth And I love you like Kanye loves Kanye I love Rick Owens’ bed design but the back is...</p> - <v-btn color="success" round class="font-weight-light">Follow</v-btn> - </v-card-text> - </material-card> - </v-flex> - </v-layout> - </v-container> -</template> - -<script> -export default { - // -} -</script>