许成详 6 vuotta sitten
vanhempi
commit
89918da360
33 muutettua tiedostoa jossa 263 lisäystä ja 82 poistoa
  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 Näytä tiedosto

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

+ 41
- 0
src/components/upload/index.vue Näytä tiedosto

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 Näytä tiedosto

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

+ 3
- 1
src/pages/system/cardAndCouponManager/bodyBuildingCardManager/index.vue Näytä tiedosto

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

+ 8
- 16
src/pages/system/cardAndCouponManager/cardManager/edit.vue Näytä tiedosto

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

+ 14
- 0
src/pages/system/cardAndCouponManager/cardManager/index.vue Näytä tiedosto

54
         <el-table-column
54
         <el-table-column
55
           prop="SendType"
55
           prop="SendType"
56
           label="发放类型">
56
           label="发放类型">
57
+          <template slot-scope="scope">
58
+            <span>{{SendType(scope.row.SendType)}}</span>
59
+          </template>
57
         </el-table-column>
60
         </el-table-column>
58
         <el-table-column
61
         <el-table-column
59
           prop="TotalCount"
62
           prop="TotalCount"
279
       'GetCustomerList',
282
       'GetCustomerList',
280
       'SetCustomerListNull',
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
     toSendHistory () { // 查看赠送记录
296
     toSendHistory () { // 查看赠送记录
283
       this.$router.push({ name: 'givingRecords' })
297
       this.$router.push({ name: 'givingRecords' })
284
     },
298
     },

+ 7
- 5
src/pages/system/cardAndCouponManager/couponManager/edit.vue Näytä tiedosto

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

+ 4
- 2
src/pages/system/caseManager/caseAreaManager/add.vue Näytä tiedosto

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

+ 4
- 2
src/pages/system/caseManager/caseAreaManager/edit.vue Näytä tiedosto

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

+ 2
- 1
src/pages/system/caseManager/caseInfo/addCase/index.vue Näytä tiedosto

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

+ 2
- 1
src/pages/system/caseManager/caseInfo/editCase/index.vue Näytä tiedosto

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

+ 13
- 4
src/pages/system/cmsManager/bannerManager/add.vue Näytä tiedosto

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

+ 5
- 3
src/pages/system/cmsManager/bannerManager/edit.vue Näytä tiedosto

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

+ 9
- 5
src/pages/system/cmsManager/majorProjects/edit.vue Näytä tiedosto

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

+ 5
- 3
src/pages/system/cmsManager/newsManager/add.vue Näytä tiedosto

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

+ 5
- 3
src/pages/system/cmsManager/newsManager/edit.vue Näytä tiedosto

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

+ 12
- 8
src/pages/system/courseManager/courseList/add.vue Näytä tiedosto

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

+ 3
- 2
src/pages/system/courseManager/courseList/index.vue Näytä tiedosto

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

+ 2
- 1
src/pages/system/courseManager/fiveA/add.vue Näytä tiedosto

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

+ 2
- 1
src/pages/system/courseManager/fiveA/edit.vue Näytä tiedosto

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

+ 9
- 1
src/pages/system/courseManager/scheduleManager/edit.vue Näytä tiedosto

2
   <div class="subPage">
2
   <div class="subPage">
3
     <div class="system-table-search">
3
     <div class="system-table-search">
4
       <div class="flex-h">
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
         <ul>
10
         <ul>
7
           <li>
11
           <li>
8
             <el-input
12
             <el-input
251
       this.search()
255
       this.search()
252
       this.centerDialogVisible = false
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
 </script>
264
 </script>

+ 9
- 1
src/pages/system/dataStatistics/goodsStatisticsList/index.vue Näytä tiedosto

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

+ 4
- 2
src/pages/system/goodsManager/goodManager/edit.vue Näytä tiedosto

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

+ 2
- 1
src/pages/system/systemSet/userManager/add.vue Näytä tiedosto

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

+ 2
- 1
src/pages/system/systemSet/userManager/edit.vue Näytä tiedosto

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

+ 13
- 13
src/store/card/gymCard.js Näytä tiedosto

61
         }).catch(reject)
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 Näytä tiedosto

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

+ 1
- 0
src/store/index.js Näytä tiedosto

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

+ 29
- 0
src/store/sta/sta.js Näytä tiedosto

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 Näytä tiedosto

10
     JWT = headers.authorization
10
     JWT = headers.authorization
11
   }
11
   }
12
   console.log(JWT)
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
 const Axios = axios.create({
16
 const Axios = axios.create({

+ 10
- 0
src/util/api.js Näytä tiedosto

648
     getGymCardById: {
648
     getGymCardById: {
649
       method: 'get',
649
       method: 'get',
650
       url: `${baseUrl}${common}/gymcard/:id`
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
   customerManager: {
657
   customerManager: {
685
       method: 'get',
689
       method: 'get',
686
       url: `${baseUrl}${common}/coupon`
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
 export default $api
700
 export default $api

+ 13
- 0
src/util/upload.js Näytä tiedosto

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 Näytä tiedosto

1
+import Ajax from './ajax'
2
+import api from './api'
1
 const toolClass = {
3
 const toolClass = {
2
   dateFormat: (timestamp, fmt) => {
4
   dateFormat: (timestamp, fmt) => {
3
     if (!fmt) {
5
     if (!fmt) {
24
     }
26
     }
25
     return fmt
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
 export function formatTimeBySeconds (ms) {
49
 export function formatTimeBySeconds (ms) {