Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
1789bfb1
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1432
Star
162
Fork
130
代码
文件
提交
分支
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看板
提交
1789bfb1
编写于
10月 25, 2018
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
小程序项目增删改查完成
上级
7a3d1def
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
755 addition
and
0 deletion
+755
-0
skyeye-dao/src/main/java/com/skyeye/smprogram/dao/SmProjectDao.java
.../src/main/java/com/skyeye/smprogram/dao/SmProjectDao.java
+28
-0
skyeye-service/src/main/java/com/skyeye/smprogram/service/SmProjectService.java
...n/java/com/skyeye/smprogram/service/SmProjectService.java
+18
-0
skyeye-service/src/main/java/com/skyeye/smprogram/service/impl/SmProjectServiceImpl.java
...m/skyeye/smprogram/service/impl/SmProjectServiceImpl.java
+144
-0
skyeye-web/src/main/java/com/skyeye/smprogram/controller/SmProjectController.java
.../com/skyeye/smprogram/controller/SmProjectController.java
+98
-0
skyeye-web/src/main/resources/dbmapper/SmProjectMapper.xml
skyeye-web/src/main/resources/dbmapper/SmProjectMapper.xml
+101
-0
skyeye-web/src/main/resources/mapping/reqmapping.xml
skyeye-web/src/main/resources/mapping/reqmapping.xml
+20
-0
skyeye-web/src/main/webapp/js/rmmysmpro/mysmproadd.js
skyeye-web/src/main/webapp/js/rmmysmpro/mysmproadd.js
+41
-0
skyeye-web/src/main/webapp/js/rmmysmpro/mysmproedit.js
skyeye-web/src/main/webapp/js/rmmysmpro/mysmproedit.js
+55
-0
skyeye-web/src/main/webapp/js/rmmysmpro/mysmprolist.js
skyeye-web/src/main/webapp/js/rmmysmpro/mysmprolist.js
+116
-0
skyeye-web/src/main/webapp/tpl/rmmysmpro/mysmproadd.html
skyeye-web/src/main/webapp/tpl/rmmysmpro/mysmproadd.html
+41
-0
skyeye-web/src/main/webapp/tpl/rmmysmpro/mysmproedit.html
skyeye-web/src/main/webapp/tpl/rmmysmpro/mysmproedit.html
+24
-0
skyeye-web/src/main/webapp/tpl/rmmysmpro/mysmproeditTemplate.tpl
...web/src/main/webapp/tpl/rmmysmpro/mysmproeditTemplate.tpl
+20
-0
skyeye-web/src/main/webapp/tpl/rmmysmpro/mysmprolist.html
skyeye-web/src/main/webapp/tpl/rmmysmpro/mysmprolist.html
+49
-0
未找到文件。
skyeye-dao/src/main/java/com/skyeye/smprogram/dao/SmProjectDao.java
0 → 100644
浏览文件 @
1789bfb1
package
com.skyeye.smprogram.dao
;
import
java.util.List
;
import
java.util.Map
;
import
com.github.miemiedev.mybatis.paginator.domain.PageBounds
;
public
interface
SmProjectDao
{
public
List
<
Map
<
String
,
Object
>>
querySmProjectList
(
Map
<
String
,
Object
>
map
,
PageBounds
pageBounds
)
throws
Exception
;
public
Map
<
String
,
Object
>
querySmProjectByNameAndUserId
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
int
insertSmProjectMation
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
Map
<
String
,
Object
>
querySmProjectPageNumById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
int
deleteSmProjectById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
Map
<
String
,
Object
>
querySmProjectMationToEditById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
Map
<
String
,
Object
>
querySmProjectMationByIdAndName
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
int
editSmProjectMationById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
Map
<
String
,
Object
>
querySmProjectPageModelNumById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/smprogram/service/SmProjectService.java
0 → 100644
浏览文件 @
1789bfb1
package
com.skyeye.smprogram.service
;
import
com.skyeye.common.object.InputObject
;
import
com.skyeye.common.object.OutputObject
;
public
interface
SmProjectService
{
public
void
querySmProjectList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
insertSmProjectMation
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
deleteSmProjectById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
querySmProjectMationToEditById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
editSmProjectMationById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/smprogram/service/impl/SmProjectServiceImpl.java
0 → 100644
浏览文件 @
1789bfb1
package
com.skyeye.smprogram.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.common.object.InputObject
;
import
com.skyeye.common.object.OutputObject
;
import
com.skyeye.common.util.ToolUtil
;
import
com.skyeye.smprogram.dao.SmProjectDao
;
import
com.skyeye.smprogram.service.SmProjectService
;
@Service
public
class
SmProjectServiceImpl
implements
SmProjectService
{
@Autowired
private
SmProjectDao
smProjectDao
;
/**
*
* @Title: querySmProjectList
* @Description: 获取小程序列表
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
querySmProjectList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
user
=
inputObject
.
getLogParams
();
map
.
put
(
"createId"
,
user
.
get
(
"id"
));
List
<
Map
<
String
,
Object
>>
beans
=
smProjectDao
.
querySmProjectList
(
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
);
}
/**
*
* @Title: insertSmProjectMation
* @Description: 新增小程序
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
insertSmProjectMation
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
user
=
inputObject
.
getLogParams
();
map
.
put
(
"createId"
,
user
.
get
(
"id"
));
Map
<
String
,
Object
>
bean
=
smProjectDao
.
querySmProjectByNameAndUserId
(
map
);
if
(
bean
==
null
){
map
.
put
(
"id"
,
ToolUtil
.
getSurFaceId
());
map
.
put
(
"createTime"
,
ToolUtil
.
getTimeAndToString
());
smProjectDao
.
insertSmProjectMation
(
map
);
}
else
{
outputObject
.
setreturnMessage
(
"该小程序名称已存在,请更换。"
);
}
}
/**
*
* @Title: deleteSmProjectById
* @Description: 删除小程序
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
deleteSmProjectById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
bean
=
smProjectDao
.
querySmProjectPageNumById
(
map
);
//获取小程序页面数量
Map
<
String
,
Object
>
item
=
smProjectDao
.
querySmProjectPageModelNumById
(
map
);
//获取小程序组件数量
if
(
bean
==
null
&&
item
==
null
){
Map
<
String
,
Object
>
user
=
inputObject
.
getLogParams
();
map
.
put
(
"createId"
,
user
.
get
(
"id"
));
smProjectDao
.
deleteSmProjectById
(
map
);
}
else
{
if
(
Integer
.
parseInt
(
bean
.
get
(
"pageNum"
).
toString
())
==
0
&&
Integer
.
parseInt
(
item
.
get
(
"modelNum"
).
toString
())
==
0
){
//该小程序没有页面和组件使用
Map
<
String
,
Object
>
user
=
inputObject
.
getLogParams
();
map
.
put
(
"createId"
,
user
.
get
(
"id"
));
smProjectDao
.
deleteSmProjectById
(
map
);
}
else
{
outputObject
.
setreturnMessage
(
"该小程序存在页面或组件,无法删除。"
);
}
}
}
/**
*
* @Title: querySmProjectMationToEditById
* @Description: 编辑小程序信息时进行回显
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
querySmProjectMationToEditById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
bean
=
smProjectDao
.
querySmProjectMationToEditById
(
map
);
outputObject
.
setBean
(
bean
);
outputObject
.
settotal
(
1
);
}
/**
*
* @Title: editSmProjectMationById
* @Description: 编辑小程序信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
editSmProjectMationById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
user
=
inputObject
.
getLogParams
();
map
.
put
(
"createId"
,
user
.
get
(
"id"
));
Map
<
String
,
Object
>
bean
=
smProjectDao
.
querySmProjectMationByIdAndName
(
map
);
if
(
bean
==
null
){
smProjectDao
.
editSmProjectMationById
(
map
);
}
else
{
outputObject
.
setreturnMessage
(
"该类型名称已存在,请更换。"
);
}
}
}
skyeye-web/src/main/java/com/skyeye/smprogram/controller/SmProjectController.java
0 → 100644
浏览文件 @
1789bfb1
package
com.skyeye.smprogram.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.common.object.InputObject
;
import
com.skyeye.common.object.OutputObject
;
import
com.skyeye.smprogram.service.SmProjectService
;
@Controller
public
class
SmProjectController
{
@Autowired
private
SmProjectService
smProjectService
;
/**
*
* @Title: querySmProjectList
* @Description: 获取小程序列表
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/SmProjectController/querySmProjectList"
)
@ResponseBody
public
void
querySmProjectList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
smProjectService
.
querySmProjectList
(
inputObject
,
outputObject
);
}
/**
*
* @Title: insertSmProjectMation
* @Description: 新增小程序
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/SmProjectController/insertSmProjectMation"
)
@ResponseBody
public
void
insertSmProjectMation
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
smProjectService
.
insertSmProjectMation
(
inputObject
,
outputObject
);
}
/**
*
* @Title: deleteSmProjectById
* @Description: 删除小程序
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/SmProjectController/deleteSmProjectById"
)
@ResponseBody
public
void
deleteSmProjectById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
smProjectService
.
deleteSmProjectById
(
inputObject
,
outputObject
);
}
/**
*
* @Title: querySmProjectMationToEditById
* @Description: 编辑小程序信息时进行回显
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/SmProjectController/querySmProjectMationToEditById"
)
@ResponseBody
public
void
querySmProjectMationToEditById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
smProjectService
.
querySmProjectMationToEditById
(
inputObject
,
outputObject
);
}
/**
*
* @Title: editSmProjectMationById
* @Description: 编辑小程序信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/SmProjectController/editSmProjectMationById"
)
@ResponseBody
public
void
editSmProjectMationById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
smProjectService
.
editSmProjectMationById
(
inputObject
,
outputObject
);
}
}
skyeye-web/src/main/resources/dbmapper/SmProjectMapper.xml
0 → 100644
浏览文件 @
1789bfb1
<?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.smprogram.dao.SmProjectDao"
>
<select
id=
"querySmProjectList"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.`name` proName,
a.`desc` proDesc,
(SELECT COUNT(*) FROM sm_project_page b WHERE b.sm_project_id = a.id) pageNum,
(SELECT COUNT(*) FROM sm_project_page c, sm_project_page_mode d WHERE c.sm_project_id = a.id AND d.sm_project_page_id = c.id) modelNum,
CONVERT(a.create_time, char) createTime
FROM
sm_project a
WHERE a.create_id = #{createId}
<if
test=
"proName != '' and proName != null"
>
AND a.name LIKE '%${proName}%'
</if>
ORDER BY a.create_time DESC
</select>
<select
id=
"querySmProjectByNameAndUserId"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.`name` proName
FROM
sm_project a
WHERE a.name = #{proName}
AND a.create_id = #{createId}
</select>
<insert
id=
"insertSmProjectMation"
parameterType=
"java.util.Map"
>
INSERT into sm_project
(id, `name`, create_id, create_time, `desc`)
VALUES
(#{id}, #{proName}, #{createId}, #{createTime}, #{proDesc})
</insert>
<select
id=
"querySmProjectPageNumById"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
COUNT(*) pageNum
FROM
sm_project_page b
WHERE
b.sm_project_id = #{id}
</select>
<select
id=
"querySmProjectPageModelNumById"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
COUNT(*) modelNum
FROM
sm_project_page b,
sm_project_page_mode c
WHERE
b.sm_project_id = #{id}
AND c.sm_project_page_id = b.id
</select>
<delete
id=
"deleteSmProjectById"
parameterType=
"java.util.Map"
>
DELETE
FROM
sm_project
WHERE
id = #{id}
AND create_id = #{createId}
</delete>
<select
id=
"querySmProjectMationToEditById"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.`name` proName,
a.`desc` proDesc
FROM
sm_project a
WHERE a.id = #{id}
</select>
<select
id=
"querySmProjectMationByIdAndName"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.`name` proName
FROM
sm_project a
WHERE a.id != #{id}
AND a.name = #{proName}
</select>
<update
id=
"editSmProjectMationById"
parameterType=
"java.util.Map"
>
UPDATE sm_project
<set>
<if
test=
"proName != '' and proName != null"
>
`name` = #{proName},
</if>
<if
test=
"proDesc != '' and proDesc != null"
>
`desc` = #{proDesc},
</if>
</set>
WHERE id = #{id}
</update>
</mapper>
\ No newline at end of file
skyeye-web/src/main/resources/mapping/reqmapping.xml
浏览文件 @
1789bfb1
...
@@ -250,6 +250,26 @@
...
@@ -250,6 +250,26 @@
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"小程序组件id"
/>
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"小程序组件id"
/>
<property
id=
"img"
name=
"img"
ref=
"required"
var=
"小程序组件图片"
/>
<property
id=
"img"
name=
"img"
ref=
"required"
var=
"小程序组件图片"
/>
</url>
</url>
<url
id=
"rmxcx022"
path=
"/post/SmProjectController/querySmProjectList"
val=
"获取小程序列表"
allUse=
"1"
>
<property
id=
"limit"
name=
"limit"
ref=
"required,num"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required,num"
var=
"分页参数,第几页"
/>
<property
id=
"proName"
name=
"proName"
ref=
""
var=
"小程序名称"
/>
</url>
<url
id=
"rmxcx023"
path=
"/post/SmProjectController/insertSmProjectMation"
val=
"新增小程序"
allUse=
"1"
>
<property
id=
"proDesc"
name=
"proDesc"
ref=
""
var=
"小程序简介"
/>
<property
id=
"proName"
name=
"proName"
ref=
"required"
var=
"小程序名称"
/>
</url>
<url
id=
"rmxcx024"
path=
"/post/SmProjectController/deleteSmProjectById"
val=
"删除小程序"
allUse=
"1"
>
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"小程序id"
/>
</url>
<url
id=
"rmxcx025"
path=
"/post/SmProjectController/querySmProjectMationToEditById"
val=
"编辑小程序信息时进行回显"
allUse=
"1"
>
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"小程序id"
/>
</url>
<url
id=
"rmxcx026"
path=
"/post/SmProjectController/editSmProjectMationById"
val=
"编辑小程序信息"
allUse=
"1"
>
<property
id=
"proDesc"
name=
"proDesc"
ref=
""
var=
"小程序简介"
/>
<property
id=
"proName"
name=
"proName"
ref=
"required"
var=
"小程序名称"
/>
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"小程序id"
/>
</url>
<!-- 小程序系列结束 -->
<!-- 小程序系列结束 -->
...
...
skyeye-web/src/main/webapp/js/rmmysmpro/mysmproadd.js
0 → 100644
浏览文件 @
1789bfb1
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
define
([
'
table
'
,
'
jquery
'
,
'
winui
'
],
function
(
exports
)
{
winui
.
renderColor
();
layui
.
use
([
'
form
'
],
function
(
form
)
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
//获取窗口索引
var
$
=
layui
.
$
,
form
=
layui
.
form
;
form
.
render
();
form
.
on
(
'
submit(formAddBean)
'
,
function
(
data
)
{
//表单验证
if
(
winui
.
verifyForm
(
data
.
elem
))
{
var
params
=
{
proName
:
$
(
"
#proName
"
).
val
(),
proDesc
:
$
(
"
#proDesc
"
).
val
(),
};
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
rmxcx023
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
return
false
;
});
//取消
$
(
"
body
"
).
on
(
"
click
"
,
"
#cancle
"
,
function
(){
parent
.
layer
.
close
(
index
);
});
});
});
\ No newline at end of file
skyeye-web/src/main/webapp/js/rmmysmpro/mysmproedit.js
0 → 100644
浏览文件 @
1789bfb1
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
define
([
'
table
'
,
'
jquery
'
,
'
winui
'
],
function
(
exports
)
{
winui
.
renderColor
();
layui
.
use
([
'
form
'
],
function
(
form
)
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
//获取窗口索引
var
$
=
layui
.
$
,
form
=
layui
.
form
;
showGrid
({
id
:
"
showForm
"
,
url
:
reqBasePath
+
"
rmxcx025
"
,
params
:
{
rowId
:
parent
.
rowId
},
pagination
:
false
,
template
:
getFileContent
(
'
tpl/rmmysmpro/mysmproeditTemplate.tpl
'
),
ajaxSendLoadBefore
:
function
(
hdb
){
},
ajaxSendAfter
:
function
(
json
){
form
.
render
();
form
.
on
(
'
submit(formEditBean)
'
,
function
(
data
)
{
//表单验证
if
(
winui
.
verifyForm
(
data
.
elem
))
{
var
params
=
{
proName
:
$
(
"
#proName
"
).
val
(),
proDesc
:
$
(
"
#proDesc
"
).
val
(),
rowId
:
parent
.
rowId
};
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
rmxcx026
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
return
false
;
});
}
});
//取消
$
(
"
body
"
).
on
(
"
click
"
,
"
#cancle
"
,
function
(){
parent
.
layer
.
close
(
index
);
});
});
});
\ No newline at end of file
skyeye-web/src/main/webapp/js/rmmysmpro/mysmprolist.js
0 → 100644
浏览文件 @
1789bfb1
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
+
'
rmxcx022
'
,
where
:{
proName
:
$
(
"
#proName
"
).
val
()},
even
:
true
,
//隔行变色
page
:
true
,
limits
:
[
8
,
16
,
24
,
32
,
40
,
48
,
56
],
limit
:
8
,
cols
:
[[
{
title
:
'
序号
'
,
type
:
'
numbers
'
},
{
field
:
'
proName
'
,
title
:
'
项目名称
'
,
width
:
120
},
{
field
:
'
proDesc
'
,
title
:
'
项目描述
'
,
width
:
520
},
{
field
:
'
pageNum
'
,
title
:
'
页面数量
'
,
width
:
120
},
{
field
:
'
modelNum
'
,
title
:
'
组件数量
'
,
width
:
120
},
{
field
:
'
createTime
'
,
title
:
'
创建时间
'
,
width
:
180
},
{
title
:
'
操作
'
,
fixed
:
'
right
'
,
align
:
'
center
'
,
width
:
240
,
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
.
proName
+
'
】吗?
'
:
'
确认删除选中数据吗?
'
;
layer
.
confirm
(
msg
,
{
icon
:
3
,
title
:
'
删除项目
'
},
function
(
index
)
{
layer
.
close
(
index
);
//向服务端发送删除指令
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
rmxcx024
"
,
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/rmmysmpro/mysmproedit.html
"
,
title
:
"
编辑项目
"
,
pageId
:
"
rmmysmproedit
"
,
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/rmmysmpro/mysmproadd.html
"
,
title
:
"
新增项目
"
,
pageId
:
"
rmmysmproadd
"
,
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
:{
proName
:
$
(
"
#proName
"
).
val
()}});
}
exports
(
'
rmtypelist
'
,
{});
});
skyeye-web/src/main/webapp/tpl/rmmysmpro/mysmproadd.html
0 → 100644
浏览文件 @
1789bfb1
<!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"
/>
<link
href=
"../../assets/lib/layui/lay/modules/ztree/css/zTreeStyle/zTreeStyle.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/layui/lay/modules/contextMenu/jquery.contextMenu.min.css"
rel=
"stylesheet"
/>
</head>
<body>
<div
style=
"width:600px;margin:0 auto;padding-top:20px;"
>
<form
class=
"layui-form"
action=
""
id=
"showForm"
autocomplete=
"off"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
项目名
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
id=
"proName"
name=
"proName"
win-verify=
"required"
placeholder=
"请输入项目名"
class=
"layui-input"
maxlength=
"20"
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
项目简介
</label>
<div
class=
"layui-input-block"
>
<textarea
id=
"proDesc"
name=
"proDesc"
placeholder=
"请输入项目简介"
class=
"layui-textarea"
style=
"height: 100px;"
></textarea>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<button
class=
"winui-btn"
id=
"cancle"
>
取消
</button>
<button
class=
"winui-btn"
lay-submit
lay-filter=
"formAddBean"
>
保存
</button>
</div>
</div>
</form>
</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/rmmysmpro/
'
}).
use
(
'
mysmproadd
'
);
</script>
</body>
</html>
\ No newline at end of file
skyeye-web/src/main/webapp/tpl/rmmysmpro/mysmproedit.html
0 → 100644
浏览文件 @
1789bfb1
<!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"
/>
<link
href=
"../../assets/lib/layui/lay/modules/ztree/css/zTreeStyle/zTreeStyle.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/layui/lay/modules/contextMenu/jquery.contextMenu.min.css"
rel=
"stylesheet"
/>
</head>
<body>
<div
style=
"width:600px;margin:0 auto;padding-top:20px;"
>
<form
class=
"layui-form"
action=
""
id=
"showForm"
autocomplete=
"off"
>
</form>
</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/rmmysmpro/
'
}).
use
(
'
mysmproedit
'
);
</script>
</body>
</html>
\ No newline at end of file
skyeye-web/src/main/webapp/tpl/rmmysmpro/mysmproeditTemplate.tpl
0 → 100644
浏览文件 @
1789bfb1
{{
#
bean
}}
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
项目名
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
id=
"proName"
name=
"proName"
win-verify=
"required"
placeholder=
"请输入项目名"
class=
"layui-input"
maxlength=
"20"
value=
"{
{
proName
}
}"
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
项目简介
</label>
<div
class=
"layui-input-block"
>
<textarea
id=
"proDesc"
name=
"proDesc"
placeholder=
"请输入项目简介"
class=
"layui-textarea"
style=
"height: 100px;"
>
{
{
proDesc
}
}
</textarea>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<button
class=
"winui-btn"
id=
"cancle"
>
取消
</button>
<button
class=
"winui-btn"
lay-submit
lay-filter=
"formEditBean"
>
保存
</button>
</div>
</div>
{
{/
bean
}
}
\ No newline at end of file
skyeye-web/src/main/webapp/tpl/rmmysmpro/mysmprolist.html
0 → 100644
浏览文件 @
1789bfb1
<!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=
"proName"
name=
"proName"
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
.
pageNum
==
0
&&
d
.
modelNum
==
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/rmmysmpro/
'
}).
use
(
'
mysmprolist
'
);
</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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录