Browse Source

feat: GLY-3736 后台部分

Tony Kang 2 weeks ago
parent
commit
165ef22129

+ 2 - 0
public/web/rpt_value_define.js

@@ -138,6 +138,8 @@ const JV = {
   PROP_FONT: "font",
   PROP_CONTROL: "control",
   PROP_STYLE: "style",
+  PROP_DIAGONAL_DOWN: "diagonal_down",
+  PROP_DIAGONAL_UP: "diagonal_up",
   PROP_VALUE: "Value",
   PROP_LABEL: "Label",
   PROP_AREA: "area",

+ 17 - 4
web/maintain/report/html/rpt_tpl_dtl_field_loc.html

@@ -86,22 +86,35 @@
                     <label>边框样式</label>
                     <select class="form-control" id="elementBorders" onchange="rpt_tpl_cfg_helper.borderChange(this)"></select>
                 </div>
-                <div class="form-group col-md-2">
+                <div class="form-group col-md-1">
                     <label>左边</label>
                     <input class="form-control input-sm" id="eleBorderLeft" type="number" value="0" step="1" min="0" max="3" disabled>
                 </div>
-                <div class="form-group col-md-2">
+                <div class="form-group col-md-1">
                     <label>右边</label>
                     <input class="form-control input-sm" id="eleBorderRight" type="number" value="0" step="1" min="0" max="3" disabled>
                 </div>
-                <div class="form-group col-md-2">
+                <div class="form-group col-md-1">
                     <label>上边</label>
                     <input class="form-control input-sm" id="eleBorderTop" type="number" value="0" step="1" min="0" max="3" disabled>
                 </div>
-                <div class="form-group col-md-2">
+                <div class="form-group col-md-1">
                     <label>下边</label>
                     <input class="form-control input-sm" id="eleBorderBottom" type="number" value="0" step="1" min="0" max="3" disabled>
                 </div>
+                <div class="form-group col-md-2">
+                    <label>斜线样式</label>
+                    <div class="form-check">
+                        <label class="form-check-label">
+                            <input type="checkbox" class="form-check-input" id="eleDiagonalDown" onchange="rpt_tpl_cfg_helper.diagonalDownChange(this)">
+                            下坡式
+                        </label>&nbsp&nbsp
+                        <label class="form-check-label">
+                            <input type="checkbox" class="form-check-input" id="eleDiagonalUp" onchange="rpt_tpl_cfg_helper.diagonalUpChange(this)">
+                            上坡式
+                        </label>&nbsp&nbsp
+                    </div>
+                </div>
             </div>
             <div class="row" id="element_control">
                 <div class="form-group col-md-2">

+ 9 - 0
web/maintain/report/js/rpt_tpl_cfg_helper.js

@@ -161,6 +161,9 @@ let rpt_tpl_cfg_helper = {
             idx = me.reportCfg.borderArr.indexOf(borderAttr);
             borderDom.selectedIndex = idx;
             me.borderChange(borderDom);
+            // 还有diagonal
+            $("#eleDiagonalDown").get(0).checked = stringUtil.convertStrToBoolean(treeNode[JV.PROP_DIAGONAL_DOWN]);
+            $("#eleDiagonalUp").get(0).checked = stringUtil.convertStrToBoolean(treeNode[JV.PROP_DIAGONAL_UP]);
             //setup control
             let ctrlDom = $("#elementControls").get(0);
             let ctrlAttr = treeNode[JV.PROP_CONTROL];
@@ -358,6 +361,12 @@ let rpt_tpl_cfg_helper = {
             }
         }
     },
+    diagonalUpChange: function(dom) {
+        dataInfoMapTreeOprObj.currentNode[JV.PROP_DIAGONAL_UP] = dom.checked?'T':'F';
+    },
+    diagonalDownChange: function(dom) {
+        dataInfoMapTreeOprObj.currentNode[JV.PROP_DIAGONAL_DOWN] = dom.checked?'T':'F';
+    },
     controlChange: function(dom) {
         if (dataInfoMapTreeOprObj.currentNode) {
             let me = this, ctrlAttr = dom.value;

+ 4 - 0
web/maintain/report/js/rpt_tpl_data_map.js

@@ -693,6 +693,8 @@ let dataInfoMapTreeOprObj = {
     destination[JV.PROP_FONT] = source[JV.PROP_FONT];
     destination[JV.PROP_CONTROL] = source[JV.PROP_CONTROL];
     destination[JV.PROP_STYLE] = source[JV.PROP_STYLE];
+    if (source[JV.PROP_DIAGONAL_DOWN]) destination[JV.PROP_DIAGONAL_DOWN] = source[JV.PROP_DIAGONAL_DOWN];
+    if (source[JV.PROP_DIAGONAL_UP]) destination[JV.PROP_DIAGONAL_UP] = source[JV.PROP_DIAGONAL_UP];
     destination[JV.PROP_PREFIX] = source[JV.PROP_PREFIX];
     destination[JV.PROP_SUFFIX] = source[JV.PROP_SUFFIX];
     if (source[JV.PROP_FORMAT])
@@ -779,6 +781,8 @@ let dataInfoMapTreeOprObj = {
     destination[JV.PROP_FONT] = source[JV.PROP_FONT];
     destination[JV.PROP_CONTROL] = source[JV.PROP_CONTROL];
     destination[JV.PROP_STYLE] = source[JV.PROP_STYLE];
+    if (source[JV.PROP_DIAGONAL_DOWN]) destination[JV.PROP_DIAGONAL_DOWN] = source[JV.PROP_DIAGONAL_DOWN];
+    if (source[JV.PROP_DIAGONAL_UP]) destination[JV.PROP_DIAGONAL_UP] = source[JV.PROP_DIAGONAL_UP];
     destination.Title = "";
     destination[JV.PROP_AREA] = {};
     me.private_copy_area(source[JV.PROP_AREA], destination[JV.PROP_AREA]);