Commit 69984822 by 陈玉兰

提交

parent 69e86c97
...@@ -313,3 +313,6 @@ ...@@ -313,3 +313,6 @@
.icon-ext-07_35{ .icon-ext-07_35{
background:url('../../../../images/icons/(07,35).png') no-repeat left center; background:url('../../../../images/icons/(07,35).png') no-repeat left center;
} }
.icon-ext-01_10{
background:url('../../../../images/icons/(01,10).png') no-repeat left center;
}
\ No newline at end of file
...@@ -34,18 +34,19 @@ ...@@ -34,18 +34,19 @@
UEDITOR_HOME_URL : URL, // 服务器统一请求接口路径 UEDITOR_HOME_URL : URL, // 服务器统一请求接口路径
serverUrl : URL + "jsp/controller.jsp", //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义 serverUrl : URL + "jsp/controller.jsp", //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义
toolbars : [ [ toolbars : [ [
'fullscreen', 'source', '|', 'undo', 'redo', '|', 'fullscreen', 'source', '|', 'undo', 'redo', '|',
'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
'rowspacingtop', 'rowspacingbottom', 'lineheight', '|', 'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|', 'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
'directionalityltr', 'directionalityrtl', 'indent', '|', 'directionalityltr', 'directionalityrtl', 'indent', '|',
'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|', 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|', 'link', 'unlink', 'anchor', '|', 'imageleft', 'imageright', 'imagecenter', '|',
'simpleupload', 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', 'gmap', 'insertframe', 'insertcode', 'webapp', 'pagebreak', 'template', 'background', '|', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', 'gmap', 'insertframe', 'insertcode', 'webapp', 'pagebreak', 'template', 'background', '|',
'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|', 'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|',
'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|', 'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
'print', 'preview', 'searchreplace', 'drafts', 'help' 'print', 'preview', 'searchreplace', 'drafts', 'help'
] ] ] ]
//去掉的工具'insertimage','imagenone','simpleupload',
//当鼠标放在工具栏上时显示的tooltip提示,留空支持自动多语言配置,否则以配置值为准 //当鼠标放在工具栏上时显示的tooltip提示,留空支持自动多语言配置,否则以配置值为准
//,labelMap:{ //,labelMap:{
// 'anchor':'', 'undo':'' // 'anchor':'', 'undo':''
......
...@@ -9,16 +9,16 @@ ...@@ -9,16 +9,16 @@
<td style="width: 30%"> <td style="width: 30%">
<input class="easyui-textbox" id="MODEL_NAME" name="FIELD_MODEL_NAME" value="${is_row.MODEL_NAME}" style="width:200px" /> <input class="easyui-textbox" id="MODEL_NAME" name="FIELD_MODEL_NAME" value="${is_row.MODEL_NAME}" style="width:200px" />
</td> </td>
<td style="width: 15%;" class="tableStyleLable"> <!-- <td style="width: 15%;" class="tableStyleLable">
<span>是否启用:</span> <span>是否启用:</span>
</td> </td>
<td style="width: 30%"> <td style="width: 30%">
<input type="radio" name="FLAG" value='1'/><label>启用</label> <input type="radio" name="FIELD_FLAG" value='1'/><label>启用</label>
<input type="radio" name="FLAG" value="0" checked/><label>不启用</label> <input type="radio" name="FIELD_FLAG" value="0" checked/><label>不启用</label>
</td> </td> -->
</tr> </tr>
</table> </table>
<div id="ueditId" > <div id="ueditId" name="FIELD_ueditValue">
</div> </div>
</form> </form>
\ No newline at end of file
...@@ -104,14 +104,15 @@ function formatMenu(value, data,index) { ...@@ -104,14 +104,15 @@ function formatMenu(value, data,index) {
//上浮横向菜单集里的具体菜单项(需更改) //上浮横向菜单集里的具体菜单项(需更改)
function getOptionMenu(data,index){ function getOptionMenu(data,index){
var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"editRow('" var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"editRow('"
+ index + "')\">编辑</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('" + index + "')\">编辑</a> | <span class=\"icon-ext-01_10\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"enableRow('"
+ index + "')\">启用</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('"
+ index + "')\">删除</a>"; + index + "')\">删除</a>";
return returnData; return returnData;
} }
//返回菜单集的菜单个数(需更改) //返回菜单集的菜单个数(需更改)
function getOptionMenuCount(){ function getOptionMenuCount(){
var is_menu_count = 2; var is_menu_count = 3;
return is_menu_count; return is_menu_count;
} }
...@@ -140,9 +141,10 @@ function addUrlOnloadCallback(is_row){ ...@@ -140,9 +141,10 @@ function addUrlOnloadCallback(is_row){
//保存 //保存
function insertData(is_entity){ function insertData(is_entity){
var tableId = $.getUrlParam("tableId"); var tableId = $.getUrlParam("tableId");
var ue=UE.getEditor('ueditId');
is_entity.FIELD_TABLE_ID=tableId; is_entity.FIELD_TABLE_ID=tableId;
is_entity.FIELD_FLAG=is_entity.FLAG; is_entity.FIELD_FLAG=is_entity.FLAG;
is_entity.FIELD_MODEL_CONTENT=is_entity.editorValue; is_entity.FIELD_MODEL_CONTENT=ue.getContent()
var v_result = formmodelModule.act.insertFormModel(is_entity); var v_result = formmodelModule.act.insertFormModel(is_entity);
$('#list').datagrid('reload'); $('#list').datagrid('reload');
return v_result; return v_result;
...@@ -159,29 +161,28 @@ function editRow(index) { ...@@ -159,29 +161,28 @@ function editRow(index) {
//加载修改子页面成功后的回调 //加载修改子页面成功后的回调
function updateUrlOnloadCallback(is_row){ function updateUrlOnloadCallback(is_row){
var flag = is_row.FLAG;
$('input[name="FLAG"]').each(function(index,element){
if($(element).val()==flag){
$(element).prop('checked',true);
}
})
initUeditor(is_row); initUeditor(is_row);
} }
function initUeditor(is_row){ function initUeditor(is_row){
console.log(is_row);
UE.delEditor('ueditId'); UE.delEditor('ueditId');
var ue=UE.getEditor('ueditId',{}); var ue=UE.getEditor('ueditId',{});
ue.ready(function() { ue.ready(function(){
//设置编辑器的内容 //设置编辑器的内容
ue.setContent(is_row.MODEL_CONTENT); ue.setContent(is_row.MODEL_CONTENT);
}); });
} }
//保存 //保存
function updateData(is_entity){ function updateData(is_entity){
is_entity.FIELD_MODEL_CONTENT=is_entity.editorValue;
is_entity.FIELD_FLAG=is_entity.FLAG; var ue=UE.getEditor('ueditId');
is_entity.FIELD_MODEL_CONTENT=ue.getContent();
console.log(is_entity);
return;
v_result = formmodelModule.act.updateFormModel(is_entity); v_result = formmodelModule.act.updateFormModel(is_entity);
$('#list').datagrid('reload'); $('#list').datagrid('reload');
return v_result; return v_result;
...@@ -201,7 +202,6 @@ function updateData(is_entity){ ...@@ -201,7 +202,6 @@ function updateData(is_entity){
**/ **/
function deleteRow(index){ function deleteRow(index){
$('#list').datagrid('selectRow',index); $('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections'); var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections'); $('#list').datagrid('clearSelections');
var code = is_row[0].UUID; var code = is_row[0].UUID;
...@@ -273,3 +273,25 @@ function searchRow(){ ...@@ -273,3 +273,25 @@ function searchRow(){
$('#list').datagrid('load',v_query); $('#list').datagrid('load',v_query);
} }
function enableRow(index){
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
if(is_row[0].FLAG==1){
$.messager.alert('提示',"该模板已启用!",'info');
return;
}
var map={};
map.FIELD_UUID=is_row[0].UUID;
map.FIELD_TABLE_ID=is_row[0].TABLE_ID
map.FIELD_FLAG=is_row[0].FLAG;
$.ajax({
url:'formmodelAct_enable',
data:map,
success:function(data){
$.messager.alert('提示',"启用成功!",'info');
$('#list').datagrid('load',{});
}
});
}
...@@ -18,4 +18,6 @@ public interface FormmodelsBusiness { ...@@ -18,4 +18,6 @@ public interface FormmodelsBusiness {
void delete_form_model(List<String> list)throws BusinessException; void delete_form_model(List<String> list)throws BusinessException;
void update_form_model(Map<String, Object> entity) throws BusinessException; void update_form_model(Map<String, Object> entity) throws BusinessException;
List<Map<String, Object>> list_form_model(Map<String, Object> entity)throws BusinessException;
} }
...@@ -128,4 +128,12 @@ public class FormmodelsBusinessImpl implements FormmodelsBusiness { ...@@ -128,4 +128,12 @@ public class FormmodelsBusinessImpl implements FormmodelsBusiness {
entity.put("info", updateList); entity.put("info", updateList);
} }
@Override
public List<Map<String, Object>> list_form_model(Map<String, Object> entity)
throws BusinessException {
// TODO Auto-generated method stub
return formmodelsDAO.list_form_models(entity);
}
} }
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<mapper namespace="com.gaowj.business.formtable.formtableDAO"> <mapper namespace="com.gaowj.business.formtable.formtableDAO">
<sql id="Where_Clause"> <sql id="Where_Clause">
<trim prefix="WHERE" prefixOverrides="AND |OR"> <trim prefix="WHERE" prefixOverrides="AND |OR">
and f.DELETE_FLAG=0
<if test="UUID != null and UUID != ''"> <if test="UUID != null and UUID != ''">
and f.UUID = #{UUID} and f.UUID = #{UUID}
</if> </if>
...@@ -65,7 +66,7 @@ ...@@ -65,7 +66,7 @@
<select id="list_form_table" parameterType="map" resultType="upperCaseKeyMap"> <select id="list_form_table" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[ <![CDATA[
select f.* select f.*
from C_T_FORM_TABLE f where DELETE_FLAG=0 from C_T_FORM_TABLE f
]]> ]]>
<include refid="Where_Clause" /> <include refid="Where_Clause" />
order by f.CREATE_TIME DESC order by f.CREATE_TIME DESC
......
...@@ -76,4 +76,28 @@ public class actAction extends BasicAction{ ...@@ -76,4 +76,28 @@ public class actAction extends BasicAction{
} }
return "json"; return "json";
} }
public String enable()throws BusinessException{
FormmodelsBusiness business = BusinessManager.getBusiness(FormmodelsBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
Map<String, Object> param=new HashMap<String, Object>();
param.put("TABLE_ID", entity.get("TABLE_ID"));
List<Map<String, Object>> result=business.list_form_model(param);
if(result.size()>0){
for(Map<String, Object> map:result){
if(map.get("UUID").equals(entity.get("UUID"))){
Map<String, Object> param1=new HashMap<String, Object>();
param1.put("UUID", map.get("UUID"));
param1.put("FLAG", 1);
business.update_form_model(param1);
}else{
Map<String, Object> param2=new HashMap<String, Object>();
param2.put("UUID", map.get("UUID"));
param2.put("FLAG", 0);
business.update_form_model(param2);
}
}
}
return "json";
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment