Quellcode durchsuchen

Merge branch '1.0.0_online' of http://smartcost.f3322.net:3000/SmartCost/ConstructionCost into 1.0.0_online

zhangweicheng vor 7 Jahren
Ursprung
Commit
6828ffda1b

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

@@ -469,7 +469,9 @@ var TREE_SHEET_HELPER = {
             if (!node || node.children.length === 0) { return; }
             let centerX = hitinfo.cellRect.x + offset + node.depth() * indent + node.depth() * levelIndent + indent / 2;
             let centerY = (hitinfo.cellRect.y + offset + (hitinfo.cellRect.y + offset + hitinfo.cellRect.height)) / 2;
-            if (hitinfo.x > centerX - halfBoxLength && hitinfo.x < centerX + halfBoxLength && hitinfo.y > centerY - halfBoxLength && hitinfo.y < centerY + halfBoxLength) {
+            //方框外1像素内都有效
+            if (hitinfo.x >= centerX - halfBoxLength - 2 && hitinfo.x <= centerX + halfBoxLength + 2 &&
+                hitinfo.y >= centerY - halfBoxLength - 2 && hitinfo.y <= centerY + halfBoxLength + 2) {
                 node.setExpanded(!node.expanded);
                 let sheetName = hitinfo.sheet.name();
                 if(sheetName === 'stdBillsLib_bills'){

+ 3 - 1
web/building_saas/main/js/views/block_lib.js

@@ -299,7 +299,9 @@ var blockLibObj = {
                 return hitinfo.x > centerX + halfBoxLength && hitinfo.x < centerX + halfBoxLength + imgWidth + indent/2+3 + textLength;
             }
 
-            if (hitinfo.x > centerX - halfBoxLength && hitinfo.x < centerX + halfBoxLength && hitinfo.y > centerY - halfBoxLength && hitinfo.y < centerY + halfBoxLength) {
+            //方框外1像素内都有效
+            if (hitinfo.x >= centerX - halfBoxLength - 2 && hitinfo.x <= centerX + halfBoxLength + 2 &&
+                hitinfo.y >= centerY - halfBoxLength - 2 && hitinfo.y <= centerY + halfBoxLength + 2) {
                 node.setExpanded(!node.expanded);
                 TREE_SHEET_HELPER.massOperationSheet(hitinfo.sheet, function () {
                     let iCount = node.posterityCount(), i, child;

+ 2 - 1
web/building_saas/main/js/views/fee_rate_view.js

@@ -303,7 +303,8 @@ var feeRateObject={
             };
         }
         TreeNodeCellType.prototype.processMouseDown = function (hitinfo) {
-            if (!_.isEmpty(this.rectInfo)&&hitinfo.x < this.rectInfo.x+this.rectInfo.rectW && hitinfo.x > this.rectInfo.x) {
+            ////方框外1像素内都有效
+            if (!_.isEmpty(this.rectInfo)&&Math.floor(hitinfo.x) <= this.rectInfo.x+this.rectInfo.rectW+2 && Math.floor(hitinfo.x) >= this.rectInfo.x-2) {
                 this.collapsed = !this.collapsed;
                 this.refreshChildrenVisible(hitinfo.sheet);
                 hitinfo.sheet.invalidateLayout();

+ 9 - 2
web/building_saas/main/js/views/project_property_basicInfo.js

@@ -398,9 +398,16 @@ let basicInfoView = {
         }
         TreeNodeCellType.prototype.processMouseDown = function (hitinfo) {
             var recode = data[hitinfo.row];
+            let offset = -1,
+                indent = 20,
+                halfBoxLength = 5;
+            let centerX = hitinfo.cellRect.x + offset + indent / 2;
+            let centerY = (hitinfo.cellRect.y + offset + (hitinfo.cellRect.y + offset + hitinfo.cellRect.height)) / 2
             if(recode&&recode.hasOwnProperty('items')){
-                var hoffset= hitinfo.cellRect.x+3;
-                if (hitinfo.x > hoffset && hitinfo.x < hoffset + 10){
+                //方框外1像素内都有效
+                const boxLengh = 10;
+                if (hitinfo.x >= centerX - halfBoxLength - 1 && hitinfo.x <= centerX + halfBoxLength + 1 &&
+                    hitinfo.y >= centerY - halfBoxLength - 1 && hitinfo.y <= centerY + halfBoxLength + 1) {
                     var collapsed = recode.collapsed==undefined?true:recode.collapsed;
                     collapsed = !collapsed
                     recode.collapsed=collapsed;

+ 9 - 2
web/building_saas/main/js/views/project_property_projFeature.js

@@ -379,9 +379,16 @@ let projFeatureView = {
         }
         TreeNodeCellType.prototype.processMouseDown = function (hitinfo) {
             var recode = data[hitinfo.row];
+            let offset = -1,
+                indent = 20,
+                halfBoxLength = 5;
+            let centerX = hitinfo.cellRect.x + offset + indent / 2;
+            let centerY = (hitinfo.cellRect.y + offset + (hitinfo.cellRect.y + offset + hitinfo.cellRect.height)) / 2
             if(recode&&recode.hasOwnProperty('items')){
-                var hoffset= hitinfo.cellRect.x+3;
-                if (hitinfo.x > hoffset && hitinfo.x < hoffset + 10){
+                //方框外1像素内都有效
+                const boxLengh = 10;
+                if (hitinfo.x >= centerX - halfBoxLength - 1 && hitinfo.x <= centerX + halfBoxLength + 1 &&
+                    hitinfo.y >= centerY - halfBoxLength - 1 && hitinfo.y <= centerY + halfBoxLength + 1) {
                     var collapsed = recode.collapsed==undefined?true:recode.collapsed;
                     collapsed = !collapsed
                     recode.collapsed=collapsed;

+ 7 - 7
web/building_saas/pm/html/project-management.html

@@ -99,13 +99,13 @@
                 <div class="tab-content">
                     <div class="tab-pane active" id="pm_all" role="tabpanel">
                         <div class="toolsbar">
-                            <legend class="m-0 px-4 pb-1">全部
-                                <div class="tools-btn btn-group align-top px-3 ">
-                                    <div class="dropdown">
-                                        <a id="startA" class="btn btn-sm" href="javascript:void(0);" role="button" data-toggle="modal" aria-haspopup="true" aria-expanded="false">
-                                            新建
-                                        </a>
-                                    </div>
+                            <legend class="m-0 px-4">项目管理
+                                <div class="tools-btn btn-group align-top px-3 mt-2">
+                                    <a id="startA" href="javascript:void(0);" data-toggle="modal" data-target="#addPoj3" class="btn btn-sm"><i class="fa fa-sticky-note-o"></i> 新建</a>
+                                    <a id="upLevel" href="javascript:void(0);" class="btn btn-light btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="升级"><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
+                                    <a id="downLevel" href="javascript:void(0);" class="btn btn-light btn-sm" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="降级"><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
+                                    <a id="upMove" href="javascript:void(0);" class="btn btn-light btn-sm" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="上移"><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
+                                    <a id="downMove" href="javascript:void(0);" class="btn btn-light btn-sm" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="下移"><i class="fa fa-arrow-down" aria-hidden="true"></i></a>
                                 </div>
                             </legend>
                         </div>

+ 2 - 1
web/building_saas/pm/js/pm_gc.js

@@ -331,7 +331,8 @@ const gcTreeObj = {
             let centerY = (hitinfo.cellRect.y + offset + (hitinfo.cellRect.y + offset + hitinfo.cellRect.height)) / 2;;
             if (!node || node.children.length === 0) { return; }
 
-            if (hitinfo.x > centerX - halfBoxLength && hitinfo.x < centerX + halfBoxLength && hitinfo.y > centerY - halfBoxLength && hitinfo.y < centerY + halfBoxLength) {
+            if (hitinfo.x >= centerX - halfBoxLength - 2 && hitinfo.x <= centerX + halfBoxLength + 2 &&
+                hitinfo.y >= centerY - halfBoxLength - 2 && hitinfo.y <= centerY + halfBoxLength + 2) {
                 node.setExpanded(!node.expanded);
                 TREE_SHEET_HELPER.massOperationSheet(hitinfo.sheet, function () {
                     let iCount = node.posterityCount(), i, child;

+ 141 - 1
web/building_saas/pm/js/pm_newMain.js

@@ -193,6 +193,7 @@ const projTreeObj = {
             this.bindEvent(newWorkBook);
             this.loadContextMenu();
             this.loadStartMenu();
+            this.loadBtn();
         }
         return newWorkBook;
     },
@@ -407,6 +408,142 @@ const projTreeObj = {
             }
         });
     },
+    //刷新按钮有效性(升降级、上下移)
+    refreshBtn: function (selected) {
+        const upLevel = $('#upLevel');
+        const downLevel = $('#downLevel');
+        const upMove = $('#upMove');
+        const downMove = $('#downMove');
+        if (!selected) {
+            upLevel.addClass('disabled');
+            downLevel.addClass('disabled');
+            upMove.addClass('disabled');
+            downMove.addClass('disabled');
+            return;
+        }
+        /* 升级有效
+         * 当前选中文件夹,且文件夹有父项,且父项是文件夹
+         * 当前选中建设项目,且建设项目有父项,且父项是文件夹
+         */
+        if ([projectType.project, projectType.folder].includes(selected.data.projType)
+            && selected.parent && selected.parent.data && selected.parent.data.projType === projectType.folder) {
+            upLevel.removeClass('disabled');
+        } else {
+            upLevel.addClass('disabled');
+        }
+        /*
+         * 降级有效
+         * 当前选中文件夹,且文件夹有前兄弟,且前兄弟是文件夹
+         * 当前选中建设项目,且建设项目有前兄弟,且前兄弟是文件夹
+         * */
+        if ([projectType.project, projectType.folder].includes(selected.data.projType)
+            && selected.preSibling() && selected.preSibling().data.projType === projectType.folder) {
+            downLevel.removeClass('disabled');
+        } else {
+            downLevel.addClass('disabled');
+        }
+        /*
+         * 上移有效
+         * 当前选中行有前兄弟,不论前兄弟类型
+         * */
+        selected.preSibling() ? upMove.removeClass('disabled') : upMove.addClass('disabled');
+        /*
+         * 后移有效
+         * 当前选中行有后兄弟,不论后兄弟类型
+         * */
+        selected.nextSibling ? downMove.removeClass('disabled') : downMove.addClass('disabled');
+
+    },
+    doAfterTreeOpr: function ({selected, parent, next, projectMap}) {
+        $.bootstrapLoading.start();
+        moveProjects({"user_id": userID, rootProjectID: null, projectMap: projectMap, feeRateMap: {}, unitPriceMap: {}},function (result) {
+            for (let key in result) {//更新前端节点数据
+                let updateData = result[key].update;
+                let node = projTreeObj.tree.findNode(result[key].query.ID);
+                if (node) {
+                    for (let ukey in updateData) {
+                        _.set(node.data,ukey,updateData[ukey]);
+                    }
+                }
+            }
+            projTreeObj.moveTo(selected, null, parent, next, null);
+            $.bootstrapLoading.end();
+        });
+    },
+    //升级后选中节点的后兄弟节点不成为其子节点,因为有层级类型限制(相当于选中节点移动到父项后成为其后兄弟)
+    upLevel: function () {
+        let selected = projTreeObj.tree.selected,
+            parent = selected.parent.parent,
+            next = selected.parent.nextSibling,
+            projectMap = {};
+        //更新父节点
+        projectMap[selected.pid()] = {query: {ID: selected.pid()}, update: {NextSiblingID: selected.id()}};
+        //更新选中节点前兄弟节点
+        let orgPre = selected.preSibling();
+        if (orgPre) {
+            projectMap[orgPre.id()] = {query: {ID: orgPre.id()}, update: {NextSiblingID: selected.nid()}};
+        }
+        //更新选中节点
+        projectMap[selected.id()] = {query: {ID: selected.id()}, update: {ParentID: selected.parent.pid(), NextSiblingID: selected.parent.nid()}};
+        this.doAfterTreeOpr({selected, parent, next, projectMap});
+    },
+    downLevel: function () {
+        let selected = projTreeObj.tree.selected,
+            parent = null,
+            next = null,
+            projectMap = {};
+        //更新前兄弟节点
+        let orgPre = selected.preSibling();
+        parent = orgPre;
+        projectMap[orgPre.id()] = {query: {ID: orgPre.id()}, update: {NextSiblingID: selected.nid()}};
+        //更新前兄弟最后子节点
+        if (orgPre.children.length > 0) {
+            let lastChild = orgPre.lastChild();
+            projectMap[lastChild.id()] = {query: {ID: lastChild.id()}, update: {NextSiblingID: selected.id()}};
+        }
+        //更新选中节点
+        projectMap[selected.id()] = {query: {ID: selected.id()}, update: {ParentID: orgPre.id(), NextSiblingID: -1}};
+        this.doAfterTreeOpr({selected, parent, next, projectMap});
+    },
+    upMove: function () {
+        let selected = projTreeObj.tree.selected,
+            parent = selected.parent,
+            next = selected.preSibling(),
+            projectMap = {};
+        //更新前前兄弟
+        let prepre = selected.preSibling().preSibling();
+        if (prepre) {
+            projectMap[prepre.id()] = {query: {ID: prepre.id()}, update: {NextSiblingID: selected.id()}};
+        }
+        //更新前兄弟
+        let pre = selected.preSibling();
+        projectMap[pre.id()] = {query: {ID: pre.id()}, update: {NextSiblingID: selected.nid()}};
+        //更新选中节点
+        projectMap[selected.id()] = {query: {ID: selected.id()}, update: {NextSiblingID: pre.id()}};
+        this.doAfterTreeOpr({selected, parent, next, projectMap});
+    },
+    downMove: function () {
+        let selected = projTreeObj.tree.selected,
+            parent = selected.parent,
+            next = selected.nextSibling.nextSibling,
+            projectMap = {};
+        //更新前兄弟
+        let pre = selected.preSibling();
+        if (pre) {
+            projectMap[pre.id()] = {query: {ID: pre.id()}, update: {NextSiblingID: selected.nid()}};
+        }
+        //更新后兄弟
+        projectMap[selected.nid()] = {query: {ID: selected.nid()}, update: {NextSiblingID: selected.id()}};
+        //更新选中节点
+        projectMap[selected.id()] = {query: {ID: selected.id()}, update: {NextSiblingID: selected.nextSibling.nid()}};
+        this.doAfterTreeOpr({selected, parent, next, projectMap});
+    },
+    loadBtn: function () {
+        $('#upLevel').click(this.upLevel.bind(this));
+        $('#downLevel').click(this.downLevel.bind(this));
+        $('#upMove').click(this.upMove.bind(this));
+        $('#downMove').click(this.downMove.bind(this));
+    },
     getSelStyle: function (backColor) {
         let style = new GC.Spread.Sheets.Style();
         style.backColor = backColor;
@@ -433,6 +570,7 @@ const projTreeObj = {
         let me = this;
         let node = me.tree.items[newSel.row];
         node = node ? node : null;
+        me.refreshBtn(node);
         //恢复底色
         if(oldSel){
             me.setSelStyle(oldSel, me.setting.style.defalutBackColor,sheet);
@@ -886,7 +1024,9 @@ const projTreeObj = {
                 }
                 if (!node || node.children.length === 0) { return; }
             }
-            if (hitinfo.x > centerX - halfBoxLength && hitinfo.x < centerX + halfBoxLength && hitinfo.y > centerY - halfBoxLength && hitinfo.y < centerY + halfBoxLength) {
+            //统一改成方框外1像素内都有效
+            if (hitinfo.x >= centerX - halfBoxLength - 2 && hitinfo.x <= centerX + halfBoxLength + 2 &&
+                hitinfo.y >= centerY - halfBoxLength - 2 && hitinfo.y <= centerY + halfBoxLength + 2) {
                 node.setExpanded(!node.expanded);
                 TREE_SHEET_HELPER.massOperationSheet(hitinfo.sheet, function () {
                     let iCount = node.posterityCount(), i, child;

+ 2 - 1
web/building_saas/pm/js/pm_share.js

@@ -380,7 +380,8 @@ const pmShare = (function () {
                 });
             }
             if (!node || node.children.length === 0) { return; }
-            if (hitinfo.x > centerX - halfBoxLength && hitinfo.x < centerX + halfBoxLength && hitinfo.y > centerY - halfBoxLength && hitinfo.y < centerY + halfBoxLength) {
+            if (hitinfo.x >= centerX - halfBoxLength - 2 && hitinfo.x <= centerX + halfBoxLength + 2 &&
+                hitinfo.y >= centerY - halfBoxLength - 2 && hitinfo.y <= centerY + halfBoxLength + 2) {
                 node.setExpanded(!node.expanded);
                 TREE_SHEET_HELPER.massOperationSheet(hitinfo.sheet, function () {
                     let iCount = node.posterityCount(), i, child;

+ 44 - 8
web/building_saas/report/html/rpt_print.html

@@ -47,32 +47,36 @@
                 if (idx === 0) {
                     $(document).attr("title", pageData[JV.NODE_PAGE_INFO][JV.NODE_MAIN_INFO_RPT_NAME]);
                 }
-                let svgArr = rptPrintHelper.buildSvgArr(pageData, G_OFFSET_X, G_OFFSET_Y);
+                let orgPixelSize = getPixelSize(pageData);
+                let actArea = getActualArea(pageData);
+                let svgArr = rptPrintHelper.buildSvgArr(pageData, actArea, G_OFFSET_X, G_OFFSET_Y);
                 //let orientation = (pageData[JV.NODE_PAGE_INFO][JV.NODE_PAGE_SIZE][0] < pageData[JV.NODE_PAGE_INFO][JV.NODE_PAGE_SIZE][1])?"纵向":"横向";
                 let orientation = "纵向";
-                showPreviewData(svgArr, scaleFactor, sessionStorage.pageSize, orientation);
+                showPreviewData(svgArr, actArea, scaleFactor, sessionStorage.pageSize, orientation, orgPixelSize);
             }
             window.print();
         } else if (sessionStorage.currentPageData) {
             let pageData = JSON.parse(sessionStorage.currentPageData);
             let scaleFactor = parseInt(sessionStorage.scaleFactor);
-            let svgArr = rptPrintHelper.buildSvgArr(pageData, G_OFFSET_X, G_OFFSET_Y);
+            let orgPixelSize = getPixelSize(pageData);
+            let actArea = getActualArea(pageData);
+            let svgArr = rptPrintHelper.buildSvgArr(pageData, actArea, G_OFFSET_X, G_OFFSET_Y);
             $(document).attr("title", pageData[JV.NODE_PAGE_INFO][JV.NODE_MAIN_INFO_RPT_NAME]);
             //showPreviewData(svgArr, scaleFactor, sessionStorage.pageSize, sessionStorage.orientation);
-            showPreviewData(svgArr, scaleFactor, sessionStorage.pageSize, "纵向");
+            showPreviewData(svgArr, actArea, scaleFactor, sessionStorage.pageSize, "纵向", orgPixelSize);
             window.print();
         } else if (sessionStorage.currentPageSvgData) {
             let svgArr = JSON.parse(sessionStorage.currentPageSvgData);
             let scaleFactor = 1;
             //showPreviewData(svgArr, scaleFactor, sessionStorage.pageSize, sessionStorage.orientation);
-            showPreviewData(svgArr, scaleFactor, sessionStorage.pageSize, "纵向");
+            showPreviewData(svgArr, null, scaleFactor, sessionStorage.pageSize, "纵向", null);
             window.print();
         } else {
             //alert("没有报表数据!");
         }
     }
 
-    function showPreviewData(svgArr, scaleFactor, pageSize, orientation) {
+    function showPreviewData(svgArr, actAreaArr, scaleFactor, pageSize, orientation, orgPixelSize) {
         let orgHeight = 793, orgWidth = 1122;
         if (pageSize === 'A3') {
             orgHeight = 1122;
@@ -89,16 +93,48 @@
         }
 
         for (let i = 0; i < svgArr.length; i++) {
+            let offsetHeight = 0, offsetWidth = 0;
+            if (actAreaArr) {
+                offsetWidth = actAreaArr[i].Left + (pageWidth - actAreaArr[i].Right) - 5;
+                offsetHeight = actAreaArr[i].Top + (pageHeight - actAreaArr[i].Bottom) - 5;
+                if (orgPixelSize[0] > orgPixelSize[1]) {
+                    //横向强制改纵向(系统是以纵向为准),那么计算offset的方式会有所不同
+                    offsetWidth = actAreaArr[i].Top + (pageWidth - actAreaArr[i].Bottom) - 5;
+                    offsetHeight = actAreaArr[i].Left + (pageHeight - actAreaArr[i].Right) - 5;
+                }
+            }
             let div = $('<div class="pageBreak"></div>');
             div.append($(svgArr[i].join("")));
             $(div).find("svg").each(function(cIdx,elementSvg){
-                elementSvg.setAttribute('height', pageHeight);
-                elementSvg.setAttribute('width', pageWidth);
+                elementSvg.setAttribute('height', pageHeight - offsetHeight);
+                elementSvg.setAttribute('width', pageWidth - offsetWidth);
             });
             $("body").append(div);
         }
     }
 
+    function getActualArea(pageData) {
+        let rst = [];
+        for (let item of pageData.items) {
+            let area = {Left: 10000, Right: 0, Top: 10000, Bottom: 0};
+            for (let cell of item.cells) {
+                if (cell.area.Left < area.Left) {
+                    area.Left = cell.area.Left;
+                }
+                if (cell.area.Right > area.Right) {
+                    area.Right = cell.area.Right;
+                }
+                if (cell.area.Top < area.Top) {
+                    area.Top = cell.area.Top;
+                }
+                if (cell.area.Bottom > area.Bottom) {
+                    area.Bottom = cell.area.Bottom;
+                }
+            }
+            rst.push(area);
+        }
+        return rst;
+    }
     function closing() {
         //
     }

+ 13 - 4
web/building_saas/report/js/rpt_print.js

@@ -49,7 +49,7 @@ let rptPrintHelper = {
     previewSvgData: function() {
         //
     },
-    buildSvgArr: function (pagesData, offsetX, offsetY) {
+    buildSvgArr: function (pagesData, actAreaArr, offsetX, offsetY) {
         let styles = pagesData[JV.NODE_STYLE_COLLECTION],
             fonts = pagesData[JV.NODE_FONT_COLLECTION],
             controls = pagesData[JV.NODE_CONTROL_COLLECTION]
@@ -64,12 +64,20 @@ let rptPrintHelper = {
         }
         for (let idx = 0; idx < pagesData.items.length; idx++) {
             let page = pagesData.items[idx];
+            let actAreaOffsetX = 0, actAreaOffsetY = 0;
+            if (actAreaArr) {
+                actAreaOffsetX = actAreaArr[idx].Left;
+                actAreaOffsetY = actAreaArr[idx].Top;
+                if (pixelSize[0] > pixelSize[1]) {
+                }
+            }
             let svgPageArr = [];
             svgPageArr.push("<svg width='" + pixelSize[0] + "' height='" + pixelSize[1] + "'>");
             // let adjustY = 0.5 * ((idx + 1) % 2);
             let adjustY = 0.5;
             for (let cell of page.cells) {
-                svgPageArr.push(buildCellSvg(cell, fonts, styles, controls, page[JV.PROP_PAGE_MERGE_BORDER], pagesData[JV.BAND_PROP_MERGE_BAND], offsetX, offsetY, adjustY, canvas, isHtoV, pixelSize));
+                svgPageArr.push(buildCellSvg(cell, fonts, styles, controls, page[JV.PROP_PAGE_MERGE_BORDER], pagesData[JV.BAND_PROP_MERGE_BAND],
+                    offsetX - actAreaOffsetX, offsetY - actAreaOffsetY, adjustY, canvas, isHtoV, pixelSize, actAreaArr[idx]));
             }
             svgPageArr.push("</svg>");
             rst.push(svgPageArr);
@@ -98,7 +106,7 @@ function getActualBorderStyle(cell, styles, mergeBorderStyle, pageBorderArea, bo
     return rst;
 }
 
-function buildCellSvg(cell, fonts, styles, controls, pageMergeBorder, rptMergeBorder, offsetX, offsetY, adjustY, canvas, isHtoV, pixelSize) {
+function buildCellSvg(cell, fonts, styles, controls, pageMergeBorder, rptMergeBorder, offsetX, offsetY, adjustY, canvas, isHtoV, pixelSize, actArea) {
     let rst = [];
     let style = styles[cell[JV.PROP_STYLE]];
     let mergeBandStyle = null;
@@ -116,7 +124,8 @@ function buildCellSvg(cell, fonts, styles, controls, pageMergeBorder, rptMergeBo
     ;
     let HtoVStr = "";
     if (isHtoV) {
-        HtoVStr = ` transform="translate(`+ pixelSize[1] + `,0) rotate(90)"`;
+        //HtoVStr = ` transform="translate(`+ pixelSize[1] + `,0) rotate(90)"`;
+        HtoVStr = ` transform="translate(`+ (actArea.Bottom - actArea.Top + 5) + `,0) rotate(90)"`;
     }
     if (style) {
         let leftBS = getActualBorderStyle(cell, styles, mergeBandStyle, (pageMergeBorder)?pageMergeBorder:rptMergeBorder[JV.PROP_AREA], JV.PROP_LEFT);