许成详 6 年 前
コミット
89918da360
共有33 個のファイルを変更した263 個の追加82 個の削除を含む
  1. 5
    0
      config/index.js
  2. 41
    0
      src/components/upload/index.vue
  3. 3
    2
      src/pages/system/cardAndCouponManager/bodyBuildingCardManager/edit.vue
  4. 3
    1
      src/pages/system/cardAndCouponManager/bodyBuildingCardManager/index.vue
  5. 8
    16
      src/pages/system/cardAndCouponManager/cardManager/edit.vue
  6. 14
    0
      src/pages/system/cardAndCouponManager/cardManager/index.vue
  7. 7
    5
      src/pages/system/cardAndCouponManager/couponManager/edit.vue
  8. 4
    2
      src/pages/system/caseManager/caseAreaManager/add.vue
  9. 4
    2
      src/pages/system/caseManager/caseAreaManager/edit.vue
  10. 2
    1
      src/pages/system/caseManager/caseInfo/addCase/index.vue
  11. 2
    1
      src/pages/system/caseManager/caseInfo/editCase/index.vue
  12. 13
    4
      src/pages/system/cmsManager/bannerManager/add.vue
  13. 5
    3
      src/pages/system/cmsManager/bannerManager/edit.vue
  14. 9
    5
      src/pages/system/cmsManager/majorProjects/edit.vue
  15. 5
    3
      src/pages/system/cmsManager/newsManager/add.vue
  16. 5
    3
      src/pages/system/cmsManager/newsManager/edit.vue
  17. 12
    8
      src/pages/system/courseManager/courseList/add.vue
  18. 3
    2
      src/pages/system/courseManager/courseList/index.vue
  19. 2
    1
      src/pages/system/courseManager/fiveA/add.vue
  20. 2
    1
      src/pages/system/courseManager/fiveA/edit.vue
  21. 9
    1
      src/pages/system/courseManager/scheduleManager/edit.vue
  22. 9
    1
      src/pages/system/dataStatistics/goodsStatisticsList/index.vue
  23. 4
    2
      src/pages/system/goodsManager/goodManager/edit.vue
  24. 2
    1
      src/pages/system/systemSet/userManager/add.vue
  25. 2
    1
      src/pages/system/systemSet/userManager/edit.vue
  26. 13
    13
      src/store/card/gymCard.js
  27. 1
    1
      src/store/course/schedule.js
  28. 1
    0
      src/store/index.js
  29. 29
    0
      src/store/sta/sta.js
  30. 1
    1
      src/util/ajax.js
  31. 10
    0
      src/util/api.js
  32. 13
    0
      src/util/upload.js
  33. 20
    1
      src/util/util.js

+ 5
- 0
config/index.js ファイルの表示

@@ -12,8 +12,13 @@ module.exports = {
12 12
     proxyTable: {
13 13
       '/api': {
14 14
         // target: 'https://dp.huiju360.com.cn/hj_operations',
15
+<<<<<<< HEAD
15 16
         target: 'http://192.168.0.62:8080', //wf
16 17
         // target: 'http://localhost:8080', 
18
+=======
19
+        // target: 'http://192.168.0.62:8080', //wf
20
+        target: 'http://localhost:8080', 
21
+>>>>>>> 39e74bdea82b0a3170a0477becad3a119521b6f0
17 22
         // target: 'http://192.168.0.11', //ys
18 23
         // target: 'http://192.168.0.11', //ys
19 24
         // target: 'http://dev.ycjcjy.com/', //frp

+ 41
- 0
src/components/upload/index.vue ファイルの表示

@@ -0,0 +1,41 @@
1
+<template>
2
+  <input class="cust-upload" type="file" :accept="allowfile" @change="onchange" />
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  name: 'fileUpload',
8
+  props: [
9
+    'accept',
10
+    'value',
11
+    'upload',
12
+  ],
13
+  data () {
14
+    return {}
15
+  },
16
+  computed: {
17
+    allowfile () {
18
+      return this.accept || 'image/jpeg, image/gif, image/png'
19
+    }
20
+  },
21
+  methods: {
22
+    onchange (e) {
23
+      const files = e.target.files
24
+      if (files && files.length) {
25
+        this.upload(files[0]).then((data) => {
26
+          this.$emit('input', data)
27
+        }).catch((error) => {
28
+          // TODO
29
+          console.log(error)
30
+        })
31
+      }
32
+    },
33
+  },
34
+}
35
+</script>
36
+
37
+<style lang="scss" scoped>
38
+.cust-upload {
39
+
40
+}
41
+</style>

+ 3
- 2
src/pages/system/cardAndCouponManager/bodyBuildingCardManager/edit.vue ファイルの表示

@@ -24,7 +24,8 @@
24 24
               <a v-if="cardInfo.CardImageUrl && cardInfo.CardImageUrl.indexOf('.mp4') > -1" :href="cardInfo.CardImageUrl" target="blank" style="line-height:40px;">{{cardInfo.CardImageUrl}}</a>
25 25
               <el-upload
26 26
                 class="avatar-uploader"
27
-                :action='$api.file.image.url'
27
+                action='string'
28
+                :http-request="toolClass.upload"
28 29
                 :show-file-list="false"
29 30
                 :on-success="handleAvatarSuccess">
30 31
                 <img v-if="cardInfo.CardImageUrl && cardInfo.CardImageUrl.indexOf('.mp4') === -1" :src="cardInfo.CardImageUrl" class="avatar">
@@ -323,7 +324,7 @@ export default {
323 324
     },
324 325
     handleAvatarSuccess (res, file) {
325 326
       this.cardInfo.CardImageUrl = res.result.url
326
-    },
327
+    }
327 328
   }
328 329
 }
329 330
 </script>

+ 3
- 1
src/pages/system/cardAndCouponManager/bodyBuildingCardManager/index.vue ファイルの表示

@@ -271,6 +271,7 @@ export default {
271 271
   methods: {
272 272
     ...mapGymCardActions([
273 273
       'getGymCardList',
274
+      'giveCard',
274 275
     ]),
275 276
     ...mapCustomerActions([
276 277
       'GetCustomerList',
@@ -292,6 +293,7 @@ export default {
292 293
     },
293 294
     toSendCard () { // 赠送卡
294 295
       if (this.selectCustomer.length) {
296
+        console.log(this.selectCustomer)
295 297
         this.selectCustomer = this.selectCustomer.map(x => x.CustomerId).join(',')
296 298
         this.giveCard({
297 299
           id: this.currentCardId,
@@ -322,7 +324,7 @@ export default {
322 324
       }
323 325
     },
324 326
     sendCard (index, row) { // 赠送卡弹窗
325
-      this.currentCardId = row.CardId
327
+      this.currentCardId = row.GymCardId
326 328
       this.centerDialogVisible = true
327 329
     },
328 330
     search () { // 搜索

+ 8
- 16
src/pages/system/cardAndCouponManager/cardManager/edit.vue ファイルの表示

@@ -23,7 +23,8 @@
23 23
             <div>
24 24
               <el-upload
25 25
                 class="avatar-uploader"
26
-                :action='$api.file.image.url'
26
+                action='string'
27
+                :http-request="toolClass.upload"
27 28
                 :show-file-list="false"
28 29
                 :on-success="handleAvatarSuccess">
29 30
                 <img v-if="cardInfo.Images" :src="cardInfo.Images[0].CardImageUrl" class="avatar">
@@ -144,7 +145,8 @@
144 145
               <a style="line-height: 40px;" v-if="videoOff" :href="cardInfo.VideoUrl" target="blank">{{cardInfo.VideoUrl}}</a>
145 146
               <el-upload
146 147
                 class="avatar-uploader"
147
-                :action='$api.file.image.url'
148
+                action='string'
149
+                :http-request="toolClass.upload"
148 150
                 :show-file-list="false"
149 151
                 :on-success="videoSuccess">
150 152
                 <a style="line-height: 40px;padding: 0 10px;">{{videoOff ? '更换' : '添加'}}视频</a>
@@ -234,19 +236,9 @@ export default {
234 236
         TotalCount: '',
235 237
         CaseId: '',
236 238
         OrgId: '',
237
-        Share: {
238
-          CardShareInfo: '',
239
-          CardUseRule: '',
240
-          CardUseInstruction: ''
241
-        },
242
-        Images: [{
243
-          CardImageUrl: ''
244
-        }],
245
-        Targets: [{
246
-          TargetType: '',
247
-          TargetId: '',
248
-          TargetName: ''
249
-        }],
239
+        Share: {},
240
+        Images: null,
241
+        Targets: [{}],
250 242
         ChannelId: ''
251 243
       },
252 244
       postData: {
@@ -414,7 +406,7 @@ export default {
414 406
     },
415 407
     handleAvatarSuccess (res, file) {
416 408
       this.cardInfo.Images[0].CardImageUrl = res.result.url
417
-    },
409
+    }
418 410
   }
419 411
 }
420 412
 </script>

+ 14
- 0
src/pages/system/cardAndCouponManager/cardManager/index.vue ファイルの表示

@@ -54,6 +54,9 @@
54 54
         <el-table-column
55 55
           prop="SendType"
56 56
           label="发放类型">
57
+          <template slot-scope="scope">
58
+            <span>{{SendType(scope.row.SendType)}}</span>
59
+          </template>
57 60
         </el-table-column>
58 61
         <el-table-column
59 62
           prop="TotalCount"
@@ -279,6 +282,17 @@ export default {
279 282
       'GetCustomerList',
280 283
       'SetCustomerListNull',
281 284
     ]),
285
+    SendType (type) {
286
+      if (type === 'channel') {
287
+        return '渠道'
288
+      }
289
+      if (type === 'case') {
290
+        return '案场'
291
+      }
292
+      if (type === 'system') {
293
+        return '系统'
294
+      }
295
+    },
282 296
     toSendHistory () { // 查看赠送记录
283 297
       this.$router.push({ name: 'givingRecords' })
284 298
     },

+ 7
- 5
src/pages/system/cardAndCouponManager/couponManager/edit.vue ファイルの表示

@@ -24,7 +24,8 @@
24 24
             <div>
25 25
               <el-upload
26 26
                 class="avatar-uploader"
27
-                :action='$api.file.image.url'
27
+                action='string'
28
+                :http-request="toolClass.upload"
28 29
                 :show-file-list="false"
29 30
                 :on-success="handleAvatarSuccess">
30 31
                 <img v-if="couponInfo.Images[0].CouponImageUrl" :src="couponInfo.Images[0].CouponImageUrl" class="avatar">
@@ -89,7 +90,7 @@
89 90
           <div class="flex-item">
90 91
             <div>
91 92
               <el-radio v-model="couponInfo.SendType" label="channel">渠道</el-radio>
92
-              <el-radio v-if="couponInfo.CouponType === 'case'" v-model="couponInfo.SendType" label="case">案场</el-radio>
93
+              <el-radio v-if="couponInfo.CouponType === 'course'" v-model="couponInfo.SendType" label="case">案场</el-radio>
93 94
               <el-radio v-model="couponInfo.SendType" label="system">系统</el-radio>
94 95
             </div>
95 96
           </div>
@@ -183,7 +184,7 @@
183 184
             </div>
184 185
           </div>
185 186
         </li>
186
-        <li class="flex-h" v-if="type === 'course'">
187
+        <li class="flex-h" v-if="couponInfo.CouponType === 'course'">
187 188
           <span>券有效时间:</span>
188 189
           <div class="flex-item">
189 190
             <div>
@@ -208,7 +209,8 @@
208 209
               <a style="line-height: 40px;" v-if="videoOff" :href="couponInfo.VideoUrl" target="blank">{{couponInfo.VideoUrl}}</a>
209 210
               <el-upload
210 211
                 class="avatar-uploader"
211
-                :action='$api.file.image.url'
212
+                action='string'
213
+                :http-request="toolClass.upload"
212 214
                 :show-file-list="false"
213 215
                 :on-success="videoSuccess">
214 216
                 <a style="line-height: 40px;padding: 0 10px;">{{videoOff ? '更换' : '添加'}}视频</a>
@@ -636,7 +638,7 @@ export default {
636 638
           this.total = res.pagenum
637 639
         })
638 640
       }
639
-    },
641
+    }
640 642
   }
641 643
 }
642 644
 </script>

+ 4
- 2
src/pages/system/caseManager/caseAreaManager/add.vue ファイルの表示

@@ -37,7 +37,8 @@
37 37
             <div>
38 38
               <el-upload
39 39
                 class="avatar-uploader"
40
-                :action='$api.file.image.url'
40
+                action='string'
41
+                :http-request="toolClass.upload"
41 42
                 :show-file-list="false"
42 43
                 :on-success="handleAvatarSuccess">
43 44
                 <img v-if="postData.AreaIcon" :src="postData.AreaIcon" class="avatar">
@@ -52,7 +53,8 @@
52 53
             <div>
53 54
               <el-upload
54 55
                 class="avatar-uploader"
55
-                :action='$api.file.image.url'
56
+                action='string'
57
+                :http-request="toolClass.upload"
56 58
                 :show-file-list="false"
57 59
                 :on-success="handleAvatarSuccesser">
58 60
                 <img v-if="postData.AreaIconWhite" :src="postData.AreaIconWhite" class="avatar">

+ 4
- 2
src/pages/system/caseManager/caseAreaManager/edit.vue ファイルの表示

@@ -37,7 +37,8 @@
37 37
             <div>
38 38
               <el-upload
39 39
                 class="avatar-uploader"
40
-                :action='$api.file.image.url'
40
+                action='string'
41
+                :http-request="toolClass.upload"
41 42
                 :show-file-list="false"
42 43
                 :on-success="handleAvatarSuccess">
43 44
                 <img v-if="postData.AreaIcon" :src="postData.AreaIcon" class="avatar">
@@ -52,7 +53,8 @@
52 53
             <div>
53 54
               <el-upload
54 55
                 class="avatar-uploader"
55
-                :action='$api.file.image.url'
56
+                action='string'
57
+                :http-request="toolClass.upload"
56 58
                 :show-file-list="false"
57 59
                 :on-success="handleAvatarSuccesser">
58 60
                 <img v-if="postData.AreaIconWhite" :src="postData.AreaIconWhite" class="avatar">

+ 2
- 1
src/pages/system/caseManager/caseInfo/addCase/index.vue ファイルの表示

@@ -66,7 +66,8 @@
66 66
               </a> -->
67 67
               <el-upload
68 68
                 class="avatar-uploader"
69
-                :action='$api.file.image.url'
69
+                action='string'
70
+                :http-request="toolClass.upload"
70 71
                 :show-file-list="false"
71 72
                 :on-success="handleAvatarSuccess">
72 73
                 <img v-if="postData.CaseIcon" :src="postData.CaseIcon" class="avatar">

+ 2
- 1
src/pages/system/caseManager/caseInfo/editCase/index.vue ファイルの表示

@@ -62,7 +62,8 @@
62 62
               </a> -->
63 63
               <el-upload
64 64
                 class="avatar-uploader"
65
-                :action='$api.file.image.url'
65
+                action='string'
66
+                :http-request="toolClass.upload"
66 67
                 :show-file-list="false"
67 68
                 :on-success="handleAvatarSuccess">
68 69
                 <img v-if="postData.CaseIcon" :src="postData.CaseIcon" class="avatar">

+ 13
- 4
src/pages/system/cmsManager/bannerManager/add.vue ファイルの表示

@@ -78,7 +78,8 @@
78 78
           <span>图片:</span>
79 79
           <div class="flex-item">
80 80
             <!-- <el-upload
81
-              :action="$api.file.image.url"
81
+              action='string'
82
+              :http-request="toolClass.upload"
82 83
               :limit='limit'
83 84
               list-type="picture-card"
84 85
               :file-list='imgsArr'
@@ -92,12 +93,16 @@
92 93
             </el-dialog> -->
93 94
             <el-upload
94 95
               class="avatar-uploader"
95
-              :action='$api.file.image.url'
96
+              action='string'
97
+              :http-request="toolClass.upload"
96 98
               :show-file-list="false"
97 99
               :on-success="handleAvatarSuccess">
98 100
               <img v-if="postData.ImageUrl" :src="postData.ImageUrl" class="avatar">
99 101
               <i v-else class="el-icon-plus avatar-uploader-icon"></i>
100 102
             </el-upload>
103
+            <!-- <div>
104
+              <image-uploader :upload="uploader" v-model="postData.ImageUrl" />
105
+            </div> -->
101 106
           </div>
102 107
         </li>
103 108
         <!-- <li class="flex-h">
@@ -126,6 +131,7 @@
126 131
 
127 132
 <script>
128 133
 import { mapState, createNamespacedHelpers, mapActions } from 'vuex'
134
+// import upload from '@/util/upload'
129 135
 
130 136
 const { mapActions: mapCmsActions } = createNamespacedHelpers('cms')
131 137
 const { mapState: mapCourseState, mapActions: mapCourseActions } = createNamespacedHelpers('course')
@@ -134,6 +140,7 @@ export default {
134 140
   name: '',
135 141
   data () {
136 142
     return {
143
+      // uploader: upload,
137 144
       postData: {
138 145
         ForwardType: '1',
139 146
         ForwardUrl: '',
@@ -151,7 +158,9 @@ export default {
151 158
       limit: 1
152 159
     }
153 160
   },
154
-  components: {},
161
+  components: {
162
+    // imageUploader: () => import('@/components/upload')
163
+  },
155 164
   created () {
156 165
     this.GetCourseList({page: 1, pagesize: 100})
157 166
     this.updateLocationInfo()
@@ -243,7 +252,7 @@ export default {
243 252
     // }
244 253
     handleAvatarSuccess (res, file) {
245 254
       this.postData.ImageUrl = res.result.url
246
-    },
255
+    }
247 256
   }
248 257
 }
249 258
 </script>

+ 5
- 3
src/pages/system/cmsManager/bannerManager/edit.vue ファイルの表示

@@ -78,7 +78,8 @@
78 78
           <span>图片:</span>
79 79
           <div class="flex-item">
80 80
             <!-- <el-upload
81
-              :action="$api.file.image.url"
81
+              action='string'
82
+              :http-request="toolClass.upload"
82 83
               :limit='limit'
83 84
               list-type="picture-card"
84 85
               :file-list='imgsArr'
@@ -92,7 +93,8 @@
92 93
             </el-dialog> -->
93 94
             <el-upload
94 95
               class="avatar-uploader"
95
-              :action='$api.file.image.url'
96
+              action='string'
97
+              :http-request="toolClass.upload"
96 98
               :show-file-list="false"
97 99
               :on-success="handleAvatarSuccess">
98 100
               <img v-if="postData.ImageUrl" :src="postData.ImageUrl" class="avatar">
@@ -267,7 +269,7 @@ export default {
267 269
     // }
268 270
     handleAvatarSuccess (res, file) {
269 271
       this.postData.ImageUrl = res.result.url
270
-    },
272
+    }
271 273
   }
272 274
 }
273 275
 </script>

+ 9
- 5
src/pages/system/cmsManager/majorProjects/edit.vue ファイルの表示

@@ -45,7 +45,8 @@
45 45
           <span>图片:</span>
46 46
           <div class="flex-item">
47 47
             <!-- <el-upload
48
-              :action="$api.file.image.url"
48
+              action='string'
49
+              :http-request="toolClass.upload"
49 50
               list-type="picture-card"
50 51
               :limit='limit'
51 52
               :file-list='imgsArr'
@@ -57,7 +58,8 @@
57 58
             <!-- 单选 -->
58 59
             <el-upload
59 60
               class="avatar-uploader"
60
-              :action='$api.file.image.url'
61
+              action='string'
62
+              :http-request="toolClass.upload"
61 63
               :show-file-list="false"
62 64
               :on-success="handleImgSuccess">
63 65
               <img v-if="imgShow" :src="imgShow" class="avatar">
@@ -69,7 +71,8 @@
69 71
           <span>详细图片:</span>
70 72
           <div class="flex-item">
71 73
             <!-- <el-upload
72
-              :action='$api.file.image.url'
74
+              action='string'
75
+              :http-request="toolClass.upload"
73 76
               list-type="picture-card"
74 77
               :limit='limit'
75 78
               :file-list='detailimgsArr'
@@ -81,7 +84,8 @@
81 84
             <!-- 单选 -->
82 85
             <el-upload
83 86
               class="avatar-uploader"
84
-              :action='$api.file.image.url'
87
+              action='string'
88
+              :http-request="toolClass.upload"
85 89
               :show-file-list="false"
86 90
               :on-success="handleDetailImgSuccess">
87 91
               <img v-if="detailImgShow" :src="detailImgShow" class="avatar">
@@ -398,7 +402,7 @@ export default {
398 402
     },
399 403
     handleDetailImgSuccess (res, file) {
400 404
       this.detailimg = res.result.url
401
-    },
405
+    }
402 406
   },
403 407
   mounted () {
404 408
     this.getCourse()

+ 5
- 3
src/pages/system/cmsManager/newsManager/add.vue ファイルの表示

@@ -63,7 +63,8 @@
63 63
           <span>图片:</span>
64 64
           <div class="flex-item">
65 65
             <!-- <el-upload
66
-              :action="$api.file.image.url"
66
+              action='string'
67
+              :http-request="toolClass.upload"
67 68
               :limit='limit'
68 69
               list-type="picture-card"
69 70
               :file-list='imgsArr'
@@ -78,7 +79,8 @@
78 79
             <!-- 单选 -->
79 80
             <el-upload
80 81
               class="avatar-uploader"
81
-              :action='$api.file.image.url'
82
+              action='string'
83
+              :http-request="toolClass.upload"
82 84
               :show-file-list="false"
83 85
               :on-success="handleAvatarSuccess">
84 86
               <img v-if="postData.ImageUrl" :src="postData.ImageUrl" class="avatar">
@@ -200,7 +202,7 @@ export default {
200 202
     // }
201 203
     handleAvatarSuccess (res, file) {
202 204
       this.postData.ImageUrl = res.result.url
203
-    },
205
+    }
204 206
   }
205 207
 }
206 208
 </script>

+ 5
- 3
src/pages/system/cmsManager/newsManager/edit.vue ファイルの表示

@@ -63,7 +63,8 @@
63 63
           <span>图片:</span>
64 64
           <div class="flex-item">
65 65
             <!-- <el-upload
66
-              :action="$api.file.image.url"
66
+              action='string'
67
+              :http-request="toolClass.upload"
67 68
               :limit='limit'
68 69
               list-type="picture-card"
69 70
               :file-list='imgsArr'
@@ -77,7 +78,8 @@
77 78
             </el-dialog> -->
78 79
             <el-upload
79 80
               class="avatar-uploader"
80
-              :action='$api.file.image.url'
81
+              action='string'
82
+              :http-request="toolClass.upload"
81 83
               :show-file-list="false"
82 84
               :on-success="handleAvatarSuccess">
83 85
               <img v-if="postData.ImageUrl" :src="postData.ImageUrl" class="avatar">
@@ -229,7 +231,7 @@ export default {
229 231
     },
230 232
     handleAvatarSuccess (res, file) {
231 233
       this.postData.ImageUrl = res.result.url
232
-    },
234
+    }
233 235
   }
234 236
 }
235 237
 </script>

+ 12
- 8
src/pages/system/courseManager/courseList/add.vue ファイルの表示

@@ -8,7 +8,8 @@
8 8
             <div>
9 9
               <el-upload
10 10
                 class="avatar-uploader"
11
-                :action='$api.file.image.url'
11
+                action='string'
12
+                :http-request="toolClass.upload"
12 13
                 :show-file-list="false"
13 14
                 :on-success="handleAvatarSuccess">
14 15
                 <img v-if="detail.CourseImg" :src="detail.CourseImg" class="avatar">
@@ -262,7 +263,7 @@ export default {
262 263
         return this.detail.CaseId || this.caseid
263 264
       },
264 265
       set (val) {
265
-        this.UpdateInfo({...this.detail, CaseId: val})
266
+        this.UpdateInfo({ ...this.detail, CaseId: val })
266 267
       }
267 268
     },
268 269
     courseDate: {
@@ -270,7 +271,7 @@ export default {
270 271
         return this.detail.BeginDate && this.detail.EndDate ? [this.detail.BeginDate, this.detail.EndDate] : []
271 272
       },
272 273
       set (val) {
273
-        this.UpdateInfo({...this.detail, BeginDate: val[0], EndDate: val[1]})
274
+        this.UpdateInfo({ ...this.detail, BeginDate: val[0], EndDate: val[1] })
274 275
       },
275 276
     },
276 277
     tags: {
@@ -283,7 +284,7 @@ export default {
283 284
             TagId: x,
284 285
           }
285 286
         })
286
-        this.UpdateInfo({...this.detail, CourseTags: v})
287
+        this.UpdateInfo({ ...this.detail, CourseTags: v })
287 288
       }
288 289
     },
289 290
   },
@@ -302,12 +303,15 @@ export default {
302 303
       'GetCourseTagList',
303 304
     ]),
304 305
     handleAvatarSuccess (res, file) {
305
-      this.UpdateInfo({...this.detail, CourseImg: res.result.url})
306
+      this.UpdateInfo({ ...this.detail, CourseImg: res.result.url })
307
+    },
308
+    upLoad (item) {
309
+      this.toolClass.upload(item).then((res) => { this.handleAvatarSuccess(res, item.file) })
306 310
     },
307 311
     submit () { // 提交数据
308 312
       const { id } = this.$route.query
309 313
       if (!id || id === '') {
310
-        this.UpdateInfo({...this.detail, CourseId: ''})
314
+        this.UpdateInfo({ ...this.detail, CourseId: '' })
311 315
       }
312 316
       const _that = this
313 317
       this.detail.tagids = this.tags.map(x => {
@@ -323,9 +327,9 @@ export default {
323 327
         if (!this.detail.CaseId || this.detail.CaseId === '') {
324 328
           this.detail.CaseId = this.caseid
325 329
         }
326
-        this.AddCourse({...this.detail, callback: _that.afterSave})
330
+        this.AddCourse({ ...this.detail, callback: _that.afterSave })
327 331
       } else {
328
-        this.UpdateCourse({...this.detail, callback: _that.afterSave})
332
+        this.UpdateCourse({ ...this.detail, callback: _that.afterSave })
329 333
       }
330 334
     },
331 335
     afterSave () {

+ 3
- 2
src/pages/system/courseManager/courseList/index.vue ファイルの表示

@@ -170,7 +170,8 @@
170 170
             <div>
171 171
               <el-upload
172 172
                 class="avatar-uploader"
173
-                :action='$api.file.image.url'
173
+                action='string'
174
+                :http-request="toolClass.upload"
174 175
                 :show-file-list="false"
175 176
                 :on-success="handleAvatarSuccess">
176 177
                 <img v-if="newImg" :src="newImg" class="avatar">
@@ -424,7 +425,7 @@ export default {
424 425
     },
425 426
     toSchedule (row) {
426 427
       this.$router.push({ name: 'scheduleManager', query: { id: row.CourseId } })
427
-    },
428
+    }
428 429
   }
429 430
 }
430 431
 </script>

+ 2
- 1
src/pages/system/courseManager/fiveA/add.vue ファイルの表示

@@ -42,7 +42,8 @@
42 42
           <span>图片:</span>
43 43
           <div class="flex-item">
44 44
             <el-upload
45
-              :action="$api.file.image.url"
45
+              action='string'
46
+              :http-request="toolClass.upload"
46 47
               :limit='limit'
47 48
               list-type="picture-card"
48 49
               :file-list='imgsArr'

+ 2
- 1
src/pages/system/courseManager/fiveA/edit.vue ファイルの表示

@@ -54,7 +54,8 @@
54 54
           <span>图片:</span>
55 55
           <div class="flex-item">
56 56
             <el-upload
57
-              :action="$api.file.image.url"
57
+              action='string'
58
+              :http-request="toolClass.upload"
58 59
               :limit='limit'
59 60
               list-type="picture-card"
60 61
               :file-list='imgsArr'

+ 9
- 1
src/pages/system/courseManager/scheduleManager/edit.vue ファイルの表示

@@ -2,7 +2,11 @@
2 2
   <div class="subPage">
3 3
     <div class="system-table-search">
4 4
       <div class="flex-h">
5
-        <div class="flex-item flex-h"></div>
5
+        <div class="flex-item flex-h">
6
+          <el-button
7
+          size="mini"
8
+          type="primary" @click="goLast">继续排课</el-button>
9
+        </div>
6 10
         <ul>
7 11
           <li>
8 12
             <el-input
@@ -251,6 +255,10 @@ export default {
251 255
       this.search()
252 256
       this.centerDialogVisible = false
253 257
     },
258
+    goLast () {
259
+      const { courseid } = this.$route.query
260
+      this.$router.push({name: 'scheduleManager', query: {id: courseid}})
261
+    }
254 262
   }
255 263
 }
256 264
 </script>

+ 9
- 1
src/pages/system/dataStatistics/goodsStatisticsList/index.vue ファイルの表示

@@ -87,9 +87,11 @@
87 87
 </template>
88 88
 
89 89
 <script>
90
-import { mapState } from 'vuex'
90
+import { mapState, createNamespacedHelpers } from 'vuex'
91 91
 import tableSearch from '@/components/tableSearch/index'
92 92
 
93
+const {mapState: mapStaState, mapActions: mapStaActions} = createNamespacedHelpers('sta')
94
+
93 95
 export default {
94 96
   name: '',
95 97
   data () {
@@ -111,6 +113,9 @@ export default {
111 113
       cases: x => x.app.cases.list,
112 114
       defaultCaseId: x => x.app.cases.default
113 115
     }),
116
+    ...mapStaState({
117
+      goods: x => x.goods,
118
+    }),
114 119
     CaseId: {
115 120
       get () {
116 121
         return this.postData.caseid || this.defaultCaseId
@@ -128,6 +133,9 @@ export default {
128 133
     })
129 134
   },
130 135
   methods: {
136
+    ...mapStaActions([
137
+      'GetGoods',
138
+    ]),
131 139
     search () { // 搜索
132 140
       // 1
133 141
     },

+ 4
- 2
src/pages/system/goodsManager/goodManager/edit.vue ファイルの表示

@@ -35,7 +35,8 @@
35 35
             <div style="width:50%">
36 36
               <!-- 多选 -->
37 37
               <!-- <el-upload
38
-                :action="$api.file.image.url"
38
+                action='string'
39
+                :http-request="toolClass.upload"
39 40
                 :limit='limit'
40 41
                 list-type="picture-card"
41 42
                 :file-list='imgsArr'
@@ -47,7 +48,8 @@
47 48
               <!-- 单选 -->
48 49
               <el-upload
49 50
                 class="avatar-uploader"
50
-                :action='$api.file.image.url'
51
+                action='string'
52
+                :http-request="toolClass.upload"
51 53
                 :show-file-list="false"
52 54
                 :on-success="handleAvatarSuccess">
53 55
                 <img v-if="Image" :src="Image" class="avatar">

+ 2
- 1
src/pages/system/systemSet/userManager/add.vue ファイルの表示

@@ -28,7 +28,8 @@
28 28
             <div>
29 29
               <el-upload
30 30
                 class="avatar-uploader"
31
-                :action='$api.file.image.url'
31
+                action='string'
32
+                :http-request="toolClass.upload"
32 33
                 :show-file-list="false"
33 34
                 :on-success="handleAvatarSuccess">
34 35
                 <img v-if="postData.Headimgurl" :src="postData.Headimgurl" class="avatar">

+ 2
- 1
src/pages/system/systemSet/userManager/edit.vue ファイルの表示

@@ -28,7 +28,8 @@
28 28
             <div>
29 29
               <el-upload
30 30
                 class="avatar-uploader"
31
-                :action='$api.file.image.url'
31
+                action='string'
32
+                :http-request="toolClass.upload"
32 33
                 :show-file-list="false"
33 34
                 :on-success="handleAvatarSuccess">
34 35
                 <img v-if="postData.Headimgurl" :src="postData.Headimgurl" class="avatar">

+ 13
- 13
src/store/card/gymCard.js ファイルの表示

@@ -61,18 +61,18 @@ export default {
61 61
         }).catch(reject)
62 62
       })
63 63
     },
64
-    // giveCard ({ commit }, { id, users }) {
65
-    //   return new Promise((resolve, reject) => {
66
-    //     ajax(api.cardManager.giveCard.url, {
67
-    //       method: api.cardManager.giveCard.method,
68
-    //       urlData: {
69
-    //         id,
70
-    //         users
71
-    //       },
72
-    //     }).then(res => {
73
-    //       resolve(res)
74
-    //     }).catch(reject)
75
-    //   })
76
-    // }
64
+    giveCard ({ commit }, { id, users }) {
65
+      return new Promise((resolve, reject) => {
66
+        ajax(api.gymCardManager.giveCard.url, {
67
+          method: api.gymCardManager.giveCard.method,
68
+          urlData: {
69
+            id,
70
+            users
71
+          },
72
+        }).then(res => {
73
+          resolve(res)
74
+        }).catch(reject)
75
+      })
76
+    }
77 77
   }
78 78
 }

+ 1
- 1
src/store/course/schedule.js ファイルの表示

@@ -90,7 +90,7 @@ export default {
90 90
       })
91 91
     },
92 92
     SetListNull ({ commit }) {
93
-      commit('updatesSheduleList', [])
93
+      commit('updateList', [])
94 94
     }
95 95
   }
96 96
 }

+ 1
- 0
src/store/index.js ファイルの表示

@@ -32,6 +32,7 @@ export const modules = {
32 32
   channel: () => require('./channel/channel').default,
33 33
   customer: () => require('./customer/customer').default,
34 34
   user: () => require('./system/user').default,
35
+  sta: () => require('./sta/sta').default,
35 36
 }
36 37
 
37 38
 Object.keys(modules).forEach((modKey) => {

+ 29
- 0
src/store/sta/sta.js ファイルの表示

@@ -0,0 +1,29 @@
1
+import ajax from '../../util/ajax'
2
+import api from '../../util/api'
3
+
4
+export default {
5
+  namespaced: true,
6
+  state: {
7
+    goods: [],
8
+  },
9
+  mutations: {
10
+    updateGoods (state, payload) {
11
+      state.goods = payload || []
12
+    },
13
+  },
14
+  actions: {
15
+    GetGoods ({ commit }, payload) {
16
+      return new Promise((resolve, reject) => {
17
+        ajax(api.statistics.goods.url, {
18
+          method: api.statistics.goods.method,
19
+          queryData: {
20
+            ...payload,
21
+          }
22
+        }).then(res => {
23
+          commit('updateGoods', res)
24
+          resolve(res)
25
+        }).catch(reject)
26
+      })
27
+    },
28
+  }
29
+}

+ 1
- 1
src/util/ajax.js ファイルの表示

@@ -10,7 +10,7 @@ const token = function (headers) {
10 10
     JWT = headers.authorization
11 11
   }
12 12
   console.log(JWT)
13
-  return JWT ? JWT : localStorage.getItem('JWT')
13
+  return JWT ? JWT : localStorage.getItem('JWT') // eslint-disable-line
14 14
 }
15 15
 
16 16
 const Axios = axios.create({

+ 10
- 0
src/util/api.js ファイルの表示

@@ -648,6 +648,10 @@ const $api = {
648 648
     getGymCardById: {
649 649
       method: 'get',
650 650
       url: `${baseUrl}${common}/gymcard/:id`
651
+    },
652
+    giveCard: {
653
+      method: 'post',
654
+      url: `${baseUrl}${common}/gymcard/:id/to/:users`
651 655
     }
652 656
   },
653 657
   customerManager: {
@@ -685,6 +689,12 @@ const $api = {
685 689
       method: 'get',
686 690
       url: `${baseUrl}${common}/coupon`
687 691
     }
692
+  },
693
+  statistics: {
694
+    goods: {
695
+      method: 'get',
696
+      url: `${baseUrl}${common}/statistics/goods`
697
+    },
688 698
   }
689 699
 }
690 700
 export default $api

+ 13
- 0
src/util/upload.js ファイルの表示

@@ -0,0 +1,13 @@
1
+import api from './api'
2
+import ajax from './ajax'
3
+
4
+export default function upload (file) {
5
+  return new Promise((resolve, reject) => {
6
+    ajax({
7
+      ...api.file.image,
8
+      data: { file: file },
9
+    }).then(({ url }) => {
10
+      resolve(url)
11
+    }).catch(reject)
12
+  })
13
+}

+ 20
- 1
src/util/util.js ファイルの表示

@@ -1,3 +1,5 @@
1
+import Ajax from './ajax'
2
+import api from './api'
1 3
 const toolClass = {
2 4
   dateFormat: (timestamp, fmt) => {
3 5
     if (!fmt) {
@@ -24,7 +26,24 @@ const toolClass = {
24 26
     }
25 27
     return fmt
26 28
   },
27
-
29
+  ReplaceOrg (url) {
30
+    return url.replace(':org', 'MQ')
31
+  },
32
+  upload (item) {
33
+    return new Promise((resolve, reject) => {
34
+      Ajax({
35
+        ...api.file.image,
36
+        data: { file: item.file },
37
+      }).then((res) => {
38
+        let result = {
39
+          result: res
40
+        }
41
+        item.onSuccess(result, item.file)
42
+        console.log(result)
43
+        resolve(result)
44
+      }).catch(reject)
45
+    })
46
+  }
28 47
 }
29 48
 
30 49
 export function formatTimeBySeconds (ms) {