Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cms_sys
Project
Project
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
西魏
cms_sys
Commits
70484138
Commit
70484138
authored
Oct 19, 2020
by
xierz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增子栏目优化
parent
a655345c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
form.ftl
src/main/webapp/WEB-INF/manager/cms/category/form.ftl
+8
-5
index.ftl
src/main/webapp/WEB-INF/manager/cms/category/index.ftl
+4
-4
No files found.
src/main/webapp/WEB-INF/manager/cms/category/form.ftl
View file @
70484138
...
...
@@ -540,15 +540,18 @@
this
.
categoryUrlOptionsGet
();
this
.
categoryFlagOptionsGet
();
this
.
form
.
id
=
ms
.
util
.
getParameter
(
"id"
);
this
.
form
.
child
=
ms
.
util
.
getParameter
(
"child"
);
this
.
form
.
child
Id
=
ms
.
util
.
getParameter
(
"childId"
);
// 判断是否增加子栏目
this
.
categoryTypeDisabled
=
false
;
if
(
this
.
form
.
id
!=
undefined
&&
this
.
form
.
child
==
undefined
)
{
// 判断三种状态,默认为编辑状态
this
.
categoryTypeDisabled
=
false
;
// 控制栏目分类是否可编辑
if
(
this
.
form
.
id
!=
undefined
&&
this
.
form
.
childId
==
undefined
)
{
// 切换新增状态,id&childId 为空
this
.
categoryTypeDisabled
=
true
;
this
.
get
(
this
.
form
.
id
);
}
else
if
(
this
.
form
.
child
)
{
}
else
if
(
this
.
form
.
childId
)
{
// 切换新增子栏目状态,id&childId 不为空
this
.
form
.
id
=
null
;
this
.
form
.
categoryId
=
this
.
form
.
child
;
this
.
form
.
categoryId
=
this
.
form
.
child
Id
;
}
}
});
...
...
src/main/webapp/WEB-INF/manager/cms/category/index.ftl
View file @
70484138
...
...
@@ -62,10 +62,10 @@
{{scope.row.categoryType == '2'?scope.row.categoryUrl:''}}
</template>
</el-table-column>
<el-table-column
label=
"操作"
width=
"1
2
0"
align=
"center"
>
<el-table-column
label=
"操作"
width=
"1
5
0"
align=
"center"
>
<template
slot-scope=
"scope"
>
<
@
shiro
.
hasPermission
name=
"cms:category:save"
>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"save(scope.row.id, scope.row.id)"
>
新增
子栏目
</el-link>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"save(scope.row.id, scope.row.id)"
><i
class=
"el-icon-plus"
></i>
子栏目
</el-link>
</
@
shiro
.hasPermission
>
<
@
shiro
.
hasPermission
name=
"cms:category:update"
>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"save(scope.row.id)"
>
编辑
</el-link>
...
...
@@ -234,9 +234,9 @@
return
value
;
},
//新增
save
:
function
(
id
,
child
)
{
save
:
function
(
id
,
child
Id
)
{
if
(
id
)
{
location
.
href
=
this
.
manager
+
"/cms/category/form.do?id="
+
id
+
"&child
="
+
chil
d
;
location
.
href
=
this
.
manager
+
"/cms/category/form.do?id="
+
id
+
"&child
Id="
+
childI
d
;
}
else
{
location
.
href
=
this
.
manager
+
"/cms/category/form.do"
;
}
...
...
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