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
6cfcb6fd
Commit
6cfcb6fd
authored
Dec 17, 2019
by
tianbj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
879f9c55
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
4 deletions
+29
-4
form.ftl
src/main/webapp/WEB-INF/manager/cms/category/form.ftl
+22
-2
form.ftl
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
+6
-1
index.ftl
src/main/webapp/WEB-INF/manager/cms/content/index.ftl
+1
-1
No files found.
src/main/webapp/WEB-INF/manager/cms/category/form.ftl
View file @
6cfcb6fd
...
...
@@ -41,13 +41,13 @@
<el-form-item
prop=
"categoryType"
>
<template
slot=
'label'
>
栏目类型
<el-popover
slot=
"label"
placement=
"top-start"
title=
"提示"
trigger=
"hover"
>
列表:常用于带列表、详情的业务,例如:新闻列表、图片列表
<br>
封面:常用单篇文章显示,例如:关于我们、公司介绍
列表:常用于带列表、详情的业务,例如:新闻列表、图片列表
<br>
封面:常用单篇文章显示,例如:关于我们、公司介绍
<br>
修改栏目时如果该栏目存在文章则不能修改栏目类型
<i
class=
"el-icon-question"
slot=
"reference"
></i>
</el-popover>
</template>
<el-radio-group
v-model=
"form.categoryType"
:style=
"{width: ''}"
:disabled=
"
false
"
>
:disabled=
"
categoryTypeDisabled
"
>
<el-radio
:style=
"{display: true ? 'inline-block' : 'block'}"
:label=
"item.value"
v-for=
'(item, index) in categoryTypeOptions'
:key=
"item.value + index"
>
{{true? item.label : item.value}}
...
...
@@ -191,6 +191,7 @@
children
:[],
}],
saveDisabled
:
false
,
categoryTypeDisabled
:
true
,
//表单数据
form
:
{
// 栏目管理名称
...
...
@@ -251,6 +252,7 @@
}
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
//栏目属性为封面则不需要列表模板
if
(
that
.
form
.
categoryType
==
'2'
){
that
.
form
.
categoryListUrl
=
''
;
...
...
@@ -319,6 +321,22 @@
res
.
data
.
categoryId
=
'0'
;
}
that
.
form
=
res
.
data
;
//判断该分类是否存在文章,存在则不能修改栏目属性
that
.
contentList
(
that
.
form
.
id
);
}
}).
catch
(
function
(
err
)
{
console
.
log
(
err
);
});
},
contentList
:
function
(
id
){
var
that
=
this
;
ms
.
http
.
post
(
ms
.
manager
+
"/cms/content/list.do"
,{
contentCategoryId
:
id
,
}).
then
(
function
(
data
)
{
if
(
data
.
data
.
total
>
0
){
that
.
categoryTypeDisabled
=
true
;
}
else
{
that
.
categoryTypeDisabled
=
false
;
}
}).
catch
(
function
(
err
)
{
console
.
log
(
err
);
...
...
@@ -377,6 +395,8 @@
this
.
form
.
id
=
ms
.
util
.
getParameter
(
"id"
);
if
(
this
.
form
.
id
)
{
this
.
get
(
this
.
form
.
id
);
}
else
{
this
.
categoryTypeDisabled
=
false
;
}
}
});
...
...
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
View file @
6cfcb6fd
...
...
@@ -247,6 +247,7 @@
contentTitle
:
[{
"required"
:
true
,
"message"
:
"请选择文章标题"
}],
// 发布时间
contentDatetime
:
[{
"required"
:
true
,
"message"
:
"发布时间不能为空"
}],
contentCategoryId
:
[{
"required"
:
true
,
"message"
:
"所属栏目不能为空"
}],
},
}
...
...
@@ -302,7 +303,9 @@
message
:
'保存成功'
,
type
:
'success'
});
location
.
href
=
ms
.
manager
+
"/cms/content/main.do"
;
if
(
that
.
returnIsShow
){
javascript
:
history
.
go
(
-
1
);
}
}
else
{
that
.
$notify
({
title
:
'失败'
,
...
...
@@ -488,7 +491,9 @@
this
.
contentCategoryIdOptionsGet
();
this
.
contentTypeOptionsGet
();
this
.
form
.
id
=
ms
.
util
.
getParameter
(
"id"
);
if
(
ms
.
util
.
getParameter
(
"categoryId"
)
!=
'undefined'
&&
ms
.
util
.
getParameter
(
"categoryId"
)
!=
'null'
){
this
.
form
.
contentCategoryId
=
ms
.
util
.
getParameter
(
"categoryId"
);
}
this
.
type
=
ms
.
util
.
getParameter
(
"type"
);
if
(
this
.
form
.
id
)
{
this
.
get
(
this
.
form
.
id
);
...
...
src/main/webapp/WEB-INF/manager/cms/content/index.ftl
View file @
6cfcb6fd
...
...
@@ -11,7 +11,7 @@
<!--左侧-->
<el-container
class=
"index-menu"
>
<div
class=
"left-tree"
>
<el-tree
:indent=
"5"
v-loading=
"loading"
:expand-on-click-node=
"false"
default-expand-all
:empty-text=
"emptyText"
:data=
"treeData"
:props=
"defaultProps"
@
node-click=
"handleNodeClick"
style=
"padding: 10px;height: 100%;"
></el-tree>
<el-tree
:indent=
"5"
v-loading=
"loading"
highlight-current
:expand-on-click-node=
"false"
default-expand-all
:empty-text=
"emptyText"
:data=
"treeData"
:props=
"defaultProps"
@
node-click=
"handleNodeClick"
style=
"padding: 10px;height: 100%;"
></el-tree>
</div>
<iframe
:src=
"action"
class=
"ms-iframe-style"
>
</iframe>
...
...
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