diff --git a/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/service/picturestemplate/impl/PicturesTemplateServiceImpl.java b/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/service/picturestemplate/impl/PicturesTemplateServiceImpl.java index 4709237..fc43d2d 100644 --- a/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/service/picturestemplate/impl/PicturesTemplateServiceImpl.java +++ b/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/service/picturestemplate/impl/PicturesTemplateServiceImpl.java @@ -118,6 +118,20 @@ public class PicturesTemplateServiceImpl extends DefaultBaseService implements I } else { setAppSaveInfo(token, params); } + // 自定义尺寸做判断 + if("-1".equals(picturesTemplateVO.getPicturesTemplateBack())) { + String size = picturesTemplateVO.getPicturesTemplateSize(); + if(StringUtils.isEmpty(size)) { + throw new SaveException("自定义尺寸不能为空"); + } + String[] arr = size.split("\\*"); + if(arr.length != 2) { + throw new SaveException("自定义尺寸不合法"); + } + if(!StringUtils.isNumeric(arr[0]) || !StringUtils.isNumeric(arr[1])) { + throw new SaveException("自定义尺寸不合法"); + } + } picturesTemplateDao.savePicturesTemplate(params); return picturesTemplateId; } @@ -185,6 +199,20 @@ public class PicturesTemplateServiceImpl extends DefaultBaseService implements I } else { setAppUpdateInfo(token, params); } + // 自定义尺寸做判断 + if("-1".equals(picturesTemplateVO.getPicturesTemplateBack())) { + String size = picturesTemplateVO.getPicturesTemplateSize(); + if(StringUtils.isEmpty(size)) { + throw new SaveException("自定义尺寸不能为空"); + } + String[] arr = size.split("\\*"); + if(arr.length != 2) { + throw new SaveException("自定义尺寸不合法"); + } + if(!StringUtils.isNumeric(arr[0]) || !StringUtils.isNumeric(arr[1])) { + throw new SaveException("自定义尺寸不合法"); + } + } picturesTemplateDao.updatePicturesTemplate(params); } diff --git a/module-building-pictures/src/main/resources/mybatis/mapper/picturestemplate/picturesmplate-mapper.xml b/module-building-pictures/src/main/resources/mybatis/mapper/picturestemplate/picturesmplate-mapper.xml index ed64ad3..13701fa 100644 --- a/module-building-pictures/src/main/resources/mybatis/mapper/picturestemplate/picturesmplate-mapper.xml +++ b/module-building-pictures/src/main/resources/mybatis/mapper/picturestemplate/picturesmplate-mapper.xml @@ -2,7 +2,7 @@ - + diff --git a/module-building-pictures/src/main/resources/templates/picturestemplate/list-picturestemplate.html b/module-building-pictures/src/main/resources/templates/picturestemplate/list-picturestemplate.html index b840d64..baf5a83 100644 --- a/module-building-pictures/src/main/resources/templates/picturestemplate/list-picturestemplate.html +++ b/module-building-pictures/src/main/resources/templates/picturestemplate/list-picturestemplate.html @@ -90,7 +90,7 @@ [ {type:'checkbox', fixed: 'left'}, {field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '{{d.LAY_INDEX}}'}, - {field: 'picturesTemplateCode', width: 100, title: '页面编码', align:'center', + {field: 'picturesTemplateCode', width: 100, title: '套版编码', align:'center', templet: function(row) { var rowData = row[this.field]; if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { @@ -99,7 +99,7 @@ return rowData; } }, - {field: 'picturesTemplateTitle', width: 350, title: '页面标题', align:'center', + {field: 'picturesTemplateTitle', width: 350, title: '套版标题', align:'center', templet: function(row) { var rowData = row[this.field]; if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { @@ -126,36 +126,32 @@ return rowData + 'px'; } }, - {field: 'picturesTemplateBack', width: 150, title: '页面类型', align:'center', + {field: 'picturesTemplateBack', width: 150, title: '生成尺寸', align:'center', templet: function(row) { var rowData = row[this.field]; if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { return '-'; } - if(rowData == '1') { - return '一级页面(主页)'; - }else{ - return '二级页面(跳转页)'; - } + return rowData; } }, - {field: 'picturesTemplatePublishStatus', width: 150, fixed: 'right', title: '页面发布', align:'center', + {field: 'picturesTemplatePublishStatus', width: 150, fixed: 'right', title: '套版发布', align:'center', templet: function(row) { var rowData = row[this.field]; return ''; } }, - {field:'picturesTemplateAreaEvent', width:120, title: '页面配置', fixed: 'right', align:'center', + {field:'picturesTemplateAreaEvent', width:120, title: '套版配置', fixed: 'right', align:'center', templet: function(row) { return ''; } - } - , - {field:'picturesTemplateContentEvent', width:120, title: '页面样式', fixed: 'right', align:'center', + }/ + /*, + {field:'picturesTemplateContentEvent', width:120, title: '套版样式', fixed: 'right', align:'center', templet: function(row) { - return ''; + return ''; } - } + }*/ ] ], page: true, @@ -204,7 +200,7 @@ if(layEvent === 'picturesTemplateAreaEvent') { top.dialog.open({ url: top.restAjax.path('route/picturestemplate/savepicturestemplatearea?picturesTemplateId={picturesTemplateId}&picturesTemplateCode={picturesTemplateCode}', [data.picturesTemplateId, data.picturesTemplateCode]), - title: "页面配置(" + data.picturesTemplateTitle + ")", + title: "套版配置(" + data.picturesTemplateTitle + ")", width: '100%' , height:'100%', onClose: function() { @@ -262,7 +258,7 @@ } initTable(); initDate(); - // 事件 - 页面变化 + // 事件 - 套版变化 $win.on('resize', function() { clearTimeout(resizeTimeout); resizeTimeout = setTimeout(function() { diff --git a/module-building-pictures/src/main/resources/templates/picturestemplate/save-picturestemplate.html b/module-building-pictures/src/main/resources/templates/picturestemplate/save-picturestemplate.html index 7e70519..bd3d108 100644 --- a/module-building-pictures/src/main/resources/templates/picturestemplate/save-picturestemplate.html +++ b/module-building-pictures/src/main/resources/templates/picturestemplate/save-picturestemplate.html @@ -22,59 +22,72 @@
- +
- +
- +
- +
- +
- +
- +
- - - - - - - - - - - - - - - +
+ +
+ + + + + + + + + + + + +
+
+
+ - + - - - - + + + + - + @@ -96,7 +109,7 @@ - + @@ -105,7 +118,7 @@ - + @@ -115,20 +128,20 @@
- +
- -
-