wangfei 6 年前
父节点
当前提交
440843a8f0

+ 1
- 1
dist/index.html 查看文件

@@ -1 +1 @@
1
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_dwqa9wy3lkh.css><link rel="shortcut icon" href=favorite.ico><title>城的空间后台管理系统</title><link href=./static/css/app.5cdb0977d03b36e84d98d71b2ca370a4.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.59816f74ac1cbe691e41.js></script><script type=text/javascript src=./static/js/vendor.d93cccd3231f9f669168.js></script><script type=text/javascript src=./static/js/app.3362be122f30a5d46088.js></script></body></html>
1
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_dwqa9wy3lkh.css><link rel="shortcut icon" href=favorite.ico><title>城的空间后台管理系统</title><link href=./static/css/app.4678886ff2e20ee6b210acfe25090f8e.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.59816f74ac1cbe691e41.js></script><script type=text/javascript src=./static/js/vendor.7c661c1d63eb295628f5.js></script><script type=text/javascript src=./static/js/app.35f379cfed9e471bd096.js></script></body></html>

+ 225
- 0
src/pages/system/calendarManager/calendar/index.vue 查看文件

@@ -0,0 +1,225 @@
1
+<template>
2
+  <div class="subPage">
3
+    <div class="system-table-search">
4
+      <div class="flex-h">
5
+        <div class="flex-item flex-h"></div>
6
+        <ul>
7
+          <li>
8
+            <el-input
9
+              placeholder="请输入姓名"
10
+              v-model="postData.name"
11
+              clearable>
12
+            </el-input>
13
+          </li>
14
+          <li>
15
+            <el-input
16
+              placeholder="请输入手机号"
17
+              v-model="postData.phone"
18
+              clearable>
19
+            </el-input>
20
+          </li>
21
+          <li>
22
+            <el-select v-model="postData.makeStatus" placeholder="请选择状态">
23
+              <el-option
24
+                label="已完成"
25
+                value="finish">
26
+              </el-option>
27
+              <el-option
28
+                label="制作中"
29
+                value="making">
30
+              </el-option>
31
+            </el-select>
32
+          </li>
33
+        </ul>
34
+        <el-button
35
+          size="mini"
36
+          type="primary"
37
+          @click="search">搜索</el-button>
38
+        <el-button
39
+          size="mini"
40
+          type="success" @click="exportExcel">导出Excel</el-button>
41
+        <el-button
42
+          size="mini"
43
+          type="success" @click="finishStatusMore">批量完成</el-button>
44
+      </div>
45
+      <div class="moreFilter"></div>
46
+    </div>
47
+    <div class="system-table-box item_tmp">
48
+      <el-checkbox-group v-model="selids">
49
+      <el-table
50
+          :data="calendar.list"
51
+          style="width: 100%"
52
+          >
53
+          <el-table-column
54
+            label=""
55
+            width="30"
56
+            >
57
+            <template slot-scope="scope">
58
+              <el-checkbox v-if='scope.row.MakeStatus === "making"' :label='scope.row.CustomerCalendarId'></el-checkbox>
59
+            </template>
60
+          </el-table-column>
61
+          <el-table-column
62
+            prop="ModelName"
63
+            label="模板"
64
+            width="100">
65
+          </el-table-column>
66
+          <el-table-column
67
+            prop="Name"
68
+            label="姓名">
69
+          </el-table-column>
70
+          <el-table-column
71
+            prop="CustomerName"
72
+            label="昵称">
73
+          </el-table-column>
74
+          <el-table-column
75
+            prop="Phone"
76
+            label="手机号">
77
+          </el-table-column>
78
+          <el-table-column
79
+            prop="Email"
80
+            label="邮箱">
81
+          </el-table-column>
82
+          <el-table-column
83
+            prop="CreateDate"
84
+            label="定制时间">
85
+            <template slot-scope="scope">
86
+              <span v-if="scope.row.CreateDate !== '0001-01-01T00:00:00Z'">{{toolClass.dateFormat(scope.row.CreateDate, 'yyyy-MM-dd hh:mm')}}</span>
87
+              <span v-else>-</span>
88
+            </template>
89
+          </el-table-column>
90
+          <el-table-column
91
+            prop="Status"
92
+            label="状态">
93
+            <template slot-scope="scope">
94
+              <span>{{scope.row.MakeStatus === "finish" ? '制作完成' : '制作中'}}</span>
95
+            </template>
96
+          </el-table-column>
97
+          <el-table-column
98
+            prop="address"
99
+            label="操作"
100
+            width="400">
101
+            <template slot-scope="scope">
102
+              <el-button
103
+                v-if="scope.row.MakeStatus === 'making'"
104
+                size="mini"
105
+                type="success"
106
+                @click="finishStatus(scope.row.CustomerCalendarId)">制作完成</el-button>
107
+              <el-button
108
+                size="mini"
109
+                type="warning"
110
+                @click="downUserPic(scope.row.CustomerCalendarId, 'user')">下载用户照片</el-button>
111
+              <el-button
112
+                size="mini"
113
+                type="success"
114
+                @click="downUserPic(scope.row.CustomerCalendarId, 'calendar')">下载合成照片</el-button>
115
+            </template>
116
+          </el-table-column>
117
+        </el-table>
118
+      </el-checkbox-group>
119
+    </div>
120
+    <el-pagination
121
+      @current-change="handleCurrentChange"
122
+      :current-page.sync="postData.page"
123
+      :page-size="postData.pagesize"
124
+      layout="prev, pager, next, jumper"
125
+      :total="calendar.pagenum">
126
+    </el-pagination>
127
+  </div>
128
+</template>
129
+<script>
130
+import { createNamespacedHelpers } from 'vuex'
131
+
132
+const { mapState: mapCalendarState, mapActions: mapCalendarActions } = createNamespacedHelpers('calendar')
133
+
134
+export default {
135
+  data () {
136
+    return {
137
+      postData: {
138
+        name: '',
139
+        phone: '',
140
+        makeStatus: '',
141
+        page: 1,
142
+        pagesize: 10,
143
+      },
144
+      total: 0,
145
+      selids: [],
146
+    }
147
+  },
148
+  computed: {
149
+    ...mapCalendarState({
150
+      calendar: x => x.CalendarList || {},
151
+    }),
152
+  },
153
+  mounted () {
154
+    this.getList()
155
+  },
156
+  methods: {
157
+    ...mapCalendarActions([
158
+      'getCalendarList',
159
+      'changeCalendarStatus',
160
+    ]),
161
+    search () {
162
+      this.postData.page = 1
163
+      this.getList()
164
+    },
165
+    getList () {
166
+      this.getCalendarList(this.postData)
167
+    },
168
+    handleCurrentChange (val) {
169
+      this.getList()
170
+    },
171
+    exportExcel () {
172
+      window.open(`${this.toolClass.ReplaceOrg(this.$api.activityManager.calendarExcel.url)}?token=${localStorage.getItem('JWT')}&name=${this.postData.name}&phone=${this.postData.phone}&makeStatus=${this.postData.makeStatus}`, '_blank')
173
+    },
174
+    finishStatus (id) {
175
+      this.$confirm('确认批量完成数据?', '提示', {
176
+        confirmButtonText: '确定',
177
+        cancelButtonText: '取消',
178
+        type: 'warning'
179
+      }).then(() => {
180
+        this.changeCalendar(id)
181
+      })
182
+    },
183
+    finishStatusMore () {
184
+      var ids = this.selids.join()
185
+      if (ids === '') {
186
+        this.$message({
187
+          message: '请先选择需要完成的记录',
188
+          type: 'error'
189
+        })
190
+        return
191
+      }
192
+      this.$confirm('确认批量完成数据?', '提示', {
193
+        confirmButtonText: '确定',
194
+        cancelButtonText: '取消',
195
+        type: 'warning'
196
+      }).then(() => {
197
+        this.changeCalendar(ids)
198
+      })
199
+    },
200
+    changeCalendar (ids) {
201
+      this.changeCalendarStatus({ids}).then(() => {
202
+        this.getList()
203
+        this.selids = []
204
+      })
205
+    },
206
+    downUserPic (id, type) {
207
+      var url = this.$api.activityManager.downCalendarPic.url
208
+      url = url.replace(':calendarId', id).replace(':imgType', type)
209
+      window.open(`${this.toolClass.ReplaceOrg(url)}?token=${localStorage.getItem('JWT')}`, '_blank')
210
+    },
211
+  },
212
+}
213
+</script>
214
+
215
+<!-- Add "scoped" attribute to limit CSS to this component only -->
216
+<style lang="scss" scoped>
217
+@import "page.scss";
218
+</style>
219
+
220
+<style>
221
+.item_tmp .el-checkbox__label{
222
+  font-size: 0;
223
+  color: transparent;
224
+}
225
+</style>

+ 65
- 0
src/pages/system/calendarManager/calendar/page.scss 查看文件

@@ -0,0 +1,65 @@
1
+
2
+// 活动列表 标题
3
+.title{
4
+  font-size: 28px;
5
+  color: darkgray;
6
+  width: 100%;
7
+  border-bottom: 1px solid darkgray;
8
+  padding-left: 30px;
9
+  padding-top: 20px;
10
+  padding-bottom: 20px;
11
+}
12
+
13
+// 头部div
14
+.head-div {
15
+  width: 100%;
16
+  margin-left: 30px;
17
+  margin-right: 30px;
18
+  padding-top: 30px;
19
+}
20
+
21
+.button-div {
22
+  width: 100%;
23
+  margin-left: 30px;
24
+  margin-right: 30px;
25
+  margin-bottom: 30px;
26
+  float: right;
27
+}
28
+// 表格 div
29
+.content {
30
+  width: 100%;
31
+  margin-left: 30px;
32
+  margin-right: 30px;
33
+}
34
+// 活动列表 标题
35
+.title{
36
+  font-size: 28px;
37
+  color: darkgray;
38
+  width: 100%;
39
+  border-bottom: 1px solid darkgray;
40
+  padding-left: 30px;
41
+  padding-top: 20px;
42
+  padding-bottom: 20px;
43
+}
44
+
45
+// 头部div
46
+.head-div {
47
+  width: 100%;
48
+  margin-left: 30px;
49
+  margin-right: 30px;
50
+  padding-top: 30px;
51
+}
52
+
53
+.button-div {
54
+  width: 100%;
55
+  margin-left: 30px;
56
+  margin-right: 30px;
57
+  margin-bottom: 30px;
58
+  float: right;
59
+}
60
+// 表格 div
61
+.content {
62
+  width: 100%;
63
+  margin-left: 30px;
64
+  margin-right: 30px;
65
+}

+ 19
- 0
src/pages/system/calendarManager/index.vue 查看文件

@@ -0,0 +1,19 @@
1
+<template>
2
+  <div class="mainPage">
3
+    <router-view></router-view>
4
+  </div>
5
+</template>
6
+
7
+<script>
8
+export default {
9
+  name: '',
10
+  data () {
11
+    return {}
12
+  },
13
+  components: {}
14
+}
15
+</script>
16
+
17
+<!-- Add "scoped" attribute to limit CSS to this component only -->
18
+<style lang="scss" scoped>
19
+</style>

+ 99
- 0
src/pages/system/marketingActivities/listOfLotteryActivities/edit.vue 查看文件

@@ -52,6 +52,23 @@
52 52
                   </div>
53 53
                 </div>
54 54
               </li>
55
+              <li class="flex-h">
56
+                <span>活动主图:<em>*</em></span>
57
+                <div class="flex-item">
58
+                  <div>
59
+                    <el-upload
60
+                      class="avatar-uploader"
61
+                      action='string'
62
+                      :before-upload="toolClass.beforeUpload"
63
+                      :http-request="toolClass.upload"
64
+                      :show-file-list="false"
65
+                      :on-success="handleMainImgSuccess">
66
+                      <img v-if="postData.ActivityMainImg" :src="postData.ActivityMainImg" class="avatar">
67
+                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
68
+                    </el-upload>
69
+                  </div>
70
+                </div>
71
+              </li>
55 72
               <li class="flex-h">
56 73
                 <span>活动时间:<em>*</em></span>
57 74
                 <div class="flex-item">
@@ -129,6 +146,49 @@
129 146
                   </div>
130 147
                 </div>
131 148
               </li>
149
+              <li class="flex-h">
150
+                <span>分享标题:<em>*</em></span>
151
+                <div class="flex-item">
152
+                  <div style="width:50%">
153
+                    <el-input
154
+                      :disabled="isread"
155
+                      placeholder="请输入分享标题"
156
+                      v-model="postData.ActivityTitle"
157
+                      clearable>
158
+                    </el-input>
159
+                  </div>
160
+                </div>
161
+              </li>
162
+              <li class="flex-h">
163
+                <span>分享图片:<em>*</em></span>
164
+                <div class="flex-item">
165
+                  <div>
166
+                    <el-upload
167
+                      class="avatar-uploader"
168
+                      action='string'
169
+                      :before-upload="toolClass.beforeUpload"
170
+                      :http-request="toolClass.upload"
171
+                      :show-file-list="false"
172
+                      :on-success="handleShareImgSuccess">
173
+                      <img v-if="postData.ShareImg" :src="postData.ShareImg" class="avatar">
174
+                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
175
+                    </el-upload>
176
+                  </div>
177
+                </div>
178
+              </li>
179
+              <li class="flex-h">
180
+                <span>分享文案:<em>*</em></span>
181
+                <div class="flex-item">
182
+                  <div style="width:50%">
183
+                    <el-input
184
+                      :disabled="isread"
185
+                      placeholder="请输入分享文案"
186
+                      v-model="postData.ShareContent"
187
+                      clearable>
188
+                    </el-input>
189
+                  </div>
190
+                </div>
191
+              </li>
132 192
             </ul>
133 193
           </div>
134 194
           <div :hidden="activeIndex !== 1">
@@ -645,6 +705,11 @@ export default {
645 705
         IsInternalDefault: 1, // 奖品内定
646 706
         Prizes: [], // 奖品内定表格数据
647 707
         Imgs: [], // 活动模板背景图
708
+
709
+        ActivityMainImg: '',
710
+        ShareImg: '',
711
+        ActivityTitle: '',
712
+        ShareContent: '',
648 713
       },
649 714
       templateList: [], // 抽奖活动模板
650 715
       templateActiveIndex: 0, // 活动模板选中索引值
@@ -834,6 +899,13 @@ export default {
834 899
         })
835 900
         return false
836 901
       }
902
+      if (this.postData.ImgUrl === '') {
903
+        this.$message({
904
+          type: 'error',
905
+          message: '请先上传活动主图'
906
+        })
907
+        return false
908
+      }
837 909
       if (this.postData.BeginDate === '') {
838 910
         this.$message({
839 911
           type: 'error',
@@ -862,6 +934,27 @@ export default {
862 934
         })
863 935
         return false
864 936
       }
937
+      if (this.postData.ActivityTitle === '') {
938
+        this.$message({
939
+          type: 'error',
940
+          message: '分享标题不能为空'
941
+        })
942
+        return false
943
+      }
944
+      if (this.postData.ShareImg === '') {
945
+        this.$message({
946
+          type: 'error',
947
+          message: '请先上传分享图片'
948
+        })
949
+        return false
950
+      }
951
+      if (this.postData.ShareContent === '') {
952
+        this.$message({
953
+          type: 'error',
954
+          message: '分享文案不能为空'
955
+        })
956
+        return false
957
+      }
865 958
       if (!this.postData.Prizes.length) {
866 959
         this.$message({
867 960
           type: 'error',
@@ -1193,6 +1286,12 @@ export default {
1193 1286
     handleAvatarSuccess (res, file) { // 添加奖品图片
1194 1287
       this.addPrizeInfo.PrizeImg = res.result.url
1195 1288
     },
1289
+    handleMainImgSuccess (res, file) {
1290
+      this.postData.ActivityMainImg = res.result.url
1291
+    },
1292
+    handleShareImgSuccess (res, file) {
1293
+      this.postData.ShareImg = res.result.url
1294
+    },
1196 1295
     cardCouponChange () { // 切换选取卡券类型
1197 1296
       this.addPrizeInfo.Stock = ''
1198 1297
       this.addPrizeInfo.CouponCardId = ''

+ 7
- 0
src/pages/system/marketingActivities/listOfLotteryActivities/index.vue 查看文件

@@ -235,6 +235,8 @@
235 235
         <el-button
236 236
           type="primary"
237 237
           @click="searchRecordList">搜索</el-button>
238
+          <el-button
239
+          type="success" @click="exportExcel">导出Excel</el-button>
238 240
       </div>
239 241
       <div style="border:1px solid #eee;border-bottom:none;margin-top:20px;">
240 242
         <el-table
@@ -545,6 +547,11 @@ export default {
545 547
       this.total = 1
546 548
       this.getList()
547 549
     },
550
+    exportExcel () {
551
+      var url = this.$api.activityManager.excelActivity.url
552
+      url = url.replace(':id', this.currentRecordId)
553
+      window.open(`${this.toolClass.ReplaceOrg(url)}?token=${localStorage.getItem('JWT')}&tel=` + this.recordsPostData.tel, '_blank')
554
+    },
548 555
   },
549 556
 }
550 557
 </script>

+ 99
- 0
src/pages/system/marketingActivities/snapUpList/edit.vue 查看文件

@@ -36,6 +36,23 @@
36 36
                   </div>
37 37
                 </div>
38 38
               </li>
39
+              <li class="flex-h">
40
+                <span>活动主图:<em>*</em></span>
41
+                <div class="flex-item">
42
+                  <div>
43
+                    <el-upload
44
+                      class="avatar-uploader"
45
+                      action='string'
46
+                      :before-upload="toolClass.beforeUpload"
47
+                      :http-request="toolClass.upload"
48
+                      :show-file-list="false"
49
+                      :on-success="handleMainImgSuccess">
50
+                      <img v-if="postData.ActivityMainImg" :src="postData.ActivityMainImg" class="avatar">
51
+                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
52
+                    </el-upload>
53
+                  </div>
54
+                </div>
55
+              </li>
39 56
               <li class="flex-h">
40 57
                 <span>活动名额:<em>*</em></span>
41 58
                 <div class="flex-item">
@@ -96,6 +113,49 @@
96 113
                   </div>
97 114
                 </div>
98 115
               </li>
116
+              <li class="flex-h">
117
+                <span>分享标题:<em>*</em></span>
118
+                <div class="flex-item">
119
+                  <div style="width:50%">
120
+                    <el-input
121
+                      :disabled="isread"
122
+                      placeholder="请输入分享标题"
123
+                      v-model="postData.ActivityTitle"
124
+                      clearable>
125
+                    </el-input>
126
+                  </div>
127
+                </div>
128
+              </li>
129
+              <li class="flex-h">
130
+                <span>分享图片:<em>*</em></span>
131
+                <div class="flex-item">
132
+                  <div>
133
+                    <el-upload
134
+                      class="avatar-uploader"
135
+                      action='string'
136
+                      :before-upload="toolClass.beforeUpload"
137
+                      :http-request="toolClass.upload"
138
+                      :show-file-list="false"
139
+                      :on-success="handleShareImgSuccess">
140
+                      <img v-if="postData.ShareImg" :src="postData.ShareImg" class="avatar">
141
+                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
142
+                    </el-upload>
143
+                  </div>
144
+                </div>
145
+              </li>
146
+              <li class="flex-h">
147
+                <span>分享文案:<em>*</em></span>
148
+                <div class="flex-item">
149
+                  <div style="width:50%">
150
+                    <el-input
151
+                      :disabled="isread"
152
+                      placeholder="请输入分享文案"
153
+                      v-model="postData.ShareContent"
154
+                      clearable>
155
+                    </el-input>
156
+                  </div>
157
+                </div>
158
+              </li>
99 159
               <li class="flex-h">
100 160
                 <span>参与类型:<em>*</em></span>
101 161
                 <div class="flex-item">
@@ -186,6 +246,11 @@ export default {
186 246
         ValidateEnd: '', // 有效期截止时间
187 247
         ValidateType: 'days', // 核销类型
188 248
         FlashBuyStatus: 'inactive', // 活动状态
249
+
250
+        ActivityMainImg: '',
251
+        ShareImg: '',
252
+        ActivityTitle: '',
253
+        ShareContent: '',
189 254
       },
190 255
       editorOption: {
191 256
       },
@@ -299,6 +364,13 @@ export default {
299 364
         })
300 365
         return false
301 366
       }
367
+      if (this.postData.ImgUrl === '') {
368
+        this.$message({
369
+          type: 'error',
370
+          message: '请先上传活动主图'
371
+        })
372
+        return false
373
+      }
302 374
       if (this.postData.FlashBuyMaxAttendant === '' || this.postData.FlashBuyMaxAttendant - 0 <= 0 || (this.postData.FlashBuyMaxAttendant - 0) % 1 !== 0) {
303 375
         this.$message({
304 376
           type: 'error',
@@ -334,6 +406,27 @@ export default {
334 406
         })
335 407
         return false
336 408
       }
409
+      if (this.postData.ActivityTitle === '') {
410
+        this.$message({
411
+          type: 'error',
412
+          message: '分享标题不能为空'
413
+        })
414
+        return false
415
+      }
416
+      if (this.postData.ShareImg === '') {
417
+        this.$message({
418
+          type: 'error',
419
+          message: '请先上传分享图片'
420
+        })
421
+        return false
422
+      }
423
+      if (this.postData.ShareContent === '') {
424
+        this.$message({
425
+          type: 'error',
426
+          message: '分享文案不能为空'
427
+        })
428
+        return false
429
+      }
337 430
       if (this.postData.ValidateType === 'days') {
338 431
         if (this.postData.ValidateDays - 0 <= 0 || (this.postData.ValidateDays - 0) % 1 !== 0) {
339 432
           this.$message({
@@ -380,6 +473,12 @@ export default {
380 473
     reback () {
381 474
       this.$router.push({ name: 'snapUpList' })
382 475
     },
476
+    handleMainImgSuccess (res, file) {
477
+      this.postData.ActivityMainImg = res.result.url
478
+    },
479
+    handleShareImgSuccess (res, file) {
480
+      this.postData.ShareImg = res.result.url
481
+    },
383 482
   },
384 483
 }
385 484
 </script>

+ 7
- 0
src/pages/system/marketingActivities/snapUpList/index.vue 查看文件

@@ -132,6 +132,8 @@
132 132
         <el-button
133 133
           type="primary"
134 134
           @click="searchRecordList">搜索</el-button>
135
+        <el-button
136
+          type="success" @click="exportExcel">导出Excel</el-button>
135 137
       </div>
136 138
       <div style="border:1px solid #eee;border-bottom:none;margin-top:20px;">
137 139
         <el-table
@@ -356,6 +358,11 @@ export default {
356 358
     addSnapUpList () {
357 359
       this.$router.push({ name: 'addSnapUpList' })
358 360
     },
361
+    exportExcel () {
362
+      var url = this.$api.activityManager.excelFlashbuy.url
363
+      url = url.replace(':id', this.currentFlashbuyId)
364
+      window.open(`${this.toolClass.ReplaceOrg(url)}?token=${localStorage.getItem('JWT')}&phone=` + this.flashbuyPostData.phone, '_blank')
365
+    },
359 366
   },
360 367
 }
361 368
 </script>

+ 7
- 0
src/pages/system/page.js 查看文件

@@ -125,6 +125,8 @@ import editLotteryActivities from './marketingActivities/listOfLotteryActivities
125 125
 import snapUpList from './marketingActivities/snapUpList/index' // 抢购活动列表
126 126
 import addSnapUpList from './marketingActivities/snapUpList/edit' // 新增抢购活动
127 127
 import editSnapUpList from './marketingActivities/snapUpList/edit' // 编辑抢购活动
128
+import calendarList from './calendarManager/calendar/index' // 定制活动
129
+
128 130
 
129 131
 import healthManager from './healthManager/index' // 健康管理
130 132
 import healthRecord from './healthManager/healthRecord/index' // 体检记录列表
@@ -693,6 +695,11 @@ export default {
693 695
             component: editSnapUpList,
694 696
             children: []
695 697
           }]
698
+        }, { // 定制活动
699
+          path: 'calendarList',
700
+          name: 'calendarList',
701
+          component: calendarList,
702
+          children:[]
696 703
         }]
697 704
       }, { // 健康管理
698 705
         path: 'healthManager',

+ 41
- 0
src/store/activityManager/calendar.js 查看文件

@@ -0,0 +1,41 @@
1
+import ajax from '../../util/ajax'
2
+import api from '../../util/api'
3
+
4
+export default {
5
+  namespaced: true,
6
+  state: {
7
+    CalendarList: [],
8
+  },
9
+  mutations: {
10
+    UpdateCalendarList (state, payload) {
11
+      state.CalendarList = payload || []
12
+    },
13
+  },
14
+  actions: {
15
+    getCalendarList ({ commit }, payload) { // 获取日历活动列表
16
+      return new Promise((resolve, reject) => {
17
+        ajax(api.activityManager.getCalendarList.url, {
18
+          method: api.activityManager.getCalendarList.method,
19
+          queryData: {
20
+            ...payload,
21
+          }
22
+        }).then(res => {
23
+          commit('UpdateCalendarList', res)
24
+          resolve(res)
25
+        }).catch(reject)
26
+      })
27
+    },
28
+    changeCalendarStatus ({ commit }, payload) {
29
+      return new Promise((resolve, reject) => {
30
+        ajax(api.activityManager.calendarStausChange.url, {
31
+          method: api.activityManager.calendarStausChange.method,
32
+          urlData: {
33
+            calendarIds: payload.ids
34
+          }
35
+        }).then(res => {
36
+          resolve(res)
37
+        }).catch(reject)
38
+      })
39
+    }
40
+  },
41
+}

+ 1
- 0
src/store/index.js 查看文件

@@ -40,6 +40,7 @@ export const modules = {
40 40
   luckDraw: () => require('./luckDraw/luckDraw').default,
41 41
   activityLuckDraw: () => require('./activityManager/luckDraw').default,
42 42
   activityFlashbuy: () => require('./activityManager/flashbuy').default,
43
+  calendar: () => require('./activityManager/calendar').default,
43 44
 }
44 45
 
45 46
 Object.keys(modules).forEach((modKey) => {

+ 24
- 0
src/util/api.js 查看文件

@@ -877,6 +877,10 @@ const $api = {
877 877
       method: 'put',
878 878
       url: `${baseUrl}${common}/luckdraw/:id/stop`
879 879
     },
880
+    excelActivity: { // 导出Excel
881
+      method: 'get',
882
+      url: `${baseUrl}${common}/luckdraw/excel/:id`
883
+    },
880 884
     getFlashbuyTemplateList: { // 营销活动-获取抢购模板列表
881 885
       method: 'get',
882 886
       url: `${baseUrl}${common}/flashbuy/model`
@@ -909,6 +913,10 @@ const $api = {
909 913
       method: 'put',
910 914
       url: `${baseUrl}${common}/flashbuy/:id/:status`
911 915
     },
916
+    excelFlashbuy: {
917
+      method: 'get',
918
+      url: `${baseUrl}${common}/flashbuy/excel/:id`
919
+    },
912 920
     getCardListByCaseId: { // 获取案场下卡列表
913 921
       method: 'get',
914 922
       url: `${baseUrl}${common}/card/sys/:id`
@@ -917,6 +925,22 @@ const $api = {
917 925
       method: 'get',
918 926
       url: `${baseUrl}${common}/coupon/sys/:id`
919 927
     },
928
+    getCalendarList: {
929
+      method: 'get',
930
+      url: `${baseUrl}${common}/calendar`
931
+    },
932
+    calendarExcel: {
933
+      method: 'get',
934
+      url: `${baseUrl}${common}/calendar/excel`
935
+    },
936
+    calendarStausChange: {
937
+      method: 'put',
938
+      url: `${baseUrl}${common}/calendar/:calendarIds`
939
+    },
940
+    downCalendarPic: {
941
+      method: 'get',
942
+      url: `${baseUrl}${common}/calendar/:calendarId/:imgType`
943
+    },
920 944
   },
921 945
   record: {
922 946
     getRecordList: {