瀏覽代碼

修复 Bug

keyman1995 6 年之前
父節點
當前提交
6bd7a2ae26
共有 35 個檔案被更改,包括 651 行新增499 行删除
  1. 2
    1
      config/index.js
  2. 1
    1
      index.html
  3. 27
    2
      src/pages/login/index.vue
  4. 157
    73
      src/pages/login/page.scss
  5. 1
    1
      src/pages/system/cardAndCouponManager/cardManager/edit.vue
  6. 11
    3
      src/pages/system/cardAndCouponManager/couponManager/edit.vue
  7. 4
    3
      src/pages/system/cardAndCouponManager/couponManager/index.vue
  8. 14
    7
      src/pages/system/caseManager/deviceManager/add.vue
  9. 62
    25
      src/pages/system/caseManager/deviceManager/index.vue
  10. 22
    13
      src/pages/system/caseManager/keyManager/index.vue
  11. 12
    34
      src/pages/system/cmsManager/bannerManager/add.vue
  12. 27
    22
      src/pages/system/cmsManager/indexMsg/add.vue
  13. 13
    66
      src/pages/system/cmsManager/majorProjects/edit.vue
  14. 21
    8
      src/pages/system/cmsManager/majorProjects/index.vue
  15. 33
    28
      src/pages/system/cmsManager/newsManager/add.vue
  16. 1
    1
      src/pages/system/courseManager/courseList/add.vue
  17. 1
    1
      src/pages/system/courseManager/fiveA/add.vue
  18. 5
    10
      src/pages/system/courseManager/fiveA/index.vue
  19. 12
    8
      src/pages/system/courseManager/scheduleManager/index.vue
  20. 14
    0
      src/pages/system/courseManager/scheduleManager/page.scss
  21. 0
    4
      src/pages/system/dataStatistics/frontEndUserList/index.vue
  22. 1
    1
      src/pages/system/dataStatistics/goodsOrderList/index.vue
  23. 55
    47
      src/pages/system/marketingActivities/activitiesList/index.vue
  24. 67
    97
      src/pages/system/marketingActivities/addActivities/index.vue
  25. 4
    3
      src/pages/system/newOrder/caseRecord/index.vue
  26. 2
    2
      src/pages/system/newOrder/newOrderList/index.vue
  27. 13
    8
      src/pages/system/verificationManager/drawVerification/index.vue
  28. 1
    1
      src/pages/system/verificationManager/qrcodeVerification/index.vue
  29. 27
    18
      src/store/case/device.js
  30. 35
    10
      src/store/cms/index.js
  31. 1
    0
      src/util/ajax.js
  32. 5
    1
      src/util/api.js
  33. 二進制
      static/images/bg.jpg
  34. 二進制
      static/images/loginName.png
  35. 二進制
      static/yinchengLogo.ico

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

@@ -13,7 +13,8 @@ module.exports = {
13 13
       '/api': {
14 14
         // target: 'https://dp.huiju360.com.cn/hj_operations',
15 15
         // target: 'http://192.168.0.62:8080', //wf
16
-        target: 'http://127.0.0.1:8080', 
16
+        //target: 'http://127.0.0.1:8080', 
17
+        target: 'http://192.168.0.62:8080', //wf
17 18
         // target: 'http://192.168.0.11', //ys
18 19
         // target: 'http://192.168.0.125:8080', //hyq
19 20
         // target: 'http://dev.ycjcjy.com/', //frp

+ 1
- 1
index.html 查看文件

@@ -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>

+ 27
- 2
src/pages/login/index.vue 查看文件

@@ -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 查看文件

@@ -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
 

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

@@ -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;">

+ 11
- 3
src/pages/system/cardAndCouponManager/couponManager/edit.vue 查看文件

@@ -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;">
@@ -579,11 +579,15 @@ export default {
579 579
     },
580 580
     submit () { // 保存
581 581
       if (this.$route.query.id) {
582
+        if (this.couponInfo.ValidDays) {
583
+          this.couponInfo.StartDate = undefined
584
+          this.couponInfo.EndDate = undefined
585
+        }
582 586
         this.editCoupon({
583 587
           ...this.couponInfo,
584 588
           IsAll: this.couponInfo.IsAll - 0,
585 589
           TotalCount: this.couponInfo.TotalCount - 0,
586
-          ValidDays: this.couponInfo.ValidDays || 0
590
+          ValidDays: this.couponInfo.ValidDays - 0 || 0
587 591
         }).then((res) => {
588 592
           this.$alert('操作成功', '提示', {
589 593
             confirmButtonText: '确定',
@@ -593,11 +597,15 @@ export default {
593 597
           })
594 598
         })
595 599
       } else {
600
+        if (this.couponInfo.ValidDays) {
601
+          this.couponInfo.StartDate = undefined
602
+          this.couponInfo.EndDate = undefined
603
+        }
596 604
         this.addCoupon({
597 605
           ...this.couponInfo,
598 606
           IsAll: this.couponInfo.IsAll - 0,
599 607
           TotalCount: this.couponInfo.TotalCount - 0,
600
-          ValidDays: this.couponInfo.ValidDays || 0
608
+          ValidDays: this.couponInfo.ValidDays - 0 || 0
601 609
         }).then((res) => {
602 610
           this.$alert('操作成功', '提示', {
603 611
             confirmButtonText: '确定',

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

@@ -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

+ 14
- 7
src/pages/system/caseManager/deviceManager/add.vue 查看文件

@@ -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 查看文件

@@ -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
 

+ 22
- 13
src/pages/system/caseManager/keyManager/index.vue 查看文件

@@ -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 }

+ 12
- 34
src/pages/system/cmsManager/bannerManager/add.vue 查看文件

@@ -6,12 +6,12 @@
6 6
           <span>跳转类型:</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'">
14
+        <li class="flex-h" v-if="postData.ForwardType==='url'">
15 15
           <span>链接:</span>
16 16
           <div class="flex-item">
17 17
             <div style="width:50%">
@@ -141,8 +141,9 @@ export default {
141 141
   data () {
142 142
     return {
143 143
       // uploader: upload,
144
+      ForwardType: '1',
144 145
       postData: {
145
-        ForwardType: '1',
146
+        ForwardType: 'url',
146 147
         ForwardUrl: '',
147 148
         ForwardResourceId: '',
148 149
         Status: '1',
@@ -162,15 +163,15 @@ export default {
162 163
     // imageUploader: () => import('@/components/upload')
163 164
   },
164 165
   created () {
165
-    this.GetCourseList({page: 1, pagesize: 100})
166
-    this.updateLocationInfo()
166
+    this.GetCourseList({ page: 1, pagesize: 100 })
167
+    this.updateLocationAllInfo()
167 168
     this.updateSystemInfo().then(() => {
168 169
       this.postData.CaseId = this.defaultCaseId
169 170
     })
170 171
   },
171 172
   computed: {
172 173
     ...mapState({
173
-      positionList: x => x.cms.location,
174
+      positionList: x => x.cms.locationAll,
174 175
       OrgId: x => x.app.user.OrgId,
175 176
       defaultCaseId: x => x.app.cases.default,
176 177
       caseList: x => x.app.cases.list
@@ -183,7 +184,7 @@ export default {
183 184
     ...mapCourseActions([
184 185
       'GetCourseList',
185 186
     ]),
186
-    ...mapCmsActions(['updateLocationInfo']),
187
+    ...mapCmsActions(['updateLocationAllInfo']),
187 188
     ...mapActions(['updateSystemInfo']),
188 189
     submit () {
189 190
       if (this.postData.ForwardType === '1') {
@@ -195,7 +196,8 @@ export default {
195 196
           })
196 197
           return false
197 198
         } else {
198
-          var reg = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/  // eslint-disable-line
199
+          // var reg = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/  // eslint-disable-line
200
+          var reg = /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/  // eslint-disable-line
199 201
           if (!reg.test(this.postData.ForwardUrl)) {
200 202
             this.$message({
201 203
               message: '链接地址格式不正确',
@@ -208,14 +210,7 @@ export default {
208 210
         this.postData.ForwardUrl = ''
209 211
       }
210 212
       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
-      // }
213
+      // this.ForwardType === '1' ? this.postData.ForwardType = 'url' : this.postData.ForwardType = 'course'
219 214
       this.$ajax(this.$api.cms.addImage.url, {
220 215
         method: this.$api.cms.addImage.method,
221 216
         data: this.postData
@@ -228,28 +223,11 @@ export default {
228 223
         setTimeout(() => {
229 224
           this.$router.push({ name: 'bannerManager' })
230 225
         }, 1000)
231
-      }).catch(msg => {
232
-
233 226
       })
234 227
     },
235 228
     cancel () {
236 229
       this.$router.go(-1)
237 230
     },
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 231
     handleAvatarSuccess (res, file) {
254 232
       this.postData.ImageUrl = res.result.url
255 233
     }

+ 27
- 22
src/pages/system/cmsManager/indexMsg/add.vue 查看文件

@@ -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)

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

@@ -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,18 +279,19 @@ export default {
313 279
     ...mapCourseActions([
314 280
       'GetCourseList',
315 281
     ]),
282
+    caseChange () {
283
+      this.selCourseList = []
284
+      this.detail.Courses = []
285
+    },
316 286
     submit () {
317
-      // const imgs = this.imgsArr.map(x => x.response.result.url).join(',')
318
-      // const detailimgs = this.detailimgsArr.map(x => x.response.result.url).join(',')
319
-
320 287
       const courseids = (this.detail.Courses || []).map(x => x.CourseId).join(',')
321 288
       if (this.id === '') {
322 289
         this.detail.OrgId = this.OrgId
323
-        this.AddCaseInfo({...this.detail, OrgId: this.OrgId, imgs: this.img, detailimgs: this.detailimg, courseids}).then(res => {
290
+        this.AddCaseInfo({ ...this.detail, OrgId: this.OrgId, imgs: this.img, detailimgs: this.detailimg, courseids }).then(res => {
324 291
           this.afterSave()
325 292
         })
326 293
       } else {
327
-        this.AddCaseInfo({...this.detail, imgs: this.img, detailimgs: this.detailimg, courseids}).then(res => {
294
+        this.AddCaseInfo({ ...this.detail, imgs: this.img, detailimgs: this.detailimg, courseids }).then(res => {
328 295
           this.afterSave()
329 296
         })
330 297
       }
@@ -342,23 +309,11 @@ export default {
342 309
     cancel () {
343 310
       this.$router.go(-1)
344 311
     },
345
-    // handlePictureCardPreview (res, file, fileList) {
346
-    //   this.imgsArr = fileList
347
-    // },
348
-    // handleRemove (file, fileList) {
349
-    //   this.imgsArr = fileList
350
-    // },
351
-    // handlePictureCardPreviewDetail (res, file, fileList) {
352
-    //   this.detailimgsArr = fileList
353
-    // },
354
-    // handleRemoveDetail (file, fileList) {
355
-    //   this.detailimgsArr = fileList
356
-    // },
357 312
     getDetail () {
358
-      this.GetCaseInfo({id: this.id})
313
+      this.GetCaseInfo({ id: this.id })
359 314
     },
360 315
     getCourse () {
361
-      this.GetCourseList({caseid: this.CaseId, page: 1, pagesize: 100})
316
+      this.GetCourseList({ caseid: this.CaseId, page: 1, pagesize: 100 })
362 317
     },
363 318
     toggleSelection (rows) {
364 319
       if (rows) {
@@ -369,15 +324,8 @@ export default {
369 324
         this.$refs.courseTable.clearSelection()
370 325
       }
371 326
     },
372
-    // exceed () {
373
-    //   this.$message({
374
-    //     message: '超过可传的图片上限',
375
-    //     type: 'info',
376
-    //     duration: 1000
377
-    //   })
378
-    // },
379 327
     addCourse () {
380
-      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 })
381 329
     },
382 330
     coursesShow () {
383 331
       this.selCourseList = this.detail.Courses || []
@@ -388,14 +336,13 @@ export default {
388 336
     },
389 337
     handleSelectionChange (val) {
390 338
       this.selCourseList = val
391
-      // this.UpdateInfo({...this.detail, Courses: val})
392 339
     },
393 340
     addCourseOk () {
394
-      this.UpdateInfo({...this.detail, Courses: this.selCourseList})
341
+      this.UpdateInfo({ ...this.detail, Courses: this.selCourseList })
395 342
       this.selCourseVisible = false
396 343
     },
397 344
     deleteItem (row) {
398
-      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) })
399 346
     },
400 347
     handleImgSuccess (res, file) {
401 348
       this.img = res.result.url

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

@@ -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>

+ 33
- 28
src/pages/system/cmsManager/newsManager/add.vue 查看文件

@@ -6,12 +6,12 @@
6 6
           <span>跳转类型:</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">
14
+        <li class="flex-h" v-if="postData.ForwardType==='url'">
15 15
           <span>链接:</span>
16 16
           <div class="flex-item">
17 17
             <div style="width:50%">
@@ -23,6 +23,21 @@
23 23
             </div>
24 24
           </div>
25 25
         </li>
26
+        <li class="flex-h" v-else>
27
+          <span>课程:</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 42
           <span>是否发布:</span>
28 43
           <div class="flex-item">
@@ -100,12 +115,14 @@
100 115
 <script>
101 116
 import { mapState, mapActions, createNamespacedHelpers } from 'vuex'
102 117
 const { mapActions: mapCmsActions } = createNamespacedHelpers('cms')
118
+const { mapState: mapCourseState, mapActions: mapCourseActions } = createNamespacedHelpers('course')
119
+
103 120
 export default {
104 121
   name: '',
105 122
   data () {
106 123
     return {
107 124
       postData: {
108
-        ForwardType: '1',
125
+        ForwardType: 'url',
109 126
         ForwardUrl: '',
110 127
         ForwardResourceId: '',
111 128
         Status: '1',
@@ -127,17 +144,27 @@ export default {
127 144
       this.postData.OrgId = this.OrgId
128 145
       this.postData.CaseId = this.CaseId
129 146
     })
147
+    this.updateLocationAllInfo()
148
+    this.GetCourseList({ page: 1, pagesize: 10000 })
130 149
   },
131 150
   computed: {
132 151
     ...mapState({
133
-      positionList: x => x.cms.location,
152
+      positionList: x => x.cms.locationAll,
134 153
       OrgId: x => x.app.user.OrgId,
135 154
       CaseId: x => x.app.cases.default,
155
+    }),
156
+    ...mapCourseState({
157
+      courses: x => x.courseList,
136 158
     })
137 159
   },
138 160
   methods: {
161
+    ...mapCourseActions([
162
+      'GetCourseList',
163
+    ]),
139 164
     ...mapActions(['updateSystemInfo']),
140
-    ...mapCmsActions(['updateLocationInfo']),
165
+    ...mapCmsActions([
166
+      'updateLocationAllInfo',
167
+    ]),
141 168
     submit () {
142 169
       if (this.postData.ForwardType === '1') {
143 170
         if (this.postData.ForwardUrl === '') {
@@ -159,13 +186,6 @@ export default {
159 186
       }
160 187
       this.postData.ForwardType === '1' ? this.postData.ForwardType = 'url' : this.postData.ForwardType = 'course'
161 188
       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 189
       this.$ajax(this.$api.cms.addNews.url, {
170 190
         method: this.$api.cms.addNews.method,
171 191
         data: this.postData
@@ -185,21 +205,6 @@ export default {
185 205
     cancel () {
186 206
       this.$router.go(-1)
187 207
     },
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 208
     handleAvatarSuccess (res, file) {
204 209
       this.postData.ImageUrl = res.result.url
205 210
     }

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

@@ -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 !== '') {

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

@@ -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 查看文件

@@ -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
   }

+ 12
- 8
src/pages/system/courseManager/scheduleManager/index.vue 查看文件

@@ -42,57 +42,61 @@
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
-            <div class="flex-item" v-if="currentCourseItem.CourseStatus===0">
74
+            <div class="flex-item">
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
-            <span v-else>{{this.toolClass.dateFormat(currentCourseItem.BeginDate, 'yyyy-MM-dd hh:mm')}}</span>
83 86
           </li>
84 87
           <li class="flex-h">
85 88
             <span>结束时间:</span>
86
-            <div class="flex-item" v-if="currentCourseItem.CourseStatus===0">
89
+            <div class="flex-item">
87 90
               <div>
88 91
                 <el-date-picker
92
+                  v-if="currentCourseItem.CourseStatus===0"
89 93
                   v-model="currentCourseItem.EndDate"
90 94
                   type="datetime"
91 95
                   placeholder="选择结束日期">
92 96
                 </el-date-picker>
97
+                <span v-else>{{this.toolClass.dateFormat(currentCourseItem.EndDate, 'yyyy-MM-dd hh:mm')}}</span>
93 98
               </div>
94 99
             </div>
95
-            <span v-else>{{this.toolClass.dateFormat(currentCourseItem.EndDate, 'yyyy-MM-dd hh:mm')}}</span>
96 100
           </li>
97 101
         </ul>
98 102
       </div>

+ 14
- 0
src/pages/system/courseManager/scheduleManager/page.scss 查看文件

@@ -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
 

+ 0
- 4
src/pages/system/dataStatistics/frontEndUserList/index.vue 查看文件

@@ -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">

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

@@ -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>

+ 55
- 47
src/pages/system/marketingActivities/activitiesList/index.vue 查看文件

@@ -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="disable(scope.row.ActivityId)">停用</a>&nbsp;&nbsp;<a href="#" @click="delet(scope.row.ActivityId)">删除</a>
77
-              </div>
78
-              <div v-else>
79
-                <a href="#" @click="normal(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 === 0"
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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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>

+ 13
- 8
src/pages/system/verificationManager/drawVerification/index.vue 查看文件

@@ -67,14 +67,19 @@ 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
+      }
78 83
     },
79 84
     toVerificationList () { // 定向到核销列表
80 85
       this.$router.push({ name: 'drawVerificationList', query: { code: this.verificationCode } })

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

@@ -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>

+ 27
- 18
src/store/case/device.js 查看文件

@@ -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 }) {

+ 35
- 10
src/store/cms/index.js 查看文件

@@ -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
 }

+ 1
- 0
src/util/ajax.js 查看文件

@@ -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
   })

+ 5
- 1
src/util/api.js 查看文件

@@ -392,7 +392,11 @@ const $api = {
392 392
     caseHide: { // 取消前台展示
393 393
       method: 'put',
394 394
       url: `${baseUrl}${common}/cms/casehide/:id`
395
-    }
395
+    },
396
+    getCourseLink: { // 获取课程链接列表
397
+      method: 'get',
398
+      url: `${baseUrl}${common}/dict/course`
399
+    },
396 400
   },
397 401
   file: {
398 402
     image: { // 图片上传

二進制
static/images/bg.jpg 查看文件


二進制
static/images/loginName.png 查看文件


二進制
static/yinchengLogo.ico 查看文件