lizhenhao пре 2 година
родитељ
комит
a275e95ded

+ 10 - 2
src/views/modules/flowable/task/TaskForm.vue

@@ -246,9 +246,17 @@
         } else {
           this.isShow = this.$route.query.isShow
         }
-        this.$nextTick(() => {
+        let _this = this
+        // this.$nextTick(() => {
+        //   try {
+        //     _this.$refs.form.getKeyWatch(Math.random().toString())
+        //   } catch (e) {
+        //     console.log(e)
+        //   }
+        // })
+        setTimeout(function () {
           try {
-            this.$refs.form.getKeyWatch(Math.random().toString())
+            _this.$refs.form.getKeyWatch(Math.random().toString())
           } catch (e) {
             console.log(e)
           }

+ 24 - 8
src/views/modules/program/registered/RegisItemForm.vue

@@ -973,29 +973,45 @@
           if (this.commonJS.isNotEmpty(this.inputForm.members)) {
             this.inputForm.members.forEach((item, index) => {
               if (this.commonJS.isEmpty(item.job)) {
-                if (this.commonJS.isNotEmpty(item.row.job)) {
-                  this.inputForm.members[index].job = item.row.job
+                if (this.commonJS.isNotEmpty(item.row)) {
+                  if (this.commonJS.isNotEmpty(item.row.job)) {
+                    this.inputForm.members[index].job = item.row.job
+                  } else {
+                    this.inputForm.members[index].job = ''
+                  }
                 } else {
                   this.inputForm.members[index].job = ''
                 }
               }
               if (this.commonJS.isEmpty(item.workHours)) {
-                if (this.commonJS.isNotEmpty(item.row.workHours)) {
-                  this.inputForm.members[index].workHours = item.row.workHours
+                if (this.commonJS.isNotEmpty(item.row)) {
+                  if (this.commonJS.isNotEmpty(item.row.workHours)) {
+                    this.inputForm.members[index].workHours = item.row.workHours
+                  } else {
+                    this.inputForm.members[index].workHours = 0
+                  }
                 } else {
                   this.inputForm.members[index].workHours = 0
                 }
               }
               if (this.commonJS.isEmpty(item.type)) {
-                if (this.commonJS.isNotEmpty(item.row.type)) {
-                  this.inputForm.members[index].type = item.row.type
+                if (this.commonJS.isNotEmpty(item.row)) {
+                  if (this.commonJS.isNotEmpty(item.row.type)) {
+                    this.inputForm.members[index].type = item.row.type
+                  } else {
+                    this.inputForm.members[index].type = ''
+                  }
                 } else {
                   this.inputForm.members[index].type = ''
                 }
               }
               if (this.commonJS.isEmpty(item.name)) {
-                if (this.commonJS.isNotEmpty(item.row.name)) {
-                  this.inputForm.members[index].name = item.row.name
+                if (this.commonJS.isNotEmpty(item.row)) {
+                  if (this.commonJS.isNotEmpty(item.row.name)) {
+                    this.inputForm.members[index].name = item.row.name
+                  } else {
+                    this.inputForm.members[index].name = ''
+                  }
                 } else {
                   this.inputForm.members[index].name = ''
                 }