<form class="form-horizontal" id="ywjcform" method="post" xmlns:th="http://www.w3.org/1999/xhtml">
|
<div class="portlet box ltblue">
|
<div class="portlet-title">
|
业务集成信息
|
<div class="caption">
|
<i class="fa fa-reorder"></i>
|
</div>
|
<div class="tools">
|
<a class="collapse" onclick="portlet_body_ShowOrHide(this);"></a>
|
</div>
|
</div>
|
<div class="portlet-body">
|
<div class="row">
|
<div class="col-sm-12">
|
<div class="control-group">
|
<label class="control-label">服务地址<span style="color: red;">*</span></label>
|
<div class="controls input-icon">
|
<input style="width:89%" id="serverurl" name="serverurl" class="form-control col-sm-11" required=""/>
|
<span class="input-warning tooltips" data-original-title="">
|
<i class="fa-warning-sign" style="display: none;margin-left:30px;"></i>
|
</span>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="row">
|
<div class="col-sm-6">
|
<div class="control-group">
|
<label class="control-label">集成类型<span style="color: red;">*</span></label>
|
<div class="controls input-icon">
|
<select id="integratetype" name="integratetype" class="form-control col-sm-9" onchange="Change(this);" required="">
|
<option value="">-- 请选择 --</option>
|
<option th:selected="(${Res_ExtIntegrate.integratetype}=='页面集成')?'true':'false'" value="页面集成">页面集成</option>
|
<option th:selected="(${Res_ExtIntegrate.integratetype}=='数据集成')?'true':'false'" value="数据集成">数据集成</option>
|
</select>
|
<span class="input-warning tooltips" data-original-title="">
|
<i class="fa-warning-sign" style="display: none;margin-left:30px;"></i>
|
</span>
|
</div>
|
</div>
|
</div>
|
<div class="col-sm-6" name="YeMianJiChengMode" style="display: none;">
|
<div class="control-group">
|
<div class="control-group">
|
<label class="control-label">页面展示模式</label>
|
<div class="controls input-icon">
|
<select id="showmodel" name="showmodel" class="form-control col-sm-9">
|
<option value="">-- 请选择 --</option>
|
<option th:selected="(${Res_ExtIntegrate.showmodel}=='Iframe区块')?'true':'false'" value="Iframe区块">Iframe区块</option>
|
<option th:selected="(${Res_ExtIntegrate.showmodel}=='侧边栏')?'true':'false'" value="侧边栏">侧边栏</option>
|
<option th:selected="(${Res_ExtIntegrate.showmodel}=='弹出页面')?'true':'false'" value="弹出页面">弹出页面</option>
|
</select>
|
<span class="input-warning tooltips" data-original-title="">
|
<i class="fa-warning-sign" style="display: none;margin-left:30px;"></i>
|
</span>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="col-sm-6" name="YeMianJiChengMode" style="display: none;">
|
<div class="control-group">
|
<label class="control-label">分辨率(宽X高)</label>
|
<div class="controls input-icon">
|
<input id="resolutionBen" style="width: 36.12%;" name="resolutionBen" th:value="${resolutionBen}" class="form-control" value="" olnynum="true" />
|
X
|
<input id="resolutionEnd" style="width: 36.12%;" name="resolutionEnd" th:value="${resolutionEnd}" class="form-control" value="" olnynum="true" />
|
</div>
|
</div>
|
</div>
|
<div class="col-sm-12" name="YeMianJiChengMode" style="display: none;">
|
<div class="control-group">
|
<label class="control-label"></label>
|
<div class="controls input-icon">
|
<span style="color:red;">建议分辨率(平台门户面板):宽度为 321、652、983、1314 像素,高度为 200、442 像素</span>
|
</div>
|
</div>
|
</div>
|
<div class="col-sm-6" name="ShuJuJiCheng" style="display: none;">
|
<div class="control-group">
|
<label class="control-label">关联业务图层</label>
|
<div class="controls input-icon">
|
<input th:value="${Res_ExtIntegrate.reflayerid}" type="hidden" id="reflayerid" name="reflayerid" />
|
<input th:value="${reflayername}" type="text" id="reflayername" name="reflayername" readonly="readonly" class="form-control col-sm-8" />
|
<a class="btn" style="background-color: #e5e5e5;vertical-align:baseline !important;color: black;" title='选择关联业务图层' id="btnSelectGlbzt" onclick="reflayer();">...</a>
|
<span class="input-warning tooltips" data-original-title="">
|
<i class="icon-warning-sign" style="display: none;margin-left:34px"></i>
|
</span>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="row" name="ShuJuJiCheng" style="display: none;">
|
<div class="col-sm-6">
|
<div class="control-group">
|
<label class="control-label">地图设置</label>
|
<div class="controls input-icon">
|
<input type="hidden" th:value="${Res_ExtIntegrate.refbasemapid}" id="refbasemapid" name="refbasemapid" />
|
<input th:value="${baseMapLayerName}" id="baseMapLayerName" name="baseMapLayerName" type="text" class="form-control col-sm-6" disabled="disabled" style="padding: 0.3rem 0.7rem;" />
|
<button type="button" class="btn btn-primary" onclick="sheZhi();" style="vertical-align:baseline;">设置</button>
|
<button type="button" class="btn btn-primary" onclick="diTuClear();" style="vertical-align:baseline;">清除</button>
|
</div>
|
</div>
|
</div>
|
<div class="col-sm-6">
|
<div class="control-group">
|
<label class="control-label">业务图层关联字段</label>
|
<div class="controls input-icon">
|
<select id="reflayerfield" name="reflayerfield" class="form-control col-sm-9">
|
<option value="">-- 请选择 --</option>
|
</select>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="row" name="ShuJuJiCheng" style="display: none;">
|
<div class="col-sm-6">
|
<div class="control-group">
|
<label class="control-label">渲染方式</label>
|
<div class="controls input-icon">
|
<select id="rendermode" name="rendermode" class="form-control col-sm-9">
|
<option value="">-- 请选择 --</option>
|
<option th:selected="(${Res_ExtIntegrate.rendermode}=='统计图')?'true':'false'" value="统计图">统计图</option>
|
<option th:selected="(${Res_ExtIntegrate.rendermode}=='统计表')?'true':'false'" value="统计表">统计表</option>
|
<option th:selected="(${Res_ExtIntegrate.rendermode}=='图层渲染')?'true':'false'" value="图层渲染">图层渲染</option>
|
<option th:selected="(${Res_ExtIntegrate.rendermode}=='图层标注')?'true':'false'" value="图层标注">图层标注</option>
|
</select>
|
<span class="input-warning tooltips" data-original-title="">
|
<i class="fa-warning-sign" style="display: none;margin-left:30px;"></i>
|
</span>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="row" style="display: none;">
|
<div class="col-sm-12">
|
<div class="control-group">
|
<label class="control-label">图层渲染样式</label>
|
<div class="controls input-icon">
|
<textarea th:text="${Res_ExtIntegrate.layerjosnclass}" id="layerjosnclass" name="layerjosnclass" class="form-control col-sm-11" rows="3" cols="70" style="height: 70px;" ></textarea>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="row TongJiTu">
|
<div class="col-sm-6">
|
<div class="control-group">
|
<label class="control-label">宽</label>
|
<div class="controls">
|
<input th:value="${Res_ExtIntegrate.chartwidth}" type="text" disabled="true" id="chartwidth1" class="form-control col-sm-9"/>
|
</div>
|
</div>
|
</div>
|
<div class="col-sm-6">
|
<div class="control-group">
|
<label class="control-label">高</label>
|
<div class="controls">
|
<input th:value="${Res_ExtIntegrate.chartheight}" type="text" disabled="true" id="chartheight1" class="form-control col-sm-9">
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="row TongJiTu">
|
<div class="col-sm-12">
|
<div class="control-group">
|
<label class="control-label">模型</label>
|
<div class="controls">
|
<textarea th:text="${Res_ExtIntegrate.chartmodel}" disabled="true" id="chartmodel1" class="form-control col-sm-11"
|
style="height: 285px;width: 89%;"></textarea>
|
<br /><br />
|
<button class="btn btn-primary" id="setChartBtn" onclick="setChartModal();"style="vertical-align:baseline;height: 34px;display:none;" type="button">统计图风格配置
|
</button>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</form>
|
<script th:inline="javascript">
|
$(function () {
|
var isSetChart = [[${isSetChart}]];
|
var serverUrl = [[${serverUrl}]];
|
cheackForm("ywjcform");
|
/*<![CDATA[*/
|
var integratetype = [[${Res_ExtIntegrate.integratetype}]];
|
if (integratetype == "页面集成") {
|
$('div[name=YeMianJiChengMode]').css('display', '');
|
$('div[name=ShuJuJiCheng]').css('display', 'none');
|
$(".TongJiTu").hide();
|
} else if (integratetype == "数据集成") {
|
$('div[name=YeMianJiChengMode]').css('display', 'none');
|
$('div[name=ShuJuJiCheng]').css('display', '');
|
}
|
|
var reflayerid = $("#reflayerid").val();
|
var reflayerfield = [[${Res_ExtIntegrate.Reflayerfield}]];
|
if(reflayerid != "") {
|
getGLTCFiled(reflayerid, reflayerfield);
|
}
|
/*]]>*/
|
$("#rendermode").change(function(){
|
if(serverUrl != "") {
|
if ($(this).val() == "统计图") {
|
$("#setChartBtn").show();
|
$(".TongJiTu").show();
|
} else {
|
$("#setChartBtn").hide();
|
$(".TongJiTu").hide();
|
}
|
}
|
});
|
if(isSetChart == '1'){
|
$("#setChartBtn").show();
|
}
|
else {
|
$(".TongJiTu").hide();
|
}
|
$("#serverurl").val(decodeURI(serverUrl));
|
});
|
|
// //显示模型信息
|
// function showChartMoal() {
|
// if ($("#serverurl").val() == '') {
|
// return false;
|
// }
|
// $(".TongJiTu").show();
|
// $.ajax({
|
// url: '/res/resExtIntegrate/getChartInfo',
|
// type: 'GET',
|
// dataType: 'text',
|
// data: {
|
// resourceid: resMainInfoId,
|
// serverurl: $("#serverurl").val()
|
// },
|
// timeout: 5000,
|
// cache: false,
|
// success: function (urlResult) {
|
// var urlList = eval("(" + urlResult + ")");
|
// if (urlList != null) {
|
// $("#chartwidth1").val(urlList.width != null ? urlList.width : "");
|
// $("#chartheight1").val(urlList.height != null ? urlList.height : "");
|
// $("#chartmodel1").val(urlList.model != null ? JSON.stringify(urlList.model) : "");
|
// }
|
// },
|
// error: function (e) {
|
// console.log(e)
|
// }
|
// })
|
// }
|
|
//底图设置弹框
|
function sheZhi() {
|
//弹出一个页面层
|
layer.open({
|
type: 2,
|
title: '地图设置',
|
shadeClose: true,
|
shade: false,
|
maxmin: false, //开启最大化最小化按钮
|
area: ['600px', '500px'],
|
content: '/res/ResManage/ResRegister/BaseMapSelect?isNotOnlyBaseMap=yes'
|
});
|
}
|
|
//关联业务图层弹框
|
function reflayer() {
|
//弹出一个页面层
|
layer.open({
|
type: 2,
|
title: '关联业务图层',
|
shadeClose: true,
|
shade: false,
|
maxmin: false, //开启最大化最小化按钮
|
area: ['600px', '500px'],
|
content: '/res/ResManage/ResRegister/BusinessLayerSelect'
|
});
|
}
|
|
function diTuClear() {
|
$("#refbasemapid").val("");
|
$("#baseMapLayerName").val("");
|
}
|
//获取关联业务图层图层字段列表
|
function getGLTCFiled(id, reflayerfield) {
|
$.ajax({
|
url: "/res/resExtIntegrate/getGLTCFiled?ResourceId=" + id,
|
type: 'get',
|
success: function(result) {
|
var data = eval(result);
|
var optionList = "<option value=''>-- 请选择 --</option>";
|
for(var i = 0; i < data.length; i++) {
|
if(reflayerfield != "" && reflayerfield == data[i].name) {
|
optionList += "<option value='" + data[i].name + "' selected>" + data[i].alias + "</option>";
|
} else {
|
optionList += "<option value='" + data[i].name + "'>" + data[i].alias + "</option>";
|
}
|
}
|
$("#reflayerfield").html(optionList);
|
},
|
error: function(e) {
|
alert(e.message);
|
}
|
});
|
}
|
|
/*<![CDATA[*/
|
//集成类型切换
|
function Change(obj) {
|
if ($(obj).val() == "页面集成") {
|
$('div[name=YeMianJiChengMode]').css('display', '');
|
$('div[name=ShuJuJiCheng]').css('display', 'none');
|
$(".TongJiTu").hide();
|
} else if ($(obj).val() == "数据集成") {
|
$('div[name=YeMianJiChengMode]').css('display', 'none');
|
$('div[name=ShuJuJiCheng]').css('display', '');
|
}
|
}
|
/*]]>*/
|
// //打开设置模型
|
// function setChartModal(){
|
// if($("#serverurl").val() == ''){
|
// alert("请填写服务地址再设置!");
|
// return false;
|
// }
|
// $.ajax({
|
// url:'/res/resExtIntegrate/getChartInfo',
|
// type:'GET',
|
// dataType:'text',
|
// data:{
|
// resourceid:resMainInfoId,
|
// serverurl:$("#serverurl").val()
|
// },
|
// timeout:5000,
|
// cache:false,
|
// success:function (urlResult) {
|
// if(urlResult!=null){
|
// layer.open({
|
// type: 1,
|
// title: '模型设置',
|
// shadeClose: false,
|
// area: ['600px', '550px'],
|
// content: jQuery("#setChartDiv")
|
// });
|
// var urlList = eval("("+urlResult+")");
|
// if(urlList != null){
|
// $("#chartwidth").val(urlList.width != null ? urlList.width :"");
|
// $("#chartheight").val(urlList.height != null ? urlList.height :"");
|
// $("#chartmodel").val(urlList.model != null ? JSON.stringify(urlList.model):"");
|
// }
|
// }
|
// },
|
// error:function (e) {
|
// console.log(e)
|
// }
|
// })
|
// }
|
|
// //保存模型
|
// function saveSetChart(){
|
// validNum($("#chartwidth").val());
|
// validNum($("#chartheight").val());
|
// $('#modalform').ajaxSubmit({
|
// url: '/res/resExtIntegrate/updateChartInfo',
|
// type: 'post',
|
// dataType: 'json',
|
// data: {'resourceid':resMainInfoId},
|
// success: function (data) {
|
// if(data == "1") {
|
// alert("保存成功!");
|
// closeLayer();
|
// } else {
|
// alert("保存失败!");
|
// }
|
// },
|
// error: function (e) {
|
// alert(e.message);
|
// }
|
// });
|
// }
|
|
//关闭Layer
|
function closeLayer(){
|
$(".layui-layer-close1").click();
|
showChartMoal();
|
}
|
|
//验证数字
|
function validNum(str){
|
if(str != null && str != ''){
|
var reg = new RegExp("^[0-9]*$");
|
if(!reg.test(str)){
|
alert("请输入数字!");
|
return false;
|
}
|
}
|
}
|
</script>
|