chao преди 3 години
родител
ревизия
28d47eabaf

+ 3 - 2
src/views/sys/menus/form.vue

@@ -126,6 +126,7 @@ export default {
             cancelButtonText: '取消',
             type: 'warning'
           }).then(() => {
+            const self = this
             if (this.isEdit) {
               updateMenu(this.$route.query.id, this.menu).then(response => {
                 this.$message({
@@ -133,7 +134,7 @@ export default {
                   type: 'success',
                   duration: 1000
                 })
-                this.goBack()
+                self.goBack()
               })
             } else {
               createMenu(this.menu).then(response => {
@@ -144,7 +145,7 @@ export default {
                   type: 'success',
                   duration: 1000
                 })
-                this.goBack()
+                self.goBack()
               })
             }
           })

+ 3 - 2
src/views/sys/roles/form.vue

@@ -116,6 +116,7 @@ export default {
             cancelButtonText: '取消',
             type: 'warning'
           }).then(() => {
+            const self = this
             this.getCheckedNodes()
             if (this.isEdit) {
               updateRole(this.$route.query.id, this.role).then(response => {
@@ -124,7 +125,7 @@ export default {
                   type: 'success',
                   duration: 1000
                 })
-                this.goBack()
+                self.goBack()
               })
             } else {
               createRole(this.role).then(response => {
@@ -135,7 +136,7 @@ export default {
                   type: 'success',
                   duration: 1000
                 })
-                this.goBack()
+                self.goBack()
               })
             }
           })

+ 3 - 2
src/views/sys/users/form.vue

@@ -129,6 +129,7 @@ export default {
             cancelButtonText: '取消',
             type: 'warning'
           }).then(() => {
+            const self = this
             if (this.isEdit) {
               updateUser(this.$route.query.id, this.sysUser).then(response => {
                 this.$message({
@@ -136,7 +137,7 @@ export default {
                   type: 'success',
                   duration: 1000
                 })
-                this.goBack()
+                self.goBack()
               })
             } else {
               createUser(this.sysUser).then(response => {
@@ -147,7 +148,7 @@ export default {
                   type: 'success',
                   duration: 1000
                 })
-                this.goBack()
+                self.goBack()
               })
             }
           })

+ 3 - 2
src/views/wechat/components/articleForm.vue

@@ -121,6 +121,7 @@ export default {
             cancelButtonArticle: '取消',
             type: 'warning'
           }).then(() => {
+            const self = this
             if (this.isEdit) {
               updateArticle(this.$route.query.id, this.article).then(response => {
                 this.$message({
@@ -128,7 +129,7 @@ export default {
                   type: 'success',
                   duration: 1000
                 })
-                this.goBack()
+                self.goBack()
               })
             } else {
               createArticle(this.article).then(response => {
@@ -139,7 +140,7 @@ export default {
                   type: 'success',
                   duration: 1000
                 })
-                this.goBack()
+                self.goBack()
               })
             }
           })

+ 3 - 2
src/views/wechat/components/menusForm.vue

@@ -137,6 +137,7 @@ export default {
             cancelButtonText: '取消',
             type: 'warning'
           }).then(() => {
+            const self = this
             if (this.isEdit) {
               updateMenu(this.$route.query.id, this.menu).then(response => {
                 this.$message({
@@ -144,7 +145,7 @@ export default {
                   type: 'success',
                   duration: 1000
                 })
-                this.goBack()
+                self.goBack()
               })
             } else {
               createMenu(this.menu).then(response => {
@@ -155,7 +156,7 @@ export default {
                   type: 'success',
                   duration: 1000
                 })
-                this.goBack()
+                self.goBack()
               })
             }
           })

+ 3 - 2
src/views/wechat/components/replyForm.vue

@@ -176,6 +176,7 @@ export default {
             cancelButtonText: '取消',
             type: 'warning'
           }).then(() => {
+            const self = this
             if (this.isEdit) {
               updateReply(this.$route.query.id, this.reply).then(response => {
                 this.$message({
@@ -183,7 +184,7 @@ export default {
                   type: 'success',
                   duration: 1000
                 })
-                this.goBack()
+                self.goBack()
               })
             } else {
               createReply(this.reply).then(response => {
@@ -194,7 +195,7 @@ export default {
                   type: 'success',
                   duration: 1000
                 })
-                this.goBack()
+                self.goBack()
               })
             }
           })

+ 3 - 2
src/views/wechat/components/textForm.vue

@@ -88,6 +88,7 @@ export default {
             cancelButtonText: '取消',
             type: 'warning'
           }).then(() => {
+            const self = this
             if (this.isEdit) {
               updateText(this.$route.query.id, this.text).then(response => {
                 this.$message({
@@ -95,7 +96,7 @@ export default {
                   type: 'success',
                   duration: 1000
                 })
-                this.goBack()
+                self.goBack()
               })
             } else {
               createText(this.text).then(response => {
@@ -106,7 +107,7 @@ export default {
                   type: 'success',
                   duration: 1000
                 })
-                this.goBack()
+                self.goBack()
               })
             }
           })