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
dde8f9b2
Commit
dde8f9b2
authored
Jan 08, 2020
by
走散在时光里
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
栏目管理字典的绑定,清除。
parent
0902f02a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
3 deletions
+44
-3
ICategoryDao.xml
src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml
+3
-3
form.ftl
src/main/webapp/WEB-INF/manager/cms/category/form.ftl
+41
-0
No files found.
src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml
View file @
dde8f9b2
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
<if
test=
"categoryManagerId != null"
>
category_manager_id,
</if>
<if
test=
"categoryManagerId != null"
>
category_manager_id,
</if>
<if
test=
"appId != null"
>
app_id,
</if>
<if
test=
"appId != null"
>
app_id,
</if>
<if
test=
"dictId != null"
>
dict_id,
</if>
<if
test=
"dictId != null"
>
dict_id,
</if>
<if
test=
"categoryFlag != null
and categoryFlag != ''
"
>
category_flag,
</if>
<if
test=
"categoryFlag != null"
>
category_flag,
</if>
<if
test=
"categoryPath != null and categoryPath != ''"
>
category_path,
</if>
<if
test=
"categoryPath != null and categoryPath != ''"
>
category_path,
</if>
<if
test=
"categoryParentId != null and categoryParentId != ''"
>
category_parent_id,
</if>
<if
test=
"categoryParentId != null and categoryParentId != ''"
>
category_parent_id,
</if>
<if
test=
"createBy > 0"
>
create_by,
</if>
<if
test=
"createBy > 0"
>
create_by,
</if>
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
<if
test=
"categoryManagerId != null"
>
#{categoryManagerId},
</if>
<if
test=
"categoryManagerId != null"
>
#{categoryManagerId},
</if>
<if
test=
"appId != null"
>
#{appId},
</if>
<if
test=
"appId != null"
>
#{appId},
</if>
<if
test=
"dictId != null"
>
#{dictId},
</if>
<if
test=
"dictId != null"
>
#{dictId},
</if>
<if
test=
"categoryFlag != null
and categoryFlag != ''
"
>
#{categoryFlag},
</if>
<if
test=
"categoryFlag != null "
>
#{categoryFlag},
</if>
<if
test=
"categoryPath != null and categoryPath != ''"
>
#{categoryPath},
</if>
<if
test=
"categoryPath != null and categoryPath != ''"
>
#{categoryPath},
</if>
<if
test=
"categoryParentId != null and categoryParentId != ''"
>
#{categoryParentId},
</if>
<if
test=
"categoryParentId != null and categoryParentId != ''"
>
#{categoryParentId},
</if>
<if
test=
"createBy > 0"
>
#{createBy},
</if>
<if
test=
"createBy > 0"
>
#{createBy},
</if>
...
@@ -105,7 +105,7 @@
...
@@ -105,7 +105,7 @@
<if
test=
"categoryManagerId != null"
>
category_manager_id=#{categoryManagerId},
</if>
<if
test=
"categoryManagerId != null"
>
category_manager_id=#{categoryManagerId},
</if>
<if
test=
"appId != null"
>
app_id=#{appId},
</if>
<if
test=
"appId != null"
>
app_id=#{appId},
</if>
<if
test=
"dictId != null"
>
dict_id=#{dictId},
</if>
<if
test=
"dictId != null"
>
dict_id=#{dictId},
</if>
<if
test=
"categoryFlag != null
and categoryFlag != ''
"
>
category_flag=#{categoryFlag},
</if>
<if
test=
"categoryFlag != null "
>
category_flag=#{categoryFlag},
</if>
<if
test=
"categoryPath != null and categoryPath != ''"
>
category_path=#{categoryPath},
</if>
<if
test=
"categoryPath != null and categoryPath != ''"
>
category_path=#{categoryPath},
</if>
<if
test=
"createBy > 0"
>
create_by=#{createBy},
</if>
<if
test=
"createBy > 0"
>
create_by=#{createBy},
</if>
<if
test=
"createDate != null"
>
create_date=#{createDate},
</if>
<if
test=
"createDate != null"
>
create_date=#{createDate},
</if>
...
...
src/main/webapp/WEB-INF/manager/cms/category/form.ftl
View file @
dde8f9b2
...
@@ -114,6 +114,9 @@
...
@@ -114,6 +114,9 @@
<el-row
<el-row
gutter=
"0"
gutter=
"0"
justify=
"start"
align=
"top"
>
justify=
"start"
align=
"top"
>
<el-col
span=
"12"
>
<el-col
span=
"12"
>
<el-form-item
prop=
"categoryListUrl"
v-if=
"form.categoryType == '1'"
>
<el-form-item
prop=
"categoryListUrl"
v-if=
"form.categoryType == '1'"
>
<template
slot=
'label'
>
列表模板
<template
slot=
'label'
>
列表模板
...
@@ -133,6 +136,22 @@
...
@@ -133,6 +136,22 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
span=
"12"
>
<el-form-item
label=
"栏目属性"
prop=
"categoryFlag"
>
<el-select
v-model=
"form.categoryFlag"
:style=
"{width: '100%'}"
:filterable=
"false"
:disabled=
"false"
:multiple=
"true"
:clearable=
"true"
placeholder=
"请选择栏目属性"
>
<el-option
v-for=
'item in categoryFlagOptions'
:key=
"item.dictValue"
:value=
"item.dictValue"
:label=
"item.dictLabel"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-row>
<el-form-item
label=
"栏目管理关键字"
prop=
"categoryKeyword"
>
<el-form-item
label=
"栏目管理关键字"
prop=
"categoryKeyword"
>
<template
slot=
'label'
>
栏目关键字
<template
slot=
'label'
>
栏目关键字
...
@@ -250,11 +269,14 @@
...
@@ -250,11 +269,14 @@
categoryDiyUrl
:
''
,
categoryDiyUrl
:
''
,
// 栏目管理的内容模型id
// 栏目管理的内容模型id
mdiyModelId
:
''
,
mdiyModelId
:
''
,
//栏目字典
categoryFlag
:
[]
},
},
categoryTypeOptions
:
[{
"value"
:
"1"
,
"label"
:
"列表"
},
{
"value"
:
"2"
,
"label"
:
"封面"
}],
categoryTypeOptions
:
[{
"value"
:
"1"
,
"label"
:
"列表"
},
{
"value"
:
"2"
,
"label"
:
"封面"
}],
categoryListUrlOptions
:
[],
categoryListUrlOptions
:
[],
categoryUrlOptions
:
[],
categoryUrlOptions
:
[],
mdiyModelIdOptions
:
[],
mdiyModelIdOptions
:
[],
categoryFlagOptions
:
[],
rules
:
{
rules
:
{
// 栏目管理名称
// 栏目管理名称
categoryTitle
:
[{
categoryTitle
:
[{
...
@@ -331,6 +353,10 @@
...
@@ -331,6 +353,10 @@
if
(
data
.
categoryId
==
'0'
)
{
if
(
data
.
categoryId
==
'0'
)
{
data
.
categoryId
=
''
;
data
.
categoryId
=
''
;
}
}
if
(
data
.
categoryFlag
){
data
.
categoryFlag
=
data
.
categoryFlag
.
join
(
','
);
}
data
.
categoryImg
=
JSON
.
stringify
(
data
.
categoryImg
);
data
.
categoryImg
=
JSON
.
stringify
(
data
.
categoryImg
);
ms
.
http
.
post
(
url
,
data
).
then
(
function
(
data
)
{
ms
.
http
.
post
(
url
,
data
).
then
(
function
(
data
)
{
if
(
data
.
result
)
{
if
(
data
.
result
)
{
...
@@ -369,6 +395,9 @@
...
@@ -369,6 +395,9 @@
var
that
=
this
;
var
that
=
this
;
ms
.
http
.
get
(
ms
.
manager
+
"/cms/category/get.do"
,
{
"id"
:
id
}).
then
(
function
(
res
)
{
ms
.
http
.
get
(
ms
.
manager
+
"/cms/category/get.do"
,
{
"id"
:
id
}).
then
(
function
(
res
)
{
if
(
res
.
result
&&
res
.
data
)
{
if
(
res
.
result
&&
res
.
data
)
{
if
(
res
.
data
.
categoryFlag
){
res
.
data
.
categoryFlag
=
res
.
data
.
categoryFlag
.
split
(
','
);
}
if
(
res
.
data
.
categoryImg
)
{
if
(
res
.
data
.
categoryImg
)
{
res
.
data
.
categoryImg
=
JSON
.
parse
(
res
.
data
.
categoryImg
);
res
.
data
.
categoryImg
=
JSON
.
parse
(
res
.
data
.
categoryImg
);
res
.
data
.
categoryImg
.
forEach
(
function
(
value
)
{
res
.
data
.
categoryImg
.
forEach
(
function
(
value
)
{
...
@@ -431,6 +460,16 @@
...
@@ -431,6 +460,16 @@
this
.
form
.
categoryImg
.
splice
(
index
,
1
);
this
.
form
.
categoryImg
.
splice
(
index
,
1
);
}
}
},
},
//获取categoryFlag数据源
categoryFlagOptionsGet
()
{
var
that
=
this
;
ms
.
http
.
get
(
ms
.
base
+
'/mdiy/dict/list.do'
,
{
dictType
:
'栏目属性'
,
pageSize
:
99999
}).
then
(
function
(
res
)
{
that
.
categoryFlagOptions
=
res
.
rows
;
}).
catch
(
function
(
err
)
{
console
.
log
(
err
);
});
},
//categoryImg文件上传完成回调
//categoryImg文件上传完成回调
categoryImgSuccess
:
function
(
response
,
file
,
fileList
)
{
categoryImgSuccess
:
function
(
response
,
file
,
fileList
)
{
this
.
form
.
categoryImg
.
push
({
url
:
file
.
url
,
name
:
file
.
name
,
path
:
response
,
uid
:
file
.
uid
});
this
.
form
.
categoryImg
.
push
({
url
:
file
.
url
,
name
:
file
.
name
,
path
:
response
,
uid
:
file
.
uid
});
...
@@ -446,12 +485,14 @@
...
@@ -446,12 +485,14 @@
this
.
form
.
categoryImg
.
splice
(
index
,
1
);
this
.
form
.
categoryImg
.
splice
(
index
,
1
);
}
}
},
},
},
},
created
()
{
created
()
{
this
.
getColumnContentModelId
();
this
.
getColumnContentModelId
();
this
.
getTree
()
this
.
getTree
()
this
.
categoryListUrlOptionsGet
();
this
.
categoryListUrlOptionsGet
();
this
.
categoryUrlOptionsGet
();
this
.
categoryUrlOptionsGet
();
this
.
categoryFlagOptionsGet
();
this
.
form
.
id
=
ms
.
util
.
getParameter
(
"id"
);
this
.
form
.
id
=
ms
.
util
.
getParameter
(
"id"
);
if
(
this
.
form
.
id
)
{
if
(
this
.
form
.
id
)
{
this
.
get
(
this
.
form
.
id
);
this
.
get
(
this
.
form
.
id
);
...
...
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