Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BudgetManagementSystem
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王利雷
BudgetManagementSystem
Commits
367acd13
Commit
367acd13
authored
May 13, 2019
by
shj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
历史预算到预算明细页面的跳转,导航栏的统一
parent
e26e6e7d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
39 additions
and
29 deletions
+39
-29
BudgetHandler.java
src/main/java/handlers/BudgetHandler.java
+13
-0
CookieUtil.java
src/main/java/util/CookieUtil.java
+1
-0
budgetDetail.jsp
src/main/webapp/budgetDetail.jsp
+3
-7
history.jsp
src/main/webapp/history.jsp
+11
-3
index.jsp
src/main/webapp/index.jsp
+3
-9
modifyRules.jsp
src/main/webapp/modifyRules.jsp
+4
-8
test.jsp
src/main/webapp/test.jsp
+4
-2
No files found.
src/main/java/handlers/BudgetHandler.java
View file @
367acd13
...
...
@@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.context.annotation.Scope
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.servlet.ModelAndView
;
...
...
@@ -184,6 +185,18 @@ public class BudgetHandler {
return
modelAndView
;
}
@RequestMapping
(
"/Detail/{budgetId}"
)
public
ModelAndView
budgetDetailById
(
@PathVariable
(
"budgetId"
)
Long
budgetId
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
if
(
budgetId
==
null
)
return
new
ModelAndView
(
"/"
);
ModelAndView
modelAndView
=
new
ModelAndView
();
modelAndView
.
setViewName
(
"/budgetDetail.jsp"
);
modelAndView
.
addObject
(
"budget"
,
retrieveBudget
(
budgetId
.
toString
()));
Cookie
sessionID
=
CookieUtil
.
getCookieByName
(
request
.
getCookies
(),
"sessionID"
);
sessionID
.
setValue
(
budgetId
.
toString
());
response
.
addCookie
(
sessionID
);
return
modelAndView
;
}
@RequestMapping
(
"/HistoryPage"
)
public
ModelAndView
historyPage
(
HttpServletRequest
request
,
HttpServletResponse
response
){
ModelAndView
modelAndView
=
new
ModelAndView
();
...
...
src/main/java/util/CookieUtil.java
View file @
367acd13
...
...
@@ -11,4 +11,5 @@ public class CookieUtil {
}
return
null
;
}
}
src/main/webapp/budgetDetail.jsp
View file @
367acd13
...
...
@@ -54,16 +54,12 @@
<div>
<ul
class=
"nav navbar-nav"
>
<li><a
href=
"${pageContext.request.contextPath}/"
>
创建预算
</a></li>
<li
class=
"active"
>
<a
href=
"#"
>
修改预算
</a>
</li>
<li><a
href=
"${pageContext.request.contextPath}/Budget/HistoryPage"
>
历史预算
</a></li>
<li
class=
"active"
><a
href=
"${pageContext.request.contextPath}/Budget/Detail"
>
修改预算
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Rule/"
>
修改规则
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Budget/Download"
>
导出最新预算
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Test"
>
测试
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Logout"
>
注销
</a></li>
</ul>
</div>
</div>
...
...
src/main/webapp/history.jsp
View file @
367acd13
...
...
@@ -44,10 +44,12 @@
<div>
<ul
class=
"nav navbar-nav"
>
<li><a
href=
"${pageContext.request.contextPath}/"
>
创建预算
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Budget/Detail"
>
修改预算
</a></li>
<li
class=
"active"
><a
href=
"${pageContext.request.contextPath}/Budget/HistoryPage"
>
历史预算
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Budget/Detail"
>
修改预算
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Rule/"
>
修改规则
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Budget/Download"
>
导出最新预算
</a></li>
<li
class=
"active"
><a
href=
"#"
>
测试
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Test"
>
测试
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Logout"
>
注销
</a></li>
</ul>
</div>
</div>
...
...
@@ -55,7 +57,11 @@
<div
id=
"budgetList"
>
<ul>
<li
v-for=
"budget in budgetList"
><a
href=
"#"
>
{{budget.id}}, {{budget.date}}
</a></li>
<li
v-for=
"budget in budgetList"
>
<a
v-bind:href=
"'${pageContext.request.contextPath}/Budget/Detail/'+budget.id"
>
{{budget.id}},创建时间:{{budget.date}}
</a>
</li>
</ul>
</div>
...
...
@@ -77,6 +83,8 @@
console
.
log
(
error
)
}
)
},
detail
:
function
(
budget
)
{
}
}
})
...
...
src/main/webapp/index.jsp
View file @
367acd13
...
...
@@ -34,19 +34,13 @@
</div>
<div>
<ul
class=
"nav navbar-nav"
>
<li
class=
"active"
><a
href=
"#"
>
创建预算
</a></li>
<li>
<a
href=
"${pageContext.request.contextPath}/Budget/Detail"
>
修改预算
</a>
</li>
<li
class=
"active"
><a
href=
"${pageContext.request.contextPath}/"
>
创建预算
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Budget/HistoryPage"
>
历史预算
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Budget/Detail"
>
修改预算
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Rule/"
>
修改规则
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Budget/Download"
>
导出最新预算
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Test"
>
测试
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Logout"
>
注销
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Budget/HistoryPage"
>
历史预算
</a></li>
</ul>
</div>
</div>
...
...
src/main/webapp/modifyRules.jsp
View file @
367acd13
...
...
@@ -45,16 +45,12 @@
<div>
<ul
class=
"nav navbar-nav"
>
<li><a
href=
"${pageContext.request.contextPath}/"
>
创建预算
</a></li>
<li>
<a
href=
"${pageContext.request.contextPath}/Budget/Detail"
>
修改预算
</a>
</li>
<li
class=
"active"
><a
href=
"#"
>
修改规则
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Budget/HistoryPage"
>
历史预算
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Budget/Detail"
>
修改预算
</a></li>
<li
class=
"active"
><a
href=
"${pageContext.request.contextPath}/Rule/"
>
修改规则
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Budget/Download"
>
导出最新预算
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Test"
>
测试
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Logout"
>
注销
</a></li>
</ul>
</div>
</div>
...
...
src/main/webapp/test.jsp
View file @
367acd13
...
...
@@ -46,10 +46,12 @@
<div>
<ul
class=
"nav navbar-nav"
>
<li><a
href=
"${pageContext.request.contextPath}/"
>
创建预算
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Budget/Detail"
>
修改预算
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Budget/HistoryPage"
>
历史预算
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Budget/Detail"
>
修改预算
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Rule/"
>
修改规则
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Budget/Download"
>
导出最新预算
</a></li>
<li
class=
"active"
><a
href=
"#"
>
测试
</a></li>
<li
class=
"active"
><a
href=
"${pageContext.request.contextPath}/Test"
>
测试
</a></li>
<li><a
href=
"${pageContext.request.contextPath}/Logout"
>
注销
</a></li>
</ul>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment