zhangweicheng 6 年之前
父节点
当前提交
4e68ead8a2
共有 2 个文件被更改,包括 17 次插入3 次删除
  1. 17 2
      public/web/sheet/sheet_common.js
  2. 0 1
      web/building_saas/main/js/views/main_tree_col.js

+ 17 - 2
public/web/sheet/sheet_common.js

@@ -517,17 +517,32 @@ var sheetCommonObj = {
     },
     getTipsCombo:function (forLocked,tips,setting) {
         let getTipsCombo = function () {
-
+            this.clickCom=false;
         };
         getTipsCombo.prototype = sheetCommonObj.getDynamicCombo(forLocked);
         if(tips && tips !=""){
             getTipsCombo.prototype.processMouseEnter = function(hitinfo){
-                console.log(hitinfo);
+                if(this.clickCom == true){ //点击了下拉框的三角形,则不用再显示悬浮框了
+                    this.clickCom = false;
+                    return;
+                }
                 TREE_SHEET_HELPER.delayShowTips(hitinfo,setting,tips);
             };
             getTipsCombo.prototype.processMouseLeave = function (hitinfo) {
                 TREE_SHEET_HELPER.hideTipsDiv();
             };
+            getTipsCombo.prototype.processMouseDown = function (hitinfo){
+                if(hitinfo.isReservedLocation == true){//这里是点击了下拉框的三角形才会有这个属性
+                    TREE_SHEET_HELPER.hideTipsDiv();
+                    this.clickCom = true;
+                }
+                GC.Spread.Sheets.CellTypes.ComboBox.prototype.processMouseDown.apply(this, arguments);
+            };
+
+            getTipsCombo.prototype.updateEditor = function (editorContext, cellStyle, cellRect, context){
+                TREE_SHEET_HELPER.hideTipsDiv();
+                GC.Spread.Sheets.CellTypes.ComboBox.prototype.updateEditor.apply(this, arguments);
+            };
         }
         return new getTipsCombo();
     },

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

@@ -255,7 +255,6 @@ let MainTreeCol = {
              if(node.sourceType == ModuleNames.bills &&projectObj.ifItemCharHiden(setting)){//清单、并且项目特征列隐藏的时候悬浮提示
                 tips = node.data.itemCharacterText?node.data.itemCharacterText:'';
              }
-             console.log(setting);
             let dynamicCombo = sheetCommonObj.getTipsCombo(true,tips,setting);//sheetCommonObj.getDynamicCombo(true);
             dynamicCombo.itemHeight(10).items(['m', 'm2', 'm3', 'km', 't', 'kg', '台班', '工日', '昼夜', '元', '项', '处', '个', '件',
                 '根', '组', '系统', '台', '套', '株', '丛', '缸', '支', '只', '块', '座', '对', '份', '樘', '攒', '榀']).editable(true);