Browse Source

bug修改

wangfei 6 years ago
parent
commit
5b9f740ac0
60 changed files with 1054 additions and 776 deletions
  1. 3
    1
      config/index.js
  2. 1
    1
      index.html
  3. 3
    2
      package-lock.json
  4. 0
    1
      package.json
  5. 27
    2
      src/pages/login/index.vue
  6. 157
    73
      src/pages/login/page.scss
  7. 6
    7
      src/pages/system/cardAndCouponManager/cardManager/edit.vue
  8. 16
    8
      src/pages/system/cardAndCouponManager/couponManager/edit.vue
  9. 4
    3
      src/pages/system/cardAndCouponManager/couponManager/index.vue
  10. 23
    16
      src/pages/system/cardAndCouponManager/vipManager/activateVip.vue
  11. 13
    6
      src/pages/system/caseManager/caseAreaManager/add.vue
  12. 1
    1
      src/pages/system/caseManager/caseInfo/addCase/index.vue
  13. 1
    1
      src/pages/system/caseManager/caseInfo/editCase/index.vue
  14. 7
    0
      src/pages/system/caseManager/caseInfo/index.vue
  15. 7
    0
      src/pages/system/caseManager/caseTableManager/add.vue
  16. 14
    7
      src/pages/system/caseManager/deviceManager/add.vue
  17. 62
    25
      src/pages/system/caseManager/deviceManager/index.vue
  18. 5
    2
      src/pages/system/caseManager/keyManager/add.vue
  19. 22
    13
      src/pages/system/caseManager/keyManager/index.vue
  20. 4
    2
      src/pages/system/caseManager/signinManager/index.vue
  21. 39
    73
      src/pages/system/cmsManager/bannerManager/add.vue
  22. 29
    37
      src/pages/system/cmsManager/bannerManager/edit.vue
  23. 27
    22
      src/pages/system/cmsManager/indexMsg/add.vue
  24. 10
    60
      src/pages/system/cmsManager/majorProjects/edit.vue
  25. 21
    8
      src/pages/system/cmsManager/majorProjects/index.vue
  26. 71
    51
      src/pages/system/cmsManager/newsManager/add.vue
  27. 57
    61
      src/pages/system/cmsManager/newsManager/edit.vue
  28. 1
    1
      src/pages/system/courseManager/courseList/add.vue
  29. 2
    2
      src/pages/system/courseManager/courseList/index.vue
  30. 1
    1
      src/pages/system/courseManager/fiveA/add.vue
  31. 5
    10
      src/pages/system/courseManager/fiveA/index.vue
  32. 10
    4
      src/pages/system/courseManager/scheduleManager/index.vue
  33. 14
    0
      src/pages/system/courseManager/scheduleManager/page.scss
  34. 9
    1
      src/pages/system/dashboard/index.vue
  35. 2
    2
      src/pages/system/dataStatistics/cardCouponUsedList/index.vue
  36. 1
    1
      src/pages/system/dataStatistics/courseVerifyList/index.vue
  37. 0
    4
      src/pages/system/dataStatistics/frontEndUserList/index.vue
  38. 3
    3
      src/pages/system/dataStatistics/goodsOrderList/index.vue
  39. 45
    41
      src/pages/system/goodsManager/goodManager/edit.vue
  40. 55
    47
      src/pages/system/marketingActivities/activitiesList/index.vue
  41. 67
    97
      src/pages/system/marketingActivities/addActivities/index.vue
  42. 4
    3
      src/pages/system/newOrder/caseRecord/index.vue
  43. 2
    2
      src/pages/system/newOrder/newOrderList/index.vue
  44. 19
    13
      src/pages/system/systemSet/userManager/add.vue
  45. 15
    9
      src/pages/system/systemSet/userManager/edit.vue
  46. 18
    8
      src/pages/system/verificationManager/drawVerification/index.vue
  47. 8
    1
      src/pages/system/verificationManager/phoneVerification/index.vue
  48. 14
    6
      src/pages/system/verificationManager/phoneVerification/verificationList/index.vue
  49. 9
    2
      src/pages/system/verificationManager/qrcodeVerification/index.vue
  50. 27
    18
      src/store/case/device.js
  51. 1
    1
      src/store/case/index.js
  52. 35
    10
      src/store/cms/index.js
  53. 14
    2
      src/store/sta/sta.js
  54. 12
    0
      src/store/verification/verification.js
  55. 8
    0
      src/style/main.css
  56. 1
    0
      src/util/ajax.js
  57. 22
    4
      src/util/api.js
  58. BIN
      static/images/bg.jpg
  59. BIN
      static/images/loginName.png
  60. BIN
      static/yinchengLogo.ico

+ 3
- 1
config/index.js View File

@@ -12,6 +12,8 @@ module.exports = {
12 12
     proxyTable: {
13 13
       '/api': {
14 14
         // target: 'https://dp.huiju360.com.cn/hj_operations',
15
+        // target: 'http://192.168.0.62:8080', //wf
16
+        //target: 'http://127.0.0.1:8080', 
15 17
         target: 'http://192.168.0.62:8080', //wf
16 18
         // target: 'http://192.168.0.11', //ys
17 19
         // target: 'http://192.168.0.125:8080', //hyq
@@ -24,7 +26,7 @@ module.exports = {
24 26
     },
25 27
     // Various Dev Server settings
26 28
     host: '0.0.0.0', // can be overwritten by process.env.HOST
27
-    port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
29
+    port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
28 30
     autoOpenBrowser: false,
29 31
     errorOverlay: true,
30 32
     notifyOnErrors: true,

+ 1
- 1
index.html View File

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

+ 3
- 2
package-lock.json View File

@@ -15250,8 +15250,9 @@
15250 15250
     },
15251 15251
     "vue-clipboard2": {
15252 15252
       "version": "0.2.1",
15253
-      "resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.2.1.tgz",
15254
-      "integrity": "sha512-n6ie/0g0bKohmLlC/5ja1esq2Q0jQ5hWmhNSZcvCsWfDeDnVARjl6cBB9p72XV1nlVfuqsZcfV8HTjjZAIlLBA==",
15253
+      "resolved": "http://registry.npm.taobao.org/vue-clipboard2/download/vue-clipboard2-0.2.1.tgz",
15254
+      "integrity": "sha1-nwZpCvHJiu80S+H8S+sAzcUwfuE=",
15255
+      "dev": true,
15255 15256
       "requires": {
15256 15257
         "clipboard": "2.0.1"
15257 15258
       }

+ 0
- 1
package.json View File

@@ -24,7 +24,6 @@
24 24
     "js-md5": "^0.7.3",
25 25
     "vue": "^2.5.2",
26 26
     "vue-amap": "^0.5.8",
27
-    "vue-clipboard2": "^0.2.1",
28 27
     "vue-cookie": "^1.1.4",
29 28
     "vue-fullcalendar": "^1.0.9",
30 29
     "vue-morris": "0.0.13",

+ 27
- 2
src/pages/login/index.vue View File

@@ -1,7 +1,32 @@
1 1
 <template>
2 2
   <div class="mainPage">
3
+    <img src="../../../static/images/bg.jpg" class="centerLabel cover" alt="">
3 4
     <div class="centerLabel">
4
-      <div class="top">
5
+      <img src="../../../static/images/loginName.png" class="title" width="260" alt="">
6
+      <ul>
7
+        <li class="flex-h">
8
+          <div>
9
+            <i class="iconfont icon-yonghuming centerLabel"></i>
10
+          </div>
11
+          <div class="flex-item">
12
+            <input type="text" v-model="account" placeholder="用户名">
13
+          </div>
14
+        </li>
15
+        <li class="flex-h">
16
+          <div>
17
+            <i class="iconfont icon-mima1 centerLabel"></i>
18
+          </div>
19
+          <div class="flex-item">
20
+            <input type="password" v-model="password" placeholder="请输入密码">
21
+          </div>
22
+        </li>
23
+      </ul>
24
+      <div class="remberAccount">
25
+        <span>记住用户名和密码</span>
26
+        <i class="iconfont" :class="{'icon-ic_check_box_outline_blank': !remberAccount, 'icon-md-checkbox-outline': remberAccount, 'active': remberAccount}" @click="triggerRember"></i>
27
+      </div>
28
+      <a class="btn" @click="toLogin">登 录</a>
29
+      <!-- <div class="top">
5 30
         <i class="iconfont icon-yinchenglogo"></i>
6 31
         <span>城的空间 · 登录</span>
7 32
       </div>
@@ -15,7 +40,7 @@
15 40
           </label>
16 41
         </div>
17 42
         <a class="btn" @click="toLogin">登 录</a>
18
-      </div>
43
+      </div> -->
19 44
     </div>
20 45
   </div>
21 46
 </template>

+ 157
- 73
src/pages/login/page.scss View File

@@ -1,90 +1,174 @@
1 1
 
2 2
 .mainPage{
3 3
   div.centerLabel{
4
-    width: 360px;
4
+    width: 420px;
5 5
     position: relative;
6 6
     overflow: hidden;
7
-    box-shadow: 0 0 10px 2px rgba(0, 0, 0, .1);
8
-    border-radius: 5px;
9
-  }
10
-  .top{
11
-    text-align: center;
12
-    padding: 10px 0;
13
-    border-bottom: 1px solid #eee;
14
-    margin-bottom: 10px;
15
-    *{
16
-      vertical-align: middle;
17
-    }
18
-    i{
19
-      font-size: 30px;
20
-      color: red;
7
+    .title{
8
+      display: block;
9
+      margin: 0 auto;
21 10
     }
22
-  }
23
-  .login{
24
-    width: calc(100% - 40px);
25
-    margin: 0 auto;
26
-    position: relative;
27
-    overflow: hidden;
28
-    input{
11
+    ul{
29 12
       width: 100%;
30
-      box-sizing: border-box;
31
-      border: 1px solid #ccc;
32
-      line-height: 20px;
33
-      padding: 5px 0;
34
-      border-radius: 5px;
35
-      font-size: 13px;
36
-      text-indent: 10px;
37
-      margin: 15px auto 0;
13
+      position: relative;
14
+      overflow: hidden;
15
+      margin: 25px auto 0;
16
+      li{
17
+        width: 100%;
18
+        position: relative;
19
+        overflow: hidden;
20
+        border-radius: 5px;
21
+        background: #fff;
22
+        margin: 15px auto 0;
23
+        >div{
24
+          &:first-child{
25
+            width: 40px;
26
+            position: relative;
27
+            &::after{
28
+              content: '';
29
+              width: 1px;
30
+              height: 70%;
31
+              background: #ccc;
32
+              position: absolute;
33
+              right: 0;
34
+              top: 50%;
35
+              transform: translateY(-50%);
36
+              -webkit-transform: translateY(-50%);
37
+            }
38
+            i{
39
+              font-size: 20px;
40
+              color: #666;
41
+            }
42
+          }
43
+          input{
44
+            width: 100%;
45
+            display: block;
46
+            line-height: 20px;
47
+            padding: 12px 0;
48
+            border: none;
49
+            background: none;
50
+            text-indent: 10px;
51
+            &:-webkit-autofill{
52
+              background: #fff !important;
53
+              -webkit-box-shadow: 0 0 0px 1000px white inset;
54
+            }
55
+          }
56
+        }
57
+      }
38 58
     }
39
-    div{
40
-      font-size: 0;
59
+    .remberAccount{
60
+      width: 100%;
61
+      position: relative;
62
+      overflow: hidden;
41 63
       white-space: nowrap;
42
-      padding: 5px 0;
43
-      margin-top: 5px;
44
-      &>*{
45
-        font-size: 0;
46
-        white-space: nowrap;
47
-        &>*{
48
-          display: inline-block;
49
-          vertical-align: middle;
50
-          font-size: 13px;
51
-          line-height: 20px;
52
-          margin-right: 5px;
53
-        }
54
-        i{
55
-          font-size: 16px;
56
-          color: #666;
57
-        }
64
+      font-size: 0;
65
+      margin: 10px auto 0;
66
+      *{
67
+        color: #fff;
68
+        line-height: 30px;
69
+        display: inline-block;
70
+        margin-right: 10px;
71
+        -webkit-user-select: none;
72
+        user-select: none;
58 73
       }
59
-      &>*.active{
60
-        i{
61
-          color: red;
74
+      i{
75
+        &:hover{
76
+          cursor: pointer;
77
+        }
78
+        &.active{
79
+          color: #FF421C;
62 80
         }
63
-      }
64
-      &>*:hover{
65
-        cursor: pointer;
66
-      }
67
-      span{
68
-
69 81
       }
70 82
     }
83
+    .btn{
84
+      width: 260px;
85
+      display: block;
86
+      text-align: center;
87
+      background: #FF421C;
88
+      border-radius: 6px;
89
+      color: #fff;
90
+      line-height: 46px;
91
+      margin: 15px auto 0;
92
+    }
71 93
   }
72
-  .btn{
73
-    width: 100%;
74
-    display: block;
75
-    margin: 10px auto 30px;
76
-    line-height: 40px;
77
-    background: red;
78
-    text-align: center;
79
-    font-size: 13px;
80
-    color: #fff;
81
-    border-radius: 5px;
82
-    transition: all .1s linear;
83
-    -webkit-transition: all .1s linear;
84
-  }
85
-  .btn:hover{
86
-    background: #d01414;
87
-  }
94
+  // .top{
95
+  //   text-align: center;
96
+  //   padding: 10px 0;
97
+  //   border-bottom: 1px solid #eee;
98
+  //   margin-bottom: 10px;
99
+  //   *{
100
+  //     vertical-align: middle;
101
+  //   }
102
+  //   i{
103
+  //     font-size: 30px;
104
+  //     color: red;
105
+  //   }
106
+  // }
107
+  // .login{
108
+  //   width: calc(100% - 40px);
109
+  //   margin: 0 auto;
110
+  //   position: relative;
111
+  //   overflow: hidden;
112
+  //   input{
113
+  //     width: 100%;
114
+  //     box-sizing: border-box;
115
+  //     border: 1px solid #ccc;
116
+  //     line-height: 20px;
117
+  //     padding: 5px 0;
118
+  //     border-radius: 5px;
119
+  //     font-size: 13px;
120
+  //     text-indent: 10px;
121
+  //     margin: 15px auto 0;
122
+  //   }
123
+  //   div{
124
+  //     font-size: 0;
125
+  //     white-space: nowrap;
126
+  //     padding: 5px 0;
127
+  //     margin-top: 5px;
128
+  //     &>*{
129
+  //       font-size: 0;
130
+  //       white-space: nowrap;
131
+  //       &>*{
132
+  //         display: inline-block;
133
+  //         vertical-align: middle;
134
+  //         font-size: 13px;
135
+  //         line-height: 20px;
136
+  //         margin-right: 5px;
137
+  //       }
138
+  //       i{
139
+  //         font-size: 16px;
140
+  //         color: #666;
141
+  //       }
142
+  //     }
143
+  //     &>*.active{
144
+  //       i{
145
+  //         color: red;
146
+  //       }
147
+  //     }
148
+  //     &>*:hover{
149
+  //       cursor: pointer;
150
+  //     }
151
+  //     span{
152
+
153
+  //     }
154
+  //   }
155
+  // }
156
+  // .btn{
157
+  //   width: 100%;
158
+  //   display: block;
159
+  //   margin: 10px auto 30px;
160
+  //   line-height: 40px;
161
+  //   background: red;
162
+  //   text-align: center;
163
+  //   font-size: 13px;
164
+  //   color: #fff;
165
+  //   border-radius: 5px;
166
+  //   transition: all .1s linear;
167
+  //   -webkit-transition: all .1s linear;
168
+  // }
169
+  // .btn:hover{
170
+  //   background: #d01414;
171
+  // }
88 172
 }
89 173
 
90 174
 

+ 6
- 7
src/pages/system/cardAndCouponManager/cardManager/edit.vue View File

@@ -138,7 +138,7 @@
138 138
             </div>
139 139
           </div>
140 140
         </li>
141
-        <li class="flex-h">
141
+        <li class="flex-h" v-if="cardInfo.SendType !== 'case' && cardInfo.SendType !== 'system'">
142 142
           <span>视频:</span>
143 143
           <div class="flex-item">
144 144
             <div style="vertical-align: middle;">
@@ -390,14 +390,13 @@ export default {
390 390
           }
391 391
         }
392 392
         this.cardInfo.TotalCount = this.cardInfo.TotalCount - 0
393
-        console.log(JSON.stringify(this.cardInfo))
393
+        // console.log(JSON.stringify(this.cardInfo))
394 394
         this.addCard(this.cardInfo).then((res) => {
395
-          this.$alert('操作成功', '提示', {
396
-            confirmButtonText: '确定',
397
-            callback: action => {
398
-              this.$router.push({ name: 'cardList' })
399
-            }
395
+          this.$message({
396
+            type: 'success',
397
+            message: '操作成功'
400 398
           })
399
+          this.$router.push({ name: 'cardList' })
401 400
         })
402 401
       }
403 402
     },

+ 16
- 8
src/pages/system/cardAndCouponManager/couponManager/edit.vue View File

@@ -202,7 +202,7 @@
202 202
             </div>
203 203
           </div>
204 204
         </li>
205
-        <li class="flex-h">
205
+        <li class="flex-h" v-if="couponInfo.SendType !== 'case' && couponInfo.SendType !== 'system'">
206 206
           <span>视频:</span>
207 207
           <div class="flex-item">
208 208
             <div style="vertical-align: middle;">
@@ -495,6 +495,7 @@ export default {
495 495
     },
496 496
     sureAddItem () { // 确定添加指定商品
497 497
       var bool = true
498
+      this.couponInfo.Targets = this.couponInfo.Targets || []
498 499
       if (this.couponInfo.CouponType === 'goods') {
499 500
         for (var n = 0; n < this.currentSelectArr.length; n++) {
500 501
           if (this.couponInfo.Targets.length) {
@@ -582,11 +583,15 @@ export default {
582 583
     },
583 584
     submit () { // 保存
584 585
       if (this.$route.query.id) {
586
+        if (this.couponInfo.ValidDays) {
587
+          this.couponInfo.StartDate = undefined
588
+          this.couponInfo.EndDate = undefined
589
+        }
585 590
         this.editCoupon({
586 591
           ...this.couponInfo,
587 592
           IsAll: this.couponInfo.IsAll - 0,
588 593
           TotalCount: this.couponInfo.TotalCount - 0,
589
-          ValidDays: this.couponInfo.ValidDays || 0
594
+          ValidDays: this.couponInfo.ValidDays - 0 || 0
590 595
         }).then((res) => {
591 596
           this.$alert('操作成功', '提示', {
592 597
             confirmButtonText: '确定',
@@ -596,18 +601,21 @@ export default {
596 601
           })
597 602
         })
598 603
       } else {
604
+        if (this.couponInfo.ValidDays) {
605
+          this.couponInfo.StartDate = undefined
606
+          this.couponInfo.EndDate = undefined
607
+        }
599 608
         this.addCoupon({
600 609
           ...this.couponInfo,
601 610
           IsAll: this.couponInfo.IsAll - 0,
602 611
           TotalCount: this.couponInfo.TotalCount - 0,
603
-          ValidDays: this.couponInfo.ValidDays || 0
612
+          ValidDays: this.couponInfo.ValidDays - 0 || 0
604 613
         }).then((res) => {
605
-          this.$alert('操作成功', '提示', {
606
-            confirmButtonText: '确定',
607
-            callback: action => {
608
-              this.$router.push({ name: 'couponList' })
609
-            }
614
+          this.$message({
615
+            type: 'success',
616
+            message: '操作成功'
610 617
           })
618
+          this.$router.push({ name: 'couponList' })
611 619
         })
612 620
       }
613 621
     },

+ 4
- 3
src/pages/system/cardAndCouponManager/couponManager/index.vue View File

@@ -49,9 +49,10 @@
49 49
           label="有效期"
50 50
           width="150">
51 51
           <template slot-scope="scope">
52
-            <span style="width:100%;display:block;text-align:center;white-space: nowrap;">{{toolClass.dateFormat(scope.row.StartDate)}}</span>
53
-            <span style="width:100%;display:block;text-align:center;white-space: nowrap;">至</span>
54
-            <span style="width:100%;display:block;text-align:center;white-space: nowrap;">{{toolClass.dateFormat(scope.row.EndDate)}}</span>
52
+            <span v-if="scope.row.StartDate.substr(0, 4) !== '0001'" style="width:100%;display:block;text-align:center;white-space: nowrap;">{{toolClass.dateFormat(scope.row.StartDate)}}</span>
53
+            <span v-if="scope.row.StartDate.substr(0, 4) !== '0001'" style="width:100%;display:block;text-align:center;white-space: nowrap;">至</span>
54
+            <span v-if="scope.row.StartDate.substr(0, 4) !== '0001'" style="width:100%;display:block;text-align:center;white-space: nowrap;">{{toolClass.dateFormat(scope.row.EndDate)}}</span>
55
+            <span v-else>-</span>
55 56
           </template>
56 57
         </el-table-column>
57 58
         <el-table-column

+ 23
- 16
src/pages/system/cardAndCouponManager/vipManager/activateVip.vue View File

@@ -149,7 +149,7 @@ export default {
149 149
         })
150 150
         return
151 151
       }
152
-      this.GetCustomerByTel({tel: this.customerPhone})
152
+      this.GetCustomerByTel({ tel: this.customerPhone })
153 153
     },
154 154
     searchSeller () {
155 155
       if (this.salesPhone === '') {
@@ -159,7 +159,7 @@ export default {
159 159
         })
160 160
         return
161 161
       }
162
-      this.GetUserByTel({tel: this.salesPhone})
162
+      this.GetUserByTel({ tel: this.salesPhone })
163 163
     },
164 164
     setNull () {
165 165
       this.salesPhone = ''
@@ -168,24 +168,31 @@ export default {
168 168
       this.SetCustomerInfoNull()
169 169
     },
170 170
     activateVip () {
171
-      this.GetVipByCode({ code: this.CardNo }).then((res) => {
172
-        if (res) {
173
-          if (res.Status !== 0) {
171
+      if (this.CardNo !== '') {
172
+        this.GetVipByCode({ code: this.CardNo }).then((res) => {
173
+          if (res) {
174
+            if (res.Status !== 0) {
175
+              this.$message({
176
+                type: 'error',
177
+                message: 'VIP卡已被激活!',
178
+              })
179
+              return
180
+            }
181
+            this.setNull()
182
+            this.centerDialogVisible = true
183
+          } else {
174 184
             this.$message({
175 185
               type: 'error',
176
-              message: 'VIP卡已被激活!',
186
+              message: '没有查询到VIP卡信息!',
177 187
             })
178
-            return
179 188
           }
180
-          this.setNull()
181
-          this.centerDialogVisible = true
182
-        } else {
183
-          this.$message({
184
-            type: 'error',
185
-            message: '没有查询到VIP卡信息!',
186
-          })
187
-        }
188
-      })
189
+        })
190
+      } else {
191
+        this.$message({
192
+          type: 'error',
193
+          message: '请输入VIP卡号!',
194
+        })
195
+      }
189 196
     },
190 197
     vipCharge () {
191 198
       if (this.vip.VipCardChildCode === '') {

+ 13
- 6
src/pages/system/caseManager/caseAreaManager/add.vue View File

@@ -3,7 +3,7 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <span>区域名:</span>
6
+          <span>区域名:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-input
@@ -17,7 +17,7 @@
17 17
           </div>
18 18
         </li>
19 19
         <li class="flex-h">
20
-          <span>案场:</span>
20
+          <span>案场:<em>*</em></span>
21 21
           <div class="flex-item">
22 22
             <div style="width:50%">
23 23
               <el-select v-model="CaseId" placeholder="请选择">
@@ -32,7 +32,7 @@
32 32
           </div>
33 33
         </li>
34 34
         <li class="flex-h">
35
-          <span>图片:</span>
35
+          <span>图片:<em>*</em></span>
36 36
           <div class="flex-item">
37 37
             <div>
38 38
               <el-upload
@@ -48,7 +48,7 @@
48 48
           </div>
49 49
         </li>
50 50
         <li class="flex-h">
51
-          <span>黑白图片:</span>
51
+          <span>黑白图片:<em>*</em></span>
52 52
           <div class="flex-item">
53 53
             <div>
54 54
               <el-upload
@@ -120,17 +120,24 @@ export default {
120 120
         })
121 121
         return false
122 122
       }
123
+      if (this.postData.CaseId === '') {
124
+        this.$message({
125
+          type: 'error',
126
+          message: '案场不能为空'
127
+        })
128
+        return false
129
+      }
123 130
       if (this.postData.AreaIcon === '') {
124 131
         this.$message({
125 132
           type: 'error',
126
-          message: '区域图标不能为空'
133
+          message: '请上传区域图片'
127 134
         })
128 135
         return false
129 136
       }
130 137
       if (this.postData.AreaIconWhite === '') {
131 138
         this.$message({
132 139
           type: 'error',
133
-          message: '区域图标灰白不能为空'
140
+          message: '请上传区域黑白图片'
134 141
         })
135 142
         return false
136 143
       }

+ 1
- 1
src/pages/system/caseManager/caseInfo/addCase/index.vue View File

@@ -126,7 +126,7 @@ export default {
126 126
         CaseAddress: '', // 案场地址
127 127
         CaseTel: '', // 案场电话
128 128
         Coordinate: '', // 经纬度
129
-        Status: '', // 状态
129
+        Status: '0', // 状态  0表示未开放, 1表示已开放
130 130
         CreatDate: '', // 创建日期
131 131
         CreatUser: '', // 创建人
132 132
       },

+ 1
- 1
src/pages/system/caseManager/caseInfo/editCase/index.vue View File

@@ -122,7 +122,7 @@ export default {
122 122
         CaseAddress: '', // 案场地址
123 123
         CaseTel: '', // 案场电话
124 124
         Coordinate: '', // 经纬度
125
-        Status: '', // 状态
125
+        Status: '', // 状态  0表示未开放, 1表示已开放
126 126
         CreatDate: '', // 创建日期
127 127
         CreatUser: '', // 创建人
128 128
       },

+ 7
- 0
src/pages/system/caseManager/caseInfo/index.vue View File

@@ -22,6 +22,13 @@
22 22
           prop="CaseAddress"
23 23
           label="地址">
24 24
         </el-table-column>
25
+        <el-table-column
26
+          prop="Status"
27
+          label="是否开放">
28
+          <template slot-scope="scope">
29
+            <span>{{scope.row.Status == 0 ? '未开放' : '已开放'}}</span>
30
+          </template>
31
+        </el-table-column>
25 32
         <el-table-column label="操作" width="200">
26 33
           <template slot-scope="scope">
27 34
             <el-button

+ 7
- 0
src/pages/system/caseManager/caseTableManager/add.vue View File

@@ -118,6 +118,13 @@ export default {
118 118
         })
119 119
         return false
120 120
       }
121
+      if (this.postData.AreaId === '' || this.CaseId === '') {
122
+        this.$message({
123
+          type: 'error',
124
+          message: '请选择案场/区域'
125
+        })
126
+        return false
127
+      }
121 128
       this.postData.OrgId = this.OrgId
122 129
       this.$ajax(this.$api.caseManager.addCaseTable.url, {
123 130
         method: this.$api.caseManager.addCaseTable.method,

+ 14
- 7
src/pages/system/caseManager/deviceManager/add.vue View File

@@ -92,15 +92,22 @@ export default {
92 92
         if (!this.detail.CaseId || this.detail.CaseId === '') {
93 93
           this.detail.CaseId = this.caseid
94 94
         }
95
-        this.AddDevice(this.detail)
95
+        this.AddDevice(this.detail).then(() => {
96
+          this.$message({
97
+            type: 'success',
98
+            message: '操作成功'
99
+          })
100
+          this.$router.push({ name: 'deviceManager' })
101
+        })
96 102
       } else {
97
-        this.UpdateDevice(this.detail)
103
+        this.UpdateDevice(this.detail).then(() => {
104
+          this.$message({
105
+            type: 'success',
106
+            message: '操作成功'
107
+          })
108
+          this.$router.push({ name: 'deviceManager' })
109
+        })
98 110
       }
99
-      this.$message({
100
-        type: 'success',
101
-        message: '操作成功'
102
-      })
103
-      this.$router.push({ name: 'deviceManager' })
104 111
     },
105 112
     cancel () {
106 113
       this.$router.go(-1)

+ 62
- 25
src/pages/system/caseManager/deviceManager/index.vue View File

@@ -5,6 +5,26 @@
5 5
         <div class="flex-item flex-h">
6 6
           <el-button size="mini" type="success" @click='addRole'>新增体检设备</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
+        <el-button
26
+          size="mini"
27
+          type="primary" @click="search">搜索</el-button>
8 28
       </div>
9 29
       <div class="moreFilter"></div>
10 30
     </div>
@@ -33,12 +53,10 @@
33 53
       </el-table>
34 54
     </div>
35 55
     <el-pagination
36
-    @size-change="handleSizeChange"
37
-    @current-change="handleCurrentChange"
38
-    :current-page.sync="currentPage"
39
-    :page-size="10"
40
-    layout="prev, pager, next, jumper"
41
-    :total="list.pagenum">
56
+      @current-change="handleCurrentChange"
57
+      :page-size="10"
58
+      layout="prev, pager, next, jumper"
59
+      :total="total">
42 60
     </el-pagination>
43 61
   </div>
44 62
 </template>
@@ -53,16 +71,36 @@ export default {
53 71
   data () {
54 72
     return {
55 73
       currentPage: 0, // 当前页码
74
+      total: 0,
75
+      postData: { // 表格搜索条件
76
+        caseid: '', // 案场id
77
+        page: 1, // 当前页码
78
+        pagesize: 10, // 请求数据量
79
+      },
56 80
     }
57 81
   },
58 82
   computed: {
59 83
     ...mapState({
60 84
       cases: x => x.app.cases.list,
85
+      defaultCaseId: x => x.app.cases.default
61 86
     }),
87
+    CaseId: {
88
+      get () {
89
+        return this.postData.caseid || this.defaultCaseId
90
+      },
91
+      set (val) {
92
+        this.postData.caseid = val
93
+      }
94
+    },
62 95
     ...mapDeviceState({
63 96
       list: x => x.deviceList,
64 97
     }),
65 98
   },
99
+  mounted () {
100
+    this.$nextTick(function () {
101
+      this.getList()
102
+    })
103
+  },
66 104
   methods: {
67 105
     ...mapDeviceActions([
68 106
       'GetDeviceList',
@@ -74,12 +112,9 @@ export default {
74 112
     GetCaseName (caseid) {
75 113
       return ((this.cases.filter(x => x.CaseId === caseid) || [])[0] || {}).CaseName
76 114
     },
77
-    handleSizeChange (val) {
78
-      console.log(`每页 ${val} 条`)
79
-    },
80 115
     handleCurrentChange (val) {
81
-      this.GetDeviceList({ page: val })
82
-      console.log(`当前页: ${val}`)
116
+      this.postData.page = val
117
+      this.getList()
83 118
     },
84 119
     handleEdit (index, row) {
85 120
       // 编辑
@@ -87,36 +122,38 @@ export default {
87 122
     },
88 123
     handleDelete (index, row) {
89 124
       // 删除
90
-      console.log(index, row)
91 125
       this.$confirm('确认删除此设备?', '提示', {
92 126
         confirmButtonText: '确定',
93 127
         cancelButtonText: '取消',
94 128
         type: 'warning'
95
-      })
96
-        .then(() => {
97
-          this.DelDevice({id: row.EquipmentId, callback: this.delCallBack})
98
-        })
99
-        .catch(() => {
100
-          this.$message({
101
-            type: 'info',
102
-            message: '已取消删除'
103
-          })
129
+      }).then(() => {
130
+        this.DelDevice({id: row.EquipmentId, callback: this.delCallBack})
131
+      }).catch(() => {
132
+        this.$message({
133
+          type: 'info',
134
+          message: '已取消删除'
104 135
         })
136
+      })
137
+    },
138
+    search () { // 搜索
139
+      this.postData.page = 1
140
+      this.currentList = []
141
+      this.getList()
142
+    },
143
+    getList () { // 获取列表
144
+      this.GetDeviceList(this.postData)
105 145
     },
106 146
     delCallBack () {
107 147
       this.$message({
108 148
         type: 'success',
109 149
         message: '删除成功!'
110 150
       })
111
-      this.GetDeviceList()
151
+      this.getList()
112 152
     },
113 153
     addRole () {
114 154
       this.$router.push({ name: 'editDevice' })
115 155
     },
116 156
   },
117
-  beforeMount () {
118
-    this.GetDeviceList()
119
-  },
120 157
 }
121 158
 </script>
122 159
 

+ 5
- 2
src/pages/system/caseManager/keyManager/add.vue View File

@@ -24,7 +24,8 @@
24 24
               <el-input
25 25
                 placeholder="请输入数字"
26 26
                 v-model="postData.beginnum"
27
-                clearable>
27
+                clearable
28
+                onkeyup="value=value.replace(/[^\d]/g,'')">
28 29
               </el-input>
29 30
             </div>
30 31
           </div>
@@ -36,7 +37,8 @@
36 37
               <el-input
37 38
                 placeholder="请输入数字"
38 39
                 v-model="postData.endnum"
39
-                clearable>
40
+                clearable
41
+                onkeyup="value=value.replace(/[^\d]/g,'')">
40 42
               </el-input>
41 43
             </div>
42 44
           </div>
@@ -113,6 +115,7 @@ export default {
113 115
         })
114 116
         return false
115 117
       }
118
+      console.log('柜子编号:' + this.postData.beginnum + ' ' + this.postData.endnum)
116 119
       this.postData.orgid = this.OrgId
117 120
       this.$ajax(this.$api.caseManager.addKey.url, {
118 121
         method: this.$api.caseManager.addKey.method,

+ 22
- 13
src/pages/system/caseManager/keyManager/index.vue View File

@@ -9,11 +9,6 @@
9 9
           <li>
10 10
             <!-- <span>选择案场:</span> -->
11 11
             <el-select v-model="CaseId" placeholder="请选择">
12
-              <el-option
13
-                key=""
14
-                label="所有案场"
15
-                value="">
16
-              </el-option>
17 12
               <el-option
18 13
                 v-for="item in cases"
19 14
                 :key="item.CaseId"
@@ -83,11 +78,22 @@
83 78
     </el-pagination>
84 79
     <el-dialog title="钥匙绑定" :visible.sync="dialogTableVisible">
85 80
       <ul class="cutBindType">
86
-        <li :class="{'active':cutBindType==0}" @click="cutBindType=0">扫码绑定</li>
87
-        <li :class="{'active':cutBindType==1}" @click="cutBindType=1">手机号绑定</li>
81
+        <li :class="{'active':cutBindType==0}" @click="showCardList = false; bindPhone = ''; cutBindType = 0">扫码绑定</li>
82
+        <li :class="{'active':cutBindType==1}" @click="showCardList = false; bindPhone = ''; cutBindType = 1">手机号绑定</li>
88 83
       </ul>
89 84
       <ul class="cutBody">
90
-        <li :hidden="cutBindType==1"></li>
85
+        <li :hidden="cutBindType==1">
86
+          <div class="flex-h" v-if="!showCardList">
87
+            <div class="flex-item">
88
+              <el-input
89
+                placeholder="请扫描二维码"
90
+                v-model="bindPhone"
91
+                clearable>
92
+              </el-input>
93
+            </div>
94
+            <el-button type="success" size="mini">确定</el-button>
95
+          </div>
96
+        </li>
91 97
         <li :hidden="cutBindType==0">
92 98
           <div class="flex-h" v-if="!showCardList">
93 99
             <div class="flex-item">
@@ -99,13 +105,13 @@
99 105
             </div>
100 106
             <el-button type="success" size="mini" @click="sureBindPhone">确定</el-button>
101 107
           </div>
102
-          <el-table :hidden="!showCardList" :data="gridData">
103
-            <el-table-column property="date" label="日期" width="150"></el-table-column>
104
-            <el-table-column property="name" label="姓名" width="200"></el-table-column>
105
-            <el-table-column property="address" label="地址"></el-table-column>
106
-          </el-table>
107 108
         </li>
108 109
       </ul>
110
+      <el-table :hidden="!showCardList" :data="gridData">
111
+        <el-table-column property="date" label="日期" width="150"></el-table-column>
112
+        <el-table-column property="name" label="姓名" width="200"></el-table-column>
113
+        <el-table-column property="address" label="地址"></el-table-column>
114
+      </el-table>
109 115
     </el-dialog>
110 116
   </div>
111 117
 </template>
@@ -164,6 +170,9 @@ export default {
164 170
       this.getList()
165 171
     },
166 172
     getList () { // 获取列表
173
+      if (this.postData.caseid === '') {
174
+        this.postData.caseid = this.cases[0].CaseId
175
+      }
167 176
       this.$ajax(this.$api.caseManager.getKeyList.url, {
168 177
         method: this.$api.caseManager.getKeyList.method,
169 178
         queryData: { ...this.postData, caseid: this.CaseId, num: this.lockNum }

+ 4
- 2
src/pages/system/caseManager/signinManager/index.vue View File

@@ -30,7 +30,7 @@
30 30
         </el-select>
31 31
     </div>
32 32
     <div class="button-div">
33
-      <el-button type="success" icon="el-icon-search" style="float: right;">导出excel</el-button>
33
+      <el-button type="success" icon="el-icon-search" style="float: right;" @click="excelSignin">导出excel</el-button>
34 34
       <el-button type="warning" icon="el-icon-search" style="float: right;" @click="reset">重置</el-button>
35 35
       <el-button type="primary" icon="el-icon-search" style="float: right; margin-right: -10px;" @click="getList">搜索</el-button>
36 36
     </div>
@@ -179,7 +179,9 @@ export default {
179 179
     FormatDate (date) {
180 180
       return this.toolClass.dateFormat(date, 'yyyy-MM-dd hh:mm:ss')
181 181
     },
182
-
182
+    excelSignin () { // 导出Excel
183
+      window.open(`${this.toolClass.ReplaceOrg(this.$api.caseManager.getExcelSignin.url)}?token=${localStorage.getItem('JWT')}&selectType=${this.$data.valueTime}&caseid=${this.$data.valueCase}`, '_blank')
184
+    }
183 185
   },
184 186
   computed: {
185 187
     ...mapState({

+ 39
- 73
src/pages/system/cmsManager/bannerManager/add.vue View File

@@ -3,16 +3,16 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <span>跳转类型:</span>
6
+          <span>跳转类型:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%" class="radio">
9
-                <el-radio v-model="postData.ForwardType" label='1' >链接</el-radio>
10
-                <el-radio v-model="postData.ForwardType" label='0' >课程</el-radio>
9
+                <el-radio v-model="postData.ForwardType" label='url' >链接</el-radio>
10
+                <el-radio v-model="postData.ForwardType" label='course' >课程</el-radio>
11 11
             </div>
12 12
           </div>
13 13
         </li>
14
-        <li class="flex-h" v-if="postData.ForwardType==='1'">
15
-          <span>链接:</span>
14
+        <li class="flex-h" v-if="postData.ForwardType==='url'">
15
+          <span>链接:<em>*</em></span>
16 16
           <div class="flex-item">
17 17
             <div style="width:50%">
18 18
               <el-input
@@ -24,7 +24,7 @@
24 24
           </div>
25 25
         </li>
26 26
         <li class="flex-h" v-else>
27
-          <span>课程:</span>
27
+          <span>课程:<em>*</em></span>
28 28
           <div class="flex-item">
29 29
             <div style="width:50%">
30 30
               <el-select v-model="postData.ForwardResourceId" placeholder="请选择课程">
@@ -39,7 +39,7 @@
39 39
           </div>
40 40
         </li>
41 41
         <li class="flex-h">
42
-          <span>是否发布:</span>
42
+          <span>是否发布:<em>*</em></span>
43 43
           <div class="flex-item">
44 44
             <div style="width:50%" class="radio">
45 45
               <el-radio v-model="postData.Status" label='1' >是</el-radio>
@@ -48,7 +48,7 @@
48 48
           </div>
49 49
         </li>
50 50
         <li class="flex-h">
51
-          <span>图片位置:</span>
51
+          <span>图片位置:<em>*</em></span>
52 52
           <div class="flex-item">
53 53
             <div style="width:50%">
54 54
               <el-select v-model="postData.LocationId" placeholder="请选择">
@@ -75,22 +75,8 @@
75 75
           </div>
76 76
         </li>
77 77
         <li class="flex-h">
78
-          <span>图片:</span>
78
+          <span>图片:<em>*</em></span>
79 79
           <div class="flex-item">
80
-            <!-- <el-upload
81
-              action='string'
82
-              :http-request="toolClass.upload"
83
-              :limit='limit'
84
-              list-type="picture-card"
85
-              :file-list='imgsArr'
86
-              :on-success="handlePictureCardPreview"
87
-              :on-remove="handleRemove"
88
-              :on-exceed="exceed">
89
-              <i class="el-icon-plus"></i>
90
-            </el-upload>
91
-            <el-dialog :visible.sync="dialogVisible">
92
-              <img width="100%" :src="imgs" alt="">
93
-            </el-dialog> -->
94 80
             <el-upload
95 81
               class="avatar-uploader"
96 82
               action='string'
@@ -100,26 +86,8 @@
100 86
               <img v-if="postData.ImageUrl" :src="postData.ImageUrl" class="avatar">
101 87
               <i v-else class="el-icon-plus avatar-uploader-icon"></i>
102 88
             </el-upload>
103
-            <!-- <div>
104
-              <image-uploader :upload="uploader" v-model="postData.ImageUrl" />
105
-            </div> -->
106 89
           </div>
107 90
         </li>
108
-        <!-- <li class="flex-h">
109
-          <span>对应案场:</span>
110
-          <div class="flex-item">
111
-            <div style="width:50%">
112
-              <el-select v-model="postData.CaseId" placeholder="请选择">
113
-                <el-option
114
-                  v-for="item in caseList"
115
-                  :key="item.CaseId"
116
-                  :label="item.CaseName"
117
-                  :value="item.CaseId">
118
-                </el-option>
119
-              </el-select>
120
-            </div>
121
-          </div>
122
-        </li> -->
123 91
         <li style="text-align:center">
124 92
           <el-button type="primary" size="mini" @click="submit">保存</el-button>
125 93
           <el-button type="danger" size="mini" @click="cancel">取消</el-button>
@@ -141,8 +109,9 @@ export default {
141 109
   data () {
142 110
     return {
143 111
       // uploader: upload,
112
+      ForwardType: '1',
144 113
       postData: {
145
-        ForwardType: '1',
114
+        ForwardType: 'url',
146 115
         ForwardUrl: '',
147 116
         ForwardResourceId: '',
148 117
         Status: '1',
@@ -162,15 +131,15 @@ export default {
162 131
     // imageUploader: () => import('@/components/upload')
163 132
   },
164 133
   created () {
165
-    this.GetCourseList({page: 1, pagesize: 100})
166
-    this.updateLocationInfo()
134
+    this.GetCourseList({ page: 1, pagesize: 100 })
135
+    this.updateLocationAllInfo()
167 136
     this.updateSystemInfo().then(() => {
168 137
       this.postData.CaseId = this.defaultCaseId
169 138
     })
170 139
   },
171 140
   computed: {
172 141
     ...mapState({
173
-      positionList: x => x.cms.location,
142
+      positionList: x => x.cms.locationAll,
174 143
       OrgId: x => x.app.user.OrgId,
175 144
       defaultCaseId: x => x.app.cases.default,
176 145
       caseList: x => x.app.cases.list
@@ -183,10 +152,10 @@ export default {
183 152
     ...mapCourseActions([
184 153
       'GetCourseList',
185 154
     ]),
186
-    ...mapCmsActions(['updateLocationInfo']),
155
+    ...mapCmsActions(['updateLocationAllInfo']),
187 156
     ...mapActions(['updateSystemInfo']),
188 157
     submit () {
189
-      if (this.postData.ForwardType === '1') {
158
+      if (this.postData.ForwardType === 'url') {
190 159
         this.postData.ForwardResourceId = ''
191 160
         if (this.postData.ForwardUrl === '') {
192 161
           this.$message({
@@ -195,7 +164,7 @@ export default {
195 164
           })
196 165
           return false
197 166
         } else {
198
-          var reg = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/  // eslint-disable-line
167
+          var reg = /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/  // eslint-disable-line
199 168
           if (!reg.test(this.postData.ForwardUrl)) {
200 169
             this.$message({
201 170
               message: '链接地址格式不正确',
@@ -206,16 +175,30 @@ export default {
206 175
         }
207 176
       } else {
208 177
         this.postData.ForwardUrl = ''
178
+        if (this.postData.ForwardResourceId === '') {
179
+          this.$message({
180
+            message: '课程不能为空',
181
+            type: 'error',
182
+          })
183
+          return false
184
+        }
185
+      }
186
+      if (this.postData.LocationId === '') {
187
+        this.$message({
188
+          message: '图片位置不能为空',
189
+          type: 'error',
190
+        })
191
+        return false
192
+      }
193
+      if (this.postData.ImageUrl === '') {
194
+        this.$message({
195
+          message: '图片不能为空',
196
+          type: 'error',
197
+        })
198
+        return false
209 199
       }
210 200
       this.postData.OrgId = this.OrgId
211
-      this.postData.ForwardType === '1' ? this.postData.ForwardType = 'url' : this.postData.ForwardType = 'course'
212
-      // this.postData.ImageUrl = ''
213
-      // for (let i = 0; i < this.imgsArr.length; i++) {
214
-      //   this.postData.ImageUrl += this.imgsArr[i].response.result.url + ','
215
-      // }
216
-      // if (this.postData.ImageUrl) {
217
-      //   this.postData.ImageUrl = this.postData.ImageUrl.substr(0, this.postData.ImageUrl.length - 1)
218
-      // }
201
+      // this.ForwardType === '1' ? this.postData.ForwardType = 'url' : this.postData.ForwardType = 'course'
219 202
       this.$ajax(this.$api.cms.addImage.url, {
220 203
         method: this.$api.cms.addImage.method,
221 204
         data: this.postData
@@ -228,28 +211,11 @@ export default {
228 211
         setTimeout(() => {
229 212
           this.$router.push({ name: 'bannerManager' })
230 213
         }, 1000)
231
-      }).catch(msg => {
232
-
233 214
       })
234 215
     },
235 216
     cancel () {
236 217
       this.$router.go(-1)
237 218
     },
238
-    // handlePictureCardPreview (res, file, fileList) {
239
-    //   this.imgs = res.result.url
240
-    //   this.dialogVisible = false
241
-    //   this.imgsArr = fileList
242
-    // },
243
-    // handleRemove (file, fileList) {
244
-    //   this.imgsArr = fileList
245
-    // },
246
-    // exceed () {
247
-    //   this.$message({
248
-    //     message: '超过可传的图片上限',
249
-    //     type: 'info',
250
-    //     duration: 1000
251
-    //   })
252
-    // }
253 219
     handleAvatarSuccess (res, file) {
254 220
       this.postData.ImageUrl = res.result.url
255 221
     }

+ 29
- 37
src/pages/system/cmsManager/bannerManager/edit.vue View File

@@ -3,7 +3,7 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <span>跳转类型:</span>
6
+          <span>跳转类型:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%" class="radio">
9 9
                 <el-radio v-model="postData.ForwardType" label='1' >链接</el-radio>
@@ -12,7 +12,7 @@
12 12
           </div>
13 13
         </li>
14 14
         <li class="flex-h" v-if="postData.ForwardType==='1'">
15
-          <span>链接:</span>
15
+          <span>链接:<em>*</em></span>
16 16
           <div class="flex-item">
17 17
             <div style="width:50%">
18 18
               <el-input
@@ -24,7 +24,7 @@
24 24
           </div>
25 25
         </li>
26 26
         <li class="flex-h" v-else>
27
-          <span>课程:</span>
27
+          <span>课程:<em>*</em></span>
28 28
           <div class="flex-item">
29 29
             <div style="width:50%">
30 30
               <el-select v-model="postData.ForwardResourceId" placeholder="请选择课程">
@@ -39,7 +39,7 @@
39 39
           </div>
40 40
         </li>
41 41
         <li class="flex-h">
42
-          <span>是否发布:</span>
42
+          <span>是否发布:<em>*</em></span>
43 43
           <div class="flex-item">
44 44
             <div style="width:50%" class="radio">
45 45
               <el-radio v-model="postData.Status" label='1' >是</el-radio>
@@ -48,7 +48,7 @@
48 48
           </div>
49 49
         </li>
50 50
         <li class="flex-h">
51
-          <span>图片位置:</span>
51
+          <span>图片位置:<em>*</em></span>
52 52
           <div class="flex-item">
53 53
             <div style="width:50%">
54 54
               <el-select v-model="postData.LocationId" placeholder="请选择">
@@ -75,22 +75,8 @@
75 75
           </div>
76 76
         </li>
77 77
         <li class="flex-h">
78
-          <span>图片:</span>
78
+          <span>图片:<em>*</em></span>
79 79
           <div class="flex-item">
80
-            <!-- <el-upload
81
-              action='string'
82
-              :http-request="toolClass.upload"
83
-              :limit='limit'
84
-              list-type="picture-card"
85
-              :file-list='imgsArr'
86
-              :on-success="handlePictureCardPreview"
87
-              :on-remove="handleRemove"
88
-              :on-exceed="exceed">
89
-              <i class="el-icon-plus"></i>
90
-            </el-upload>
91
-            <el-dialog :visible.sync="dialogVisible">
92
-              <img width="100%" :src="imgs" alt="">
93
-            </el-dialog> -->
94 80
             <el-upload
95 81
               class="avatar-uploader"
96 82
               action='string'
@@ -102,21 +88,6 @@
102 88
             </el-upload>
103 89
           </div>
104 90
         </li>
105
-        <!-- <li class="flex-h">
106
-          <span>对应案场:</span>
107
-          <div class="flex-item">
108
-            <div style="width:50%">
109
-              <el-select v-model="postData.CaseId" placeholder="请选择">
110
-                <el-option
111
-                  v-for="item in caseList"
112
-                  :key="item.CaseId"
113
-                  :label="item.CaseName"
114
-                  :value="item.CaseId">
115
-                </el-option>
116
-              </el-select>
117
-            </div>
118
-          </div>
119
-        </li> -->
120 91
         <li style="text-align:center">
121 92
           <el-button type="primary" size="mini" @click="submit">保存</el-button>
122 93
           <el-button type="danger" size="mini" @click="cancel">取消</el-button>
@@ -173,7 +144,7 @@ export default {
173 144
     ]),
174 145
     ...mapCmsActions(['updateLocationInfo']),
175 146
     submit () {
176
-      if (this.postData.ForwardType === '1') {
147
+      if (this.postData.ForwardType === 'url') {
177 148
         this.postData.ForwardResourceId = ''
178 149
         if (this.postData.ForwardUrl === '') {
179 150
           this.$message({
@@ -182,7 +153,7 @@ export default {
182 153
           })
183 154
           return false
184 155
         } else {
185
-          var reg = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/  // eslint-disable-line
156
+          var reg = /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/  // eslint-disable-line
186 157
           if (!reg.test(this.postData.ForwardUrl)) {
187 158
             this.$message({
188 159
               message: '链接地址格式不正确',
@@ -193,6 +164,27 @@ export default {
193 164
         }
194 165
       } else {
195 166
         this.postData.ForwardUrl = ''
167
+        if (this.postData.ForwardResourceId === '') {
168
+          this.$message({
169
+            message: '课程不能为空',
170
+            type: 'error',
171
+          })
172
+          return false
173
+        }
174
+      }
175
+      if (this.postData.LocationId === '') {
176
+        this.$message({
177
+          message: '图片位置不能为空',
178
+          type: 'error',
179
+        })
180
+        return false
181
+      }
182
+      if (this.postData.ImageUrl === '') {
183
+        this.$message({
184
+          message: '图片不能为空',
185
+          type: 'error',
186
+        })
187
+        return false
196 188
       }
197 189
       this.postData.OrgId = this.OrgId
198 190
       this.postData.CaseId = this.CaseId

+ 27
- 22
src/pages/system/cmsManager/indexMsg/add.vue View File

@@ -72,6 +72,7 @@ export default {
72 72
   name: '',
73 73
   data () {
74 74
     return {
75
+      ajaxOff: true,
75 76
       postData: {
76 77
         InfoName: '',
77 78
         InfoUrl: '',
@@ -100,30 +101,34 @@ export default {
100 101
     ...mapCmsActions(['updateLocationInfo']),
101 102
     ...mapActions(['updateSystemInfo']),
102 103
     submit () {
103
-      var reg = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/  // eslint-disable-line
104
-      if (!reg.test(this.postData.InfoUrl)) {
105
-        this.$message({
106
-          message: '链接地址格式不正确',
107
-          type: 'error',
104
+      if (this.ajaxOff) {
105
+        var reg = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/  // eslint-disable-line
106
+        if (!reg.test(this.postData.InfoUrl)) {
107
+          this.$message({
108
+            message: '链接地址格式不正确',
109
+            type: 'error',
110
+          })
111
+          return false
112
+        }
113
+        this.postData.OrgId = this.OrgId
114
+        this.ajaxOff = false
115
+        this.$ajax(this.$api.cms.addInfo.url, {
116
+          method: this.$api.cms.addInfo.method,
117
+          data: this.postData
118
+        }).then(res => {
119
+          this.ajaxOff = true
120
+          this.$message({
121
+            message: '添加成功',
122
+            type: 'success',
123
+            duration: 1000
124
+          })
125
+          setTimeout(() => {
126
+            this.$router.push({ name: 'indexMsg' })
127
+          }, 1000)
128
+        }).catch(msg => {
129
+          this.ajaxOff = true
108 130
         })
109
-        return false
110 131
       }
111
-      this.postData.OrgId = this.OrgId
112
-      this.$ajax(this.$api.cms.addInfo.url, {
113
-        method: this.$api.cms.addInfo.method,
114
-        data: this.postData
115
-      }).then(res => {
116
-        this.$message({
117
-          message: '添加成功',
118
-          type: 'success',
119
-          duration: 1000
120
-        })
121
-        setTimeout(() => {
122
-          this.$router.push({ name: 'indexMsg' })
123
-        }, 1000)
124
-      }).catch(msg => {
125
-
126
-      })
127 132
     },
128 133
     cancel () {
129 134
       this.$router.go(-1)

+ 10
- 60
src/pages/system/cmsManager/majorProjects/edit.vue View File

@@ -6,7 +6,7 @@
6 6
           <span>对应案场:</span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9
-              <el-select v-model="CaseId" placeholder="请选择">
9
+              <el-select v-model="CaseId" placeholder="请选择" @change="caseChange">
10 10
                 <el-option
11 11
                   v-for="item in caseList"
12 12
                   :key="item.CaseId"
@@ -248,7 +248,7 @@ export default {
248 248
         return this.detail.CaseId || this.caseid
249 249
       },
250 250
       set (val) {
251
-        this.UpdateInfo({...this.detail, CaseId: val})
251
+        this.UpdateInfo({ ...this.detail, CaseId: val })
252 252
         this.getCourse()
253 253
       }
254 254
     },
@@ -258,40 +258,6 @@ export default {
258 258
     detailImgShow () {
259 259
       return this.detailimg || ((this.detail.CmsCaseImgs || []).filter(x => x.ImageType === 'detail')[0] || {}).CaseImageUrl
260 260
     },
261
-    // imgsArr: {
262
-    //   get () {
263
-    //     return this.imgs || (this.detail.CmsCaseImgs || []).filter(x => x.ImageType === 'cover').map(x => {
264
-    //       return {
265
-    //         url: x.CaseImageUrl,
266
-    //         response: {
267
-    //           result: {
268
-    //             url: x.CaseImageUrl
269
-    //           }
270
-    //         }
271
-    //       }
272
-    //     })
273
-    //   },
274
-    //   set (val) {
275
-    //     this.imgs = val
276
-    //   }
277
-    // },
278
-    // detailimgsArr: {
279
-    //   get () {
280
-    //     return this.detailimgs || (this.detail.CmsCaseImgs || []).filter(x => x.ImageType === 'detail').map(x => {
281
-    //       return {
282
-    //         url: x.CaseImageUrl,
283
-    //         response: {
284
-    //           result: {
285
-    //             url: x.CaseImageUrl
286
-    //           }
287
-    //         }
288
-    //       }
289
-    //     })
290
-    //   },
291
-    //   set (val) {
292
-    //     this.detailimgs = val
293
-    //   }
294
-    // },
295 261
     coursesList () {
296 262
       return (this.courses.list || []).map(x => {
297 263
         return {
@@ -313,6 +279,10 @@ export default {
313 279
     ...mapCourseActions([
314 280
       'GetCourseList',
315 281
     ]),
282
+    caseChange () {
283
+      this.selCourseList = []
284
+      this.detail.Courses = []
285
+    },
316 286
     submit () {
317 287
       const courseids = (this.detail.Courses || []).map(x => x.CourseId).join(',')
318 288
       if (this.id === '') {
@@ -339,20 +309,8 @@ export default {
339 309
     cancel () {
340 310
       this.$router.go(-1)
341 311
     },
342
-    // handlePictureCardPreview (res, file, fileList) {
343
-    //   this.imgsArr = fileList
344
-    // },
345
-    // handleRemove (file, fileList) {
346
-    //   this.imgsArr = fileList
347
-    // },
348
-    // handlePictureCardPreviewDetail (res, file, fileList) {
349
-    //   this.detailimgsArr = fileList
350
-    // },
351
-    // handleRemoveDetail (file, fileList) {
352
-    //   this.detailimgsArr = fileList
353
-    // },
354 312
     getDetail () {
355
-      this.GetCaseInfo({id: this.id})
313
+      this.GetCaseInfo({ id: this.id })
356 314
     },
357 315
     getCourse () {
358 316
       this.GetCourseList({caseid: this.CaseId, page: 1, pagesize: 100, status: 1})
@@ -366,15 +324,8 @@ export default {
366 324
         this.$refs.courseTable.clearSelection()
367 325
       }
368 326
     },
369
-    // exceed () {
370
-    //   this.$message({
371
-    //     message: '超过可传的图片上限',
372
-    //     type: 'info',
373
-    //     duration: 1000
374
-    //   })
375
-    // },
376 327
     addCourse () {
377
-      this.GetCourseList({caseid: this.CaseId, page: 1, pagesize: 100, callback: this.coursesShow})
328
+      this.GetCourseList({ caseid: this.CaseId, page: 1, pagesize: 100, callback: this.coursesShow })
378 329
     },
379 330
     coursesShow () {
380 331
       this.selCourseList = this.detail.Courses || []
@@ -385,14 +336,13 @@ export default {
385 336
     },
386 337
     handleSelectionChange (val) {
387 338
       this.selCourseList = val
388
-      // this.UpdateInfo({...this.detail, Courses: val})
389 339
     },
390 340
     addCourseOk () {
391
-      this.UpdateInfo({...this.detail, Courses: this.selCourseList})
341
+      this.UpdateInfo({ ...this.detail, Courses: this.selCourseList })
392 342
       this.selCourseVisible = false
393 343
     },
394 344
     deleteItem (row) {
395
-      this.UpdateInfo({...this.detail, Courses: this.detail.Courses.filter(x => x.CourseId !== row.CourseId)})
345
+      this.UpdateInfo({ ...this.detail, Courses: this.detail.Courses.filter(x => x.CourseId !== row.CourseId) })
396 346
     },
397 347
     handleImgSuccess (res, file) {
398 348
       this.img = res.result.url

+ 21
- 8
src/pages/system/cmsManager/majorProjects/index.vue View File

@@ -59,9 +59,13 @@
59 59
               type="warning"
60 60
               v-if="scope.row.Status === 0"
61 61
               @click="editItem(scope.$index, scope.row)">编辑</el-button>
62
-            <!-- <el-button
62
+            <el-button
63 63
               size="mini"
64
-              @click="copyItemUrl(scope.$index, scope.row)">复制专题链接</el-button> -->
64
+              type="success"
65
+              v-clipboard:copy="returnUrl(scope.row.CmsCaseId)"
66
+              v-clipboard:success="onCopy"
67
+              v-clipboard:error="onError"
68
+              >点击复制链接</el-button>
65 69
             <el-button
66 70
               size="mini"
67 71
               type="danger"
@@ -142,15 +146,12 @@ export default {
142 146
       })
143 147
     },
144 148
     editItem (index, row) { // 编辑
145
-      console.log(index, row)
146 149
       this.$router.push({ name: 'editIndexCase', query: { id: row.CmsCaseId } })
147 150
     },
148
-    // copyItemUrl (index, row) { // 复制专题链接
149
-    //   console.log(index, row)
150
-    //   window.clipboardData.setData('Text', row.Title)
151
-    // },
151
+    returnUrl (id) {
152
+      return window.location.origin + window.location.pathname + 'user.html#/majorProjects?id=' + id
153
+    },
152 154
     deleteItem (index, row) { // 删除
153
-      console.log(index, row)
154 155
       this.$confirm('确认删除此项目专题?', '提示', {
155 156
         confirmButtonText: '确定',
156 157
         cancelButtonText: '取消',
@@ -208,6 +209,18 @@ export default {
208 209
 
209 210
       })
210 211
     },
212
+    onCopy () {
213
+      this.$message({
214
+        type: 'success',
215
+        message: '复制成功!'
216
+      })
217
+    },
218
+    onError () {
219
+      this.$message({
220
+        type: 'error',
221
+        message: '复制失败!'
222
+      })
223
+    },
211 224
   }
212 225
 }
213 226
 </script>

+ 71
- 51
src/pages/system/cmsManager/newsManager/add.vue View File

@@ -3,16 +3,16 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <span>跳转类型:</span>
6
+          <span>跳转类型:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%" class="radio">
9
-                <el-radio v-model="postData.ForwardType" label='1' >链接</el-radio>
10
-                <el-radio v-model="postData.ForwardType" label='0' >课程</el-radio>
9
+                <el-radio v-model="postData.ForwardType" label='url' >链接</el-radio>
10
+                <el-radio v-model="postData.ForwardType" label='course' >课程</el-radio>
11 11
             </div>
12 12
           </div>
13 13
         </li>
14
-        <li class="flex-h">
15
-          <span>链接:</span>
14
+        <li class="flex-h" v-if="postData.ForwardType==='url'">
15
+          <span>链接:<em>*</em></span>
16 16
           <div class="flex-item">
17 17
             <div style="width:50%">
18 18
               <el-input
@@ -23,8 +23,23 @@
23 23
             </div>
24 24
           </div>
25 25
         </li>
26
+        <li class="flex-h" v-else>
27
+          <span>课程:<em>*</em></span>
28
+          <div class="flex-item">
29
+            <div style="width:50%">
30
+              <el-select v-model="postData.ForwardResourceId" placeholder="请选择课程">
31
+                <el-option
32
+                  v-for="item in courses.list"
33
+                  :key="item.CourseId"
34
+                  :label="item.CourseName"
35
+                  :value="item.CourseId">
36
+                </el-option>
37
+              </el-select>
38
+            </div>
39
+          </div>
40
+        </li>
26 41
         <li class="flex-h">
27
-          <span>是否发布:</span>
42
+          <span>是否发布:<em>*</em></span>
28 43
           <div class="flex-item">
29 44
             <div style="width:50%" class="radio">
30 45
               <el-radio v-model="postData.Status" label='1' >是</el-radio>
@@ -33,7 +48,7 @@
33 48
           </div>
34 49
         </li>
35 50
         <li class="flex-h">
36
-          <span>图片位置:</span>
51
+          <span>图片位置:<em>*</em></span>
37 52
           <div class="flex-item">
38 53
             <div style="width:50%">
39 54
               <el-select style="width:100%" v-model="postData.LocationIds" multiple placeholder="请选择">
@@ -48,7 +63,7 @@
48 63
           </div>
49 64
         </li>
50 65
         <li class="flex-h">
51
-          <span>标题:</span>
66
+          <span>标题:<em>*</em></span>
52 67
           <div class="flex-item">
53 68
             <div style="width:50%">
54 69
               <el-input
@@ -60,23 +75,8 @@
60 75
           </div>
61 76
         </li>
62 77
         <li class="flex-h">
63
-          <span>图片:</span>
78
+          <span>图片:<em>*</em></span>
64 79
           <div class="flex-item">
65
-            <!-- <el-upload
66
-              action='string'
67
-              :http-request="toolClass.upload"
68
-              :limit='limit'
69
-              list-type="picture-card"
70
-              :file-list='imgsArr'
71
-              :on-success="handlePictureCardPreview"
72
-              :on-remove="handleRemove"
73
-              :on-exceed="exceed">
74
-              <i class="el-icon-plus"></i>
75
-            </el-upload>
76
-            <el-dialog :visible.sync="dialogVisible">
77
-              <img width="100%" :src="imgs" alt="">
78
-            </el-dialog> -->
79
-            <!-- 单选 -->
80 80
             <el-upload
81 81
               class="avatar-uploader"
82 82
               action='string'
@@ -100,12 +100,14 @@
100 100
 <script>
101 101
 import { mapState, mapActions, createNamespacedHelpers } from 'vuex'
102 102
 const { mapActions: mapCmsActions } = createNamespacedHelpers('cms')
103
+const { mapState: mapCourseState, mapActions: mapCourseActions } = createNamespacedHelpers('course')
104
+
103 105
 export default {
104 106
   name: '',
105 107
   data () {
106 108
     return {
107 109
       postData: {
108
-        ForwardType: '1',
110
+        ForwardType: 'url',
109 111
         ForwardUrl: '',
110 112
         ForwardResourceId: '',
111 113
         Status: '1',
@@ -127,19 +129,30 @@ export default {
127 129
       this.postData.OrgId = this.OrgId
128 130
       this.postData.CaseId = this.CaseId
129 131
     })
132
+    this.updateLocationAllInfo()
133
+    this.GetCourseList({ page: 1, pagesize: 10000 })
130 134
   },
131 135
   computed: {
132 136
     ...mapState({
133
-      positionList: x => x.cms.location,
137
+      positionList: x => x.cms.locationAll,
134 138
       OrgId: x => x.app.user.OrgId,
135 139
       CaseId: x => x.app.cases.default,
140
+    }),
141
+    ...mapCourseState({
142
+      courses: x => x.courseList,
136 143
     })
137 144
   },
138 145
   methods: {
146
+    ...mapCourseActions([
147
+      'GetCourseList',
148
+    ]),
139 149
     ...mapActions(['updateSystemInfo']),
140
-    ...mapCmsActions(['updateLocationInfo']),
150
+    ...mapCmsActions([
151
+      'updateLocationAllInfo',
152
+    ]),
141 153
     submit () {
142
-      if (this.postData.ForwardType === '1') {
154
+      if (this.postData.ForwardType === 'url') {
155
+        this.postData.ForwardResourceId = ''
143 156
         if (this.postData.ForwardUrl === '') {
144 157
           this.$message({
145 158
             message: '链接地址不能为空',
@@ -156,16 +169,38 @@ export default {
156 169
             return false
157 170
           }
158 171
         }
172
+      } else {
173
+        this.postData.ForwardUrl = ''
174
+        if (this.postData.ForwardResourceId === '') {
175
+          this.$message({
176
+            message: '课程不能为空',
177
+            type: 'error',
178
+          })
179
+          return false
180
+        }
181
+      }
182
+      if (!this.postData.LocationIds.length) {
183
+        this.$message({
184
+          message: '图片位置不能为空',
185
+          type: 'error',
186
+        })
187
+        return false
188
+      }
189
+      if (this.postData.Title === '') {
190
+        this.$message({
191
+          message: '标题不能为空',
192
+          type: 'error',
193
+        })
194
+        return false
195
+      }
196
+      if (this.postData.ImageUrl === '') {
197
+        this.$message({
198
+          message: '图片不能为空',
199
+          type: 'error',
200
+        })
201
+        return false
159 202
       }
160
-      this.postData.ForwardType === '1' ? this.postData.ForwardType = 'url' : this.postData.ForwardType = 'course'
161 203
       this.postData.locationids = this.postData.LocationIds.join(',')
162
-      // this.postData.ImageUrl = ''
163
-      // for (let i = 0; i < this.imgsArr.length; i++) {
164
-      //   this.postData.ImageUrl += this.imgsArr[i].response.result.url + ','
165
-      // }
166
-      // if (this.postData.ImageUrl) {
167
-      //   this.postData.ImageUrl = this.postData.ImageUrl.substr(0, this.postData.ImageUrl.length - 1)
168
-      // }
169 204
       this.$ajax(this.$api.cms.addNews.url, {
170 205
         method: this.$api.cms.addNews.method,
171 206
         data: this.postData
@@ -185,21 +220,6 @@ export default {
185 220
     cancel () {
186 221
       this.$router.go(-1)
187 222
     },
188
-    // handlePictureCardPreview (res, file, fileList) {
189
-    //   this.imgs = res.result.url
190
-    //   this.dialogVisible = false
191
-    //   this.imgsArr = fileList
192
-    // },
193
-    // handleRemove (file, fileList) {
194
-    //   this.imgsArr = fileList
195
-    // },
196
-    // exceed () {
197
-    //   this.$message({
198
-    //     message: '超过可传的图片上限',
199
-    //     type: 'info',
200
-    //     duration: 1000
201
-    //   })
202
-    // }
203 223
     handleAvatarSuccess (res, file) {
204 224
       this.postData.ImageUrl = res.result.url
205 225
     }

+ 57
- 61
src/pages/system/cmsManager/newsManager/edit.vue View File

@@ -3,16 +3,16 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <span>跳转类型:</span>
6
+          <span>跳转类型:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%" class="radio">
9
-                <el-radio v-model="postData.ForwardType" label='1' >链接</el-radio>
10
-                <el-radio v-model="postData.ForwardType" label='0' >课程</el-radio>
9
+                <el-radio v-model="postData.ForwardType" label='url' >链接</el-radio>
10
+                <el-radio v-model="postData.ForwardType" label='course' >课程</el-radio>
11 11
             </div>
12 12
           </div>
13 13
         </li>
14
-        <li class="flex-h">
15
-          <span>链接:</span>
14
+        <li class="flex-h" v-if="postData.ForwardType==='url'">
15
+          <span>链接:<em>*</em></span>
16 16
           <div class="flex-item">
17 17
             <div style="width:50%">
18 18
               <el-input
@@ -23,8 +23,23 @@
23 23
             </div>
24 24
           </div>
25 25
         </li>
26
+        <li class="flex-h" v-else>
27
+          <span>课程:<em>*</em></span>
28
+          <div class="flex-item">
29
+            <div style="width:50%">
30
+              <el-select v-model="postData.ForwardResourceId" placeholder="请选择课程">
31
+                <el-option
32
+                  v-for="item in courses.list"
33
+                  :key="item.CourseId"
34
+                  :label="item.CourseName"
35
+                  :value="item.CourseId">
36
+                </el-option>
37
+              </el-select>
38
+            </div>
39
+          </div>
40
+        </li>
26 41
         <li class="flex-h">
27
-          <span>是否发布:</span>
42
+          <span>是否发布:<em>*</em></span>
28 43
           <div class="flex-item">
29 44
             <div style="width:50%" class="radio">
30 45
               <el-radio v-model="postData.Status" label='1' >是</el-radio>
@@ -33,7 +48,7 @@
33 48
           </div>
34 49
         </li>
35 50
         <li class="flex-h">
36
-          <span>图片位置:</span>
51
+          <span>图片位置:<em>*</em></span>
37 52
           <div class="flex-item">
38 53
             <div style="width:50%">
39 54
               <el-select style="width:100%" v-model="postData.LocationIds" multiple placeholder="请选择">
@@ -48,7 +63,7 @@
48 63
           </div>
49 64
         </li>
50 65
         <li class="flex-h">
51
-          <span>标题:</span>
66
+          <span>标题:<em>*</em></span>
52 67
           <div class="flex-item">
53 68
             <div style="width:50%">
54 69
               <el-input
@@ -60,22 +75,8 @@
60 75
           </div>
61 76
         </li>
62 77
         <li class="flex-h">
63
-          <span>图片:</span>
78
+          <span>图片:<em>*</em></span>
64 79
           <div class="flex-item">
65
-            <!-- <el-upload
66
-              action='string'
67
-              :http-request="toolClass.upload"
68
-              :limit='limit'
69
-              list-type="picture-card"
70
-              :file-list='imgsArr'
71
-              :on-success="handlePictureCardPreview"
72
-              :on-remove="handleRemove"
73
-              :on-exceed="exceed">
74
-              <i class="el-icon-plus"></i>
75
-            </el-upload>
76
-            <el-dialog :visible.sync="dialogVisible">
77
-              <img width="100%" :src="imgs" alt="">
78
-            </el-dialog> -->
79 80
             <el-upload
80 81
               class="avatar-uploader"
81 82
               action='string'
@@ -104,7 +105,7 @@ export default {
104 105
   data () {
105 106
     return {
106 107
       postData: {
107
-        ForwardType: '1',
108
+        ForwardType: 'url',
108 109
         ForwardUrl: '',
109 110
         ForwardResourceId: '',
110 111
         Status: '1',
@@ -134,7 +135,8 @@ export default {
134 135
   methods: {
135 136
     ...mapCmsActions(['updateLocationInfo']),
136 137
     submit () {
137
-      if (this.postData.ForwardType === '1') {
138
+      if (this.postData.ForwardType === 'url') {
139
+        this.postData.ForwardResourceId = ''
138 140
         if (this.postData.ForwardUrl === '') {
139 141
           this.$message({
140 142
             message: '链接地址不能为空',
@@ -151,16 +153,38 @@ export default {
151 153
             return false
152 154
           }
153 155
         }
156
+      } else {
157
+        this.postData.ForwardUrl = ''
158
+        if (this.postData.ForwardResourceId === '') {
159
+          this.$message({
160
+            message: '课程不能为空',
161
+            type: 'error',
162
+          })
163
+          return false
164
+        }
165
+      }
166
+      if (!this.postData.LocationIds.length) {
167
+        this.$message({
168
+          message: '图片位置不能为空',
169
+          type: 'error',
170
+        })
171
+        return false
172
+      }
173
+      if (this.postData.Title === '') {
174
+        this.$message({
175
+          message: '标题不能为空',
176
+          type: 'error',
177
+        })
178
+        return false
179
+      }
180
+      if (this.postData.ImageUrl === '') {
181
+        this.$message({
182
+          message: '图片不能为空',
183
+          type: 'error',
184
+        })
185
+        return false
154 186
       }
155
-      this.postData.ForwardType === '1' ? this.postData.ForwardType = 'url' : this.postData.ForwardType = 'course'
156 187
       this.postData.locationids = this.postData.LocationIds.join(',')
157
-      // this.postData.ImageUrl = ''
158
-      // for (let i = 0; i < this.imgsArr.length; i++) {
159
-      //   this.postData.ImageUrl += this.imgsArr[i].response.result.url + ','
160
-      // }
161
-      // if (this.postData.ImageUrl) {
162
-      //   this.postData.ImageUrl = this.postData.ImageUrl.substr(0, this.postData.ImageUrl.length - 1)
163
-      // }
164 188
       this.$ajax(this.$api.cms.editNews.url, {
165 189
         method: this.$api.cms.editNews.method,
166 190
         urlData: {
@@ -183,21 +207,6 @@ export default {
183 207
     cancel () {
184 208
       this.$router.go(-1)
185 209
     },
186
-    // handlePictureCardPreview (res, file, fileList) {
187
-    //   this.imgs = res.result.url
188
-    //   this.dialogVisible = false
189
-    //   this.imgsArr = fileList
190
-    // },
191
-    // handleRemove (file, fileList) {
192
-    //   this.imgsArr = fileList
193
-    // },
194
-    // exceed () {
195
-    //   this.$message({
196
-    //     message: '超过可传的图片上限',
197
-    //     type: 'info',
198
-    //     duration: 1000
199
-    //   })
200
-    // },
201 210
     getDetail () {
202 211
       this.$ajax(this.$api.cms.newsDetail.url, {
203 212
         method: this.$api.cms.newsDetail.method,
@@ -208,22 +217,9 @@ export default {
208 217
         res.ForwardType === 'url' ? res.ForwardType = '1' : res.ForwardType = '0'
209 218
         res.Status += ''
210 219
         res.LocationIds = res.NewsLocations.reduce((previousValue, currentValue, index, array) => {
211
-          console.log(previousValue)
212 220
           previousValue.push(currentValue.LocationId)
213 221
           return previousValue
214 222
         }, [])
215
-        console.log(res.LocationIds)
216
-        // let imgsArr = []
217
-        // let item = {
218
-        //   url: res.ImageUrl,
219
-        //   response: {
220
-        //     result: {
221
-        //       url: res.ImageUrl
222
-        //     }
223
-        //   }
224
-        // }
225
-        // imgsArr.push(item)
226
-        // this.imgsArr = imgsArr
227 223
         this.postData = res
228 224
       }).catch(msg => {
229 225
 

+ 1
- 1
src/pages/system/courseManager/courseList/add.vue View File

@@ -344,7 +344,7 @@ export default {
344 344
     }
345 345
   },
346 346
   mounted () {
347
-    this.updateLocationInfo()
347
+    this.updateLocationInfo(false)
348 348
     this.GetCourseTagList({ pagesize: 100 })
349 349
     const { id } = this.$route.query
350 350
     if (id && id !== '') {

+ 2
- 2
src/pages/system/courseManager/courseList/index.vue View File

@@ -57,14 +57,14 @@
57 57
         :data="courses.list"
58 58
         stripe
59 59
         style="width: 100%">
60
-        <el-table-column
60
+        <!-- <el-table-column
61 61
           prop="CourseName"
62 62
           label="发布状态"
63 63
           width="150">
64 64
           <template slot-scope="scope">
65 65
             <label>{{scope.row.Status===1?'已发布':'未发布'}}</label>
66 66
           </template>
67
-        </el-table-column>
67
+        </el-table-column> -->
68 68
         <el-table-column
69 69
           prop="CourseName"
70 70
           label="课程名称"

+ 1
- 1
src/pages/system/courseManager/fiveA/add.vue View File

@@ -31,7 +31,7 @@
31 31
           <div class="flex-item">
32 32
             <div style="width:50%">
33 33
               <el-input
34
-                placeholder="请输入咨询分类"
34
+                placeholder="请输入资讯分类"
35 35
                 v-model="postData.Consult"
36 36
                 clearable>
37 37
               </el-input>

+ 5
- 10
src/pages/system/courseManager/fiveA/index.vue View File

@@ -34,7 +34,7 @@
34 34
             </a>
35 35
           </template>
36 36
         </el-table-column>
37
-        <el-table-column label="操作">
37
+        <el-table-column label="操作" width="300">
38 38
           <template slot-scope="scope">
39 39
             <el-button
40 40
               size="mini"
@@ -52,7 +52,7 @@
52 52
               <el-button
53 53
               size="mini"
54 54
               type="success"
55
-              v-if="scope.row.OrderNo !== tableData.length && tableData.length > 1"
55
+              v-if="scope.row.OrderNo !== tableData.length && tableData.length > 1 && scope.row.index !== (tableData.length - 1)"
56 56
               @click="orderChange(scope.$index, scope.row, 'down')">下移</el-button>
57 57
           </template>
58 58
         </el-table-column>
@@ -135,10 +135,10 @@ export default {
135 135
           issys: 0
136 136
         }
137 137
       }).then(res => {
138
-        console.log(res)
138
+        for (var n = 0; n < res.length; n++) {
139
+          res[n].index = n
140
+        }
139 141
         this.tableData = res
140
-      }).catch(msg => {
141
-
142 142
       })
143 143
     },
144 144
     deleteLocation (id) {
@@ -148,7 +148,6 @@ export default {
148 148
           id: id
149 149
         }
150 150
       }).then(res => {
151
-        console.log(res)
152 151
         this.$message({
153 152
           type: 'success',
154 153
           message: '删除成功!'
@@ -171,7 +170,6 @@ export default {
171 170
           locations: row.LocationId + ':' + (index + 2) + ',' + down + ':' + (index + 1)
172 171
         }
173 172
       }
174
-      console.log(data)
175 173
       this.$ajax(this.$api.cms.orderChange.url, {
176 174
         method: this.$api.cms.orderChange.method,
177 175
         urlData: {
@@ -179,10 +177,7 @@ export default {
179 177
         },
180 178
         data: data
181 179
       }).then(res => {
182
-        console.log(res)
183 180
         this.getList()
184
-      }).catch(msg => {
185
-
186 181
       })
187 182
     }
188 183
   }

+ 10
- 4
src/pages/system/courseManager/scheduleManager/index.vue View File

@@ -42,41 +42,45 @@
42 42
           </li>
43 43
           <li class="flex-h">
44 44
             <span>课时名称:</span>
45
-            <div class="flex-item" v-if="currentCourseItem.CourseStatus===0">
45
+            <div class="flex-item">
46 46
               <div>
47 47
                 <el-input
48
+                  v-if="currentCourseItem.CourseStatus===0"
48 49
                   placeholder="请输入课时名称"
49 50
                   v-model="currentCourseItem.DetailName"
50 51
                   clearable>
51 52
                 </el-input>
53
+                <span v-else>{{currentCourseItem.DetailName}}</span>
52 54
               </div>
53 55
             </div>
54
-            <span v-else>{{currentCourseItem.DetailName}}</span>
55 56
           </li>
56 57
           <li class="flex-h">
57 58
             <span>课时简介:</span>
58
-            <div class="flex-item" v-if="currentCourseItem.CourseStatus===0">
59
+            <div class="flex-item">
59 60
               <div>
60 61
                 <el-input
62
+                  v-if="currentCourseItem.CourseStatus===0"
61 63
                   type="textarea"
62 64
                   placeholder="请输入课时简介"
63 65
                   v-model="currentCourseItem.DetailDesc"
64 66
                   clearable>
65 67
                 </el-input>
68
+                <span v-else>{{currentCourseItem.DetailDesc}}</span>
66 69
               </div>
67 70
             </div>
68
-            <span v-else>{{currentCourseItem.DetailDesc}}</span>
69 71
           </li>
70 72
           <li class="flex-h">
71 73
             <span>开始时间:</span>
72 74
             <!-- <div class="flex-item" v-if="currentCourseItem.CourseStatus===0">
73 75
               <div>
74 76
                 <el-date-picker
77
+                  v-if="currentCourseItem.CourseStatus===0"
75 78
                   v-model="currentCourseItem.BeginDate"
76 79
                   type="datetime"
77 80
                   placeholder="选择开始日期"
78 81
                   >
79 82
                 </el-date-picker>
83
+                <span v-else>{{this.toolClass.dateFormat(currentCourseItem.BeginDate, 'yyyy-MM-dd hh:mm')}}</span>
80 84
               </div>
81 85
             </div> -->
82 86
             <span>{{this.toolClass.dateFormat(currentCourseItem.BeginDate, 'yyyy-MM-dd hh:mm')}}</span>
@@ -86,10 +90,12 @@
86 90
             <!-- <div class="flex-item" v-if="currentCourseItem.CourseStatus===0">
87 91
               <div>
88 92
                 <el-date-picker
93
+                  v-if="currentCourseItem.CourseStatus===0"
89 94
                   v-model="currentCourseItem.EndDate"
90 95
                   type="datetime"
91 96
                   placeholder="选择结束日期">
92 97
                 </el-date-picker>
98
+                <span v-else>{{this.toolClass.dateFormat(currentCourseItem.EndDate, 'yyyy-MM-dd hh:mm')}}</span>
93 99
               </div>
94 100
             </div> -->
95 101
             <span>{{this.toolClass.dateFormat(currentCourseItem.EndDate, 'yyyy-MM-dd hh:mm')}}</span>

+ 14
- 0
src/pages/system/courseManager/scheduleManager/page.scss View File

@@ -8,6 +8,20 @@
8 8
       line-height: 40px;
9 9
       margin-right: 10px;
10 10
     }
11
+    >div{
12
+      div{
13
+        width: 100%;
14
+        position: relative;
15
+        overflow: hidden;
16
+        span{
17
+          width: 100%;
18
+          display: block;
19
+          line-height: 20px;
20
+          padding: 10px 0;
21
+          word-break: break-all;
22
+        }
23
+      }
24
+    }
11 25
   }
12 26
 }
13 27
 

+ 9
- 1
src/pages/system/dashboard/index.vue View File

@@ -94,7 +94,7 @@ export default {
94 94
     }),
95 95
     CaseId: {
96 96
       get () {
97
-        return this.postData.caseid || this.defaultCaseId
97
+        return this.postData.caseid || this.defaultCaseId || this.cases[0].CaseId
98 98
       },
99 99
       set (val) {
100 100
         this.postData.caseid = val
@@ -103,16 +103,24 @@ export default {
103 103
   },
104 104
   mounted () {
105 105
     this.$nextTick(function () {
106
+      this.postData.caseid = this.postData.caseid || this.cases[0].CaseId
106 107
       this.getDashboardData({
107 108
         caseid: this.postData.caseid
108 109
       }).then((res) => {
109 110
         console.log(JSON.stringify(res))
110 111
       })
112
+      this.getDashboardBottomData({
113
+        caseid: this.postData.caseid,
114
+        statype: 'week'
115
+      }).then((res) => {
116
+        console.log(JSON.stringify(res))
117
+      })
111 118
     })
112 119
   },
113 120
   methods: {
114 121
     ...mapStaActions([
115 122
       'getDashboardData',
123
+      'getDashboardBottomData',
116 124
     ]),
117 125
   }
118 126
 }

+ 2
- 2
src/pages/system/dataStatistics/cardCouponUsedList/index.vue View File

@@ -176,7 +176,7 @@ export default {
176 176
       },
177 177
       currentList: [],
178 178
       typeList: [{
179
-        value: '不限',
179
+        value: '',
180 180
         id: ''
181 181
       }, {
182 182
         value: '案场',
@@ -192,7 +192,7 @@ export default {
192 192
         id: 'give'
193 193
       }],
194 194
       statusList: [{
195
-        value: '不限',
195
+        value: '',
196 196
         id: ''
197 197
       }, {
198 198
         value: '未使用',

+ 1
- 1
src/pages/system/dataStatistics/courseVerifyList/index.vue View File

@@ -139,7 +139,7 @@ export default {
139 139
         pagesize: 10, // 请求数据量
140 140
       },
141 141
       statusList: [{
142
-        value: '不限',
142
+        value: '',
143 143
         id: ''
144 144
       }, {
145 145
         value: '未使用',

+ 0
- 4
src/pages/system/dataStatistics/frontEndUserList/index.vue View File

@@ -32,10 +32,6 @@
32 32
           prop="Points"
33 33
           label="积分">
34 34
         </el-table-column>
35
-        <el-table-column
36
-          prop="OpenId"
37
-          label="openId">
38
-        </el-table-column>
39 35
         <el-table-column
40 36
           label="创建时间">
41 37
           <template slot-scope="scope">

+ 3
- 3
src/pages/system/dataStatistics/goodsOrderList/index.vue View File

@@ -111,7 +111,7 @@
111 111
             <div style="font-size:12px;">下单人:{{returnListItem(goodsOrderList, index).CustomerName}}</div>
112 112
             <span style="display:block;margin-top:10px;font-size:12px;">下单时间:{{toolClass.dateFormat(returnListItem(goodsOrderList, index).CreateDate)}}</span>
113 113
           </div>
114
-          <div style="padding:10px 10px;font-size:12px;">备注:{{returnListItem(goodsOrderList, index).Remark}}</div>
114
+          <!-- <div style="padding:10px 10px;font-size:12px;">备注:{{returnListItem(goodsOrderList, index).Remark}}</div> -->
115 115
           <div style="text-align: right;font-size: 12px;">城的空间.诚咖啡</div>
116 116
           <div style="height:10px"></div>
117 117
         </div>
@@ -148,7 +148,7 @@ export default {
148 148
         pagesize: 10, // 请求数据量
149 149
       },
150 150
       typeList: [{
151
-        value: '不限',
151
+        value: '',
152 152
         id: ''
153 153
       }, {
154 154
         value: '销售',
@@ -161,7 +161,7 @@ export default {
161 161
         id: 'customer'
162 162
       }],
163 163
       statusList: [{
164
-        value: '不限',
164
+        value: '',
165 165
         id: ''
166 166
       }, {
167 167
         value: '已下单',

+ 45
- 41
src/pages/system/goodsManager/goodManager/edit.vue View File

@@ -3,7 +3,7 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
          <li class="flex-h">
6
-          <span>选择案场:</span>
6
+          <span>选择案场:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-select v-model="Case" placeholder="请选择">
@@ -18,7 +18,7 @@
18 18
           </div>
19 19
         </li>
20 20
         <li class="flex-h">
21
-          <span>商品名称:</span>
21
+          <span>商品名称:<em>*</em></span>
22 22
           <div class="flex-item">
23 23
             <div style="width:50%">
24 24
               <el-input
@@ -30,22 +30,9 @@
30 30
           </div>
31 31
         </li>
32 32
         <li class="flex-h">
33
-          <span>商品图片:</span>
33
+          <span>商品图片:<em>*</em></span>
34 34
           <div class="flex-item">
35 35
             <div style="width:50%">
36
-              <!-- 多选 -->
37
-              <!-- <el-upload
38
-                action='string'
39
-                :http-request="toolClass.upload"
40
-                :limit='limit'
41
-                list-type="picture-card"
42
-                :file-list='imgsArr'
43
-                :on-success="handlePictureCardPreview"
44
-                :on-remove="handleRemove"
45
-                :on-exceed="exceed">
46
-                <i class="el-icon-plus"></i>
47
-              </el-upload> -->
48
-              <!-- 单选 -->
49 36
               <el-upload
50 37
                 class="avatar-uploader"
51 38
                 action='string'
@@ -59,7 +46,7 @@
59 46
           </div>
60 47
         </li>
61 48
         <li class="flex-h">
62
-          <span>商品价格:</span>
49
+          <span>商品价格:<em>*</em></span>
63 50
           <div class="flex-item">
64 51
             <div style="width:50%">
65 52
               <el-input
@@ -86,7 +73,7 @@
86 73
           </div>
87 74
         </li>
88 75
         <li class="flex-h">
89
-          <span>商品类别:</span>
76
+          <span>商品类别:<em>*</em></span>
90 77
           <div class="flex-item">
91 78
             <div style="width:50%">
92 79
               <el-select v-model="detail.TypeId" placeholder="请选择商品类型">
@@ -139,7 +126,7 @@ export default {
139 126
         return this.detail.CaseId || this.caseid
140 127
       },
141 128
       set (val) {
142
-        this.UpdateInfo({...this.detail, CaseId: val})
129
+        this.UpdateInfo({ ...this.detail, CaseId: val })
143 130
         this.detail.TypeId = ''
144 131
         this.GetGoodTypes({ pagesize: 1000, caseid: this.Case })
145 132
         this.GetGoodSpecs({ pagesize: 1000, caseid: this.Case })
@@ -147,18 +134,13 @@ export default {
147 134
     },
148 135
     detailSpecs: {
149 136
       get () {
150
-        console.log(this.infoSpecs || (this.detail.Specs || []).map(x => x.SpecId))
137
+        // console.log(this.infoSpecs || (this.detail.Specs || []).map(x => x.SpecId))
151 138
         return this.infoSpecs || (this.detail.Specs || []).map(x => x.SpecId)
152 139
       },
153 140
       set (val) {
154 141
         this.infoSpecs = val
155 142
       },
156 143
     },
157
-    // imgsArr () {
158
-    //   return (this.detail.Images || []).map(x => {
159
-    //     return {...x, url: x.url || x.ImgUrl}
160
-    //   })
161
-    // },
162 144
     Image () {
163 145
       return ((this.detail.Images || [])[0] || {}).ImgUrl
164 146
     }
@@ -174,14 +156,49 @@ export default {
174 156
       'GetGoodSpecs',
175 157
     ]),
176 158
     submit () {
177
-      this.detail.specs = JSON.stringify(this.detailSpecs.map(x => ({SpecId: x, GoodsPrice: this.detail.Price})))
178
-      this.detail.images = this.detail.Images.map(x => {
159
+      this.detail.specs = JSON.stringify(this.detailSpecs.map(x => ({ SpecId: x, GoodsPrice: this.detail.Price })))
160
+      this.detail.images = (this.detail.Images || []).map(x => {
179 161
         if (x.response) {
180 162
           return x.response.result.url
181 163
         } else {
182 164
           return x.ImgUrl
183 165
         }
184 166
       }).join(',')
167
+      if ((this.detail.CaseId || '') === '') {
168
+        this.$message({
169
+          type: 'error',
170
+          message: '案场不能为空'
171
+        })
172
+        return false
173
+      }
174
+      if ((this.detail.GoodsName || '') === '') {
175
+        this.$message({
176
+          type: 'error',
177
+          message: '商品名称不能为空'
178
+        })
179
+        return false
180
+      }
181
+      if ((this.detail.Images || '') === '') {
182
+        this.$message({
183
+          type: 'error',
184
+          message: '图片不能为空'
185
+        })
186
+        return false
187
+      }
188
+      if ((this.detail.Price || '') === '') {
189
+        this.$message({
190
+          type: 'error',
191
+          message: '价格不能为空'
192
+        })
193
+        return false
194
+      }
195
+      if ((this.detail.TypeId || '') === '') {
196
+        this.$message({
197
+          type: 'error',
198
+          message: '类别不能为空'
199
+        })
200
+        return false
201
+      }
185 202
       if ((this.detail.GoodsId || '') === '') {
186 203
         this.detail.OrgId = this.orgid
187 204
         if (!this.detail.CaseId || this.detail.CaseId === '') {
@@ -200,21 +217,8 @@ export default {
200 217
     cancel () {
201 218
       this.$router.go(-1)
202 219
     },
203
-    // handlePictureCardPreview (res, file, fileList) {
204
-    //   this.detail.Images = fileList
205
-    // },
206
-    // handleRemove (file, fileList) {
207
-    //   this.detail.Images = fileList
208
-    // },
209
-    // exceed () {
210
-    //   this.$message({
211
-    //     message: '超过可传的图片上限',
212
-    //     type: 'info',
213
-    //     duration: 1000
214
-    //   })
215
-    // },
216 220
     handleAvatarSuccess (res, file) {
217
-      this.UpdateInfo({...this.detail, Images: [{ImgUrl: res.result.url}]})
221
+      this.UpdateInfo({ ...this.detail, Images: [{ ImgUrl: res.result.url }] })
218 222
     },
219 223
   },
220 224
   created () {

+ 55
- 47
src/pages/system/marketingActivities/activitiesList/index.vue View File

@@ -1,34 +1,36 @@
1 1
 <template>
2 2
   <div class="subPage">
3
-    <div class="title">
4
-      活动列表
3
+    <div class="system-table-search">
4
+      <div class="flex-h">
5
+        <div class="flex-item flex-h">
6
+          <el-button size="mini" type="success" @click="redirection('addActivities')">新增活动</el-button>
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
+        <el-button
26
+          size="mini"
27
+          type="primary" @click="clickList">搜索</el-button>
28
+      </div>
29
+      <div class="moreFilter"></div>
5 30
     </div>
6
-    <!-- <div class="head-div">
7
-      每页数量/条
8
-      <template>
9
-        <el-select v-model="postData.pageSize" placeholder="请选择">
10
-          <el-option
11
-            v-for="item in options"
12
-            :key="item.value"
13
-            :label="item.label"
14
-            :value="item.value">
15
-          </el-option>
16
-        </el-select>
17
-      </template>
18
-    </div> -->
19
-    <!-- 包含 按钮的div -->
20
-    <div class="button-div">
21
-      <el-row>
22
-        <el-button type="warning" style="float: right;">重置</el-button>
23
-        <el-button type="primary" style="float: right; margin-right: 10px;" @click="clickList">查询</el-button>
24
-        <el-button type="success" style="float: right;" @click="redirection('addActivities')">新增</el-button>
25
-      </el-row>
26
-    </div>
27
-    <div class="content">
28
-      <template>
29
-        <el-table
31
+    <div class="system-table-box">
32
+      <el-table
30 33
           :data="tableData"
31
-          border
32 34
           style="width: 100%">
33 35
           <el-table-column
34 36
             prop="CaseName"
@@ -37,8 +39,7 @@
37 39
           </el-table-column>
38 40
           <el-table-column
39 41
             prop="ActivityName"
40
-            label="活动名称"
41
-            width="180">
42
+            label="活动名称">
42 43
           </el-table-column>
43 44
           <el-table-column
44 45
             prop="ActivityType"
@@ -70,29 +71,36 @@
70 71
           </el-table-column>
71 72
           <el-table-column
72 73
             prop="address"
73
-            label="操作">
74
+            label="操作"
75
+            width="200">
74 76
             <template slot-scope="scope">
75
-              <div v-if="scope.row.Status === 0">
76
-                <a href="#" @click="normal(scope.row.ActivityId)">启用</a>&nbsp;&nbsp;<a href="#" @click="delet(scope.row.ActivityId)">删除</a>
77
-              </div>
78
-              <div v-else>
79
-                <a href="#" @click="disable(scope.row.ActivityId)">停用</a>
80
-              </div>
77
+              <el-button
78
+                v-if="scope.row.Status === 0"
79
+                size="mini"
80
+                type="danger"
81
+                @click="delet(scope.row.ActivityId)">删除</el-button>
82
+              <el-button
83
+                v-if="scope.row.Status === 1"
84
+                size="mini"
85
+                type="warning"
86
+                @click="disable(scope.row.ActivityId)">停用</el-button>
87
+              <el-button
88
+                v-else
89
+                size="mini"
90
+                type="success"
91
+                @click="normal(scope.row.ActivityId)">启用</el-button>
81 92
             </template>
82 93
           </el-table-column>
83 94
         </el-table>
84
-      </template>
85
-    </div>
86
-    <div class="block">
87
-      <el-pagination
88
-        @size-change="handleSizeChange"
89
-        @current-change="handleCurrentChange"
90
-        :current-page.sync="currentPage2"
91
-        :page-size="Number(value)"
92
-        layout="prev, pager, next, jumper"
93
-        :total="total">
94
-      </el-pagination>
95 95
     </div>
96
+    <el-pagination
97
+      @size-change="handleSizeChange"
98
+      @current-change="handleCurrentChange"
99
+      :current-page.sync="currentPage2"
100
+      :page-size="Number(value)"
101
+      layout="prev, pager, next, jumper"
102
+      :total="total">
103
+    </el-pagination>
96 104
   </div>
97 105
 </template>
98 106
 <script>

+ 67
- 97
src/pages/system/marketingActivities/addActivities/index.vue View File

@@ -1,82 +1,72 @@
1 1
 <template>
2 2
   <div class="subPage">
3
-    <div class="content">
4
-      <div class="input-div">
5
-        <div style="float: left; font-size: 20px;">
6
-          活动名称:
7
-        </div>
8
-        <div style="float: left; margin-left: 30px;">
9
-          <template>
10
-            <el-input v-model="activityName" placeholder="请输入内容" style="width: 300px;"></el-input>
11
-          </template>
12
-        </div>
13
-      </div>
14
-      <div class="input-div">
15
-        <div style="float: left; font-size: 20px;">
16
-          活动类型:
17
-        </div>
18
-        <div style="float: left; margin-left: 30px;">
19
-          <template>
20
-            <el-select v-model="regValue" placeholder="请选择" style="width: 300px;">
21
-              <el-option
22
-                v-for="item in regOptions"
23
-                :key="item.regValue"
24
-                :label="item.label"
25
-                :value="item.regValue">
26
-              </el-option>
27
-            </el-select>
28
-          </template>
29
-        </div>
30
-      </div>
31
-      <div class="input-div">
32
-        <div style="float: left; font-size: 20px;">
33
-          赠券卡券:
34
-        </div>
35
-        <div style="float: left; margin-left: 30px;">
36
-          <template>
37
-            <el-select v-model="giftValue" placeholder="请选择" style="width: 300px;">
38
-              <el-option
39
-                v-for="item in giftOptions"
40
-                :key="item.giftValue"
41
-                :label="item.label"
42
-                :value="item.giftValue">
43
-              </el-option>
44
-            </el-select>
45
-          </template>
46
-        </div>
47
-      </div>
48
-      <div class="input-div">
49
-        <div style="float: left; font-size: 20px;">
50
-           赠券数量:
51
-        </div>
52
-        <div style="float: left; margin-left: 30px;">
53
-          <template>
54
-            <el-input v-model="giftNum" placeholder="请输入内容" style="width: 300px;"></el-input>
55
-          </template>
56
-        </div>
57
-      </div>
58
-      <div class="input-div">
59
-        <div style="float: left; font-size: 20px;">
60
-          活动描述:
61
-        </div>
62
-        <div style="float: left; margin-left: 30px;">
63
-          <template>
64
-            <el-input
65
-              type="textarea"
66
-              :rows="10"
67
-              placeholder="请输入内容"
68
-              v-model="desc" style="width: 300px; height: 200px;">
69
-            </el-input>
70
-          </template>
71
-        </div>
72
-      </div>
73
-      <div class="input-div">
74
-        <el-row>
75
-          <el-button type="warning" style="float: right;" @click="redirection('activitiesList')">返回</el-button>
76
-          <el-button type="primary" style="float: right; margin-right: 10px;" @click="submitData">提交</el-button>
77
-        </el-row>
78
-      </div>
79
-    </div>
3
+    <form class="mainForm">
4
+      <ul>
5
+        <li class="flex-h">
6
+          <span>活动名称:</span>
7
+          <div class="flex-item">
8
+            <div style="width:50%">
9
+              <el-input v-model="activityName" placeholder="请输入内容"></el-input>
10
+            </div>
11
+          </div>
12
+        </li>
13
+        <li class="flex-h">
14
+          <span>活动类型:</span>
15
+          <div class="flex-item">
16
+            <div>
17
+              <el-select v-model="regValue" placeholder="请选择">
18
+                <el-option
19
+                  v-for="item in regOptions"
20
+                  :key="item.regValue"
21
+                  :label="item.label"
22
+                  :value="item.regValue">
23
+                </el-option>
24
+              </el-select>
25
+            </div>
26
+          </div>
27
+        </li>
28
+        <li class="flex-h">
29
+          <span>赠券卡券:</span>
30
+          <div class="flex-item">
31
+            <div>
32
+              <el-select v-model="giftValue" placeholder="请选择">
33
+                <el-option
34
+                  v-for="item in giftOptions"
35
+                  :key="item.giftValue"
36
+                  :label="item.label"
37
+                  :value="item.giftValue">
38
+                </el-option>
39
+              </el-select>
40
+            </div>
41
+          </div>
42
+        </li>
43
+        <li class="flex-h">
44
+          <span>赠券数量:</span>
45
+          <div class="flex-item">
46
+            <div style="width:50%">
47
+              <el-input v-model="giftNum" placeholder="请输入内容"></el-input>
48
+            </div>
49
+          </div>
50
+        </li>
51
+        <li class="flex-h">
52
+          <span>活动描述:</span>
53
+          <div class="flex-item">
54
+            <div>
55
+              <el-input
56
+                type="textarea"
57
+                :rows="10"
58
+                placeholder="请输入内容"
59
+                v-model="desc">
60
+              </el-input>
61
+            </div>
62
+          </div>
63
+        </li>
64
+        <li style="text-align:center">
65
+          <el-button type="warning" size="mini" @click="redirection('activitiesList')">返回</el-button>
66
+          <el-button type="primary" size="mini" @click="submitData">提交</el-button>
67
+        </li>
68
+      </ul>
69
+    </form>
80 70
   </div>
81 71
 </template>
82 72
 <script>
@@ -120,16 +110,13 @@ export default {
120 110
     giftData: {
121 111
       get () {
122 112
         let jsonData = this.$data.giftList
123
-        console.log('请求到的:' + this.$data.giftList)
124 113
         let data = []
125 114
         for (let i = 0; i < jsonData.length; i++) {
126 115
           let tempData = []
127 116
           tempData.giftValue = jsonData[i].CouponId
128 117
           tempData.label = jsonData[i].CouponName
129
-          console.log('卡券编号:' + tempData.giftValue + ' ' + tempData.label)
130 118
           data.push(tempData)
131 119
         }
132
-        console.log('giftData 数据:')
133 120
         return data
134 121
       }
135 122
     }
@@ -141,22 +128,6 @@ export default {
141 128
     submitData () { // 提交数据
142 129
       // 判断是否提交成功
143 130
       // 提交成功,跳转页面
144
-      // let subData = []
145
-      // subData.activityName = this.$data.activityName
146
-      // subData.activityType = this.$data.regValue
147
-      // let obj = []
148
-      // obj.giftValue = this.$data.giftValue
149
-      // obj.giftNum = this.$data.giftNum
150
-      // obj.desc = this.$data.desc
151
-      // subData.resourceDesc = obj
152
-
153
-      // console.log(subData)
154
-
155
-      // let obj = []
156
-      // obj.giftValue = this.$data.giftValue
157
-      // obj.giftNum = this.$data.giftNum
158
-      // obj.desc = this.$data.desc
159
-
160 131
       let tempGiftOptions = this.$data.giftOptions
161 132
       let tempGiftValue = this.$data.giftValue
162 133
       for (let i = 0; i < tempGiftOptions.length; i++) {
@@ -166,7 +137,6 @@ export default {
166 137
         }
167 138
       }
168 139
       let jsonString = '{"giftValue":"' + this.$data.giftValue + '","giftLabel":"' + this.$data.giftLabel + '","giftNum":"' + this.$data.giftNum + '","desc":"' + this.$data.desc + '"}'
169
-
170 140
       this.$ajax(this.$api.marketingActivities.addMarketing.url, {
171 141
         method: this.$api.marketingActivities.addMarketing.method,
172 142
         queryData: {activityName: this.$data.activityName, activityType: this.$data.regValue, resourceDesc: jsonString, CaseId: this.defaultCaseId}

+ 4
- 3
src/pages/system/newOrder/caseRecord/index.vue View File

@@ -194,7 +194,7 @@ export default {
194 194
         })
195 195
         return
196 196
       }
197
-      this.AddRecord({...this.detail, callback: this.afterSave, Month: this.toolClass.dateFormat(this.detail.Month, 'yyyy-MM')})
197
+      this.AddRecord({ ...this.detail, callback: this.afterSave, Month: this.toolClass.dateFormat(this.detail.Month, 'yyyy-MM') })
198 198
     },
199 199
     afterSave () {
200 200
       this.$message({
@@ -205,14 +205,15 @@ export default {
205 205
       this.getList()
206 206
     },
207 207
     getList () {
208
-      this.GetRecordList({...this.postData, caseid: this.CaseId})
208
+      this.GetRecordList({ ...this.postData, caseid: this.CaseId })
209 209
     },
210 210
     handleCurrentChange (val) { // 跳转到分页
211 211
       this.postData.page = val
212 212
       this.getList()
213 213
     },
214 214
     handleReport (row) {
215
-      this.GetOrdersByRecord({id: row.RecordId, callback: this.ordersExport})
215
+      // this.GetOrdersByRecord({id: row.RecordId, callback: this.ordersExport})
216
+      window.location.href = `${this.toolClass.ReplaceOrg(this.$api.goodsOrder.getOrdersByRecord.url.replace(':id', row.RecordId))}?token=${localStorage.getItem('JWT')}`
216 217
     },
217 218
     handleAdd () {
218 219
       this.detail = {

+ 2
- 2
src/pages/system/newOrder/newOrderList/index.vue View File

@@ -42,7 +42,7 @@
42 42
               <span style="display:inline-block;width:20%;text-align:right">× {{item1.Number}}</span>
43 43
             </div>
44 44
           </div>
45
-          <div style="padding:10px 20px;border-bottom:1px solid #cccccc">备注:{{item.Remark}}</div>
45
+          <!-- <div style="padding:10px 20px;border-bottom:1px solid #cccccc">备注:{{item.Remark}}</div> -->
46 46
           <div style="padding:10px 20px;" @click="printPdf(`item${index}`)">下单人:{{item.UserName}}</div>
47 47
         </div>
48 48
         <div class="print-area" :class="'item' + index" style="width:180px;">
@@ -63,7 +63,7 @@
63 63
             <div style="font-size:12px;">下单人:{{item.UserName}}</div>
64 64
             <span style="display:block;margin-top:10px;font-size:12px;">下单时间:{{toolClass.dateFormat(item.CreateDate)}}</span>
65 65
           </div>
66
-          <div style="padding:10px 10px;font-size:12px;">备注:{{item.Remark}}</div>
66
+          <!-- <div style="padding:10px 10px;font-size:12px;">备注:{{item.Remark}}</div> -->
67 67
           <div style="text-align: right;font-size: 12px;">城的空间.诚咖啡</div>
68 68
           <div style="height:10px"></div>
69 69
         </div>

+ 19
- 13
src/pages/system/systemSet/userManager/add.vue View File

@@ -3,7 +3,7 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <span>帐户名称:</span>
6
+          <span>帐户名称:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-input
@@ -39,7 +39,7 @@
39 39
           </div>
40 40
         </li>
41 41
         <li class="flex-h">
42
-          <span>真实姓名:</span>
42
+          <span>真实姓名:<em>*</em></span>
43 43
           <div class="flex-item">
44 44
             <div style="width:50%">
45 45
               <el-input
@@ -51,7 +51,7 @@
51 51
           </div>
52 52
         </li>
53 53
         <li class="flex-h">
54
-          <span>邮箱:</span>
54
+          <span>邮箱:<em>*</em></span>
55 55
           <div class="flex-item">
56 56
             <div style="width:50%">
57 57
               <el-input
@@ -75,7 +75,7 @@
75 75
           </div>
76 76
         </li>
77 77
         <li class="flex-h">
78
-          <span>手机号:</span>
78
+          <span>手机号:<em>*</em></span>
79 79
           <div class="flex-item">
80 80
             <div style="width:50%">
81 81
               <el-input
@@ -219,21 +219,27 @@ export default {
219 219
         })
220 220
         return false
221 221
       }
222
+      if (this.postData.RealName === '') {
223
+        this.$message({
224
+          type: 'error',
225
+          message: '真实姓名不能为空'
226
+        })
227
+        return false
228
+      }
222 229
       if (this.postData.Phone === '') {
223 230
         this.$message({
224 231
           type: 'error',
225 232
           message: '手机号不能为空'
226 233
         })
227 234
         return false
228
-      } else {
229
-        var myreg = /^[1][3,4,5,6,7,8][0-9]{9}$/
230
-        if (!myreg.test(this.postData.Phone)) {
231
-          this.$message({
232
-            type: 'error',
233
-            message: '请输入正确的手机号!'
234
-          })
235
-          return false
236
-        }
235
+      }
236
+      var myreg = /^[1][3,4,5,6,7,8][0-9]{9}$/
237
+      if (!myreg.test(this.postData.Phone)) {
238
+        this.$message({
239
+          type: 'error',
240
+          message: '请输入正确的手机号!'
241
+        })
242
+        return false
237 243
       }
238 244
       if (this.postData.Email !== '') {
239 245
         var emailreg = new RegExp('^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$')

+ 15
- 9
src/pages/system/systemSet/userManager/edit.vue View File

@@ -237,21 +237,27 @@ export default {
237 237
         })
238 238
         return false
239 239
       }
240
+      if (this.postData.RealName === '') {
241
+        this.$message({
242
+          type: 'error',
243
+          message: '真实姓名不能为空'
244
+        })
245
+        return false
246
+      }
240 247
       if (this.postData.Phone === '') {
241 248
         this.$message({
242 249
           type: 'error',
243 250
           message: '手机号不能为空'
244 251
         })
245 252
         return false
246
-      } else {
247
-        var myreg = /^[1][3,4,5,6,7,8][0-9]{9}$/
248
-        if (!myreg.test(this.postData.Phone)) {
249
-          this.$message({
250
-            type: 'error',
251
-            message: '请输入正确的手机号!'
252
-          })
253
-          return false
254
-        }
253
+      }
254
+      var myreg = /^[1][3,4,5,6,7,8][0-9]{9}$/
255
+      if (!myreg.test(this.postData.Phone)) {
256
+        this.$message({
257
+          type: 'error',
258
+          message: '请输入正确的手机号!'
259
+        })
260
+        return false
255 261
       }
256 262
       if (this.postData.Email !== '') {
257 263
         var emailreg = new RegExp('^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$')

+ 18
- 8
src/pages/system/verificationManager/drawVerification/index.vue View File

@@ -67,14 +67,24 @@ export default {
67 67
       'drawVerifyList',
68 68
     ]),
69 69
     toVerify () {
70
-      this.drawVerifyList({
71
-        id: this.verificationCode
72
-      }).then((res) => {
73
-        // console.log(JSON.stringify(res))
74
-        if (res !== null) {
75
-          this.toVerificationList()
76
-        }
77
-      })
70
+      if (this.verificationCode !== '') {
71
+        this.drawVerifyList({
72
+          id: this.verificationCode
73
+        }).then((res) => {
74
+          // console.log(JSON.stringify(res))
75
+          if (res !== null) {
76
+            this.toVerificationList()
77
+          }
78
+        }).catch((msg) => {
79
+          this.centerDialogVisible = false
80
+          this.verificationCode = ''
81
+        })
82
+      } else {
83
+        this.$message({
84
+          message: '核销码为空!',
85
+          type: 'error'
86
+        })
87
+      }
78 88
     },
79 89
     toVerificationList () { // 定向到核销列表
80 90
       this.$router.push({ name: 'drawVerificationList', query: { code: this.verificationCode } })

+ 8
- 1
src/pages/system/verificationManager/phoneVerification/index.vue View File

@@ -31,7 +31,14 @@ export default {
31 31
   },
32 32
   methods: {
33 33
     toVerificationList () { // 前往核销列表
34
-      this.$router.push({name: 'phoneVerificationList', query: {tel: this.phone}})
34
+      if (this.phone !== '') {
35
+        this.$router.push({name: 'phoneVerificationList', query: {tel: this.phone}})
36
+      } else {
37
+        this.$message({
38
+          message: '手机号为空!',
39
+          type: 'error'
40
+        })
41
+      }
35 42
     },
36 43
   }
37 44
 }

+ 14
- 6
src/pages/system/verificationManager/phoneVerification/verificationList/index.vue View File

@@ -6,9 +6,9 @@
6 6
           <div class="flex-item">
7 7
             <div class="userInfo">
8 8
               <span>用户名:</span>
9
-              <b>{{(courses.customerInfo || {}).Name || (courses.customerInfo || {}).CustomerName }}</b>
9
+              <b>{{customerName}}</b>
10 10
               <span>手机号:</span>
11
-              <b>{{(courses.customerInfo || {}).Phone}}</b>
11
+              <b>{{phone}}</b>
12 12
             </div>
13 13
           </div>
14 14
           <el-button
@@ -86,6 +86,8 @@ export default {
86 86
   name: '',
87 87
   data () {
88 88
     return {
89
+      customerName: '',
90
+      phone: this.$route.query.tel,
89 91
       code: '',
90 92
       tel: '',
91 93
       page: 1,
@@ -93,11 +95,16 @@ export default {
93 95
     }
94 96
   },
95 97
   mounted () {
96
-    const { code, tel } = this.$route.query
97
-    this.code = code
98
-    this.tel = tel
99 98
     this.$nextTick(function () {
100
-      this.getList()
99
+      this.getCustomerName({
100
+        id: this.phone
101
+      }).then((res) => {
102
+        console.log(res)
103
+        const { code, tel } = this.$route.query
104
+        this.code = code
105
+        this.tel = tel
106
+        this.getList()
107
+      })
101 108
     })
102 109
   },
103 110
   computed: {
@@ -110,6 +117,7 @@ export default {
110 117
       'GetCourseVerList',
111 118
       'CourseVerifs',
112 119
       'GetCourseVerListByTel',
120
+      'getCustomerName'
113 121
     ]),
114 122
     check (item) { // 核销
115 123
       this.$confirm('确认核销此课程?', '提示', {

+ 9
- 2
src/pages/system/verificationManager/qrcodeVerification/index.vue View File

@@ -41,7 +41,7 @@
41 41
         </el-input>
42 42
       </div>
43 43
       <span slot="footer" class="dialog-footer">
44
-        <el-button @click="centerDialogVisible = false">取 消</el-button>
44
+        <el-button @click="centerDialogVisible = false; verificationCode = '';">取 消</el-button>
45 45
         <el-button type="primary" @click="toVerificationList">确 定</el-button>
46 46
       </span>
47 47
     </el-dialog>
@@ -62,7 +62,14 @@ export default {
62 62
   },
63 63
   methods: {
64 64
     toVerificationList () { // 定向到核销列表
65
-      this.$router.push({name: 'qrcodeVerificationList', query: {code: this.verificationCode}})
65
+      if (this.verificationCode !== '') {
66
+        this.$router.push({ name: 'qrcodeVerificationList', query: { code: this.verificationCode } })
67
+      } else {
68
+        this.$message({
69
+          message: '核销码为空!',
70
+          type: 'error'
71
+        })
72
+      }
66 73
     },
67 74
   }
68 75
 }

+ 27
- 18
src/store/case/device.js View File

@@ -17,11 +17,14 @@ export default {
17 17
   },
18 18
   actions: {
19 19
     GetDeviceList ({ commit }, payload) {
20
-      ajax(api.device.list.url, {
21
-        method: api.device.list.method,
22
-        queryData: { ...payload }
23
-      }).then(res => {
24
-        commit('updateList', res)
20
+      return new Promise((resolve, reject) => {
21
+        ajax(api.device.list.url, {
22
+          method: api.device.list.method,
23
+          queryData: { ...payload }
24
+        }).then(res => {
25
+          commit('updateList', res)
26
+          resolve(res)
27
+        }).catch(reject)
25 28
       })
26 29
     },
27 30
     GetDeviceByID ({ commit }, { deviceid }) {
@@ -35,22 +38,28 @@ export default {
35 38
       })
36 39
     },
37 40
     AddDevice ({ commit }, payload) {
38
-      ajax(api.device.add.url, {
39
-        method: api.device.add.method,
40
-        data: {
41
-          ...payload
42
-        }
43
-      }).then(res => {
44
-        commit('updateInfo', res)
41
+      return new Promise((resolve, reject) => {
42
+        ajax(api.device.add.url, {
43
+          method: api.device.add.method,
44
+          data: {
45
+            ...payload
46
+          }
47
+        }).then(res => {
48
+          commit('updateInfo', res)
49
+          resolve(res)
50
+        }).catch(reject)
45 51
       })
46 52
     },
47 53
     UpdateDevice ({ commit }, payload) {
48
-      ajax(api.device.update.url, {
49
-        method: api.device.update.method,
50
-        data: {
51
-          ...payload
52
-        }
53
-      }).then(res => {
54
+      return new Promise((resolve, reject) => {
55
+        ajax(api.device.update.url, {
56
+          method: api.device.update.method,
57
+          data: {
58
+            ...payload
59
+          }
60
+        }).then(res => {
61
+          resolve(res)
62
+        }).catch(reject)
54 63
       })
55 64
     },
56 65
     DelDevice ({ commit }, { id, callback }) {

+ 1
- 1
src/store/case/index.js View File

@@ -12,7 +12,7 @@ export default {
12 12
       label: '案场3'
13 13
     }, {
14 14
       value: '',
15
-      label: '不限'
15
+      label: ''
16 16
     }],
17 17
   },
18 18
   mutations: {},

+ 35
- 10
src/store/cms/index.js View File

@@ -1,27 +1,52 @@
1
+import ajax from '../../util/ajax'
2
+import api from '../../util/api'
1 3
 
2 4
 export default {
3 5
   namespaced: true,
4 6
   state: {
5
-    location: []
7
+    location: [],
8
+    locationAll: []
6 9
   },
7 10
   mutations: {
8 11
     init (state, data) { // 这里的state对应着上面这个state
9 12
       state.location = data
10
-    }
13
+    },
14
+    initAll (state, data) { // 这里的state对应着上面这个state
15
+      state.locationAll = data
16
+    },
11 17
   },
12 18
   actions: {
13
-    updateLocationInfo (context, payload) { // 这里的context和我们使用的$store拥有相同的对象和方法
14
-      return new Promise((resolve) => {
15
-        this.$ajax(this.$api.cms.location.url, {
16
-          method: this.$api.cms.location.method,
17
-          data: {
19
+    updateLocationInfo ({ commit }, payload) {
20
+      return new Promise((resolve, reject) => {
21
+        ajax(api.cms.location.url, {
22
+          method: api.cms.location.method,
23
+          queryData: {
18 24
             issys: payload && payload.issys ? payload.issys : 0
19 25
           }
20 26
         }).then(res => {
21
-          context.commit('init', res)
27
+          commit('init', res)
22 28
           resolve(res)
23
-        })
29
+        }).catch(reject)
24 30
       })
25
-    }
31
+    },
32
+    updateLocationAllInfo ({ commit }) {
33
+      return new Promise((resolve, reject) => {
34
+        ajax(api.cms.location.url, {
35
+          method: api.cms.location.method,
36
+        }).then(res => {
37
+          commit('initAll', res)
38
+          resolve(res)
39
+        }).catch(reject)
40
+      })
41
+    },
42
+    getCourseLink ({ commit }) {
43
+      return new Promise((resolve, reject) => {
44
+        ajax(api.cms.getCourseLink.url, {
45
+          method: api.cms.getCourseLink.method,
46
+        }).then(res => {
47
+          resolve(res)
48
+        }).catch(reject)
49
+      })
50
+    },
26 51
   }
27 52
 }

+ 14
- 2
src/store/sta/sta.js View File

@@ -158,8 +158,20 @@ export default {
158 158
     },
159 159
     getDashboardData ({ commit }, payload) {
160 160
       return new Promise((resolve, reject) => {
161
-        ajax(api.statistics.dashboardData.url, {
162
-          method: api.statistics.dashboardData.method,
161
+        ajax(api.dashboard.dashboardData.url, {
162
+          method: api.dashboard.dashboardData.method,
163
+          queryData: {
164
+            ...payload,
165
+          }
166
+        }).then(res => {
167
+          resolve(res)
168
+        }).catch(reject)
169
+      })
170
+    },
171
+    getDashboardBottomData ({ commit }, payload) {
172
+      return new Promise((resolve, reject) => {
173
+        ajax(api.dashboard.dashboardBottomData.url, {
174
+          method: api.dashboard.dashboardBottomData.method,
163 175
           queryData: {
164 176
             ...payload,
165 177
           }

+ 12
- 0
src/store/verification/verification.js View File

@@ -74,5 +74,17 @@ export default {
74 74
         }).catch(reject)
75 75
       })
76 76
     },
77
+    getCustomerName ({ commit }, { id }) {
78
+      return new Promise((resolve, reject) => {
79
+        ajax(api.verification.getCustomerName.url, {
80
+          method: api.verification.getCustomerName.method,
81
+          urlData: {
82
+            id,
83
+          }
84
+        }).then(res => {
85
+          resolve(res)
86
+        }).catch(reject)
87
+      })
88
+    },
77 89
   },
78 90
 }

+ 8
- 0
src/style/main.css View File

@@ -251,6 +251,10 @@ select:focus {
251 251
   min-width: 110px;
252 252
 }
253 253
 
254
+.mainForm>ul>li>span:first-child>em{
255
+  color: red;
256
+}
257
+
254 258
 .mainForm>ul>li>div>div{
255 259
   min-height: 40px;
256 260
   vertical-align: top;
@@ -395,6 +399,10 @@ select:focus {
395 399
   height: 100%;
396 400
 }
397 401
 
402
+.el-table th>.cell,
403
+.el-table .cell{
404
+  text-overflow: initial !important;
405
+}
398 406
 
399 407
 
400 408
 

+ 1
- 0
src/util/ajax.js View File

@@ -74,6 +74,7 @@ const ajax = (...args) => {
74 74
           message: message,
75 75
           type: 'error'
76 76
         })
77
+        reject(data)
77 78
       }
78 79
     }).catch(reject)
79 80
   })

+ 22
- 4
src/util/api.js View File

@@ -212,6 +212,10 @@ const $api = {
212 212
     getSignin: { // 获取签到列表
213 213
       method: 'get',
214 214
       url: `${baseUrl}${common}/case/signin`
215
+    },
216
+    getExcelSignin: { // 获取签到列表
217
+      method: 'get',
218
+      url: `${baseUrl}${common}/case/excelSignin`
215 219
     }
216 220
   },
217 221
   goodsManager: {
@@ -388,7 +392,11 @@ const $api = {
388 392
     caseHide: { // 取消前台展示
389 393
       method: 'put',
390 394
       url: `${baseUrl}${common}/cms/casehide/:id`
391
-    }
395
+    },
396
+    getCourseLink: { // 获取课程链接列表
397
+      method: 'get',
398
+      url: `${baseUrl}${common}/dict/course`
399
+    },
392 400
   },
393 401
   file: {
394 402
     image: { // 图片上传
@@ -549,6 +557,10 @@ const $api = {
549 557
       method: 'get',
550 558
       url: `${baseUrl}${common}/luckdrawlist/verify/:id`
551 559
     },
560
+    getCustomerName: {
561
+      method: 'get',
562
+      url: `${baseUrl}${common}/customer/tel/:id`
563
+    },
552 564
   },
553 565
   goodsOrder: {
554 566
     getOnlineOrder: {
@@ -756,9 +768,15 @@ const $api = {
756 768
       url: `${baseUrl}${common}/statistics/cardcouponverify/excel`
757 769
     },
758 770
   },
759
-  dashboardData: {
760
-    method: 'get',
761
-    url: `${baseUrl}${common}/dashboard`
771
+  dashboard: {
772
+    dashboardData: {
773
+      method: 'get',
774
+      url: `${baseUrl}${common}/dashboard`
775
+    },
776
+    dashboardBottomData: {
777
+      method: 'get',
778
+      url: `${baseUrl}${common}/dashboard/charts`
779
+    },
762 780
   },
763 781
   health: {
764 782
     healthList: {

BIN
static/images/bg.jpg View File


BIN
static/images/loginName.png View File


BIN
static/yinchengLogo.ico View File