tts
This commit is contained in:
parent
3481ad5392
commit
9fba22ca40
|
|
@ -58,31 +58,32 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'echarts','echarts-th
|
||||||
// 为表格2绑定事件
|
// 为表格2绑定事件
|
||||||
Table.api.bindevent(table2);
|
Table.api.bindevent(table2);
|
||||||
|
|
||||||
setTimeout(function () {
|
var $city = $('#select_city');
|
||||||
var $city = $('#select_city');
|
if ($city.data('citypicker')) {
|
||||||
if ($city.data('citypicker')) {
|
$city.citypicker('destroy');
|
||||||
$city.citypicker('destroy');
|
}
|
||||||
}
|
$city.citypicker();
|
||||||
$city.citypicker();
|
|
||||||
|
|
||||||
|
// 延迟一点点,确保弹层生成后再调整位置
|
||||||
|
setTimeout(function () {
|
||||||
var $dropdown = $('.city-picker-dropdown');
|
var $dropdown = $('.city-picker-dropdown');
|
||||||
if ($dropdown.length) {
|
if ($dropdown.length) {
|
||||||
var offset = $city.offset();
|
var offset = $city.offset();
|
||||||
$dropdown.css({
|
$dropdown.css({
|
||||||
top: offset.top + $city.outerHeight(),
|
top: offset.top + $city.outerHeight(),
|
||||||
left: offset.left,
|
left: offset.left,
|
||||||
position: 'absolute',
|
position: 'absolute', // 或 'fixed' 试试
|
||||||
display: 'block',
|
display: 'block',
|
||||||
'z-index': 9999
|
'z-index': 9999
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}, 200);
|
||||||
|
|
||||||
$city.off("cp:updated").on("cp:updated", function () {
|
$city.off("cp:updated").on("cp:updated", function () {
|
||||||
var citypicker = $(this).data("citypicker");
|
var citypicker = $(this).data("citypicker");
|
||||||
var code = citypicker.getCode("district") || citypicker.getCode("city") || citypicker.getCode("province");
|
var code = citypicker.getCode("district") || citypicker.getCode("city") || citypicker.getCode("province");
|
||||||
$("#select_area_id").val(code);
|
$("#select_area_id").val(code);
|
||||||
});
|
});
|
||||||
}, 800);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user