问题修复
This commit is contained in:
parent
d952c24666
commit
313cff9a76
|
|
@ -21,10 +21,6 @@ function setParams(params) {
|
|||
form.render();
|
||||
loadTowerOptions();
|
||||
crossLineFields();
|
||||
if (idParam) {
|
||||
getThreeSpanById();
|
||||
}
|
||||
|
||||
$(".span-type-option").on("click", function () {
|
||||
$(".span-type-option").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
|
|
@ -36,22 +32,28 @@ function setParams(params) {
|
|||
$("#crossPublicFields").hide();
|
||||
$("#crossRailwayFields").hide();
|
||||
crossLineFields();
|
||||
$('#setting').show();
|
||||
break;
|
||||
case "cross-public":
|
||||
$("#crossLineFields").hide();
|
||||
$("#crossPublicFields").show();
|
||||
$("#crossRailwayFields").hide();
|
||||
crossPublicFields();
|
||||
$('#setting').hide();
|
||||
break;
|
||||
case "cross-railway":
|
||||
$("#crossLineFields").hide();
|
||||
$("#crossPublicFields").hide();
|
||||
$("#crossRailwayFields").show();
|
||||
crossRailwayFields();
|
||||
$('#setting').hide();
|
||||
break;
|
||||
}
|
||||
form.render();
|
||||
});
|
||||
if (idParam) {
|
||||
getThreeSpanById();
|
||||
}
|
||||
|
||||
// 监听杆塔选择
|
||||
form.on("select(towerSelect)", function (data) {
|
||||
|
|
@ -319,6 +321,19 @@ function getThreeSpanById() {
|
|||
function (result) {
|
||||
layer.close(loadingMsg);
|
||||
if (result.code === 200) {
|
||||
if(result.data && result.data.spanType){
|
||||
$('.span-type-option').eq(parseInt(result.data.spanType) - 1).trigger('click');
|
||||
if(result.data.spanType === '1'){
|
||||
$('.span-type-option').eq(1).hide();
|
||||
$('.span-type-option').eq(2).hide();
|
||||
}else if(result.data.spanType === '2'){
|
||||
$('.span-type-option').eq(0).hide();
|
||||
$('.span-type-option').eq(2).hide();
|
||||
}else if(result.data.spanType === '3'){
|
||||
$('.span-type-option').eq(0).hide();
|
||||
$('.span-type-option').eq(1).hide();
|
||||
}
|
||||
}
|
||||
setFormData(result.data);
|
||||
} else {
|
||||
layer.alert(result.msg, { icon: 2 });
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@
|
|||
</div>
|
||||
|
||||
<div class="btn-box">
|
||||
<button class="layui-btn layui-btn-normal save" onclick="setSpanTowerLonAndLatData()">配置跨越杆塔经纬度</button>
|
||||
<button class="layui-btn layui-btn-normal save" id="setting" onclick="setSpanTowerLonAndLatData()">配置跨越杆塔经纬度</button>
|
||||
<button class="layui-btn layui-btn-normal save" onclick="saveData2()">确定</button>
|
||||
<button class="layui-btn layui-btn-primary cancel" onclick="closePage()">取消</button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue