<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
|
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro" %>
|
<%
|
String path = request.getContextPath();
|
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
|
+ path + "/";
|
%>
|
|
<!DOCTYPE HTML>
|
<html>
|
<head>
|
<base href="<%=basePath%>">
|
<meta charset="UTF-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<title>模块配置</title>
|
<link href="static/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
|
<link href="static/plugins/jquery-easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css">
|
<link rel="stylesheet" href="static/plugins/jquery-steps/css/main.css" type="text/css">
|
<link rel="stylesheet" href="static/plugins/jquery-steps/css/jquery.steps.css" type="text/css">
|
<!--layer-->
|
<link rel="stylesheet" href="static/plugins/layer/skin/default/layer.css" type="text/css">
|
<link rel="stylesheet" href="static/styles/initialize.css" type="text/css">
|
<link rel="stylesheet" href="static/styles/common.css" type="text/css">
|
|
<script type="text/javascript" src="static/plugins/jquery/jquery.min.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui/jquery.easyui.min.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui-datagrid-dnd/datagrid-dnd.js"></script>
|
<script type="text/javascript" src="static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
|
<script type="text/javascript" src="static/scripts/jquery-extend.js"></script>
|
<script type="text/javascript" src="static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui-edatagrid/jquery.edatagrid.js"></script>
|
<!--layer-->
|
<script type="text/javascript" src="static/plugins/layer/layer.js"></script>
|
<script type="text/javascript" src="static/scripts/ResizeScroll.js"></script>
|
|
<script type="text/javascript" src="static/plugins/spinjs/spin.js"></script>
|
<script type="text/javascript" src="static/plugins/spinjs/jquery.spin.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery.blockUI.js"></script>
|
|
<script type="text/javascript" src="static/wcp/scripts/wcp.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.layer.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.blockUI.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.spin.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.jquery.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.infoPicker.js"></script>
|
|
<!--[if lt IE 9]>
|
<script type="text/javascript" src="static/plugins/json2.js"></script>
|
<script type="text/javascript" src="static/scripts/html5shiv.js"></script>
|
<![endif]-->
|
|
<style>
|
html, body {
|
height: 100%;
|
}
|
|
body {
|
overflow: hidden;
|
}
|
|
.wizard > .steps > ul > li {
|
width: 14%;
|
}
|
|
.combobox-group {
|
clear: both;
|
}
|
|
.combobox-gitem {
|
float: left;
|
padding-right: 10px;
|
}
|
|
.wizard > .steps > ul > li {
|
width: 14%;
|
cursor: pointer;
|
}
|
|
.conditonTable table {
|
margin: 0px !important;
|
text-align: center;
|
}
|
|
.pt-form .textbox-label {
|
width: 135px;
|
}
|
|
/*兼容html5*/
|
article, aside, dialog, footer, header, section, footer, nav, figure,
|
menu {
|
display: block
|
}
|
</style>
|
|
</head>
|
|
<body class="pt-tree">
|
<div class="pt-main-top clear">
|
<div class="pt-nav">
|
<span class="pt-title-icon">
|
<i class="fa fa-cube"></i>
|
</span>
|
<div class="pt-title">
|
<div>
|
<h4>模块配置</h4>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div id="mm" role="application" class="wizard">
|
<div class="steps clear">
|
<ul role="tablist" style="overflow:hidden;">
|
<li role="tab" class="first current" aria-selected="true">
|
<a id="mm-t-0">
|
<span class="number disabled">1.</span>
|
基本信息
|
</a>
|
</li>
|
<li role="tab" class="done">
|
<a id="mm-t-1">
|
<span class="number disabled">2.</span>
|
业务表
|
</a>
|
</li>
|
<li role="tab" class="done">
|
<a id="mm-t-2">
|
<span class="number disabled">3.</span>
|
表单设计
|
</a>
|
</li>
|
<li role="tab" class="done">
|
<a id="mm-t-3">
|
<span class="number disabled">4.</span>
|
操作
|
</a>
|
</li>
|
<li role="tab" class="done">
|
<a id="mm-t-4">
|
<span class="number disabled">5.</span>
|
视图
|
</a>
|
</li>
|
<li role="tab" class="done">
|
<a id="mm-t-5">
|
<span class="number disabled">6.</span>
|
流程
|
</a>
|
</li>
|
<li role="tab" class="last done">
|
<a id="mm-t-6">
|
<span class="number disabled">7.</span>
|
功能选项
|
</a>
|
</li>
|
</ul>
|
</div>
|
<div class="content">
|
<section id="mm-p-0" role="tabpanel" class="body current">
|
<div class="detail">
|
<form id="formModule">
|
<div class="currentmargin">
|
<input id="moduleName" name="moduleName" value="${module.moduleName}"
|
class="easyui-textbox easyui-validatebox" label="模块名称:" style="width:60%;"
|
data-options="required:true">
|
<input type="hidden" id="moduleId" name="moduleId" value="${module.moduleId}">
|
</div>
|
<div class="currentmargin">
|
<input id="moduleIdentify" name="moduleIdentify" value="${module.moduleIdentify}"
|
class="easyui-textbox easyui-validatebox" label="模块标识:" style="width:60%;"
|
data-options="required:true">
|
</div>
|
<div class="currentmargin">
|
<input id="parentId" name="parentId" class="easyui-combotree" label="上级模块:"
|
data-options="url:'config/module/getModuleListByComboTree',method:'get',panelHeight: 'auto'"
|
style="width:60%;" required="required" value="${module.parentId}"/>
|
</div>
|
<div class="currentmargin">
|
<input id="moduleType" name="moduleType" label="模块类型:" value="${module.moduleType}"
|
class="easyui-combobox" style="width:60%;"
|
data-options="showItemIcon: true,
|
data: [
|
{value:'0',text:'普通模块',iconCls:'fa fa-institution',selected:true},
|
{value:'1',text:'中心模块',iconCls:'fa fa fa-home'},
|
{value:'2',text:'模块类型2',iconCls:'fa fa-sitemap'},
|
{value:'3',text:'模块类型3',iconCls:'fa fa-address-card'},
|
{value:'4',text:'模块类型4',iconCls:'fa fa-address-book'}
|
],
|
editable: false,
|
panelHeight: 'auto'"/>
|
</div>
|
<div class="currentmargin">
|
<input id="moduleIcon" name="moduleIcon" label="模块图标:" value="${module.moduleIcon}"
|
class="easyui-textbox" type="text"
|
data-options="editable:false,buttonText:'选择图标',prompt:'',onClickButton:function(){selectIcon();}"
|
style="width:60%;"/>
|
</div>
|
<div class="currentmargin">
|
<input id="description" name="description" label="模块描述:" class="easyui-textbox" type="text"
|
class="easyui-textbox" data-options="multiline:true" style="height:120px;width:60%"
|
value="${module.description}"/>
|
</div>
|
<div class="currentmargin">
|
<input id="sortNum" name="sortNum" label="排序号:" class="easyui-numberspinner" style="width:60%"
|
data-options="min:1,max:1000,editable:true,required:true" value="${module.sortNum }">
|
</div>
|
<div class="currentmargin">
|
<input id="txt_permission" label="权限名称" name="permissionName" class="easyui-textbox" type="text"
|
value="${module.permissionName }"
|
data-options="required:true,editable:false,buttonText:'生成',prompt:'',onClickButton:function(){generatePermission(0);}"
|
style="width:60%;"/>
|
<!-- <a id="permission_but" class="pt-btn pt-btn-primary">选择权限</a> -->
|
<a id="add_permission_tree" onclick="addPermissionTree()"
|
class="pt-btn pt-btn-primary">加入权限配置树</a>
|
</div>
|
</form>
|
</div>
|
</section>
|
<section id="mm-p-1" role="tabpanel" class="body" style="display: none;">
|
<div class="detail">
|
<table id="dg_table" style="width:100%;"></table>
|
<div id="table_toolbar" class="clear">
|
<div class="pull-right">
|
<a onclick="addTable();" class="pt-btn pt-btn-success">
|
<i class="fa fa-plus"></i>
|
新增业务表
|
</a>
|
<a onclick="deleteTableClick();" class="pt-btn pt-btn-danger">
|
<i class="fa fa-trash-o"></i>
|
删除业务表
|
</a>
|
<a onclick="setMainTable();" class="pt-btn pt-btn-info">
|
<i class="fa fa-trash-o"></i>
|
设为主表
|
</a>
|
<a href="javascript:;" onclick="freshTable('t_bus');" class="pt-btn pt-btn-purple">
|
<i class="fa fa-refresh"></i>
|
刷新
|
</a>
|
</div>
|
</div>
|
</div>
|
</section>
|
<section id="mm-p-2" role="tabpanel" class="body" style="display: none;">
|
<div class="detail">
|
<table id="t_form" style="width:100%;"></table>
|
<div id="form_toolbar" class="clear">
|
<div class="pull-right">
|
<a href="javascript:;" onclick="addForm();" class="pt-btn pt-btn-success">
|
<i class="fa fa-plus"></i>
|
新增表单
|
</a>
|
<a onclick="deleteFormClick();" class="pt-btn pt-btn-danger">
|
<i class="fa fa-trash-o"></i>
|
删除表单
|
</a>
|
<a onclick="setMainForm();" class="pt-btn pt-btn-info">
|
<i class="fa fa-trash-o"></i>
|
设为主表单
|
</a>
|
<a href="javascript:;" class="pt-btn pt-btn-info" onclick="enableSort(this,'t_form')">
|
<i class="fa fa-retweet"></i>
|
排序
|
</a>
|
<a href="javascript:;" onclick="freshTable('t_form');" class="pt-btn pt-btn-purple">
|
<i class="fa fa-refresh"></i>
|
刷新
|
</a>
|
</div>
|
</div>
|
</div>
|
</section>
|
<section id="mm-p-3" role="tabpanel" class="body" style="display: none;">
|
<div class="detail">
|
<table id="t_operation" style="width:100%;"></table>
|
<div id="operation_toolbar" class="clear">
|
<div class="pull-right">
|
<a href="javascript:;" onclick="addSystemOperation();" class="pt-btn pt-btn-success">
|
<i class="fa fa-plus"></i>
|
新增系统操作
|
</a>
|
<a href="javascript:;" onclick="addOperation(0);" class="pt-btn pt-btn-success">
|
<i class="fa fa-plus"></i>
|
新增操作
|
</a>
|
<!-- <a href="javascript:;" class="pt-btn pt-btn-info" onclick="enableSort(this,'t_operation')">
|
<i class="fa fa-retweet"></i>排序
|
</a> -->
|
<a href="javascript:;" onclick="freshTable('t_operation');" class="pt-btn pt-btn-purple">
|
<i class="fa fa-refresh"></i>
|
刷新
|
</a>
|
</div>
|
</div>
|
</div>
|
</section>
|
<section id="mm-p-4" role="tabpanel" class="body" style="display: none;">
|
<div class="detail">
|
<table id="t_view" style="width:100%;"></table>
|
<div id="view_toolbar" class="clear">
|
<div class="pull-right">
|
<a href="javascript:;" onclick="addView();" class="pt-btn pt-btn-success">
|
<i class="fa fa-plus"></i>
|
新增视图
|
</a>
|
<a onclick="deleteViewClick();" class="pt-btn pt-btn-danger">
|
<i class="fa fa-trash-o"></i>
|
删除视图
|
</a>
|
<a href="javascript:;" class="pt-btn pt-btn-info" onclick="enableSort(this,'t_view')">
|
<i class="fa fa-retweet"></i>
|
排序
|
</a>
|
<a href="javascript:;" onclick="freshTable('t_view');" class="pt-btn pt-btn-purple">
|
<i class="fa fa-refresh"></i>
|
刷新
|
</a>
|
</div>
|
</div>
|
</div>
|
</section>
|
<section id="mm-p-5" role="tabpanel" class="body" style="display: none;">
|
<div class="detail">
|
<table id="t_flow" style="width:100%;"></table>
|
<div id="flow_toolbar" class="clear">
|
<div class="pull-right">
|
<a href="javascript:;" onclick="addFlow();" class="pt-btn pt-btn-success">
|
<i class="fa fa-plus"></i>
|
新增流程
|
</a>
|
<a onclick="deleteFlowClick();" class="pt-btn pt-btn-danger">
|
<i class="fa fa-trash-o"></i>
|
删除流程
|
</a>
|
<a href="javascript:;" class="pt-btn pt-btn-info" onclick="enableSort(this,'t_flow')">
|
<i class="fa fa-retweet"></i>
|
排序
|
</a>
|
<a href="javascript:;" onclick="freshTable('t_flow');" class="pt-btn pt-btn-purple">
|
<i class="fa fa-refresh"></i>
|
刷新
|
</a>
|
</div>
|
</div>
|
</div>
|
</section>
|
<section id="mm-p-6" role="tabpanel" class="body" style="display: none;">
|
<div class="detail">
|
<div class="pt-form">
|
<form id="formModuleFunOption">
|
<div class="ptbody">
|
<div class="pttable">
|
<div class="form-unit1">附件选项</div>
|
<table style="width: 90%;">
|
<tr>
|
<td class="tbtitle" style="width: 100px;color:red ">启用正文:</td>
|
<td>
|
<input type="hidden" id="enableAttachBody" name="enableAttachBody"
|
value="${module.enableAttachBody}"/>
|
<input id="enableAttachBodyText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
</td>
|
</tr>
|
<tr class="tr_attach_body" style="display: none">
|
<td class="tbtitle" style="width: 180px; ">启用模板创建正文/上传正文按钮别名:</td>
|
<td>
|
<input type="hidden" id="enableBodyTemplate" name="enableBodyTemplate"
|
value="${module.enableBodyTemplate}"/>
|
<input id="enableBodyTemplateText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>/
|
<input id="uploadBodyOtherName" name="uploadBodyOtherName"
|
class="easyui-textbox" type="text" style="width:150px;"
|
value="${module.uploadBodyOtherName}"/>
|
</td>
|
</tr>
|
|
<tr>
|
<td class="tbtitle" style="width: 180px;color:red ">启用源文件上传:</td>
|
<td>
|
<input type="hidden" id="enableAttachOrigin" name="enableAttachOrigin"
|
value="${module.enableAttachOrigin}"/>
|
<input id="enableAttachOriginText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
</td>
|
</tr>
|
<tr class="tr_attach_origin" style="display: none">
|
<td class="tbtitle" style="width: 180px; ">上传源文件按钮别名:</td>
|
<td>
|
<input id="uploadOriginOtherName" name="uploadOriginOtherName"
|
class="easyui-textbox" type="text" style="width:150px;"
|
value="${module.uploadOriginOtherName}"/>
|
</td>
|
</tr>
|
<tr class="tr_attach_origin" style="display: none">
|
<td class="tbtitle">源文件限制大小:</td>
|
<td>
|
<input id="attachOriginSizeLimit" name="attachOriginSizeLimit"
|
class="easyui-numberspinner" type="text" style="width:150px;"
|
value="${module.attachOriginSizeLimit}"/>
|
MB
|
</td>
|
</tr>
|
<tr class="tr_attach_origin" style="display: none">
|
<td class="tbtitle">源文件允许格式:</td>
|
<td>
|
<input id="attachOriginFormatLimit" name="attachOriginFormatLimit"
|
class="easyui-textbox" type="text" style="width:450px;"
|
value="${module.attachOriginFormatLimit}"/>
|
</td>
|
</tr>
|
<tr>
|
<td class="tbtitle" style="width: 180px;color:red ">启用附件:</td>
|
<td>
|
<input type="hidden" id="enableAttach" name="enableAttach"
|
value="${module.enableAttach}"/>
|
<input id="enableAttachText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
</td>
|
</tr>
|
<tr class="tr_attach" style="display: none">
|
<td class="tbtitle" style="width: 180px; ">启用模板创建附件/上传按钮别名:</td>
|
<td>
|
<input type="hidden" id="enableAttachTemplate" name="enableAttachTemplate"
|
value="${module.enableAttachTemplate}"/>
|
<input id="enableAttachTemplateText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>/
|
<input id="uploadAttachOtherName" name="uploadAttachOtherName"
|
class="easyui-textbox" type="text" style="width:150px;"
|
value="${module.uploadAttachOtherName}"/>
|
</td>
|
</tr>
|
<tr class="tr_attach" style="display: none">
|
<td class="tbtitle">附件限制大小:</td>
|
<td>
|
<input id="attachSizeLimit" name="attachSizeLimit"
|
class="easyui-numberspinner" type="text" style="width:150px;"
|
value="${module.attachSizeLimit}"/>
|
MB
|
</td>
|
</tr>
|
<tr class="tr_attach" style="display: none">
|
<td class="tbtitle">附件允许格式:</td>
|
<td>
|
<input id="attachFormatLimit" name="attachFormatLimit"
|
class="easyui-textbox" type="text" style="width:450px;"
|
value="${module.attachFormatLimit}"/>
|
</td>
|
</tr>
|
<tr>
|
<td class="tbtitle" style="width: 180px;">启用附件主件:</td>
|
<td>
|
<input type="hidden" id="enableMainAttach" name="enableMainAttach"
|
value="${module.enableMainAttach}"/>
|
<input id="enableMainAttachText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
</td>
|
</tr>
|
<tr>
|
<td class="tbtitle" style="width: 180px;">启用附件排序:</td>
|
<td>
|
<input type="hidden" id="enableAttachSort" name="enableAttachSort"
|
value="${module.enableAttachSort}"/>
|
<input id="enableAttachSortText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
</td>
|
</tr>
|
<tr id="tr_customWaterMark">
|
<td class="tbtitle">自定义水印:</td>
|
<td>
|
<input id="customWaterMark" name="customWaterMark" class="easyui-textbox"
|
type="text" value="${module.customWaterMark}"
|
data-options="buttonText:'选择字段',prompt:'',onClickButton:selectMarkColumn"
|
style="width:450px;"/>
|
</td>
|
</tr>
|
<tr>
|
<td class="tbtitle">启用自定义存储:</td>
|
<td>
|
<input type="hidden" id="enableDefineAttachSave"
|
name="enableDefineAttachSave"
|
value="${module.enableDefineAttachSave}"/>
|
<input id="enableDefineAttachSaveText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
</td>
|
</tr>
|
<tr id="tr_uploadPath" style="display:none">
|
<td class="tbtitle">附件存储地址:</td>
|
<td>
|
<input id="attachUploadPath" name="attachUploadPath" class="easyui-textbox"
|
type="text" style="width:300px;" value="${module.attachUploadPath}"/>
|
</td>
|
</tr>
|
<tr id="tr_viewPath" style="display:none">
|
<td class="tbtitle">附件虚拟地址:</td>
|
<td>
|
<input id="attachViewPath" name="attachViewPath" class="easyui-textbox"
|
type="text" style="width:300px;" value="${module.attachViewPath}"/>
|
</td>
|
</tr>
|
<tr>
|
<td class="tbtitle" style="width: 180px; ">提取文件MD5码:</td>
|
<td>
|
<input type="hidden" id="enableGetAttachMd5Code"
|
name="enableGetAttachMd5Code"
|
value="${module.enableGetAttachMd5Code}"/>
|
<input id="enableGetAttachMd5CodeText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
</td>
|
</tr>
|
<tr>
|
<td class="tbtitle" style="width: 180px; ">启用附件转换:</td>
|
<td>
|
<input type="hidden" id="enableAttachConversion"
|
name="enableAttachConversion"
|
value="${module.enableAttachConversion}"/>
|
<input id="enableAttachConversionText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
</td>
|
</tr>
|
<tr id="tr_attachConversionRules" style="display: none">
|
<td class="tbtitle">附件转换规则:</td>
|
<td>
|
<input class="easyui-checkbox" name="attachConversionRules"
|
value="PDFCompress" label="PDF压缩 ">
|
|
<input class="easyui-checkbox" name="attachConversionRules"
|
value="DoublePDF" label="PDF转换为双层PDF">
|
|
<input class="easyui-checkbox" name="attachConversionRules"
|
value="OfficeToPDF" label="Office转换为PDF">
|
|
<input class="easyui-checkbox" name="attachConversionRules" value="CADToPDF"
|
label="CAD转换为PDF">
|
<br/>
|
<input class="easyui-checkbox" name="attachConversionRules"
|
value="ImageToTIF" label="大图转换为金字塔">
|
|
<input class="easyui-checkbox" name="attachConversionRules"
|
value="AudioToMP3" label="音频文件转换为MP3">
|
|
<input class="easyui-checkbox" name="attachConversionRules"
|
value="VideoToMP4" label="视频文件转换为MP4">
|
|
<input class="easyui-checkbox" name="attachConversionRules"
|
value="TifToImage" label="tif转换为图片">
|
<br/>
|
<input class="easyui-checkbox" name="attachConversionRules" value="Custom"
|
label="自定义转换类">
|
|
<input id="customClassName" class="easyui-textbox" type="text"
|
style="width:400px;"/>请填写继承AttachConverter接口的类全路径
|
</td>
|
</tr>
|
<tr>
|
<td class="tbtitle" style="width: 180px; ">提取附件略缩图:</td>
|
<td>
|
<input type="hidden" id="enableAttachThumbnail" name="enableAttachThumbnail"
|
value="${module.enableAttachThumbnail}"/>
|
<input id="enableAttachThumbnailText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
|
</td>
|
</tr>
|
<tr id="tr_attachThumbnailWidth" style="display: none">
|
<td class="tbtitle">略缩图宽度:</td>
|
<td>
|
<input id="attachThumbnailWidth" name="attachThumbnailWidth"
|
class="easyui-textbox" type="text" style="width:300px;"
|
value="${module.attachThumbnailWidth}"/>
|
</td>
|
</tr>
|
<tr id="tr_attachThumbnailHeight" style="display: none">
|
<td class="tbtitle">略缩图高度:</td>
|
<td>
|
<input id="attachThumbnailHeight" name="attachThumbnailHeight"
|
class="easyui-textbox" type="text" style="width:300px;"
|
value="${module.attachThumbnailHeight}"/>
|
</td>
|
</tr>
|
<tr>
|
<td class="tbtitle" style="width: 180px; ">启用加密存储:</td>
|
<td>
|
<input type="hidden" id="enableAttachEncrypted" name="enableAttachEncrypted"
|
value="${module.enableAttachEncrypted}"/>
|
<input id="enableAttachEncryptedText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
</td>
|
</tr>
|
<tr>
|
<td class="tbtitle">批量下载文件夹存储规则/批量下载最大允许数量:</td>
|
<td>
|
<input id="batchDownloadFolder" name="batchDownloadFolder"
|
class="easyui-textbox" type="text" style="width:450px;"
|
value="${module.batchDownloadFolder}"
|
data-options="buttonText:'选字段',prompt:'用于批量下载压缩包文件夹命名',onClickButton:selectBatchDownloadFolderColumn"/>/
|
<input id="batchDownloadMaxCount" name="batchDownloadMaxCount"
|
class="easyui-textbox" type="text" style="width:80px;"
|
value="${module.batchDownloadMaxCount}"
|
/>
|
</td>
|
</tr>
|
</table>
|
<div class="form-unit1">流程选项</div>
|
<table style="width: 90%;">
|
<tr>
|
<td class="tbtitle" style="width: 180px; ">启用流程:</td>
|
<td>
|
<input type="hidden" id="enableFlow" name="enableFlow"
|
value="${module.enableFlow}"/>
|
<input id="enableFlowText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
</td>
|
</tr>
|
<tr>
|
<td class="tbtitle" style="width: 180px; ">启用列表方式显示历史意见:</td>
|
<td>
|
<input type="hidden" id="enableListShowHistory"
|
name="enableListShowHistory"
|
value="${module.enableListShowHistory}"/>
|
<input id="enableListShowHistoryText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
</td>
|
</tr>
|
</table>
|
<div class="form-unit1">数据选项</div>
|
<table style="width: 90%;">
|
<tr>
|
<td class="tbtitle" style="width: 180px; ">启用目录全文索引:</td>
|
<td>
|
<input type="hidden" id="enableCatalogFulltext" name="enableCatalogFulltext"
|
value="${module.enableCatalogFulltext}"/>
|
<input id="enableCatalogFulltextText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
</td>
|
</tr>
|
<tr class="catalogsearch" style="display:none">
|
<td class="tbtitle">搜索字段:</td>
|
<td>
|
<input id="catalogSearchFields" name="catalogSearchFields"
|
class="easyui-textbox" type="text" style="width:700px;"
|
value="${module.catalogSearchFields}"
|
data-options="buttonText:'选字段',prompt:'用于进行内容搜索的字段,不选择字段则全字段搜索',onClickButton:selectColumn"/>
|
</td>
|
</tr>
|
<tr class="catalogsearch" style="display:none">
|
<td class="tbtitle">搜索结果分组字段:</td>
|
<td>
|
<input id="catalogSearchResultGroup" name="catalogSearchResultGroup"
|
class="easyui-textbox" type="text" style="width:700px;"
|
value="${module.catalogSearchResultGroup}"
|
data-options="buttonText:'选字段',prompt:'用于对搜索结果进行分组统计和筛选',onClickButton:selectColumn"/>
|
</td>
|
</tr>
|
<tr class="catalogsearch" style="display:none">
|
<td class="tbtitle">搜索结果显示标题:</td>
|
<td>
|
<input id="catalogSearchResultTitle" name="catalogSearchResultTitle"
|
class="easyui-textbox" type="text" style="width:700px;"
|
value="${module.catalogSearchResultTitle}"
|
data-options="buttonText:'选字段',prompt:'用于在搜索结果列表中显示为标题',onClickButton:selectColumn"/>
|
</td>
|
</tr>
|
<tr class="catalogsearch" style="display:none">
|
<td class="tbtitle">搜索结果显示明细:</td>
|
<td>
|
<input id="catalogSearchResultDetail" name="catalogSearchResultDetail"
|
class="easyui-textbox" type="text" style="width:700px;"
|
value="${module.catalogSearchResultDetail}"
|
data-options="buttonText:'选字段',prompt:'用于在搜索结果列表中显示为明细信息',onClickButton:selectColumn"/>
|
</td>
|
</tr>
|
<tr>
|
<td class="tbtitle">启用附件全文索引:</td>
|
<td>
|
<input type="hidden" id="enableAttachFulltext" name="enableAttachFulltext"
|
value="${module.enableAttachFulltext}"/>
|
<input id="enableAttachFulltextText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
</td>
|
</tr>
|
<tr>
|
<td class="tbtitle">启用数据软删除:</td>
|
<td>
|
<input type="hidden" id="enableSoftDelete" name="enableSoftDelete"
|
value="${module.enableSoftDelete}"/>
|
<input id="enableSoftDeleteText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
<span class="pt-text-color">注:启用软删除后,请在业务表中添加系统字段“delete_state”,并在视图中添加相应的条件</span>
|
</td>
|
</tr>
|
<tr>
|
<td class="tbtitle">启用数据授权:</td>
|
<td>
|
<input type="hidden" id="enableDataAuthorize" name="enableDataAuthorize"
|
value="${module.enableDataAuthorize}"/>
|
<input id="enableDataAuthorizeText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
<span class="pt-text-color"></span>
|
</td>
|
</tr>
|
<tr class="tr_authorize" style="display:none">
|
<td class="tbtitle">条目授权:</td>
|
<td>
|
<input type="hidden" id="enableDataItemAuthorize"
|
name="enableDataItemAuthorize"
|
value="${module.enableDataItemAuthorize}"/>
|
<input id="enableDataItemAuthorizeText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
附件授权:
|
<input type="hidden" id="enableAttachAuthorize" name="enableAttachAuthorize"
|
value="${module.enableAttachAuthorize}"/>
|
<input id="enableAttachAuthorizeText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
|
</td>
|
</tr>
|
<tr id="tr_filePermission">
|
<td class="tbtitle">启用单文件授权:</td>
|
<td>
|
<input type="hidden" id="enableFilePermission" name="enableFilePermission"
|
value="${module.enableFilePermission}"/>
|
<input id="enableFilePermissionText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
<span class="pt-text-color"></span>
|
</td>
|
</tr>
|
<tr class="tr_authorize" style="display:none">
|
<td class="tbtitle">数据授权条件配置:</td>
|
<td>
|
<a id="a_configCondition" href="javascript:void(0)"
|
class="pt-btn pt-btn-primary" onclick="configCondition()">配置条件</a>
|
</td>
|
</tr>
|
<tr class="tr_authorize" style="display:none">
|
<td class="tbtitle">目录数据自定义验证方法[暂未完成]:</td>
|
<td>
|
<input name="customDataItemAuthorize" class="easyui-textbox" type="text"
|
style="width:400px;" value="${module.customDataItemAuthorize}"/>
|
<span class="pt-text-color">注:方法名格式“方法名(Long moduleId)”</span>
|
</td>
|
</tr>
|
<tr class="tr_authorize" style="display:none">
|
<td class="tbtitle">附件数据自定义验证方法:</td>
|
<td>
|
<input name="customAttachAuthorize" class="easyui-textbox" type="text"
|
style="width:400px;" value="${module.customAttachAuthorize}"/>
|
<span class="pt-text-color">注:方法名格式“方法名(Long moduleId,Long keyId,Integer type),type为:1 浏览,2 打印,3 下载,返回true,false”</span>
|
</td>
|
</tr>
|
<tr class="tr_authorize" style="display:none">
|
<td class="tbtitle">验证失败自定义跳转视图:</td>
|
<td>
|
<input name="customValidationFailView" class="easyui-textbox" type="text"
|
style="width:400px;" value="${module.customValidationFailView}"/>
|
<span class="pt-text-color">注:跳转后的jsp页面,可直接获取到值(attach,moduleId,keyId,type),type为:0浏览表单数据,1 浏览附件,2 打印附件,3 下载附件”</span>
|
</td>
|
</tr>
|
<tr>
|
<td class="tbtitle">启用数据涉密控制:</td>
|
<td>
|
<input type="hidden" id="enableDataSecret" name="enableDataSecret"
|
value="${module.enableDataSecret}"/>
|
<input id="enableDataSecretText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
<span class="pt-text-color"></span>
|
</td>
|
</tr>
|
</table>
|
<div class="form-unit1">业务配置</div>
|
<table style="width: 90%;">
|
<tr>
|
<td class="tbtitle" style="width: 180px; ">保存前提取原来的数据用于保存后事件:</td>
|
<td>
|
<input type="hidden" id="getOldDataForAfterSave" name="getOldDataForAfterSave"
|
value="${module.getOldDataForAfterSave}"/>
|
<input id="getOldDataForAfterSaveText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
<span class="pt-text-color"></span>
|
</td>
|
</tr>
|
<tr>
|
<td class="tbtitle" style="width: 180px; ">保存修改明细日志:</td>
|
<td>
|
<input type="hidden" id="saveModifyDetailLog" name="saveModifyDetailLog"/>
|
<input id="saveModifyDetailLogText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
<span class="pt-text-color"></span>
|
</td>
|
|
</tr>
|
</table>
|
<div class="form-unit1">手机端配置</div>
|
<table style="width: 90%;">
|
<tr>
|
<td class="tbtitle" style="width: 180px; ">启用手机端功能:</td>
|
<td>
|
<input type="hidden" id="enableApp" name="enableApp"
|
value="${module.enableApp}"/>
|
<input id="enableAppText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
<span class="pt-text-color"></span>
|
</td>
|
</tr>
|
<tr id="css_enableAppPermission">
|
<td class="tbtitle" style="width: 180px; ">是否使用权限:</td>
|
<td>
|
<input type="hidden" id="enableAppPermission" name="enableAppPermission"/>
|
<input id="enableAppPermissionText" class="easyui-switchbutton"
|
data-options="onText:'是',offText:'否',onChange:setEnableValue"/>
|
<span class="pt-text-color"></span>
|
</td>
|
|
</tr>
|
<tr id="css_appPermissionName">
|
<td class="tbtitle" style="width: 180px; ">权限名称:</td>
|
<td>
|
<input id="appPermissionName" name="appPermissionName"
|
class="easyui-textbox" type="text" style="width:700px;"
|
value="${module.appPermissionName }"
|
data-options="editable:false,buttonText:'生成',prompt:'',onClickButton:function(){generatePermission(1);}"/>
|
<a id="appPermission_but" class="pt-btn pt-btn-default">选择权限</a>
|
</td>
|
</tr>
|
</table>
|
<div class="form-unit1">其他信息</div>
|
<table style="width: 90%;">
|
<tr>
|
<td></td>
|
<td>
|
<div>
|
<a id="subtab_but" class="pt-btn pt-btn-primary">页签配置</a>
|
<a id="reading_but" class="pt-btn pt-btn-primary">阅读版式</a>
|
<a id="coding_but" class="pt-btn pt-btn-primary">编码配置</a>
|
<a id="import_but" class="pt-btn pt-btn-primary">导入配置</a>
|
<a id="classification_but" class="pt-btn pt-btn-primary">导航分类配置</a>
|
<a id="report_but" class="pt-btn pt-btn-primary">报表配置</a>
|
<a id="cascadingDelete_but" class="pt-btn pt-btn-primary">级联删除配置</a>
|
</div>
|
</td>
|
|
</tr>
|
</table>
|
</div>
|
</div>
|
</form>
|
</div>
|
</div>
|
</section>
|
</div>
|
|
<div class="pt-form-btn" style="bottom: 0px;">
|
<div class="form-group">
|
<button id="finish" class="pt-btn pt-btn-primary">保存</button>
|
<button id="prev" class="pt-btn">上一步</button>
|
<button id="next" class="pt-btn pt-btn-primary">下一步</button>
|
<button id="export" class="pt-btn pt-btn-primary">导出</button>
|
|
</div>
|
</div>
|
</div>
|
</body>
|
<script type="text/javascript" src="static/scripts/ResizeScroll.js"></script>
|
|
<script>
|
var t_bus = null;
|
var t_form = null;
|
var t_view = null;
|
var t_operation = null;
|
var t_flow = null;
|
var currentIndex = 0;
|
var permissionParentId;
|
var usedParentId;
|
var mainTableName = "${module.mainTableName}";
|
|
$(function () {
|
usedParentId = "${module.parentId}";
|
permissionParentId = "${parentId}";
|
var moduleId = "${module.moduleId}";
|
if (moduleId != "" && moduleId > 0) {
|
$("#moduleIdentify").textbox("disable");
|
}
|
if (moduleId == "" || moduleId == 0) {
|
$("#permission_but").click(function () {
|
selectPermission();
|
});
|
}
|
init();
|
initEnableCheck();
|
new ResizeScroll({
|
"id": ".detail",
|
fun: function () {
|
var wh = $(window).height();
|
$(".content").height(wh - 69 - 78 - 52);
|
return (wh - 69 - 78 - 52);
|
}
|
});
|
|
$("#next").click(function () {
|
if (!$(this).hasClass("pt-btn-primary") || currentIndex == 6) {
|
return;
|
}
|
var valid = getValid(currentIndex);
|
if (!valid) {
|
$("[role=tab]").eq(currentIndex).removeClass("current").addClass("error");
|
|
return;
|
} else {
|
if ($("[role=tab]").eq(currentIndex).hasClass("error")) {
|
$("[role=tab]").eq(currentIndex).removeClass("error").addClass("current");
|
}
|
}
|
currentIndex++;
|
$("[role=tab]").eq(currentIndex).click();
|
});
|
|
$("#prev").click(function () {
|
if (!$(this).hasClass("pt-btn-primary") || currentIndex == 0) {
|
return;
|
}
|
var valid = getValid(currentIndex);
|
if (!valid) {
|
$("[role=tab]").eq(currentIndex).removeClass("current").addClass("error");
|
return;
|
} else {
|
if ($("[role=tab]").eq(currentIndex).hasClass("error")) {
|
$("[role=tab]").eq(currentIndex).removeClass("error").addClass("current");
|
}
|
}
|
|
currentIndex--;
|
$("[role=tab]").eq(currentIndex).click();
|
|
});
|
|
$("#finish").click(function () {
|
switch (currentIndex) {
|
case 0:
|
baseInfoSave(); //保存基本信息
|
break;
|
case 6:
|
funOptionSave(); //功能选项保存
|
break;
|
}
|
|
});
|
|
$("#subtab_but").click(function () {
|
var url = "config/subtab?moduleId=${module.moduleId}";
|
var title = "页签配置";
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ["900px", "500px"],
|
fixed: false,
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将回调函数传给子页面
|
//iframeWin.params.callBack = refreshData;
|
}
|
});
|
});
|
|
$("#reading_but").click(function () {
|
var url = "config/reading?moduleId=${module.moduleId}";
|
var title = "阅读版式配置";
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ["900px", "500px"],
|
fixed: false,
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将回调函数传给子页面
|
//iframeWin.params.callBack = refreshData;
|
}
|
});
|
});
|
|
$("#coding_but").click(function () {
|
var url = "config/coding?moduleId=${module.moduleId}";
|
var title = "编码配置";
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ["900px", "500px"],
|
fixed: false,
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
}
|
});
|
});
|
|
$("#import_but").click(function () {
|
var url = "config/importTemplate?moduleId=${module.moduleId}";
|
var title = "导入配置";
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ["900px", "500px"],
|
fixed: false,
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
}
|
});
|
});
|
|
$("#classification_but").click(function () {
|
var url = "config/navigationClassification?moduleId=${module.moduleId}";
|
var title = "导航分类配置";
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ["1000px", "550px"],
|
fixed: false,
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
}
|
});
|
});
|
|
$("#report_but").click(function () {
|
var url = "config/report?moduleId=${module.moduleId}";
|
var title = "报表配置";
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ["900px", "500px"],
|
fixed: false,
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将回调函数传给子页面
|
//iframeWin.params.callBack = refreshData;
|
}
|
});
|
});
|
|
$("#cascadingDelete_but").click(function () {
|
var url = "config/cascadingDelete?moduleId=${module.moduleId}";
|
var title = "条件设置";
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ["900px", "500px"],
|
fixed: false,
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将回调函数传给子页面
|
//iframeWin.params.callBack = refreshData;
|
}
|
});
|
});
|
$("#appPermission_but").click(function () {
|
selectPermission();
|
});
|
|
$("#export").click(function () {
|
layer.confirm("确定要导出该模块的所有配置吗?", {
|
icon: 3,
|
title: '提示'
|
}, function (index) {
|
var form = document.getElementById('#downModule');
|
if (form == null) {
|
form = $("<form>");
|
form.attr("id", "downModule");
|
form.attr("style", "display:none");
|
form.attr("target", "");
|
form.attr("method", "post");
|
$("body").append(form);
|
}
|
form.attr("action", "config/module/exportConfigData?moduleId=" + moduleId);
|
form.submit();
|
layer.close(index);
|
});
|
});
|
|
})
|
|
function init() {
|
$("[role=tab]").click(function () {
|
var index = $(this).index();
|
if ($(this).hasClass("done") || $(this).hasClass("current")) {
|
|
$(this).removeClass("disabled error done").addClass("current");
|
$(this).siblings().not(".disabled").removeClass("current").addClass("done");
|
$("[id^=mm-p-]").hide();
|
$("#mm-p-" + index).show();
|
|
currentIndex = index;
|
|
switch (index) {
|
case 1:
|
if (t_bus == null) {
|
getBusTable();
|
}
|
break;
|
case 2:
|
if (t_form == null) {
|
getFormTable();
|
}
|
break;
|
case 3:
|
if (t_operation == null) {
|
getOperationTable();
|
}
|
break;
|
case 4:
|
if (t_view == null) {
|
getViewTable();
|
}
|
break;
|
case 5:
|
if (t_flow == null) {
|
getFlowTable();
|
}
|
break;
|
}
|
|
//处理上一步显示
|
if (index == 0) {
|
$("#prev").removeClass("pt-btn-primary");
|
|
} else {
|
if (!$("#prev").hasClass("pt-btn-primary")) {
|
$("#prev").addClass("pt-btn-primary");
|
}
|
|
|
}
|
//处理下一步显示
|
if (index == 6) {
|
$("#next").removeClass("pt-btn-primary");
|
|
} else {
|
if (!$("#next").hasClass("pt-btn-primary")) {
|
$("#next").addClass("pt-btn-primary");
|
}
|
|
}
|
|
|
//处理保存按钮
|
if (index == 0 || index == 5 || index == 6) {
|
if (!$("#finish").hasClass("pt-btn-primary")) {
|
$("#finish").addClass("pt-btn-primary")
|
}
|
} else {
|
$("#finish").removeClass("pt-btn-primary")
|
}
|
|
|
}
|
|
})
|
}
|
|
//选择图标
|
function selectIcon() {
|
wcp.picker.selectIcon({
|
title: "请选择图标",
|
nameElement: "moduleIcon",
|
layerOpener: window
|
});
|
}
|
|
//模块信息保存
|
function baseInfoSave() {
|
valid = getValid(0);
|
if (!valid) {
|
$("[role=tab]").eq(0).removeClass("current").addClass("error");
|
return;
|
}
|
$("[role=tab]").eq(0).removeClass("error").addClass("current");
|
|
var newParentId = $("#parentId").combotree("getValue");
|
|
if (usedParentId != newParentId) {
|
layer.alert("上级模块改变,请重新填写权限 ");
|
return false;
|
}
|
//保存数据
|
var obj = $("#formModule").serializeObject();
|
wcp.ui.setBusy("body", wcp.ajax({
|
url: "config/module/saveModule?permissionId=" + "${permissionId}" + "&parentId=" + permissionParentId,
|
data: JSON.stringify(obj),
|
}).done(function (result) {
|
wcp.notify.success("保存成功!");
|
}));
|
|
//下一步可用
|
$("#next").addClass("pt-btn-primary");
|
}
|
|
//功能选项保存(合并tab0的表单数据)
|
function funOptionSave() {
|
var valid = getValid(0);
|
if (!valid) {
|
$("[role=tab]").eq(0).removeClass("current").addClass("error");
|
return;
|
}
|
$("[role=tab]").eq(0).removeClass("error").addClass("current");
|
valid = getValid(6);
|
if (!valid) {
|
$("[role=tab]").eq(6).removeClass("current").addClass("error");
|
return;
|
}
|
$("[role=tab]").eq(6).removeClass("error").addClass("current");
|
|
var newParentId = $("#parentId").combotree("getValue");
|
if (usedParentId != newParentId) {
|
layer.alert("上级模块改变,请重新填写权限 ");
|
return false;
|
}
|
var obj0 = $("#formModule").serializeObject();
|
var obj6 = $("#formModuleFunOption").serializeObject();
|
var attachConversionRules = obj6.attachConversionRules;
|
var attachConversionRulesStr = "";
|
if (typeof attachConversionRules != "undefined" && attachConversionRules != "PDFCompress"
|
&& attachConversionRules != "DoublePDF" && attachConversionRules != "OfficeToPDF"
|
&& attachConversionRules != "CADToPDF" && attachConversionRules != "ImageToTIF"
|
&& attachConversionRules != "AudioToMP3" && attachConversionRules != "VideoToMP4"
|
&& attachConversionRules != "TifToImage"
|
&& attachConversionRules != "Custom") {
|
for (var i = 0; i < attachConversionRules.length; i++) {
|
attachConversionRulesStr = attachConversionRulesStr + "|" + attachConversionRules[i];
|
if (i == attachConversionRules.length - 1 && "Custom" == attachConversionRules[i]) {
|
attachConversionRulesStr = attachConversionRulesStr + " " + $("#customClassName").val();
|
}
|
}
|
attachConversionRulesStr = attachConversionRulesStr.substring(1);
|
} else if (typeof attachConversionRules == "undefined") {
|
attachConversionRulesStr = "";
|
} else {
|
attachConversionRulesStr = attachConversionRules;
|
}
|
if (attachConversionRules == "Custom") {
|
attachConversionRulesStr = attachConversionRules + " " + $("#customClassName").val();
|
}
|
obj6.attachConversionRules = attachConversionRulesStr;
|
var obj = $.extend({}, obj0, obj6);
|
wcp.ui.setBusy("body", wcp.ajax({
|
url: "config/module/saveModule?permissionId=" + "${permissionId}" + "&parentId=" + permissionParentId,
|
data: JSON.stringify(obj),
|
}).done(function (result) {
|
wcp.notify.success("保存成功!");
|
}));
|
}
|
|
//选择权限
|
function selectPermission() {
|
var moduleId = $("#parentId").combotree("getValue");
|
usedParentId = moduleId;
|
wcp.picker.selectPermission({
|
title: "请选择权限",
|
multiSelect: false,
|
nameElement: "appPermissionName",
|
layerOpener: window
|
});
|
}
|
|
//生成权限
|
function generatePermission(type) {
|
var moduleIdentify = $("#moduleIdentify").textbox("getValue");
|
var moduleId = $("#parentId").combotree("getValue");
|
usedParentId = moduleId;
|
if (moduleIdentify == "") {
|
layer.alert("请填写模块标识!");
|
return false;
|
}
|
if (moduleId == "") {
|
layer.alert("请填写上级模块!");
|
return false;
|
}
|
|
if (moduleId == 0) {
|
permissionParentId = 0;
|
//判断是否生成手机端权限
|
if (type == 1) {
|
$("#appPermissionName").textbox("setValue", moduleIdentify + ".Moblie");
|
} else {
|
$("#txt_permission").textbox("setValue", moduleIdentify);
|
}
|
|
} else {
|
wcp.ui.setBusy("body", wcp.ajax({
|
url: "config/module/generatePermission?moduleId=" + moduleId,
|
}).done(function (result) {
|
if (typeof result.parentId != "undefined") {
|
permissionParentId = result.parentId;
|
}
|
var permissionName = result.permissionName;
|
var permission;
|
if (permissionName != null && permissionName != "") {
|
permission = permissionName + "." + moduleIdentify;
|
} else {
|
permission = moduleIdentify;
|
}
|
if (type == 1) {
|
$("#appPermissionName").textbox("setValue", permission + ".Moblie");
|
} else {
|
$("#txt_permission").textbox("setValue", permission);
|
}
|
|
}));
|
}
|
}
|
|
//判断验证
|
function getValid(pageId) { //每一步判断的valid
|
var valid = true;
|
switch (pageId) {
|
case 0:
|
valid = $('#formModule').form('validate');
|
break;
|
}
|
return valid;
|
}
|
|
function getBusTable() { //业务表
|
t_bus = $("#dg_table").datagrid({
|
url: 'config/table/getTablePageList?moduleId=${module.moduleId}',
|
fitColumns: true,
|
striped: true,
|
idField: "tableId",
|
rownumbers: true,
|
pagination: true,
|
checkOnSelect: false,
|
selectOnCheck: false,
|
singleSelect: true,
|
toolbar: "#table_toolbar",
|
columns: [[
|
{
|
field: 'ck',
|
checkbox: true
|
},
|
{
|
field: 'tableName',
|
title: '业务表名称',
|
width: 200,
|
align: 'center'
|
},
|
{
|
field: 'displayName',
|
title: '显示名称',
|
width: 200,
|
align: 'center'
|
},
|
{
|
field: 'tableDescription',
|
title: '业务表说明',
|
width: 300,
|
align: 'center'
|
},
|
{
|
field: 'enableSetMainTable',
|
title: '是否为主表',
|
width: 80,
|
align: 'center',
|
formatter: function (value, row, index) {
|
if (value) {
|
return '是';
|
} else {
|
return '否';
|
}
|
}
|
},
|
{
|
field: 'createTime',
|
title: '创建时间',
|
width: 250,
|
align: 'center'
|
},
|
{
|
field: 'tableId',
|
title: '操作',
|
width: 200,
|
align: 'center',
|
formatter: function (value, row, index) {
|
return ' <a href="javascript:void(0);" onclick=\'editTable("' + value + '");\' class="pt-color-success"><i class="fa fa-pencil" title="编辑"></i></a>' +
|
'<a href="javascript:void(0);" onclick=\'deleteTable("' + value + '");\' class="pt-color-danger"><i class="fa fa-trash-o" title="删除"></i></a>';
|
|
}
|
}
|
]],
|
rowStyler: function (index, row) {
|
if (row.enableSetMainTable) {
|
return 'background-color:#FFF8DC;';
|
}
|
},
|
onLoadSuccess: function (data) {
|
}
|
})
|
}
|
|
function addTable() {
|
editTable(0, '${module.moduleId}');
|
}
|
|
//业务表编辑,新增
|
function editTable(tableId, moduleId) {
|
var url = "config/table/editTable?tableId=" + tableId;
|
if (moduleId) {
|
url += "&moduleId=" + moduleId;
|
}
|
var title = tableId == 0 ? "新增业务表" : "编辑业务表";
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ["1200px", "700px"],
|
fixed: false,
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将回调函数传给子页面
|
iframeWin.params.callBack = refreshTableData;
|
}
|
});
|
}
|
|
//刷新表格数据
|
function refreshTableData() {
|
$('#dg_table').datagrid('reload');
|
//清除已经选择的数据
|
$('#dg_table').datagrid('clearSelections');
|
$('#dg_table').datagrid('clearChecked');
|
}
|
|
//删除单个表事件
|
function deleteTable(tableId) {
|
deleteTables([tableId]);
|
}
|
|
//删除表
|
function deleteTableClick() {
|
//获取dg选中的数据行
|
var checkRows = $("#dg_table").datagrid("getChecked");
|
if (checkRows.length == 0) {
|
wcp.message.info("请选择需要删除的业务表!");
|
} else {
|
var ids = new Array();
|
$.each(checkRows, function (index, value) {
|
ids.push(value.tableId);
|
});
|
|
deleteTables(ids);
|
}
|
}
|
|
//重新加入权限配置树
|
function addPermissionTree() {
|
layer.confirm("确定重新加入权限配置树吗?", {
|
icon: 3,
|
title: '提示'
|
}, function (index) {
|
var permissionName = $('#txt_permission').textbox('getValue', customClassName);
|
wcp.ui.setBusy("body", wcp.ajax({
|
url: "config/permission/addPermissionTree?moduleId=${module.moduleId}&permissionName=" + permissionName,
|
}).done(function (result) {
|
wcp.notify.success('加入成功!');
|
}));
|
layer.close(index);
|
});
|
}
|
|
//设为主表
|
function setMainTable() {
|
var checkRows = $("#dg_table").datagrid("getChecked");
|
if (checkRows.length != 1) {
|
wcp.message.info("请选择一条业务表!");
|
} else {
|
var ids = "";
|
$.each(checkRows, function (index, value) {
|
ids = value.tableId;
|
});
|
layer.confirm("确定要设置选择的业务表作为主表吗?", {
|
icon: 3,
|
title: '提示'
|
}, function (index) {
|
wcp.ui.setBusy("body", wcp.ajax({
|
url: "config/table/setMainTable?moduleId=${module.moduleId}&tableId=" + ids,
|
}).done(function (result) {
|
mainTableName = checkRows[0].tableName;
|
wcp.notify.success('设置成功!');
|
//刷新数据
|
refreshTableData();
|
}));
|
layer.close(index);
|
});
|
}
|
}
|
|
//设为主表单
|
function setMainForm() {
|
var checkRows = $("#t_form").datagrid("getChecked");
|
if (checkRows.length != 1) {
|
wcp.message.info("请选择一条数据!");
|
} else {
|
var ids = "";
|
$.each(checkRows, function (index, value) {
|
ids = value.formId;
|
});
|
layer.confirm("确定要设置选择的表单表作为主表吗?", {
|
icon: 3,
|
title: '提示'
|
}, function (index) {
|
wcp.ui.setBusy("body", wcp.ajax({
|
url: "config/form/setMainForm?moduleId=${module.moduleId}&formId=" + ids,
|
}).done(function (result) {
|
mainTableName = checkRows[0].tableName;
|
wcp.notify.success('设置成功!');
|
//刷新数据
|
freshFormTable();
|
}));
|
layer.close(index);
|
});
|
|
}
|
}
|
|
//删除多个表事件
|
function deleteTables(tableIds) {
|
layer.confirm("确定要删除选择的业务表吗?(删除之后数据将无法恢复)", {
|
icon: 3,
|
title: '提示'
|
}, function (index) {
|
wcp.ui.setBusy("body", wcp.ajax({
|
url: "config/table/deleteTable",
|
data: JSON.stringify(tableIds),
|
}).done(function (result) {
|
wcp.notify.success('删除成功!');
|
//刷新数据
|
refreshTableData();
|
}));
|
layer.close(index);
|
});
|
}
|
|
//操作
|
function getOperationTable() {
|
t_operation = $('#t_operation').datagrid({
|
url: 'config/operation/getOperationPageList?moduleId=${module.moduleId}',
|
fitColumns: true,
|
striped: true,
|
idField: "operationId",
|
rownumbers: true,
|
pagination: true,
|
checkOnSelect: false,
|
selectOnCheck: false,
|
singleSelect: true,
|
toolbar: "#operation_toolbar",
|
emptyMsg: "没有找到匹配的记录",
|
columns: [[
|
{
|
field: 'ck',
|
checkbox: true
|
},
|
{
|
field: 'operationName',
|
title: '操作名称',
|
width: 100,
|
align: 'center'
|
},
|
{
|
field: 'displayName',
|
title: '显示名称',
|
width: 100,
|
align: 'center'
|
},
|
{
|
field: 'operationPosition',
|
title: '操作位置',
|
width: 100,
|
align: 'center',
|
formatter: function (value, row, index) {
|
if (value == 0) {
|
return "列表";
|
} else if (value == 1) {
|
return "表单";
|
}
|
return "";
|
}
|
},
|
{
|
field: 'operationType',
|
title: '操作类型',
|
width: 100,
|
align: 'center',
|
formatter: function (value, row, index) {
|
if (value == 0) {
|
return "弹出页面";
|
} else if (value == 1) {
|
return "执行事务";
|
} else if (value == 2) {
|
return "执行一段JS";
|
}
|
return "";
|
}
|
},
|
{
|
field: 'moduleName',
|
title: '所属模块',
|
width: 100,
|
align: 'center'
|
},
|
{
|
field: 'operationIcon',
|
title: '按钮样式',
|
width: 100,
|
align: 'center',
|
formatter: function (value, row, index) {
|
return '<a class="pt-btn pt-btn-padding ' + row.operationCss + '"><i class="' + value + '" title="' + row.displayName + '"></i>' + row.displayName + '</a>';
|
}
|
},
|
{
|
field: 'createTime',
|
title: '创建时间',
|
width: 100,
|
align: 'center'
|
},
|
{
|
field: 'operationId',
|
title: '操作',
|
width: 100,
|
align: 'center',
|
formatter: function (value, row, index) {
|
return ' <a href="javascript:void(0);" onclick=\'editOperation("' + value + '");\' class="pt-color-success"><i class="fa fa-pencil" title="编辑"></i></a>' +
|
'<a href="javascript:void(0);" onclick=\'deleteOperation("' + value + '");\' class="pt-color-danger"><i class="fa fa-trash-o" title="删除"></i></a>';
|
|
}
|
}
|
]],
|
onLoadSuccess: function (data) {
|
}
|
});
|
}
|
|
function addOperation() {
|
editOperation(0);
|
}
|
|
//操作编辑,新增
|
function editOperation(operationId) {
|
var url = "config/operation/editOperation?operationId=" + operationId + "&moduleId=" + "${module.moduleId}";
|
var title = operationId == 0 ? "新增操作配置" : "编辑操作配置";
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ["800px", "550px"],
|
fixed: false,
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将回调函数传给子页面
|
iframeWin.params.callBack = refreshData;
|
}
|
});
|
|
//window.event ? window.event.returnValue == false : e.preventDefault();
|
}
|
|
//刷新表格数据
|
function refreshData() {
|
$('#t_operation').datagrid('reload');
|
//清除已经选择的数据
|
$('#t_operation').datagrid('clearSelections');
|
$('#t_operation').datagrid('clearChecked');
|
}
|
|
//删除单个表事件
|
function deleteOperation(operationId) {
|
deleteOperations([operationId]);
|
}
|
|
//删除多个表事件
|
function deleteOperations(operationIds) {
|
layer.confirm("确定要删除选择的操作配置吗?", {
|
icon: 3,
|
title: '提示'
|
}, function (index) {
|
wcp.ui.setBusy("body", wcp.ajax({
|
url: "config/operation/deleteOperation",
|
data: JSON.stringify(operationIds),
|
}).done(function (result) {
|
wcp.notify.success('删除成功!');
|
|
//刷新数据
|
refreshData();
|
}));
|
|
layer.close(index);
|
});
|
}
|
|
|
function getFormTable() { //表单
|
t_form = $("#t_form").datagrid({
|
rownumbers: true,
|
fitColumns: true,
|
method: "get",
|
checkOnSelect: false,
|
selectOnCheck: false,
|
pagination: true,
|
url: 'config/form/getFormList?moduleId=${module.moduleId}',
|
toolbar: "#form_toolbar",
|
emptyMsg: "没有找到匹配的记录",
|
idField: "formId",
|
columns: [[
|
{
|
field: 'ck',
|
checkbox: true,
|
align: 'center'
|
},
|
{
|
field: 'formName',
|
title: '表单名称',
|
width: 100,
|
align: 'center'
|
},
|
{
|
field: 'formType',
|
title: '表单类型',
|
width: 100,
|
align: 'center',
|
formatter: function (value, row, index) {
|
switch (value) {
|
case 0:
|
return "PC端";
|
break;
|
case 1:
|
return "手机端";
|
break;
|
}
|
}
|
},
|
{
|
field: 'enableSetMainForm',
|
title: '是否为主表单',
|
width: 80,
|
align: 'center',
|
formatter: function (value, row, index) {
|
if (value) {
|
return '是';
|
} else {
|
return '否';
|
}
|
}
|
},
|
{
|
field: 'createTime',
|
title: '创建时间',
|
width: 100,
|
align: 'center'
|
},
|
{
|
field: 'lastModifyUserName',
|
title: '最后修改人',
|
width: 100,
|
align: 'center'
|
},
|
{
|
field: 'lastModifyTime',
|
title: '最后修改时间',
|
width: 100,
|
align: 'center'
|
},
|
{
|
field: 'formId',
|
title: '操作',
|
width: 150,
|
align: 'center',
|
formatter: function (value, row, index) {
|
|
if (value) {
|
var ret = '<a href="javascript:void(0);" onclick=\'openEditForm("' + value + '");\' class="pt-color-success"><i class="fa fa-pencil" title="编辑"></i></a>'
|
+ '<a href="javascript:void(0);" onclick=\'designForm("' + value + '");\' class="pt-color-warning"><i class="fa fa-bolt" title="设计表单"></i></a>'
|
+ '<a href="javascript:void(0);" onclick=\'deleteForm("' + value + '");\' class="pt-color-danger"><i class="fa fa-trash-o" title="删除"></i></a></a>';
|
return ret;
|
} else {
|
return "";
|
}
|
}
|
}
|
]],
|
rowStyler: function (index, row) {
|
if (row.enableSetMainForm) {
|
return 'background-color:#FFF8DC;';
|
}
|
},
|
onLoadSuccess: function (data) {
|
}
|
})
|
}
|
|
function getViewTable() { //视图
|
|
t_view = $("#t_view").datagrid({
|
rownumbers: true,
|
fitColumns: true,
|
method: "get",
|
pagination: true,
|
checkOnSelect: false,
|
selectOnCheck: false,
|
url: 'config/view/getViewList?moduleId=${module.moduleId}',
|
toolbar: "#view_toolbar",
|
emptyMsg: "没有找到匹配的记录",
|
idField: "viewId",
|
columns: [[
|
{
|
field: 'ck',
|
checkbox: true,
|
align: 'center'
|
},
|
{
|
field: 'viewName',
|
title: '视图名称',
|
width: 100,
|
align: 'center'
|
},
|
{
|
field: 'dataSourceType',
|
title: '数据来源',
|
width: 100,
|
align: 'center',
|
formatter: function (value, row, index) {
|
switch (value) {
|
case 0:
|
return "SQL语句";
|
break;
|
case 1:
|
return "存储过程";
|
break;
|
case 2:
|
return "程序集方法";
|
break;
|
}
|
}
|
},
|
{
|
field: 'createTime',
|
title: '创建时间',
|
width: 100,
|
align: 'center'
|
},
|
{
|
field: 'lastModifyUserName',
|
title: '最后修改人',
|
width: 100,
|
align: 'center'
|
},
|
{
|
field: 'lastModifyTime',
|
title: '最后修改时间',
|
width: 100,
|
align: 'center'
|
},
|
{
|
field: 'viewId',
|
title: '操作',
|
width: 150,
|
align: 'center',
|
formatter: function (value, row, index) {
|
if (value) {
|
var ret = '<a href="javascript:void(0);" onclick=\'openDesignView("' + value + '");\' class="pt-color-success"><i class="fa fa-pencil" title="编辑"></i></a>'
|
+ '<a href="javascript:void(0);" onclick=\'copyView("' + value + '");\' class="pt-color-warning"><i class="fa fa-copy" title="复制并新增"></i></a>'
|
+ '<a href="javascript:void(0);" onclick=\'deleteView("' + value + '");\' class="pt-color-danger"><i class="fa fa-trash-o" title="删除"></i> </a>'
|
+ '<a href="javascript:void(0);" onclick=\'showView("' + value + '","' + row.viewName + '");\' class="pt-color-only"><i class="fa fa-eye" title="查看"></i></a></a>';
|
return ret;
|
} else {
|
return "";
|
}
|
|
}
|
}
|
]],
|
onLoadSuccess: function (data) {
|
}
|
})
|
}
|
|
function showView(viewId, viewName) {
|
var url = "general/list?viewId=" + viewId;
|
var title = viewName;
|
top.addPanel(url, title);
|
}
|
|
//复制视图
|
function copyView(value) {
|
var url = "config/view/editCopyView?viewId=" + value
|
var title = "复制视图";
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ["600px", "300px"],
|
fixed: false,
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
//将回调函数传给子页面
|
iframeWin.params.callBack = freshViewTable;
|
}
|
});
|
}
|
|
//批量删除视图
|
function deleteViewClick() {
|
//获取dg选中的数据行
|
var checkRows = $("#t_view").datagrid("getChecked");
|
if (checkRows.length == 0) {
|
wcp.message.info("请选择需要删除的视图!");
|
} else {
|
var ids = new Array();
|
$.each(checkRows, function (index, value) {
|
ids.push(value.viewId);
|
});
|
deleteViews(ids);
|
}
|
|
}
|
|
//删除单个视图事件
|
function deleteView(viewId) {
|
deleteViews([viewId]);
|
}
|
|
//删除视图
|
function deleteViews(value) {
|
layer.confirm("确定要删除选择的视图吗?", {
|
icon: 3,
|
title: '提示'
|
}, function (index) {
|
wcp.ui.setBusy("body", wcp.ajax({
|
url: "config/view/deleteView",
|
data: JSON.stringify(value),
|
}).done(function (result) {
|
wcp.notify.success('删除成功!');
|
//刷新数据
|
freshViewTable();
|
}));
|
});
|
}
|
|
//批量删除表单
|
function deleteFormClick() {
|
//获取dg选中的数据行
|
var checkRows = $("#t_form").datagrid("getChecked");
|
if (checkRows.length == 0) {
|
wcp.message.info("请选择需要删除的表单!");
|
} else {
|
var ids = new Array();
|
$.each(checkRows, function (index, value) {
|
ids.push(value.formId);
|
});
|
deleteForms(ids);
|
}
|
}
|
|
//删除单个表单事件
|
function deleteForm(formId) {
|
deleteForms([formId]);
|
}
|
|
//删除表单
|
function deleteForms(value) {
|
layer.confirm("确定要删除选择的表单吗?", {
|
icon: 3,
|
title: '提示'
|
}, function (index) {
|
wcp.ui.setBusy("body", wcp.ajax({
|
url: "config/form/deleteForm",
|
data: JSON.stringify(value),
|
}).done(function (result) {
|
wcp.notify.success('删除成功!');
|
//刷新数据
|
freshFormTable();
|
}));
|
});
|
}
|
|
|
function addView() {
|
editView(0, '${module.moduleId}');
|
}
|
|
//打开视图编辑框
|
function openEditView(value) {
|
editView(value, '${module.moduleId}');
|
}
|
|
//视图编辑方法
|
function editView(viewId, moduleId) {
|
var url = "config/view/editView?viewId=" + viewId + "&moduleId=" + moduleId;
|
var title = viewId == 0 ? "新增视图" : "编辑视图";
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ["800px", "600px"],
|
fixed: false,
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
//将回调函数传给子页面
|
iframeWin.params.callBack = freshViewTable;
|
}
|
});
|
}
|
|
//打开视图设计框
|
function openDesignView(value) {
|
designView(value, '${module.moduleId}');
|
}
|
|
//视图设计方法
|
function designView(viewId, moduleId) {
|
var url = "config/view/designView?viewId=" + viewId + "&moduleId=" + moduleId;
|
var title = viewId == 0 ? "新增视图" : "编辑视图";
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ["1000px", "600px"],
|
fixed: false,
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
//将回调函数传给子页面
|
iframeWin.params.callBack = freshViewTable;
|
}
|
});
|
}
|
|
function addForm() {
|
var url = "config/form/addForm?moduleId=${module.moduleId}";
|
var title = "新增表单";
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ["750px", "450px"],
|
fixed: false,
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
//将回调函数传给子页面
|
iframeWin.params.callBack = freshFormTable;
|
}
|
});
|
}
|
|
//打开表单编辑框
|
function openEditForm(value) {
|
editForm(value, '${module.moduleId}');
|
}
|
|
//表单编辑方法
|
function editForm(formId, moduleId) {
|
var url = "config/form/editForm?formId=" + formId + "&moduleId=" + moduleId;
|
var title = formId == 0 ? "新增表单" : "编辑表单";
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ["930px", "600px"],
|
fixed: false,
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
//将回调函数传给子页面
|
iframeWin.params.callBack = freshFormTable;
|
}
|
});
|
}
|
|
//表单设计方法
|
function designForm(formId) {
|
var url = "config/form/designForm?formId=" + formId;
|
var title = formId == 0 ? "设计表单" : "设计表单";
|
window.open(url, "dd");
|
}
|
|
//表单操作配置
|
function operationConfig(formId) {
|
var url = "config/form/editFormOperation?formId=" + formId;
|
var title = "编辑表单操作";
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ["800px", "600px"],
|
fixed: false,
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
//将回调函数传给子页面
|
iframeWin.params.callBack = freshFormTable;
|
}
|
});
|
}
|
|
function freshFormTable() {
|
freshTable('t_form');
|
}
|
|
function freshViewTable() {
|
freshTable('t_view');
|
}
|
|
function getFlowTable() {
|
t_flow = $("#t_flow").datagrid({
|
rownumbers: true,
|
fitColumns: true,
|
url: 'config/flowDefinition/getFlowDefinitionList?moduleId=${module.moduleId}',
|
toolbar: "#flow_toolbar",
|
checkOnSelect: false,
|
selectOnCheck: false,
|
emptyMsg: "没有找到匹配的记录",
|
pagination: true,
|
idField: "flowId",
|
columns: [[
|
{
|
field: 'ck',
|
checkbox: true,
|
align: 'center'
|
},
|
{
|
field: 'flowName',
|
title: '流程名称',
|
width: 200,
|
align: 'center'
|
},
|
{
|
field: 'flowState',
|
title: '流程状态',
|
width: 100,
|
align: 'center',
|
formatter: function (value) {
|
return '<input class="btnState">';
|
}
|
},
|
{
|
field: 'flowType',
|
title: '流程类型',
|
width: 100,
|
align: 'center',
|
formatter: function (value) {
|
switch (value) {
|
case 0:
|
return '电脑端';
|
case 1:
|
return '手机端';
|
case 2:
|
return '电脑端+手机端';
|
}
|
}
|
},
|
{
|
field: 'createTime',
|
title: '创建时间',
|
width: 150,
|
align: 'center'
|
},
|
{
|
field: 'flowId',
|
title: '操作',
|
width: 150,
|
align: 'center',
|
formatter: function (value, row, index) {
|
var ret = "";
|
ret += '<a href="javascript:void(0);" onclick=\'editFlow("' + value + '");\' class="pt-color-success"><i class="fa fa-pencil" title="编辑"></i></a>';
|
ret += '<a href="javascript:void(0);" onclick=\'designFlow("' + value + '");\' class="pt-color-warning"><i class="fa fa-bolt" title="设计流程"></i></a>';
|
ret += '<a href="javascript:void(0);" onclick="" class="pt-color-warning"><i class="fa fa-copy" title="复制并新增"></i></a>';
|
ret += '<a href="javascript:void(0);" onclick=\'deleteFlow("' + value + '")\' class="pt-color-danger"><i class="fa fa-trash-o" title="删除"></i></a>';
|
return ret;
|
}
|
}
|
]],
|
onLoadSuccess: function (data) {
|
$.each(data.rows, function (index, elem) {
|
|
$("table .btnState").eq(index).switchbutton({
|
onText: "启用",
|
offText: "关闭",
|
checked: elem.flowState == 1,
|
onChange: function (checked) {
|
var flowState;
|
var flowId = elem.flowId;
|
if (checked) {
|
flowState = 1;
|
} else {
|
flowState = 0;
|
}
|
|
wcp.ui.setBusy("body", wcp.ajax({
|
url: "config/flowDefinition/updateFlowState?flowId=" + flowId + "&flowState=" + flowState
|
}).done(function (result) {
|
wcp.notify.success('修改成功!');
|
//刷新数据
|
//refreshData();
|
}));
|
}
|
});
|
|
})
|
|
}
|
})
|
}
|
|
function addFlow() {
|
editFlow(0, '${module.moduleId}');
|
}
|
|
//流程编辑方法
|
function editFlow(flowId, moduleId) {
|
var url = "config/flowDefinition/editFlow?flowDefinitionId=" + flowId;
|
if (moduleId) {
|
url += "&moduleId=" + moduleId;
|
}
|
var title = flowId == 0 ? "新增流程" : "编辑流程";
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ["800px", "600px"],
|
fixed: false,
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
//将回调函数传给子页面
|
iframeWin.params.callBack = freshTable;
|
iframeWin.params.callBackParams = "t_flow";
|
}
|
});
|
}
|
|
function designFlow(flowId) {
|
var url = "config/flowDefinition/designFlow?flowDefinitionId=" + flowId;
|
window.open(url, "flowDesign");
|
}
|
|
//批量删除表单
|
function deleteFlowClick() {
|
//获取dg选中的数据行
|
var checkRows = $("#t_flow").datagrid("getChecked");
|
if (checkRows.length == 0) {
|
wcp.message.info("请选择需要删除的流程!");
|
} else {
|
var ids = new Array();
|
$.each(checkRows, function (index, value) {
|
ids.push(value.flowId);
|
});
|
|
deleteFlows(ids);
|
}
|
}
|
|
//删除单个表事件
|
function deleteFlow(flowId) {
|
deleteFlows([flowId]);
|
}
|
|
//删除多个表事件
|
function deleteFlows(flowIds) {
|
layer.confirm("确定要删除选择的流程配置吗?", {
|
icon: 3,
|
title: '提示'
|
}, function (index) {
|
wcp.ui.setBusy("body", wcp.ajax({
|
url: "config/flowDefinition/deleteFlow",
|
data: JSON.stringify(flowIds),
|
}).done(function (result) {
|
wcp.notify.success('删除成功!');
|
|
//刷新数据
|
freshTable("t_flow");
|
}));
|
|
layer.close(index);
|
});
|
|
}
|
|
function freshTable(tableName) {
|
$('#' + tableName).datagrid("reload");
|
$('#' + tableName).datagrid('clearSelections');
|
$('#' + tableName).datagrid('clearChecked');
|
}
|
|
function enableSort(obj, tname) {
|
var oA = $(obj);
|
var tip = $.trim(oA.text());
|
switch (tname) {
|
case "t_form":
|
if (tip == "排序") {
|
oA.html('<i class="fa fa-retweet"></i>保存排序');
|
t_form.datagrid("enableDnd");
|
} else if (tip == "保存排序") {
|
oA.html('<i class="fa fa-retweet"></i>排序');
|
//保存表格中排序
|
saveSortNum(tname, 'config/form/saveSortNum');
|
}
|
break;
|
case "t_operation":
|
tip = oI.text();
|
if (tip == "排序") {
|
oI.text("保存排序");
|
t_operation.datagrid("enableDnd");
|
|
} else {
|
oI.text("排序");
|
if (tip == "保存排序") {
|
//保存表格中排序
|
}
|
}
|
|
break;
|
case "t_view":
|
if (tip == "排序") {
|
oA.html('<i class="fa fa-retweet"></i>保存排序');
|
t_view.datagrid("enableDnd");
|
} else if (tip == "保存排序") {
|
oA.html('<i class="fa fa-retweet"></i>排序');
|
//保存表格中排序
|
saveSortNum(tname, 'config/view/saveSortNum');
|
}
|
break;
|
case "t_flow":
|
tip = oI.text();
|
if (tip == "排序") {
|
oI.text("保存排序");
|
t_flow.datagrid("enableDnd");
|
|
} else {
|
oI.text("排序");
|
if (tip == "保存排序") {
|
//保存表格中排序
|
}
|
}
|
break;
|
}
|
}
|
|
//保存排序号
|
function saveSortNum(dataGridId, postUrl) {
|
var data = $('#' + dataGridId).datagrid('getRows');
|
var Ids_SortNums = new Array();
|
$.each(data, function (i, row) {
|
if (dataGridId == "t_form") {
|
Ids_SortNums.push(row.formId + "_" + (i + 1));
|
} else if (dataGridId == "t_view") {
|
Ids_SortNums.push(row.viewId + "_" + (i + 1));
|
}
|
});
|
wcp.ui.setBusy("body", wcp.ajax({
|
url: postUrl,
|
data: JSON.stringify(Ids_SortNums),
|
}).done(function (result) {
|
freshTable(dataGridId);
|
}));
|
}
|
|
//初始化选择项
|
function initEnableCheck() {
|
//不启用
|
if ("${module.enableAttachBody}" == "" || "${module.enableAttachBody}" == "false") {
|
$('#enableAttachBodyText').switchbutton("uncheck");
|
$(".tr_attach_body").hide();
|
}
|
if ("${module.enableAttachOrigin}" == "" || "${module.enableAttachOrigin}" == "false") {
|
$('#enableAttachOriginText').switchbutton("uncheck");
|
$(".tr_attach_origin").hide();
|
}
|
if ("${module.enableAttach}" == "" || "${module.enableAttach}" == "false") {
|
$('#enableAttachText').switchbutton("uncheck");
|
$(".tr_attach").hide();
|
}
|
//启用
|
if ("${module.enableAttachBody}" == "true") {
|
$('#enableAttachBodyText').switchbutton("check");
|
$(".tr_attach_body").show();
|
}
|
if ("${module.enableAttachOrigin}" == "true") {
|
$('#enableAttachOriginText').switchbutton("check");
|
$(".tr_attach_origin").show();
|
}
|
if ("${module.enableAttach}" == "true") {
|
$('#enableAttachText').switchbutton("check");
|
$(".tr_attach").show();
|
}
|
//是否启用附件模板
|
if ("${module.enableAttachTemplate}" == "true") {
|
$('#enableAttachTemplateText').switchbutton("check");
|
}
|
|
//是否启用正文模板
|
if ("${module.enableBodyTemplate}" == "true") {
|
$('#enableBodyTemplateText').switchbutton("check");
|
}
|
if ("${module.enableDefineAttachSave}" == "true") {
|
$('#enableDefineAttachSaveText').switchbutton("check");
|
$("#tr_uploadPath").show();
|
$("#tr_viewPath").show();
|
}
|
|
if ("${module.enableAttachSort}" == "true") {
|
$('#enableAttachSortText').switchbutton("check");
|
}
|
if ("${module.enableMainAttach}" == "true") {
|
$('#enableMainAttachText').switchbutton("check");
|
}
|
|
if ("${module.enableCatalogFulltext}" == "true") {
|
$('#enableCatalogFulltextText').switchbutton("check");
|
$(".catalogsearch").show();
|
}
|
|
if ("${module.enableAttachFulltext}" == "true") {
|
$('#enableAttachFulltextText').switchbutton("check");
|
}
|
|
if ("${module.enableSoftDelete}" == "true") {
|
$('#enableSoftDeleteText').switchbutton("check");
|
}
|
if ("${module.enableDataAuthorize}" == "true") {
|
$('#enableDataAuthorizeText').switchbutton("check");
|
$(".tr_authorize").show();
|
$("#tr_filePermission").show();
|
} else {
|
$(".tr_authorize").hide();
|
$("#tr_filePermission").hide();
|
}
|
if ("${module.enableDataItemAuthorize}" == "true") {
|
$('#enableDataItemAuthorizeText').switchbutton("check");
|
}
|
if ("${module.enableAttachAuthorize}" == "true") {
|
$('#enableAttachAuthorizeText').switchbutton("check");
|
}
|
//初始是否启用获取附件MD5码
|
if ("${module.enableGetAttachMd5Code}" == "true") {
|
$('#enableGetAttachMd5CodeText').switchbutton("check");
|
}
|
// 是否启用附件转换
|
if ("${module.enableAttachConversion}" == "true") {
|
$('#enableAttachConversionText').switchbutton("check");
|
$(".tr_attachConversionRules").show();
|
}
|
// 是否启用生成附件缩略图
|
if ("${module.enableAttachThumbnail}" == "true") {
|
$('#enableAttachThumbnailText').switchbutton("check");
|
$(".tr_attachThumbnailWidth").show();
|
$(".tr_attachThumbnailHeight").show();
|
}
|
// 是否启用附件加密存储
|
if ("${module.enableAttachEncrypted}" == "true") {
|
$('#enableAttachEncryptedText').switchbutton("check");
|
}
|
// 是否启用流程
|
if ("${module.enableFlow}" == "true") {
|
$('#enableFlowText').switchbutton("check");
|
}
|
// 启用列表方式显示历史意见
|
if ("${module.enableListShowHistory}" == "true") {
|
$('#enableListShowHistoryText').switchbutton("check");
|
}
|
// 是否启用数据涉密控制
|
if ("${module.enableDataSecret}" == "true") {
|
$('#enableDataSecretText').switchbutton("check");
|
}
|
// 是否启用文件权限
|
if ("${module.enableFilePermission}" == "true") {
|
$('#enableFilePermissionText').switchbutton("check");
|
}
|
|
if ("${module.getOldDataForAfterSave}" == "true") {
|
$('#getOldDataForAfterSaveText').switchbutton("check");
|
}
|
if ("${module.saveModifyDetailLog}" == "true") {
|
$('#saveModifyDetailLogText').switchbutton("check");
|
}
|
|
// 是否启用手机端功能
|
if ("${module.enableApp}" == "true") {
|
$('#enableAppText').switchbutton("check");
|
$("#css_enableAppPermission").show();
|
$("#css_appPermissionName").show();
|
} else {
|
$("#css_enableAppPermission").hide();
|
$("#css_appPermissionName").hide();
|
}
|
// 是否启用手机端权限
|
if ("${module.enableAppPermission}" == "true") {
|
$('#enableAppPermissionText').switchbutton("check");
|
$("#appPermissionName").textbox("enable");
|
} else {
|
$("#appPermissionName").textbox("disable");
|
}
|
//初始化附件转换规则值
|
var attachConversionRules = "${module.attachConversionRules}";
|
if (attachConversionRules != null && attachConversionRules != "") {
|
var attachConversionRule = attachConversionRules.split("|");
|
for (var i = 0; i < attachConversionRule.length; i++) {
|
|
if (i == attachConversionRule.length - 1 && attachConversionRule[i].indexOf("Custom") !== -1) {
|
var customClassName = attachConversionRule[i].replace("Custom ", "");
|
$("input[checkboxName='attachConversionRules'][value= 'Custom' ]").checkbox('check');
|
$('#customClassName').textbox('setValue', customClassName);
|
} else {
|
$("input[checkboxName='attachConversionRules'][value=" + attachConversionRule[i] + "]").checkbox('check');
|
}
|
|
}
|
}
|
}
|
|
//设置隐藏域值
|
function setEnableValue(checked) {
|
$('#' + this.id.replace("Text", "")).val(checked);
|
if (checked) {
|
if (this.id == "enableAttachText") {
|
$(".tr_attach").show();
|
} else if (this.id == "enableAttachBodyText") {
|
$(".tr_attach_body").show();
|
} else if (this.id == "enableAttachOriginText") {
|
$(".tr_attach_origin").show();
|
} else if (this.id == "enableDefineAttachSaveText") {
|
$("#tr_uploadPath").show();
|
$("#tr_viewPath").show();
|
} else if (this.id == "enableCatalogFulltextText") {
|
$(".catalogsearch").show();
|
} else if (this.id == "enableDataAuthorizeText") {
|
$(".tr_authorize").show();
|
$("#tr_filePermission").show();
|
} else if (this.id == "enableAttachConversionText") {
|
$("#tr_attachConversionRules").show();
|
} else if (this.id == "enableAttachThumbnailText") {
|
$("#tr_attachThumbnailWidth").show();
|
$("#tr_attachThumbnailHeight").show();
|
} else if (this.id == "enableAppText") {
|
$("#css_enableAppPermission").show();
|
$("#css_appPermissionName").show();
|
} else if (this.id == "enableAppPermissionText") {
|
$("#appPermissionName").textbox("enable");
|
|
}
|
} else {
|
if (this.id == "enableAttachText") {
|
$(".tr_attach").hide();
|
}
|
if (this.id == "enableAttachBodyText") {
|
$(".tr_attach_body").hide();
|
}
|
if ((this.id == "enableAttachText" && $('#enableAttachBody').val() == "false") ||
|
(this.id == "enableAttachBodyText" && $('#enableAttach').val() == "false")) {
|
$(".tr_attach").hide();
|
} else if (this.id == "enableAttachOriginText") {
|
$(".tr_attach_origin").hide();
|
} else if (this.id == "enableDefineAttachSaveText") {
|
$("#tr_uploadPath").hide();
|
$("#tr_viewPath").hide();
|
} else if (this.id == "enableCatalogFulltextText") {
|
$(".catalogsearch").hide();
|
} else if (this.id == "enableDataAuthorizeText") {
|
$(".tr_authorize").hide();
|
$("#tr_filePermission").hide();
|
} else if (this.id == "enableAttachConversionText") {
|
$("#tr_attachConversionRules").hide();
|
} else if (this.id == "enableAttachThumbnailText") {
|
$("#tr_attachThumbnailWidth").hide();
|
$("#tr_attachThumbnailHeight").hide();
|
} else if (this.id == "enableAppText") {
|
$("#css_enableAppPermission").hide();
|
$("#css_appPermissionName").hide();
|
} else if (this.id == "enableAppPermissionText") {
|
$("#appPermissionName").textbox("disable");
|
}
|
}
|
}
|
|
function addSystemOperation() {
|
var moduleId = "${module.moduleId}";
|
var url = "config/operation/selectSystemOperations?moduleId=" + moduleId;
|
var title = "系统操作";
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ["800px", "500px"],
|
fixed: false,
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
//将回调函数传给子页面
|
iframeWin.params.callBack = refreshData;
|
}
|
});
|
}
|
|
//选择字段
|
function selectColumn() {
|
var tableNames = mainTableName;
|
var idName = this.id;
|
var multiSelect = true;
|
var moduleId = null;
|
|
wcp.picker.selectTableColumn({
|
title: "请选择字段",
|
tableName: tableNames,
|
moduleId: moduleId,
|
multiSelect: multiSelect,
|
layerOpener: window
|
}, function (rows) {
|
var selectedColumns = "";
|
$.each(rows, function (index, value) {
|
if (idName != "catalogSearchFields") {
|
selectedColumns += value.columnName + "|" + value.displayName + ',';
|
} else {
|
selectedColumns += value.columnName + ',';
|
}
|
});
|
selectedColumns = selectedColumns.substr(0, selectedColumns.length - 1);
|
|
$('#' + idName).textbox("setValue", selectedColumns);
|
});
|
}
|
|
//选择字段
|
function selectMarkColumn() {
|
var tableNames = mainTableName;
|
var idName = this.id;
|
var moduleId = "${moduleId}";
|
wcp.picker.selectTableColumn({
|
title: "请选择字段",
|
tableName: tableNames,
|
multiSelect: true,
|
layerOpener: window
|
}, function (rows) {
|
var selectedColumns = "";
|
var selectedDisplayName = "";
|
$.each(rows, function (index, value) {
|
selectedColumns += '\${' + value.columnName + '}';
|
});
|
|
//selectedColumns = selectedColumns.substr(0, selectedColumns.length - 1);
|
$('#' + idName).textbox("setValue", selectedColumns);
|
});
|
}
|
|
//压缩包文件夹规则
|
function selectBatchDownloadFolderColumn() {
|
var tableNames = mainTableName;
|
var idName = this.id;
|
var moduleId = "${moduleId}";
|
wcp.picker.selectTableColumn({
|
title: "请选择字段",
|
tableName: tableNames,
|
multiSelect: true,
|
layerOpener: window
|
}, function (rows) {
|
var selectedColumns = "";
|
var selectedDisplayName = "";
|
$.each(rows, function (index, value) {
|
selectedColumns += '\${' + value.columnName + '}';
|
});
|
$('#' + idName).textbox("setValue", selectedColumns);
|
});
|
}
|
|
//条件设置
|
function configCondition() {
|
var url = "config/moduleDataCondition/moduleDataConditionIndex?moduleId=${module.moduleId}";
|
var title = "配置条件";
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ["800px", "550px"],
|
fixed: false,
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
//将回调函数传给子页面
|
//iframeWin.params.callBack = refreshCondtionData;
|
}
|
});
|
}
|
</script>
|
</html>
|