Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
068ed0757e
@ -156,7 +156,7 @@ public interface IPicturesTemplateAreaService {
|
||||
|
||||
SuccessResult updatePicturesTemplateAreaPoint(String picturesTemplateAreaId, PicturesTemplateAreaPiointVO picturesTemplateAreaPiointVO) throws Exception;
|
||||
|
||||
SuccessResult copyPicturesTemplateAreaPoint(String picturesTemplateAreaId) throws Exception;
|
||||
SuccessResult copyPicturesTemplateAreaPoint(String picturesTemplateAreaId, String templateAreaSource) throws Exception;
|
||||
|
||||
SuccessResult updatePicturesTemplateAreaPointModuleData(String picturesTemplateAreaId, String templateAreaModuleData) throws Exception;
|
||||
}
|
@ -56,10 +56,10 @@ public class PicturesTemplateAreaController extends DefaultBaseController {
|
||||
@ApiImplicitParam(name = "showTemplateAreaId", value = "大数据模块区域ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("copypicturestemplatearea/{picturesTemplateAreaId}")
|
||||
@PutMapping("copypicturestemplatearea/{picturesTemplateAreaId}/{templateAreaSource}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult copyPicturesTemplateAreaPoint(@PathVariable("picturesTemplateAreaId") String picturesTemplateAreaId) throws Exception {
|
||||
return picturesTemplateAreaService.copyPicturesTemplateAreaPoint(picturesTemplateAreaId);
|
||||
public SuccessResult copyPicturesTemplateAreaPoint(@PathVariable("picturesTemplateAreaId") String picturesTemplateAreaId, @PathVariable("templateAreaSource") String templateAreaSource) throws Exception {
|
||||
return picturesTemplateAreaService.copyPicturesTemplateAreaPoint(picturesTemplateAreaId, templateAreaSource);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改大数据模块区域", notes = "修改大数据模块区域接口")
|
||||
|
@ -92,7 +92,9 @@ public class PicturesTemplateAreaServiceImpl extends DefaultBaseService implemen
|
||||
picturesTemplateAreaVO.setTemplateAreaTop(10.0);
|
||||
picturesTemplateAreaVO.setTemplateAreaHeight(300.0);
|
||||
picturesTemplateAreaVO.setTemplateAreaWidth(300.0);
|
||||
|
||||
/**
|
||||
* 判断字段标识, 相同模板不能出现同样的字段标识
|
||||
*/
|
||||
Map<String, Object> params = HashMapUtil.beanToMap(picturesTemplateAreaVO);
|
||||
params.put("picturesTemplateAreaId", picturesTemplateAreaId);
|
||||
if (StringUtils.isBlank(token)) {
|
||||
@ -100,6 +102,42 @@ public class PicturesTemplateAreaServiceImpl extends DefaultBaseService implemen
|
||||
} else {
|
||||
setAppSaveInfo(token, params);
|
||||
}
|
||||
if (StringUtils.isEmpty(picturesTemplateAreaVO.getTemplateAreaSource())) {
|
||||
throw new SaveException("标识不能为空");
|
||||
}
|
||||
picturesTemplateAreaVO.setTemplateAreaSource(picturesTemplateAreaVO.getTemplateAreaSource().trim());
|
||||
char[] c = picturesTemplateAreaVO.getTemplateAreaSource().toCharArray();
|
||||
for(int i = 0; i < c.length; i ++) {
|
||||
String len = Integer.toBinaryString(c[i]);
|
||||
if(len.length() > 8) {
|
||||
throw new SaveException("标识中不能含有中文");
|
||||
}
|
||||
}
|
||||
if(!Character.isLowerCase(c[0])) {
|
||||
throw new SaveException("首字母需要小写");
|
||||
}
|
||||
if("1".equals(picturesTemplateAreaVO.getTemplateAreaServerLink())) {
|
||||
if(StringUtils.isEmpty(picturesTemplateAreaVO.getTemplateAreaFontValue())) {
|
||||
throw new SaveException("示例文字不能为空");
|
||||
}
|
||||
if(StringUtils.isEmpty(picturesTemplateAreaVO.getTemplateAreaFontSize())) {
|
||||
throw new SaveException("字体大小不能为空");
|
||||
}
|
||||
if(!StringUtils.isNumeric(picturesTemplateAreaVO.getTemplateAreaFontSize())) {
|
||||
throw new SaveException("字体大小输入不合法");
|
||||
}
|
||||
Integer size = Integer.valueOf(picturesTemplateAreaVO.getTemplateAreaFontSize());
|
||||
if(size > 100 || size < 1) {
|
||||
throw new SaveException("字体大小范围为1-100");
|
||||
}
|
||||
}
|
||||
Map<String, Object> query = new HashMap<String, Object>();
|
||||
query.put("picturesTemplateId", picturesTemplateAreaVO.getPicturesTemplateId() );
|
||||
query.put("templateAreaSource", picturesTemplateAreaVO.getTemplateAreaSource());
|
||||
List<PicturesTemplateAreaDTO> dto = picturesTemplateAreaDao.getPicturesTemplateAreaByPicturesTemplateId(query);
|
||||
if(dto != null && dto.size() > 0) {
|
||||
throw new SaveException("当前标识已存在");
|
||||
}
|
||||
picturesTemplateAreaDao.savePicturesTemplateArea(params);
|
||||
return picturesTemplateAreaId;
|
||||
}
|
||||
@ -167,6 +205,48 @@ public class PicturesTemplateAreaServiceImpl extends DefaultBaseService implemen
|
||||
} else {
|
||||
setAppUpdateInfo(token, params);
|
||||
}
|
||||
if (StringUtils.isEmpty(picturesTemplateAreaVO.getTemplateAreaSource())) {
|
||||
throw new SaveException("标识不能为空");
|
||||
}
|
||||
picturesTemplateAreaVO.setTemplateAreaSource(picturesTemplateAreaVO.getTemplateAreaSource().trim());
|
||||
char[] c = picturesTemplateAreaVO.getTemplateAreaSource().toCharArray();
|
||||
for(int i = 0; i < c.length; i ++) {
|
||||
String len = Integer.toBinaryString(c[i]);
|
||||
if(len.length() > 8) {
|
||||
throw new SaveException("标识中不能含有中文");
|
||||
}
|
||||
}
|
||||
if(!Character.isLowerCase(c[0])) {
|
||||
throw new SaveException("首字母需要小写");
|
||||
}
|
||||
if("1".equals(picturesTemplateAreaVO.getTemplateAreaServerLink())) {
|
||||
if(StringUtils.isEmpty(picturesTemplateAreaVO.getTemplateAreaFontValue())) {
|
||||
throw new SaveException("示例文字不能为空");
|
||||
}
|
||||
if(StringUtils.isEmpty(picturesTemplateAreaVO.getTemplateAreaFontSize())) {
|
||||
throw new SaveException("字体大小不能为空");
|
||||
}
|
||||
if(!StringUtils.isNumeric(picturesTemplateAreaVO.getTemplateAreaFontSize())) {
|
||||
throw new SaveException("字体大小输入不合法");
|
||||
}
|
||||
Integer size = Integer.valueOf(picturesTemplateAreaVO.getTemplateAreaFontSize());
|
||||
if(size > 100 || size < 1) {
|
||||
throw new SaveException("字体大小范围为1-100");
|
||||
}
|
||||
}
|
||||
Map<String, Object> query = new HashMap<String, Object>();
|
||||
query.put("picturesTemplateId", picturesTemplateAreaVO.getPicturesTemplateId() );
|
||||
query.put("templateAreaSource", picturesTemplateAreaVO.getTemplateAreaSource());
|
||||
List<PicturesTemplateAreaDTO> dto = picturesTemplateAreaDao.getPicturesTemplateAreaByPicturesTemplateId(query);
|
||||
if(dto != null && dto.size() > 0) {
|
||||
if(dto.size() == 1) {
|
||||
if(!dto.get(0).getPicturesTemplateAreaId().equals(picturesTemplateAreaId)) {
|
||||
throw new SaveException("当前标识已存在");
|
||||
}
|
||||
}else{
|
||||
throw new SaveException("当前标识已存在");
|
||||
}
|
||||
}
|
||||
picturesTemplateAreaDao.updatePicturesTemplateArea(params);
|
||||
}
|
||||
|
||||
@ -225,11 +305,33 @@ public class PicturesTemplateAreaServiceImpl extends DefaultBaseService implemen
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResult copyPicturesTemplateAreaPoint(String picturesTemplateAreaId) throws Exception {
|
||||
public SuccessResult copyPicturesTemplateAreaPoint(String picturesTemplateAreaId, String templateAreaSource) throws Exception {
|
||||
PicturesTemplateAreaDTO dto = getPicturesTemplateAreaById(picturesTemplateAreaId);
|
||||
if(dto == null) {
|
||||
throw new UpdateException("需要复制的区域不存在");
|
||||
}
|
||||
|
||||
if (StringUtils.isEmpty(templateAreaSource)) {
|
||||
throw new SaveException("标识不能为空");
|
||||
}
|
||||
templateAreaSource = templateAreaSource.trim();
|
||||
char[] c = templateAreaSource.toCharArray();
|
||||
for(int i = 0; i < c.length; i ++) {
|
||||
String len = Integer.toBinaryString(c[i]);
|
||||
if(len.length() > 8) {
|
||||
throw new SaveException("标识中不能含有中文");
|
||||
}
|
||||
}
|
||||
if(!Character.isLowerCase(c[0])) {
|
||||
throw new SaveException("首字母需要小写");
|
||||
}
|
||||
Map<String, Object> query = new HashMap<String, Object>();
|
||||
query.put("picturesTemplateId", dto.getPicturesTemplateId() );
|
||||
query.put("templateAreaSource", templateAreaSource);
|
||||
List<PicturesTemplateAreaDTO> dtoList = picturesTemplateAreaDao.getPicturesTemplateAreaByPicturesTemplateId(query);
|
||||
if(dto != null && dtoList.size() > 0) {
|
||||
throw new SaveException("当前标识已存在");
|
||||
}
|
||||
String newPicturesTemplateAreaId = UUIDUtil.getUUID();
|
||||
dto.setTemplateAreaLeft(10.0);
|
||||
dto.setTemplateAreaDown(0.0);
|
||||
@ -237,6 +339,7 @@ public class PicturesTemplateAreaServiceImpl extends DefaultBaseService implemen
|
||||
dto.setTemplateAreaTop(10.0);
|
||||
dto.setTemplateAreaHeight(300.0);
|
||||
dto.setTemplateAreaWidth(300.0);
|
||||
dto.setTemplateAreaSource(templateAreaSource);
|
||||
dto.setPicturesTemplateAreaId(newPicturesTemplateAreaId);
|
||||
Map<String, Object> params = HashMapUtil.beanToMap(dto);
|
||||
setSaveInfo(params);
|
||||
|
@ -5,7 +5,6 @@
|
||||
<resultMap id="picturesTemplateAreaDTO" type="cn.com.tenlion.buildingpictures.pojo.dtos.picturestemplatearea.PicturesTemplateAreaDTO">
|
||||
<id column="pictures_template_area_id" property="picturesTemplateAreaId"/>
|
||||
<result column="pictures_template_id" property="picturesTemplateId"/>
|
||||
<result column="template_area_module_data" property="templateAreaModuleData"/>
|
||||
<result column="template_area_source" property="templateAreaSource"/>
|
||||
<result column="template_area_left" property="templateAreaLeft"/>
|
||||
<result column="template_area_top" property="templateAreaTop"/>
|
||||
@ -20,6 +19,12 @@
|
||||
<result column="template_area_file" property="templateAreaFile"/>
|
||||
<result column="template_area_server_link" property="templateAreaServerLink"/>
|
||||
<result column="pictures_template_code" property="picturesTemplateCode"/>
|
||||
<result column="template_area_font_center" property="templateAreaFontCenter"/>
|
||||
<result column="template_area_font_size" property="templateAreaFontSize"/>
|
||||
<result column="template_area_font_bold" property="templateAreaFontBold"/>
|
||||
<result column="template_area_font_family" property="templateAreaFontFamily"/>
|
||||
<result column="template_area_font_color" property="templateAreaFontColor"/>
|
||||
<result column="template_area_font_value" property="templateAreaFontValue"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 修改展览模板区域配置 -->
|
||||
@ -56,7 +61,6 @@
|
||||
SELECT
|
||||
t1.pictures_template_area_id,
|
||||
t1.pictures_template_id,
|
||||
t1.template_area_module_data,
|
||||
t1.template_area_source,
|
||||
t1.template_area_color,
|
||||
t1.template_area_remark,
|
||||
@ -68,7 +72,13 @@
|
||||
t1.template_area_height,
|
||||
t1.template_area_width,
|
||||
t1.template_area_file,
|
||||
t1.template_area_server_link
|
||||
t1.template_area_server_link,
|
||||
t1.template_area_font_center,
|
||||
t1.template_area_font_size,
|
||||
t1.template_area_font_bold,
|
||||
t1.template_area_font_family,
|
||||
t1.template_area_font_color,
|
||||
t1.template_area_font_value
|
||||
FROM
|
||||
pictures_template_area t1
|
||||
WHERE
|
||||
@ -77,6 +87,10 @@
|
||||
AND
|
||||
t1.pictures_template_id = #{picturesTemplateId}
|
||||
</if>
|
||||
<if test="templateAreaSource != null and templateAreaSource != ''">
|
||||
AND
|
||||
t1.template_area_source = #{templateAreaSource}
|
||||
</if>
|
||||
ORDER BY t1.gmt_create
|
||||
</select>
|
||||
|
||||
@ -85,7 +99,6 @@
|
||||
INSERT INTO pictures_template_area(
|
||||
pictures_template_area_id,
|
||||
pictures_template_id,
|
||||
template_area_module_data,
|
||||
template_area_source,
|
||||
template_area_left,
|
||||
template_area_top,
|
||||
@ -98,6 +111,12 @@
|
||||
template_area_status,
|
||||
template_area_file,
|
||||
template_area_server_link,
|
||||
template_area_font_center,
|
||||
template_area_font_size,
|
||||
template_area_font_bold,
|
||||
template_area_font_family,
|
||||
template_area_font_color,
|
||||
template_area_font_value,
|
||||
creator,
|
||||
gmt_create,
|
||||
modifier,
|
||||
@ -106,7 +125,6 @@
|
||||
) VALUES(
|
||||
#{picturesTemplateAreaId},
|
||||
#{picturesTemplateId},
|
||||
#{templateAreaModuleData},
|
||||
#{templateAreaSource},
|
||||
#{templateAreaLeft},
|
||||
#{templateAreaTop},
|
||||
@ -119,6 +137,12 @@
|
||||
#{templateAreaStatus},
|
||||
#{templateAreaFile},
|
||||
#{templateAreaServerLink},
|
||||
#{templateAreaFontCenter},
|
||||
#{templateAreaFontSize},
|
||||
#{templateAreaFontBold},
|
||||
#{templateAreaFontFamily},
|
||||
#{templateAreaFontColor},
|
||||
#{templateAreaFontValue},
|
||||
#{creator},
|
||||
#{gmtCreate},
|
||||
#{modifier},
|
||||
@ -169,6 +193,24 @@
|
||||
</if>
|
||||
<if test="templateAreaRemark != null and templateAreaRemark != ''">
|
||||
template_area_remark = #{templateAreaRemark},
|
||||
</if>
|
||||
<if test="templateAreaFontCenter != null and templateAreaFontCenter != ''">
|
||||
template_area_font_center = #{templateAreaFontCenter},
|
||||
</if>
|
||||
<if test="templateAreaFontSize != null and templateAreaFontSize != ''">
|
||||
template_area_font_size = #{templateAreaFontSize},
|
||||
</if>
|
||||
<if test="templateAreaFontBold != null and templateAreaFontBold != ''">
|
||||
template_area_font_bold = #{templateAreaFontBold},
|
||||
</if>
|
||||
<if test="templateAreaFontFamily != null and templateAreaFontFamily != ''">
|
||||
template_area_font_family = #{templateAreaFontFamily},
|
||||
</if>
|
||||
<if test="templateAreaFontColor != null and templateAreaFontColor != ''">
|
||||
template_area_font_color = #{templateAreaFontColor},
|
||||
</if>
|
||||
<if test="templateAreaFontValue != null and templateAreaFontValue != ''">
|
||||
template_area_font_value = #{templateAreaFontValue},
|
||||
</if>
|
||||
template_area_file = #{templateAreaFile},
|
||||
template_area_server_link = #{templateAreaServerLink},
|
||||
@ -180,17 +222,22 @@
|
||||
|
||||
<select id="getPicturesTemplateIdGroupByPicturesModuleId" parameterType="map" resultMap="picturesTemplateAreaDTO">
|
||||
SELECT
|
||||
t1.pictures_template_id,
|
||||
t1.template_area_module_data,
|
||||
t1.template_area_source,
|
||||
t1.template_area_color,
|
||||
t1.template_area_remark,
|
||||
t1.template_area_status,
|
||||
t1.pictures_template_area_id,
|
||||
t3.pictures_template_title,
|
||||
t3.pictures_template_code,
|
||||
t1.template_area_file,
|
||||
t1.template_area_server_link
|
||||
t1.pictures_template_id,
|
||||
t1.template_area_source,
|
||||
t1.template_area_color,
|
||||
t1.template_area_remark,
|
||||
t1.template_area_status,
|
||||
t1.pictures_template_area_id,
|
||||
t3.pictures_template_title,
|
||||
t3.pictures_template_code,
|
||||
t1.template_area_file,
|
||||
t1.template_area_server_link,
|
||||
t1.template_area_font_center,
|
||||
t1.template_area_font_size,
|
||||
t1.template_area_font_bold,
|
||||
t1.template_area_font_family,
|
||||
t1.template_area_font_color,
|
||||
t1.template_area_font_value
|
||||
FROM
|
||||
pictures_template_area t1
|
||||
LEFT JOIN
|
||||
@ -206,7 +253,6 @@
|
||||
<select id="getPicturesTemplateArea" parameterType="map" resultMap="picturesTemplateAreaDTO">
|
||||
SELECT
|
||||
t1.pictures_template_id,
|
||||
t1.template_area_module_data,
|
||||
t1.template_area_source,
|
||||
t1.template_area_color,
|
||||
t1.template_area_remark,
|
||||
@ -214,7 +260,13 @@
|
||||
t1.pictures_template_area_id,
|
||||
t3.pictures_template_title,
|
||||
t1.template_area_file,
|
||||
t1.template_area_server_link
|
||||
t1.template_area_server_link,
|
||||
t1.template_area_font_center,
|
||||
t1.template_area_font_size,
|
||||
t1.template_area_font_bold,
|
||||
t1.template_area_font_family,
|
||||
t1.template_area_font_color,
|
||||
t1.template_area_font_value
|
||||
FROM
|
||||
pictures_template_area t1
|
||||
LEFT JOIN
|
||||
@ -233,14 +285,19 @@
|
||||
<select id="listPicturesTemplateArea" parameterType="map" resultMap="picturesTemplateAreaDTO">
|
||||
SELECT
|
||||
t1.pictures_template_id,
|
||||
t1.template_area_module_data,
|
||||
t1.template_area_source,
|
||||
t1.template_area_color,
|
||||
t1.template_area_remark,
|
||||
t1.template_area_status,
|
||||
t1.pictures_template_area_id,
|
||||
t1.template_area_file,
|
||||
t1.template_area_server_link
|
||||
t1.template_area_server_link,
|
||||
t1.template_area_font_center,
|
||||
t1.template_area_font_size,
|
||||
t1.template_area_font_bold,
|
||||
t1.template_area_font_family,
|
||||
t1.template_area_font_color,
|
||||
t1.template_area_font_value
|
||||
FROM
|
||||
pictures_template_area t1
|
||||
WHERE
|
||||
|
@ -145,13 +145,7 @@
|
||||
templet: function(row) {
|
||||
return '<button lay-event="picturesTemplateAreaEvent" type="button" class="layui-btn layui-btn-xs layui-btn-radius">编辑模块配置</button>';
|
||||
}
|
||||
}/
|
||||
/*,
|
||||
{field:'picturesTemplateContentEvent', width:120, title: '套版样式', fixed: 'right', align:'center',
|
||||
templet: function(row) {
|
||||
return '<button lay-event="picturesTemplateContentEvent" type="button" class="layui-btn layui-btn-danger layui-btn-xs layui-btn-radius">编辑套版样式</button>';
|
||||
}
|
||||
}*/
|
||||
}
|
||||
]
|
||||
],
|
||||
page: true,
|
||||
|
@ -22,7 +22,7 @@
|
||||
.box{width:200px;height:100px;cursor:move;position:absolute;top:30px;left:30px;z-index:99;}
|
||||
.box .bg{width:100%;height:100%;background-color:orange;}
|
||||
.box .coor{width:10px;height:10px;overflow:hidden;cursor:se-resize;position:absolute;right:0;bottom:0;background-color:red;z-index: 100;}
|
||||
.box .content{position:absolute;left:50%;top:50%;z-index:99;text-align:center;font:bold 20px/1.5em simsun;color:black;font-size: 12px;transform: translate(-50%,-50%)}
|
||||
.box .content{position:absolute;left:50%;top:50%;z-index:99;text-align:center;font:bold 20px/1.5em simsun;color:black;font-size: 20px;transform: translate(-50%,-50%)}
|
||||
|
||||
#debug{position:absolute;right:10px;top:10px;z-index:88;border:1px solid #ccc;width:100px;height:100px;background:#fff;}
|
||||
#toolbar{position:absolute;left:10px;top:10px;z-index:88;}
|
||||
@ -104,7 +104,7 @@
|
||||
// 创建区域
|
||||
function createBox(data){
|
||||
var dataId = data.picturesTemplateAreaId || '';
|
||||
var value = data.picturesModuleName || '区域';
|
||||
var value = data.templateAreaSource || '区域';
|
||||
var color = data.templateAreaColor || '';
|
||||
var height = data.templateAreaHeight || 0;
|
||||
var width = data.templateAreaWidth || 0;
|
||||
@ -129,25 +129,25 @@
|
||||
//创建右键菜单
|
||||
context.attach('.box[rel='+curNum+']', [
|
||||
{header: '区域操作'},
|
||||
{text: '配置参数', action: function(e){
|
||||
e.preventDefault();
|
||||
//当前区域的id
|
||||
var areaName = $('.box[rel='+curNum+']').attr("areaName");
|
||||
var id = $('.box[rel='+curNum+']').attr("id");
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: areaName,
|
||||
closeBtn: 1,
|
||||
area: ['60%', '98%'],
|
||||
shadeClose: false,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/picturestemplatearea/updatepicturestemplateareadata?picturesTemplateAreaId={picturesTemplateAreaId}', [id]),
|
||||
end: function() {
|
||||
// location.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// {text: '配置参数', action: function(e){
|
||||
// e.preventDefault();
|
||||
// //当前区域的id
|
||||
// var areaName = $('.box[rel='+curNum+']').attr("areaName");
|
||||
// var id = $('.box[rel='+curNum+']').attr("id");
|
||||
// layer.open({
|
||||
// type: 2,
|
||||
// title: areaName,
|
||||
// closeBtn: 1,
|
||||
// area: ['60%', '98%'],
|
||||
// shadeClose: false,
|
||||
// anim: 2,
|
||||
// content: top.restAjax.path('route/picturestemplatearea/updatepicturestemplateareadata?picturesTemplateAreaId={picturesTemplateAreaId}', [id]),
|
||||
// end: function() {
|
||||
// // location.reload();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
{text: '修改区域', action: function(e){
|
||||
e.preventDefault();
|
||||
//当前区域的id
|
||||
@ -170,22 +170,27 @@
|
||||
e.preventDefault();
|
||||
//当前区域的id
|
||||
var id = $('.box[rel='+curNum+']').attr("id");
|
||||
top.dialog.msg("复制出一个新的区域", {
|
||||
time: 0,
|
||||
btn: ["确定复制", "我再想想"],
|
||||
shade: 0.3,
|
||||
yes: function (index) {
|
||||
top.dialog.close(index);
|
||||
var layIndex;
|
||||
top.restAjax.put(top.restAjax.path('api/picturestemplatearea/copypicturestemplatearea/{picturesTemplateAreaId}', [id]), {}, null, function (code, data) {
|
||||
top.dialog.msg('复制成功', {time: 1000});
|
||||
location.reload();
|
||||
}, function (code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function () {
|
||||
layIndex = top.dialog.msg('正在复制中...', {icon: 16, time: 0, shade: 0.3});
|
||||
}, function () {
|
||||
top.dialog.close(layIndex);
|
||||
layer.prompt({title: '输入新区域的字段标识', formType: 3}, function(code, index){
|
||||
if(code) {
|
||||
layer.close(index);
|
||||
top.dialog.msg("复制出一个新的区域", {
|
||||
time: 0,
|
||||
btn: ["确定复制", "我再想想"],
|
||||
shade: 0.3,
|
||||
yes: function (index) {
|
||||
top.dialog.close(index);
|
||||
var layIndex;
|
||||
top.restAjax.put(top.restAjax.path('api/picturestemplatearea/copypicturestemplatearea/{picturesTemplateAreaId}/{templateAreaSource}', [id, code]), {}, null, function (code, data) {
|
||||
top.dialog.msg('复制成功', {time: 1000});
|
||||
location.reload();
|
||||
}, function (code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function () {
|
||||
layIndex = top.dialog.msg('正在复制中...', {icon: 16, time: 0, shade: 0.3});
|
||||
}, function () {
|
||||
top.dialog.close(layIndex);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -10,6 +10,19 @@
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
<style>
|
||||
.selectColor{
|
||||
width:93%;
|
||||
float:left;
|
||||
cursor:pointer;
|
||||
}
|
||||
.layui-colorpicker-trigger-bgcolor {
|
||||
display: none !important;
|
||||
}
|
||||
.layui-colorpicker{
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
@ -22,18 +35,14 @@
|
||||
</div>-->
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">模块选择<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="bigdataModuleId" name="bigdataModuleId" class="layui-input" value="">
|
||||
<input type="hidden" id="bigdataModuleCode" name="bigdataModuleCode" class="layui-input" value="">
|
||||
<input type="hidden" id="bigdataModuleModuleJson" name="bigdataModuleModuleJson" class="layui-input" value="">
|
||||
<input type="hidden" id="bigdataModuleServerJson" name="bigdataModuleServerJson" class="layui-input" value="">
|
||||
<input type="hidden" id="bigdataModuleLink" name="bigdataModuleLink" class="layui-input" value="">
|
||||
<input type="text" id="bigdataModuleName" readonly name="bigdataModuleName" lay-verify="require" placeholder="请选择模块" class="layui-input" style="cursor:pointer;">
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg12">
|
||||
<label class="layui-form-label">字段标识<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="templateAreaSource" name="templateAreaSource" class="layui-input" value="" placeholder="请输入字段标识" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">区域颜色<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block" >
|
||||
@ -45,177 +54,109 @@
|
||||
<input type="radio" name="templateAreaColor" value="yellow" title="黄色" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">跳转详情<span style="color: red">*</span></label>
|
||||
<label class="layui-form-label">区域类型<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block" >
|
||||
<input type="radio" name="templateAreaJump" value="0" title="不开启跳转" lay-filter="templateAreaJumpFilter">
|
||||
<input type="radio" name="templateAreaJump" value="1" title="区域单击跳转" lay-filter="templateAreaJumpFilter">
|
||||
<input type="radio" name="templateAreaJump" value="2" title="区域双击跳转" lay-filter="templateAreaJumpFilter">
|
||||
<input type="radio" name="templateAreaServerLink" lay-filter="templateAreaServerLinkFilter" value="1" title="文字" />
|
||||
<input type="radio" name="templateAreaServerLink" lay-filter="templateAreaServerLinkFilter" value="2" title="图片" />
|
||||
<input type="radio" name="templateAreaServerLink" lay-filter="templateAreaServerLinkFilter" value="3" title="条形码" />
|
||||
<input type="radio" name="templateAreaServerLink" lay-filter="templateAreaServerLinkFilter" value="4" title="二维码" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="showDataDiv"></div>
|
||||
<script id="showDataScript" type="text/html">
|
||||
{{# if(d != '0') { }}
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">跳转方式<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block" >
|
||||
<input type="radio" name="templateAreaJumpMode" value="1" title="小窗口弹窗【关联模板】" lay-filter="templateAreaJumpModeFilter">
|
||||
<input type="radio" name="templateAreaJumpMode" value="2" title="全窗口跳转【关联模板】" lay-filter="templateAreaJumpModeFilter">
|
||||
<input type="radio" name="templateAreaJumpMode" value="3" title="打开新页面【关联模板】" lay-filter="templateAreaJumpModeFilter">
|
||||
</br>
|
||||
<input type="radio" name="templateAreaJumpMode" value="4" title="小窗口弹窗【页面链接】" lay-filter="templateAreaJumpModeFilter">
|
||||
<input type="radio" name="templateAreaJumpMode" value="5" title="全窗口跳转【页面链接】" lay-filter="templateAreaJumpModeFilter">
|
||||
<input type="radio" name="templateAreaJumpMode" value="6" title="打开新页面【页面链接】" lay-filter="templateAreaJumpModeFilter">
|
||||
<div id="areaFontValueDiv"></div>
|
||||
<script id="areaFontValueScript" type="text/html">
|
||||
{{# if(d != '2') { }}
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg12">
|
||||
<label class="layui-form-label">{{ d == 3 ? '条形码数据' : d == 4 ? '二维码数据' : '示例文字'}}<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="templateAreaFontValue" name="templateAreaFontValue" class="layui-input" value="" placeholder="请输入{{ d == 3 ? '条形码数据' : d == 4 ? '二维码数据' : '文字例值'}}" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg12">
|
||||
<label class="layui-form-label">{{ d == 3 ? '条形码' : d == 4 ? '二维码' : '文字'}}颜色<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" readonly id="templateAreaFontColor" name="templateAreaFontColor" class="layui-input dataInputRowFilter selectColor" value="rgb(0, 0, 0)" placeholder="" >
|
||||
<div id="test-all" style="height:38px;width:5.5%;float:left;background-color:rgb(0, 0, 0)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{# if(d == '1') { }}
|
||||
<div class="layui-form-item layui-row" pane>
|
||||
<div class="layui-col-lg12">
|
||||
<label class="layui-form-label">文字字体<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="templateAreaFontFamily" checked value="Default" title="默认" />
|
||||
<input type="radio" name="templateAreaFontFamily" value="宋体" title="宋体" />
|
||||
<input type="radio" name="templateAreaFontFamily" value="微软雅黑" title="微软雅黑" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row" pane>
|
||||
<div class="layui-col-lg12">
|
||||
<label class="layui-form-label">文字加粗<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="templateAreaFontBold" checked value="1" title="正常" />
|
||||
<input type="radio" name="templateAreaFontBold" value="2" title="加粗" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg12">
|
||||
<label class="layui-form-label">字体大小<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="number" id="templateAreaFontSize" name="templateAreaFontSize" value="15" class="layui-input" placeholder="请输入字体大小" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row" pane>
|
||||
<div class="layui-col-lg12">
|
||||
<label class="layui-form-label">文字位置<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="templateAreaFontCenter" checked value="1" title="居左" />
|
||||
<input type="radio" name="templateAreaFontCenter" value="2" title="居中" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</script>
|
||||
<div id="templateAreaJumpModeDiv"></div>
|
||||
<script id="templateAreaJumpModeScript" type="text/html">
|
||||
{{# if(d == '1' || d == '2' || d == '3') { }}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">跳转模板<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="templateAreaJumpTemplateId" name="templateAreaJumpTemplateId" class="layui-input" value="">
|
||||
<input type="text" id="templateAreaJumpTemplateTitle" readonly name="templateAreaJumpTemplateTitle" lay-verify="require" placeholder="请选择跳转模板" class="layui-input" style="cursor:pointer;">
|
||||
</div>
|
||||
</div>
|
||||
{{# } else if(d == '4' || d == '5' || d == '6'){ }}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">跳转链接<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="templateAreaJumpUrl" name="templateAreaJumpUrl" class="layui-input" value="" placeholder="请输入跳转链接" >
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
<div class="layui-form-item layui-row" pane="">
|
||||
<div class="layui-col-lg12">
|
||||
<label class="layui-form-label">模块数据<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<button type="button" class="layui-btn" id="templateAreaModule">点击编辑模块数据</button>
|
||||
<input type="hidden" name="templateAreaModuleData" id="templateAreaModuleData"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">数据来源<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block" >
|
||||
<input type="radio" name="templateAreaSource" value="1" title="接口数据" lay-filter="templateAreaSourceFilter">
|
||||
<input type="radio" name="templateAreaSource" value="2" title="自定义数据" lay-filter="templateAreaSourceFilter">
|
||||
<input type="radio" name="templateAreaSource" value="3" title="数据库数据" lay-filter="templateAreaSourceFilter">
|
||||
</div>
|
||||
</div>
|
||||
<div id="templateAreaSourceDiv"></div>
|
||||
<script id="templateAreaSourceScript" type="text/html">
|
||||
{{# if(d == '1') { }}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">接口地址<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="templateAreaServerData" name="templateAreaServerData" class="layui-input" value="" placeholder="请输入接口地址" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">联动授权<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block" >
|
||||
<input type="checkbox" class="templateAreaServerLink" name="templateAreaServerLink[mapLink]" value="1" title="允许地图联动刷新" lay-filter="templateAreaServerLinkFilter">
|
||||
<input type="checkbox" class="templateAreaServerLink" name="templateAreaServerLink[dateLink]" value="2" title="允许时间选择联动刷新" lay-filter="templateAreaServerLinkFilter">
|
||||
<input type="checkbox" class="templateAreaServerLink" name="templateAreaServerLink[selectLink]" value="3" title="允许选项联动刷新" lay-filter="templateAreaServerLinkFilter">
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# if(d == '2') { }}
|
||||
<div class="layui-form-item layui-row" pane="">
|
||||
<div class="layui-col-lg12">
|
||||
<label class="layui-form-label">自定义数据<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<button type="button" class="layui-btn" id="templateAreaServer" >点击编辑自定义数据</button>
|
||||
<input type="hidden" name="templateAreaServerData" id="templateAreaServerData"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">联动授权<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block" >
|
||||
<input type="checkbox" class="templateAreaServerLink" name="templateAreaServerLink[mapLink]" value="1" title="允许地图联动刷新" lay-filter="templateAreaServerLinkFilter">
|
||||
<input type="checkbox" class="templateAreaServerLink" name="templateAreaServerLink[dateLink]" value="2" title="允许时间选择联动刷新" lay-filter="templateAreaServerLinkFilter">
|
||||
<input type="checkbox" class="templateAreaServerLink" name="templateAreaServerLink[selectLink]" value="3" title="允许选项联动刷新" lay-filter="templateAreaServerLinkFilter">
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# if(d == '3') { }}
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">执行SQL<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<textarea id="templateAreaServerData" name="templateAreaServerData" value="" placeholder="请输入执行SQL" class="layui-textarea" rows="2" style="height: auto; line-height: 39px">SELECT * FROM </textarea>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">刷新频率<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<div style="padding-left:10px; padding-top: 20px;" id="templateAreaFrequencyDiv"></div>
|
||||
<input type="hidden" id="templateAreaFrequency" name="templateAreaFrequency" value="0" class="layui-input" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="templateAreaFileFileBox"></div>
|
||||
<script id="templateAreaFileFileDownload" type="text/html">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">区域插件(json文件、css文件、js文件)</label>
|
||||
<label class="layui-form-label">示例图片<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="templateAreaFile" name="templateAreaFile">
|
||||
<div class="layui-btn-container" id="templateAreaFileFileBox" style="border: 1px solid #e6e6e6;"></div>
|
||||
<script id="templateAreaFileFileDownload" type="text/html">
|
||||
{{# var fileName = 'templateAreaFile'; }}
|
||||
{{# if(d[fileName] != '') { }}
|
||||
{{# if(d[fileName].length > 0) { }}
|
||||
{{# var files = d[fileName];}}
|
||||
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||||
<span class="layui-btn-group">
|
||||
<div class="upload-file-box">
|
||||
<a class="upload-file-a" href="route/file/downloadfile/false/{{item.fileId}}" title="{{item.fileName}} - 点击下载">
|
||||
{{# if(item.fileType == 'doc' || item.fileType == 'docx') { }}
|
||||
<img src="assets/images/filetype/word.png"/>
|
||||
{{# } else if(item.fileType == 'xls' || item.fileType == 'xlsx') { }}
|
||||
<img src="assets/images/filetype/excel.png"/>
|
||||
{{# } else if(item.fileType == 'ppt' || item.fileType == 'pptx') { }}
|
||||
<img src="assets/images/filetype/ppt.png"/>
|
||||
{{# } else if(item.fileType == 'apk') { }}
|
||||
<img src="assets/images/filetype/apk.png"/>
|
||||
{{# } else if(item.fileType == 'pdf') { }}
|
||||
<img src="assets/images/filetype/pdf.png"/>
|
||||
{{# } else if(item.fileType == 'rar') { }}
|
||||
<img src="assets/images/filetype/rar.png"/>
|
||||
{{# } else if(item.fileType == 'zip') { }}
|
||||
<img src="assets/images/filetype/zip.png"/>
|
||||
{{# } else if(item.fileType == 'txt') { }}
|
||||
<img src="assets/images/filetype/txt.png"/>
|
||||
{{# } else { }}
|
||||
<img src="assets/images/filetype/file.png"/>
|
||||
{{# } }}
|
||||
</a>
|
||||
<span class="upload-file-title">{{item.fileName}}</span>
|
||||
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-file" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="templateAreaFileRemoveFile">
|
||||
<i class="fa fa-trash-o"></i>
|
||||
</a>
|
||||
</div>
|
||||
</span>
|
||||
<div class="upload-image-box">
|
||||
<span class="upload-image-span">
|
||||
<img src="route/file/download/false/{{item.fileId}}" align="加载失败">
|
||||
</span>
|
||||
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="templateAreaFileRemoveFile">
|
||||
<i class="fa fa-trash-o"></i>
|
||||
</a>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# if(d[fileName].length < 5) { }}
|
||||
{{# if(d[fileName].length < 1) { }}
|
||||
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
||||
<a href="javascript:void(0);" lay-form-button data-explain="区域插件" data-name="templateAreaFile" lay-filter="templateAreaFileUploadFile">
|
||||
<a href="javascript:void(0);" lay-form-button data-explain="示例图片" data-name="templateAreaFile" lay-filter="templateAreaFileUploadFile">
|
||||
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
||||
</a>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">备注内容</label>
|
||||
<label class="layui-form-label">备注说明</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="templateAreaRemark" name="templateAreaRemark" class="layui-input" value="" placeholder="请输入备注内容" >
|
||||
<input type="text" id="templateAreaRemark" name="templateAreaRemark" class="layui-input" value="" placeholder="请输入备注说明" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
@ -239,7 +180,7 @@
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'slider','laydate', 'laytpl'], function(){
|
||||
}).use(['index', 'form', 'slider','laydate', 'laytpl', 'colorpicker'], function(){
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
@ -248,90 +189,58 @@
|
||||
var slider = layui.slider;
|
||||
var wangEditorObj = {};
|
||||
var viewerObj = {};
|
||||
var bigdataTemplateId = top.restAjax.params(window.location.href).bigdataTemplateId;
|
||||
var colorpicker = layui.colorpicker;
|
||||
var picturesTemplateId = top.restAjax.params(window.location.href).picturesTemplateId;
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
$(document).on('click', '.selectColor', function() {
|
||||
selectColor(this, $(this).val())
|
||||
});
|
||||
|
||||
function selectColor(ele, color) {
|
||||
//开启全功能
|
||||
colorpicker.render({
|
||||
elem: '#test-all'
|
||||
,color: color
|
||||
,format: 'rgb'
|
||||
,predefine: true
|
||||
,alpha: false
|
||||
,offset: 'rb'
|
||||
,size: 'xs'
|
||||
,shadeClose: true
|
||||
,done: function(color){
|
||||
$(ele).val(color);
|
||||
$(ele).next().css("background",color);
|
||||
}
|
||||
,change: function(color){
|
||||
$(ele).val(color);
|
||||
$(ele).next().css("background",color);
|
||||
}
|
||||
});
|
||||
$('.layui-colorpicker').click();
|
||||
}
|
||||
|
||||
function refreshDownloadTemplet(fileName, file) {
|
||||
var dataRander = {};
|
||||
dataRander[fileName] = file;
|
||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||
if($('input[name="templateAreaServerLink"]:checked').val() == "2") {
|
||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||
}else{
|
||||
document.getElementById(fileName +'FileBox').innerHTML = "";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
form.on('radio(templateAreaJumpFilter)', function (data) {
|
||||
console.log(data);
|
||||
laytpl(document.getElementById('showDataScript').innerHTML).render(data.value + "", function(html) {
|
||||
document.getElementById('showDataDiv').innerHTML = html;
|
||||
form.on('radio(templateAreaServerLinkFilter)', function (data) {
|
||||
initTemplateAreaFileUploadFile();
|
||||
laytpl(document.getElementById('areaFontValueScript').innerHTML).render(data.value + "", function(html) {
|
||||
document.getElementById('areaFontValueDiv').innerHTML = html;
|
||||
form.render(null, 'dataForm');
|
||||
});
|
||||
// 隐藏掉跳转模板输入框
|
||||
if(data.value == '0') {
|
||||
laytpl(document.getElementById('templateAreaJumpModeScript').innerHTML).render(data.value + "", function(html) {
|
||||
document.getElementById('templateAreaJumpModeDiv').innerHTML = html;
|
||||
form.render(null, 'dataForm');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// 绑定监听
|
||||
form.on('checkbox(templateAreaServerLinkFilter)', function (data) {
|
||||
// if($("#bigdataModuleLink").val() == '0') {
|
||||
// layer.msg("当前模块不支持联动刷新");
|
||||
// $(data.elem).prop("checked", false);
|
||||
// form.render();
|
||||
// }
|
||||
});
|
||||
|
||||
form.on('radio(templateAreaJumpModeFilter)', function (data) {
|
||||
laytpl(document.getElementById('templateAreaJumpModeScript').innerHTML).render(data.value + "", function(html) {
|
||||
document.getElementById('templateAreaJumpModeDiv').innerHTML = html;
|
||||
form.render(null, 'dataForm');
|
||||
});
|
||||
});
|
||||
|
||||
form.on('radio(templateAreaSourceFilter)', function (data) {
|
||||
laytpl(document.getElementById('templateAreaSourceScript').innerHTML).render(data.value + "", function(html) {
|
||||
document.getElementById('templateAreaSourceDiv').innerHTML = html;
|
||||
form.render(null, 'dataForm');
|
||||
onToTemplateAreaServer();
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#bigdataModuleName', function() {
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/bigdatamodule/listbigdatamoduleselect', []),
|
||||
title: '选择模块',
|
||||
width: '60%',
|
||||
height: '100%',
|
||||
onClose: function(data) {
|
||||
$("#templateAreaModuleData").val("");
|
||||
$("#templateAreaServerData").val("");
|
||||
$("#bigdataModuleId").val(top.dialog.dialogData.bigdataModuleId);
|
||||
$("#bigdataModuleName").val(top.dialog.dialogData.bigdataModuleName);
|
||||
$("#bigdataModuleCode").val(top.dialog.dialogData.bigdataModuleCode);
|
||||
$("#bigdataModuleModuleJson").val(top.dialog.dialogData.bigdataModuleModuleJson);
|
||||
$("#bigdataModuleServerJson").val(top.dialog.dialogData.bigdataModuleServerJson);
|
||||
$("#bigdataModuleLink").val(top.dialog.dialogData.bigdataModuleLink);
|
||||
$(".templateAreaServerLink").prop("checked", false);
|
||||
form.render(null, 'dataForm');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#templateAreaJumpTemplateTitle', function() {
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/bigdatatemplate/listbigdatatemplateselect?bigdataTemplateId={bigdataTemplateId}', [bigdataTemplateId]),
|
||||
title: '选择模板',
|
||||
width: '60%',
|
||||
height: '100%',
|
||||
onClose: function(data) {
|
||||
$("#templateAreaJumpTemplateId").val(top.dialog.dialogData.bigdataTemplateId);
|
||||
$("#templateAreaJumpTemplateTitle").val(top.dialog.dialogData.bigdataTemplateTitle);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 初始化文件列表
|
||||
@ -339,7 +248,6 @@
|
||||
var dataForm = {};
|
||||
dataForm[fileName] = ids;
|
||||
form.val('dataForm', dataForm);
|
||||
|
||||
if(!ids) {
|
||||
refreshDownloadTemplet(fileName, []);
|
||||
if(callback) {
|
||||
@ -347,8 +255,7 @@
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
top.restAjax.get(top.restAjax.path('api/file/listfilebyfileid', []), {
|
||||
top.restAjax.get(top.restAjax.path('api/file/list', []), {
|
||||
ids: ids
|
||||
}, null, function(code, data) {
|
||||
refreshDownloadTemplet(fileName, data);
|
||||
@ -360,31 +267,15 @@
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化视频
|
||||
function initVideo(fileName, data) {
|
||||
for(var i = 0, item; item = data[i++];) {
|
||||
var player = new ckplayer({
|
||||
container: '#'+ fileName + i,
|
||||
variable: 'player',
|
||||
flashplayer: false,
|
||||
video: {
|
||||
file: 'route/file/downloadfile/true/'+ item.fileId,
|
||||
type: 'video/mp4'
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化区域插件文件文件上传
|
||||
function initTemplateAreaFileUploadFile() {
|
||||
var files = $('#templateAreaFile').val();
|
||||
initFileList('templateAreaFile', files);
|
||||
|
||||
form.on('button(templateAreaFileUploadFile)', function(obj) {
|
||||
var name = this.dataset.name;
|
||||
var explain = this.dataset.explain;
|
||||
top.dialog.file({
|
||||
type: 'file',
|
||||
type: 'image',
|
||||
title: '上传'+ explain,
|
||||
width: '400px',
|
||||
height: '420px',
|
||||
@ -421,22 +312,8 @@
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
slider.render({
|
||||
elem: '#templateAreaFrequencyDiv'
|
||||
,setTips: function(value){ //自定义提示文本
|
||||
if(value == 0) {
|
||||
return '不开启';
|
||||
}
|
||||
return value + '秒';
|
||||
},
|
||||
min:0,
|
||||
max:600,
|
||||
change: function(value){
|
||||
$("#templateAreaFrequency").val(value.replace("秒","").replace("不开启","0"));
|
||||
}
|
||||
});
|
||||
initTemplateAreaFileUploadFile();
|
||||
top.restAjax.get(top.restAjax.path('api/bigdatatemplatearea/getcurrentuseridinfo', []), {}, null, function(code, data) {
|
||||
top.restAjax.get(top.restAjax.path('api/picturestemplatearea/getcurrentuseridinfo', []), {}, null, function(code, data) {
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
@ -452,9 +329,9 @@
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
formData.field.bigdataTemplateId = bigdataTemplateId;
|
||||
formData.field['templateAreaServerLink'] = top.restAjax.checkBoxToString(formData.field, 'templateAreaServerLink');
|
||||
top.restAjax.post(top.restAjax.path('api/bigdatatemplatearea/savebigdatatemplatearea', []), formData.field, null, function(code, data) {
|
||||
formData.field.picturesTemplateId = picturesTemplateId;
|
||||
alert(formData.field['templateAreaServerLink']);
|
||||
top.restAjax.post(top.restAjax.path('api/picturestemplatearea/savepicturestemplatearea', []), formData.field, null, function(code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
@ -482,63 +359,6 @@
|
||||
closeBox();
|
||||
});
|
||||
|
||||
function onToTemplateAreaModule() {
|
||||
$('#templateAreaModule').on('click', function() {
|
||||
var templateAreaModuleData = $("#templateAreaModuleData").val();
|
||||
if(templateAreaModuleData == "") {
|
||||
if (!$("#bigdataModuleCode").val()) {
|
||||
layer.msg("请先选择模块");
|
||||
return;
|
||||
}
|
||||
templateAreaModuleData = $("#bigdataModuleModuleJson").val();
|
||||
}
|
||||
templateAreaModuleData = templateAreaModuleData.replace(/\?/g,"#问号#").replace(/\=/g,"#等号#");
|
||||
top.layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['80%', '98%'],
|
||||
shadeClose: false,
|
||||
anim: 2,
|
||||
content: top.restAjax.path(encodeURI("route/bigdatatemplatearea/savebigdatatemplateareajson?jsonData=" + templateAreaModuleData), []),
|
||||
end: function() {
|
||||
if(top.dialog.dialogData.jsonViewerData) {
|
||||
$("#templateAreaModuleData").val(top.dialog.dialogData.jsonViewerData);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
onToTemplateAreaModule();
|
||||
|
||||
function onToTemplateAreaServer() {
|
||||
$('#templateAreaServer').on('click', function() {
|
||||
var templateAreaServerData = $("#templateAreaServerData").val();
|
||||
if(templateAreaServerData == "") {
|
||||
if (!$("#bigdataModuleCode").val()) {
|
||||
layer.msg("请先选择模块");
|
||||
return;
|
||||
}
|
||||
templateAreaServerData = $("#bigdataModuleServerJson").val();
|
||||
}
|
||||
templateAreaServerData = templateAreaServerData.replace(/\?/g,"#问号#").replace(/\=/g,"#等号#");
|
||||
top.layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['80%', '98%'],
|
||||
shadeClose: false,
|
||||
anim: 2,
|
||||
content: top.restAjax.path(encodeURI("route/bigdatatemplatearea/savebigdatatemplateareajson?jsonData=" + templateAreaServerData), []),
|
||||
end: function() {
|
||||
if(top.dialog.dialogData.jsonViewerData) {
|
||||
$("#templateAreaServerData").val(top.dialog.dialogData.jsonViewerData);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
|
@ -10,6 +10,19 @@
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
<style>
|
||||
.selectColor{
|
||||
width:93%;
|
||||
float:left;
|
||||
cursor:pointer;
|
||||
}
|
||||
.layui-colorpicker-trigger-bgcolor {
|
||||
display: none !important;
|
||||
}
|
||||
.layui-colorpicker{
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
@ -22,19 +35,15 @@
|
||||
</div>-->
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<input type="hidden" id="bigdataTemplateId" name="bigdataTemplateId" class="layui-input" value="">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">模块选择<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="bigdataModuleId" name="bigdataModuleId" class="layui-input" value="">
|
||||
<input type="hidden" id="bigdataModuleCode" name="bigdataModuleCode" class="layui-input" value="">
|
||||
<input type="hidden" id="bigdataModuleModuleJson" name="bigdataModuleModuleJson" class="layui-input" value="">
|
||||
<input type="hidden" id="bigdataModuleServerJson" name="bigdataModuleServerJson" class="layui-input" value="">
|
||||
<input type="hidden" id="bigdataModuleLink" name="bigdataModuleLink" class="layui-input" value="">
|
||||
<input type="text" id="bigdataModuleName" readonly name="bigdataModuleName" lay-verify="require" placeholder="请选择模块" class="layui-input" style="cursor:pointer;">
|
||||
<input type="hidden" id="picturesTemplateId" name="picturesTemplateId" class="layui-input" >
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg12">
|
||||
<label class="layui-form-label">字段标识<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="templateAreaSource" name="templateAreaSource" class="layui-input" value="" placeholder="请输入字段标识" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">区域颜色<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block" >
|
||||
@ -46,184 +55,115 @@
|
||||
<input type="radio" name="templateAreaColor" value="yellow" title="黄色" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">跳转详情<span style="color: red">*</span></label>
|
||||
<label class="layui-form-label">区域类型<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block" >
|
||||
<input type="radio" name="templateAreaJump" value="0" title="不开启跳转" lay-filter="templateAreaJumpFilter">
|
||||
<input type="radio" name="templateAreaJump" value="1" title="区域单击跳转" lay-filter="templateAreaJumpFilter">
|
||||
<input type="radio" name="templateAreaJump" value="2" title="区域双击跳转" lay-filter="templateAreaJumpFilter">
|
||||
<input type="radio" name="templateAreaServerLink" lay-filter="templateAreaServerLinkFilter" value="1" title="文字" />
|
||||
<input type="radio" name="templateAreaServerLink" lay-filter="templateAreaServerLinkFilter" value="2" title="图片" />
|
||||
<input type="radio" name="templateAreaServerLink" lay-filter="templateAreaServerLinkFilter" value="3" title="条形码" />
|
||||
<input type="radio" name="templateAreaServerLink" lay-filter="templateAreaServerLinkFilter" value="4" title="二维码" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="showDataDiv"></div>
|
||||
<script id="showDataScript" type="text/html">
|
||||
{{# if(d != '0') { }}
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">跳转方式<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block" >
|
||||
<input type="radio" name="templateAreaJumpMode" value="1" title="小窗口弹窗【关联模板】" lay-filter="templateAreaJumpModeFilter">
|
||||
<input type="radio" name="templateAreaJumpMode" value="2" title="全窗口跳转【关联模板】" lay-filter="templateAreaJumpModeFilter">
|
||||
<input type="radio" name="templateAreaJumpMode" value="3" title="打开新页面【关联模板】" lay-filter="templateAreaJumpModeFilter">
|
||||
</br>
|
||||
<input type="radio" name="templateAreaJumpMode" value="4" title="小窗口弹窗【页面链接】" lay-filter="templateAreaJumpModeFilter">
|
||||
<input type="radio" name="templateAreaJumpMode" value="5" title="全窗口跳转【页面链接】" lay-filter="templateAreaJumpModeFilter">
|
||||
<input type="radio" name="templateAreaJumpMode" value="6" title="打开新页面【页面链接】" lay-filter="templateAreaJumpModeFilter">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{# } }}
|
||||
</script>
|
||||
<div id="templateAreaJumpModeDiv"></div>
|
||||
<script id="templateAreaJumpModeScript" type="text/html">
|
||||
{{# if(d == '1' || d == '2' || d == '3') { }}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">跳转模板<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="templateAreaJumpTemplateId" name="templateAreaJumpTemplateId" class="layui-input" value="">
|
||||
<input type="text" id="templateAreaJumpTemplateTitle" readonly name="templateAreaJumpTemplateTitle" lay-verify="require" placeholder="请选择跳转模板" class="layui-input" style="cursor:pointer;">
|
||||
</div>
|
||||
</div>
|
||||
{{# } else if(d == '4' || d == '5' || d == '6') { }}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">跳转链接<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="templateAreaJumpUrl" name="templateAreaJumpUrl" class="layui-input" value="" placeholder="请输入跳转链接" >
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
<div class="layui-form-item layui-row" pane="">
|
||||
<div class="layui-col-lg12">
|
||||
<label class="layui-form-label">模块数据<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<button type="button" class="layui-btn" id="templateAreaModule">点击编辑模块数据</button>
|
||||
<input type="hidden" name="templateAreaModuleData" id="templateAreaModuleData"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">数据来源<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block" >
|
||||
<input type="radio" name="templateAreaSource" value="1" title="接口数据" lay-filter="templateAreaSourceFilter">
|
||||
<input type="radio" name="templateAreaSource" value="2" title="自定义数据" lay-filter="templateAreaSourceFilter">
|
||||
<input type="radio" name="templateAreaSource" value="3" title="数据库数据" lay-filter="templateAreaSourceFilter">
|
||||
</div>
|
||||
</div>
|
||||
<div id="templateAreaSourceDiv"></div>
|
||||
<script id="templateAreaSourceScript" type="text/html">
|
||||
{{# if(d == '1') { }}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">接口地址<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="templateAreaServerData" name="templateAreaServerData" class="layui-input" value="" placeholder="请输入接口地址" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">联动授权<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block" >
|
||||
<input type="checkbox" class="templateAreaServerLink" name="templateAreaServerLink[mapLink]" value="1" title="允许地图联动刷新" lay-filter="templateAreaServerLinkFilter">
|
||||
<input type="checkbox" class="templateAreaServerLink" name="templateAreaServerLink[dateLink]" value="2" title="允许时间选择联动刷新" lay-filter="templateAreaServerLinkFilter">
|
||||
<input type="checkbox" class="templateAreaServerLink" name="templateAreaServerLink[selectLink]" value="3" title="允许选项联动刷新" lay-filter="templateAreaServerLinkFilter">
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# if(d == '2') { }}
|
||||
<div class="layui-form-item layui-row" pane="">
|
||||
<div id="areaFontValueDiv"></div>
|
||||
<script id="areaFontValueScript" type="text/html">
|
||||
{{# if(d != '2') { }}
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg12">
|
||||
<label class="layui-form-label">自定义数据<span style="color: red">*</span></label>
|
||||
<label class="layui-form-label">{{ d == 3 ? '条形码数据' : d == 4 ? '二维码数据' : '示例文字'}}<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<button type="button" class="layui-btn" id="templateAreaServer" >点击编辑自定义数据</button>
|
||||
<input type="hidden" name="templateAreaServerData" id="templateAreaServerData"/>
|
||||
<input type="text" id="templateAreaFontValue" name="templateAreaFontValue" class="layui-input" placeholder="请输入{{ d == 3 ? '条形码数据' : d == 4 ? '二维码数据' : '文字例值'}}" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">联动授权<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block" >
|
||||
<input type="checkbox" class="templateAreaServerLink" name="templateAreaServerLink[mapLink]" value="1" title="允许地图联动刷新" lay-filter="templateAreaServerLinkFilter">
|
||||
<input type="checkbox" class="templateAreaServerLink" name="templateAreaServerLink[dateLink]" value="2" title="允许时间选择联动刷新" lay-filter="templateAreaServerLinkFilter">
|
||||
<input type="checkbox" class="templateAreaServerLink" name="templateAreaServerLink[selectLink]" value="3" title="允许选项联动刷新" lay-filter="templateAreaServerLinkFilter">
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg12">
|
||||
<label class="layui-form-label">{{ d == 3 ? '条形码' : d == 4 ? '二维码' : '文字'}}颜色<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" readonly id="templateAreaFontColor" name="templateAreaFontColor" class="layui-input dataInputRowFilter selectColor" value="rgb(0, 0, 0)" placeholder="" >
|
||||
<div id="test-all" style="height:38px;width:5.5%;float:left;background-color:rgb(0, 0, 0)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{# if(d == '1') { }}
|
||||
<div class="layui-form-item layui-row" pane>
|
||||
<div class="layui-col-lg12">
|
||||
<label class="layui-form-label">文字字体<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="templateAreaFontFamily" checked value="Default" title="默认" />
|
||||
<input type="radio" name="templateAreaFontFamily" value="宋体" title="宋体" />
|
||||
<input type="radio" name="templateAreaFontFamily" value="微软雅黑" title="微软雅黑" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row" pane>
|
||||
<div class="layui-col-lg12">
|
||||
<label class="layui-form-label">文字加粗<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="templateAreaFontBold" checked value="1" title="正常" />
|
||||
<input type="radio" name="templateAreaFontBold" value="2" title="加粗" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg12">
|
||||
<label class="layui-form-label">字体大小<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="number" id="templateAreaFontSize" name="templateAreaFontSize" value="15" class="layui-input" placeholder="请输入字体大小" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row" pane>
|
||||
<div class="layui-col-lg12">
|
||||
<label class="layui-form-label">文字位置<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="templateAreaFontCenter" checked value="1" title="居左" />
|
||||
<input type="radio" name="templateAreaFontCenter" value="2" title="居中" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# if(d == '3') { }}
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">执行SQL<span style="color: red">*</span><button style="margin-left: 20px;" id="querySQL" type="button" class="layui-btn layui-btn-xs" >校验SQL合法性</button></label>
|
||||
<div class="layui-input-block">
|
||||
<textarea id="templateAreaServerData" name="templateAreaServerData" value="" placeholder="请输入执行SQL" class="layui-textarea" rows="2" style="height: auto; line-height: 39px">SELECT * FROM </textarea>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">刷新频率<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<div style="padding-left:10px; padding-top: 20px;" id="templateAreaFrequencyDiv"></div>
|
||||
<input type="hidden" id="templateAreaFrequency" name="templateAreaFrequency" value="0" class="layui-input" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">区域插件(json文件、css文件、js文件)</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="templateAreaFile" name="templateAreaFile">
|
||||
<div class="layui-btn-container" id="templateAreaFileFileBox" style="border: 1px solid #e6e6e6;"></div>
|
||||
<script id="templateAreaFileFileDownload" type="text/html">
|
||||
<div id="templateAreaFileFileBox"></div>
|
||||
<script id="templateAreaFileFileDownload" type="text/html">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">示例图片<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="templateAreaFile" name="templateAreaFile">
|
||||
{{# var fileName = 'templateAreaFile'; }}
|
||||
{{# if(d[fileName] != '') { }}
|
||||
{{# if(d[fileName].length > 0) { }}
|
||||
{{# var files = d[fileName];}}
|
||||
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||||
<span class="layui-btn-group">
|
||||
<div class="upload-file-box">
|
||||
<a class="upload-file-a" href="route/file/downloadfile/false/{{item.fileId}}" title="{{item.fileName}} - 点击下载">
|
||||
{{# if(item.fileType == 'doc' || item.fileType == 'docx') { }}
|
||||
<img src="assets/images/filetype/word.png"/>
|
||||
{{# } else if(item.fileType == 'xls' || item.fileType == 'xlsx') { }}
|
||||
<img src="assets/images/filetype/excel.png"/>
|
||||
{{# } else if(item.fileType == 'ppt' || item.fileType == 'pptx') { }}
|
||||
<img src="assets/images/filetype/ppt.png"/>
|
||||
{{# } else if(item.fileType == 'apk') { }}
|
||||
<img src="assets/images/filetype/apk.png"/>
|
||||
{{# } else if(item.fileType == 'pdf') { }}
|
||||
<img src="assets/images/filetype/pdf.png"/>
|
||||
{{# } else if(item.fileType == 'rar') { }}
|
||||
<img src="assets/images/filetype/rar.png"/>
|
||||
{{# } else if(item.fileType == 'zip') { }}
|
||||
<img src="assets/images/filetype/zip.png"/>
|
||||
{{# } else if(item.fileType == 'txt') { }}
|
||||
<img src="assets/images/filetype/txt.png"/>
|
||||
{{# } else { }}
|
||||
<img src="assets/images/filetype/file.png"/>
|
||||
{{# } }}
|
||||
</a>
|
||||
<span class="upload-file-title">{{item.fileName}}</span>
|
||||
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-file" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="templateAreaFileRemoveFile">
|
||||
<i class="fa fa-trash-o"></i>
|
||||
</a>
|
||||
</div>
|
||||
</span>
|
||||
<div class="upload-image-box">
|
||||
<span class="upload-image-span">
|
||||
<img src="route/file/download/false/{{item.fileId}}" align="加载失败">
|
||||
</span>
|
||||
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="templateAreaFileRemoveFile">
|
||||
<i class="fa fa-trash-o"></i>
|
||||
</a>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# if(d[fileName].length < 5) { }}
|
||||
{{# if(d[fileName].length < 1) { }}
|
||||
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
||||
<a href="javascript:void(0);" lay-form-button data-explain="区域插件文件" data-name="templateAreaFile" lay-filter="templateAreaFileUploadFile">
|
||||
<a href="javascript:void(0);" lay-form-button data-explain="示例图片" data-name="templateAreaFile" lay-filter="templateAreaFileUploadFile">
|
||||
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
||||
</a>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">备注内容</label>
|
||||
<label class="layui-form-label">备注说明</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="templateAreaRemark" name="templateAreaRemark" class="layui-input" value="" placeholder="请输入备注内容" >
|
||||
<input type="text" id="templateAreaRemark" name="templateAreaRemark" class="layui-input" value="" placeholder="请输入备注说明" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交修改</button>
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交新增</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -236,26 +176,12 @@
|
||||
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
|
||||
<script src="assets/template/aes/rollups/aes.js"></script>
|
||||
<script src="assets/template/aes/components/cipher-core.js"></script>
|
||||
<!--<script src="assets/template/aes/components/core.js"></script>-->
|
||||
<script src="assets/template/aes/components/mode-ecb.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
function Encrypt(word){
|
||||
var key = CryptoJS.enc.Utf8.parse("abcdefgabcdefg12");
|
||||
var srcs = CryptoJS.enc.Utf8.parse(word);
|
||||
var encrypted = CryptoJS.AES.encrypt(srcs, key, {mode:CryptoJS.mode.ECB,padding: CryptoJS.pad.Pkcs7});
|
||||
return encrypted.toString();
|
||||
}
|
||||
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'slider','laydate', 'laytpl'], function(){
|
||||
}).use(['index', 'form', 'slider','laydate', 'laytpl', 'colorpicker'], function(){
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
@ -264,121 +190,58 @@
|
||||
var slider = layui.slider;
|
||||
var wangEditorObj = {};
|
||||
var viewerObj = {};
|
||||
var bigdataTemplateAreaId = top.restAjax.params(window.location.href).bigdataTemplateAreaId;
|
||||
var colorpicker = layui.colorpicker;
|
||||
var picturesTemplateAreaId = top.restAjax.params(window.location.href).picturesTemplateAreaId;
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
$(document).on('click', '.selectColor', function() {
|
||||
selectColor(this, $(this).val())
|
||||
});
|
||||
|
||||
function selectColor(ele, color) {
|
||||
//开启全功能
|
||||
colorpicker.render({
|
||||
elem: '#test-all'
|
||||
,color: color
|
||||
,format: 'rgb'
|
||||
,predefine: true
|
||||
,alpha: false
|
||||
,offset: 'rb'
|
||||
,size: 'xs'
|
||||
,shadeClose: true
|
||||
,done: function(color){
|
||||
$(ele).val(color);
|
||||
$(ele).next().css("background",color);
|
||||
}
|
||||
,change: function(color){
|
||||
$(ele).val(color);
|
||||
$(ele).next().css("background",color);
|
||||
}
|
||||
});
|
||||
$('.layui-colorpicker').click();
|
||||
}
|
||||
|
||||
function refreshDownloadTemplet(fileName, file) {
|
||||
var dataRander = {};
|
||||
dataRander[fileName] = file;
|
||||
|
||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||
if($('input[name="templateAreaServerLink"]:checked').val() == "2") {
|
||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||
}else{
|
||||
document.getElementById(fileName +'FileBox').innerHTML = "";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
form.on('radio(templateAreaJumpFilter)', function (data) {
|
||||
laytpl(document.getElementById('showDataScript').innerHTML).render(data.value + "", function(html) {
|
||||
document.getElementById('showDataDiv').innerHTML = html;
|
||||
form.on('radio(templateAreaServerLinkFilter)', function (data) {
|
||||
initTemplateAreaFileUploadFile();
|
||||
laytpl(document.getElementById('areaFontValueScript').innerHTML).render(data.value + "", function(html) {
|
||||
document.getElementById('areaFontValueDiv').innerHTML = html;
|
||||
form.render(null, 'dataForm');
|
||||
});
|
||||
// 隐藏掉跳转模板输入框
|
||||
if(data.value == '0') {
|
||||
laytpl(document.getElementById('templateAreaJumpModeScript').innerHTML).render(data.value + "", function(html) {
|
||||
document.getElementById('templateAreaJumpModeDiv').innerHTML = html;
|
||||
form.render(null, 'dataForm');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// 绑定监听
|
||||
form.on('checkbox(templateAreaServerLinkFilter)', function (data) {
|
||||
// if($("#bigdataModuleLink").val() != '1') {
|
||||
// layer.msg("当前模块不支持联动刷新");
|
||||
// $(data.elem).prop("checked", false);
|
||||
// form.render();
|
||||
// }
|
||||
});
|
||||
|
||||
form.on('radio(templateAreaJumpModeFilter)', function (data) {
|
||||
laytpl(document.getElementById('templateAreaJumpModeScript').innerHTML).render(data.value + "", function(html) {
|
||||
document.getElementById('templateAreaJumpModeDiv').innerHTML = html;
|
||||
form.render(null, 'dataForm');
|
||||
});
|
||||
});
|
||||
|
||||
form.on('radio(templateAreaSourceFilter)', function (data) {
|
||||
laytpl(document.getElementById('templateAreaSourceScript').innerHTML).render(data.value + "", function(html) {
|
||||
document.getElementById('templateAreaSourceDiv').innerHTML = html;
|
||||
form.render(null, 'dataForm');
|
||||
onToTemplateAreaServer();
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#querySQL', function() {
|
||||
/**
|
||||
* 请求服务器, 校验
|
||||
*/
|
||||
var querySql = $("#templateAreaServerData").val().trim();
|
||||
if(querySql.length < 10) {
|
||||
top.dialog.msg("语句不合法");
|
||||
return;
|
||||
}
|
||||
var loadIndex = top.layer.load(1,{shade:0.5});
|
||||
querySql = Encrypt(querySql);
|
||||
top.restAjax.get(top.restAjax.path('app/bigdatatemplate/querysqlrelease?querySql={querySql}', [querySql]), {}, null, function(code, data) {
|
||||
if(code == 200 && data) {
|
||||
if(data.state == 200) {
|
||||
top.dialog.msg("语句校验通过");
|
||||
console.log(data);
|
||||
}else{
|
||||
top.dialog.msg("语句校验未通过");
|
||||
console.log(data.msg);
|
||||
}
|
||||
}else{
|
||||
top.dialog.msg("语句校验不通过");
|
||||
}
|
||||
top.layer.close(loadIndex);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
top.layer.close(loadIndex);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(document).on('click', '#bigdataModuleName', function() {
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/bigdatamodule/listbigdatamoduleselect', []),
|
||||
title: '选择模块',
|
||||
width: '60%',
|
||||
height: '100%',
|
||||
onClose: function(data) {
|
||||
$("#templateAreaModuleData").val("");
|
||||
$("#templateAreaServerData").val("");
|
||||
$("#bigdataModuleId").val(top.dialog.dialogData.bigdataModuleId);
|
||||
$("#bigdataModuleName").val(top.dialog.dialogData.bigdataModuleName);
|
||||
$("#bigdataModuleCode").val(top.dialog.dialogData.bigdataModuleCode);
|
||||
$("#bigdataModuleModuleJson").val(top.dialog.dialogData.bigdataModuleModuleJson);
|
||||
$("#bigdataModuleServerJson").val(top.dialog.dialogData.bigdataModuleServerJson);
|
||||
$("#bigdataModuleLink").val(top.dialog.dialogData.bigdataModuleLink);
|
||||
$(".templateAreaServerLink").prop("checked", false);
|
||||
form.render(null, 'dataForm');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#templateAreaJumpTemplateTitle', function() {
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/bigdatatemplate/listbigdatatemplateselect?bigdataTemplateId={bigdataTemplateId}', [$("#bigdataTemplateId").val()]),
|
||||
title: '选择模板',
|
||||
width: '60%',
|
||||
height: '100%',
|
||||
onClose: function(data) {
|
||||
$("#templateAreaJumpTemplateId").val(top.dialog.dialogData.bigdataTemplateId);
|
||||
$("#templateAreaJumpTemplateTitle").val(top.dialog.dialogData.bigdataTemplateTitle);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 初始化文件列表
|
||||
@ -386,7 +249,6 @@
|
||||
var dataForm = {};
|
||||
dataForm[fileName] = ids;
|
||||
form.val('dataForm', dataForm);
|
||||
|
||||
if(!ids) {
|
||||
refreshDownloadTemplet(fileName, []);
|
||||
if(callback) {
|
||||
@ -394,8 +256,7 @@
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
top.restAjax.get(top.restAjax.path('api/file/listfilebyfileid', []), {
|
||||
top.restAjax.get(top.restAjax.path('api/file/list', []), {
|
||||
ids: ids
|
||||
}, null, function(code, data) {
|
||||
refreshDownloadTemplet(fileName, data);
|
||||
@ -407,31 +268,15 @@
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化视频
|
||||
function initVideo(fileName, data) {
|
||||
for(var i = 0, item; item = data[i++];) {
|
||||
var player = new ckplayer({
|
||||
container: '#'+ fileName + i,
|
||||
variable: 'player',
|
||||
flashplayer: false,
|
||||
video: {
|
||||
file: 'route/file/downloadfile/true/'+ item.fileId,
|
||||
type: 'video/mp4'
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化区域插件文件文件上传
|
||||
function initTemplateAreaFileUploadFile() {
|
||||
var files = $('#templateAreaFile').val();
|
||||
initFileList('templateAreaFile', files);
|
||||
|
||||
form.on('button(templateAreaFileUploadFile)', function(obj) {
|
||||
var name = this.dataset.name;
|
||||
var explain = this.dataset.explain;
|
||||
top.dialog.file({
|
||||
type: 'file',
|
||||
type: 'image',
|
||||
title: '上传'+ explain,
|
||||
width: '400px',
|
||||
height: '420px',
|
||||
@ -469,57 +314,19 @@
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/bigdatatemplatearea/getbigdatatemplateareabyid/{bigdataTemplateAreaId}', [bigdataTemplateAreaId]), {}, null, function(code, data) {
|
||||
top.restAjax.get(top.restAjax.path('api/picturestemplatearea/getpicturestemplateareabyid/{picturesTemplateAreaId}', [picturesTemplateAreaId]), {}, null, function(code, data) {
|
||||
var dataFormData = {};
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
}
|
||||
|
||||
dataFormData.templateAreaJumpTemplateTitle = data.templateAreaJumpTemplateTitle;
|
||||
slider.render({
|
||||
elem: '#templateAreaFrequencyDiv'
|
||||
,setTips: function(value){ //自定义提示文本
|
||||
if(value == 0) {
|
||||
return '不开启';
|
||||
}
|
||||
return value + '秒';
|
||||
},
|
||||
min:0,
|
||||
value: data.templateAreaFrequency,
|
||||
max:600,
|
||||
change: function(value){
|
||||
$("#templateAreaFrequency").val(value.replace("秒","").replace("不开启","0"));
|
||||
}
|
||||
});
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
|
||||
laytpl(document.getElementById('showDataScript').innerHTML).render(data.templateAreaJump, function(html) {
|
||||
document.getElementById('showDataDiv').innerHTML = html;
|
||||
laytpl(document.getElementById('areaFontValueScript').innerHTML).render(data.templateAreaServerLink, function(html) {
|
||||
document.getElementById('areaFontValueDiv').innerHTML = html;
|
||||
form.val('dataForm', dataFormData);
|
||||
});
|
||||
|
||||
laytpl(document.getElementById('templateAreaJumpModeScript').innerHTML).render(data.templateAreaJumpMode, function(html) {
|
||||
document.getElementById('templateAreaJumpModeDiv').innerHTML = html;
|
||||
form.render(null, 'dataForm');
|
||||
});
|
||||
|
||||
laytpl(document.getElementById('templateAreaSourceScript').innerHTML).render(data.templateAreaSource, function(html) {
|
||||
document.getElementById('templateAreaSourceDiv').innerHTML = html;
|
||||
form.val('dataForm', dataFormData);
|
||||
onToTemplateAreaServer();
|
||||
});
|
||||
$("#test-all").css("background", data.templateAreaFontColor);
|
||||
initTemplateAreaFileUploadFile();
|
||||
|
||||
|
||||
if(data.templateAreaServerLink != '') {
|
||||
var checkboxValue = data.templateAreaServerLink.split(',');
|
||||
var checkboxObj = {};
|
||||
for(var j = 0, checkbox = checkboxValue[j]; checkbox = checkboxValue[j++];) {
|
||||
checkboxObj['templateAreaServerLink['+ checkbox +']'] = true;
|
||||
}
|
||||
form.val('dataForm', checkboxObj);
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
@ -535,9 +342,8 @@
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
formData.field['templateAreaServerLink'] = top.restAjax.checkBoxToString(formData.field, 'templateAreaServerLink');
|
||||
top.restAjax.put(top.restAjax.path('api/bigdatatemplatearea/updatebigdatatemplatearea/{bigdataTemplateAreaId}', [bigdataTemplateAreaId]), formData.field, null, function(code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.updateSuccess, {
|
||||
top.restAjax.put(top.restAjax.path('api/picturestemplatearea/updatepicturestemplatearea/{picturesTemplateAreaId}', [picturesTemplateAreaId]), formData.field, null, function(code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
shade: 0.3,
|
||||
@ -564,63 +370,6 @@
|
||||
closeBox();
|
||||
});
|
||||
|
||||
function onToTemplateAreaModule() {
|
||||
$('#templateAreaModule').on('click', function() {
|
||||
var templateAreaModuleData = $("#templateAreaModuleData").val();
|
||||
if(templateAreaModuleData == "") {
|
||||
if (!$("#bigdataModuleCode").val()) {
|
||||
layer.msg("请先选择模块");
|
||||
return;
|
||||
}
|
||||
templateAreaModuleData = $("#bigdataModuleModuleJson").val();
|
||||
}
|
||||
templateAreaModuleData = templateAreaModuleData.replace(/\?/g,"#问号#").replace(/\=/g,"#等号#");
|
||||
top.layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['80%', '98%'],
|
||||
shadeClose: false,
|
||||
anim: 2,
|
||||
content: top.restAjax.path(encodeURI("route/bigdatatemplatearea/savebigdatatemplateareajson?jsonData=" + templateAreaModuleData), []),
|
||||
end: function() {
|
||||
if(top.dialog.dialogData.jsonViewerData) {
|
||||
$("#templateAreaModuleData").val(top.dialog.dialogData.jsonViewerData);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
onToTemplateAreaModule();
|
||||
|
||||
function onToTemplateAreaServer() {
|
||||
$('#templateAreaServer').on('click', function() {
|
||||
var templateAreaServerData = $("#templateAreaServerData").val();
|
||||
if(templateAreaServerData == "") {
|
||||
if (!$("#bigdataModuleCode").val()) {
|
||||
layer.msg("请先选择模块");
|
||||
return;
|
||||
}
|
||||
templateAreaServerData = $("#bigdataModuleServerJson").val();
|
||||
}
|
||||
templateAreaServerData = templateAreaServerData.replace(/\?/g,"#问号#").replace(/\=/g,"#等号#");
|
||||
top.layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['80%', '98%'],
|
||||
shadeClose: false,
|
||||
anim: 2,
|
||||
content: top.restAjax.path(encodeURI("route/bigdatatemplatearea/savebigdatatemplateareajson?jsonData=" + templateAreaServerData), []),
|
||||
end: function() {
|
||||
if(top.dialog.dialogData.jsonViewerData) {
|
||||
$("#templateAreaServerData").val(top.dialog.dialogData.jsonViewerData);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
|
@ -2,7 +2,6 @@ package cn.com.tenlion.buildingpictures.pojo.dtos.picturestemplatearea;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -21,9 +20,7 @@ public class PicturesTemplateAreaDTO {
|
||||
private String picturesTemplateAreaId;
|
||||
@ApiModelProperty(name = "picturesTemplateId", value = "模板ID")
|
||||
private String picturesTemplateId;
|
||||
@ApiModelProperty(name = "templateAreaModuleData", value = "模块数据")
|
||||
private String templateAreaModuleData;
|
||||
@ApiModelProperty(name = "templateAreaSource", value = "数据来源")
|
||||
@ApiModelProperty(name = "templateAreaSource", value = "区域标识")
|
||||
private String templateAreaSource;
|
||||
@ApiModelProperty(name = "templateAreaLeft", value = "距左部像素px")
|
||||
private Double templateAreaLeft;
|
||||
@ -51,50 +48,67 @@ public class PicturesTemplateAreaDTO {
|
||||
private String templateAreaFile;
|
||||
@ApiModelProperty(name = "fileList", value = "区域插件集合")
|
||||
private List<PicturesTemplateAreaFileDTO> fileList;
|
||||
@ApiModelProperty(name = "templateAreaServerLink", value = "区域联动方式")
|
||||
@ApiModelProperty(name = "templateAreaServerLink", value = "区域类型")
|
||||
private String templateAreaServerLink;
|
||||
@ApiModelProperty(name = "templateAreaFontCenter", value = "文字位置")
|
||||
private String templateAreaFontCenter;
|
||||
@ApiModelProperty(name = "templateAreaFontSize", value = "字体大小")
|
||||
private String templateAreaFontSize;
|
||||
@ApiModelProperty(name = "templateAreaFontBold", value = "文字加粗")
|
||||
private String templateAreaFontBold;
|
||||
@ApiModelProperty(name = "templateAreaFontFamily", value = "文字字体")
|
||||
private String templateAreaFontFamily;
|
||||
@ApiModelProperty(name = "templateAreaFontColor", value = "文字颜色")
|
||||
private String templateAreaFontColor;
|
||||
@ApiModelProperty(name = "templateAreaFontValue", value = "示例文字")
|
||||
private String templateAreaFontValue;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder sb = new StringBuilder("{");
|
||||
sb.append("\"picturesTemplateAreaId\":\"")
|
||||
.append(picturesTemplateAreaId).append('\"');
|
||||
sb.append(",\"picturesTemplateId\":\"")
|
||||
.append(picturesTemplateId).append('\"');
|
||||
sb.append(",\"templateAreaModuleData\":\"")
|
||||
.append(templateAreaModuleData).append('\"');
|
||||
sb.append(",\"templateAreaSource\":\"")
|
||||
.append(templateAreaSource).append('\"');
|
||||
sb.append(",\"templateAreaLeft\":")
|
||||
.append(templateAreaLeft);
|
||||
sb.append(",\"templateAreaTop\":")
|
||||
.append(templateAreaTop);
|
||||
sb.append(",\"templateAreaDown\":")
|
||||
.append(templateAreaDown);
|
||||
sb.append(",\"templateAreaRight\":")
|
||||
.append(templateAreaRight);
|
||||
sb.append(",\"templateAreaHeight\":")
|
||||
.append(templateAreaHeight);
|
||||
sb.append(",\"templateAreaWidth\":")
|
||||
.append(templateAreaWidth);
|
||||
sb.append(",\"templateAreaColor\":\"")
|
||||
.append(templateAreaColor).append('\"');
|
||||
sb.append(",\"templateAreaRemark\":\"")
|
||||
.append(templateAreaRemark).append('\"');
|
||||
sb.append(",\"templateAreaStatus\":\"")
|
||||
.append(templateAreaStatus).append('\"');
|
||||
sb.append(",\"picturesTemplateTitle\":\"")
|
||||
.append(picturesTemplateTitle).append('\"');
|
||||
sb.append(",\"picturesModuleContent\":\"")
|
||||
.append(picturesModuleContent).append('\"');
|
||||
sb.append(",\"templateAreaFile\":\"")
|
||||
.append(templateAreaFile).append('\"');
|
||||
sb.append(",\"fileList\":")
|
||||
.append(fileList);
|
||||
sb.append(",\"templateAreaServerLink\":\"")
|
||||
.append(templateAreaServerLink).append('\"');
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
public String getTemplateAreaFontCenter() {
|
||||
return templateAreaFontCenter == null ? "" : templateAreaFontCenter;
|
||||
}
|
||||
|
||||
public void setTemplateAreaFontCenter(String templateAreaFontCenter) {
|
||||
this.templateAreaFontCenter = templateAreaFontCenter;
|
||||
}
|
||||
|
||||
public String getTemplateAreaFontSize() {
|
||||
return templateAreaFontSize == null ? "" : templateAreaFontSize;
|
||||
}
|
||||
|
||||
public void setTemplateAreaFontSize(String templateAreaFontSize) {
|
||||
this.templateAreaFontSize = templateAreaFontSize;
|
||||
}
|
||||
|
||||
public String getTemplateAreaFontBold() {
|
||||
return templateAreaFontBold == null ? "" : templateAreaFontBold;
|
||||
}
|
||||
|
||||
public void setTemplateAreaFontBold(String templateAreaFontBold) {
|
||||
this.templateAreaFontBold = templateAreaFontBold;
|
||||
}
|
||||
|
||||
public String getTemplateAreaFontFamily() {
|
||||
return templateAreaFontFamily == null ? "" : templateAreaFontFamily;
|
||||
}
|
||||
|
||||
public void setTemplateAreaFontFamily(String templateAreaFontFamily) {
|
||||
this.templateAreaFontFamily = templateAreaFontFamily;
|
||||
}
|
||||
|
||||
public String getTemplateAreaFontColor() {
|
||||
return templateAreaFontColor == null ? "" : templateAreaFontColor;
|
||||
}
|
||||
|
||||
public void setTemplateAreaFontColor(String templateAreaFontColor) {
|
||||
this.templateAreaFontColor = templateAreaFontColor;
|
||||
}
|
||||
|
||||
public String getTemplateAreaFontValue() {
|
||||
return templateAreaFontValue == null ? "" : templateAreaFontValue;
|
||||
}
|
||||
|
||||
public void setTemplateAreaFontValue(String templateAreaFontValue) {
|
||||
this.templateAreaFontValue = templateAreaFontValue;
|
||||
}
|
||||
|
||||
public String getPicturesTemplateAreaId() {
|
||||
@ -113,14 +127,6 @@ public class PicturesTemplateAreaDTO {
|
||||
this.picturesTemplateId = picturesTemplateId;
|
||||
}
|
||||
|
||||
public String getTemplateAreaModuleData() {
|
||||
return templateAreaModuleData == null ? "" : templateAreaModuleData;
|
||||
}
|
||||
|
||||
public void setTemplateAreaModuleData(String templateAreaModuleData) {
|
||||
this.templateAreaModuleData = templateAreaModuleData;
|
||||
}
|
||||
|
||||
public String getTemplateAreaSource() {
|
||||
return templateAreaSource == null ? "" : templateAreaSource;
|
||||
}
|
||||
|
@ -19,11 +19,8 @@ public class PicturesTemplateAreaVO {
|
||||
@ApiModelProperty(name = "picturesTemplateId", value = "模板ID")
|
||||
@CheckEmptyAnnotation(name = "模板")
|
||||
private String picturesTemplateId;
|
||||
@ApiModelProperty(name = "templateAreaModuleData", value = "模块数据")
|
||||
@CheckEmptyAnnotation(name = "模块数据")
|
||||
private String templateAreaModuleData;
|
||||
@ApiModelProperty(name = "templateAreaSource", value = "数据来源")
|
||||
@CheckEmptyAnnotation(name = "数据来源")
|
||||
@ApiModelProperty(name = "templateAreaSource", value = "区域标识")
|
||||
@CheckEmptyAnnotation(name = "区域标识")
|
||||
private String templateAreaSource;
|
||||
@ApiModelProperty(name = "templateAreaLeft", value = "距左部像素px")
|
||||
private Double templateAreaLeft;
|
||||
@ -44,10 +41,70 @@ public class PicturesTemplateAreaVO {
|
||||
private String templateAreaRemark;
|
||||
@ApiModelProperty(name = "templateAreaStatus", value = "区域状态")
|
||||
private String templateAreaStatus;
|
||||
@ApiModelProperty(name = "templateAreaFile", value = "区域插件")
|
||||
@ApiModelProperty(name = "templateAreaFile", value = "示例图片")
|
||||
private String templateAreaFile;
|
||||
@ApiModelProperty(name = "templateAreaServerLink", value = "区域联动方式")
|
||||
@ApiModelProperty(name = "templateAreaServerLink", value = "区域类型")
|
||||
private String templateAreaServerLink;
|
||||
@ApiModelProperty(name = "templateAreaFontCenter", value = "文字位置")
|
||||
private String templateAreaFontCenter;
|
||||
@ApiModelProperty(name = "templateAreaFontSize", value = "字体大小")
|
||||
private String templateAreaFontSize;
|
||||
@ApiModelProperty(name = "templateAreaFontBold", value = "文字加粗")
|
||||
private String templateAreaFontBold;
|
||||
@ApiModelProperty(name = "templateAreaFontFamily", value = "文字字体")
|
||||
private String templateAreaFontFamily;
|
||||
@ApiModelProperty(name = "templateAreaFontColor", value = "文字颜色")
|
||||
private String templateAreaFontColor;
|
||||
@ApiModelProperty(name = "templateAreaFontValue", value = "示例文字")
|
||||
private String templateAreaFontValue;
|
||||
|
||||
public String getTemplateAreaFontCenter() {
|
||||
return templateAreaFontCenter == null ? "" : templateAreaFontCenter;
|
||||
}
|
||||
|
||||
public void setTemplateAreaFontCenter(String templateAreaFontCenter) {
|
||||
this.templateAreaFontCenter = templateAreaFontCenter;
|
||||
}
|
||||
|
||||
public String getTemplateAreaFontSize() {
|
||||
return templateAreaFontSize == null ? "" : templateAreaFontSize;
|
||||
}
|
||||
|
||||
public void setTemplateAreaFontSize(String templateAreaFontSize) {
|
||||
this.templateAreaFontSize = templateAreaFontSize;
|
||||
}
|
||||
|
||||
public String getTemplateAreaFontBold() {
|
||||
return templateAreaFontBold == null ? "" : templateAreaFontBold;
|
||||
}
|
||||
|
||||
public void setTemplateAreaFontBold(String templateAreaFontBold) {
|
||||
this.templateAreaFontBold = templateAreaFontBold;
|
||||
}
|
||||
|
||||
public String getTemplateAreaFontFamily() {
|
||||
return templateAreaFontFamily == null ? "" : templateAreaFontFamily;
|
||||
}
|
||||
|
||||
public void setTemplateAreaFontFamily(String templateAreaFontFamily) {
|
||||
this.templateAreaFontFamily = templateAreaFontFamily;
|
||||
}
|
||||
|
||||
public String getTemplateAreaFontColor() {
|
||||
return templateAreaFontColor == null ? "" : templateAreaFontColor;
|
||||
}
|
||||
|
||||
public void setTemplateAreaFontColor(String templateAreaFontColor) {
|
||||
this.templateAreaFontColor = templateAreaFontColor;
|
||||
}
|
||||
|
||||
public String getTemplateAreaFontValue() {
|
||||
return templateAreaFontValue == null ? "" : templateAreaFontValue;
|
||||
}
|
||||
|
||||
public void setTemplateAreaFontValue(String templateAreaFontValue) {
|
||||
this.templateAreaFontValue = templateAreaFontValue;
|
||||
}
|
||||
|
||||
public String getTemplateAreaServerLink() {
|
||||
return templateAreaServerLink == null ? "" : templateAreaServerLink;
|
||||
@ -74,14 +131,6 @@ public class PicturesTemplateAreaVO {
|
||||
this.picturesTemplateId = picturesTemplateId;
|
||||
}
|
||||
|
||||
public String getTemplateAreaModuleData() {
|
||||
return templateAreaModuleData == null ? "" : templateAreaModuleData.trim();
|
||||
}
|
||||
|
||||
public void setTemplateAreaModuleData(String templateAreaModuleData) {
|
||||
this.templateAreaModuleData = templateAreaModuleData;
|
||||
}
|
||||
|
||||
public String getTemplateAreaSource() {
|
||||
return templateAreaSource == null ? "" : templateAreaSource.trim();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user