Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
MCMS
Commits
70484138
Commit
70484138
authored
Oct 19, 2020
by
xierz
Browse files
新增子栏目优化
parent
a655345c
Changes
2
Hide whitespace changes
Inline
Side-by-side
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
(
"child
Id
"
)
;
//
判断是否增加子栏目
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="
+
child
;
location
.href
=
this
.manager
+
"/cms/category/form.do?id="
+
id
+
"&child
Id
="
+
child
Id
;
}
else
{
location
.href
=
this
.manager
+
"/cms/category/form.do"
;
}
...
...
Write
Preview
Supports
Markdown
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