|
|
@@ -25,6 +25,10 @@ $(document).ready(function () {
|
|
|
rightElesObj.left = $('#midContent');
|
|
|
rightElesObj.right = $('#rightContent');
|
|
|
SlideResize.horizontalSlide(rightElesObj, {min: 200, max: `$('#dataRow').width() - $('#leftContent').width() - 200`}, function () {
|
|
|
+ let resizeRate = 500 / $('#midContent').width(),
|
|
|
+ sheetRate = 100 - resizeRate;
|
|
|
+ $('#leftResize').css('width', `${resizeRate}%`);
|
|
|
+ $('#GLJListSheet').css('width', `${sheetRate}%`);
|
|
|
refreshALlWorkBook();
|
|
|
});
|
|
|
});
|
|
|
@@ -390,26 +394,35 @@ let repositoryGljObj = {
|
|
|
} else{
|
|
|
me.currentGlj = null;
|
|
|
}
|
|
|
- //组成物表能编辑则显示,否则隐藏该工作表
|
|
|
- let rightWidth = getLocalCache('compleGLjrightContentWidth') || '25%';
|
|
|
- rightWidth = rightWidth.replace('%', '');
|
|
|
- let curMidWidth = $('#midContent')[0].style.width.replace('%', ''),
|
|
|
- curRightWidth = $('#rightContent')[0].style.width.replace('%', '');
|
|
|
- if (componentCanEdit && curRightWidth === '0') {
|
|
|
- curMidWidth = parseFloat(curMidWidth) - parseFloat(rightWidth);
|
|
|
- $('#midContent').css('width', `${curMidWidth}%`);
|
|
|
- $('#rightContent').css('width', `${rightWidth}%`);
|
|
|
- } else if(!componentCanEdit && curRightWidth !== '0') {
|
|
|
- curMidWidth = parseFloat(curMidWidth) + parseFloat(rightWidth);
|
|
|
- $('#midContent').css('width', `${curMidWidth}%`);
|
|
|
- $('#rightContent').css('width', `0%`);
|
|
|
- }
|
|
|
//减少触发
|
|
|
if (me.preComponentCanEdit !== componentCanEdit) {
|
|
|
+ me.spreadControl(componentCanEdit);
|
|
|
refreshALlWorkBook();
|
|
|
}
|
|
|
me.preComponentCanEdit = componentCanEdit;
|
|
|
},
|
|
|
+ //组成物表能编辑则显示,否则隐藏该工作表
|
|
|
+ spreadControl: function (showComponent) {
|
|
|
+ let leftWidth = getLocalCache('compleGLjleftContentWidth') || '50%',
|
|
|
+ midWidth = getLocalCache('compleGLjmidContentWidth') || '25%',
|
|
|
+ rightWidth = getLocalCache('compleGLjrightContentWidth') || '25%';
|
|
|
+ [leftWidth, midWidth, rightWidth] = [leftWidth, midWidth, rightWidth].map((v) => parseFloat(v.replace('%', '')));
|
|
|
+ let curMidWidth = parseFloat($('#midContent')[0].style.width.replace('%', '')),
|
|
|
+ curRightWidth = parseFloat($('#rightContent')[0].style.width.replace('%', ''));
|
|
|
+ if (showComponent) {
|
|
|
+ if (leftWidth + midWidth + rightWidth > 100) {
|
|
|
+ leftWidth = 50;
|
|
|
+ midWidth = rightWidth = 25;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ midWidth = curMidWidth + curRightWidth;
|
|
|
+ rightWidth = 0;
|
|
|
+ leftWidth = 100 - midWidth;
|
|
|
+ }
|
|
|
+ $('#leftContent').css('width', `${leftWidth}%`);
|
|
|
+ $('#midContent').css('width', `${midWidth}%`);
|
|
|
+ $('#rightContent').css('width', `${rightWidth}%`);
|
|
|
+ },
|
|
|
onEnterCell: function (sender, args) {
|
|
|
let me = repositoryGljObj;
|
|
|
args.sheet.repaint();
|