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
765bfd55
Commit
765bfd55
authored
Dec 02, 2019
by
sgjj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加自定义模型
parent
f1a1ee7e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
21 deletions
+46
-21
pom.xml
pom.xml
+5
-0
form.ftl
src/main/webapp/WEB-INF/manager/cms/category/form.ftl
+28
-12
form.ftl
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
+11
-8
main.ftl
src/main/webapp/WEB-INF/manager/cms/content/main.ftl
+2
-1
tree.js
src/main/webapp/static/plugins/tree-select/tree.js
+0
-0
No files found.
pom.xml
View file @
765bfd55
...
@@ -40,6 +40,11 @@
...
@@ -40,6 +40,11 @@
<artifactId>
ms-basic
</artifactId>
<artifactId>
ms-basic
</artifactId>
<version>
1.0.17-SNAPSHOT
</version>
<version>
1.0.17-SNAPSHOT
</version>
</dependency>
</dependency>
<dependency>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-mdiy
</artifactId>
<version>
1.0.12-SNAPSHOT
</version>
</dependency>
<dependency>
<dependency>
<groupId>
net.mingsoft
</groupId>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-mpeople
</artifactId>
<artifactId>
ms-mpeople
</artifactId>
...
...
src/main/webapp/WEB-INF/manager/cms/category/form.ftl
View file @
765bfd55
...
@@ -89,6 +89,23 @@
...
@@ -89,6 +89,23 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
gutter=
"0"
justify=
"start"
align=
"top"
>
<el-col
span=
"12"
>
<el-form-item
label=
"自定义模型"
prop=
"mdiyModelId"
>
<el-select
v-model=
"form.mdiyModelId"
:style=
"{width: '100%'}"
:filterable=
"false"
:disabled=
"false"
:multiple=
"false"
:clearable=
"true"
placeholder=
"请选择栏目的自定义模型"
>
<el-option
v-for=
'item in mdiyModelIdOptions'
:key=
"item.id"
:value=
"item.id"
:label=
"item.modelName"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item
label=
"栏目管理关键字"
prop=
"categoryKeyword"
>
<el-form-item
label=
"栏目管理关键字"
prop=
"categoryKeyword"
>
<el-input
<el-input
type=
"textarea"
:rows=
"5"
type=
"textarea"
:rows=
"5"
...
@@ -141,17 +158,6 @@
...
@@ -141,17 +158,6 @@
placeholder=
"请输入自定义链接"
>
placeholder=
"请输入自定义链接"
>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"栏目管理的内容模型id"
prop=
"mdiyModelId"
>
<el-select
v-model=
"form.mdiyModelId"
:style=
"{width: '100%'}"
:filterable=
"false"
:disabled=
"false"
:multiple=
"false"
:clearable=
"true"
placeholder=
"请选择栏目管理的内容模型id"
>
<el-option
v-for=
'item in mdiyModelIdOptions'
:key=
"item.value"
:value=
"item.value"
:label=
"false?item.label:item.value"
></el-option>
</el-select>
</el-form-item>
</el-form>
</el-form>
</el-scrollbar>
</el-scrollbar>
</el-main>
</el-main>
...
@@ -259,7 +265,16 @@
...
@@ -259,7 +265,16 @@
}
}
})
})
},
},
//获取分类内容模型
getColumnContentModelId
:
function
()
{
var
that
=
this
;
ms
.
http
.
get
(
ms
.
manager
+
"/mdiy/model/list.do"
,{
modelType
:
'zdymx_wz'
}).
then
(
function
(
data
)
{
that
.
mdiyModelIdOptions
=
data
.
rows
;
}).
catch
(
function
(
err
)
{
console
.
log
(
err
);
});
},
//获取当前分类
//获取当前分类
get
(
id
)
{
get
(
id
)
{
var
that
=
this
;
var
that
=
this
;
...
@@ -325,6 +340,7 @@
...
@@ -325,6 +340,7 @@
},
},
},
},
created
()
{
created
()
{
this
.
getColumnContentModelId
();
this
.
getTree
()
this
.
getTree
()
this
.
categoryListUrlOptionsGet
();
this
.
categoryListUrlOptionsGet
();
this
.
categoryUrlOptionsGet
();
this
.
categoryUrlOptionsGet
();
...
...
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
View file @
765bfd55
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
:label=
"item.title"
:label=
"item.title"
:name=
"item.name"
>
:name=
"item.name"
>
<el-scrollbar
class=
"ms-scrollbar"
style=
"height: 100%;"
>
<el-scrollbar
class=
"ms-scrollbar"
style=
"height: 100%;"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
size=
"mini"
>
<el-form
v-if=
"item.title=='文章编辑'"
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
size=
"mini"
>
<el-row
<el-row
gutter=
"0"
gutter=
"0"
justify=
"start"
align=
"top"
>
justify=
"start"
align=
"top"
>
...
@@ -240,6 +240,7 @@
...
@@ -240,6 +240,7 @@
contentDetails
:
''
,
contentDetails
:
''
,
},
},
contentTypeOptions
:
[],
contentTypeOptions
:
[],
categoryIdOptions
:
[],
contentDisplayOptions
:
[{
"value"
:
"0"
,
"label"
:
"是"
},
{
"value"
:
"1"
,
"label"
:
"否"
}],
contentDisplayOptions
:
[{
"value"
:
"0"
,
"label"
:
"是"
},
{
"value"
:
"1"
,
"label"
:
"否"
}],
rules
:
{
rules
:
{
// 文章标题
// 文章标题
...
@@ -254,7 +255,7 @@
...
@@ -254,7 +255,7 @@
computed
:{
computed
:{
currCategory
(){
currCategory
(){
var
that
=
this
;
var
that
=
this
;
return
this
.
c
ontentC
ategoryIdOptions
.
find
(
function
(
value
){
return
this
.
categoryIdOptions
.
find
(
function
(
value
){
return
value
.
id
===
that
.
form
.
contentCategoryId
return
value
.
id
===
that
.
form
.
contentCategoryId
})
})
},
},
...
@@ -271,7 +272,7 @@
...
@@ -271,7 +272,7 @@
if
(
that
.
form
.
id
>
0
)
{
if
(
that
.
form
.
id
>
0
)
{
url
=
ms
.
manager
+
"/cms/content/update.do"
;
url
=
ms
.
manager
+
"/cms/content/update.do"
;
}
}
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
this
.
$refs
.
form
[
0
]
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
that
.
saveDisabled
=
true
;
that
.
saveDisabled
=
true
;
var
data
=
JSON
.
parse
(
JSON
.
stringify
(
that
.
form
));
var
data
=
JSON
.
parse
(
JSON
.
stringify
(
that
.
form
));
...
@@ -281,7 +282,7 @@
...
@@ -281,7 +282,7 @@
if
(
data
.
result
)
{
if
(
data
.
result
)
{
//保存时需要赋值关联ID
//保存时需要赋值关联ID
if
(
that
.
model
){
if
(
that
.
model
){
that
.
model
.
form
.
linkId
=
data
.
id
;
that
.
model
.
form
.
linkId
=
data
.
data
.
id
;
that
.
model
.
save
()
that
.
model
.
save
()
}
}
that
.
$notify
({
that
.
$notify
({
...
@@ -322,9 +323,9 @@
...
@@ -322,9 +323,9 @@
that
.
editableTabs
=
[
that
.
editableTabs
[
0
]];
that
.
editableTabs
=
[
that
.
editableTabs
[
0
]];
this
.
removeModel
();
this
.
removeModel
();
if
(
this
.
currCategory
){
if
(
this
.
currCategory
){
if
(
this
.
currCategory
.
categoryCm
Id
){
if
(
this
.
currCategory
.
mdiyModel
Id
){
ms
.
http
.
get
(
ms
.
manager
+
"/mdiy/model/get.do"
,{
ms
.
http
.
get
(
ms
.
manager
+
"/mdiy/model/get.do"
,{
id
:
this
.
currCategory
.
categoryCm
Id
id
:
this
.
currCategory
.
mdiyModel
Id
}).
then
(
function
(
data
)
{
}).
then
(
function
(
data
)
{
if
(
data
.
id
){
if
(
data
.
id
){
that
.
rederModel
(
data
,
JSON
.
parse
(
data
.
modelJson
))
that
.
rederModel
(
data
,
JSON
.
parse
(
data
.
modelJson
))
...
@@ -359,7 +360,7 @@
...
@@ -359,7 +360,7 @@
title
:
modelEntity
.
modelName
,
title
:
modelEntity
.
modelName
,
modelId
:
modelEntity
.
id
,
modelId
:
modelEntity
.
id
,
form
:{
form
:{
linkId
:
that
.
id
linkId
:
that
.
form
.
id
},
},
}
}
})
})
...
@@ -385,8 +386,8 @@
...
@@ -385,8 +386,8 @@
}
else
{
}
else
{
res
.
data
.
contentImg
=
[]
res
.
data
.
contentImg
=
[]
}
}
that
.
changeModel
();
that
.
form
=
res
.
data
;
that
.
form
=
res
.
data
;
that
.
changeModel
();
}
}
}).
catch
(
function
(
err
)
{
}).
catch
(
function
(
err
)
{
console
.
log
(
err
);
console
.
log
(
err
);
...
@@ -398,6 +399,8 @@
...
@@ -398,6 +399,8 @@
ms
.
http
.
get
(
ms
.
manager
+
"/cms/category/list.do"
,
{
pageSize
:
9999
}).
then
(
function
(
res
)
{
ms
.
http
.
get
(
ms
.
manager
+
"/cms/category/list.do"
,
{
pageSize
:
9999
}).
then
(
function
(
res
)
{
if
(
res
.
result
)
{
if
(
res
.
result
)
{
that
.
contentCategoryIdOptions
=
ms
.
util
.
treeData
(
res
.
data
.
rows
,
'id'
,
'categoryId'
,
'children'
);
that
.
contentCategoryIdOptions
=
ms
.
util
.
treeData
(
res
.
data
.
rows
,
'id'
,
'categoryId'
,
'children'
);
that
.
categoryIdOptions
=
res
.
data
.
rows
that
.
changeModel
();
}
}
}).
catch
(
function
(
err
)
{
}).
catch
(
function
(
err
)
{
console
.
log
(
err
);
console
.
log
(
err
);
...
...
src/main/webapp/WEB-INF/manager/cms/content/main.ftl
View file @
765bfd55
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
</html>
</html>
<script>
<script>
var
main
Vue
=
new
Vue
({
var
index
Vue
=
new
Vue
({
el
:
'#main'
,
el
:
'#main'
,
data
:{
data
:{
conditionList
:[
conditionList
:[
...
@@ -124,6 +124,7 @@
...
@@ -124,6 +124,7 @@
{
action
:
'and'
,
field
:
'update_date'
,
el
:
'eq'
,
model
:
'updateDate'
,
name
:
'修改时间'
,
type
:
'date'
},
{
action
:
'and'
,
field
:
'update_date'
,
el
:
'eq'
,
model
:
'updateDate'
,
name
:
'修改时间'
,
type
:
'date'
},
],
],
conditions
:[],
conditions
:[],
contentCategoryIdOptions
:[],
dataList
:
[],
//文章列表
dataList
:
[],
//文章列表
selectionList
:[],
//文章列表选中
selectionList
:[],
//文章列表选中
total
:
0
,
//总记录数量
total
:
0
,
//总记录数量
...
...
src/main/webapp/static/plugins/tree-select/tree.js
View file @
765bfd55
This diff is collapsed.
Click to expand it.
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