فهرست منبع

名称浮动显示

zhangweicheng 6 سال پیش
والد
کامیت
878698061b

+ 2 - 2
Dockerfile_pp

@@ -1,8 +1,8 @@
-FROM costbase:latest
+FROM costbase:2.0
 
 WORKDIR /home/ConstructionCost
 
-RUN git pull http://192.168.1.12:3000/SmartCost/ConstructionCost 1.0.0_online
+COPY . /home/ConstructionCost
 
 RUN cnpm install
 

+ 2 - 1
modules/glj/controllers/glj_controller.js

@@ -803,11 +803,12 @@ async function getGLJListByProjectID(projectId){
         responseData.data.gljList = gljList;
         // 先获取对应标段的项目工料机数据
         let gljListModel = new GLJListModel();
-        let [gljList, mixRatioConnectData,mixRationMap] = await gljListModel.getListByProjectId(projectId, unitPriceFileId);
+        let [gljList, mixRatioConnectData,mixRationMap,unitPriceMap] = await gljListModel.getListByProjectId(projectId, unitPriceFileId);
         responseData.data.gljList = gljList;
         responseData.data.mixRatioConnectData = mixRatioConnectData;
         responseData.data.mixRatioMap = mixRationMap;
         responseData.data.usedTenderList = usedTenderList;
+        responseData.data.unitPriceMap = unitPriceMap;
         let gljTypeMap = glj_type_util.getStdGljTypeCacheObj().innerGljTypeObj;
         responseData.data.constData = {
             materialIdList: gljListModel.materialIdList,

+ 3 - 2
modules/glj/models/glj_list_model.js

@@ -83,6 +83,7 @@ class GLJListModel extends BaseModel {
         let mixRatioConnectData = {};
         let mixRationMap={};
         let keyMap={};
+        let unitPriceList={};
         try {
             // 首先获取对应标段下所有的项目工料机数据
             let condition = {project_id: projectId};
@@ -95,7 +96,7 @@ class GLJListModel extends BaseModel {
 
             // 获取标段设置的单价文件数据
             let unitPriceModel = new UnitPriceModel();
-            let unitPriceList = await unitPriceModel.getDataByFileId(unitPriceFileId);
+            unitPriceList = await unitPriceModel.getDataByFileId(unitPriceFileId);
             // 整理获取工料机ID list
             let gljIdList = [];
             for(let tmp of gljData) {
@@ -172,7 +173,7 @@ class GLJListModel extends BaseModel {
             gljData = [];
         }
 
-        return [gljData, mixRatioConnectData,mixRationMap];
+        return [gljData, mixRatioConnectData,mixRationMap,unitPriceList];
     }
     /**
      * 组合工料机数据和单价文件数据

+ 43 - 1
public/web/sheet/sheet_common.js

@@ -360,7 +360,49 @@ var sheetCommonObj = {
         sheet.setCellType(row, col,getSelectButton(header.headerWidth),GC.Spread.Sheets.SheetArea.viewport);
     },
     setTipsCell(row,col,sheet,header){
-        
+        let TipCellType = function () {};
+        TipCellType.prototype = new GC.Spread.Sheets.CellTypes.Text();
+        TipCellType.prototype.getHitInfo = function (x, y, cellStyle, cellRect, context) {
+            return {
+                x: x,
+                y: y,
+                row: context.row,
+                col: context.col,
+                cellStyle: cellStyle,
+                cellRect: cellRect,
+                sheet: context.sheet,
+                sheetArea: context.sheetArea
+            };
+        };
+        TipCellType.prototype.processMouseEnter = function (hitinfo) {
+            let text = hitinfo.sheet.getText(hitinfo.row, hitinfo.col);
+            let value = hitinfo.sheet.getValue(hitinfo.row, hitinfo.col);
+            let tag = hitinfo.sheet.getTag(hitinfo.row, hitinfo.col);
+            let acStyle = hitinfo.sheet.getActualStyle(hitinfo.row, hitinfo.col),
+                zoom = hitinfo.sheet.zoom();
+            let textLength = this.getAutoFitWidth(value, text, acStyle, zoom, {sheet: hitinfo.sheet, row: hitinfo.row, col: hitinfo.col, sheetArea: GC.Spread.Sheets.SheetArea.viewport});
+            let cellWidth = hitinfo.sheet.getCell(-1, hitinfo.col).width();
+            let setting = {};
+            if(textLength <= cellWidth){
+                return;
+            }
+            if(sheet && sheet.getParent().qo){
+                setting.pos = SheetDataHelper.getObjPos(sheet.getParent().qo);
+            }
+
+            TREE_SHEET_HELPER.showTipsDiv(text,setting,hitinfo);
+        };
+        TipCellType.prototype.processMouseLeave = function (hitinfo) {
+            TREE_SHEET_HELPER.tipDiv = 'hide';
+            if (TREE_SHEET_HELPER._toolTipElement) {
+                $(TREE_SHEET_HELPER._toolTipElement).hide();
+                TREE_SHEET_HELPER._toolTipElement = null;
+            };
+            TREE_SHEET_HELPER.tipDivCheck();//延时检查:当tips正在show的时候,就调用了hide方法,会导致tips一直存在,所以设置一个超时处理
+        };
+
+        sheet.setCellType(row, col,new TipCellType(),GC.Spread.Sheets.SheetArea.viewport);
+
     },
     chkIfEmpty: function(rObj, setting) {
         var rst = true;

+ 2 - 2
web/building_saas/main/js/views/glj_col.js

@@ -5,8 +5,8 @@ let gljCol = {
     ration_glj_setting: {
         header: [
             {headerName: "编码", headerWidth: 100, dataCode: "code", dataType: "String", formatter: "@"},
-            {headerName: "名称", headerWidth: 160, dataCode: "name", dataType: "String"},
-            {headerName: "规格型号", headerWidth: 90, dataCode: "specs", dataType: "String", hAlign: "left"},
+            {headerName: "名称", headerWidth: 160, dataCode: "name", dataType: "String",cellType:'tipsCell'},
+            {headerName: "规格型号", headerWidth: 90, dataCode: "specs", dataType: "String", hAlign: "left",cellType:'tipsCell'},
             {headerName: "单位", headerWidth: 45, dataCode: "unit", dataType: "String", hAlign: "center"},
             {headerName: "市场价", headerWidth: 80, dataCode: "marketPrice", dataType: "Number", hAlign: "right"},//, decimalField: "glj.unitPrice"
             {headerName: "调整价", headerWidth: 80, dataCode: "adjustPrice", dataType: "Number", hAlign: "right"},//, decimalField: "glj.unitPrice"1