Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
8021a2a9
S
Skyeye
项目概览
doc_wei
/
Skyeye
通知
1174
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看板
提交
8021a2a9
编写于
11月 09, 2018
作者:
doc_wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
小程序页面上下移
上级
35b073aa
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
177 addition
and
6 deletion
+177
-6
skyeye-dao/src/main/java/com/skyeye/smprogram/dao/SmProjectPageDao.java
.../main/java/com/skyeye/smprogram/dao/SmProjectPageDao.java
+8
-0
skyeye-service/src/main/java/com/skyeye/smprogram/service/SmProjectPageService.java
...va/com/skyeye/smprogram/service/SmProjectPageService.java
+4
-0
skyeye-service/src/main/java/com/skyeye/smprogram/service/impl/SmProjectPageServiceImpl.java
...yeye/smprogram/service/impl/SmProjectPageServiceImpl.java
+48
-0
skyeye-web/src/main/java/com/skyeye/smprogram/controller/SmProjectPageController.java
.../skyeye/smprogram/controller/SmProjectPageController.java
+32
-0
skyeye-web/src/main/resources/dbmapper/SmProjectPageMapper.xml
...e-web/src/main/resources/dbmapper/SmProjectPageMapper.xml
+51
-0
skyeye-web/src/main/resources/mapping/reqmapping.xml
skyeye-web/src/main/resources/mapping/reqmapping.xml
+8
-0
skyeye-web/src/main/webapp/assets/lib/layui/custom.js
skyeye-web/src/main/webapp/assets/lib/layui/custom.js
+2
-2
skyeye-web/src/main/webapp/js/rmmysmpropage/mysmpropagelist.js
...e-web/src/main/webapp/js/rmmysmpropage/mysmpropagelist.js
+22
-2
skyeye-web/src/main/webapp/tpl/rmmysmpropage/pageTemplate.tpl
...ye-web/src/main/webapp/tpl/rmmysmpropage/pageTemplate.tpl
+2
-2
未找到文件。
skyeye-dao/src/main/java/com/skyeye/smprogram/dao/SmProjectPageDao.java
浏览文件 @
8021a2a9
...
...
@@ -15,4 +15,12 @@ public interface SmProjectPageDao {
public
int
insertProPageMationByProId
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
Map
<
String
,
Object
>
querySmProjectPageISTopByThisId
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
void
editSmProjectPageSortTopById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
Map
<
String
,
Object
>
querySmProjectPageISLowerByThisId
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
void
editSmProjectPageSortLowerById
(
Map
<
String
,
Object
>
topBean
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/smprogram/service/SmProjectPageService.java
浏览文件 @
8021a2a9
...
...
@@ -9,4 +9,8 @@ public interface SmProjectPageService {
public
void
insertProPageMationByProId
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
editSmProjectPageSortTopById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
editSmProjectPageSortLowerById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/smprogram/service/impl/SmProjectPageServiceImpl.java
浏览文件 @
8021a2a9
...
...
@@ -104,6 +104,54 @@ public class SmProjectPageServiceImpl implements SmProjectPageService{
smProjectPageDao
.
insertProPageMationByProId
(
map
);
}
/**
*
* @Title: editSmProjectPageSortTopById
* @Description: 小程序页面展示顺序上移
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
editSmProjectPageSortTopById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
topBean
=
smProjectPageDao
.
querySmProjectPageISTopByThisId
(
map
);
//根据排序获取这条数据的上一条数据
if
(
topBean
==
null
){
outputObject
.
setreturnMessage
(
"已经是最靠前页面,无法移动。"
);
}
else
{
map
.
put
(
"sort"
,
topBean
.
get
(
"sort"
));
topBean
.
put
(
"sort"
,
topBean
.
get
(
"thisSort"
));
smProjectPageDao
.
editSmProjectPageSortTopById
(
map
);
smProjectPageDao
.
editSmProjectPageSortTopById
(
topBean
);
}
}
/**
*
* @Title: editSmProjectPageSortLowerById
* @Description: 小程序页面展示顺序下移
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
editSmProjectPageSortLowerById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
topBean
=
smProjectPageDao
.
querySmProjectPageISLowerByThisId
(
map
);
//根据排序获取这条数据的上一条数据
if
(
topBean
==
null
){
outputObject
.
setreturnMessage
(
"已经是最靠后页面,无法移动。"
);
}
else
{
map
.
put
(
"sort"
,
topBean
.
get
(
"sort"
));
topBean
.
put
(
"sort"
,
topBean
.
get
(
"thisSort"
));
smProjectPageDao
.
editSmProjectPageSortLowerById
(
map
);
smProjectPageDao
.
editSmProjectPageSortLowerById
(
topBean
);
}
}
}
skyeye-web/src/main/java/com/skyeye/smprogram/controller/SmProjectPageController.java
浏览文件 @
8021a2a9
...
...
@@ -47,5 +47,37 @@ public class SmProjectPageController {
smProjectPageService
.
insertProPageMationByProId
(
inputObject
,
outputObject
);
}
/**
*
* @Title: editSmProjectPageSortTopById
* @Description: 小程序页面展示顺序上移
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/SmProjectPageController/editSmProjectPageSortTopById"
)
@ResponseBody
public
void
editSmProjectPageSortTopById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
smProjectPageService
.
editSmProjectPageSortTopById
(
inputObject
,
outputObject
);
}
/**
*
* @Title: editSmProjectPageSortLowerById
* @Description: 小程序页面展示顺序下移
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/SmProjectPageController/editSmProjectPageSortLowerById"
)
@ResponseBody
public
void
editSmProjectPageSortLowerById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
smProjectPageService
.
editSmProjectPageSortLowerById
(
inputObject
,
outputObject
);
}
}
skyeye-web/src/main/resources/dbmapper/SmProjectPageMapper.xml
浏览文件 @
8021a2a9
...
...
@@ -54,4 +54,55 @@
(#{id}, #{name}, #{filePath}, #{fileName}, #{defaultFilePath}, #{defaultFileName}, #{defaultFilePathNum}, #{defaultFileNameNum}, #{proId}, #{sort}, #{createId}, #{createTime})
</insert>
<select
id=
"querySmProjectPageISTopByThisId"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.sort sort,
b.sort thisSort
FROM
sm_project_page a,
sm_project_page b
WHERE
b.sm_project_id = #{proId}
AND b.id = #{id}
AND a.sort > b.sort
ORDER BY
a.sort ASC
LIMIT 1
</select>
<update
id=
"editSmProjectPageSortTopById"
parameterType=
"java.util.Map"
>
UPDATE sm_project_page
<set>
sort = #{sort},
</set>
WHERE id = #{id}
</update>
<select
id=
"querySmProjectPageISLowerByThisId"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.sort sort,
b.sort thisSort
FROM
sm_project_page a,
sm_project_page b
WHERE
b.sm_project_id = #{proId}
AND b.id = #{id}
AND b.sort > a.sort
ORDER BY
a.sort DESC
LIMIT 1
</select>
<update
id=
"editSmProjectPageSortLowerById"
parameterType=
"java.util.Map"
>
UPDATE sm_project_page
<set>
sort = #{sort},
</set>
WHERE id = #{id}
</update>
</mapper>
\ No newline at end of file
skyeye-web/src/main/resources/mapping/reqmapping.xml
浏览文件 @
8021a2a9
...
...
@@ -299,6 +299,14 @@
<property
id=
"filePath"
name=
"filePath"
ref=
""
var=
"文件将来的导出路径"
/>
<property
id=
"fileName"
name=
"fileName"
ref=
""
var=
"文件将来的导出名"
/>
</url>
<url
id=
"rmxcx031"
path=
"/post/SmProjectPageController/editSmProjectPageSortTopById"
val=
"小程序页面展示顺序上移"
allUse=
"1"
>
<property
id=
"proId"
name=
"proId"
ref=
"required"
var=
"小程序项目id"
/>
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"页面id"
/>
</url>
<url
id=
"rmxcx032"
path=
"/post/SmProjectPageController/editSmProjectPageSortLowerById"
val=
"小程序页面展示顺序下移"
allUse=
"1"
>
<property
id=
"proId"
name=
"proId"
ref=
"required"
var=
"小程序项目id"
/>
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"页面id"
/>
</url>
<!-- 小程序系列结束 -->
...
...
skyeye-web/src/main/webapp/assets/lib/layui/custom.js
浏览文件 @
8021a2a9
...
...
@@ -196,10 +196,10 @@ dataGrid.prototype = {
}
layui
.
$
(
"
#
"
+
this
.
_id
+
""
).
empty
().
html
(
myTemplate
(
json
));
this
.
registermousehover
();
this
.
customClickPage
(
json
);
if
(
typeof
(
_op
.
settings
.
ajaxSendAfter
)
==
"
function
"
)
{
_op
.
settings
.
ajaxSendAfter
(
json
);
}
this
.
customClickPage
(
json
);
},
//循环添加行
createBody
:
function
(
pn
)
{
...
...
@@ -233,10 +233,10 @@ dataGrid.prototype = {
}
layui
.
$
(
"
#
"
+
_op
.
settings
.
id
+
"
showBody
"
).
empty
().
html
(
myTemplate
(
json
));
this
.
registermousehover
();
this
.
customClickPage
(
json
);
if
(
typeof
(
_op
.
settings
.
ajaxSendAfter
)
==
"
function
"
)
{
_op
.
settings
.
ajaxSendAfter
(
json
);
}
this
.
customClickPage
(
json
);
},
//初始化分页
createFoot
:
function
()
{
...
...
skyeye-web/src/main/webapp/js/rmmysmpropage/mysmpropagelist.js
浏览文件 @
8021a2a9
...
...
@@ -29,10 +29,30 @@ layui.config({
},
'
click .toUp
'
:
function
(
index
,
row
){
//上移
var
params
=
{
proId
:
proId
,
rowId
:
row
.
id
,
};
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
rmxcx031
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
refreshGrid
(
"
pageList
"
,
{
params
:{
rowId
:
parent
.
rowId
}});
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
},
'
click .toDown
'
:
function
(
index
,
row
){
//下移
var
params
=
{
proId
:
proId
,
rowId
:
row
.
id
,
};
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
rmxcx032
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
refreshGrid
(
"
pageList
"
,
{
params
:{
rowId
:
parent
.
rowId
}});
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
},
'
click .copyPage
'
:
function
(
index
,
row
){
//复制
...
...
skyeye-web/src/main/webapp/tpl/rmmysmpropage/pageTemplate.tpl
浏览文件 @
8021a2a9
{{
#
each
rows
}}
<li
class=
"page-li"
>
<div
class=
"weui-flex
js_category
layui-col-xs6"
>
<div
class=
"weui-flex layui-col-xs6"
>
<span
class=
"weui-flex__item"
>
{
{
name
}
}
</span>
</div>
<div
class=
"weui-flex
js_category
layui-col-xs6 right"
>
<div
class=
"weui-flex layui-col-xs6 right"
>
<button
class=
"layui-btn layui-btn-xs tab-btn-mar-left-3 reName"
title=
"重命名页面"
><i
class=
"fa fa-pencil-square-o"
></i></button>
<button
class=
"layui-btn layui-btn-xs tab-btn-mar-left-3 toUp"
title=
"上移页面"
><i
class=
"fa fa-arrow-up"
></i></button>
<button
class=
"layui-btn layui-btn-xs tab-btn-mar-left-3 toDown"
title=
"下移页面"
><i
class=
"fa fa-arrow-down"
></i></button>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录