Преглед на файлове

Merge branch 'master' of lulihong0928/esb into master

esb преди 9 години
родител
ревизия
02a5a56e4d

+ 3 - 3
Hos-resource/src/main/java/com/yihu/ehr/crawler/model/flow/resultModel/DtoSchemeVersionModel.java

@ -12,13 +12,13 @@ import java.util.List;
 * Created at 2016/4/27.
 */
public class DtoSchemeVersionModel extends AdapterSchemeVersionModel implements Serializable {
    private List<CrawlerDataSetModel> dataSets;
    private String dataSets;
    public List<CrawlerDataSetModel> getDataSets() {
    public String getDataSets() {
        return dataSets;
    }
    public void setDataSets(List<CrawlerDataSetModel> dataSets) {
    public void setDataSets(String dataSets) {
        this.dataSets = dataSets;
    }
}

+ 36 - 12
Hos-resource/src/main/java/com/yihu/ehr/datacollect/controller/DataCollectController.java

@ -445,17 +445,8 @@ public class DataCollectController extends BaseController {
        }
    }
    /*
    任务编排
     */
    @RequestMapping("jobLayout")
    public String jobLayout(Model model) {
        model.addAttribute("contentPage", "/datacollect/jobLayout");
        return "partView";
    }
    /**
     * 获取任务编排列表
     * 获取适配方案-版本下拉框列表
     * @return
     */
    @RequestMapping("getLayout")
@ -463,8 +454,22 @@ public class DataCollectController extends BaseController {
    public DetailModelResult getLayout() {
        try {
            DetailModelResult schemeResultDetailModels = adapterSchemeService.getSchemeList();
            ObjectMapper mapper = new ObjectMapper();
            String result = mapper.writeValueAsString(schemeResultDetailModels);
            return schemeResultDetailModels;
        } catch (Exception ex) {
            ex.printStackTrace();
            return null;
        }
    }
    /**
     * 获取任务编排 适配版本列表
     * @return
     */
    @RequestMapping("getSchemeVersionList")
    @ResponseBody
    public DetailModelResult getSchemeVersionList() {
        try {
            DetailModelResult schemeResultDetailModels = adapterSchemeService.getSchemeVersionList();
            return schemeResultDetailModels;
        } catch (Exception ex) {
            ex.printStackTrace();
@ -553,6 +558,15 @@ public class DataCollectController extends BaseController {
        }
    }
    /*
 任务编排
  */
    @RequestMapping("jobLayout")
    public String jobLayout(Model model) {
        model.addAttribute("contentPage", "/datacollect/jobLayout");
        return "partView";
    }
    /*
   任务编排数据映射
    */
@ -568,4 +582,14 @@ public class DataCollectController extends BaseController {
        }
    }
    @RequestMapping("datasetDetail")
    public String datasetDetail(Model model,Integer schemeId,String schemeNm,String version) {
        model.addAttribute("contentPage", "/datacollect/datasetDetail");
        model.addAttribute("schemeId",schemeId);
        model.addAttribute("version",version);
        model.addAttribute("schemeNm",schemeNm);
        return "pageView";
    }
}

+ 0 - 28
Hos-resource/src/main/java/com/yihu/ehr/standard/controller/AdapterPlanController.java

@ -51,32 +51,4 @@ public class AdapterPlanController extends BaseController {
        model.addAttribute("adapterStdVersion",adapterStdVersion);
        return "partView";
    }
    @RequestMapping("updateDataset")
    public String updateDataset(Model model) {
        model.addAttribute("contentPage", "standard/adapterplan/dataset/updateDataset");
        return "pageView";
    }
    @RequestMapping("updateMetadata")
    public String updateMetadata(Model model) {
        model.addAttribute("contentPage", "standard/adapterplan/dataset/updateMetadata");
        return "pageView";
    }
    @RequestMapping("updateDict")
    public String updatedict(Model model) {
        model.addAttribute("contentPage", "standard/adapterplan/dict/updateDict");
        return "pageView";
    }
    @RequestMapping("updateDictItem")
    public String updatedictitem(Model model) {
        model.addAttribute("contentPage", "standard/adapterplan/dict/updateDictItem");
        return "pageView";
    }
}

+ 19 - 12
Hos-resource/src/main/java/com/yihu/ehr/standard/service/adapter/AdapterSchemeService.java

@ -421,25 +421,23 @@ public class AdapterSchemeService extends SQLGeneralDAO {
        List<CrawlerDataSetModel> crawlerDataset = crawlerDao.getSchemeDataset(versionModel.getId());
        DetailModelResult re = new DetailModelResult();
        List<DtoCrawlerDataSet> list = new ArrayList<>();
        for (Object item : jsonArray) {
            JSONObject jsonItem = JSONObject.fromObject(item);
            String datasetId = jsonItem.getString("adapterDatasetId");
            //是否关联任务
        for (AdapterDatasetModel datasetModel:datasetString){
            DtoCrawlerDataSet obj = new DtoCrawlerDataSet();
            obj.setSchemeVersionId(schemeVersionId);
            obj.setDatasetId(datasetModel.getStdDatasetId());
            obj.setDatasetCode(datasetModel.getStdDatasetCode());
            obj.setDatasetName(datasetModel.getStdDatasetName());
            obj.setSchemeId(datasetModel.getSchemeId());
            if (crawlerDataset != null && crawlerDataset.size() > 0) {
                DtoCrawlerDataSet obj = new DtoCrawlerDataSet();
                for (CrawlerDataSetModel cDataSet : crawlerDataset) {
                    if (cDataSet.getDatasetId().equals(datasetId)) {
                    if (cDataSet.getDatasetId().equals(datasetModel.getId())) {
                        obj.setSchemeVersionId(cDataSet.getSchemeVersionId());
                        obj.setDatasetId(cDataSet.getDatasetId());
                        obj.setDatasetCode(cDataSet.getDatasetCode());
                        obj.setDatasetName(cDataSet.getDatasetName());
                        obj.setSchemeId(cDataSet.getSchemeId());
                        obj.setChecked("1");
                        break;
                    }
                }
                list.add(obj);
            }
            list.add(obj);
        }
        re.setDetailModelList(list);
        return re;
@ -460,12 +458,13 @@ public class AdapterSchemeService extends SQLGeneralDAO {
        if (modelList !=null && modelList.size()> 0){
            for (AdapterSchemeVersionModel model:modelList){
                List<CrawlerDataSetModel> crawlerDataset = crawlerDao.getSchemeDataset(model.getId());
                String dataSets=getAppendDataSets(crawlerDataset);
                DtoSchemeVersionModel dtoModel=new DtoSchemeVersionModel();
                dtoModel.setSchemeId(model.getSchemeId());
                dtoModel.setId(model.getId());
                dtoModel.setVersion(model.getVersion());
                dtoModel.setName(model.getName());
                dtoModel.setDataSets(crawlerDataset);
                dtoModel.setDataSets(dataSets);
                list.add(dtoModel);
            }
        }
@ -473,4 +472,12 @@ public class AdapterSchemeService extends SQLGeneralDAO {
        return re;
    }
    public String getAppendDataSets(List<CrawlerDataSetModel> crawlerDataset ){
        StringBuffer buffer=new StringBuffer();
        for (CrawlerDataSetModel crawlerDataSetModel:crawlerDataset){
            buffer.append(crawlerDataSetModel.getDatasetName()).append(",");
        }
        return buffer.toString();
    }
}

+ 49 - 0
Hos-resource/src/main/webapp/WEB-INF/ehr/jsp/datacollect/datasetDetail.jsp

@ -0,0 +1,49 @@
<%--
  Created by IntelliJ IDEA.
  User: llh
  Date: 2016/1/7
  Time: 14:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="utf-8"%>
<%@include file="/WEB-INF/ehr/commons/jsp/commonInclude.jsp" %>
<div id="div_dataset_info_form" data-role-form class="m-form-inline f-mt20">
  <div class="m-form-group" style="margin-left: 10px;">
    <label style="text-align: left;width: 68px;">已选择:</label>
    <div class="l-text-wrapper m-form-control">
      <label type="text" class="f-w240" id="lbl_publisher" style="text-align: left">${schemeNm}</label>
    </div>
  </div>
  <div class="m-form-group" style="margin-left: 10px;">
    <label style="text-align: left;width: 68px;">数据集:</label>
    <div class="l-text-wrapper m-form-control">
      <input type="text" class="f-w240 f-pl5" id="inp_datasetNm">
    </div>
  </div>
  <div style="margin: 0 15px;">
      <div id="div_dataset_grid" >
      </div>
  </div>
  <div class="m-form-bottom">
    <div id="btn_close" class="l-button l-button-no">
      <span>取消</span>
    </div>
    <div id="btn_save" class="l-button">
      <span>确定</span>
    </div>
  </div>
  <input type="hidden" id="standardId" value=""/>
  <input type="hidden" id="type" value=""/>
  <input type="hidden" id="stdType" value=""/>
  <input type="hidden" id="typeFlg" value=""/>
  <input type="hidden" id="hd_url" value="${contextRoot}"/>
  <input type="hidden" id="hd_user" value="${User.id}"/>
</div>

+ 72 - 0
Hos-resource/src/main/webapp/WEB-INF/ehr/jsp/datacollect/datasetDetailJs.jsp

@ -0,0 +1,72 @@
<%--
  Created by IntelliJ IDEA.
  User: llh
  Date: 2016/1/7
  Time: 14:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="utf-8"%>
<%@include file="/WEB-INF/ehr/commons/jsp/commonInclude.jsp" %>
<script >
  (function ($, win) {
      var jobDataset = {};
      var Util = $.Util;
      var schemeId = "${schemeId}";
      //集成标准处理
      jobDataset.attr = {
        grid:null,
        $searchNm: $('#inp_datasetNm'),
        init: function () {
            if(this.grid)
                return;
            this.$searchNm.ligerSearch({onClick: function (value) {
            }});
            this.grid = $("#div_dataset_grid").ligerGrid({
                url: '${contextRoot}/datacollect/getSchemeDataSets',
                parms:{versionId:"${version}"},
                checkbox: true,
                width:560,
                height:400,
                usePager: false,
                columns: [
                    { display: 'datasetId', name: 'datasetId', hide:true },
                    {display:'数据集编码',name:'datasetCode', width: '50%'},
                    {display:'数据集名称',name:'datasetName',width: '50%'}
                ],
                //默认选中
                isChecked:function(row){
                    if(row.checked=="1")
                    {
                        return true;
                    }
                    else{
                        return false;
                    }
                },
            });
          this.event();
        },
        event: function () {
          $("#btn_save").click(function () {
          });
          $("#btn_close").click(function () {
              parent.jobLayout.dialog.close();
          });
        }
      };
      $(function(){
          jobDataset.attr.init();
      })
  })(jQuery, window);
</script>

+ 52 - 29
Hos-resource/src/main/webapp/WEB-INF/ehr/jsp/datacollect/jobLayoutJs.jsp

@ -19,13 +19,11 @@
            $('.m-retrieve-area').show();
            $.ajax({
                url: '${contextRoot}/datacollect/getJobLayout',
                type: "get",
                url: '${contextRoot}/datacollect/getLayout',
                dataType: "json",
                success: function (data) {
                    debugger
                    if(!Util.isStrEmpty(data)){
                        schemeVersionList = data || [];
                    if(data.successFlg){
                        schemeVersionList = data.detailModelList || [];
                    }else{
                        $.ligerDialog.error(data.message);
                    }
@ -38,37 +36,43 @@
            me.grid = $("#div_grid").ligerGrid({
                url: '${contextRoot}/datacollect/getJob',
//                usePager: false,
                url: '${contextRoot}/datacollect/getSchemeVersionList',
                usePager: false,
                columns: [
                    {display:'适配方案',name:'schemeAndVersion', width: '20%',render: function (row, rowindex, value, column) {
                        debugger
                        var select= '<select class="sel-scheme-id form-control"  id="schemeId'+rowindex+'" style="margin-top:3px;font-size:12px;"><option value="">请选择</option>';
                    { display: 'schemeId', name: 'schemeId', hide:true },
                    { display: 'id', name: 'id', hide:true },
                    {display:'适配方案',name:'', width: '20%',render: function (row, rowindex, value, column) {
                        var select= '<select class="sel-scheme-name form-control"  id="schemeNm'+rowindex+'" style="margin-top:3px;font-size:12px;">';
                        for(var i=0;i<schemeVersionList.length;i++){
                            select+='<option value="'+schemeVersionList[i].id+'">'+schemeVersionList[i].name+'</option>';
                            select+='<option value="'+schemeVersionList[i].schemeId+'">'+schemeVersionList[i].name+'</option>';
                        }
                        select = $(select+"</select>");
                        $('option[value="'+row.schemeId+'"]',select).attr('selected',true);
                        return  select.prop("outerHTML");
                    }},
                    {display:'版本',name:'jobPlan',width: '20%',render: function (row, rowindex, value, column) {
                        debugger
                        var select= '<select class="sel-version-id form-control"  id="versionId'+rowindex+'" style="margin-top:3px;font-size:12px;"><option value="">请选择</option>';
                    {display:'版本',name:'',width: '20%',render: function (row, rowindex, value, column) {
                        var select= '<select class="sel-version-name form-control"  id="versionNm'+rowindex+'" style="margin-top:3px;font-size:12px;">';
                        var versionList = [];
                        for(var i=0;i<schemeVersionList.length;i++){
                            versionList = schemeVersionList[i].versionList;
                            for(var j=0;j<versionList.length;j++){
                                select+='<option value="'+versionList[j].id+'">'+versionList[j].name+'</option>';
                            if(schemeVersionList[i].schemeId == row.schemeId){
                                versionList = schemeVersionList[i].versionList;
                                for(var j=0;j<versionList.length;j++){
                                    select+='<option value="'+versionList[j].id+'">'+versionList[j].name+'</option>';
                                }
                            }
                        }
                        select = $(select+"</select>");
                        $('option[value="'+row.schemeId+'"]',select).attr('selected',true);
                        $('option[value="'+row.id+'"]',select).attr('selected',true);
                        return  select.prop("outerHTML");
                    }},
                    {display:'数据集名称',name:'jobDataset', width: '40%'},
                    {display:'数据集名称',name:'dataSets', width: '40%',render: function (row, rowindex, value, column) {
                        var dataSets = value.toString().substring(0,value.length-1);
                        var html = '<input style="margin-top:3px;font-size:12px;" data-rowindex="'+rowindex+'" class="sel-dataset-name form-control" value="'+(dataSets || "")+'" >' +
                                '<div style="display: none;" id="datasetId'+rowindex+'"></div>';
                        return html;
                    }},
                    {display:'操作', name: 'operator', width: '20%', render: function (row) {
                        var html = '<div class="m-inline-buttons" style="width:55px;">';
                        html += '<a href="javascript:void(0)" onclick="javascript:jobLayout.mapping(\''+row.id+'\')">数据映射</a>';
@ -78,20 +82,39 @@
                ],
                onAfterShowData: function (gridData) {//显示完数据事件
                    //【应用数据元编码】change事件
                    $(".sel-scheme-id").on("change", function(event,msg) {
                        var rowIndex = $(this).attr("id").replace("orgId","");
                        var option = '<option value="">请选择</option>';
                        for(var i=0;i<datasourceList.length;i++){
                            if(datasourceList[i].orgId==$(this).val()){
                                option+='<option value="'+datasourceList[i].id+'">'+datasourceList[i].name+'</option>';
                    //【适配方案】change事件
                    $(".sel-scheme-name").on("change", function() {
                        var rowIndex = $(this).attr("id").replace("schemeId","");
                        var option = "";
                        for(var i=0;i<schemeVersionList.length;i++){
                            if(schemeVersionList[i].schemeId == $(this).val()){
                                versionList = schemeVersionList[i].versionList;
                                for(var j=0;j<versionList.length;j++){
                                    option+='<option value="'+versionList[j].id+'">'+versionList[j].name+'</option>';
                                }
                            }
                        }
                        $("#versionId"+rowIndex).html("");
                        $("#versionId"+rowIndex).append(option);
                    });
                        $("#datasourceId"+rowIndex).html("");
                        $("#datasourceId"+rowIndex).append(option);
                    //【数据集名称】focus事件
                    $(".sel-dataset-name").on("focus", function() {
                        var rowindex = $(this).attr("data-rowindex");
                        jobLayout.grid.select(rowindex);//选中行
                        var row = jobLayout.grid.getSelectedRow();
                        var  params = {schemeId:row.schemeId,version:row.id,schemeNm:$("#schemeNm"+rowindex).find("option:selected").text()};
                        me.dialog = $.ligerDialog.open({
                            height: 600,
                            width: 600,
                            title: "数据集选择器",
                            url: '${contextRoot}/datacollect/datasetDetail',
                            //load: true,
                            urlParms: params
                        });
                    });
                }
            });

+ 0 - 5
Hos-resource/src/main/webapp/WEB-INF/ehr/jsp/standard/integration/appIndex.jsp

@ -29,11 +29,6 @@
                       class="f-ml10">
                <input id="hiddenText" type="text" style="display:none">
            </div>
            <div class="m-form-control right" style="display:none">
                <div id="btn_add_publisher" class="l-button l-button-green" >
                    <span>新增发布机构</span>
                </div>
            </div>
        </div>
    </form>
    <!--######应用标准信息表######-->

+ 5 - 9
Hos-resource/src/main/webapp/WEB-INF/ehr/jsp/standard/integration/appIndexJs.jsp

@ -45,7 +45,7 @@
          if(rowdata.type=="0"){//行数据为机构数据
            html += "<a href='#' style=\"width: 80px;\" onclick='standard.list.add(\"" + rowdata.id + "\",\"" + rowdata.name + "\",\"" + rowdata.code + "\",\"" + rowindex + "\", \"0\")'>新增标准</a>";
//            html += "<a class=\"m-btn-edit\" onclick='standard.list.addPublisher(\"" + rowdata.id + "\",\"" + rowdata.name + "\",\"" + rowdata.description + "\", \"modify\")'></a> ";
            html += "<a class=\"m-btn-view\" onclick='standard.list.addPublisher(\"" + rowdata.id + "\", \"modify\")'></a> ";
//            html += "<a class=\"m-btn-delete\" onclick='standard.list.deleted(\"" + rowdata.id + "\",\"" + rowdata.name + "\",\"" + rowindex + "\")'></a>";
          } else if(rowdata.type=="1"){//行数据为标准数据
            html += "<a href='#' style=\"width: 80px;\" onclick='standard.list.addVersion(\"" + rowdata.id + "\",\"" + rowdata.name + "\",\"" + rowdata.code + "\",\"" + rowindex + "\", \"0\")'>新增版本</a>";
@ -154,14 +154,13 @@
        onClosed: callback
      });
    },
    addPublisher: function (id,name,description, type) {
    var _tital = type=="modify"?"修改机构":"新增机构";
    var _url = type=="modify"?standard.list._url + "/integration/publisherUpdate?type=modify&id="+id:standard.list._url + "/integration/publisherUpdate";
    addPublisher: function (id,type) {
    var _tital = "查看机构信息";
    var _url = standard.list._url + "/integration/publisherUpdate?type=modify&id="+id;
    var callback = function () {
      standard.list.getTypeList();
    };
    standard.list.showDialog(_tital, _url, 500, 500, callback);
    standard.list.showDialog(_tital, _url, 300, 400, callback);
  },
    add: function (id,name,code,description, type) {
      var stdType = $("#type").val();
@ -327,9 +326,6 @@
      });
    },
    event: function () {
      $('#btn_add_publisher').click(function () {
        standard.list.addPublisher("","","","");
      });
      $("#inp_search").keyup(function (e) {
        if (e.keyCode == 13) {
          standard.list.getTypeList();

+ 1 - 1
Hos-resource/src/main/webapp/WEB-INF/ehr/jsp/standard/integration/dataset/updateMetadata.jsp

@ -233,7 +233,7 @@
    </div>
      <div class="m-form-bottom">
        <div id="btn_confirm" class="l-button">
          <span>确认</span>
          <span>确定</span>
        </div>
      </div>
  </div>

+ 9 - 0
Hos-resource/src/main/webapp/WEB-INF/ehr/jsp/standard/integration/indexJs.jsp

@ -45,6 +45,7 @@
          var html = '<div class="m-inline-buttons" style="width:200px;">';
          if(rowdata.type=="0"){//行数据为机构数据
              html += '<a href="#" style="width: 80px;"onclick="standard.list.add(\'\',\'\',\'\', \'\')">新增标准</a>';
              html += "<a class=\"m-btn-view\" onclick='standard.list.addPublisher(\"" + rowdata.id + "\", \"modify\")'></a> ";
          }
          else if(rowdata.type=="1"){//行数据为标准数据
              html += '<a href="#" style="width: 80px;" onclick="standard.list.addVersion(\''+rowdata.id+'\',\''+rowdata.name+'\',\''+rowdata.code+'\',\''+rowindex+'\',\'0\')">新增版本</a>';
@ -214,6 +215,14 @@
        }
      });
    },
    addPublisher: function (id,type) {
      var _tital = "查看机构信息";
      var _url = standard.list._url + "/integration/publisherUpdate?type=modify&id="+id;
      var callback = function () {
        standard.list.getTypeList();
      };
      standard.list.showDialog(_tital, _url, 300, 400, callback);
    },
    config: function (code,pid,status,rowindex) {
      standard.list.grid.select(rowindex);//选中行
      var row = standard.list.grid.getParent(standard.list.grid.getSelectedRow());

+ 8 - 11
Hos-resource/src/main/webapp/WEB-INF/ehr/jsp/standard/integration/publisher.jsp

@ -11,29 +11,26 @@
<div id="div_publisher_info_form" data-role-form class="m-form-inline f-mt20" style="margin-top: 20px;">
  <div class="m-form-group">
    <label>机构名称:</label>
    <div class="l-text-wrapper m-form-control essential">
      <input type="text" class="required f-w240 " id="txt_name" data-attr-scan="name">
    <div class="l-text-wrapper m-form-control">
      <label type="text" class="f-w240 " id="lbl_name" style="text-align: left;"/>
    </div>
  </div>
  <div class="m-form-group">
    <label>机构编码:</label>
    <div class="l-text-wrapper m-form-control essential">
      <input type="text" class="required f-w240 " id="txt_code" data-attr-scan="code">
    <div class="l-text-wrapper m-form-control">
      <label type="text" class="f-w240 " id="lbl_code" style="text-align: left;"/>
    </div>
  </div>
  <div class="m-form-group">
  <div class="m-form-group" style="display: none;">
    <label>机构说明:</label>
    <div class="m-form-control">
      <textarea rows="3" id="txt_description" name="txb_description" style="width: 240px;height: 60px;" data-attr-scan="description"  class="useTitle"></textarea>
      <textarea rows="3" id="tea_description" style="width: 240px;height: 60px;outline: none;resize: none; border: 0px;text-align: left;" class="useTitle"></textarea>
    </div>
  </div>
  <div class="m-form-bottom">
    <div id="btn_close" class="l-button l-button-no">
      <span>取消</span>
    </div>
    <div id="btn_save" class="l-button">
      <span>确认</span>
    <div id="btn_confirm" class="l-button">
      <span>确定</span>
    </div>
  </div>

+ 7 - 57
Hos-resource/src/main/webapp/WEB-INF/ehr/jsp/standard/integration/publisherJs.jsp

@ -15,15 +15,12 @@
      //应用标准处理
      publisher.attr = {
        _url: $("#hd_url").val(),
        _type:null,
        $form: $("#div_publisher_info_form"),
        validator: null,
        init: function () {
          var u = publisher.attr;
          var type = $.Util.getUrlQueryString('type');
          publisher.attr._type = type;
          if(type=="modify"){//修改
            var publisherId = Number($.Util.getUrlQueryString('id').replace("publisher",""));
            var publisherId = $.Util.getUrlQueryString('id').replace("publisher","");
            $("#publisher_id").val(publisherId);
            $.ajax({
                  url: u._url + "/standardCenter/getForPublisherId",
@ -31,15 +28,12 @@
                  dataType: "json",
                  data: {publisherId: publisherId},
                  success: function (data) {
                    if(data!=null){
                      u.$form.attrScan();
                      u.$form.Fields.fillValues({
                        code: data.code,
                        name: data.name,
                        description: data.description
                      });
                    if(data.successFlg){
                        $("#lbl_name").text(data.name);
                        $("#lbl_code").text(data.code);
                        //$("#tea_description").text(data.description);
                    }else{
                      $.ligerDialog.error(result.errorMsg);
                      $.ligerDialog.error(data.message);
                    }
                  },
@ -50,53 +44,9 @@
          }
          this.event();
          this.validator =  new $.jValidation.Validation(this.$form, {immediate: true, onSubmit: false,
            onElementValidateForAjax:function(elm){
            }
          });
        },
        save: function () {
          if(!this.validator.validate()){
            return;
          }
            debugger
          var _url = "";
          var id = $("#publisher_id").val();
          publisher.attr.$form.attrScan();
          var dataJson =  eval("[" + publisher.attr.$form.Fields.toJsonString() + "]");
          if(publisher.attr._type=="modify"){//修改
            _url = publisher.attr._url + "/standardCenter/updatePublisher";
            dataJson[0]["id"] = Number(id);
          }else{//新增
            _url = publisher.attr._url + "/standardCenter/addPublisher";
          }
          $.ajax({
              url: _url,
              dataType: "json",
              data:{publisher: JSON.stringify(dataJson[0])},
              success: function (data) {
                  if(Util.isStrEmpty(data.message)){
                      $.ligerDialog.alert("保存成功", "提示", "success", function () {
                          parent.standard.list.getTypeList();//刷新数据
                          parent.standard.list.top.dialog_standard_detail.close();
                      }, null);
                  }else{
                      $.ligerDialog.error("保存失败!")
                  }
              },
              error: function (jqXHR, textStatus, errorThrown) {
                  $.ligerDialog.error("保存失败!")
              }
          })
        },
        event: function () {
          $("#btn_save").click(function () {
            publisher.attr.save();//保存标准
          });
          $("#btn_close").click(function () {
          $("#btn_confirm").click(function () {
            parent.standard.list.top.dialog_standard_detail.close();
          });
        }