liuhj hai 3 meses
pai
achega
d424f938ec
Modificáronse 1 ficheiros con 18 adicións e 1 borrados
  1. 18 1
      src/components/OP/FormCollection.vue

+ 18 - 1
src/components/OP/FormCollection.vue

@@ -4,7 +4,8 @@
             <div v-for="(item,index) in controlarr" :key="index" class="formcollection-info">
                 <div class="formcollection-info-title">{{ item.fieldName }}:</div>
                 <div v-if="item.fieldName=='出访国家(地、区)'||item.fieldName=='涉及城市'" class="formcollection-info-text">
-                    <span v-for="(items,index) in item.newValue" :key="index">{{items+','}}</span>
+                    {{ item.newValue }}
+                    <!-- <span v-for="(items,index) in item.newValue" :key="index">{{items+'、'}}</span> -->
                 </div>
                 <div v-else class="formcollection-info-text">{{ item.newValue }}</div>
             </div>
@@ -149,6 +150,15 @@ export default {
             }).then(function (res) {
                 if (res.data.code==200) {
                     that.controlarr=res.data.data.items;
+                    for(let i =0;i<that.controlarr.length;i++){
+                        if(that.controlarr[i].fieldName=='出访国家(地、区)'||that.controlarr[i].fieldName=='涉及城市'){
+                            var newValue=''
+                            for(let y=0;y<that.controlarr[i].newValue.length;y++){
+                                newValue+=that.controlarr[i].newValue[y]+'、'
+                            }
+                            that.controlarr[i].newValue=newValue.substring(0,newValue.length-1)
+                        }
+                    }
                 }else{
                     that.$message.error(res.data.msg);
                 }
@@ -157,6 +167,13 @@ export default {
     },
     mounted(){
         this.GroupOrderPreInfoList();
+    },
+    filters: {
+        filter_dd(value) {
+            if (value) {
+                return value.substring(0,value.length-1)
+            }
+        },
     }
 }
 </script>