فهرست منبع

Merge branch 'master' of chendi/esb into master

huangzhiyong 8 سال پیش
والد
کامیت
d10f4cb78d

+ 205 - 0
src/main/java/com/yihu/hos/qc/controller/RuleController.java

@ -0,0 +1,205 @@
package com.yihu.hos.qc.controller;
import com.google.common.base.Splitter;
import com.yihu.hos.qc.model.RuleModel;
import com.yihu.hos.qc.service.RuleService;
import com.yihu.hos.web.framework.model.Result;
import com.yihu.hos.web.framework.util.controller.BaseController;
import org.apache.commons.beanutils.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * 质控规则管理
 *
 * @author CD
 * @vsrsion 1.0
 * Created at 2017/05/05.
 */
@RequestMapping("/rule")
@Controller
public class RuleController extends BaseController {
    @Resource(name = RuleService.BEAN_ID)
    private RuleService ruleService;
    /**
     * 质控规则管理界面
     *
     * @param model
     * @return
     */
    @RequestMapping("/initial")
    public String ruleInitial(Model model) {
        model.addAttribute("contentPage", "qc/rule");
        return "partView";
    }
    /**
     * 质控规则列表
     *
     * @param request
     * @return
     */
    @RequestMapping("/getRuleList")
    @ResponseBody
    public Result getAppList(HttpServletRequest request, String name, String valid) {
        try {
            Map<String, Object> params = new HashMap<>();
            params.put("name", name);
            String page = StringUtils.isEmpty(request.getParameter("page")) ? "1" : request.getParameter("page");
            String rows = StringUtils.isEmpty(request.getParameter("rows")) ? "10" : request.getParameter("rows");
            params.put("page", page);
            params.put("rows", rows);
            Result result = ruleService.getRuleList(params);
            return result;
        } catch (Exception ex) {
            ex.printStackTrace();
            return Result.error(ex.getMessage());
        }
    }
    /**
     * 质控规则修改页面
     *
     * @param model
     * @param id
     * @return
     */
    @RequestMapping("/editorRule")
    public String editoruleRule(Model model, String id) {
        try {
            RuleModel ruleModel = null;
            if (id != null) {
                ruleModel = ruleService.getRuleById(id);
            } else {
                ruleModel = new RuleModel();
            }
            model.addAttribute("model", ruleModel);
            model.addAttribute("contentPage", "/qc/editorRule");
        } catch (Exception e) {
            e.printStackTrace();
        }
        return "pageView";
    }
    /**
     * 质控规则详情页
     *
     * @param model
     * @param id
     * @return
     */
    @RequestMapping("/ruleDetail")
    public String ruleDetail(Model model, String id) {
        try {
            RuleModel ruleModel = null;
            if (id != null) {
                ruleModel = ruleService.getRuleById(id);
            } else {
                ruleModel = new RuleModel();
            }
            model.addAttribute("model", ruleModel);
            model.addAttribute("contentPage", "/rule/ruleDetail");
        } catch (Exception e) {
            e.printStackTrace();
        }
        return "pageView";
    }
    /**
     * 新增质控规则s信息
     *
     * @param request
     * @return
     */
    @RequestMapping("addRule")
    @ResponseBody
    public Result addRule(HttpServletRequest request) {
        try {
            RuleModel obj = new RuleModel();
            BeanUtils.populate(obj, request.getParameterMap());
            return ruleService.addRule(obj);
        } catch (Exception ex) {
            ex.printStackTrace();
            return Result.error(ex.getMessage());
        }
    }
    /**
     * 删除质控规则信息
     *
     * @param request
     * @return
     */
    @RequestMapping("/deleteRule")
    @ResponseBody
    public Result deleteRule(HttpServletRequest request) {
        try {
            String id = request.getParameter("id");
            ruleService.deleteRule(id);
            return Result.success("删除成功!");
        } catch (Exception e) {
            e.printStackTrace();
            return Result.error("删除失败!");
        }
    }
    /**
     * 批量删除质控规则信息
     *
     * @param request
     * @return
     */
    @RequestMapping("/deleteRuleBatch")
    @ResponseBody
    public Result deleteRuleBatch(HttpServletRequest request) {
        try {
            String idList = request.getParameter("idList");
            List<String> ids = Splitter.on(",").trimResults().splitToList(idList);
            if (!CollectionUtils.isEmpty(ids)) {
                for (String id :
                        ids) {
                    ruleService.deleteRule(id);
                }
            }
            return Result.success("删除成功!");
        } catch (Exception e) {
            e.printStackTrace();
            return Result.error("删除失败!");
        }
    }
    /**
     * 修改质控规则信息
     */
    @RequestMapping("updateRule")
    @ResponseBody
    public Result updateRule(HttpServletRequest request) {
        try {
            RuleModel obj = new RuleModel();
            BeanUtils.populate(obj, request.getParameterMap());
            return ruleService.updateRule(obj);
        } catch (Exception ex) {
            ex.printStackTrace();
            return Result.error(ex.getMessage());
        }
    }
}

+ 48 - 0
src/main/java/com/yihu/hos/qc/dao/RuleDao.java

@ -0,0 +1,48 @@
package com.yihu.hos.qc.dao;
import com.yihu.hos.qc.model.RuleModel;
import com.yihu.hos.web.framework.dao.SQLGeneralDAO;
import com.yihu.hos.web.framework.model.Result;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;
import org.springframework.util.StringUtils;
import java.util.List;
import java.util.Map;
/**
 * @author CD
 * @vsrsion 1.0
 * Created at 2017/05/05.
 */
@Repository("ruleDao")
public class RuleDao extends SQLGeneralDAO {
    public static final String BEAN_ID = "ruleDao";
    public Result getRuleList(Map<String, Object> params) throws Exception {
        StringBuilder sb = new StringBuilder("from RuleModel r where 1=1 ");
        Object name = params.get("name");
        if (!StringUtils.isEmpty(name)) {
            sb.append(" and r.name like '%" + name + "%'");
        }
        return super.getDataGridResult(sb.toString(), Integer.valueOf(params.get("page").toString()), Integer.valueOf(params.get("rows").toString()));
    }
    public List<RuleModel> getRuleList(String name) throws Exception {
        StringBuilder sb = new StringBuilder("from RuleModel r where 1=1 ");
        if (!StringUtils.isEmpty(name)) {
            sb.append(" and r.name like '%" + name + "%'");
        }
        return (List<RuleModel>) super.hibernateTemplate.getSessionFactory().getCurrentSession().createQuery(sb.toString());
    }
    public List<RuleModel> getAllByIdList(List<String> idList) {
        Session session = getCurrentSession();
        Criteria criteria = session.createCriteria(RuleModel.class);
        criteria.add(Restrictions.in("id", idList));
        return criteria.list();
    }
}

+ 82 - 0
src/main/java/com/yihu/hos/qc/model/RuleModel.java

@ -0,0 +1,82 @@
package com.yihu.hos.qc.model;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
/**
 * ss
 * 质控表
 *
 * @author CD
 * @vsrsion 1.0
 * Created at 2017/05/05.
 */
@Entity
@Table(name = "qc_rule")
public class RuleModel implements java.io.Serializable {
    @Id
    @GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "uuid")
    @Column(name = "id")
    private String id;
    @Column(name = "name")
    private String name;
    @Column(name = "type")
    private String type;//分类
    @Column(name = "description")
    private String describe;//描述
    @Column(name = "rule")
    private String rule;//规则
    @Column(name = "error_code")
    private String error_code;//统一错误代码
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }
    public String getDescribe() {
        return describe;
    }
    public void setDescribe(String describe) {
        this.describe = describe;
    }
    public String getRule() {
        return rule;
    }
    public void setRule(String rule) {
        this.rule = rule;
    }
    public String getError_code() {
        return error_code;
    }
    public void setError_code(String error_code) {
        this.error_code = error_code;
    }
}

+ 88 - 0
src/main/java/com/yihu/hos/qc/service/RuleService.java

@ -0,0 +1,88 @@
package com.yihu.hos.qc.service;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.hos.config.MongoConfig;
import com.yihu.hos.core.log.Logger;
import com.yihu.hos.core.log.LoggerFactory;
import com.yihu.hos.qc.dao.RuleDao;
import com.yihu.hos.qc.model.RuleModel;
import com.yihu.hos.web.framework.model.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.zbus.broker.ZbusBroker;
import javax.annotation.Resource;
import java.util.Map;
/**
 * @author CD
 * @vsrsion 1.0
 * Created at 2017/05/05.
 */
@Service("ruleService")
public class RuleService {
    public static final String BEAN_ID = "ruleService";
    static final Logger logger = LoggerFactory.getLogger(RuleService.class);
    @Resource(name = RuleDao.BEAN_ID)
    private RuleDao ruleDao;
    @Value("${spring.data.mongodb.gridFsDatabase}")
    private String dbName;
    @Autowired
    private MongoConfig mongoConfig;
    @Autowired
    private ObjectMapper objectMapper;
    private ZbusBroker zbusBroker;
    @Autowired
    public void setZbusBroker(ZbusBroker zbusBroker) {
        this.zbusBroker = zbusBroker;
    }
    public Result getRuleList(Map<String, Object> params) throws Exception {
        return ruleDao.getRuleList(params);
    }
    public RuleModel getRuleById(String id) throws Exception {
        return ruleDao.getEntity(RuleModel.class, id);
    }
    @Transactional
    public Result addRule(RuleModel obj) throws Exception {
        ruleDao.saveEntity(obj);
        return Result.success("保存成功");
    }
    @Transactional
    public Result updateRule(RuleModel obj) throws Exception {
        RuleModel ruleModel = ruleDao.getEntity(RuleModel.class, obj.getId());
        ruleModel.setName(obj.getName());
        ruleModel.setType(obj.getType());
        ruleModel.setDescribe(obj.getDescribe());
        ruleModel.setRule(obj.getRule());
        ruleModel.setError_code(obj.getError_code());
        return Result.success("更新成功");
    }
    @Transactional
    public Result deleteRule(String id) throws Exception {
        RuleModel ruleModel = ruleDao.getEntity(RuleModel.class, id);
        ruleDao.deleteEntity(ruleModel);
        return Result.success("删除成功");
    }
    /* ==============================服务模块=================================  */
    public Result getRuleServiceList(Map<String, Object> params) throws Exception {
        return ruleDao.getRuleList(params);
    }
}

+ 3 - 0
src/main/webapp/WEB-INF/ehr/jsp/common/indexJs.jsp

@ -118,6 +118,9 @@
                {id: 93, pid: 9, text: '菜单配置', url: '${contextRoot}/menu/initial'},
                {id: 94, pid: 9, text: '菜单按钮配置', url: '${contextRoot}/menu/menuAction/initial'},
                {id: 95, pid: 9, text: '数据源配置', url: '${contextRoot}/datasource/configSources'},
                //质控规则管理
                {id: 8, text: '质控规则管理', icon: '${staticRoot}/images/index/menu5_icon.png'},
                {id: 81, pid: 8, text: '规则管理', url: '${contextRoot}/rule/initial'},
            ];
            if(userRole=="admin"){

+ 74 - 0
src/main/webapp/WEB-INF/ehr/jsp/qc/editorRule.jsp

@ -0,0 +1,74 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8" %>
<%@include file="/WEB-INF/ehr/commons/jsp/commonInclude.jsp" %>
<!--######应用管理页面 > 应用详情模板页######-->
<div id="div_info_form" class="m-form-inline" style="padding-top:10px;" data-role-form>
    <input id="flag" value="${flag}" style="display: none">
    <div class="m-form-group">
        <label><span class="red">*&nbsp;</span>名称:</label>
        <div class="m-form-control ">
            <div class="l-text">
                <input type="text" class="l-text-field required" placeholder="请输入名称" name="name"/>
            </div>
        </div>
    </div>
    <div class="m-form-group">
        <label><span class="red">*&nbsp;</span>分类:</label>
        <div class="m-form-control ">
            <div class="l-text">
                <input type="text" id="type" data-type="select" class="l-text-field required" placeholder="请选择分类" name="type">
            </div>
        </div>
    </div>
    <div class="m-form-group">
        <label><span class="red">*&nbsp;</span>规则描述:</label>
        <div class="m-form-control">
            <div class="l-text">
                <input type="text" class="l-text-field required" placeholder="请输入规则描述" name="describe"/>
            </div>
        </div>
    </div>
    <div class="m-form-group">
        <label><span class="red">*&nbsp;</span>脚本(或接口):</label>
        <div class="m-form-control">
            <div class="l-text">
                <input type="text" class="l-text-field required" placeholder="请输入脚本(或接口)" name="rule"/>
            </div>
        </div>
    </div>
    <div class="m-form-group">
        <label><span class="red">*&nbsp;</span>统一错误代码:</label>
        <div class="m-form-control">
            <div class="l-text">
                <input type="text" id="error_code" data-type="select" class="l-text-field required" placeholder="请选择统一错误代码" name="error_code"/>
            </div>
        </div>
    </div>
    <!-- 隐藏字段 -->
    <div class="m-form-group" style="display: none;">
        <input name="id" hidden="hidden"/>
    </div>
    <div class="m-form-bottom">
        <div id="btnCancel" class="l-button l-button-no">
            <span>关闭</span>
        </div>
        <div id="btnEditor" class="l-button" style="display:none">
            <span>编辑</span>
        </div>
        <div id="btnSave" class="l-button">
            <span>保存</span>
        </div>
    </div>
</div>
<style>
    .m-form-group label{width: 135px;}
    .btnGrayUp.required{border: #FF7777 1px solid; float: left;}
</style>

+ 122 - 0
src/main/webapp/WEB-INF/ehr/jsp/qc/editorRuleJs.jsp

@ -0,0 +1,122 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8" %>
<%@include file="/WEB-INF/ehr/commons/jsp/commonInclude.jsp" %>
<script type="text/javascript">
    /* *************************** 模块初始化 ***************************** */
    var editorParam = {
        //form
        actionUrl:"${contextRoot}/rule/addRule",
        init: function () {
            this.toDisable();
            this.bindEvents();
            this.initForm();
        },
        toDisable: function () {
            if ($("#flag").val() == 'disabled') {
                $("#btnEditor").show();
                $("#btnSave").hide();
                $("input[name='type']").attr("disabled", "disabled");
                $("input[name='name']").attr("disabled", "disabled");
                $("input[name='describe']").attr("disabled", "disabled");
                $("input[name='rule']").attr("disabled", "disabled");
                $("input[name='error_code']").attr("disabled", "disabled");
            }
        },
        initForm: function () {
            var me = this;
            $("#type").ligerComboBox({dict: true, dictName: "RULE_TYPE"});
            $("#error_code").ligerComboBox({dict: true, dictName: "GLOBAL_ERROR_CODE"});
            var data;
            var modelString = "${model.id}";
            if (modelString != undefined && modelString != null && modelString.length > 0) {
                data = {
                    id: "${model.id}",
                    type: "${model.type}",
                    name: "${model.name}",
                    describe: "${model.describe}",
                    rule: "${model.rule}",
                    error_code: "${model.error_code}",
                };
                me.actionUrl = "${contextRoot}/rule/updateRule";
            }
            $("#div_info_form").ligerAutoForm({
                data: data,
                validate: {
                    name:"required",
                    describe:"required",
                    rule:"required",
                    error_code:"required",
                    type:"required",
                },
            });
        },
        bindEvents: function () {
            var me = this;
            $(".m-form-bottom").on("click", "#btnSave", function () {
                $("#btnSave").css("pointer-events", "none");
                $("#name_icon").removeClass("required");
                if ($("#name_icon").val() == "") {
                    $("#name_icon").addClass("required");
                    if (!$("#div_info_form").ligerAutoForm("validate")) {
                        return;
                    }
                    return;
                }
                if (!$("#div_info_form").ligerAutoForm("validate")) {
                    return;
                }
                var data = $("#div_info_form").ligerAutoForm("getData");
                $.ajax({ //ajax处理
                    type: "POST",
                    url: me.actionUrl,
                    dataType: "json",
                    data: data,
                    cache: false,
                    success: function (data) {
                        if (data.successFlg) {
                            parent.rule.dialogSuccess(data.message);
                        }
                        else {
                            $.ligerDialog.error(data.message);
                        }
                        $("#btnSave").css("pointer-events", "");
                    },
                    error: function (data) {
                        $.ligerDialog.error("Status:" + data.status + "(" + data.statusText + ")");
                        $("#btnSave").css("pointer-events", "");
                    }
                });
            });
            $(".m-form-bottom").on("click", "#btnEditor", function () {
                $("#btnEditor").hide();
                $("#btnSave").show();
                $("input[name='type']").removeAttr("disabled");
                $("input[name='name']").removeAttr("disabled");
                $("input[name='describe']").removeAttr("disabled");
                $("input[name='rule']").removeAttr("disabled");
                $("input[name='error_code']").removeAttr("disabled");
                $("#flag").val("");
            });
            $(".m-form-bottom").on("click", "#btnCancel", function () {
                parent.rule.dialog.close();
            });
//            $("#type").ligerComboBox({
//                data: [{"value": "完整性", "code": "1"}, {"value": "及时性", "code": "2"}, {"value": "准确性", "code": "3"}],
//                cancelable: false,
//                onSuccess: function (data) {
//                }
//            });
        }
    };
    $(function () {
        editorParam.init();
    });
</script>
<script type="text/javascript" src="${staticRoot}/lib/jquery/jqueryform.js"></script>

+ 34 - 0
src/main/webapp/WEB-INF/ehr/jsp/qc/rule.jsp

@ -0,0 +1,34 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8" %>
<%@include file="/WEB-INF/ehr/commons/jsp/commonInclude.jsp" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<!--######用户管理页面Title设置######-->
<!-- ####### 页面部分 ####### -->
<div class="m-content">
    <!-- ####### 查询条件部分 ####### -->
    <div class="m-form-inline">
        <div class="m-form-group">
            <div class="m-form-control">
                <input type="text" id="txtName" class="l-text-field" placeholder="请输入名称"/>
            </div>
            <div class="m-form-control right" >
                <div id="div_delete_record" class="l-button" style="background-color: #ec6941;">
                    <span><spring:message code="btn.multi.delete"/></span>
                </div>
                <div id="div_new_record" class="l-button">
                    <span><spring:message code="btn.create"/></span>
                </div>
            </div>
        </div>
    </div>
    <!--######菜单信息表######-->
    <div id="div_grid">
    </div>
</div>
<style>
    #div_delete_record:hover{background: red !important;}
</style>

+ 189 - 0
src/main/webapp/WEB-INF/ehr/jsp/qc/ruleJs.jsp

@ -0,0 +1,189 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8" %>
<%@include file="/WEB-INF/ehr/commons/jsp/commonInclude.jsp" %>
<script>
    /* *************************** 模块初始化 ***************************** */
    var rule = {
        grid: null,
        dialog: null,
        init: function () {
            this.bindEvents();
            this.initForm();
        },
        initForm: function () {
            var me = this;
            $('.m-retrieve-area').show();
            $("#txtName").ligerSearch({
                onClick:function(value){
                    me.reloadGrid();
            }});
            me.grid = $("#div_grid").ligerGrid({
                url: '${contextRoot}/rule/getRuleList',
                parms: {
                    name: $('#txtName').val(),
                },
                checkbox:true,
                columns: [
                    {display: '名称', name: 'name', width: '10%'},
                    {display: '分类', id: 'type', name: 'type', width: '10%'},
                    {display: '规则描述', name: 'describe', width: '20%'},
                    {display: '脚本(或接口)', name: 'rule', width: '20%'},
                    {display: '统一错误代码', id: 'error_code', name: 'error_code', width: '20%'
                    },
                    {
                        display: '操作', name: 'operator', width: '20%', render: function (row) {
                        var html = '<div class="m-inline-buttons" style="width:350px;">';
                        html += "<a class=\"m-btn\" style=\"padding-right:10px\" onclick=\"rule.editorDialog('"+row.id+"','disabled')\">查看详情</a>";
                        html += "<a class=\"m-btn-edit\" onclick=\"rule.editorDialog('"+row.id+"','')\"></a>";
                        html += "<a class=\"m-btn-delete\" onclick=\"rule.delete('"+row.id+"')\"></a>";
                        html += '</div>';
                        return html;
                    }
                    }
                ],
                onDblClickRow: function (row) {
                    me.editorDialog(row.id);
                }
            });
        },
        bindEvents: function () {
            var me = this;
            var flag = false;
            $('#div_new_record').click(function () {
                me.editorDialog();
            });
            $('#div_delete_record').click(function(){
                var rows = rule.grid.getSelecteds();
                if(rows.length > 0){
                    var idArr = [];
                    for(var i in rows){
                        idArr.push(rows[i].id);
                    }
                    rule.deleteBatch(idArr.join(","));
                }else{
                    $.ligerDialog.error("请选择要删除的规则信息!");
                    return false;
                }
            })
            $(".l-text").css("display","inline-block");
            $(".l-text-wrapper").css("display","inline-block");
        },
        delete:function(id){
            var message = "确定要删除该规则信息吗?";
            jQuery.ligerDialog.confirm(message, function (confirm) {
                if (confirm)
                {
                    $.ajax({ //ajax处理
                        type: "POST",
                        url : "${contextRoot}/rule/deleteRule",
                        dataType : "json",
                        data:{id:id},
                        cache:false,
                        success :function(data){
                            if(data.successFlg) {
                                $.ligerDialog.success(data.message);
                                rule.grid.reload();
                            }
                            else{
                                $.ligerDialog.error(data.message);
                            }
                        },
                        error :function(data){
                            $.ligerDialog.error("Status:"+data.status +"(" +data.statusText+")");
                        }
                    });
                }
            });
        },
        // 批量删除
        deleteBatch: function (idList) {
            var message = "确定要删除选中的规则信息吗?";
            jQuery.ligerDialog.confirm(message, function (confirm) {
                if (confirm)
                {
                    $.ajax({ //ajax处理
                        type: "POST",
                        url : "${contextRoot}/rule/deleteRuleBatch",
                        dataType : "json",
                        data:{idList: idList},
                        cache:false,
                        success :function(data){
                            if(data.successFlg) {idList
                                $.ligerDialog.success(data.message);
                                rule.grid.reload();
                            }
                            else{
                                $.ligerDialog.error(data.message);
                            }
                        },
                        error :function(data){
                            $.ligerDialog.error("Status:"+data.status +"(" +data.statusText+")");
                        }
                    });
                }
            });
        },
        //刷新列表数据
        reloadGrid: function () {
            this.grid.set({
                parms: {name: $('#txtName').val(),valid:$('#valid_val').val()}
            });
            this.grid.reload();
        },
        //编辑弹窗
        editorDialog: function (id, flag) {
            var me = this;
            var title = "规则录入";
            var params = null;
            if (id != undefined && id != null) {
                title = "规则录入";
                params = {"id": id, "flag": flag};
            }
            me.dialog = $.ligerDialog.open({
                height: 400,
                width: 500,
                title: title,
                url: '${contextRoot}/rule/editorRule',
                //load: true,
                urlParms: params
            });
        },
        dialogDetail: function (id) {
            var me = this;
            var title = "规则详情";
            var params = null;
            if (id != undefined && id != null) {
                params = {"id": id};
            }
            me.dialog = $.ligerDialog.open({
                height: 500,
                width: 500,
                title: title,
                url: '${contextRoot}/rule/ruleDetail',
                //load: true,
                urlParms: params
            });
        },
    anthorize: function (id) {
        },
        //弹窗返回
        dialogSuccess: function (message) {
            $.ligerDialog.success(message);
            rule.reloadGrid();
            rule.dialog.close();
        }
    };
    $(function () {
        rule.init();
    });
</script>