MaiXinRong vor 7 Jahren
Ursprung
Commit
35ada76de5
4 geänderte Dateien mit 11 neuen und 10 gelöschten Zeilen
  1. 7 6
      app/public/js/compare.js
  2. 1 1
      app/public/js/global.js
  3. 2 2
      app/view/compare/index.ejs
  4. 1 1
      app/view/lib/detail.ejs

+ 7 - 6
app/public/js/compare.js

@@ -102,7 +102,7 @@ $(document).ready(function () {
 
             this.colsName = colsName;
             this.cols = cols;
-            this.sheet.getRange(0, 0, this.sheet.getRowCount(), this.sheet.getColumnCount()).setBorder(this.borderLine, {all: true});
+            //this.sheet.getRange(0, 0, this.sheet.getRowCount(), this.sheet.getColumnCount()).setBorder(this.borderLine, {all: true});
 
             SpreadJsObj.endMassOperationSheet(this.sheet);
         }
@@ -169,12 +169,13 @@ $(document).ready(function () {
         }
         loadData (data) {
             const self = this;
+            const vCenter = spreadNS.VerticalAlign.center;
             const colCount = compareObj.tenders.length > 0 ? 6+compareObj.tenders.length+1 : 6;
             this.searchData = data;
             this.showData = this.sortData(this.searchData);
             function loadNode (node, row) {
-                self.sheet.getCell(row, self.cols.code).text(node.code).wordWrap(true);
-                self.sheet.getCell(row, self.cols.name).text(node.name).wordWrap(true);
+                self.sheet.getCell(row, self.cols.code).text(node.code).wordWrap(true).vAlign(vCenter);
+                self.sheet.getCell(row, self.cols.name).text(node.name).wordWrap(true).vAlign(vCenter);
                 self.sheet.getRange(row, 0, 1, colCount).backColor('#dae5ee');
                 self.sheet.autoFitRow(row);
             }
@@ -182,9 +183,9 @@ $(document).ready(function () {
                 for (const colName of self.colsName) {
                     if (colName === 'averageIndex') {
                         const aver = Number((index.sumValue / self.tenders.length).toFixed(2));
-                        self.sheet.getCell(row, self.cols[colName]).value(aver).wordWrap(true);
+                        self.sheet.getCell(row, self.cols[colName]).value(aver).wordWrap(true).vAlign(vCenter);
                     } else if (index[colName]) {
-                        self.sheet.getCell(row, self.cols[colName]).value(index[colName]).wordWrap(true);
+                        self.sheet.getCell(row, self.cols[colName]).value(index[colName]).wordWrap(true).vAlign(vCenter);
                     }
                 }
                 self.sheet.autoFitRow(row);
@@ -202,7 +203,7 @@ $(document).ready(function () {
                         iRow += 1;
                     }
                 }
-                self.sheet.getRange(-1, -1, self.sheet.getRowCount(), self.sheet.getColumnCount()).setBorder(self.borderLine, {all: true});
+                //self.sheet.getRange(-1, -1, self.sheet.getRowCount(), self.sheet.getColumnCount()).setBorder(self.borderLine, {all: true});
             });
         }
         searchIndex (keyword) {

+ 1 - 1
app/public/js/global.js

@@ -4,7 +4,7 @@ function autoFlashHeight(){
     var toptitle = $(".top-title").height();
     var bottomtitle = $(".bottom-title").height();
     var sjsbottom = $(".sjs-bottom-2").height();
-    $(".sjs-height-1").height($(window).height()-cHeader-160);
+    $(".sjs-height-1").height($(window).height()-cHeader-162);
     $(".sjs-height-3").height($(window).height()-cHeader-toptitle-bottomtitle-sjsbottom-192);
 };
 $(window).resize(autoFlashHeight);

+ 2 - 2
app/view/compare/index.ejs

@@ -13,7 +13,7 @@
                 </div>
             </div>
             <div>
-                <a href="javascript: void(0)" class="btn btn-primary btn-sm pull-right" target="_blank" id="export-excel">导出Excel</a>
+                <a href="javascript: void(0)" class="btn btn-primary btn-sm pull-right" target="_blank" id="export-excel"><i class="fa fa-file-excel-o"></i> 导出Excel</a>
             </div>
         </div>
     </div>
@@ -21,7 +21,7 @@
         <div class="c-header p-0 col-12">
         </div>
         <div class="c-body">
-            <div class="sjs-height-1" id="compare-spread" style="overflow:hidden; border: 1px solid gray;">
+            <div class="sjs-height-1" id="compare-spread" style="overflow:hidden; border:1px solid #dee2e6">
             </div>
         </div>
     </div>

+ 1 - 1
app/view/lib/detail.ejs

@@ -22,7 +22,7 @@
         <div class="c-body">
             <div class="row">
                 <div class="col-5">
-                    <div id="bills-spread" class="sjs-height-1" style="overflow:hidden">
+                    <div id="bills-spread" class="sjs-height-1" style="overflow:hidden; border:1px solid #dee2e6">
                     </div>
                 </div>
                 <div class="col-7">