Pārlūkot izejas kodu

隐藏计量单元调整

MaiXinRong 2 mēneši atpakaļ
vecāks
revīzija
d1f1636cc8
3 mainītis faili ar 3 papildinājumiem un 10 dzēšanām
  1. 3 6
      app/public/js/div_resizer.js
  2. 0 2
      app/view/revise/info.ejs
  3. 0 2
      app/view/stage/index.ejs

+ 3 - 6
app/public/js/div_resizer.js

@@ -54,18 +54,18 @@
             if (setting.callback) { setting.callback(); }
         };
         const showSprPart = function (show) {
-            const rParent = obj.attr('rParent');
+            const rParent = obj.attr('r-parent');
             const div1 = $(obj.attr('div1')), div2 = $(obj.attr('div2'));
             const parent = div1.parent();
             if (show) {
                 if (rParent === 'div1') {
                     div1.show();
                     autoFlashHeight();
-                    div2[rType](orgSize2);
+                    div2[rType](parent[rType] - div2[rType]);
                 } else {
                     div2.show();
                     autoFlashHeight();
-                    div1[rType](orgSize1);
+                    div1[rType](parent[rType] - div2[rType]);
                 }
             } else {
                 if (rParent === 'div1') {
@@ -92,9 +92,6 @@
             }
             refreshDivSize();
             if (setting.callback) { setting.callback(); }
-        } else {
-            orgSize1 = $($(this).attr('div1')) ? $($(this).attr('div1'))[rType]() : 0;
-            orgSize2 = $($(this).attr('div2')) ? $($(this).attr('div2'))[rType]() : 0;
         }
 
         obj.mousedown(function (e) {

+ 0 - 2
app/view/revise/info.ejs

@@ -30,13 +30,11 @@
                     <a href="javascript: void(0);" name="base-opr" type="down-move" class="btn btn-sm btn-light text-primary" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="下移"><i class="fa fa-arrow-down" aria-hidden="true"></i></a>
                     <a href="javascript: void(0);" name="base-opr" type="up-move" class="btn btn-sm btn-light text-primary" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="上移"><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
                 </div>
-                <% if (tender.measure_type === measureType.tz.value) { %>
                 <div class="d-inline-block">
                     <div class="btn-group">
                         <button href="javascript: void(0);" class="btn btn-sm btn-light text-primary" id="pos-show"><i class="fa fa-eye-slash"></i> 隐藏计量单元</button>
                     </div>
                 </div>
-                <% } %>
                 <div class="d-inline-block">
                     <div class="input-group input-group-sm ml-2">
                         <div class="input-group-prepend">

+ 0 - 2
app/view/stage/index.ejs

@@ -25,13 +25,11 @@
                 <div class="d-inline-block">
                     <button href="#row-view" class="btn btn-sm btn-light" data-toggle="modal" data-target="#row-view"><i class="fa fa-table"></i> 列显示</button>
                 </div>
-                <% if (tender.measure_type === measureType.tz.value) { %>
                 <div class="d-inline-block">
                     <div class="btn-group">
                         <button href="javascript: void(0);" class="btn btn-sm btn-light text-primary" id="pos-show"><i class="fa fa-eye-slash"></i> 隐藏计量单元</button>
                     </div>
                 </div>
-                <% } %>
                 <div class="d-inline-block">
                     <div class="btn-group">
                         <button href="javascript: void(0);" class="btn btn-sm btn-light text-primary" id="features-show"><i class="fa fa-eye"></i> 显示特征</button>