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
d668c382
Commit
d668c382
authored
Nov 29, 2019
by
tianbj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跳转
parent
1149503f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
3 deletions
+38
-3
form.ftl
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
+31
-1
index.ftl
src/main/webapp/WEB-INF/manager/cms/content/index.ftl
+7
-2
No files found.
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
View file @
d668c382
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<div
id=
"form"
v-cloak
>
<div
id=
"form"
v-cloak
>
<el-header
class=
"ms-header ms-tr"
height=
"50px"
>
<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
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-header>
<el-main
class=
"ms-container"
>
<el-main
class=
"ms-container"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
size=
"mini"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
size=
"mini"
>
...
@@ -193,6 +193,7 @@
...
@@ -193,6 +193,7 @@
UEDITOR_HOME_URL
:
ms
.
base
+
'/static/plugins/ueditor/1.4.3.1/'
UEDITOR_HOME_URL
:
ms
.
base
+
'/static/plugins/ueditor/1.4.3.1/'
},
},
contentCategoryIdOptions
:[],
contentCategoryIdOptions
:[],
returnIsShow
:
true
,
//表单数据
//表单数据
form
:
{
form
:
{
// 文章标题
// 文章标题
...
@@ -337,14 +338,43 @@
...
@@ -337,14 +338,43 @@
this
.
form
.
contentImg
.
splice
(
index
,
1
);
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
()
{
created
()
{
this
.
contentCategoryIdOptionsGet
();
this
.
contentCategoryIdOptionsGet
();
this
.
contentTypeOptionsGet
();
this
.
contentTypeOptionsGet
();
this
.
form
.
id
=
ms
.
util
.
getParameter
(
"id"
);
this
.
form
.
id
=
ms
.
util
.
getParameter
(
"id"
);
this
.
form
.
contentCategoryId
=
ms
.
util
.
getParameter
(
"categoryId"
);
if
(
this
.
form
.
id
)
{
if
(
this
.
form
.
id
)
{
this
.
get
(
this
.
form
.
id
);
this
.
get
(
this
.
form
.
id
);
}
}
if
(
this
.
form
.
contentCategoryId
){
this
.
list
(
this
.
form
.
contentCategoryId
);
this
.
returnIsShow
=
false
;
}
}
}
});
});
</script>
</script>
...
...
src/main/webapp/WEB-INF/manager/cms/content/index.ftl
View file @
d668c382
...
@@ -34,8 +34,13 @@
...
@@ -34,8 +34,13 @@
},
},
methods
:{
methods
:{
handleNodeClick
:
function
(
data
){
handleNodeClick
:
function
(
data
){
this
.
$el
.
getElementsByTagName
(
'iframe'
)[
0
].
contentWindow
.
window
.
mainVue
.
form
.
contentCategoryId
=
data
.
id
;
if
(
data
.
categoryType
==
'1'
){
this
.
$el
.
getElementsByTagName
(
'iframe'
)[
0
].
contentWindow
.
window
.
mainVue
.
list
();
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
(){
treeList
:
function
(){
var
that
=
this
;
var
that
=
this
;
...
...
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