|
@@ -9,6 +9,7 @@
|
|
|
|
|
|
let subSpread = null;
|
|
|
let subObj = {
|
|
|
+ TZJNRrePercent:null,
|
|
|
initSubSpread:function () {
|
|
|
contentOprObj.buildSheet($("#jobSpread")[0]);
|
|
|
//sheetCommonObj.bindEscKey(contentOprObj.workBook, [{sheet: contentOprObj.workBook.getSheet(0), editStarting: contentOprObj.onEditStart, editEnded: contentOprObj.onEditEnded}]);
|
|
@@ -158,19 +159,35 @@ function adaptiveTzjnrWidth() {
|
|
|
if(gljOprObj.activeTab !== '#linkTZJNR'){
|
|
|
return;
|
|
|
}
|
|
|
+ let job_proportion = 0.25;
|
|
|
+ let item_proportion = 0.75;
|
|
|
+ if(subObj.TZJNRrePercent){
|
|
|
+ job_proportion = parseFloat(subObj.TZJNRrePercent.nearPercent)/100;
|
|
|
+ item_proportion = 1- job_proportion;
|
|
|
+ }
|
|
|
+
|
|
|
//排版规则工具条宽度
|
|
|
const typeSettingWidth = 30;
|
|
|
- let tzjnrWidth = $('#tzjnrCon').width() + 30;
|
|
|
+ let tzjnrWidth = $('#tabCon').width();
|
|
|
+ console.log("set jobDiv");
|
|
|
+ console.log(subObj.TZJNRrePercent);
|
|
|
//let tzjnrWidth = $(window).width() - $('.main-nav').width() - $('.main-side').width();
|
|
|
- if($('#add-rule').is(':visible')){
|
|
|
- $('#jobDiv').css('width', tzjnrWidth / 3);
|
|
|
- $('#itemDiv').css('width', tzjnrWidth / 3);
|
|
|
+ //2018-11-23 zhang 需求两个表格默认占比为25%:75% 还要可拖动
|
|
|
+ let extWidth = $('#add-rule').is(':visible')? tzjnrWidth / 3:typeSettingWidth;
|
|
|
+ let totalWidth = tzjnrWidth - extWidth - $('#TZJNRResize').width();
|
|
|
+ $('#jobDiv').css('width', totalWidth*job_proportion);
|
|
|
+ $('#itemDiv').css('width', totalWidth*item_proportion);
|
|
|
+ $('#add-rule').is(':visible')?$('#add-rule').css('width', extWidth): $('#openTypeSetting').css('width', extWidth);
|
|
|
+ /* if($('#add-rule').is(':visible')){
|
|
|
+ let totalWidth = tzjnrWidth - tzjnrWidth / 3;
|
|
|
+ $('#jobDiv').css('width', totalWidth*0.25);
|
|
|
+ $('#itemDiv').css('width', totalWidth*0.75);
|
|
|
$('#add-rule').css('width', tzjnrWidth / 3);
|
|
|
} else{
|
|
|
$('#jobDiv').css('width', tzjnrWidth / 2);
|
|
|
$('#itemDiv').css('width', tzjnrWidth / 2 - typeSettingWidth);
|
|
|
$('#openTypeSetting').css('width', typeSettingWidth);
|
|
|
- }
|
|
|
+ }*/
|
|
|
pageCCOprObj.resizeWidth();
|
|
|
refreshSubSpread();
|
|
|
}
|
|
@@ -581,3 +598,17 @@ $('#linkGCLMX').on('shown.bs.tab', function () {
|
|
|
$('#linkAZZJF').on('shown.bs.tab', function () {
|
|
|
gljOprObj.showDataIfRationSelect(projectObj.project.mainTree.selected, '111111');
|
|
|
});
|
|
|
+
|
|
|
+let TZJNR_sideResizeEles = {};
|
|
|
+TZJNR_sideResizeEles.id = 'linkTZJNR';
|
|
|
+TZJNR_sideResizeEles.resize = $('#TZJNRResize');
|
|
|
+TZJNR_sideResizeEles.nearElement = $('#jobDiv');
|
|
|
+TZJNR_sideResizeEles.nearSpread = $('#jobSpread');
|
|
|
+TZJNR_sideResizeEles.farElement = $('#itemDiv');
|
|
|
+TZJNR_sideResizeEles.farSpread = $('#itemSpread');
|
|
|
+TZJNR_sideResizeEles.nav = null;
|
|
|
+slideResize(TZJNR_sideResizeEles, {min: 100, max: $('#tabCon').width() - 30,no_proportion:true}, 'width', function(rePercent){
|
|
|
+ if(rePercent) subObj.TZJNRrePercent = rePercent;
|
|
|
+ adaptiveTzjnrWidth();
|
|
|
+ refreshSubSpread();
|
|
|
+});
|