Ver código fonte

项目管理选中行加底色

zhongzewei 7 anos atrás
pai
commit
e4d62babf6

+ 10 - 6
web/building_saas/css/main.css

@@ -27,6 +27,10 @@ body {
     font-size: 1.25rem;
     line-height: inherit
 }
+.header .header-logo sup{
+    font-size:10px;
+    top:-1.2em
+}
 .top-msg{
     position: fixed;
     top:0;
@@ -54,7 +58,6 @@ body {
     width: 28px;
     text-align: center;
     line-height: 18px;
-    color: #999;
     padding: 10px 0;
     border-right: 1px solid #ccc;
 }
@@ -64,7 +67,7 @@ body {
     text-decoration: none;
 }
 .main-nav .nav a.active {
-    border: 1px solid #ccc;
+    border: 1px solid #ff6501;
     border-right: 1px solid #fff;
     background: #fff;
     color: #333
@@ -82,10 +85,10 @@ body {
 .poj-cate .nav-pills .nav-link{
     border-radius: 0;
     font-size: 24px;
-    color: #6c757d
+    color: #007bff
 }
 .poj-cate .nav-pills .nav-link:hover{
-    color:#007bff
+    color:#0056b3
 }
 .poj-cate .nav-pills .nav-link.active, .nav-pills .show > .nav-link{
     background-color: #6c757d;
@@ -143,7 +146,7 @@ body {
 }
 .bottom-content .nav {
     background: #f7f7f9;
-    padding:0 0 0 2px
+    padding:1px 0 0 2px
 }
 .bottom-content .nav-tabs .nav-link, .side-tabs .nav-tabs .nav-link {
     border-radius: 0;
@@ -163,7 +166,8 @@ body {
     z-index: 999
 }
 .bottom-content .nav-tabs .nav-link.active {
-    border-top: 1px solid #f7f7f9
+    border:1px solid #ff6501;
+    border-bottom: 1px solid #fff
 }
 .side-tabs .nav-tabs .nav-link.active {
     border-top: none;

+ 12 - 15
web/building_saas/pm/html/project-management.html

@@ -273,7 +273,7 @@
             </div>
             <div class="modal-body">
                 <form>
-                    <div class="form-group">
+                    <div>
                         <label>建设项目</label>
                         <div class="input-group">
                             <input type="text" class="form-control" placeholder="输入建设项目名称" id="poj-name" autocomplete="off">
@@ -288,7 +288,7 @@
                         </div>
                         <span class="form-text text-info" id="poj-name-info" style="display: none;">新建 “汽车生产车间5”</span>
                     </div>
-                    <div class="form-group">
+                    <div>
                         <label>单项工程</label>
                         <div class="input-group">
                             <input type="text" class="form-control" placeholder="输入单项工程名称" id="eng-name" autocomplete="off">
@@ -302,40 +302,38 @@
                         <span class="form-text text-info" id="eng-name-info" style="display: none;">新建 “左2号生产车间2”</span>
                     </div>
 
-                    <div class="form-group">
+                    <div>
                         <label>单位工程</label>
                         <input type="text" class="form-control" placeholder="输入单位工程名称" id="tender-name" autocomplete="off">
                         <span class="form-text text-danger" id="tender-name-info" style="display: none;">已存在 “建筑工程1”</span>
                     </div>
-                    <div class="form-group">
+                    <div>
                         <label>单价文件</label>
                         <select class="form-control" id="unit-price"><option value="">新建单价文件</option></select>
                     </div>
-                    <div class="form-group">
+                    <div>
                         <label>费率文件</label>
                         <select class="form-control" id="tender-fee-rate"><option value="">新建费率文件</option></select>
                     </div>
-                    <div class="form-group">
+                    <div>
                         <label>计价方式</label>
                         <div>
                             <label class="custom-control custom-radio">
-                                <input name="valuation_type" value="bill" type="radio" class="custom-control-input">
-                                <span class="custom-control-indicator"></span>
-                                <span class="custom-control-description">清单计价</span>
+                                <input name="valuation_type" id="radioBill" value="bill" type="radio" class="custom-control-input">
+                                <label class="custom-control-label" for="radioBill">清单计价</label>
                             </label>
                             <label class="custom-control custom-radio">
-                                <input name="valuation_type" value="ration" type="radio" class="custom-control-input">
-                                <span class="custom-control-indicator"></span>
-                                <span class="custom-control-description">定额计价</span>
+                                <input name="valuation_type" id="radioRation" value="ration" type="radio" class="custom-control-input">
+                                <label class="custom-control-label" for="radioRation">定额计价</label>
                             </label>
                         </div>
                     </div>
-                    <div class="form-group">
+                    <div>
                         <label>计价规则</label>
                         <select class="form-control" id="valuation"><option value="">请选择计价规则</option></select>
                         <span class="form-text text-danger" id="valuation-info" style="display: none;">请选择计价规则</span>
                     </div>
-                    <div class="form-group">
+                    <div>
                         <label>工程专业</label>
                         <select class="form-control" id="tender-engineering"><option value="">请选择对应的工程专业</option></select>
                         <span class="form-text text-danger" id="engineering-info" style="display: none;">请选择工程专业</span>
@@ -514,6 +512,5 @@
     let rationValuation = '<%- rationValuation %>';
     let engineeringList = '<%- engineeringList %>';
     let compilationData = JSON.parse('<%- compilationData %>');
-    console.log(billValuation);
 </script>
 </html>

+ 22 - 0
web/building_saas/pm/js/pm_newMain.js

@@ -27,6 +27,7 @@ let fileType = {
 const projTreeObj = {
     tree: null,
     workBook: null,
+    preSelected: null,
     setting: {
         tree: {
             id: 'ID',
@@ -42,6 +43,11 @@ const projTreeObj = {
             {name: '费率文件', dataCode: 'feeRateFile', width: 250, vAlign: 'center', hAlign: 'left'},
             {name: '创建日期', dataCode: 'createDateTime', width: 170, vAlign: 'center', hAlign: 'left'}
         ],
+        //选中行颜色
+        style: {
+            defalutBackColor: 'White',
+            selectedColor: '#BBFFFF'
+        },
         options: {
             tabStripVisible:  false,
             allowCopyPasteExcelStyle : false,
@@ -94,10 +100,26 @@ const projTreeObj = {
             this.bindEvent(this.workBook);
         }
     },
+    getNodeStyle: function (node) {
+        let style = new GC.Spread.Sheets.Style();
+        style.backColor = this.tree.selected == node ? this.setting.style.selectedColor : this.setting.style.defalutBackColor;
+        style.borderLeft = new GC.Spread.Sheets.LineBorder("#D4D4D4", GC.Spread.Sheets.LineStyle.thin);
+        style.borderTop = new GC.Spread.Sheets.LineBorder("#D4D4D4", GC.Spread.Sheets.LineStyle.thin);
+        style.borderRight = new GC.Spread.Sheets.LineBorder("#D4D4D4", GC.Spread.Sheets.LineStyle.thin);
+        style.borderBottom = new GC.Spread.Sheets.LineBorder("#D4D4D4", GC.Spread.Sheets.LineStyle.thin);
+        return style;
+    },
     initSelection: function (row) {
         let me = this;
         let node = me.tree.items[row];
         me.tree.selected = node;
+        //设置当前选中节点底色
+        me.workBook.getSheet(0).setStyle(row, -1, me.getNodeStyle(node));
+        //恢复上一个选中节点底色
+        if(me.preSelected){
+            me.workBook.getSheet(0).setStyle(me.preSelected.serialNo(), -1, me.getNodeStyle(me.preSelected));
+        }
+        me.preSelected = node;
         $(".tools-btn > a").not(".disabled").addClass("disabled");
         $("#add-engineering-btn").addClass("disabled");
         $('#add-tender-btn').removeClass('disabled');

+ 3 - 1
web/building_saas/pm/js/pm_tree.js

@@ -117,7 +117,9 @@ const pmTree = {
                     _view._hideNodes(this.children);
                 }
             };
-
+            Node.prototype.serialNo = function () {
+                return this.tree.items.indexOf(this);
+            };
             Node.prototype.preSibling = function () {
                 var iIndex = this.parent.childIndex(this);
                 if (iIndex === -1){