Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/master'

LLL 1 anno fa
parent
commit
3e30f5794f
1 ha cambiato i file con 14 aggiunte e 8 eliminazioni
  1. 14 8
      src/views/module_cmms/spotcheck/modules/SpotcheckForm.vue

+ 14 - 8
src/views/module_cmms/spotcheck/modules/SpotcheckForm.vue

@@ -379,16 +379,22 @@
               httpurl+=this.url.edit;
                method = 'put';
             }
-            if (this.model.files.length != 0) {
-              const a  = this.model.files.split(',')
-              this.model.files = a.map((res) => {
-                return {
-                  url: res
-                }
-              })
-            }else{
+            console.log('怎么回事呀',!this.model.files)
+            if (!this.model.files == true) {
               this.model.files = []
+            } else {
+              if (this.model.files.length != 0) {
+                const a  = this.model.files.split(',')
+                this.model.files = a.map((res) => {
+                  return {
+                    url: res
+                  }
+                })
+              }else{
+                this.model.files = []
+              }
             }
+            // console.log('怎么回事呀',this.model)
             httpAction(httpurl,this.model,method).then((res)=>{
               if(res.success){
                 that.$message.success(res.message);