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
d668c382
Commit
d668c382
authored
Nov 29, 2019
by
tianbj
Browse files
跳转
parent
1149503f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
View file @
d668c382
...
...
@@ -8,7 +8,7 @@
<div id="form" v-cloak>
<el-header class="ms-header ms-tr" height="50px">
<el-button type="primary" icon="iconfont icon-baocun" size="mini" @click="save()" :loading="saveDisabled">保存</el-button>
<el-button size="mini" icon="iconfont icon-fanhui" plain onclick="javascript:history.go(-1)">返回</el-button>
<el-button size="mini" icon="iconfont icon-fanhui" plain onclick="javascript:history.go(-1)"
v-if="returnIsShow"
>返回</el-button>
</el-header>
<el-main class="ms-container">
<el-form ref="form" :model="form" :rules="rules" label-width="120px" size="mini">
...
...
@@ -193,6 +193,7 @@
UEDITOR
_
HOME
_
URL
:
ms
.base
+'/
static
/
plugins
/
ueditor
/
1.4
.
3.1
/'
},
contentCategoryIdOptions
:
[]
,
returnIsShow
:
true
,
//表单数据
form
:
{
//
文章标题
...
...
@@ -337,14 +338,43 @@
this
.form.contentImg.splice
(
index
,
1
)
;
}
},
//查询列表
list
:
function
(
contentCategoryId
)
{
var
that
=
this
;
ms
.http.post
(
ms
.manager
+
"/cms/content/list.do"
,{
contentCategoryId
:
contentCategoryId
,
})
.then
(
function
(
res
)
{
if
(
res
.result
&&
res
.data.total
>
0
){
if
(
res
.data.rows
[
0
]
.contentType)
{
res
.data.rows
[
0
]
.contentType = res.data.rows[0].contentType.split(',');
}
if
(
res
.data.rows
[
0
]
.contentImg)
{
res
.data.rows
[
0
]
.contentImg = JSON.parse(res.data.rows[0].contentImg);
res
.data.rows
[
0
]
.contentImg.forEach(function(value)
{
value
.url
=
ms
.base
+
value
.path
}
)
}
else
{
res
.data.rows
[
0
]
.contentImg=[]
}
that
.form
=
res
.data.rows
[
0
]
;
}
})
.catch
(
function
(
err
)
{
console
.log
(
err
)
;
})
;
},
},
created
()
{
this
.contentCategoryIdOptionsGet
()
;
this
.contentTypeOptionsGet
()
;
this
.form.id
=
ms
.util.getParameter
(
"id"
)
;
this
.form.contentCategoryId
=
ms
.util.getParameter
(
"categoryId"
)
;
if
(
this
.form.id
)
{
this
.get
(
this
.form.id
)
;
}
if
(
this
.form.contentCategoryId
){
this
.list
(
this
.form.contentCategoryId
)
;
this
.returnIsShow
=
false
;
}
}
}
);
</
script
>
...
...
src/main/webapp/WEB-INF/manager/cms/content/index.ftl
View file @
d668c382
...
...
@@ -34,8 +34,13 @@
},
methods
:{
handleNodeClick
:
function
(
data
){
this
.
$el
.getElementsByTagName
(
'
iframe
'
)[
0
]
.contentWindow.window.mainVue.form.contentCategoryId = data.id;
this
.
$el
.getElementsByTagName
(
'
iframe
'
)[
0
]
.contentWindow.window.mainVue.list();
if
(
data
.categoryType
==
'
1
'
){
this
.action
=
ms
.manager
+
"/cms/content/main.do?categoryId="
+
data
.id
;
}
else
if
(
data
.categoryType
==
'
2
'
){
this
.action
=
ms
.manager
+
"/cms/content/form.do?categoryId="
+
data
.id
;
}
else
{
this
.action
=
ms
.manager
+
"/cms/content/main.do"
;
}
},
treeList
:
function
(){
var
that
=
this
;
...
...
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