Forráskód Böngészése

可视化 - 账单式 bottom border

TonyKang 7 éve
szülő
commit
26b485c226

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 24 - 6
lib/font-zy/iconfont.css


BIN
lib/font-zy/iconfont.eot


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 28 - 1
lib/font-zy/iconfont.svg


BIN
lib/font-zy/iconfont.ttf


BIN
lib/font-zy/iconfont.woff


+ 1 - 0
web/maintain/report/html/rpt_tpl_vis_jumbo.html

@@ -72,6 +72,7 @@
                     <a id="vis_wrap" class="btn btn-sm btn-outline-secondary" title="折行" onclick="visualJumbo.changeWrap(this)" style="display: none"><i class="icon zyfont zy-ic_wrap_text"></i></a>
                     &nbsp&nbsp&nbsp&nbsp
                     <a id="vis_outter_border" class="btn btn-sm btn-outline-secondary" title="外边框" onclick="visualJumbo.changeBorder(this)"><i class="icon zyfont zy-ic_border_outer"></i></a>
+                    <a id="vis_bottom_border" class="btn btn-sm btn-outline-secondary" title="下边框" onclick="visualJumbo.changeBorder(this)"><i class="icon zyfont zy-ic_border_bottom"></i></a>
                     <a id="vis_no_border" class="btn btn-sm btn-outline-secondary" title="无边框" onclick="visualJumbo.changeBorder(this)"><i class="icon zyfont zy-ic_border_clear"></i></a>
                     &nbsp&nbsp&nbsp&nbsp
                     <label ><input type="radio" name="visCellTypes3" id="visRdIsText" onchange="visualJumbo.changeCellType(`text`)" checked="true" disabled>文本</label>

+ 20 - 5
web/maintain/report/js/rpt_tpl_vis_jumbo.js

@@ -161,11 +161,18 @@ let visualJumbo = {
                 $(`#vis_wrap`)[0].className = "btn btn-sm btn-outline-secondary";
             }
             let border = cell.borderLeft();
+            let bottomBorder = cell.borderBottom();
             if (border && border.style === GC.Spread.Sheets.LineStyle.thin) {
                 $(`#vis_outter_border`)[0].className = "btn btn-sm btn-outline-secondary active";
+                $(`#vis_bottom_border`)[0].className = "btn btn-sm btn-outline-secondary";
+                $(`#vis_no_border`)[0].className = "btn btn-sm btn-outline-secondary";
+            } else if (bottomBorder && bottomBorder.style === GC.Spread.Sheets.LineStyle.thin){
+                $(`#vis_outter_border`)[0].className = "btn btn-sm btn-outline-secondary";
+                $(`#vis_bottom_border`)[0].className = "btn btn-sm btn-outline-secondary active";
                 $(`#vis_no_border`)[0].className = "btn btn-sm btn-outline-secondary";
             } else {
                 $(`#vis_outter_border`)[0].className = "btn btn-sm btn-outline-secondary";
+                $(`#vis_bottom_border`)[0].className = "btn btn-sm btn-outline-secondary";
                 $(`#vis_no_border`)[0].className = "btn btn-sm btn-outline-secondary active";
             }
             //4. txt/field
@@ -574,13 +581,21 @@ let visualJumbo = {
             sheet.suspendPaint();
             let border = new GC.Spread.Sheets.LineBorder;
             border.color = "Black";
-            if ($(`#vis_outter_border`)[0].className === `btn btn-sm btn-outline-secondary active`) {
-                border.style = GC.Spread.Sheets.LineStyle.thin;
-            } else {
+            if ($(`#vis_no_border`)[0].className === `btn btn-sm btn-outline-secondary active`) {
                 border.style = GC.Spread.Sheets.LineStyle.empty;
+            } else {
+                border.style = GC.Spread.Sheets.LineStyle.thin;
             }
             let cellRange = new GC.Spread.Sheets.CellRange(sheet, selectedRanges[0].row, selectedRanges[0].col, selectedRanges[0].rowCount, selectedRanges[0].colCount);
-            cellRange.setBorder(border, {all: true});
+            if ($(`#vis_bottom_border`)[0].className === `btn btn-sm btn-outline-secondary active`) {
+                let bottomBorder = new GC.Spread.Sheets.LineBorder;
+                bottomBorder.color = "Black";
+                bottomBorder.style = GC.Spread.Sheets.LineStyle.empty;
+                cellRange.setBorder(bottomBorder, {all: true});
+                cellRange.setBorder(border, {bottom: true});
+            } else {
+                cellRange.setBorder(border, {all: true});
+            }
             sheet.resumePaint();
         }
     },
@@ -721,7 +736,7 @@ let visualJumbo = {
         let me = this;
         if (dom.className === "btn btn-sm btn-outline-secondary") {
             dom.className = "btn btn-sm btn-outline-secondary active"
-            let hKeys = [`vis_outter_border`, `vis_no_border`];
+            let hKeys = [`vis_outter_border`, `vis_no_border`, `vis_bottom_border`];
             let domIdx = hKeys.indexOf(dom.id);
             if (domIdx >= 0) {
                 for (let idx = 0; idx < hKeys.length; idx++) {