Преглед изворни кода

添加字典空值自动过滤

lkk пре 11 месеци
родитељ
комит
8ce4006b15
2 измењених фајлова са 16 додато и 7 уклоњено
  1. 9 7
      src/components/Query/clickQuery/clickQuery.vue
  2. 7 0
      static/css/index.css

+ 9 - 7
src/components/Query/clickQuery/clickQuery.vue

@@ -460,14 +460,16 @@ export default {
               }
               if (e.features[u].fieldNames) {
                 linSAr.fieldNames.forEach((fieldName, i) => {
-                  let v = linSAr.fieldValues[i];
-                  if (!isNaN(parseFloat(v))) {
-                    v = Math.round(parseFloat(v) * 100) / 100;
+                  if (linSAr.fieldValues[i] != "") {
+                    let v = linSAr.fieldValues[i];
+                    if (!isNaN(parseFloat(v))) {
+                      v = Math.round(parseFloat(v) * 100) / 100;
+                    }
+                    cur.push({
+                      name: fieldName,
+                      value: v,
+                    });
                   }
-                  cur.push({
-                    name: fieldName,
-                    value: v,
-                  });
                 });
                 // e.features[u].fieldNames.forEach((fieldName, i) => {
                 //   if (

+ 7 - 0
static/css/index.css

@@ -385,6 +385,7 @@ div::-webkit-scrollbar-track {
   background: #335F87;
   border-radius: 4px;
   border: 1px solid rgba(123, 162, 198, 0.5);
+  line-height: 21px;
 }
 
 .el-message-box__headerbtn {
@@ -394,4 +395,10 @@ div::-webkit-scrollbar-track {
 
 .el-message-box__status.el-icon-warning {
   color: #2d8cf0b3;
+}
+
+.el-message-box__btns .el-button{
+  background: #0f7ac8 !important;
+  border-color: #0f7ac8 !important;
+  color: #fff !important;
 }