liu 6 роки тому
джерело
коміт
b8ba47e45e

+ 32
- 32
hksystem/src/router/router.js Переглянути файл

@@ -66,40 +66,40 @@ export const appRouter = [
66 66
             { path: 'housekeeper', title: '保姆订单', name: 'order_housekeeper', component: resolve => { require(['@/views/housekeeper/index.vue'], resolve); } },
67 67
             { path: 'matron', title: '月嫂订单', name: 'order_matron', component: resolve => { require(['@/views/matron/index.vue'], resolve); } },
68 68
             { path: 'product', title: '产品订单', name: 'order_product', component: resolve => { require(['@/views/product/index.vue'], resolve); } },
69
-            { path: 'comment', title: '订单评论', name: 'order_comment', component: resolve => { require(['@/views/comment/index.vue'], resolve); } },
70
-            { path: 'status', title: '订单状态', name: 'order_status', component: resolve => { require(['@/views/comment/index.vue'], resolve); } }
71
-        ]
72
-    },
73
-    {
74
-        path: '/act',
75
-        icon: 'images',
76
-        name: 'act',
77
-        title: '活动管理',
78
-        component: Main,
79
-        children: [
80
-            { path: 'index', title: '活动管理', name: 'act_index', component: resolve => { require(['@/views/act/index.vue'], resolve); } }
81
-        ]
82
-    },
83
-    {
84
-        path: '/product',
85
-        icon: 'images',
86
-        name: 'product',
87
-        title: '产品管理',
88
-        component: Main,
89
-        children: [
90
-            { path: 'index', title: '产品管理', name: 'product_index', component: resolve => { require(['@/views/product/index.vue'], resolve); } }
91
-        ]
92
-    },
93
-    {
94
-        path: '/product-order',
95
-        icon: 'images',
96
-        name: 'productOrder',
97
-        title: '产品订单',
98
-        component: Main,
99
-        children: [
100
-            { path: 'index', title: '产品订单', name: 'productOrder_index', component: resolve => { require(['@/views/product-order/index.vue'], resolve); } }
69
+            // { path: 'comment', title: '订单评论', name: 'order_comment', component: resolve => { require(['@/views/comment/index.vue'], resolve); } },
70
+            // { path: 'status', title: '订单状态', name: 'order_status', component: resolve => { require(['@/views/comment/index.vue'], resolve); } }
101 71
         ]
102 72
     },
73
+    // {
74
+    //     path: '/act',
75
+    //     icon: 'images',
76
+    //     name: 'act',
77
+    //     title: '活动管理',
78
+    //     component: Main,
79
+    //     children: [
80
+    //         { path: 'index', title: '活动管理', name: 'act_index', component: resolve => { require(['@/views/act/index.vue'], resolve); } }
81
+    //     ]
82
+    // },
83
+    // {
84
+    //     path: '/product',
85
+    //     icon: 'images',
86
+    //     name: 'product',
87
+    //     title: '产品管理',
88
+    //     component: Main,
89
+    //     children: [
90
+    //         { path: 'index', title: '产品管理', name: 'product_index', component: resolve => { require(['@/views/product/index.vue'], resolve); } }
91
+    //     ]
92
+    // },
93
+    // {
94
+    //     path: '/product-order',
95
+    //     icon: 'images',
96
+    //     name: 'productOrder',
97
+    //     title: '产品订单',
98
+    //     component: Main,
99
+    //     children: [
100
+    //         { path: 'index', title: '产品订单', name: 'productOrder_index', component: resolve => { require(['@/views/product-order/index.vue'], resolve); } }
101
+    //     ]
102
+    // },
103 103
     {
104 104
         path: '/hourse-clean',
105 105
         icon: 'images',

+ 13
- 5
hksystem/src/views/housekeeper/index.vue Переглянути файл

@@ -23,6 +23,7 @@
23 23
                     </p>
24 24
                     <div class="edittable-table-height-con">
25 25
                         <Table :columns="columns" :data="prosHandle"></Table>
26
+                        <Page :total="total" :page-size="pageSize" @on-change="getData"></Page>
26 27
                     </div>
27 28
                 </Card>
28 29
             </Col>
@@ -60,6 +61,8 @@ export default {
60 61
     },
61 62
     data () {
62 63
         return {
64
+            total: 0,
65
+            pageSize: 20,
63 66
             proShow: true,
64 67
             formContent: {},
65 68
             columns: [
@@ -138,11 +141,16 @@ export default {
138 141
             this.proShow = true;
139 142
             this.getData();
140 143
         },
141
-        getData () {
142
-            this.axios.get("/housekeeper_orders")
143
-                .then((res) => {
144
-                    this.products = res.data.data;
145
-                });
144
+        getData (num) {
145
+            this.axios.get("/housekeeper_orders", {
146
+                params: {
147
+                    page: num || 1
148
+                }
149
+            }).then((res) => {
150
+                this.products = res.data.data;
151
+                this.pageSize = res.data.per_page;
152
+                this.total = res.data.total;
153
+            });
146 154
         }
147 155
     },
148 156
     created () {

+ 13
- 5
hksystem/src/views/matron/index.vue Переглянути файл

@@ -23,6 +23,7 @@
23 23
                     </p>
24 24
                     <div class="edittable-table-height-con">
25 25
                         <Table :columns="columns" :data="prosHandle"></Table>
26
+                        <Page :total="total" :page-size="pageSize" @on-change="getData"></Page>
26 27
                     </div>
27 28
                 </Card>
28 29
             </Col>
@@ -60,6 +61,8 @@ export default {
60 61
     },
61 62
     data () {
62 63
         return {
64
+            total: 0,
65
+            pageSize: 20,
63 66
             proShow: true,
64 67
             formContent: {},
65 68
             columns: [
@@ -137,11 +140,16 @@ export default {
137 140
             this.proShow = true;
138 141
             this.getData();
139 142
         },
140
-        getData () {
141
-            this.axios.get("/maternity_matron_orders")
142
-                .then((res) => {
143
-                    this.products = res.data.data;
144
-                });
143
+        getData (num) {
144
+            this.axios.get("/maternity_matron_orders", {
145
+                params: {
146
+                    page: num || 1
147
+                }
148
+            }).then((res) => {
149
+                this.products = res.data.data;
150
+                this.pageSize = res.data.per_page;
151
+                this.total = res.data.total;
152
+            });
145 153
         }
146 154
     },
147 155
     created () {

+ 0
- 2
hksystem/src/views/product/index.vue Переглянути файл

@@ -108,13 +108,11 @@ export default {
108 108
                                         let id = params.row.id;
109 109
                                         this.axios.delete(`/product/${id}`)
110 110
                                             .then((res) => {
111
-                                                console.log(this.products);
112 111
                                                 this.products = this.products.filter((product) => {
113 112
                                                     if (product.id != id) {
114 113
                                                         return true;
115 114
                                                     }
116 115
                                                 });
117
-                                                console.log(this.products);
118 116
                                             });
119 117
                                     }
120 118
                                 }

Loading…
Відмінити
Зберегти