Browse Source

部分组成物不显示问题

zhangweicheng 4 years ago
parent
commit
8a08066dac
1 changed files with 4 additions and 2 deletions
  1. 4 2
      public/web/gljUtil.js

+ 4 - 2
public/web/gljUtil.js

@@ -327,12 +327,15 @@ let gljUtil = {
     isDef:function (v) {
         return v !== undefined && v !== null;
     },
+    nullString(key){
+        return (key === undefined || key === null || key === '') ? 'null' : key
+      },
     getIndex(obj, pops){
         let t_index = '';
         let k_arr = [];
         if(!pops) pops = this.gljKeyArray;
         if(pops.length === 5){
-            return `${obj[pops[0]]}|-|${obj[pops[1]]}|-|${obj[pops[2]]}|-|${obj[pops[3]]}|-|${obj[pops[4]]}`
+            return `${this.nullString(obj[pops[0]])}|-|${this.nullString(obj[pops[1]])}|-|${this.nullString(obj[pops[2]])}|-|${this.nullString(obj[pops[3]])}|-|${this.nullString(obj[pops[4]])}`
         }else{
             for (let p of pops) {
                 let tmpK = (obj[p] == undefined || obj[p] == null || obj[p] == '') ? 'null' : obj[p];
@@ -341,7 +344,6 @@ let gljUtil = {
             t_index = k_arr.join("|-|");
             return t_index;
         }
-        
     },
     getGljTypeSeq:function () {
         let gljType = this.gljType;