Ver código fonte

Merge branch 'dev' of http://git.ycjcjy.com/SpaceOfCheng/admin into dev

许成详 6 anos atrás
pai
commit
8d061ba0e0

+ 2
- 2
src/pages/system/page.js Ver arquivo

@@ -163,8 +163,8 @@ export default {
163 163
           name: 'frontEndUserList',
164 164
           component: frontEndUserList,
165 165
           children: []
166
-        }],
167
-      }],
166
+        }]
167
+      }]
168 168
     },
169 169
   ],
170 170
 }

+ 90
- 93
src/pages/system/systemSet/characterManger/index.vue Ver arquivo

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

+ 36
- 95
src/pages/system/systemSet/userManger/index.vue Ver arquivo

@@ -2,7 +2,10 @@
2 2
   <div class="subPage">
3 3
     <div class="system-table-search">
4 4
       <div class="flex-h">
5
-        <tableSearch @exportSearchKey="searchList"></tableSearch>
5
+        <div class="flex-item flex-h">
6
+          <el-button size="mini" type="success">新增用户</el-button>
7
+        </div>
8
+        <tableSearch value='请输入用户名' @exportSearchKey="searchList"></tableSearch>
6 9
       </div>
7 10
       <div class="moreFilter"></div>
8 11
     </div>
@@ -12,56 +15,47 @@
12 15
         stripe
13 16
         style="width: 100%">
14 17
         <el-table-column
15
-          prop="customerName"
16
-          label="姓名"
18
+          fixed
19
+          prop="userName"
20
+          label="用户名"
17 21
           width="150">
18 22
         </el-table-column>
19 23
         <el-table-column
20
-          prop="mobile"
21
-          label="手机号"
24
+          prop="realName"
25
+          label="真实姓名"
22 26
           width="120">
23 27
         </el-table-column>
24 28
         <el-table-column
25
-          prop="nickName"
26
-          label="微信昵称"
29
+          prop="email"
30
+          label="邮箱"
27 31
           width="150">
28 32
         </el-table-column>
29 33
         <el-table-column
30
-          prop="userType"
31
-          label="用户类型"
32
-          width="100">
34
+          prop="workNum"
35
+          label="工号"
36
+          width="200">
33 37
         </el-table-column>
34 38
         <el-table-column
35
-          prop="recommend"
36
-          label="推荐人"
37
-          width="100">
38
-        </el-table-column>
39
-        <el-table-column
40
-          prop="customerLevel"
41
-          label="会员等级"
39
+          prop="mobile"
40
+          label="手机号"
42 41
           width="100">
43 42
         </el-table-column>
44 43
         <el-table-column
45
-          prop="customerPoint"
46
-          label="会员积分"
44
+          prop="userType"
45
+          label="用户类型"
47 46
           width="100">
48 47
         </el-table-column>
49 48
         <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="金币"
49
+          prop="lock"
50
+          label="是否锁定"
57 51
           width="100">
58 52
         </el-table-column>
59 53
         <el-table-column
60
-          prop="silver"
61
-          label="银币"
62
-          width="100">
54
+          prop="creatTime"
55
+          label="创建时间"
56
+          width="200">
63 57
         </el-table-column>
64
-        <el-table-column label="操作" width="200">
58
+        <el-table-column label="操作" fixed='right' width="300">
65 59
           <template slot-scope="scope">
66 60
             <el-button
67 61
               size="mini"
@@ -71,6 +65,10 @@
71 65
               size="mini"
72 66
               type="danger"
73 67
               @click="handleDelete(scope.$index, scope.row)">删除</el-button>
68
+              <el-button
69
+              size="mini"
70
+              type="success"
71
+              @click="handleDelete(scope.$index, scope.row)">绑定角色</el-button>
74 72
           </template>
75 73
         </el-table-column>
76 74
       </el-table>
@@ -98,71 +96,14 @@ export default {
98 96
         key: '111', // 搜索关键字
99 97
       },
100 98
       tableData: [{
101
-        customerName: '赵日天',
102
-        mobile: '13446666666',
103
-        nickName: '赵日地',
104
-        userType: '1',
105
-        recommend: '赵爸爸',
106
-        customerLevel: '10000',
107
-        customerPoint: '200',
108
-        openId: 'jhfjkdshkdfgs22123',
109
-        gold: '2333',
110
-        silver: '3332'
111
-      }, {
112
-        customerName: '赵日天',
113
-        mobile: '13446666666',
114
-        nickName: '赵日地',
115
-        userType: '1',
116
-        recommend: '赵爸爸',
117
-        customerLevel: '10000',
118
-        customerPoint: '200',
119
-        openId: 'jhfjkdshkdfgs22123',
120
-        gold: '2333',
121
-        silver: '3332'
122
-      }, {
123
-        customerName: '赵日天',
124
-        mobile: '13446666666',
125
-        nickName: '赵日地',
126
-        userType: '1',
127
-        recommend: '赵爸爸',
128
-        customerLevel: '10000',
129
-        customerPoint: '200',
130
-        openId: 'jhfjkdshkdfgs22123',
131
-        gold: '2333',
132
-        silver: '3332'
133
-      }, {
134
-        customerName: '赵日天',
135
-        mobile: '13446666666',
136
-        nickName: '赵日地',
137
-        userType: '1',
138
-        recommend: '赵爸爸',
139
-        customerLevel: '10000',
140
-        customerPoint: '200',
141
-        openId: 'jhfjkdshkdfgs22123',
142
-        gold: '2333',
143
-        silver: '3332'
144
-      }, {
145
-        customerName: '赵日天',
146
-        mobile: '13446666666',
147
-        nickName: '赵日地',
148
-        userType: '1',
149
-        recommend: '赵爸爸',
150
-        customerLevel: '10000',
151
-        customerPoint: '200',
152
-        openId: 'jhfjkdshkdfgs22123',
153
-        gold: '2333',
154
-        silver: '3332'
155
-      }, {
156
-        customerName: '赵日天',
157
-        mobile: '13446666666',
158
-        nickName: '赵日地',
99
+        userName: '赵日天',
100
+        realName: '13446666666',
101
+        email: '赵日地',
102
+        workNum: '赵爸爸',
103
+        mobile: '1376975175',
159 104
         userType: '1',
160
-        recommend: '赵爸爸',
161
-        customerLevel: '10000',
162
-        customerPoint: '200',
163
-        openId: 'jhfjkdshkdfgs22123',
164
-        gold: '2333',
165
-        silver: '3332'
105
+        lock: true,
106
+        creatTime: '2018-08-08 10:00:00'
166 107
       }]
167 108
     }
168 109
   },
@@ -206,5 +147,5 @@ export default {
206 147
 
207 148
 <!-- Add "scoped" attribute to limit CSS to this component only -->
208 149
 <style lang="scss" scoped>
209
-@import "page.scss"
150
+@import "page.scss";
210 151
 </style>