浏览代码

增加身份升级配置

hefei 1 年之前
父节点
当前提交
f5b0c923cb

+ 5 - 1
.env.development

@@ -1 +1,5 @@
1
-VUE_CLI_BABEL_TRANSPILE_MODULES = true
1
+VUE_CLI_BABEL_TRANSPILE_MODULES = true
2
+# 接口地址
3
+ VUE_APP_BASE_API = 'http://testshop.hxxfb.com'
4
+# socket 连接地址
5
+ VUE_APP_WS_URL = ''

+ 1 - 2
package.json

@@ -118,7 +118,6 @@
118 118
     "@babel/core": "7.4.0",
119 119
     "@babel/register": "7.0.0",
120 120
     "@vue/cli-plugin-babel": "3.5.3",
121
-    "@vue/cli-plugin-eslint": "^3.9.1",
122 121
     "@vue/cli-plugin-unit-jest": "3.5.3",
123 122
     "@vue/cli-service": "3.5.3",
124 123
     "@vue/test-utils": "1.0.0-beta.29",
@@ -130,7 +129,7 @@
130 129
     "chokidar": "2.1.5",
131 130
     "connect": "3.6.6",
132 131
     "element-ui": "^2.15.13",
133
-    "eslint": "5.15.3",
132
+    "eslint": "^5.15.3",
134 133
     "eslint-plugin-vue": "5.2.2",
135 134
     "html-webpack-plugin": "3.2.0",
136 135
     "husky": "1.3.1",

+ 17 - 0
src/api/system.js

@@ -263,3 +263,20 @@ export function serviceChatUidListApi(id, uid, data) {
263 263
   return request.get(`service/${id}/${uid}/lst`, data)
264 264
 }
265 265
 
266
+/**
267
+ * 身份等级设置列表
268
+ * @param {Object} page
269
+ * @param {Object} limit
270
+ */
271
+export function configIdentityLst(page, limit) {
272
+  return request.get('config/identity/lst', { page, limit })
273
+}
274
+/**
275
+ * 身份等级设置编辑表单
276
+ * @param {Object} page
277
+ * @param {Object} limit
278
+ */
279
+export function configIdentityUpdateForm(id) {
280
+  return request.get('config/identity/update/table/' + id)
281
+}
282
+

+ 10 - 1
src/router/modules/config.js

@@ -82,7 +82,16 @@ const configRouter =
82 82
             noCache: true
83 83
           },
84 84
           component: () => import('@/views/contribution/contribution/index')
85
-        }
85
+        },
86
+		{
87
+		  path: 'identity',
88
+		  name: 'system_identity_up',
89
+		  meta: {
90
+		    title: '身份升级设置',
91
+		    noCache: true
92
+		  },
93
+		  component: () => import('@/views/system/identity/index')
94
+		}
86 95
       ]
87 96
     }
88 97
 export default configRouter

+ 1 - 1
src/views/accounts/caiwutongji/commission/index.vue

@@ -16,7 +16,7 @@
16 16
                                             value-format="yyyy/MM/dd" @change="onchangeTime"/>
17 17
                         </el-form-item>
18 18
                         <el-form-item class="width100" label="用户手机号:">
19
-                            <el-input v-model="tableFrom.keywords" class="selWidth" placeholder="请输入" size="small">
19
+                            <el-input v-model="tableFrom.phone" class="selWidth" placeholder="请输入" size="small">
20 20
                             </el-input>
21 21
                         </el-form-item>
22 22
 

+ 102 - 0
src/views/system/identity/index.vue

@@ -0,0 +1,102 @@
1
+<template>
2
+  <div class="divBox">
3
+    <el-card class="box-card">
4
+      <!-- <div slot="header" class="clearfix"> -->
5
+        <!-- <el-button size="small" type="primary" @click="onAdd">添加配置</el-button> -->
6
+      <!-- </div> -->
7
+      <el-table
8
+        v-loading="listLoading"
9
+        :data="tableData.data"
10
+        style="width: 100%"
11
+        size="small"
12
+      >
13
+        <el-table-column
14
+          prop="user_group_name"
15
+          label="身份"
16
+          min-width="60"
17
+        />
18
+        <el-table-column
19
+          prop="arrive_num_own"
20
+          label="个人达标贡献值"
21
+          min-width="80"
22
+        />
23
+        <el-table-column
24
+          prop="arrive_num_team"
25
+          label="团队达标贡献值"
26
+          min-width="80"
27
+        />
28
+        </el-table-column>
29
+        <el-table-column label="操作" min-width="130" fixed="right">
30
+          <template slot-scope="scope">
31
+            <el-button type="text" size="small" @click="onEdit(scope.row.user_group_id)">编辑</el-button>
32
+          </template>
33
+        </el-table-column>
34
+      </el-table>
35
+      <div class="block">
36
+        <el-pagination
37
+          :page-sizes="[20, 40, 60, 80]"
38
+          :page-size="tableData.limit"
39
+          :current-page="tableData.page"
40
+          layout="total, sizes, prev, pager, next, jumper"
41
+          :total="tableData.total"
42
+          @size-change="handleSizeChange"
43
+          @current-change="pageChange"
44
+        />
45
+      </div>
46
+    </el-card>
47
+  </div>
48
+</template>
49
+
50
+<script>
51
+import {
52
+  configIdentityUpdateForm,
53
+  configIdentityLst,
54
+} from '@/api/system'
55
+export default {
56
+  name: 'Setting',
57
+  data() {
58
+    return {
59
+      tableData: {
60
+        page: 1,
61
+        limit: 20,
62
+        data: [],
63
+        total: 0
64
+      },
65
+      listLoading: true
66
+    }
67
+  },
68
+  mounted() {
69
+    this.getList()
70
+  },
71
+  methods: {
72
+    // 列表
73
+    getList() {
74
+      this.listLoading = true
75
+      configIdentityLst(this.tableData.page, this.tableData.limit).then(res => {
76
+        this.tableData.data = res.data.list
77
+        this.tableData.total = res.data.count
78
+        this.listLoading = false
79
+      }).catch(res => {
80
+        this.listLoading = false
81
+        this.$message.error(res.message)
82
+      })
83
+    },
84
+    pageChange(page) {
85
+      this.tableData.page = page
86
+      this.getList()
87
+    },
88
+    handleSizeChange(val) {
89
+      this.tableData.limit = val
90
+      this.getList()
91
+    },
92
+    // 编辑
93
+    onEdit(id) {
94
+      this.$modalForm(configIdentityUpdateForm(id)).then(() => this.getList())
95
+    },
96
+  }
97
+}
98
+</script>
99
+
100
+<style scoped lang="stylus">
101
+
102
+</style>

二进制
static/index/topimg.png