许成详 6 年前
父节点
当前提交
c421153f61

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

@@ -12,9 +12,9 @@ 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://192.168.0.11', //ys
15
+        // target: 'http://192.168.0.62:8080', //wf
17 16
         // target: 'http://192.168.0.11', //ys
17
+        target: 'http://192.168.0.125:8080', //hyq
18 18
         // target: 'http://dev.ycjcjy.com/', //frp
19 19
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
20 20
         // pathRewrite: {

+ 1
- 0
package.json 查看文件

@@ -87,6 +87,7 @@
87 87
     "style-loader": "^0.22.0",
88 88
     "uglifyjs-webpack-plugin": "^1.1.1",
89 89
     "url-loader": "^0.5.8",
90
+    "vue-clipboard2": "^0.2.1",
90 91
     "vue-fullcalendar": "^1.0.9",
91 92
     "vue-jest": "^1.0.2",
92 93
     "vue-loader": "^13.3.0",

+ 152
- 0
src/pages/system/healthManager/healthRecord/index.vue 查看文件

@@ -0,0 +1,152 @@
1
+<template>
2
+  <div class="subPage">
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="addGoodsType">新增商品类型</el-button> -->
7
+        </div>
8
+        <ul>
9
+          <li>
10
+            <!-- <span>选择案场:</span> -->
11
+            <el-select v-model="CaseId" placeholder="请选择">
12
+              <el-option
13
+                key=""
14
+                label="所有案场"
15
+                value="">
16
+              </el-option>
17
+              <el-option
18
+                v-for="item in cases"
19
+                :key="item.CaseId"
20
+                :label="item.CaseName"
21
+                :value="item.CaseId">
22
+              </el-option>
23
+            </el-select>
24
+          </li>
25
+          <li>
26
+            <el-input
27
+              placeholder="请输入用户名"
28
+              v-model="name"
29
+            >
30
+            </el-input>
31
+          </li>
32
+          <li>
33
+            <el-input
34
+              placeholder="请输入手机号"
35
+              v-model="mobile"
36
+            >
37
+            </el-input>
38
+          </li>
39
+        </ul>
40
+        <el-button
41
+          size="mini"
42
+          type="primary" @click="search">搜索</el-button>
43
+      </div>
44
+      <div class="moreFilter"></div>
45
+    </div>
46
+    <div class="system-table-box">
47
+      <el-table
48
+        :data="currentList"
49
+        stripe
50
+        style="width: 100%">
51
+        <el-table-column
52
+          prop="CaseName"
53
+          label="案场">
54
+        </el-table-column>
55
+        <el-table-column
56
+          prop="CustomerName"
57
+          label="用户名">
58
+        </el-table-column>
59
+        <el-table-column
60
+          prop="Phone"
61
+          label="手机号">
62
+        </el-table-column>
63
+        <el-table-column
64
+          prop="Sex"
65
+          label="性别">
66
+        </el-table-column>
67
+        <el-table-column
68
+          label="检测时间">
69
+          <template slot-scope="scope">
70
+            <label>{{toolClass.dateFormat(scope.row.CreateDate)}}</label>
71
+          </template>
72
+        </el-table-column>
73
+      </el-table>
74
+    </div>
75
+    <el-pagination
76
+      @current-change="handleCurrentChange"
77
+      :current-page.sync="postData.page"
78
+      :page-size="postData.pagesize"
79
+      layout="prev, pager, next, jumper"
80
+      :total="total">
81
+    </el-pagination>
82
+  </div>
83
+</template>
84
+
85
+<script>
86
+import { mapState, createNamespacedHelpers } from 'vuex'
87
+const { mapState: mapHealthState, mapActions: mapHealthActions } = createNamespacedHelpers('health')
88
+
89
+export default {
90
+  name: '',
91
+  data () {
92
+    return {
93
+      total: 0,
94
+      name: '',
95
+      mobile: '',
96
+      postData: { // 表格搜索条件
97
+        caseid: '',
98
+        page: 1, // 当前页码
99
+        pagesize: 10, // 请求数据量
100
+      },
101
+      currentList: []
102
+    }
103
+  },
104
+  mounted () {
105
+    this.$nextTick(function () {
106
+      this.getList()
107
+    })
108
+  },
109
+  computed: {
110
+    ...mapState({
111
+      cases: x => x.app.cases.list,
112
+      defaultCaseId: x => x.app.cases.default
113
+    }),
114
+    ...mapHealthState({
115
+      list: x => x.healthList
116
+    }),
117
+    CaseId: {
118
+      get () {
119
+        return this.postData.caseid || this.defaultCaseId
120
+      },
121
+      set (val) {
122
+        this.postData.caseid = val
123
+      }
124
+    }
125
+  },
126
+  methods: {
127
+    ...mapHealthActions(['getHealthList']),
128
+    search () { // 搜索
129
+      this.postData.page = 1
130
+      this.currentList = []
131
+      this.getList()
132
+    },
133
+    getCaseName (caseid) {
134
+      return (this.cases.filter(x => x.CaseId === caseid)[0] || {}).CaseName
135
+    },
136
+    getList () { // 获取列表
137
+      this.getHealthList({ ...this.postData, caseid: this.CaseId, phone: this.mobile, name: this.name }).then((res) => {
138
+        this.currentList = this.list.list
139
+        this.postData.page = this.list.page
140
+        this.total = this.list.pagenum
141
+      })
142
+    },
143
+    handleCurrentChange (val) { // 跳转到分页
144
+      this.getList()
145
+    }
146
+  }
147
+}
148
+</script>
149
+
150
+<!-- Add "scoped" attribute to limit CSS to this component only -->
151
+<style lang="scss" scoped>
152
+</style>

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

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

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

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

+ 120
- 0
src/pages/system/luckyDrawManager/luckyDrawList/index.vue 查看文件

@@ -0,0 +1,120 @@
1
+<template>
2
+  <div class="subPage">
3
+    <div class="system-table-search">
4
+      <div class="flex-h">
5
+        <div class="flex-item flex-h"></div>
6
+      </div>
7
+      <div class="moreFilter"></div>
8
+    </div>
9
+    <div class="system-table-box">
10
+      <el-table
11
+        :data="currentList"
12
+        stripe
13
+        style="width: 100%">
14
+        <el-table-column
15
+          prop="CaseName"
16
+          label="案场">
17
+        </el-table-column>
18
+        <el-table-column
19
+          prop="ActivitName"
20
+          label="活动名称">
21
+        </el-table-column>
22
+        <el-table-column
23
+          prop="Name"
24
+          label="姓名">
25
+        </el-table-column>
26
+        <el-table-column
27
+          prop="CustomerName"
28
+          label="微信昵称">
29
+        </el-table-column>
30
+        <el-table-column
31
+          prop="Phone"
32
+          label="手机号">
33
+        </el-table-column>
34
+        <el-table-column
35
+          prop="PrizeName"
36
+          label="获取奖品">
37
+        </el-table-column>
38
+        <el-table-column
39
+          label="获取时间">
40
+          <template slot-scope="scope">
41
+            <label>{{toolClass.dateFormat(scope.row.CreateDate)}}</label>
42
+          </template>
43
+        </el-table-column>
44
+        <el-table-column
45
+          label="核销时间">
46
+          <template slot-scope="scope">
47
+            <label>{{toolClass.dateFormat(scope.row.WriteoffDate)}}</label>
48
+          </template>
49
+        </el-table-column>
50
+        <el-table-column
51
+          label="状态">
52
+          <template slot-scope="scope">
53
+            <label>{{scope.row.Status === 0 ? '未核销' : '已核销'}}</label>
54
+          </template>
55
+        </el-table-column>
56
+      </el-table>
57
+    </div>
58
+    <el-pagination
59
+      @current-change="handleCurrentChange"
60
+      :current-page.sync="postData.page"
61
+      :page-size="postData.pagesize"
62
+      layout="prev, pager, next, jumper"
63
+      :total="total">
64
+    </el-pagination>
65
+  </div>
66
+</template>
67
+
68
+<script>
69
+import { createNamespacedHelpers } from 'vuex'
70
+const { mapState: mapLuckState, mapActions: mapLuckActions } = createNamespacedHelpers('luckDraw')
71
+
72
+export default {
73
+  name: '',
74
+  data () {
75
+    return {
76
+      total: 0,
77
+      postData: { // 表格搜索条件
78
+        page: 1, // 当前页码
79
+        pagesize: 10, // 请求数据量
80
+      },
81
+      currentList: []
82
+    }
83
+  },
84
+  mounted () {
85
+    this.$nextTick(function () {
86
+      this.getList()
87
+    })
88
+  },
89
+  computed: {
90
+    ...mapLuckState({
91
+      list: x => x.luckDrawList
92
+    }),
93
+  },
94
+  methods: {
95
+    ...mapLuckActions(['getLuckDrawList']),
96
+    search () { // 搜索
97
+      this.postData.page = 1
98
+      this.currentList = []
99
+      this.getList()
100
+    },
101
+    getCaseName (caseid) {
102
+      return (this.cases.filter(x => x.CaseId === caseid)[0] || {}).CaseName
103
+    },
104
+    getList () { // 获取列表
105
+      this.getLuckDrawList({ ...this.postData }).then((res) => {
106
+        this.currentList = this.list.list
107
+        this.postData.page = this.list.page
108
+        this.total = this.list.pagenum
109
+      })
110
+    },
111
+    handleCurrentChange (val) { // 跳转到分页
112
+      this.getList()
113
+    }
114
+  }
115
+}
116
+</script>
117
+
118
+<!-- Add "scoped" attribute to limit CSS to this component only -->
119
+<style lang="scss" scoped>
120
+</style>

+ 120
- 0
src/pages/system/luckyDrawManager/luckyDrawShareList/index.vue 查看文件

@@ -0,0 +1,120 @@
1
+<template>
2
+  <div class="subPage">
3
+    <div class="system-table-search">
4
+      <div class="flex-h">
5
+        <div class="flex-item flex-h"></div>
6
+      </div>
7
+      <div class="moreFilter"></div>
8
+    </div>
9
+    <div class="system-table-box">
10
+      <el-table
11
+        :data="currentList"
12
+        stripe
13
+        style="width: 100%">
14
+        <el-table-column
15
+          prop="CaseName"
16
+          label="案场">
17
+        </el-table-column>
18
+        <el-table-column
19
+          prop="ActivitName"
20
+          label="活动名称">
21
+        </el-table-column>
22
+        <el-table-column
23
+          prop="Name"
24
+          label="姓名">
25
+        </el-table-column>
26
+        <el-table-column
27
+          prop="CustomerName"
28
+          label="微信昵称">
29
+        </el-table-column>
30
+        <el-table-column
31
+          prop="Phone"
32
+          label="手机号">
33
+        </el-table-column>
34
+        <el-table-column
35
+          prop="PrizeName"
36
+          label="获取奖品">
37
+        </el-table-column>
38
+        <el-table-column
39
+          label="获取时间">
40
+          <template slot-scope="scope">
41
+            <label>{{toolClass.dateFormat(scope.row.CreateDate)}}</label>
42
+          </template>
43
+        </el-table-column>
44
+        <el-table-column
45
+          label="核销时间">
46
+          <template slot-scope="scope">
47
+            <label>{{toolClass.dateFormat(scope.row.WriteoffDate)}}</label>
48
+          </template>
49
+        </el-table-column>
50
+        <el-table-column
51
+          label="状态">
52
+          <template slot-scope="scope">
53
+            <label>{{scope.row.Status === 0 ? '未核销' : '已核销'}}</label>
54
+          </template>
55
+        </el-table-column>
56
+      </el-table>
57
+    </div>
58
+    <el-pagination
59
+      @current-change="handleCurrentChange"
60
+      :current-page.sync="postData.page"
61
+      :page-size="postData.pagesize"
62
+      layout="prev, pager, next, jumper"
63
+      :total="total">
64
+    </el-pagination>
65
+  </div>
66
+</template>
67
+
68
+<script>
69
+import { createNamespacedHelpers } from 'vuex'
70
+const { mapState: mapLuckState, mapActions: mapLuckActions } = createNamespacedHelpers('luckDraw')
71
+
72
+export default {
73
+  name: '',
74
+  data () {
75
+    return {
76
+      total: 0,
77
+      postData: { // 表格搜索条件
78
+        page: 1, // 当前页码
79
+        pagesize: 10, // 请求数据量
80
+      },
81
+      currentList: []
82
+    }
83
+  },
84
+  mounted () {
85
+    this.$nextTick(function () {
86
+      this.getList()
87
+    })
88
+  },
89
+  computed: {
90
+    ...mapLuckState({
91
+      list: x => x.luckDrawList
92
+    }),
93
+  },
94
+  methods: {
95
+    ...mapLuckActions(['getLuckDrawList']),
96
+    search () { // 搜索
97
+      this.postData.page = 1
98
+      this.currentList = []
99
+      this.getList()
100
+    },
101
+    getCaseName (caseid) {
102
+      return (this.cases.filter(x => x.CaseId === caseid)[0] || {}).CaseName
103
+    },
104
+    getList () { // 获取列表
105
+      this.getLuckDrawList({ ...this.postData }).then((res) => {
106
+        this.currentList = this.list.list
107
+        this.postData.page = this.list.page
108
+        this.total = this.list.pagenum
109
+      })
110
+    },
111
+    handleCurrentChange (val) { // 跳转到分页
112
+      this.getList()
113
+    }
114
+  }
115
+}
116
+</script>
117
+
118
+<!-- Add "scoped" attribute to limit CSS to this component only -->
119
+<style lang="scss" scoped>
120
+</style>

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

@@ -108,6 +108,13 @@ import marketingActivities from './marketingActivities/index' // 营销活动
108 108
 import activitiesList from './marketingActivities/activitiesList/index' // 活动列表
109 109
 import addActivities from './marketingActivities/addActivities/index' // 添加活动
110 110
 
111
+import healthManager from './healthManager/index' // 健康管理
112
+import healthRecord from './healthManager/healthRecord/index' // 体检记录列表
113
+
114
+import luckyDrawManager from './luckyDrawManager/index' // 抽奖管理
115
+import luckyDrawList from './luckyDrawManager/luckyDrawList/index' // 抽奖记录列表
116
+import luckyDrawShareList from './luckyDrawManager/luckyDrawShareList/index' // 抽奖分享记录列表
117
+
111 118
 export default {
112 119
   router: [
113 120
     {
@@ -584,6 +591,31 @@ export default {
584 591
             }]
585 592
           }]
586 593
         }]
594
+      }, { // 健康管理
595
+        path: 'healthManager',
596
+        name: 'healthManager',
597
+        component: healthManager,
598
+        children: [{ // 体检记录列表
599
+          path: 'healthRecord',
600
+          name: 'healthRecord',
601
+          component: healthRecord,
602
+          children: []
603
+        }],
604
+      }, { // 抽奖管理
605
+        path: 'luckyDrawManager',
606
+        name: 'luckyDrawManager',
607
+        component: luckyDrawManager,
608
+        children: [{ // 抽奖记录列表
609
+          path: 'luckyDrawList',
610
+          name: 'luckyDrawList',
611
+          component: luckyDrawList,
612
+          children: []
613
+        }, { // 抽奖分享记录列表
614
+          path: 'luckyDrawShareList',
615
+          name: 'luckyDrawShareList',
616
+          component: luckyDrawShareList,
617
+          children: []
618
+        }],
587 619
       }]
588 620
     },
589 621
   ],

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

@@ -91,7 +91,7 @@
91 91
         <el-table-column
92 92
           prop="CreateDate"
93 93
           label="创建时间"
94
-          width="200">
94
+          width="">
95 95
         </el-table-column>
96 96
         <el-table-column label="操作" fixed='right' width="350">
97 97
           <template slot-scope="scope">

+ 29
- 0
src/store/health/health.js 查看文件

@@ -0,0 +1,29 @@
1
+import ajax from '../../util/ajax'
2
+import api from '../../util/api'
3
+
4
+export default {
5
+  namespaced: true,
6
+  state: {
7
+    healthList: {},
8
+  },
9
+  mutations: {
10
+    updateList (state, payload) {
11
+      state.healthList = payload || {}
12
+    },
13
+  },
14
+  actions: {
15
+    getHealthList ({ commit }, payload) { // 获取体检记录列表
16
+      return new Promise((resolve, reject) => {
17
+        ajax({
18
+          ...api.health.healthList,
19
+          queryData: {
20
+            ...payload,
21
+          }
22
+        }).then(res => {
23
+          commit('updateList', res)
24
+          resolve(res)
25
+        }).catch(reject)
26
+      })
27
+    }
28
+  }
29
+}

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

@@ -36,6 +36,8 @@ export const modules = {
36 36
   customer: () => require('./customer/customer').default,
37 37
   user: () => require('./system/user').default,
38 38
   sta: () => require('./sta/sta').default,
39
+  health: () => require('./health/health').default,
40
+  luckDraw: () => require('./luckDraw/luckDraw').default,
39 41
 }
40 42
 
41 43
 Object.keys(modules).forEach((modKey) => {

+ 46
- 0
src/store/luckDraw/luckDraw.js 查看文件

@@ -0,0 +1,46 @@
1
+import ajax from '../../util/ajax'
2
+import api from '../../util/api'
3
+
4
+export default {
5
+  namespaced: true,
6
+  state: {
7
+    luckDrawList: {},
8
+    luckDrawShareList: {}
9
+  },
10
+  mutations: {
11
+    updateLuckDrawList (state, payload) {
12
+      state.luckDrawList = payload || {}
13
+    },
14
+    updateLuckShareDrawList (state, payload) {
15
+      state.luckDrawShareList = payload || {}
16
+    },
17
+  },
18
+  actions: {
19
+    getLuckDrawList ({ commit }, payload) { // 获取抽奖列表
20
+      return new Promise((resolve, reject) => {
21
+        ajax({
22
+          ...api.luckDraw.luckDrawList,
23
+          queryData: {
24
+            ...payload,
25
+          }
26
+        }).then(res => {
27
+          commit('updateLuckDrawList', res)
28
+          resolve(res)
29
+        }).catch(reject)
30
+      })
31
+    },
32
+    getLuckDrawShareList ({ commit }, payload) { // 获取抽奖分享列表
33
+      return new Promise((resolve, reject) => {
34
+        ajax({
35
+          ...api.luckDraw.luckDrawShareList,
36
+          queryData: {
37
+            ...payload,
38
+          }
39
+        }).then(res => {
40
+          commit('updateLuckDrawShareList', res)
41
+          resolve(res)
42
+        }).catch(reject)
43
+      })
44
+    }
45
+  }
46
+}

+ 18
- 2
src/util/api.js 查看文件

@@ -747,10 +747,26 @@ const $api = {
747 747
       method: 'get',
748 748
       url: `${baseUrl}${common}/statistics/cardcouponverify/excel`
749 749
     },
750
-    dashboardData: {
750
+  },
751
+  dashboardData: {
752
+    method: 'get',
753
+    url: `${baseUrl}${common}/dashboard`
754
+  },
755
+  health: {
756
+    healthList: {
751 757
       method: 'get',
752
-      url: `${baseUrl}${common}/dashboard`
758
+      url: `${baseUrl}${common}/bodychecklist`
759
+    }
760
+  },
761
+  luckDraw: {
762
+    luckDrawList: {
763
+      method: 'get',
764
+      url: `${baseUrl}${common}/luckdrawlist`
753 765
     },
766
+    luckDrawShareList: {
767
+      method: 'get',
768
+      url: `${baseUrl}${common}/luckdrawlist/:toPhone/:fromPhone`
769
+    }
754 770
   }
755 771
 }
756 772
 export default $api