dedsudiyu 1 年之前
父節點
當前提交
694f3d53f9
共有 1 個文件被更改,包括 22 次插入4 次删除
  1. 22 4
      src/views/hazardManagement/gasBottleManage/beaconList/index.vue

+ 22 - 4
src/views/hazardManagement/gasBottleManage/beaconList/index.vue

@@ -167,8 +167,17 @@
         if(!this.dialogAddType){
           if(this.needCLodop()){
             //打印
-            this.CreateOneFormPage(this.dialogForm.beaconTag)
-            this.$set(this,'dialogType',false);
+            if(this.dialogForm.beaconTag[0]){
+              let data = JSON.parse(JSON.stringify({code:this.dialogForm.beaconTag}))
+              let num = parseInt((20 - data.code.length)/2);
+              for(let i=0;i<num;i++){
+                data.code = ' '+data.code+' ';
+              }
+              this.CreateOneFormPage(data.code);
+              this.$set(this,'dialogType',false);
+            }else{
+              this.msgError('参数异常')
+            }
           }else{
             //提示驱动缺失
             this.$set(this,'dialogType',false);
@@ -190,8 +199,17 @@
                 this.getList();
                 if(this.needCLodop()){
                   //打印
-                  this.CreateOneFormPage(obj.beaconTag)
-                  this.$set(this,'dialogType',false);
+                  if(obj.beaconTag[0]){
+                    let data = JSON.parse(JSON.stringify({code:obj.beaconTag}))
+                    let num = parseInt((20 - data.code.length)/2);
+                    for(let i=0;i<num;i++){
+                      data.code = ' '+data.code+' ';
+                    }
+                    this.CreateOneFormPage(data.code);
+                    this.$set(this,'dialogType',false);
+                  }else{
+                    this.msgError('参数异常')
+                  }
                 }else{
                   //提示驱动缺失
                   this.$set(this,'dialogType',false);