#partilly add paper dashboard
This commit is contained in:
parent
0d5f15614e
commit
e3b6c02f56
@ -37,6 +37,11 @@ public class PaperRestController {
|
|||||||
return new Response<>(paperService.findAllDto());
|
return new Response<>(paperService.findAllDto());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/dashboard")
|
||||||
|
public Response<List<PaperDto>> getDashboard() {
|
||||||
|
return new Response<>(paperService.findAllActiveDto());
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/{paper-id}")
|
@GetMapping("/{paper-id}")
|
||||||
public Response<PaperDto> getPaper(@PathVariable("paper-id") Integer paperId) {
|
public Response<PaperDto> getPaper(@PathVariable("paper-id") Integer paperId) {
|
||||||
return new Response(paperService.findById(paperId));
|
return new Response(paperService.findById(paperId));
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
var getTables = basePath + "/get-tables";
|
var getTables = basePath + "/get-tables";
|
||||||
var makeIntegration = basePath + "/make-integration";
|
var makeIntegration = basePath + "/make-integration";
|
||||||
var paperList = basePath + "/papers";
|
var paperList = basePath + "/papers";
|
||||||
|
var paperDashboard = basePath + "/dashboard";
|
||||||
|
|
||||||
return {
|
return {
|
||||||
version: appVersion,
|
version: appVersion,
|
||||||
@ -26,6 +27,7 @@
|
|||||||
owl: getOwl,
|
owl: getOwl,
|
||||||
tables: getTables,
|
tables: getTables,
|
||||||
integration: makeIntegration,
|
integration: makeIntegration,
|
||||||
paperList: paperList
|
paperList: paperList,
|
||||||
|
paperDashboard: paperDashboard
|
||||||
};
|
};
|
||||||
});
|
});
|
@ -11,6 +11,9 @@ var router = new VueRouter({
|
|||||||
{
|
{
|
||||||
path: "/papers/papers", component: httpVueLoaderEx("/papers/paper-list.vue", "PaperList")
|
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")
|
path: "/*", component: httpVueLoaderEx("/core-components/page-not-found.vue", "PageNotFound")
|
||||||
}
|
}
|
||||||
|
36
src/main/resources/static/papers/paper-dashboard.vue
Normal file
36
src/main/resources/static/papers/paper-dashboard.vue
Normal 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>
|
@ -18,6 +18,7 @@
|
|||||||
components: {
|
components: {
|
||||||
"paper-item": httpVueLoaderEx("/papers/paper-item.vue"),
|
"paper-item": httpVueLoaderEx("/papers/paper-item.vue"),
|
||||||
"paper-navigation": httpVueLoaderEx("/papers/paper-navigation.vue"),
|
"paper-navigation": httpVueLoaderEx("/papers/paper-navigation.vue"),
|
||||||
|
"paper-dashboard": httpVueLoaderEx("/papers/paper-dashboard.vue")
|
||||||
},
|
},
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user