Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
b4fb4265
S
Skyeye
项目概览
doc_wei
/
Skyeye
通知
1173
Star
154
Fork
127
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Skyeye
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
b4fb4265
编写于
10月 18, 2018
作者:
doc_wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
小程序分类查询
上级
02423abb
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
288 addition
and
0 deletion
+288
-0
skyeye-dao/src/main/java/com/skyeye/authority/dao/RmTypeDao.java
...dao/src/main/java/com/skyeye/authority/dao/RmTypeDao.java
+12
-0
skyeye-service/src/main/java/com/skyeye/authority/service/RmTypeService.java
...main/java/com/skyeye/authority/service/RmTypeService.java
+10
-0
skyeye-service/src/main/java/com/skyeye/authority/service/impl/RmTypeServiceImpl.java
.../com/skyeye/authority/service/impl/RmTypeServiceImpl.java
+43
-0
skyeye-web/src/main/java/com/skyeye/authority/controller/RmTypeController.java
...ava/com/skyeye/authority/controller/RmTypeController.java
+33
-0
skyeye-web/src/main/resources/dbmapper/RmTypeMapper.xml
skyeye-web/src/main/resources/dbmapper/RmTypeMapper.xml
+21
-0
skyeye-web/src/main/resources/mapping/reqmapping.xml
skyeye-web/src/main/resources/mapping/reqmapping.xml
+7
-0
skyeye-web/src/main/webapp/js/rmtype/rmtypelist.js
skyeye-web/src/main/webapp/js/rmtype/rmtypelist.js
+113
-0
skyeye-web/src/main/webapp/tpl/rmtype/rmtypelist.html
skyeye-web/src/main/webapp/tpl/rmtype/rmtypelist.html
+49
-0
未找到文件。
skyeye-dao/src/main/java/com/skyeye/authority/dao/RmTypeDao.java
0 → 100644
浏览文件 @
b4fb4265
package
com.skyeye.authority.dao
;
import
java.util.List
;
import
java.util.Map
;
import
com.github.miemiedev.mybatis.paginator.domain.PageBounds
;
public
interface
RmTypeDao
{
public
List
<
Map
<
String
,
Object
>>
queryRmTypeList
(
Map
<
String
,
Object
>
map
,
PageBounds
pageBounds
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/authority/service/RmTypeService.java
0 → 100644
浏览文件 @
b4fb4265
package
com.skyeye.authority.service
;
import
com.skyeye.common.object.InputObject
;
import
com.skyeye.common.object.OutputObject
;
public
interface
RmTypeService
{
public
void
queryRmTypeList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/authority/service/impl/RmTypeServiceImpl.java
0 → 100644
浏览文件 @
b4fb4265
package
com.skyeye.authority.service.impl
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.github.miemiedev.mybatis.paginator.domain.PageBounds
;
import
com.github.miemiedev.mybatis.paginator.domain.PageList
;
import
com.skyeye.authority.dao.RmTypeDao
;
import
com.skyeye.authority.service.RmTypeService
;
import
com.skyeye.common.object.InputObject
;
import
com.skyeye.common.object.OutputObject
;
@Service
public
class
RmTypeServiceImpl
implements
RmTypeService
{
@Autowired
private
RmTypeDao
rmTypeDao
;
/**
*
* @Title: querySysMenuList
* @Description: 获取小程序分类列表
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
queryRmTypeList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
List
<
Map
<
String
,
Object
>>
beans
=
rmTypeDao
.
queryRmTypeList
(
map
,
new
PageBounds
(
Integer
.
parseInt
(
map
.
get
(
"page"
).
toString
()),
Integer
.
parseInt
(
map
.
get
(
"limit"
).
toString
())));
PageList
<
Map
<
String
,
Object
>>
beansPageList
=
(
PageList
<
Map
<
String
,
Object
>>)
beans
;
int
total
=
beansPageList
.
getPaginator
().
getTotalCount
();
outputObject
.
setBeans
(
beans
);
outputObject
.
settotal
(
total
);
}
}
skyeye-web/src/main/java/com/skyeye/authority/controller/RmTypeController.java
0 → 100644
浏览文件 @
b4fb4265
package
com.skyeye.authority.controller
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.skyeye.authority.service.RmTypeService
;
import
com.skyeye.common.object.InputObject
;
import
com.skyeye.common.object.OutputObject
;
@Controller
public
class
RmTypeController
{
@Autowired
private
RmTypeService
rmTypeService
;
/**
*
* @Title: querySysMenuList
* @Description: 获取小程序分类列表
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/RmTypeController/queryRmTypeList"
)
@ResponseBody
public
void
queryRmTypeList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
rmTypeService
.
queryRmTypeList
(
inputObject
,
outputObject
);
}
}
skyeye-web/src/main/resources/dbmapper/RmTypeMapper.xml
0 → 100644
浏览文件 @
b4fb4265
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.skyeye.authority.dao.RmTypeDao"
>
<select
id=
"queryRmTypeList"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.name rmTypeName,
(SELECT COUNT(*) FROM rm_group b WHERE b.rm_type_id = a.id) groupNum,
CONVERT(a.create_time, char) createTime
FROM
rm_type a
WHERE 1 = 1
<if
test=
"rmTypeName != '' and rmTypeName != null"
>
AND a.name LIKE '%${rmTypeName}%'
</if>
ORDER BY a.sort DESC, a.create_time DESC
</select>
</mapper>
\ No newline at end of file
skyeye-web/src/main/resources/mapping/reqmapping.xml
浏览文件 @
b4fb4265
...
@@ -142,6 +142,13 @@
...
@@ -142,6 +142,13 @@
<url
id=
"database003"
path=
"/post/SysDataBaseController/querySysDataBaseDescSelectList"
val=
"获取数据库表备注信息"
allUse=
"1"
>
<url
id=
"database003"
path=
"/post/SysDataBaseController/querySysDataBaseDescSelectList"
val=
"获取数据库表备注信息"
allUse=
"1"
>
</url>
</url>
<!-- 小程序系列开始 -->
<url
id=
"rmxcx001"
path=
"/post/RmTypeController/queryRmTypeList"
val=
"获取小程序分类列表"
allUse=
"1"
>
<property
id=
"limit"
name=
"limit"
ref=
"required"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required"
var=
"分页参数,第几页"
/>
<property
id=
"rmTypeName"
name=
"rmTypeName"
ref=
""
var=
"小程序分类名称"
/>
</url>
<!-- 小程序系列结束 -->
</controller>
</controller>
\ No newline at end of file
skyeye-web/src/main/webapp/js/rmtype/rmtypelist.js
0 → 100644
浏览文件 @
b4fb4265
var
rowId
=
""
;
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
define
([
'
table
'
,
'
jquery
'
,
'
winui
'
,
'
form
'
],
function
(
exports
)
{
winui
.
renderColor
();
var
$
=
layui
.
$
,
form
=
layui
.
form
,
table
=
layui
.
table
;
//表格渲染
table
.
render
({
id
:
'
messageTable
'
,
elem
:
'
#messageTable
'
,
method
:
'
post
'
,
url
:
reqBasePath
+
'
rmxcx001
'
,
where
:{
rmTypeName
:
$
(
"
#rmTypeName
"
).
val
()},
even
:
true
,
//隔行变色
page
:
true
,
limits
:
[
8
,
16
,
24
,
32
,
40
,
48
,
56
],
limit
:
8
,
cols
:
[[
{
title
:
'
序号
'
,
type
:
'
numbers
'
},
{
field
:
'
rmTypeName
'
,
title
:
'
分类名称
'
,
width
:
120
},
{
field
:
'
groupNum
'
,
title
:
'
组件数量
'
,
width
:
520
},
{
field
:
'
createTime
'
,
title
:
'
创建时间
'
,
width
:
180
},
{
title
:
'
操作
'
,
fixed
:
'
right
'
,
align
:
'
center
'
,
width
:
120
,
toolbar
:
'
#tableBar
'
}
]]
});
table
.
on
(
'
tool(messageTable)
'
,
function
(
obj
)
{
//注:tool是工具条事件名,test是table原始容器的属性 lay-filter="对应的值"
var
data
=
obj
.
data
;
//获得当前行数据
var
layEvent
=
obj
.
event
;
//获得 lay-event 对应的值
if
(
layEvent
===
'
del
'
)
{
//删除
del
(
data
,
obj
);
}
else
if
(
layEvent
===
'
edit
'
)
{
//编辑
edit
(
data
);
}
});
//搜索表单
form
.
render
();
form
.
on
(
'
submit(formSearch)
'
,
function
(
data
)
{
//表单验证
if
(
winui
.
verifyForm
(
data
.
elem
))
{
loadTable
();
}
return
false
;
});
//删除
function
del
(
data
,
obj
){
var
msg
=
obj
?
'
确认删除分类【
'
+
obj
.
data
.
rmTypeName
+
'
】吗?
'
:
'
确认删除选中数据吗?
'
;
layer
.
confirm
(
msg
,
{
icon
:
3
,
title
:
'
删除分类
'
},
function
(
index
)
{
layer
.
close
(
index
);
//向服务端发送删除指令
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
sys018
"
,
params
:{
rowId
:
data
.
id
},
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
top
.
winui
.
window
.
msg
(
"
删除成功
"
,
{
icon
:
1
,
time
:
2000
});
loadTable
();
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
});
}
//编辑分类
function
edit
(
data
){
rowId
=
data
.
id
;
_openNewWindows
({
url
:
"
../../tpl/syseverole/syseveroleedit.html
"
,
title
:
"
编辑分类
"
,
pageId
:
"
syseveroleedit
"
,
callBack
:
function
(
refreshCode
){
if
(
refreshCode
==
'
0
'
)
{
top
.
winui
.
window
.
msg
(
"
操作成功
"
,
{
icon
:
1
,
time
:
2000
});
loadTable
();
}
else
if
(
refreshCode
==
'
-9999
'
)
{
top
.
winui
.
window
.
msg
(
"
操作失败
"
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
//刷新数据
$
(
"
body
"
).
on
(
"
click
"
,
"
#reloadTable
"
,
function
(){
loadTable
();
});
//新增分类
$
(
"
body
"
).
on
(
"
click
"
,
"
#addBean
"
,
function
(){
_openNewWindows
({
url
:
"
../../tpl/syseverole/syseveroleadd.html
"
,
title
:
"
新增分类
"
,
pageId
:
"
syseveroleadd
"
,
callBack
:
function
(
refreshCode
){
if
(
refreshCode
==
'
0
'
)
{
top
.
winui
.
window
.
msg
(
"
操作成功
"
,
{
icon
:
1
,
time
:
2000
});
loadTable
();
}
else
if
(
refreshCode
==
'
-9999
'
)
{
top
.
winui
.
window
.
msg
(
"
操作失败
"
,
{
icon
:
2
,
time
:
2000
});
}
}});
});
function
loadTable
(){
table
.
reload
(
"
messageTable
"
,
{
where
:{
rmTypeName
:
$
(
"
#rmTypeName
"
).
val
()}});
}
exports
(
'
syseverolelist
'
,
{});
});
skyeye-web/src/main/webapp/tpl/rmtype/rmtypelist.html
0 → 100644
浏览文件 @
b4fb4265
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
/>
<title></title>
<link
href=
"../../assets/lib/layui/css/layui.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/font-awesome-4.7.0/css/font-awesome.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/winui/css/winui.css"
rel=
"stylesheet"
/>
</head>
<body>
<div
class=
"txtcenter"
style=
"width:700px;margin:0 auto;padding-top:20px;"
>
<form
class=
"layui-form layui-form-pane"
action=
""
autocomplete=
"off"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
分类名称
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"rmTypeName"
name=
"rmTypeName"
placeholder=
"请输入分类名称"
class=
"layui-input"
/>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
style=
"margin:0;"
>
<button
class=
"layui-btn"
lay-submit
lay-filter=
"formSearch"
>
搜索
</button>
</div>
</div>
</form>
</div>
<div
class=
"winui-toolbar"
>
<div
class=
"winui-tool"
>
<button
id=
"reloadTable"
class=
"winui-toolbtn"
><i
class=
"fa fa-refresh"
aria-hidden=
"true"
></i>
刷新数据
</button>
<button
id=
"addBean"
class=
"winui-toolbtn"
><i
class=
"fa fa-plus"
aria-hidden=
"true"
></i>
新增分类
</button>
</div>
</div>
<div
style=
"margin:auto 10px;"
>
<table
id=
"messageTable"
lay-filter=
"messageTable"
></table>
<script
type=
"text/html"
id=
"tableBar"
>
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
edit
"
>
编辑
<
/a
>
{{
#
if
(
d
.
groupNum
==
0
){
}}
<
a
class
=
"
layui-btn layui-btn-danger layui-btn-xs
"
lay
-
event
=
"
del
"
>
删除
<
/a
>
{{
#
}
}}
</script>
</div>
<script
src=
"../../assets/lib/layui/layui.js"
></script>
<script
src=
"../../assets/lib/layui/custom.js"
></script>
<script
type=
"text/javascript"
>
layui
.
config
({
base
:
'
../../js/rmtype/
'
}).
use
(
'
rmtypelist
'
);
</script>
</body>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录