#partilly add paper dashboard

This commit is contained in:
Anton Romanov 2019-05-02 23:06:57 +04:00
parent 0d5f15614e
commit e3b6c02f56
5 changed files with 48 additions and 1 deletions

View File

@ -37,6 +37,11 @@ public class PaperRestController {
return new Response<>(paperService.findAllDto());
}
@GetMapping("/dashboard")
public Response<List<PaperDto>> getDashboard() {
return new Response<>(paperService.findAllActiveDto());
}
@GetMapping("/{paper-id}")
public Response<PaperDto> getPaper(@PathVariable("paper-id") Integer paperId) {
return new Response(paperService.findById(paperId));

View File

@ -19,6 +19,7 @@
var getTables = basePath + "/get-tables";
var makeIntegration = basePath + "/make-integration";
var paperList = basePath + "/papers";
var paperDashboard = basePath + "/dashboard";
return {
version: appVersion,
@ -26,6 +27,7 @@
owl: getOwl,
tables: getTables,
integration: makeIntegration,
paperList: paperList
paperList: paperList,
paperDashboard: paperDashboard
};
});

View File

@ -11,6 +11,9 @@ var router = new VueRouter({
{
path: "/papers/papers", component: httpVueLoaderEx("/papers/paper-list.vue", "PaperList")
},
{
path: "/papers/dashboard", component: httpVueLoaderEx("/papers/paper-dashboard.vue", "PaperDashboard")
},
{
path: "/*", component: httpVueLoaderEx("/core-components/page-not-found.vue", "PageNotFound")
}

View File

@ -0,0 +1,36 @@
<template>
<div>
<paper-navigation>
</paper-navigation>
<div class="row">
<div class="col-md-9 col-sm-12">
<paper-item v-for="paper in papers"
:key="paper.id"
:paper="paper">
</paper-item>
</div>
</div>
</div>
</template>
<script>
module.exports = {
components: {
"paper-item": httpVueLoaderEx("/papers/paper-item.vue"),
"paper-navigation": httpVueLoaderEx("/papers/paper-navigation.vue"),
},
data: function () {
return {
papers: []
};
},
mounted: function () {
var self = this;
axiosEx.get(
appConfig.paperList,
function (data) {
self.papers = data;
});
}
}
</script>

View File

@ -18,6 +18,7 @@
components: {
"paper-item": httpVueLoaderEx("/papers/paper-item.vue"),
"paper-navigation": httpVueLoaderEx("/papers/paper-navigation.vue"),
"paper-dashboard": httpVueLoaderEx("/papers/paper-dashboard.vue")
},
data: function () {
return {