Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop
This commit is contained in:
@@ -141,6 +141,7 @@ public class DnsIpCfg extends BaseEntity<DnsIpCfg> {
|
||||
private String lable;
|
||||
|
||||
private String cfgIds;
|
||||
private String fakeIds;
|
||||
|
||||
public String getCfgIds() {
|
||||
return cfgIds;
|
||||
@@ -348,5 +349,19 @@ public class DnsIpCfg extends BaseEntity<DnsIpCfg> {
|
||||
public void setSearchAuditTimeEnd(Date searchAuditTimeEnd) {
|
||||
this.searchAuditTimeEnd = searchAuditTimeEnd;
|
||||
}
|
||||
/**
|
||||
* fakeIds
|
||||
* @return fakeIds
|
||||
*/
|
||||
|
||||
public String getFakeIds() {
|
||||
return fakeIds;
|
||||
}
|
||||
/**
|
||||
* @param fakeIds the fakeIds to set
|
||||
*/
|
||||
public void setFakeIds(String fakeIds) {
|
||||
this.fakeIds = fakeIds;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -78,10 +78,10 @@ public class DnsIpCfgController extends BaseController {
|
||||
@RequestMapping("delete")
|
||||
public String delete(Model model, HttpServletRequest request,
|
||||
HttpServletResponse response, DnsIpCfg dnsIpCfg) {
|
||||
String cfgIds = dnsIpCfg.getCfgIds();
|
||||
if (!StringUtils.isEmpty(cfgIds)) {
|
||||
String fakeIds = dnsIpCfg.getFakeIds();
|
||||
if (!StringUtils.isEmpty(fakeIds)) {
|
||||
try {
|
||||
dnsIpCfgService.delete(cfgIds);
|
||||
dnsIpCfgService.delete(fakeIds);
|
||||
addMessage(model, "delete_success");
|
||||
} catch (Exception e) {
|
||||
logger.error("删除失败", e);
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.DnsIpCfg;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@MyBatisDao
|
||||
public interface DnsIpCfgDao extends CrudDao<DnsIpCfg> {
|
||||
|
||||
public int deleteByFakeId(@Param("fakeId") String fakeIds);
|
||||
}
|
||||
|
||||
@@ -141,5 +141,12 @@
|
||||
is_valid=0
|
||||
where cfg_id=#{cfgId}
|
||||
</update>
|
||||
<update id="deleteByFakeId">
|
||||
update
|
||||
dns_ip_cfg
|
||||
set
|
||||
is_valid=0
|
||||
where fake_id =#{fakeId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -16,13 +17,13 @@ import com.nis.domain.maat.MaatDnsIpCfg;
|
||||
import com.nis.domain.maat.ToMaatDnsIpBean;
|
||||
import com.nis.main.ConvertTool;
|
||||
import com.nis.util.Collections3;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.DnsIpCfgDao;
|
||||
import com.nis.web.service.CrudService;
|
||||
|
||||
@Service
|
||||
public class DnsIpCfgService extends CrudService<DnsIpCfgDao, DnsIpCfg>{
|
||||
|
||||
@Autowired
|
||||
private DnsIpCfgDao dnsIpCfgDao;
|
||||
@Override
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void save(DnsIpCfg dnsIpCfg) {
|
||||
@@ -72,27 +73,24 @@ public class DnsIpCfgService extends CrudService<DnsIpCfgDao, DnsIpCfg>{
|
||||
}
|
||||
}
|
||||
|
||||
public void delete(String cfgIds) {
|
||||
if(cfgIds.endsWith(","))cfgIds=cfgIds.substring(0,cfgIds.lastIndexOf(","));
|
||||
String[] cfgIdsArr = cfgIds.split(",");
|
||||
for (String cfgId : cfgIdsArr) {
|
||||
DnsIpCfg d = new DnsIpCfg();
|
||||
d.setCfgId(Long.valueOf(cfgId));
|
||||
dao.delete(d);
|
||||
public void delete(String fakeIds) {
|
||||
if(fakeIds.endsWith(","))fakeIds=fakeIds.substring(0,fakeIds.lastIndexOf(","));
|
||||
String[] fakeIdsArr = fakeIds.split(",");
|
||||
for (String fakeId : fakeIdsArr) {
|
||||
dnsIpCfgDao.deleteByFakeId(fakeId);
|
||||
}
|
||||
|
||||
//给配置转换层发送、接收结果
|
||||
String sendJson = "{\"fakeId\":[" + cfgIds + "]}";
|
||||
String sendJson = "{\"fakeId\":[" + fakeIds + "]}";
|
||||
logger.info("准备下发配置:" + sendJson);
|
||||
Boolean recv = true;
|
||||
try {
|
||||
recv = new ConvertTool().invalidDNSIPConfig(sendJson);
|
||||
} catch (Throwable e) {
|
||||
logger.error("欺骗ip配置删除失败:通讯异常,cfgIds:" + cfgIds, e);
|
||||
logger.error("欺骗ip配置删除失败:通讯异常,fakeIds:" + fakeIds, e);
|
||||
throw new RuntimeException("欺骗ip配置删除失败:通讯失败");
|
||||
}
|
||||
if (!recv) {
|
||||
logger.error("欺骗ip配置删除失败,收到结果 " + recv + " ,cfgIds:" + cfgIds);
|
||||
logger.error("欺骗ip配置删除失败,收到结果 " + recv + " ,fakeIds:" + fakeIds);
|
||||
throw new RuntimeException("欺骗ip配置删除失败");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ show=show
|
||||
edit=edit
|
||||
hi=hi
|
||||
exit=exit
|
||||
choose=choose
|
||||
|
||||
#============menu begin======================
|
||||
requestInfo=requestInfo
|
||||
@@ -40,15 +41,12 @@ sip_ip_control=sip ip control
|
||||
domain_control_white=domain control white
|
||||
ip_address_control=ip address control
|
||||
ip_control=ip control
|
||||
ip_port_control=ip port control
|
||||
domain_control=domain control
|
||||
dns_control=dns control
|
||||
basic_configuration=basic configuration
|
||||
letter_from=letter from
|
||||
classification_manage=classification manage
|
||||
attribute_manage=attribute manage
|
||||
area_manage=area manage
|
||||
isp_manage=isp manage
|
||||
feature_scope_manage=feature scope manage
|
||||
special_tasks=special tasks
|
||||
label_manage=label manage
|
||||
@@ -94,12 +92,9 @@ log_search=log search
|
||||
sysService_manage=system service manage
|
||||
service_manage=service type manage
|
||||
system_service_manage=system service type manage
|
||||
specific_service_cfg=specific service cfg
|
||||
features_area=features area
|
||||
attribute_manage=attribute manage
|
||||
isp_manage=isp manage
|
||||
feature_scope_manage=feature scope manage
|
||||
plaintext_manage=plaintext manage
|
||||
ip_multiple_control=ip multiple control
|
||||
ip_port_control=ip port control
|
||||
website_multiple_control=website multiple control
|
||||
|
||||
@@ -69,8 +69,9 @@
|
||||
checkboxes.each(function(){
|
||||
ids = ids + $(this).attr("id") + ",";
|
||||
});
|
||||
console.log(ids);
|
||||
if (confirm("<spring:message code='confirm_message'/>")) {
|
||||
$("#cfgIds").val(ids);
|
||||
$("#fakeIds").val(ids);
|
||||
$("#searchForm").attr("action","${ctx}/cfg/dnsIp/delete");
|
||||
$("#searchForm").submit();
|
||||
}
|
||||
@@ -105,6 +106,7 @@
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${dnsIpCfg.isFilterAction }"/>
|
||||
<input id="cfgIds" name="cfgIds" type="hidden"/>
|
||||
<input id="fakeIds" name="fakeIds" type="hidden"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
@@ -270,7 +272,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="dnsIpCfg" varStatus="status" step="1">
|
||||
<td><input type="checkbox" class="i-checks child-checks" id="${dnsIpCfg.cfgId}" value="${dnsIpCfg.isAudit}"></td>
|
||||
<td><input type="checkbox" class="i-checks child-checks" id="${dnsIpCfg.fakeId}" value="${dnsIpCfg.isAudit}"></td>
|
||||
<td>${dnsIpCfg.cfgDesc }</td>
|
||||
<td>V${dnsIpCfg.ipType }</td>
|
||||
<td>${dnsIpCfg.srcIp }</td>
|
||||
|
||||
@@ -29,142 +29,170 @@
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<ul class="nav nav-tabs">
|
||||
<li><a href="${ctx}/sys/office/list?id=${office.parent.id}&parentIds=${office.parentIds}">机构列表</a></li>
|
||||
<li class="active"><a href="${ctx}/sys/office/form?id=${office.id}&parent.id=${office.parent.id}">机构<shiro:hasPermission name="sys:office:edit">${not empty office.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="sys:office:edit">查看</shiro:lacksPermission></a></li>
|
||||
</ul><br/>
|
||||
<div class="page-content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i><c:if test="${not empty office.id}"><spring:message code="edit"/></c:if><c:if test="${empty office.id}"><spring:message code="add"/></c:if></div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
|
||||
<!-- <ul class="nav nav-tabs"> -->
|
||||
<%-- <li><a href="${ctx}/sys/office/list?id=${office.parent.id}&parentIds=${office.parentIds}">机构列表</a></li> --%>
|
||||
<%-- <li class="active"><a href="${ctx}/sys/office/form?id=${office.id}&parent.id=${office.parent.id}">机构<shiro:hasPermission name="sys:office:edit">${not empty office.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="sys:office:edit">查看</shiro:lacksPermission></a></li> --%>
|
||||
<!-- </ul><br/> -->
|
||||
|
||||
|
||||
<form:form id="inputForm" modelAttribute="sysOffice" action="${ctx}/sys/office/saveOrUpdate" method="post" class="form-horizontal">
|
||||
<form:hidden path="id"/>
|
||||
<sys:message content="${message}"/>
|
||||
<div class="control-group">
|
||||
<label class="control-label">上级机构:</label>
|
||||
<div class="controls">
|
||||
<div class="form-body">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">上级机构:</label>
|
||||
<div class="col-md-4">
|
||||
<sys:treeselect id="office" name="parent.id" value="${office.parent.id}" labelName="parent.name" labelValue="${office.parent.name}"
|
||||
title="机构" url="/sys/office/treeData" extId="${office.id}" cssClass="" allowClear="${office.currentUser.admin}"/>
|
||||
title="机构" url="/sys/office/treeData" extId="${office.id}" cssClass="form-control" allowClear="${office.currentUser.admin}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">归属区域:</label>
|
||||
<div class="controls">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">归属区域:</label>
|
||||
<div class="col-md-4">
|
||||
<sys:treeselect id="area" name="area.id" value="${office.area.id}" labelName="area.name" labelValue="${office.area.name}"
|
||||
title="区域" url="/sys/area/treeData" cssClass="required" allowClear="${office.currentUser.admin}"/>
|
||||
<font color="red">*</font>
|
||||
title="区域" url="/sys/area/treeData" cssClass="required form-control" allowClear="${office.currentUser.admin}"/>
|
||||
</div>
|
||||
<span class="help-inline"><font color="red">*</font></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">机构名称:</label>
|
||||
<div class="col-md-4">
|
||||
<form:input path="name" htmlEscape="false" maxlength="50" class="required form-control"/>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">机构名称:</label>
|
||||
<div class="controls">
|
||||
<form:input path="name" htmlEscape="false" maxlength="50" class="required"/>
|
||||
<span class="help-inline"><font color="red">*</font> </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">机构编码:</label>
|
||||
<div class="controls">
|
||||
<form:input path="code" htmlEscape="false" maxlength="50"/>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">机构编码:</label>
|
||||
<div class="col-md-4">
|
||||
<form:input path="code" htmlEscape="false" maxlength="50" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">机构类型:</label>
|
||||
<div class="controls">
|
||||
<form:select path="type" class="input-medium">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">机构类型:</label>
|
||||
<div class="col-md-4">
|
||||
<form:select path="type" class="selectpicker select2 form-control">
|
||||
<form:options items="${fns:getDictList('SYS_OFFICE_TYPE')}" itemLabel="itemValue" itemValue="itemCode" htmlEscape="false"/>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">机构级别:</label>
|
||||
<div class="controls">
|
||||
<form:select path="grade" class="input-medium">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">机构级别:</label>
|
||||
<div class="col-md-4">
|
||||
<form:select path="grade" class="selectpicker select2 form-control">
|
||||
<form:options items="${fns:getDictList('SYS_OFFICE_GRADE')}" itemLabel="itemValue" itemValue="itemCode" htmlEscape="false"/>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">机构职责分类:</label>
|
||||
<div class="controls">
|
||||
<form:select path="jobType" class="input-medium">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">机构职责分类:</label>
|
||||
<div class="col-md-4">
|
||||
<form:select path="jobType" class="selectpicker select2 form-control">
|
||||
<form:options items="${fns:getDictList('SYS_JOB_TYPE')}" itemLabel="itemValue" itemValue="itemCode" htmlEscape="false"/>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">是否可用:</label>
|
||||
<div class="controls">
|
||||
<form:select path="useable">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">是否可用:</label>
|
||||
<div class="col-md-4">
|
||||
<form:select path="useable" class="selectpicker select2">
|
||||
<form:options items="${fns:getDictList('SYS_YES_NO')}" itemLabel="itemValue" itemValue="itemCode" htmlEscape="false"/>
|
||||
</form:select>
|
||||
<span class="help-inline">“是”代表此账号允许登陆,“否”则表示此账号不允许登陆</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">主负责人:</label>
|
||||
<div class="controls">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">主负责人:</label>
|
||||
<div class="col-md-4">
|
||||
<sys:treeselect id="primaryPerson" name="primaryPerson.id" value="${office.primaryPerson.id}" labelName="office.primaryPerson.name" labelValue="${office.primaryPerson.name}"
|
||||
title="用户" url="/sys/office/treeData?type=6" allowClear="true" notAllowSelectParent="true"/>
|
||||
title="用户" url="/sys/office/treeData?type=6" allowClear="true" notAllowSelectParent="true" cssClass="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">副负责人:</label>
|
||||
<div class="controls">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">副负责人:</label>
|
||||
<div class="col-md-4">
|
||||
<sys:treeselect id="deputyPerson" name="deputyPerson.id" value="${office.deputyPerson.id}" labelName="office.deputyPerson.name" labelValue="${office.deputyPerson.name}"
|
||||
title="用户" url="/sys/office/treeData?type=6" allowClear="true" notAllowSelectParent="true"/>
|
||||
title="用户" url="/sys/office/treeData?type=6" allowClear="true" notAllowSelectParent="true" cssClass="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">联系地址:</label>
|
||||
<div class="controls">
|
||||
<form:input path="address" htmlEscape="false" maxlength="50"/>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">联系地址:</label>
|
||||
<div class="col-md-4">
|
||||
<form:input path="address" htmlEscape="false" maxlength="50" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">邮政编码:</label>
|
||||
<div class="controls">
|
||||
<form:input path="zipCode" htmlEscape="false" maxlength="50"/>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">邮政编码:</label>
|
||||
<div class="col-md-4">
|
||||
<form:input path="zipCode" htmlEscape="false" maxlength="50" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">负责人:</label>
|
||||
<div class="controls">
|
||||
<form:input path="master" htmlEscape="false" maxlength="50"/>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">负责人:</label>
|
||||
<div class="col-md-4">
|
||||
<form:input path="master" htmlEscape="false" maxlength="50" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">电话:</label>
|
||||
<div class="controls">
|
||||
<form:input path="phone" htmlEscape="false" maxlength="50"/>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">电话:</label>
|
||||
<div class="col-md-4">
|
||||
<form:input path="phone" htmlEscape="false" maxlength="50" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">传真:</label>
|
||||
<div class="controls">
|
||||
<form:input path="fax" htmlEscape="false" maxlength="50"/>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">传真:</label>
|
||||
<div class="col-md-4">
|
||||
<form:input path="fax" htmlEscape="false" maxlength="50" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">邮箱:</label>
|
||||
<div class="controls">
|
||||
<form:input path="email" htmlEscape="false" maxlength="50"/>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">邮箱:</label>
|
||||
<div class="col-md-4">
|
||||
<form:input path="email" htmlEscape="false" maxlength="50" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">备注:</label>
|
||||
<div class="controls">
|
||||
<form:textarea path="remarks" htmlEscape="false" rows="3" maxlength="200" class="input-xlarge"/>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">备注:</label>
|
||||
<div class="col-md-4">
|
||||
<form:textarea path="remarks" htmlEscape="false" rows="3" maxlength="200" class="input-xlarge form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<c:if test="${empty office.id}">
|
||||
<div class="control-group">
|
||||
<label class="control-label">快速添加下级部门:</label>
|
||||
<div class="controls">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">快速添加下级部门:</label>
|
||||
<div class="col-md-4">
|
||||
<div class="mt-checkbox-inline">
|
||||
<form:checkboxes path="childDeptList" items="${fns:getDictList('SYS_OFFICE_COMMON')}" itemLabel="itemValue" itemValue="itemCode" htmlEscape="false"/>
|
||||
<span> </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<shiro:hasPermission name="sys:office:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/> </shiro:hasPermission>
|
||||
<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<shiro:hasPermission name="sys:office:edit">
|
||||
<button type="submit" class="btn blue"><spring:message code="submit"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
<button type="button" class="btn blue btn-outline" onclick="history.go(-1)"><spring:message code="cancel"></spring:message></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form:form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,23 +7,40 @@
|
||||
<style type="text/css">
|
||||
.ztree {overflow:auto;margin:0;_margin-top:10px;padding:10px 0 0 10px;}
|
||||
</style>
|
||||
<link href="${ctxStatic}/jquery-ztree/3.5.12/css/zTreeStyle/zTreeStyle.min.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="${ctxStatic}/jquery-ztree/3.5.12/js/jquery.ztree.all-3.5.min.js" type="text/javascript"></script>
|
||||
<link href="${ctxStatic}/global/plugins/jquery-ztree/3.5.12/css/zTreeStyle/zTreeStyle.min.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="${ctxStatic}/global/plugins/jquery-ztree/3.5.12/js/jquery.ztree.all-3.5.min.js" type="text/javascript"></script>
|
||||
<script src="${pageContext.request.contextPath}/global/scripts/mustache.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/sys/office/form?itType=${itType}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="officeManage"></spring:message>
|
||||
<small><spring:message code="date_list"/></small>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
|
||||
<sys:message content="${message}"/>
|
||||
<div id="content" class="row-fluid">
|
||||
<div id="left" class="accordion-group">
|
||||
<div id="left" class="accordion-group" style="display:inline-block;">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle">组织机构<i class="icon-refresh pull-right" onclick="refreshTree();"></i></a>
|
||||
</div>
|
||||
<div id="ztree" class="ztree"></div>
|
||||
</div>
|
||||
<div id="openClose" class="close"> </div>
|
||||
<div id="right">
|
||||
</div>
|
||||
|
||||
<div id="right" style="display: inline-block">
|
||||
<iframe id="officeContent" src="${ctx}/sys/office/list?id=&parentIds=" frameborder="no" width="100%" height="91%"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function(){
|
||||
@@ -65,7 +82,8 @@
|
||||
$(".ztree").width(leftWidth - 10).height(frameObj.height() - 46);
|
||||
}
|
||||
</script>
|
||||
<script src="${ctxStatic}/common/wsize.min.js" type="text/javascript"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/scripts/wsize.min.js" type="text/javascript"></script>
|
||||
<%-- <script src="${ctxStatic}/common/wsize.min.js" type="text/javascript"></script> --%>
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>机构管理</title>
|
||||
<link href="${ctxStatic}/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
|
||||
<script src="${ctxStatic}/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
|
||||
<link href="${ctxStatic}/global/plugins/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
|
||||
<script src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
|
||||
<script src="${ctxStatic}/global/scripts/mustache.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
var tpl = $("#treeTableTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
|
||||
@@ -26,7 +27,6 @@
|
||||
|
||||
for (var i=0; i<data.length; i++){
|
||||
var row = data[i];
|
||||
|
||||
var value = ${fns:jsGetVal('row.parentId')};
|
||||
if(!value){
|
||||
value = 0;
|
||||
@@ -50,16 +50,30 @@
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="${ctx}/sys/office/list?id=${sysOffice.id}&parentIds=${sysOffice.parentIds}">机构列表</a></li>
|
||||
<shiro:hasPermission name="sys:office:edit"><li><a href="${ctx}/sys/office/form?parent.id=${sysOffice.id}">机构添加</a></li></shiro:hasPermission>
|
||||
</ul>
|
||||
<div class="page-content">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
|
||||
<div class="portlet-body">
|
||||
|
||||
<!-- <ul class="nav nav-tabs"> -->
|
||||
<%-- <li class="active"><a href="${ctx}/sys/office/list?id=${sysOffice.id}&parentIds=${sysOffice.parentIds}">机构列表</a></li> --%>
|
||||
<%-- <shiro:hasPermission name="sys:office:edit"><li><a href="${ctx}/sys/office/form?parent.id=${sysOffice.id}">机构添加</a></li></shiro:hasPermission> --%>
|
||||
<!-- </ul> -->
|
||||
<div class="table-responsive">
|
||||
<sys:message content="${message}"/>
|
||||
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
||||
<thead><tr><th>机构名称</th><th>归属区域</th><th>机构编码</th><th>所属级别</th><th>机构类型</th><th>机构职责分类</th><th>备注</th><shiro:hasPermission name="sys:office:edit"><th>操作</th></shiro:hasPermission></tr></thead>
|
||||
<tbody id="treeTableList"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/template" id="treeTableTpl">
|
||||
<tr id="{{row.id}}" pId="{{pid}}">
|
||||
<td><a href="${ctx}/sys/office/form?id={{row.id}}">{{row.name}}</a></td>
|
||||
|
||||
7
src/main/webapp/static/global/scripts/mustache.min.js
vendored
Normal file
7
src/main/webapp/static/global/scripts/mustache.min.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* mustache.js - Logic-less {{mustache}} templates with JavaScript
|
||||
* http://github.com/janl/mustache.js
|
||||
*/
|
||||
(function(a,b){if(typeof exports==="object"&&exports){b(exports)}else{var c={};b(c);if(typeof define==="function"&&define.amd){define(c)}else{a.Mustache=c}}}(this,function(a){var f=/\s*/;var m=/\s+/;var k=/\S/;var i=/\s*=/;var o=/\s*\}/;var u=/#|\^|\/|>|\{|&|=|!/;var g=RegExp.prototype.test;function t(A,z){return g.call(A,z)}function h(z){return !t(k,z)}var w=Object.prototype.toString;var l=Array.isArray||function(z){return w.call(z)==="[object Array]"};function b(z){return typeof z==="function"}function e(z){return z.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var d={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function n(z){return String(z).replace(/[&<>"'\/]/g,function(A){return d[A]})}function v(z){this.string=z;this.tail=z;this.pos=0}v.prototype.eos=function(){return this.tail===""};v.prototype.scan=function(B){var A=this.tail.match(B);if(A&&A.index===0){var z=A[0];this.tail=this.tail.substring(z.length);this.pos+=z.length;return z}return""};v.prototype.scanUntil=function(B){var A=this.tail.search(B),z;switch(A){case -1:z=this.tail;this.tail="";break;case 0:z="";break;default:z=this.tail.substring(0,A);this.tail=this.tail.substring(A)}this.pos+=z.length;return z};function s(z,A){this.view=z==null?{}:z;this.parent=A;this._cache={".":this.view}}s.make=function(z){return(z instanceof s)?z:new s(z)};s.prototype.push=function(z){return new s(z,this)};s.prototype.lookup=function(z){var C;if(z in this._cache){C=this._cache[z]}else{var B=this;while(B){if(z.indexOf(".")>0){C=B.view;var D=z.split("."),A=0;while(C!=null&&A<D.length){C=C[D[A++]]}}else{C=B.view[z]}if(C!=null){break}B=B.parent}this._cache[z]=C}if(b(C)){C=C.call(this.view)}return C};function q(){this.clearCache()}q.prototype.clearCache=function(){this._cache={};this._partialCache={}};q.prototype.compile=function(B,z){var A=this._cache[B];if(!A){var C=a.parse(B,z);A=this._cache[B]=this.compileTokens(C,B)}return A};q.prototype.compilePartial=function(A,C,z){var B=this.compile(C,z);
|
||||
this._partialCache[A]=B;return B};q.prototype.getPartial=function(z){if(!(z in this._partialCache)&&this._loadPartial){this.compilePartial(z,this._loadPartial(z))}return this._partialCache[z]};q.prototype.compileTokens=function(B,A){var z=this;return function(C,E){if(E){if(b(E)){z._loadPartial=E}else{for(var D in E){z.compilePartial(D,E[D])}}}return p(B,z,s.make(C),A)}};q.prototype.render=function(B,z,A){return this.compile(B)(z,A)};function p(H,B,z,K){var E="";function A(N){return B.render(N,z)}var C,I,J;for(var F=0,G=H.length;F<G;++F){C=H[F];I=C[1];switch(C[0]){case"#":J=z.lookup(I);if(typeof J==="object"||typeof J==="string"){if(l(J)){for(var D=0,M=J.length;D<M;++D){E+=p(C[4],B,z.push(J[D]),K)}}else{if(J){E+=p(C[4],B,z.push(J),K)}}}else{if(b(J)){var L=K==null?null:K.slice(C[3],C[5]);J=J.call(z.view,L,A);if(J!=null){E+=J}}else{if(J){E+=p(C[4],B,z,K)}}}break;case"^":J=z.lookup(I);if(!J||(l(J)&&J.length===0)){E+=p(C[4],B,z,K)}break;case">":J=B.getPartial(I);if(b(J)){E+=J(z)}break;case"&":J=z.lookup(I);if(J!=null){E+=J}break;case"name":J=z.lookup(I);if(J!=null){E+=a.escape(J)}break;case"text":E+=I;break}}return E}function y(F){var A=[];var E=A;var G=[];var C;for(var B=0,z=F.length;B<z;++B){C=F[B];switch(C[0]){case"#":case"^":G.push(C);E.push(C);E=C[4]=[];break;case"/":var D=G.pop();D[5]=C[2];E=G.length>0?G[G.length-1][4]:A;break;default:E.push(C)}}return A}function c(E){var B=[];var D,A;for(var C=0,z=E.length;C<z;++C){D=E[C];if(D){if(D[0]==="text"&&A&&A[0]==="text"){A[1]+=D[1];A[3]=D[3]}else{A=D;B.push(D)}}}return B}function r(z){return[new RegExp(e(z[0])+"\\s*"),new RegExp("\\s*"+e(z[1]))]}function x(P,F){P=P||"";F=F||a.tags;if(typeof F==="string"){F=F.split(m)}if(F.length!==2){throw new Error("Invalid tags: "+F.join(", "))}var J=r(F);var B=new v(P);var H=[];var G=[];var E=[];var Q=false;var O=false;function N(){if(Q&&!O){while(E.length){delete G[E.pop()]}}else{E=[]}Q=false;O=false}var C,A,I,K,D,z;while(!B.eos()){C=B.pos;I=B.scanUntil(J[0]);if(I){for(var L=0,M=I.length;L<M;++L){K=I.charAt(L);if(h(K)){E.push(G.length)
|
||||
}else{O=true}G.push(["text",K,C,C+1]);C+=1;if(K=="\n"){N()}}}if(!B.scan(J[0])){break}Q=true;A=B.scan(u)||"name";B.scan(f);if(A==="="){I=B.scanUntil(i);B.scan(i);B.scanUntil(J[1])}else{if(A==="{"){I=B.scanUntil(new RegExp("\\s*"+e("}"+F[1])));B.scan(o);B.scanUntil(J[1]);A="&"}else{I=B.scanUntil(J[1])}}if(!B.scan(J[1])){throw new Error("Unclosed tag at "+B.pos)}D=[A,I,C,B.pos];G.push(D);if(A==="#"||A==="^"){H.push(D)}else{if(A==="/"){z=H.pop();if(!z){throw new Error('Unopened section "'+I+'" at '+C)}if(z[1]!==I){throw new Error('Unclosed section "'+z[1]+'" at '+C)}}else{if(A==="name"||A==="{"||A==="&"){O=true}else{if(A==="="){F=I.split(m);if(F.length!==2){throw new Error("Invalid tags at "+C+": "+F.join(", "))}J=r(F)}}}}}z=H.pop();if(z){throw new Error('Unclosed section "'+z[1]+'" at '+B.pos)}return y(c(G))}a.name="mustache.js";a.version="0.7.3";a.tags=["{{","}}"];a.Scanner=v;a.Context=s;a.Writer=q;a.parse=x;a.escape=n;var j=new q();a.clearCache=function(){return j.clearCache()};a.compile=function(A,z){return j.compile(A,z)};a.compilePartial=function(A,B,z){return j.compilePartial(A,B,z)};a.compileTokens=function(A,z){return j.compileTokens(A,z)};a.render=function(B,z,A){return j.render(B,z,A)};a.to_html=function(C,A,B,D){var z=a.render(C,A,B);if(b(D)){D(z)}else{return z}}}));
|
||||
19
src/main/webapp/static/global/scripts/wsize.min.js
vendored
Normal file
19
src/main/webapp/static/global/scripts/wsize.min.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/*!
|
||||
* Copyright © 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
|
||||
*
|
||||
* 主框架窗口大小调整
|
||||
* @author ThinkGem
|
||||
* @version 2013-11-09
|
||||
*/
|
||||
$("#left").width(leftWidth);
|
||||
$("#openClose").click(function(){if($(this).hasClass("close")){
|
||||
$(this).removeClass("close");
|
||||
$(this).addClass("open");
|
||||
$("#left").animate({width:0,opacity:"hide"});
|
||||
$("#right").animate({width:$("#content").width()-$("#openClose").width()-5},function(){
|
||||
if(typeof openCloseClickCallBack=="function"){openCloseClickCallBack(true)}wSize()})}
|
||||
else{$(this).addClass("close");$(this).removeClass("open");$("#left").animate({width:leftWidth,opacity:"show"});
|
||||
$("#right").animate({width:$("#content").width()-$("#openClose").width()-leftWidth-9},
|
||||
function(){if(typeof openCloseClickCallBack=="function"){openCloseClickCallBack(true)}wSize()})}});
|
||||
if(!Array.prototype.map){Array.prototype.map=function(e,d){var a=[],b=0;for(var c=0,f=this.length;c<f;c++){if(c in this){a[b++]=e.call(d,this[c],c,this)}}return a}}var getWindowSize=function(){return["Height","Width"].map(function(a){return window["inner"+a]||document.compatMode==="CSS1Compat"&&document.documentElement["client"+a]||document.body["client"+a]})};$(window).resize(function(){wSize()});
|
||||
wSize();
|
||||
Reference in New Issue
Block a user