Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
1c26b788
S
Skyeye
项目概览
doc_wei
/
Skyeye
通知
1175
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看板
提交
1c26b788
编写于
11月 05, 2018
作者:
doc_wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
动态表单内容项说明完成
上级
a7152c73
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
441 addition
and
3 deletion
+441
-3
skyeye-common/src/main/java/com/skyeye/common/constans/Constants.java
...n/src/main/java/com/skyeye/common/constans/Constants.java
+2
-1
skyeye-dao/src/main/java/com/skyeye/exexplain/dao/ExExplainToDsFormContentDao.java
...com/skyeye/exexplain/dao/ExExplainToDsFormContentDao.java
+13
-0
skyeye-service/src/main/java/com/skyeye/exexplain/service/ExExplainToDsFormContentService.java
...ye/exexplain/service/ExExplainToDsFormContentService.java
+16
-0
skyeye-service/src/main/java/com/skyeye/exexplain/service/impl/ExExplainToCodeModelServiceImpl.java
...explain/service/impl/ExExplainToCodeModelServiceImpl.java
+0
-2
skyeye-service/src/main/java/com/skyeye/exexplain/service/impl/ExExplainToDsFormContentServiceImpl.java
...ain/service/impl/ExExplainToDsFormContentServiceImpl.java
+125
-0
skyeye-web/src/main/java/com/skyeye/exexplain/controller/ExExplainToDsFormContentController.java
...xplain/controller/ExExplainToDsFormContentController.java
+81
-0
skyeye-web/src/main/resources/dbmapper/ExExplainToDsFormContentMapper.xml
...ain/resources/dbmapper/ExExplainToDsFormContentMapper.xml
+35
-0
skyeye-web/src/main/resources/mapping/reqmapping.xml
skyeye-web/src/main/resources/mapping/reqmapping.xml
+13
-0
skyeye-web/src/main/webapp/js/dsformcontent/dsformcontentadd.js
...-web/src/main/webapp/js/dsformcontent/dsformcontentadd.js
+17
-0
skyeye-web/src/main/webapp/js/dsformcontent/dsformcontentedit.js
...web/src/main/webapp/js/dsformcontent/dsformcontentedit.js
+17
-0
skyeye-web/src/main/webapp/js/exexplain/exexplaintodsformcontent.js
.../src/main/webapp/js/exexplain/exexplaintodsformcontent.js
+82
-0
skyeye-web/src/main/webapp/tpl/exexplain/exexplaintodsformcontent.html
...c/main/webapp/tpl/exexplain/exexplaintodsformcontent.html
+40
-0
未找到文件。
skyeye-common/src/main/java/com/skyeye/common/constans/Constants.java
浏览文件 @
1c26b788
...
@@ -87,7 +87,8 @@ public class Constants {
...
@@ -87,7 +87,8 @@ public class Constants {
/**
/**
* 保存模板说明的redis的key
* 保存模板说明的redis的key
*/
*/
public
static
final
String
REDIS_CODEMODEL_EXPLAIN_EXEXPLAINTOCODEMODEL
=
"exexplaintocodemodel"
;
public
static
final
String
REDIS_CODEMODEL_EXPLAIN_EXEXPLAINTOCODEMODEL
=
"exexplaintocodemodel"
;
//代码生成器模板规范说明key
public
static
final
String
REDIS_CODEMODEL_EXPLAIN_EXEXPLAINTODSFORMCONTENT
=
"exexplaintodsformcontent"
;
//动态表单内容项模板规范说明key
}
}
skyeye-dao/src/main/java/com/skyeye/exexplain/dao/ExExplainToDsFormContentDao.java
0 → 100644
浏览文件 @
1c26b788
package
com.skyeye.exexplain.dao
;
import
java.util.Map
;
public
interface
ExExplainToDsFormContentDao
{
public
int
insertExExplainToDsFormContentMation
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
Map
<
String
,
Object
>
queryExExplainToDsFormContentMation
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
int
editExExplainToDsFormContentMationById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/exexplain/service/ExExplainToDsFormContentService.java
0 → 100644
浏览文件 @
1c26b788
package
com.skyeye.exexplain.service
;
import
com.skyeye.common.object.InputObject
;
import
com.skyeye.common.object.OutputObject
;
public
interface
ExExplainToDsFormContentService
{
public
void
insertExExplainToDsFormContentMation
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
queryExExplainToDsFormContentMation
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
editExExplainToDsFormContentMationById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
queryExExplainToDsFormContentMationToShow
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/exexplain/service/impl/ExExplainToCodeModelServiceImpl.java
浏览文件 @
1c26b788
...
@@ -7,9 +7,7 @@ import org.springframework.stereotype.Service;
...
@@ -7,9 +7,7 @@ import org.springframework.stereotype.Service;
import
com.skyeye.exexplain.dao.ExExplainToCodeModelDao
;
import
com.skyeye.exexplain.dao.ExExplainToCodeModelDao
;
import
com.skyeye.exexplain.service.ExExplainToCodeModelService
;
import
com.skyeye.exexplain.service.ExExplainToCodeModelService
;
import
com.skyeye.jedis.JedisClient
;
import
com.skyeye.jedis.JedisClient
;
import
net.sf.json.JSONObject
;
import
net.sf.json.JSONObject
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.skyeye.common.constans.Constants
;
import
com.skyeye.common.constans.Constants
;
import
com.skyeye.common.object.InputObject
;
import
com.skyeye.common.object.InputObject
;
...
...
skyeye-service/src/main/java/com/skyeye/exexplain/service/impl/ExExplainToDsFormContentServiceImpl.java
0 → 100644
浏览文件 @
1c26b788
package
com.skyeye.exexplain.service.impl
;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.skyeye.exexplain.dao.ExExplainToDsFormContentDao
;
import
com.skyeye.exexplain.service.ExExplainToDsFormContentService
;
import
com.skyeye.jedis.JedisClient
;
import
net.sf.json.JSONObject
;
import
com.alibaba.fastjson.JSON
;
import
com.skyeye.common.constans.Constants
;
import
com.skyeye.common.object.InputObject
;
import
com.skyeye.common.object.OutputObject
;
import
com.skyeye.common.util.ToolUtil
;
@Service
public
class
ExExplainToDsFormContentServiceImpl
implements
ExExplainToDsFormContentService
{
@Autowired
private
ExExplainToDsFormContentDao
exExplainToDsFormContentDao
;
@Autowired
public
JedisClient
jedisClient
;
/**
*
* @Title: insertExExplainToDsFormContentMation
* @Description: 添加动态表单内容项说明信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
insertExExplainToDsFormContentMation
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
bean
=
exExplainToDsFormContentDao
.
queryExExplainToDsFormContentMation
(
map
);
if
(
bean
==
null
){
Map
<
String
,
Object
>
user
=
inputObject
.
getLogParams
();
String
id
=
ToolUtil
.
getSurFaceId
();
map
.
put
(
"id"
,
id
);
map
.
put
(
"createId"
,
user
.
get
(
"id"
));
map
.
put
(
"createTime"
,
ToolUtil
.
getTimeAndToString
());
exExplainToDsFormContentDao
.
insertExExplainToDsFormContentMation
(
map
);
jedisClient
.
del
(
Constants
.
REDIS_CODEMODEL_EXPLAIN_EXEXPLAINTODSFORMCONTENT
);
bean
=
new
HashMap
<>();
bean
.
put
(
"id"
,
id
);
outputObject
.
setBean
(
bean
);
}
else
{
outputObject
.
setreturnMessage
(
"该动态表单内容项说明已存在,不可进行二次保存"
);
}
}
/**
*
* @Title: queryExExplainToDsFormContentMation
* @Description: 编辑动态表单内容项说明信息时进行回显
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
queryExExplainToDsFormContentMation
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
bean
=
exExplainToDsFormContentDao
.
queryExExplainToDsFormContentMation
(
map
);
outputObject
.
setBean
(
bean
);
outputObject
.
settotal
(
1
);
}
/**
*
* @Title: editExExplainToDsFormContentMationById
* @Description: 编辑动态表单内容项说明信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
editExExplainToDsFormContentMationById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
bean
=
exExplainToDsFormContentDao
.
queryExExplainToDsFormContentMation
(
map
);
if
(
bean
==
null
){
outputObject
.
setreturnMessage
(
"该动态表单内容项说明不存在,不可进行编辑"
);
}
else
{
jedisClient
.
del
(
Constants
.
REDIS_CODEMODEL_EXPLAIN_EXEXPLAINTODSFORMCONTENT
);
exExplainToDsFormContentDao
.
editExExplainToDsFormContentMationById
(
map
);
}
}
/**
*
* @Title: queryExExplainToDsFormContentMationToShow
* @Description: 获取动态表单内容项说明信息供展示
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@SuppressWarnings
(
"unchecked"
)
@Override
public
void
queryExExplainToDsFormContentMationToShow
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
if
(
jedisClient
.
exists
(
Constants
.
REDIS_CODEMODEL_EXPLAIN_EXEXPLAINTODSFORMCONTENT
)){
map
=
JSONObject
.
fromObject
(
jedisClient
.
get
(
Constants
.
REDIS_CODEMODEL_EXPLAIN_EXEXPLAINTODSFORMCONTENT
));
}
else
{
Map
<
String
,
Object
>
bean
=
exExplainToDsFormContentDao
.
queryExExplainToDsFormContentMation
(
map
);
if
(
bean
==
null
){
map
.
put
(
"title"
,
"标题"
);
map
.
put
(
"content"
,
"等待发布说明。"
);
}
else
{
jedisClient
.
set
(
Constants
.
REDIS_CODEMODEL_EXPLAIN_EXEXPLAINTODSFORMCONTENT
,
JSON
.
toJSONString
(
bean
));
map
=
bean
;
}
}
outputObject
.
setBean
(
map
);
}
}
skyeye-web/src/main/java/com/skyeye/exexplain/controller/ExExplainToDsFormContentController.java
0 → 100644
浏览文件 @
1c26b788
package
com.skyeye.exexplain.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.exexplain.service.ExExplainToDsFormContentService
;
import
com.skyeye.common.object.InputObject
;
import
com.skyeye.common.object.OutputObject
;
@Controller
public
class
ExExplainToDsFormContentController
{
@Autowired
private
ExExplainToDsFormContentService
exExplainToDsFormContentService
;
/**
*
* @Title: insertExExplainToDsFormContentMation
* @Description: 添加动态表单内容项说明信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/ExExplainToDsFormContentController/insertExExplainToDsFormContentMation"
)
@ResponseBody
public
void
insertExExplainToDsFormContentMation
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
exExplainToDsFormContentService
.
insertExExplainToDsFormContentMation
(
inputObject
,
outputObject
);
}
/**
*
* @Title: queryExExplainToDsFormContentMation
* @Description: 编辑动态表单内容项说明信息时进行回显
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/ExExplainToDsFormContentController/queryExExplainToDsFormContentMation"
)
@ResponseBody
public
void
queryExExplainToDsFormContentMation
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
exExplainToDsFormContentService
.
queryExExplainToDsFormContentMation
(
inputObject
,
outputObject
);
}
/**
*
* @Title: editExExplainToDsFormContentMationById
* @Description: 编辑动态表单内容项说明信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/ExExplainToDsFormContentController/editExExplainToDsFormContentMationById"
)
@ResponseBody
public
void
editExExplainToDsFormContentMationById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
exExplainToDsFormContentService
.
editExExplainToDsFormContentMationById
(
inputObject
,
outputObject
);
}
/**
*
* @Title: queryExExplainToDsFormContentMationToShow
* @Description: 获取动态表单内容项说明信息供展示
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/ExExplainToDsFormContentController/queryExExplainToDsFormContentMationToShow"
)
@ResponseBody
public
void
queryExExplainToDsFormContentMationToShow
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
exExplainToDsFormContentService
.
queryExExplainToDsFormContentMationToShow
(
inputObject
,
outputObject
);
}
}
skyeye-web/src/main/resources/dbmapper/ExExplainToDsFormContentMapper.xml
0 → 100644
浏览文件 @
1c26b788
<?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.exexplain.dao.ExExplainToDsFormContentDao"
>
<select
id=
"queryExExplainToDsFormContentMation"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.title,
a.content
FROM
ex_explain_to_ds_form_content a
LIMIT 1
</select>
<insert
id=
"insertExExplainToDsFormContentMation"
parameterType=
"java.util.Map"
>
INSERT into ex_explain_to_ds_form_content
(id, title, content, create_id, create_time)
VALUES
(#{id}, #{title}, #{content}, #{createId}, #{createTime})
</insert>
<update
id=
"editExExplainToDsFormContentMationById"
parameterType=
"java.util.Map"
>
UPDATE ex_explain_to_ds_form_content
<set>
<if
test=
"title != '' and title != null"
>
title = #{title},
</if>
<if
test=
"content != '' and content != null"
>
content = #{content},
</if>
</set>
WHERE id = #{id}
</update>
</mapper>
\ No newline at end of file
skyeye-web/src/main/resources/mapping/reqmapping.xml
浏览文件 @
1c26b788
...
@@ -397,6 +397,19 @@
...
@@ -397,6 +397,19 @@
</url>
</url>
<url
id=
"exexplaintocodemodel004"
path=
"/post/ExExplainToCodeModelController/queryExExplainToCodeModelMationToShow"
val=
"获取代码生成器说明信息供展示"
allUse=
"1"
>
<url
id=
"exexplaintocodemodel004"
path=
"/post/ExExplainToCodeModelController/queryExExplainToCodeModelMationToShow"
val=
"获取代码生成器说明信息供展示"
allUse=
"1"
>
</url>
</url>
<url
id=
"exexplaintodsformcontent001"
path=
"/post/ExExplainToDsFormContentController/insertExExplainToDsFormContentMation"
val=
"添加动态表单内容项说明信息"
allUse=
"1"
>
<property
id=
"title"
name=
"title"
ref=
"required"
var=
"动态表单内容项说明标题"
/>
<property
id=
"content"
name=
"content"
ref=
"required"
var=
"动态表单内容项说明内容"
/>
</url>
<url
id=
"exexplaintodsformcontent002"
path=
"/post/ExExplainToDsFormContentController/queryExExplainToDsFormContentMation"
val=
"编辑动态表单内容项说明信息时进行回显"
allUse=
"1"
>
</url>
<url
id=
"exexplaintodsformcontent003"
path=
"/post/ExExplainToDsFormContentController/editExExplainToDsFormContentMationById"
val=
"编辑动态表单内容项说明信息"
allUse=
"1"
>
<property
id=
"title"
name=
"title"
ref=
"required"
var=
"动态表单内容项说明标题"
/>
<property
id=
"content"
name=
"content"
ref=
"required"
var=
"动态表单内容项说明内容"
/>
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"动态表单内容项说明id"
/>
</url>
<url
id=
"exexplaintodsformcontent004"
path=
"/post/ExExplainToDsFormContentController/queryExExplainToDsFormContentMationToShow"
val=
"获取动态表单内容项说明信息供展示"
allUse=
"1"
>
</url>
<!-- 系统各部分说明结束 -->
<!-- 系统各部分说明结束 -->
</controller>
</controller>
\ No newline at end of file
skyeye-web/src/main/webapp/js/dsformcontent/dsformcontentadd.js
浏览文件 @
1c26b788
...
@@ -10,6 +10,23 @@ layui.config({
...
@@ -10,6 +10,23 @@ layui.config({
var
$
=
layui
.
$
,
var
$
=
layui
.
$
,
form
=
layui
.
form
;
form
=
layui
.
form
;
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
exexplaintodsformcontent004
"
,
params
:{},
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
layer
.
open
({
type
:
1
,
closeBtn
:
0
,
//关闭按钮
resize
:
false
,
//是否允许拉伸
offset
:
'
l
'
,
// 具体配置参考:offset参数项
content
:
json
.
bean
.
content
,
area
:
[
'
200px
'
,
'
400px
'
],
shade
:
0
,
//不显示遮罩
title
:
json
.
bean
.
title
});
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
var
htmlEditor
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
"
htmlContent
"
),
{
var
htmlEditor
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
"
htmlContent
"
),
{
mode
:
"
xml
"
,
// 模式
mode
:
"
xml
"
,
// 模式
theme
:
"
eclipse
"
,
// CSS样式选择
theme
:
"
eclipse
"
,
// CSS样式选择
...
...
skyeye-web/src/main/webapp/js/dsformcontent/dsformcontentedit.js
浏览文件 @
1c26b788
...
@@ -11,6 +11,23 @@ layui.config({
...
@@ -11,6 +11,23 @@ layui.config({
form
=
layui
.
form
;
form
=
layui
.
form
;
var
htmlEditor
,
jsEditor
;
var
htmlEditor
,
jsEditor
;
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
exexplaintodsformcontent004
"
,
params
:{},
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
layer
.
open
({
type
:
1
,
closeBtn
:
0
,
//关闭按钮
resize
:
false
,
//是否允许拉伸
offset
:
'
l
'
,
// 具体配置参考:offset参数项
content
:
json
.
bean
.
content
,
area
:
[
'
200px
'
,
'
400px
'
],
shade
:
0
,
//不显示遮罩
title
:
json
.
bean
.
title
});
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
showGrid
({
showGrid
({
id
:
"
showForm
"
,
id
:
"
showForm
"
,
url
:
reqBasePath
+
"
dsform004
"
,
url
:
reqBasePath
+
"
dsform004
"
,
...
...
skyeye-web/src/main/webapp/js/exexplain/exexplaintodsformcontent.js
0 → 100644
浏览文件 @
1c26b788
var
rowId
=
""
;
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
define
([
'
table
'
,
'
jquery
'
,
'
winui
'
],
function
(
exports
)
{
winui
.
renderColor
();
layui
.
use
([
'
form
'
,
'
layedit
'
],
function
(
form
)
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
//获取窗口索引
var
$
=
layui
.
$
,
form
=
layui
.
form
,
layedit
=
layui
.
layedit
;
var
layContent
;
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
exexplaintodsformcontent002
"
,
params
:{},
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
if
(
!
isNull
(
json
.
bean
)){
rowId
=
json
.
bean
.
id
;
$
(
"
#title
"
).
val
(
json
.
bean
.
title
);
$
(
"
#content
"
).
val
(
json
.
bean
.
content
);
}
layContent
=
layedit
.
build
(
'
content
'
,
{
tool
:
[
'
strong
'
//加粗
,
'
italic
'
//斜体
,
'
underline
'
//下划线
,
'
del
'
//删除线
,
'
|
'
//分割线
,
'
left
'
//左对齐
,
'
center
'
//居中对齐
,
'
right
'
//右对齐
,
'
link
'
//超链接
,
'
unlink
'
//清除链接
,
'
face
'
//表情
]
});
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
form
.
render
();
form
.
on
(
'
submit(formAddBean)
'
,
function
(
data
)
{
//表单验证
if
(
winui
.
verifyForm
(
data
.
elem
))
{
if
(
isNull
(
layedit
.
getContent
(
layContent
))){
top
.
winui
.
window
.
msg
(
'
请输入内容。
'
,
{
icon
:
2
,
time
:
2000
});
}
else
{
var
params
=
{
title
:
$
(
"
#title
"
).
val
(),
content
:
encodeURI
(
layedit
.
getContent
(
layContent
)),
};
if
(
isNull
(
rowId
)){
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
exexplaintodsformcontent001
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
rowId
=
json
.
bean
.
id
;
top
.
winui
.
window
.
msg
(
'
保存成功
'
,
{
icon
:
1
,
time
:
2000
});
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
else
{
params
.
rowId
=
rowId
;
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
exexplaintodsformcontent003
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
top
.
winui
.
window
.
msg
(
'
保存成功
'
,
{
icon
:
1
,
time
:
2000
});
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
}
}
return
false
;
});
});
});
\ No newline at end of file
skyeye-web/src/main/webapp/tpl/exexplain/exexplaintodsformcontent.html
0 → 100644
浏览文件 @
1c26b788
<!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=
"title"
name=
"title"
win-verify=
"required"
placeholder=
"请输入标题"
class=
"layui-input"
maxlength=
"50"
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
内容
</label>
<div
class=
"layui-input-block"
>
<textarea
id=
"content"
name=
"content"
style=
"display: none;"
></textarea>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<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/exexplain/
'
}).
use
(
'
exexplaintodsformcontent
'
);
</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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录