yuantianjiao 6 年 前
コミット
14fc6c2825

+ 0
- 0
src/pages/system/customerManagement/customerList/index.scss ファイルの表示


+ 154
- 0
src/pages/system/customerManagement/customerList/index.vue ファイルの表示

@@ -0,0 +1,154 @@
1
+<template>
2
+  <div class="subPage">
3
+    <div class="system-table-search">
4
+      <div class="flex-h">
5
+        <tableSearch @exportSearchKey="searchList"></tableSearch>
6
+      </div>
7
+      <div class="moreFilter"></div>
8
+    </div>
9
+    <div class="system-table-box">
10
+      <el-table
11
+        :data="tableData"
12
+        stripe
13
+        style="width: 100%">
14
+        <el-table-column
15
+          prop="customerName"
16
+          label="姓名"
17
+          width="150">
18
+        </el-table-column>
19
+        <el-table-column
20
+          prop="mobile"
21
+          label="手机号"
22
+          width="120">
23
+        </el-table-column>
24
+        <el-table-column
25
+          prop="nickName"
26
+          label="微信昵称"
27
+          width="150">
28
+        </el-table-column>
29
+        <el-table-column
30
+          prop="userType"
31
+          label="用户类型"
32
+          width="100">
33
+        </el-table-column>
34
+        <el-table-column
35
+          prop="recommend"
36
+          label="推荐人"
37
+          width="100">
38
+        </el-table-column>
39
+        <el-table-column
40
+          prop="customerLevel"
41
+          label="会员等级"
42
+          width="100">
43
+        </el-table-column>
44
+        <el-table-column
45
+          prop="customerPoint"
46
+          label="会员积分"
47
+          width="100">
48
+        </el-table-column>
49
+        <el-table-column
50
+          prop="openId"
51
+          label="openId"
52
+          width="250">
53
+        </el-table-column>
54
+        <el-table-column
55
+          prop="gold"
56
+          label="金币"
57
+          width="100">
58
+        </el-table-column>
59
+        <el-table-column
60
+          prop="silver"
61
+          label="银币"
62
+          width="100">
63
+        </el-table-column>
64
+        <el-table-column label="操作">
65
+          <template slot-scope="scope">
66
+            <el-button
67
+              size="mini"
68
+              @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
69
+            <el-button
70
+              size="mini"
71
+              type="danger"
72
+              @click="handleDelete(scope.$index, scope.row)">删除</el-button>
73
+          </template>
74
+        </el-table-column>
75
+      </el-table>
76
+    </div>
77
+    <el-pagination
78
+      @size-change="handleSizeChange"
79
+      @current-change="handleCurrentChange"
80
+      :current-page.sync="currentPage"
81
+      :page-size="10"
82
+      layout="prev, pager, next, jumper"
83
+      :total="100">
84
+    </el-pagination>
85
+  </div>
86
+</template>
87
+
88
+<script>
89
+import tableSearch from '@/components/tableSearch/index'
90
+
91
+export default {
92
+  name: '',
93
+  data () {
94
+    return {
95
+      currentPage: 0, // 当前页码
96
+      tableSearch: { // 表格搜索条件
97
+        key: '111', // 搜索关键字
98
+      },
99
+      tableData: [{
100
+        customerName: '赵日天',
101
+        mobile: '13446666666',
102
+        nickName: '赵日地',
103
+        userType: '1',
104
+        recommend: '赵爸爸',
105
+        customerLevel: '10000',
106
+        customerPoint: '200',
107
+        openId: 'jhfjkdshkdfgs22123',
108
+        gold: '2333',
109
+        silver: '3332'
110
+      }]
111
+    }
112
+  },
113
+  components: {
114
+    tableSearch,
115
+  },
116
+  methods: {
117
+    handleSizeChange (val) {
118
+      console.log(`每页 ${val} 条`)
119
+    },
120
+    handleCurrentChange (val) {
121
+      console.log(`当前页: ${val}`)
122
+    },
123
+    handleEdit (index, row) { // 编辑
124
+      console.log(index, row)
125
+    },
126
+    handleDelete (index, row) { // 删除
127
+      console.log(index, row)
128
+      this.$confirm('确认删除此用户?', '提示', {
129
+        confirmButtonText: '确定',
130
+        cancelButtonText: '取消',
131
+        type: 'warning'
132
+      }).then(() => {
133
+        this.$message({
134
+          type: 'success',
135
+          message: '删除成功!'
136
+        })
137
+      }).catch(() => {
138
+        this.$message({
139
+          type: 'info',
140
+          message: '已取消删除'
141
+        })
142
+      })
143
+    },
144
+    searchList (key) { // 搜索列表
145
+      console.log(key)
146
+    }
147
+  }
148
+}
149
+</script>
150
+
151
+<!-- Add "scoped" attribute to limit CSS to this component only -->
152
+<style lang="scss" scoped>
153
+@import "index.scss";
154
+</style>

+ 11
- 11
src/pages/system/index.vue ファイルの表示

@@ -60,19 +60,11 @@ export default {
60 60
           children: [],
61 61
         }],
62 62
       }, {
63
-        title: '一级菜单2',
63
+        title: '会员管理',
64 64
         pathName: '',
65 65
         children: [{
66
-          title: '二级菜单1',
67
-          pathName: '',
68
-          children: [],
69
-        }, {
70
-          title: '二级菜单2',
71
-          pathName: '',
72
-          children: [],
73
-        }, {
74
-          title: '二级菜单3',
75
-          pathName: '',
66
+          title: '会员列表',
67
+          pathName: 'customerList',
76 68
           children: [],
77 69
         }],
78 70
       }, {
@@ -95,6 +87,14 @@ export default {
95 87
         title: '一级菜单4',
96 88
         pathName: '',
97 89
         children: [],
90
+      }, {
91
+        title: '角色管理',
92
+        pathName: '',
93
+        children: [{
94
+          title: '角色列表',
95
+          pathName: 'customerList',
96
+          children: [],
97
+        }],
98 98
       }]
99 99
     }
100 100
   },

+ 12
- 0
src/pages/system/page.js ファイルの表示

@@ -1,6 +1,8 @@
1 1
 
2 2
 import system from './index'
3 3
 import channelList from './channelManagement/channelList/index'
4
+import customerList from './customerManagement/customerList/index'
5
+import roleList from './roleManagement/roleList/index'
4 6
 
5 7
 export default {
6 8
   router: [
@@ -13,6 +15,16 @@ export default {
13 15
         name: 'channelList',
14 16
         component: channelList,
15 17
         children: [],
18
+      }, {
19
+        path: 'customerList',
20
+        name: 'customerList',
21
+        component: customerList,
22
+        children: [],
23
+      }, {
24
+        path: 'roleList',
25
+        name: 'roleList',
26
+        component: roleList,
27
+        children: [],
16 28
       }],
17 29
     },
18 30
   ],

+ 153
- 0
src/pages/system/roleManagement/roleList/index.vue ファイルの表示

@@ -0,0 +1,153 @@
1
+<template>
2
+  <div class="subPage">
3
+    <div class="system-table-search">
4
+      <div class="flex-h">
5
+        <tableSearch @exportSearchKey="searchList"></tableSearch>
6
+      </div>
7
+      <div class="moreFilter"></div>
8
+    </div>
9
+    <div class="system-table-box">
10
+      <el-table
11
+        :data="tableData"
12
+        stripe
13
+        style="width: 100%">
14
+        <el-table-column
15
+          prop="customerName"
16
+          label="角色标识"
17
+          width="150">
18
+        </el-table-column>
19
+        <el-table-column
20
+          prop="mobile"
21
+          label="手机号"
22
+          width="120">
23
+        </el-table-column>
24
+        <el-table-column
25
+          prop="nickName"
26
+          label="微信昵称"
27
+          width="150">
28
+        </el-table-column>
29
+        <el-table-column
30
+          prop="userType"
31
+          label="用户类型"
32
+          width="100">
33
+        </el-table-column>
34
+        <el-table-column
35
+          prop="recommend"
36
+          label="推荐人"
37
+          width="100">
38
+        </el-table-column>
39
+        <el-table-column
40
+          prop="customerLevel"
41
+          label="会员等级"
42
+          width="100">
43
+        </el-table-column>
44
+        <el-table-column
45
+          prop="customerPoint"
46
+          label="会员积分"
47
+          width="100">
48
+        </el-table-column>
49
+        <el-table-column
50
+          prop="openId"
51
+          label="openId"
52
+          width="250">
53
+        </el-table-column>
54
+        <el-table-column
55
+          prop="gold"
56
+          label="金币"
57
+          width="100">
58
+        </el-table-column>
59
+        <el-table-column
60
+          prop="silver"
61
+          label="银币"
62
+          width="100">
63
+        </el-table-column>
64
+        <el-table-column label="操作">
65
+          <template slot-scope="scope">
66
+            <el-button
67
+              size="mini"
68
+              @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
69
+            <el-button
70
+              size="mini"
71
+              type="danger"
72
+              @click="handleDelete(scope.$index, scope.row)">删除</el-button>
73
+          </template>
74
+        </el-table-column>
75
+      </el-table>
76
+    </div>
77
+    <el-pagination
78
+      @size-change="handleSizeChange"
79
+      @current-change="handleCurrentChange"
80
+      :current-page.sync="currentPage"
81
+      :page-size="10"
82
+      layout="prev, pager, next, jumper"
83
+      :total="100">
84
+    </el-pagination>
85
+  </div>
86
+</template>
87
+
88
+<script>
89
+import tableSearch from '@/components/tableSearch/index'
90
+
91
+export default {
92
+  name: '',
93
+  data () {
94
+    return {
95
+      currentPage: 0, // 当前页码
96
+      tableSearch: { // 表格搜索条件
97
+        key: '111', // 搜索关键字
98
+      },
99
+      tableData: [{
100
+        customerName: '赵日天',
101
+        mobile: '13446666666',
102
+        nickName: '赵日地',
103
+        userType: '1',
104
+        recommend: '赵爸爸',
105
+        customerLevel: '10000',
106
+        customerPoint: '200',
107
+        openId: 'jhfjkdshkdfgs22123',
108
+        gold: '2333',
109
+        silver: '3332'
110
+      }]
111
+    }
112
+  },
113
+  components: {
114
+    tableSearch,
115
+  },
116
+  methods: {
117
+    handleSizeChange (val) {
118
+      console.log(`每页 ${val} 条`)
119
+    },
120
+    handleCurrentChange (val) {
121
+      console.log(`当前页: ${val}`)
122
+    },
123
+    handleEdit (index, row) { // 编辑
124
+      console.log(index, row)
125
+    },
126
+    handleDelete (index, row) { // 删除
127
+      console.log(index, row)
128
+      this.$confirm('确认删除此用户?', '提示', {
129
+        confirmButtonText: '确定',
130
+        cancelButtonText: '取消',
131
+        type: 'warning'
132
+      }).then(() => {
133
+        this.$message({
134
+          type: 'success',
135
+          message: '删除成功!'
136
+        })
137
+      }).catch(() => {
138
+        this.$message({
139
+          type: 'info',
140
+          message: '已取消删除'
141
+        })
142
+      })
143
+    },
144
+    searchList (key) { // 搜索列表
145
+      console.log(key)
146
+    }
147
+  }
148
+}
149
+</script>
150
+
151
+<!-- Add "scoped" attribute to limit CSS to this component only -->
152
+<style lang="scss" scoped>
153
+</style>