|
@ -1,16 +1,17 @@
|
|
|
<%@ 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 = {
|
|
|
var editorAppService = {
|
|
|
//form
|
|
|
actionUrl:"${contextRoot}/app/addAppService",
|
|
|
|
|
|
$condition: null,
|
|
|
$valid:"${model.valid}",
|
|
|
init: function () {
|
|
|
|
|
|
this.initForm();
|
|
|
this.bindEvents();
|
|
|
this.initForm();
|
|
|
},
|
|
|
initForm: function () {
|
|
|
var me = this;
|
|
@ -18,25 +19,35 @@
|
|
|
var modelString = "${model.id}";
|
|
|
if(modelString!=undefined && modelString!=null && modelString.length>0)
|
|
|
{
|
|
|
var valid = "${model.valid}";
|
|
|
liger.get("txtValid").selectValue(valid);
|
|
|
data={
|
|
|
id: "${model.id}",
|
|
|
name: "${model.name}",
|
|
|
code: "${model.code}",
|
|
|
valid: "${model.valid}",
|
|
|
appId: "${model.appId}",
|
|
|
valid: valid,
|
|
|
version: "${model.version}",
|
|
|
description: "${model.description}",
|
|
|
endpoint: "${model.endpoint}",
|
|
|
requestFormat: "${model.requestFormat}".replace(/<br>/ig,"\n"),
|
|
|
requestProtocol: "${model.requestProtocol}",
|
|
|
requesModule: "${model.requesModule}",
|
|
|
requesModule: "${model.requesModule}".replace(/<br>/ig,"\n"),
|
|
|
requestMethod: "${model.requestMethod}",
|
|
|
healthReportType: "${model.healthReportType}",
|
|
|
healthEndpoint: "${model.healthEndpoint}",
|
|
|
responeError: "${model.responeError}",
|
|
|
responeResult:"${model.responeResult}".replace(/<br>/ig,"\n"),
|
|
|
responeError: "${model.responeError}".replace(/<br>/ig,"\n"),
|
|
|
metricsReportType: "${model.metricsReportType}",
|
|
|
metricsEndpoint: "${model.metricsEndpoint}"
|
|
|
};
|
|
|
|
|
|
me.actionUrl = "${contextRoot}/app/updateAppService";
|
|
|
}else{
|
|
|
liger.get("txtValid").selectValue("1");//默认有效
|
|
|
data={
|
|
|
appId: "${appId}"
|
|
|
};
|
|
|
}
|
|
|
|
|
|
$("#div_info_form").ligerAutoForm({
|
|
@ -68,7 +79,7 @@
|
|
|
cache:false,
|
|
|
success :function(data){
|
|
|
if(data.successFlg) {
|
|
|
parent.app.dialogSuccess(data.message);
|
|
|
parent.appService.dialogSuccess(data.message);
|
|
|
}
|
|
|
else{
|
|
|
$.ligerDialog.error(data.message);
|
|
@ -81,22 +92,28 @@
|
|
|
});
|
|
|
|
|
|
$(".m-form-bottom").on("click","#btnCancel",function () {
|
|
|
parent.app.dialog.close();
|
|
|
parent.appService.dialog.close();
|
|
|
});
|
|
|
|
|
|
$("#txtValid").ligerComboBox({data : [{"value":"1","code":"1"},{"value":"0","code":"0"}],
|
|
|
$("#txtValid").ligerComboBox({data : [{"value":"有效","code":"1"},{"value":"无效","code":"0"}],
|
|
|
cancelable:false,
|
|
|
onSuccess:function(data){
|
|
|
}});
|
|
|
|
|
|
|
|
|
$("#resourceCondition").css("height", (window.screen.height - 200) / 5).css("overflow", "auto");
|
|
|
|
|
|
editorAppService.$condition = $('#serviceCondition').ligerCondition({
|
|
|
stdDictUrl: "${contextRoot}/std/getDictByScheme",
|
|
|
});
|
|
|
|
|
|
}
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$(function () {
|
|
|
debugger
|
|
|
editorParam.init();
|
|
|
editorAppService.init();
|
|
|
|
|
|
});
|
|
|
</script>
|