|
@@ -1593,12 +1593,10 @@
|
|
// $('#hide-all').hide();
|
|
// $('#hide-all').hide();
|
|
// return false;
|
|
// return false;
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+
|
|
// 定位到审批框高度
|
|
// 定位到审批框高度
|
|
$('.modal').on('shown.bs.modal', function () {
|
|
$('.modal').on('shown.bs.modal', function () {
|
|
const height = $(this)[0].scrollHeight;
|
|
const height = $(this)[0].scrollHeight;
|
|
- const hdiv = divSearch($(this).find('textarea')) ? $(this).find('textarea') : null;
|
|
|
|
- const hdheight = hdiv ? hdiv.parents('.list-group-item').offset().top : null;
|
|
|
|
const scrollBox = $(this).find('div[class="col-8 modal-height-500"]');
|
|
const scrollBox = $(this).find('div[class="col-8 modal-height-500"]');
|
|
const bdiv = scrollBox.offset().top;
|
|
const bdiv = scrollBox.offset().top;
|
|
|
|
|
|
@@ -1606,6 +1604,10 @@
|
|
// if (scrollBox.length && scrollBox[0].scrollHeight > 450) {
|
|
// if (scrollBox.length && scrollBox[0].scrollHeight > 450) {
|
|
// scrollBox.scrollTop(height);
|
|
// scrollBox.scrollTop(height);
|
|
// }
|
|
// }
|
|
|
|
+ scrollBox.scrollTop(0);
|
|
|
|
+ const hdiv = divSearch($(this).find('textarea')) ? $(this).find('textarea') : null;
|
|
|
|
+ const hdheight = hdiv ? hdiv.parents('.list-group-item').offset().top : null;
|
|
|
|
+ console.log(hdheight);
|
|
if (hdiv && scrollBox.length && scrollBox[0].scrollHeight > 450 && hdheight - bdiv > 450) {
|
|
if (hdiv && scrollBox.length && scrollBox[0].scrollHeight > 450 && hdheight - bdiv > 450) {
|
|
scrollBox.scrollTop(hdheight - bdiv);
|
|
scrollBox.scrollTop(hdheight - bdiv);
|
|
}
|
|
}
|