Prechádzať zdrojové kódy

refactor(contact): 使用表格引用重新加载替代全局重载

liujt 2 mesiacov pred
rodič
commit
18cf9a2e42

+ 4 - 2
src/views/saleManage/contact/contactList.vue

@@ -514,7 +514,8 @@
         updateStatus(row.id, 1)
           .then((msg) => {
             this.$message.success('启用成功');
-            this.reload();
+            // this.reload();
+            this.$refs.table.reload();
           })
           .catch((e) => {
             this.$message.error(e.message);
@@ -525,7 +526,8 @@
         updateStatus(row.id, 2)
           .then((msg) => {
             this.$message.success('禁用成功');
-            this.reload();
+            // this.reload();
+            this.$refs.table.reload();
           })
           .catch((e) => {
             this.$message.error(e.message);

+ 4 - 2
src/views/saleManage/contact/contactListAdmin.vue

@@ -590,7 +590,8 @@
         updateStatus(row.id, 1)
           .then((msg) => {
             this.$message.success('启用成功');
-            this.reload();
+            // this.reload();
+            this.$refs.table.reload();
           })
           .catch((e) => {
             this.$message.error(e.message);
@@ -601,7 +602,8 @@
         updateStatus(row.id, 2)
           .then((msg) => {
             this.$message.success('禁用成功');
-            this.reload();
+            // this.reload();
+            this.$refs.table.reload();
           })
           .catch((e) => {
             this.$message.error(e.message);

+ 5 - 2
src/views/saleManage/contact/index.vue

@@ -615,7 +615,9 @@
         updateStatus(row.id, 1)
           .then((msg) => {
             this.$message.success('启用成功');
-            this.reload();
+            // this.reload();
+            this.$refs.table.reload();
+
           })
           .catch((e) => {
             this.$message.error(e.message);
@@ -626,7 +628,8 @@
         updateStatus(row.id, 2)
           .then((msg) => {
             this.$message.success('禁用成功');
-            this.reload();
+            // this.reload();
+            this.$refs.table.reload();
           })
           .catch((e) => {
             this.$message.error(e.message);