zhongzewei 6 gadi atpakaļ
vecāks
revīzija
697a115d72

+ 2 - 2
lib/jquery-ui/jquery-ui.css

@@ -979,7 +979,7 @@ a.ui-button:focus {
 .ui-widget-header .ui-state-active,
 a.ui-button:active,
 .ui-button:active,
-.ui-button.ui-state-active:hover {
+/*.ui-button.ui-state-active:hover {
 	border: 1px solid #003eff;
 	background: #007fff;
 	font-weight: normal;
@@ -989,7 +989,7 @@ a.ui-button:active,
 .ui-state-active .ui-icon-background {
 	border: #003eff;
 	background-color: #ffffff;
-}
+}*/
 .ui-state-active a,
 .ui-state-active a:link,
 .ui-state-active a:visited {

+ 1 - 1
modules/complementary_ration_lib/models/compleRationModel.js

@@ -185,7 +185,7 @@ class CompleRatoinDao {
                     hintsArr = hintsArr.concat(ration.annotation.split('\n'));
                 }
                 ration._doc.hint = hintsArr.join('<br>');
-                ration._doc.hintHeight = hintsArr.length * perHintHeight;//控制定额库悬浮提示位置
+               // ration._doc.hintHeight = hintsArr.length * perHintHeight;//控制定额库悬浮提示位置
             }
             callback(0, rations);
         }

+ 34 - 5
public/web/sheet/sheet_data_helper.js

@@ -70,6 +70,9 @@ var SheetDataHelper = {
     },
     loadSheetHeader: function (setting, sheet) {
         this.massOperationSheet(sheet, function () {
+            if(setting.rowHeaderWidth !== undefined && setting.rowHeaderWidth !== null){
+                sheet.setColumnWidth(0, setting.rowHeaderWidth, GC.Spread.Sheets.SheetArea.rowHeader);
+            }
             if (setting.frozenCols) {
                 sheet.frozenColumnCount(setting.frozenCols);
             }
@@ -122,7 +125,13 @@ var SheetDataHelper = {
         style.wordWrap = setting.data.wordWrap;
         return style;
     },
+    getTipWidth: function(text){
+        const fontSize = 14.4;
+        let widthArr = text.split('<br>');
+        console.log(widthArr);
+    },
     loadSheetData: function (setting, sheet, datas) {
+        let me = this;
         SheetDataHelper.protectdSheet(sheet);
 
 
@@ -143,9 +152,9 @@ var SheetDataHelper = {
         TipCellType.prototype.processMouseEnter = function (hitinfo) {
             let text = hitinfo.sheet.getText(hitinfo.row, hitinfo.col);
             let tag = hitinfo.sheet.getTag(hitinfo.row, hitinfo.col);
-            let hintHeight = datas[hitinfo.row] ?
+       /*     let hintHeight = datas[hitinfo.row] ?
                                 datas[hitinfo.row].hintHeight ? datas[hitinfo.row].hintHeight : null
-                            : null; //定额库定额悬浮提示位置相关
+                            : null; //定额库定额悬浮提示位置相关*/
             if(tag !== undefined && tag){
                 text = tag;
             }
@@ -153,6 +162,19 @@ var SheetDataHelper = {
                 setting.pos = SheetDataHelper.getObjPos(sheet.getParent().qo);
             }
             if (setting.pos && text && text !== '') {
+                //固定不显示的div,存储文本获取固定div宽度,toolTipElement由于显示和隐藏,获取宽度不正确
+                if(!this._fixedTipElement){
+                    let div = $('#fixedTip')[0];
+                    if (!div) {
+                        div = document.createElement("div");
+                        $(div).css("padding", 5)
+                            .attr("id", 'fixedTip');
+                        $(div).hide();
+                        document.body.insertBefore(div, null);
+                    }
+                    this._fixedTipElement = div;
+                }
+                $(this._fixedTipElement).html(text);
                 if (!this._toolTipElement) {
                     let div = $('#autoTip')[0];
                     if (!div) {
@@ -160,7 +182,7 @@ var SheetDataHelper = {
                         $(div).css("position", "absolute")
                             .css("border", "1px #C0C0C0 solid")
                             .css("box-shadow", "1px 2px 5px rgba(0,0,0,0.4)")
-                           // .css("font", "9pt Arial")
+                            .css("font", "0.9rem Calibri")
                             .css("background", "white")
                             .css("padding", 5)
                             .attr("id", 'autoTip');
@@ -168,9 +190,16 @@ var SheetDataHelper = {
                         document.body.insertBefore(div, null);
                     }
                     this._toolTipElement = div;
+                    //实时读取位置信息
+                    if(hitinfo.sheet && hitinfo.sheet.getParent().qo){
+                        setting.pos = SheetDataHelper.getObjPos(hitinfo.sheet.getParent().qo);
+                    }
                     $(this._toolTipElement).html(text);
-                    if(hintHeight){
-                        $(this._toolTipElement).css("top", setting.pos.y  + hitinfo.y - hintHeight).css("left", setting.pos.x + hitinfo.x + 15);
+                    //定额库定额特殊处理
+                    if($(hitinfo.sheet.getParent().qo).attr('id') === 'stdSectionRations'){
+                        let divWidth = $(this._fixedTipElement).width(),
+                            divHeight = $(this._fixedTipElement).height();
+                        $(this._toolTipElement).css("top", setting.pos.y  + hitinfo.y - divHeight).css("left", setting.pos.x - divWidth);
                     }
                     else{
                         $(this._toolTipElement).css("top", setting.pos.y + hitinfo.y +15).css("left", setting.pos.x + hitinfo.x + 15);

+ 7 - 1
public/web/tree_sheet/tree_sheet_helper.js

@@ -51,6 +51,9 @@ var TREE_SHEET_HELPER = {
     },
     loadSheetHeader: function (setting, sheet) {
         this.massOperationSheet(sheet, function () {
+            if(setting.rowHeaderWidth !== undefined && setting.rowHeaderWidth !== null){
+                sheet.setColumnWidth(0, setting.rowHeaderWidth, GC.Spread.Sheets.SheetArea.rowHeader);
+            }
             if (setting.frozenCols) {
                 sheet.frozenColumnCount(setting.frozenCols);
             }
@@ -109,6 +112,9 @@ var TREE_SHEET_HELPER = {
     refreshTreeNodeData: function (setting, sheet, nodes, recursive) {
         nodes.forEach(function (node) {
             let iRow = node.serialNo();
+            if(setting.emptyRowHeader){
+                sheet.setValue(iRow, 0, '', GC.Spread.Sheets.SheetArea.rowHeader);
+            }
             if(typeof projectObj !== 'undefined'){
                 let nodeStyle = projectObj.getNodeColorStyle(sheet, node);
                 if(node.data.bgColour){
@@ -474,7 +480,7 @@ var TREE_SHEET_HELPER = {
                     $(div).css("position", "absolute")
                         .css("border", "1px #C0C0C0 solid")
                         .css("box-shadow", "1px 2px 5px rgba(0,0,0,0.4)")
-                        .css("font", "9pt Arial")
+                        .css("font", "0.9rem Calibri")
                         .css("background", "White")
                         .css("padding", 5)
                         .attr("id", 'autoTip');

+ 5 - 1
web/building_saas/main/html/main.html

@@ -1363,11 +1363,15 @@
                     <div class="alert alert-success mt-3" id="uploadAlert" role="alert" style="display: none;">
                         广东XXXX项目清单.xlsx 准备导入上传
                     </div>
-                    <button style="margin-top: 2px;" type="button" class="btn btn-primary" id="uploadExample">示例</button>
+                    <!--<button style="margin-top: 2px;" type="button" class="btn btn-primary" id="uploadExample">示例</button>-->
                    <!-- <div id="uploadSheets" style="display: none; border-top: 1px solid #CED4DA;border-left: 1px solid #CED4DA;border-radius: 5px;margin-top: 5px;"></div>-->
+                    <div id="uploadSheetsHead" style="margin-left: 5px;margin-top: 5px; display: none;" class="input-group form-check"><label class="form-check-label" style="width:270px; overflow: hidden; font-weight: bold">
+                        选择工作表...</label><label style="margin-left: 10px; font-weight: bold">导入到...</label>
+                    </div>
                     <div id="uploadSheets"></div>
                 </div>
                 <div class="modal-footer">
+                    <button style="margin-right: 245px;" type="button" class="btn btn-primary" id="uploadExample">示例</button>
                     <a href="javascript:void(0);" class="btn btn-primary" id="importConfirm">确定导入</a>
                     <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                 </div>

+ 4 - 2
web/building_saas/main/js/views/importBills.js

@@ -62,11 +62,12 @@ const importBills = (function(){
         for(let i = 0; i < sheetsCount; i++){
             sheetNames.push(indexMapping[i]);
         }
-        let sheetArea = $('#uploadSheets');
+        let sheetArea = $('#uploadSheets'),
+            sheetHeader = $('#uploadSheetsHead');
         $('#uploadSheets').height('');
         sheetArea.empty();
         for(let sheetName of sheetNames){
-            let sheetDiv = $(`<div style="margin-left: 5px;margin-top: 5px;" class="input-group form-check"><label class="form-check-label" style="width:270px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis">
+            let sheetDiv = $(`<div style="margin-left: 5px;margin-top: 5px;" title="${sheetName}" class="input-group form-check"><label class="form-check-label" style="width:270px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis">
                            <input class="form-check-input" type="checkbox">${sheetName}</label></div>`);
             sheetDiv.find('input[type="checkbox"]').click(function () {
                 if($('#uploadAlert').is(':visible')){
@@ -92,6 +93,7 @@ const importBills = (function(){
         }
         if(sheetNames.length > 0){
             sheetArea.show();
+            sheetHeader.show();
         }
         if($('#uploadSheets').height() > 250){
             sheetArea.css('overflow', 'auto');

+ 1 - 0
web/building_saas/main/js/views/project_view.js

@@ -2693,6 +2693,7 @@ $(function () {
         //恢复选择表高度
         $('#uploadSheets').height('');
         $('#uploadSheets').hide();
+        $('#uploadSheetsHead').hide();
     });
 
     $("#billsSpread").mouseover(function(){

+ 2 - 0
web/building_saas/main/js/views/std_billsGuidance_lib.js

@@ -22,6 +22,8 @@ const billsGuidance = (function () {
         tree: null,
         controller: null,
         treeSetting: {
+            emptyRowHeader: true,
+            rowHeaderWidth: 15,
             treeCol: 0,
             emptyRows: 0,
             headRows: 1,

+ 4 - 2
web/building_saas/main/js/views/std_bills_lib.js

@@ -330,6 +330,8 @@ var billsLibObj = {
         });
     },
     stdBillsTreeSetting: {
+        "emptyRowHeader": true,
+        "rowHeaderWidth": 15,
         "treeCol": 0,
         "emptyRows":0,
         "headRows":1,
@@ -338,7 +340,7 @@ var billsLibObj = {
         ],
         "defaultRowHeight": 21,
         "cols":[{
-            "width":160,
+            "width":140,
             "readOnly": true,
             "head":{
                 "titleNames":["项目编码"],
@@ -355,7 +357,7 @@ var billsLibObj = {
                 "font":"Arial"
             }
         }, {
-            "width":220,
+            "width":190,
             "readOnly": true,
             "head":{
                 "titleNames":["项目名称"],

+ 5 - 4
web/building_saas/main/js/views/std_ration_lib.js

@@ -116,10 +116,10 @@ var rationLibObj = {
         sheet.suspendPaint();
         sheet.suspendEvent();
         for(let i = 0, len = sheet.getRowCount(); i < len; i++){
-            sheet.setTag(i, 1, '');
+            sheet.setTag(i, 0, '');
         }
         for(let i = 0, len = datas.length; i < len; i++){
-            sheet.setTag(i, 1, datas[i].hint ? datas[i].hint : '');
+            sheet.setTag(i, 0, datas[i].hint ? datas[i].hint : '');
         }
         sheet.resumePaint();
         sheet.resumeEvent();
@@ -189,6 +189,8 @@ var rationLibObj = {
         });
     },
     rationChapterTreeSetting: {
+        "emptyRowHeader": true,
+        "rowHeaderWidth": 15,
         "emptyRows":0,
         "headRows":1,
         "headRowHeight":[30],
@@ -221,6 +223,7 @@ var rationLibObj = {
         "cols":[{
             "width":60,
             "readOnly": true,
+            "showHint": true,
             "head":{
                 "titleNames":["编码"],
                 "spanCols":[1],
@@ -238,7 +241,6 @@ var rationLibObj = {
         }, {
             "width":220,
             "readOnly": true,
-            "showHint": true,
             "head":{
                 "titleNames":["名称"],
                 "spanCols":[1],
@@ -318,7 +320,6 @@ var rationLibObj = {
         }
         return parseInt(projectInfoObj.projectInfo.engineeringInfo.ration_lib[0].id);
     }
-
 };
 
 addEventOnResize(rationLibObj.refreshSettingForHint);