瀏覽代碼

Merge branch 'dev' of http://git.ycjcjy.com/SpaceOfCheng/admin into dev

wangfei 6 年之前
父節點
當前提交
c500142916

+ 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><title>城的空间后台管理系统</title><link href=./static/css/app.2cdb845c0d5d55c26614acbd6458e5d7.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.992319e39e0ff64940a3.js></script><script type=text/javascript src=./static/js/app.7d24608c728c729ad3a2.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.8aa2dac72d3912673a3cbcb45c0b9b26.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.992319e39e0ff64940a3.js></script><script type=text/javascript src=./static/js/app.196328bf2a5080433653.js></script></body></html>

+ 1
- 0
index.html 查看文件

@@ -4,6 +4,7 @@
4 4
     <meta charset="utf-8">
5 5
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
6 6
     <link rel="stylesheet" href="//at.alicdn.com/t/font_775069_dwqa9wy3lkh.css">
7
+    <link rel="shortcut icon" href="favorite.ico">
7 8
     <title>城的空间后台管理系统</title>
8 9
   </head>
9 10
   <body>

+ 1
- 16
src/pages/login/index.vue 查看文件

@@ -26,21 +26,6 @@
26 26
         <i class="iconfont" :class="{'icon-ic_check_box_outline_blank': !remberAccount, 'icon-md-checkbox-outline': remberAccount, 'active': remberAccount}" @click="triggerRember"></i>
27 27
       </div>
28 28
       <a class="btn" @click="toLogin">登 录</a>
29
-      <!-- <div class="top">
30
-        <i class="iconfont icon-yinchenglogo"></i>
31
-        <span>城的空间 · 登录</span>
32
-      </div>
33
-      <div class="login">
34
-        <input type="text" v-model="account" placeholder="请输入账号">
35
-        <input type="password" v-model="password" placeholder="请输入密码">
36
-        <div>
37
-          <label :class="{'active':remberAccount}" @click="triggerRember">
38
-            <i class="iconfont icon-gouxuan"></i>
39
-            <span onselectstart="return false">记住账号密码</span>
40
-          </label>
41
-        </div>
42
-        <a class="btn" @click="toLogin">登 录</a>
43
-      </div> -->
44 29
     </div>
45 30
   </div>
46 31
 </template>
@@ -100,7 +85,7 @@ export default {
100 85
         document.onkeydown = function (event) {}
101 86
         this.saveToken(res.token)
102 87
         this.$message({
103
-          message: '登成功',
88
+          message: '登成功',
104 89
           type: 'success',
105 90
           duration: 1000
106 91
         })

+ 15
- 3
src/pages/system/cardAndCouponManager/cardManager/edit.vue 查看文件

@@ -110,7 +110,7 @@
110 110
                   :disabled="item.Status !== 1">
111 111
                 </el-option>
112 112
               </el-select>
113
-              <span v-else>{{cardInfo.Targets[0].TargetName}}</span>
113
+              <span v-else style="line-height: 40px;">{{cardInfo.Targets[0].TargetName}}</span>
114 114
             </div>
115 115
           </div>
116 116
         </li>
@@ -279,6 +279,10 @@ export default {
279 279
                   pagesize: 10000
280 280
                 }).then((res) => {
281 281
                   this.cardInfo = aRes.Card
282
+                  if (aRes.Card.StartDate === '0001-01-01T00:00:00Z' || aRes.Card.StartDate === '') {
283
+                    this.cardInfo.StartDate = ''
284
+                    this.cardInfo.EndDate = ''
285
+                  }
282 286
                   if (aRes.Card.VideoUrl) {
283 287
                     this.videoOff = true
284 288
                   }
@@ -287,12 +291,18 @@ export default {
287 291
                       CardImageUrl: ''
288 292
                     }]
289 293
                   }
290
-                  if (aRes.Card.StartDate) {
294
+                  if (aRes.Card.StartDate !== '0001-01-01T00:00:00Z' && aRes.Card.StartDate !== '') {
291 295
                     this.date = [aRes.Card.StartDate, aRes.Card.EndDate]
296
+                  } else {
297
+                    this.date = ['', '']
292 298
                   }
293 299
                 })
294 300
               } else {
295 301
                 this.cardInfo = res.Card
302
+                if (aRes.Card.StartDate === '0001-01-01T00:00:00Z' || aRes.Card.StartDate === '') {
303
+                  this.cardInfo.StartDate = ''
304
+                  this.cardInfo.EndDate = ''
305
+                }
296 306
                 if (res.Card.VideoUrl) {
297 307
                   this.videoOff = true
298 308
                 }
@@ -301,8 +311,10 @@ export default {
301 311
                     CardImageUrl: ''
302 312
                   }]
303 313
                 }
304
-                if (res.Card.StartDate) {
314
+                if (aRes.Card.StartDate !== '0001-01-01T00:00:00Z' && aRes.Card.StartDate !== '') {
305 315
                   this.date = [res.Card.StartDate, res.Card.EndDate]
316
+                } else {
317
+                  this.date = ['', '']
306 318
                 }
307 319
               }
308 320
             })

+ 4
- 4
src/pages/system/cardAndCouponManager/cardManager/index.vue 查看文件

@@ -382,19 +382,19 @@ export default {
382 382
     //   this.copyDialogVisible = true
383 383
     // },
384 384
     toCopy (index, row) { // 复制
385
-      console.log(1)
385
+      // console.log(1)
386 386
       var clipboard = new Clipboard(this.$refs['copy' + index])
387 387
       clipboard.on('success', e => {
388
-        console.log('复制成功')
388
+        // console.log('复制成功')
389 389
         clipboard.destroy()
390 390
       })
391 391
       clipboard.on('error', e => {
392
-        console.log('该浏览器不支持自动复制')
392
+        // console.log('该浏览器不支持自动复制')
393 393
         clipboard.destroy()
394 394
       })
395 395
     },
396 396
     addCard () {
397
-      this.$router.push({ name: 'editCard', query: {} })
397
+      this.$router.push({ name: 'addCard', query: {} })
398 398
     },
399 399
     onCopy () {
400 400
       this.$message({

+ 47
- 13
src/pages/system/cardAndCouponManager/couponManager/edit.vue 查看文件

@@ -117,12 +117,12 @@
117 117
           <span>目标商品:<em>*</em></span>
118 118
           <div class="flex-item">
119 119
             <div>
120
-              <el-radio v-model="couponInfo.IsAll" label="1" :disabled="isEdit">全部商品</el-radio>
121
-              <el-radio v-model="couponInfo.IsAll" label="0" :disabled="isEdit">指定商品</el-radio>
120
+              <el-radio v-model="couponInfo.IsAll" :label="1" :disabled="isEdit">全部商品</el-radio>
121
+              <el-radio v-model="couponInfo.IsAll" :label="0" :disabled="isEdit">指定商品</el-radio>
122 122
             </div>
123 123
           </div>
124 124
         </li>
125
-        <li class="flex-h" v-if="couponInfo.IsAll === '0'">
125
+        <li class="flex-h" v-if="couponInfo.IsAll === 0">
126 126
           <div class="flex-item">
127 127
             <div style="border: 1px solid #eee;">
128 128
               <el-table
@@ -160,7 +160,7 @@
160 160
           <div class="flex-item">
161 161
             <div>
162 162
               <div class="addLine flex-h" style="align-item:center;margin-bottom:20px;">
163
-                <el-radio v-model="postData.TimeType" label="1" :disabled="isEdit">固定时间</el-radio>
163
+                <el-radio v-model="TimeType" :label="1" :disabled="isEdit">固定时间</el-radio>
164 164
                 <el-date-picker
165 165
                   value-format="yyyy-MM-ddT00:00:00+08:00"
166 166
                   :disabled="isEdit"
@@ -180,7 +180,7 @@
180 180
                 </el-date-picker>
181 181
               </div>
182 182
               <div class="addLine flex-h" style="align-item:center;">
183
-                <el-radio v-model="postData.TimeType" label="2" :disabled="isEdit">领取后</el-radio>
183
+                <el-radio v-model="TimeType" :label="2" :disabled="isEdit">领取后</el-radio>
184 184
                 <span style="width:100px;">
185 185
                   <el-input
186 186
                     :disabled="isEdit"
@@ -396,13 +396,14 @@ export default {
396 396
         Name: 'ccc',
397 397
         Type: 'xxx'
398 398
       }], // 指定商品数据
399
+      TimeType: 1,
399 400
       couponInfo: {
400 401
         CaseId: '',
401 402
         CouponName: '',
402 403
         CouponType: '',
403 404
         Price: '',
404 405
         TotalCount: '',
405
-        SendType: '',
406
+        SendType: 'system',
406 407
         IsAll: 1,
407 408
         StartDate: '',
408 409
         EndDate: '',
@@ -446,18 +447,28 @@ export default {
446 447
                   page: 1,
447 448
                   pagesize: 10000
448 449
                 }).then((res) => {
449
-                  aRes.coupon.IsAll = String(aRes.coupon.IsAll)
450 450
                   if (aRes.coupon.VideoUrl !== '') {
451 451
                     this.videoOff = true
452 452
                   }
453 453
                   this.couponInfo = aRes.coupon
454
+                  if (aRes.coupon.StartDate === '0001-01-01T00:00:00Z' || aRes.coupon.StartDate === '') {
455
+                    this.couponInfo.StartDate = ''
456
+                  }
457
+                  if (aRes.coupon.EndDate === '0001-01-01T00:00:00Z' || aRes.coupon.EndDate === '') {
458
+                    this.couponInfo.EndDate = ''
459
+                  }
454 460
                 })
455 461
               } else {
456
-                res.coupon.IsAll = String(res.coupon.IsAll)
457 462
                 if (res.coupon.VideoUrl !== '') {
458 463
                   this.videoOff = true
459 464
                 }
460 465
                 this.couponInfo = res.coupon
466
+                if (aRes.coupon.StartDate === '0001-01-01T00:00:00Z' || aRes.coupon.StartDate === '') {
467
+                  this.couponInfo.StartDate = ''
468
+                }
469
+                if (aRes.coupon.EndDate === '0001-01-01T00:00:00Z' || aRes.coupon.EndDate === '') {
470
+                  this.couponInfo.EndDate = ''
471
+                }
461 472
               }
462 473
             })
463 474
           }
@@ -594,6 +605,9 @@ export default {
594 605
     },
595 606
     couponTypeChange () {
596 607
       this.couponInfo.Targets = []
608
+      if (this.couponInfo.CouponType === 'course') {
609
+        this.TimeType = 1
610
+      }
597 611
     },
598 612
     addGoods () { // 添加指定商品
599 613
       if (this.couponInfo.CouponType === 'goods') {
@@ -698,6 +712,27 @@ export default {
698 712
         })
699 713
         return false
700 714
       }
715
+      if (this.couponInfo.CouponType === 'goods') {
716
+        if (this.TimeType === 1 && this.couponInfo.StartDate === '') {
717
+          this.$message({
718
+            type: 'error',
719
+            message: '开始时间不能为空'
720
+          })
721
+          return false
722
+        } else if (this.TimeType === 1 && this.couponInfo.EndDate === '') {
723
+          this.$message({
724
+            type: 'error',
725
+            message: '截止时间不能为空'
726
+          })
727
+          return false
728
+        } else if (this.TimeType === 2 && this.couponInfo.ValidDays === '') {
729
+          this.$message({
730
+            type: 'error',
731
+            message: '领取后天数不能为空'
732
+          })
733
+          return false
734
+        }
735
+      }
701 736
       if (this.couponInfo.Share.CouponShareInfo === '') {
702 737
         this.$message({
703 738
           type: 'error',
@@ -736,12 +771,11 @@ export default {
736 771
           TotalCount: this.couponInfo.TotalCount - 0,
737 772
           ValidDays: this.couponInfo.ValidDays - 0 || 0
738 773
         }).then((res) => {
739
-          this.$alert('操作成功', '提示', {
740
-            confirmButtonText: '确定',
741
-            callback: action => {
742
-              this.$router.push({ name: 'couponList' })
743
-            }
774
+          this.$message({
775
+            type: 'success',
776
+            message: '操作成功'
744 777
           })
778
+          this.$router.push({ name: 'couponList' })
745 779
         })
746 780
       } else {
747 781
         if (!this.checkInfo()) {

+ 1
- 1
src/pages/system/cardAndCouponManager/couponManager/index.vue 查看文件

@@ -338,7 +338,7 @@ export default {
338 338
       })
339 339
     },
340 340
     addCoupon (val) {
341
-      this.$router.push({ name: 'editCoupon', query: { type: val } })
341
+      this.$router.push({ name: 'addCoupon', query: { type: val } })
342 342
     },
343 343
     ForCustomer () {
344 344
       if (this.selUsers === '') {

+ 1
- 1
src/pages/system/cardAndCouponManager/vipManager/index.vue 查看文件

@@ -174,7 +174,7 @@ export default {
174 174
       this.getList()
175 175
     },
176 176
     addVIP () {
177
-      this.$router.push({ name: 'editVip' })
177
+      this.$router.push({ name: 'addVip' })
178 178
     },
179 179
     activateVip () {
180 180
       this.$router.push({ name: 'activateVip' })

+ 1
- 1
src/pages/system/caseManager/deviceManager/index.vue 查看文件

@@ -154,7 +154,7 @@ export default {
154 154
       this.getList()
155 155
     },
156 156
     addRole () {
157
-      this.$router.push({ name: 'editDevice' })
157
+      this.$router.push({ name: 'addDevice' })
158 158
     },
159 159
   },
160 160
 }

+ 1
- 1
src/pages/system/cmsManager/majorProjects/edit.vue 查看文件

@@ -361,7 +361,7 @@ export default {
361 361
       this.GetCaseInfo({ id: this.id })
362 362
     },
363 363
     getCourse () {
364
-      this.GetCourseList({ caseid: this.CaseId === 'all' ? '' : this.CaseId, ...this.postData, callback: this.coursesShow }).then((res) => {
364
+      this.GetCourseList({ caseid: this.CaseId === 'all' ? '' : this.CaseId, ...this.postData }).then((res) => {
365 365
         this.postData.page = res.page
366 366
         this.total = res.pagenum
367 367
       })

+ 1
- 1
src/pages/system/cmsManager/majorProjects/index.vue 查看文件

@@ -170,7 +170,7 @@ export default {
170 170
       this.getList()
171 171
     },
172 172
     addMajorProjects () {
173
-      this.$router.push({ name: 'editIndexCase' })
173
+      this.$router.push({ name: 'addIndexCase' })
174 174
     },
175 175
     getList () {
176 176
       this.tableData = []

+ 1
- 1
src/pages/system/courseManager/courseList/add.vue 查看文件

@@ -386,7 +386,7 @@ export default {
386 386
     }
387 387
   },
388 388
   mounted () {
389
-    this.updateLocationInfo(false)
389
+    this.updateLocationInfo({issys: 0})
390 390
     this.GetCourseTagList({ pagesize: 100 })
391 391
     const { id } = this.$route.query
392 392
     if (id && id !== '') {

+ 1
- 1
src/pages/system/courseManager/courseList/index.vue 查看文件

@@ -363,7 +363,7 @@ export default {
363 363
       this.getList()
364 364
     },
365 365
     handleEdit (index, row) { // 编辑
366
-      this.$router.push({ name: 'addCourse', query: { id: row.CourseId } })
366
+      this.$router.push({ name: 'editCourse', query: { id: row.CourseId } })
367 367
     },
368 368
     handleDelete (index, row) { // 删除
369 369
       this.$confirm('确认删除此课程?', '提示', {

+ 12
- 11
src/pages/system/dashboard/index.vue 查看文件

@@ -10,27 +10,27 @@
10 10
         </el-option>
11 11
       </el-select>
12 12
     </div>
13
-    <div class="flex-h" v-for="(item,index) in pageData" v-if="pageData.length" :key="index">
13
+    <div class="flex-h" v-for="(item,index) in pageData" v-if="(pageData || []).length" :key="index">
14 14
       <div class="flex-item" v-for="(subItem,subIndex) in item" :key="subIndex" :class="{'listMargin' : subItem.type === 'dashboardList'}">
15 15
         <div v-if="subItem.type === 'dashboardList'">
16 16
           <dashboardList :data="subItem" :index="subIndex"></dashboardList>
17 17
         </div>
18
-        <div v-if="subItem.type === 'histogram' && typeof(subItem.value) === 'object' && subItem.value.length">
18
+        <div v-if="subItem.type === 'histogram' && typeof(subItem.value) === 'object' && (subItem.value || []).length">
19 19
           <histogram :data="subItem" :index="index + '-' + subIndex"></histogram>
20 20
         </div>
21
-        <div v-if="subItem.type === 'pieDiagram' && typeof(subItem.value) === 'object' && subItem.value.length">
21
+        <div v-if="subItem.type === 'pieDiagram' && typeof(subItem.value) === 'object' && (subItem.value || []).length">
22 22
           <pieDiagram :data="subItem" :index="index + '-' + subIndex"></pieDiagram>
23 23
         </div>
24
-        <div v-if="subItem.type === 'brokenLineGraph' && typeof(subItem.value) === 'object' && subItem.value.length">
24
+        <div v-if="subItem.type === 'brokenLineGraph' && typeof(subItem.value) === 'object' && (subItem.value || []).length">
25 25
           <brokenLineGraph :data="subItem" :index="index + '-' + subIndex"></brokenLineGraph>
26 26
         </div>
27
-        <div v-if="subItem.type === 'ringChart' && typeof(subItem.value) === 'object' && subItem.value.length">
27
+        <div v-if="subItem.type === 'ringChart' && typeof(subItem.value) === 'object' && (subItem.value || []).length">
28 28
           <ringChart :data="subItem" :index="index + '-' + subIndex"></ringChart>
29 29
         </div>
30
-        <div v-if="subItem.type === 'dashboard' && typeof(subItem.value) === 'object' && subItem.value.length">
30
+        <div v-if="subItem.type === 'dashboard' && typeof(subItem.value) === 'object' && (subItem.value || []).length">
31 31
           <dashboard :data="subItem" :index="index + '-' + subIndex"></dashboard>
32 32
         </div>
33
-        <div v-if="subItem.type === 'brokenLineGraphGroup' && typeof(subItem.value) === 'object' && subItem.value.length">
33
+        <div v-if="subItem.type === 'brokenLineGraphGroup' && typeof(subItem.value) === 'object' && (subItem.value || []).length">
34 34
           <brokenLineGraphGroup :data="subItem" :index="index + '-' + subIndex"></brokenLineGraphGroup>
35 35
         </div>
36 36
       </div>
@@ -53,7 +53,7 @@
53 53
         <li v-for="(item,index) in bottomNav" :key="index" :class="{'active': bottomActive === index}" @click="bottomActive = index">{{item}}</li>
54 54
       </ul>
55 55
       <div style="height: 400px;" v-if="bottomData.length">
56
-        <div v-for="(item,index) in bottomData" :key="index" v-if="bottomActive === index && bottomData.length">
56
+        <div v-for="(item,index) in bottomData" :key="index" v-if="bottomActive === index && (bottomData || []).length">
57 57
           <brokenLineGraph :data="item.data" :index="'bottomData-' + index"></brokenLineGraph>
58 58
         </div>
59 59
       </div>
@@ -174,12 +174,12 @@ export default {
174 174
         res = res || []
175 175
         for (var n = 0; n < res.length; n++) {
176 176
           this.pageData.push([])
177
-          for (var a = 0; a < res[n].length; a++) {
177
+          for (var a = 0; a < (res[n] || []).length; a++) {
178 178
             if (res[n][a].type !== 'dashboardList' && res[n][a].value === null) res[n][a].value = []
179 179
             this.pageData[n].push(res[n][a])
180 180
           }
181 181
         }
182
-        console.log(JSON.stringify(this.pageData))
182
+        // console.log(JSON.stringify(this.pageData))
183 183
       })
184 184
     },
185 185
     getBottomData (id, type) {
@@ -188,6 +188,7 @@ export default {
188 188
         caseid: id,
189 189
         statype: type
190 190
       }).then((res) => {
191
+        res = res || []
191 192
         for (var n = 0; n < res.length; n++) {
192 193
           this.bottomData.push({
193 194
             type: 'brokenLineGraph',
@@ -198,7 +199,7 @@ export default {
198 199
             }
199 200
           })
200 201
         }
201
-        console.log(JSON.stringify(this.bottomData))
202
+        // console.log(JSON.stringify(this.bottomData))
202 203
       })
203 204
     },
204 205
   }

+ 1
- 1
src/pages/system/dataStatistics/cardCouponUsedList/index.vue 查看文件

@@ -133,7 +133,7 @@
133 133
           label="使用时间"
134 134
           width="140px">
135 135
           <template slot-scope="scope">
136
-            {{toolClass.dateFormat(scope.row.UsedDate)}}
136
+            {{scope.row.UsedDate === '0001-01-01T00:00:00Z' ? '-' : toolClass.dateFormat(scope.row.UsedDate)}}
137 137
           </template>
138 138
         </el-table-column>
139 139
         <el-table-column

+ 1
- 1
src/pages/system/goodsManager/goodManager/index.vue 查看文件

@@ -197,7 +197,7 @@ export default {
197 197
     },
198 198
     addRole () {
199 199
       this.SetNull()
200
-      this.$router.push({ name: 'editGoods' })
200
+      this.$router.push({ name: 'addGoods' })
201 201
     },
202 202
   },
203 203
   created () {

+ 6
- 1
src/pages/system/index.vue 查看文件

@@ -79,7 +79,12 @@ export default {
79 79
     siderBar,
80 80
   },
81 81
   created () {
82
-    this.updateSystemInfo().then(() => this.updateBread({ routerData, Url: this.$route.name }))
82
+    this.updateSystemInfo().then(() => {
83
+      if (!this.pageMenu.length) {
84
+        this.$router.push({name: 'noAccessRight'})
85
+      }
86
+      this.updateBread({ routerData, Url: this.$route.name })
87
+    })
83 88
   },
84 89
   methods: {
85 90
     submitPasswd () { // 修改密码

+ 4
- 22
src/pages/system/marketingActivities/activitiesList/index.vue 查看文件

@@ -5,23 +5,6 @@
5 5
         <div class="flex-item flex-h">
6 6
           <el-button size="mini" type="success" @click="redirection('addActivities')">新增活动</el-button>
7 7
         </div>
8
-        <!-- <ul>
9
-          <li>
10
-            <el-select v-model="CaseId" placeholder="请选择">
11
-              <el-option
12
-                key=""
13
-                label="所有案场"
14
-                value="">
15
-              </el-option>
16
-              <el-option
17
-                v-for="item in cases"
18
-                :key="item.CaseId"
19
-                :label="item.CaseName"
20
-                :value="item.CaseId">
21
-              </el-option>
22
-            </el-select>
23
-          </li>
24
-        </ul> -->
25 8
         <el-button
26 9
           size="mini"
27 10
           type="primary" @click="clickList">搜索</el-button>
@@ -139,10 +122,10 @@ export default {
139 122
       return descjson.giftNum
140 123
     },
141 124
     getActivitName (desc) { // 根据活动类型编号,获取活动名称
142
-      if (desc === '1') {
143
-        return '注册类型'
125
+      if (desc === '1' || desc === 'reigste') {
126
+        return '注册'
144 127
       }
145
-      return '未知类型'
128
+      return '未知'
146 129
     },
147 130
     getGiftLabel (desc) {
148 131
       if (desc === '') {
@@ -152,10 +135,9 @@ export default {
152 135
       return descjson.giftLabel
153 136
     },
154 137
     handleSizeChange (val) {
155
-      console.log(`每页 ${val} 条`)
138
+      // console.log(`每页 ${val} 条`)
156 139
     },
157 140
     handleCurrentChange (val) {
158
-      console.log(`当前页: ${val}`)
159 141
       this.$data.postData.page = val
160 142
       this.getList()
161 143
     },

+ 31
- 4
src/pages/system/marketingActivities/addActivities/index.vue 查看文件

@@ -26,6 +26,21 @@
26 26
           </div>
27 27
         </li>
28 28
         <li class="flex-h">
29
+          <span>活动方式:<em>*</em></span>
30
+          <div class="flex-item">
31
+            <div>
32
+              <el-select v-model="activeType" placeholder="请选择">
33
+                <el-option
34
+                  v-for="item in activeTypeList"
35
+                  :key="item.id"
36
+                  :label="item.value"
37
+                  :value="item.id">
38
+                </el-option>
39
+              </el-select>
40
+            </div>
41
+          </div>
42
+        </li>
43
+        <li class="flex-h" v-if="activeType === 'giveCoupon'">
29 44
           <span>赠券卡券:<em>*</em></span>
30 45
           <div class="flex-item">
31 46
             <div>
@@ -40,7 +55,7 @@
40 55
             </div>
41 56
           </div>
42 57
         </li>
43
-        <li class="flex-h">
58
+        <li class="flex-h" v-if="activeType === 'giveCoupon'">
44 59
           <span>赠券数量:<em>*</em></span>
45 60
           <div class="flex-item">
46 61
             <div style="width:50%">
@@ -85,9 +100,14 @@ export default {
85 100
         Order: '', // 排序
86 101
       },
87 102
       regOptions: [{
88
-        regValue: '1',
89
-        label: '注册类型'
103
+        regValue: 'reigste',
104
+        label: '注册'
105
+      }],
106
+      activeTypeList: [{
107
+        value: '送券',
108
+        id: 'giveCoupon'
90 109
       }],
110
+      activeType: '',
91 111
       regValue: '',
92 112
       giftOptions: [], // [{giftValue: '1',label: '饮品通用券'}, {giftValue: '2',label: '课程通用券'}, {giftValue: '3',label: '小小外交官体验券'}]
93 113
       giftValue: '',
@@ -142,6 +162,13 @@ export default {
142 162
         })
143 163
         return false
144 164
       }
165
+      if (this.activeType === '') {
166
+        this.$message({
167
+          type: 'error',
168
+          message: '活动方式不能为空'
169
+        })
170
+        return false
171
+      }
145 172
       if (this.giftValue === '') {
146 173
         this.$message({
147 174
           type: 'error',
@@ -167,7 +194,7 @@ export default {
167 194
       let jsonString = '{"giftValue":"' + this.$data.giftValue + '","giftLabel":"' + this.$data.giftLabel + '","giftNum":"' + this.$data.giftNum + '","desc":"' + this.$data.desc + '"}'
168 195
       this.$ajax(this.$api.marketingActivities.addMarketing.url, {
169 196
         method: this.$api.marketingActivities.addMarketing.method,
170
-        queryData: { activityName: this.$data.activityName, activityType: this.$data.regValue, resourceDesc: jsonString, CaseId: this.defaultCaseId }
197
+        queryData: { activityName: this.$data.activityName, activityType: this.$data.regValue, activeType: this.activeType, resourceDesc: jsonString, CaseId: this.defaultCaseId }
171 198
       }).then(res => {
172 199
         // console.log(res)
173 200
         this.$message({

+ 23
- 0
src/pages/system/noAccessRight/index.vue 查看文件

@@ -0,0 +1,23 @@
1
+<template>
2
+  <div class="mainPage flex-v">
3
+    <h1 class="centerLabel">暂无权限</h1>
4
+  </div>
5
+</template>
6
+
7
+<script>
8
+export default {
9
+  name: '',
10
+  data () {
11
+    return {}
12
+  },
13
+  methods: {}
14
+}
15
+</script>
16
+
17
+<!-- Add "scoped" attribute to limit CSS to this component only -->
18
+<style lang="scss" scoped>
19
+h1{
20
+  font-size: 30px;
21
+  color: #ccc;
22
+}
23
+</style>

+ 61
- 6
src/pages/system/page.js 查看文件

@@ -1,6 +1,8 @@
1
-
1
+/* eslint-disable */
2 2
 import system from './index' // 系统首页
3 3
 
4
+import noAccessRight from './noAccessRight/index' // 暂无菜单权限
5
+
4 6
 import dashboard from './dashboard/index' // 控制板
5 7
 
6 8
 import systemSet from './systemSet/index' // 系统设置
@@ -15,7 +17,8 @@ import caseInfo from './caseManager/caseInfo/index' // 案场信息
15 17
 import addCase from './caseManager/caseInfo/addCase/index' // 新增案场
16 18
 import editCase from './caseManager/caseInfo/editCase/index' // 新增案场
17 19
 import deviceManager from './caseManager/deviceManager/index' // 体检设备
18
-import editDevice from './caseManager/deviceManager/add' // 添加体检设备
20
+import addDevice from './caseManager/deviceManager/add' // 添加体检设备
21
+import editDevice from './caseManager/deviceManager/add' // 编辑体检设备
19 22
 import pplConcerned from './caseManager/caseInfo/pplConcerned/index' // 相关人员
20 23
 import editPPLConcerned from './caseManager/caseInfo/pplConcerned/editPPLConcerned/index' // 编辑相关人员
21 24
 import keyManager from './caseManager/keyManager/index' // 钥匙管理
@@ -39,6 +42,7 @@ import goodsSpecManager from './goodsManager/goodsSpecManager/index' // 商品
39 42
 import addGoodsSpec from './goodsManager/goodsSpecManager/add' // 新增商品规格
40 43
 import editGoodsSpec from './goodsManager/goodsSpecManager/edit' // 编辑商品规格管理
41 44
 import goodsList from './goodsManager/goodManager/index' // 商品管理
45
+import addGoods from './goodsManager/goodManager/edit' // 商品新增
42 46
 import editGoods from './goodsManager/goodManager/edit' // 商品编辑
43 47
 
44 48
 import cmsManager from './cmsManager/index' // cms管理
@@ -47,6 +51,7 @@ import addBanner from './cmsManager/bannerManager/add' // 添加轮播图
47 51
 import editBanner from './cmsManager/bannerManager/edit' // 编辑轮播图
48 52
 import indexCase from './cmsManager/majorProjects/index' // 售楼处项目专题
49 53
 import editIndexCase from './cmsManager/majorProjects/edit' // 编辑售楼处项目专题
54
+import addIndexCase from './cmsManager/majorProjects/edit' // 新增售楼处项目专题
50 55
 import indexMsg from './cmsManager/indexMsg/index' // 首页消息
51 56
 import addIndexMsg from './cmsManager/indexMsg/add' // 新增首页消息
52 57
 import editIndexMsg from './cmsManager/indexMsg/edit' // 新增首页消息
@@ -65,6 +70,7 @@ import addFiveA from './courseManager/fiveA/add' // 全龄生活5A添加
65 70
 import editFiveA from './courseManager/fiveA/edit' // 全龄生活5A编辑
66 71
 import courseList from './courseManager/courseList/index' // 课程列表
67 72
 import addCourse from './courseManager/courseList/add' // 新增课程
73
+import editCourse from './courseManager/courseList/add' // 新增课程
68 74
 import courseTag from './courseManager/courseTag/index' // 课程标签
69 75
 import scheduleManager from './courseManager/scheduleManager/index' // 排课管理
70 76
 import editSchedule from './courseManager/scheduleManager/edit' // 新增、编辑排课
@@ -92,13 +98,17 @@ import newOrderList from './newOrder/newOrderList/index' // 新订单列表
92 98
 
93 99
 import cardAndCouponManager from './cardAndCouponManager/index' // 卡券管理
94 100
 import cardList from './cardAndCouponManager/cardManager/index' // 卡列表
101
+import addCard from './cardAndCouponManager/cardManager/edit' // 新增卡
95 102
 import editCard from './cardAndCouponManager/cardManager/edit' // 编辑卡
96 103
 import couponList from './cardAndCouponManager/couponManager/index' // 券列表
104
+import addCoupon from './cardAndCouponManager/couponManager/edit' // 新增券
97 105
 import editCoupon from './cardAndCouponManager/couponManager/edit' // 编辑券
98 106
 import bodyBuildingCardManager from './cardAndCouponManager/bodyBuildingCardManager/index' // 健身卡列表
107
+import addBodyBuildingCard from './cardAndCouponManager/bodyBuildingCardManager/edit' // 健身卡新增
99 108
 import editBodyBuildingCard from './cardAndCouponManager/bodyBuildingCardManager/edit' // 健身卡编辑
100 109
 import givingRecords from './cardAndCouponManager/givingRecords' // 赠送记录
101 110
 import vipList from './cardAndCouponManager/vipManager/index' // vip列表
111
+import addVip from './cardAndCouponManager/vipManager/edit' // 新增vip
102 112
 import editVip from './cardAndCouponManager/vipManager/edit' // 编辑vip
103 113
 import activateVip from './cardAndCouponManager/vipManager/activateVip' // 激活vip
104 114
 
@@ -121,7 +131,12 @@ export default {
121 131
       path: '/system',
122 132
       name: 'system',
123 133
       component: system,
124
-      children: [{ // 首页控制板
134
+      children: [{ // 暂无菜单权限
135
+        path: 'noAccessRight',
136
+        name: 'noAccessRight',
137
+        component: noAccessRight,
138
+        children: []
139
+      }, { // 首页控制板
125 140
         path: 'dashboard',
126 141
         name: 'dashboard',
127 142
         component: dashboard,
@@ -190,6 +205,11 @@ export default {
190 205
           name: 'deviceManager',
191 206
           component: deviceManager,
192 207
           children: [{ // 添加体检设备
208
+            path: 'addDevice',
209
+            name: 'addDevice',
210
+            component: addDevice,
211
+            children: []
212
+          }, { // 编辑体检设备
193 213
             path: 'editDevice',
194 214
             name: 'editDevice',
195 215
             component: editDevice,
@@ -294,7 +314,12 @@ export default {
294 314
           path: 'goodsInfo',
295 315
           name: 'goodsInfo',
296 316
           component: goodsList,
297
-          children: [{ // 编辑商品
317
+          children: [{ // 新增商品
318
+            path: 'addGoods',
319
+            name: 'addGoods',
320
+            component: addGoods,
321
+            children: []
322
+          }, { // 编辑商品
298 323
             path: 'editGoods',
299 324
             name: 'editGoods',
300 325
             component: editGoods,
@@ -324,7 +349,12 @@ export default {
324 349
           path: 'indexCase',
325 350
           name: 'indexCase',
326 351
           component: indexCase,
327
-          children: [{ // 编辑售楼处项目专题
352
+          children: [{ // 新增售楼处项目专题
353
+            path: 'addIndexCase',
354
+            name: 'addIndexCase',
355
+            component: addIndexCase,
356
+            children: []
357
+          }, { // 编辑售楼处项目专题
328 358
             path: 'editIndexCase',
329 359
             name: 'editIndexCase',
330 360
             component: editIndexCase,
@@ -409,6 +439,11 @@ export default {
409 439
             name: 'addCourse',
410 440
             component: addCourse,
411 441
             children: []
442
+          }, { // 编辑课程
443
+            path: 'editCourse',
444
+            name: 'editCourse',
445
+            component: editCourse,
446
+            children: []
412 447
           }]
413 448
         }, { // 排课管理
414 449
           path: 'scheduleManager',
@@ -534,6 +569,11 @@ export default {
534 569
             name: 'editCard',
535 570
             component: editCard,
536 571
             children: []
572
+          }, { // 新增卡
573
+            path: 'addCard',
574
+            name: 'addCard',
575
+            component: addCard,
576
+            children: []
537 577
           }]
538 578
         }, { // 券列表
539 579
           path: 'couponList',
@@ -544,6 +584,11 @@ export default {
544 584
             name: 'editCoupon',
545 585
             component: editCoupon,
546 586
             children: []
587
+          }, { // 新增券
588
+            path: 'addCoupon',
589
+            name: 'addCoupon',
590
+            component: addCoupon,
591
+            children: []
547 592
           }]
548 593
         }, { // 健身卡列表
549 594
           path: 'bodyBuildingCardManager',
@@ -554,6 +599,11 @@ export default {
554 599
             name: 'editBodyBuildingCard',
555 600
             component: editBodyBuildingCard,
556 601
             children: []
602
+          }, { // 新增健身卡
603
+            path: 'addBodyBuildingCard',
604
+            name: 'addBodyBuildingCard',
605
+            component: addBodyBuildingCard,
606
+            children: []
557 607
           }]
558 608
         }, { // 赠送记录
559 609
           path: 'givingRecords',
@@ -564,7 +614,12 @@ export default {
564 614
           path: 'vipList',
565 615
           name: 'vipList',
566 616
           component: vipList,
567
-          children: [{ // 编辑vip
617
+          children: [{ // 新增vip
618
+            path: 'addVip',
619
+            name: 'addVip',
620
+            component: addVip,
621
+            children: []
622
+          }, { // 编辑vip
568 623
             path: 'editVip',
569 624
             name: 'editVip',
570 625
             component: editVip,

+ 1
- 2
src/router/index.js 查看文件

@@ -9,7 +9,7 @@ const flatten = (parent, data) => {
9 9
   return data.reduce((acc, { path, name, component, MenuName, children }) => {
10 10
     const pth = [parent, path].join('/').replace('//', '/')
11 11
     const item = { path: pth, name, component, MenuName, children: [] }
12
-
12
+    // console.log('children:', children)
13 13
     if (children && children.length) {
14 14
       return acc.concat(item, flatten(pth, children))
15 15
     }
@@ -21,7 +21,6 @@ const flatten = (parent, data) => {
21 21
 // route 数据, 展平二级路由
22 22
 const routes = routerData.reduce((acc, r) => {
23 23
   const { children, ...rest } = r
24
-
25 24
   if (children && children.length) {
26 25
     return acc.concat({ ...rest, children: flatten('', children) })
27 26
   }

+ 3
- 3
src/store/app.js 查看文件

@@ -1,12 +1,12 @@
1 1
 
2 2
 function flatten (parent, data = [], menusRaw = []) {
3 3
   return data.reduce((acc, { name, children }) => {
4
-    const menu = menusRaw.filter(x => x.Url === name)[0]
4
+    // console.log('menusRaw:', menusRaw)
5
+    const menu = (menusRaw || []).filter(x => x.Url === name)[0]
5 6
     if (!menu) return acc
6 7
 
7 8
     const MenuName = menu.MenuName
8 9
     const item = { Url: name, MenuName, parent }
9
-
10 10
     if (children && children.length) {
11 11
       const p = parent.concat({ Url: name, MenuName })
12 12
       return acc.concat(item, flatten(p, children, menusRaw))
@@ -65,7 +65,7 @@ export default {
65 65
       state.menusRaw = data.menus
66 66
       state.roles = data.roles
67 67
       state.user = data.user
68
-      state.menus = packChildren(data.menus)
68
+      state.menus = packChildren(data.menus || [])
69 69
       state.clientUrl = data.clienturl
70 70
       let defaultCase = ''
71 71
       for (let i = 0; i < data.cases.length; i++) {

static/yinchengLogo.ico → static/favorite.ico 查看文件