dingxin 6 gadus atpakaļ
vecāks
revīzija
e8edb280bc

+ 4
- 4
CODE/smart-community/operate-api/src/main/java/com/community/huiju/controller/UserController.java Parādīt failu

@@ -98,7 +98,7 @@ public class UserController extends BaseController {
98 98
 
99 99
     @ApiOperation(value = "添加成员", notes = "用户成员列表")
100 100
     @ApiImplicitParams({
101
-            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "loginName:手机号,userName:姓名" )
101
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "loginName:手机号,userName:姓名,menuArray[]:角色ID,remark:备注" )
102 102
     })
103 103
     @RequestMapping(value = "/user/addUser", method = RequestMethod.POST)
104 104
     public ResponseBean addUser(@RequestBody String parameter,HttpSession session){
@@ -109,7 +109,7 @@ public class UserController extends BaseController {
109 109
 
110 110
     @ApiOperation(value = "修改成员", notes = "修改成员")
111 111
     @ApiImplicitParams({
112
-            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "loginName:手机号,userName:姓名" )
112
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "loginName:手机号,userName:姓名,menuArray[]:角色ID,remark:备注,id:修改id" )
113 113
     })
114 114
     @RequestMapping(value = "/user/upDate", method = RequestMethod.POST)
115 115
     public ResponseBean upDate(@RequestBody String parameter,HttpSession session){
@@ -120,7 +120,7 @@ public class UserController extends BaseController {
120 120
 
121 121
     @ApiOperation(value = "查看成员详情", notes = "查看成员详情")
122 122
     @ApiImplicitParams({
123
-            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter" )
123
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value="id:查询的ID")
124 124
     })
125 125
     @RequestMapping(value = "/user/selectById", method = RequestMethod.POST)
126 126
     public ResponseBean selectById(@RequestBody String parameter,HttpSession session){
@@ -131,7 +131,7 @@ public class UserController extends BaseController {
131 131
 
132 132
     @ApiOperation(value = "修改当前状态", notes = "修改当前状态")
133 133
     @ApiImplicitParams({
134
-            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter" )
134
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "status:传入当前状态(0:无效,1:有效),id:当前修改的ID")
135 135
     })
136 136
     @RequestMapping(value = "/user/upDateStatus", method = RequestMethod.POST)
137 137
     public ResponseBean upDateStatus(@RequestBody String parameter,HttpSession session){

+ 5
- 8
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/UserController.java Parādīt failu

@@ -112,7 +112,7 @@ public class UserController extends BaseController {
112 112
 
113 113
 	@ApiOperation(value = "添加成员", notes = "用户成员列表")
114 114
 	@ApiImplicitParams({
115
-			@ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "loginName:手机号,userName:姓名" )
115
+			@ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "loginName:手机号,userName:姓名,menuArray[]:角色ID,remark:备注" )
116 116
 	})
117 117
 	@RequestMapping(value = "/user/addUser", method = RequestMethod.POST)
118 118
 	public ResponseBean addUser(@RequestBody String parameter,HttpSession session){
@@ -123,7 +123,7 @@ public class UserController extends BaseController {
123 123
 
124 124
 	@ApiOperation(value = "修改成员", notes = "修改成员")
125 125
 	@ApiImplicitParams({
126
-			@ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "loginName:手机号,userName:姓名" )
126
+			@ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "loginName:手机号,userName:姓名,menuArray[]:角色ID,remark:备注,id:修改id" )
127 127
 	})
128 128
 	@RequestMapping(value = "/user/upDate", method = RequestMethod.POST)
129 129
 	public ResponseBean upDate(@RequestBody String parameter,HttpSession session){
@@ -134,7 +134,7 @@ public class UserController extends BaseController {
134 134
 
135 135
 	@ApiOperation(value = "查看成员详情", notes = "查看成员详情")
136 136
 	@ApiImplicitParams({
137
-			@ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter" )
137
+			@ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value="id:当前id")
138 138
 	})
139 139
 	@RequestMapping(value = "/user/selectById", method = RequestMethod.POST)
140 140
 	public ResponseBean selectById(@RequestBody String parameter,HttpSession session){
@@ -145,7 +145,7 @@ public class UserController extends BaseController {
145 145
 
146 146
 	@ApiOperation(value = "修改当前状态", notes = "修改当前状态")
147 147
 	@ApiImplicitParams({
148
-			@ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter" )
148
+			@ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value=("status:传入当前状态(0:无效,1:有效),id:当前修改的id"))
149 149
 	})
150 150
 	@RequestMapping(value = "/user/upDateStatus", method = RequestMethod.POST)
151 151
 	public ResponseBean upDateStatus(@RequestBody String parameter,HttpSession session){
@@ -155,13 +155,10 @@ public class UserController extends BaseController {
155 155
 	}
156 156
 
157 157
 	@ApiOperation(value = "查看所有角色", notes = "查看所有角色")
158
-	@ApiImplicitParams({
159
-			@ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter" )
160
-	})
161 158
 	@RequestMapping(value = "/user/userRole", method = RequestMethod.POST)
162 159
 	public ResponseBean userRole(@RequestBody String parameter,HttpSession session){
163 160
 		UserElement userElement = getUserElement(session);
164
-		ResponseBean  responseBean = userService.allUserRole(parameter,userElement.getId(),userElement.getCommunityId());
161
+		ResponseBean  responseBean = userService.allUserRole(userElement.getCommunityId());
165 162
 		return responseBean;
166 163
 	}
167 164
 

+ 1
- 3
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/IUserService.java Parādīt failu

@@ -79,11 +79,9 @@ public interface IUserService extends IService<User> {
79 79
 
80 80
     /**
81 81
      * 获取所有角色
82
-     * @param parameter
83
-     * @param id
84 82
      * @param communityId
85 83
      * @return
86 84
      */
87
-    ResponseBean allUserRole(String parameter, Integer id, Integer communityId);
85
+    ResponseBean allUserRole(Integer communityId);
88 86
 
89 87
 }

+ 2
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/UserServiceImpl.java Parādīt failu

@@ -278,7 +278,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
278 278
         List<User> userLoginName= userMapper.selectList(queryWrapper);
279 279
         Integer ID= object.getInteger("id");
280 280
         for (User us:userLoginName) {
281
-            // 修改手机号码时排除自身,通过比ID排除是不是修改的本身
281
+            // 修改手机号码时排除自身,通过比ID排除是不是修改的本身
282 282
             if (null != us.getLoginName()&&loginName.equals(us.getLoginName()) && (ID).equals(us.getId())){
283 283
                 break;
284 284
             }
@@ -389,7 +389,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
389 389
 
390 390
 
391 391
     @Override
392
-    public ResponseBean allUserRole(String parameter, Integer id, Integer communityId) {
392
+    public ResponseBean allUserRole( Integer communityId) {
393 393
         ResponseBean response = new ResponseBean<>();
394 394
         List<TpSysRole> tpSysRole=tpSysRoleMapper.allUserRole(communityId);
395 395
         response.addSuccess(tpSysRole);

+ 7
- 4
VUECODE/smart-property-manage/src/views/account/user/index.vue Parādīt failu

@@ -28,7 +28,9 @@
28 28
         type="selection"
29 29
         width="55"/>
30 30
       <el-table-column prop="userName" label="姓名" align="center"/>
31
-      <el-table-column prop="roleName" label="角色权限" align="center"/>
31
+      <el-table-column prop="roleName" label="角色权限" align="center">
32
+        <template slot-scope="scope"><a :title="scope.row.roleName"><span style="color: #8B8378	">{{ scope.row.roleName.length>='15'?scope.row.roleName.substring(0,15)+'..':scope.row.roleName }}</span></a></template>
33
+      </el-table-column>
32 34
       <el-table-column prop="loginName" label="手机号" align="center"/>
33 35
       <el-table-column prop="remark" label="备注" align="center"/>
34 36
       <el-table-column prop="createNmae" label="创建人" align="center"/>
@@ -71,15 +73,16 @@ export default {
71 73
       total: 0, // 数据总数
72 74
       listData: [],
73 75
       deleteIds: [], // 选择的id集合
74
-      listLoading: true // 加载圈
76
+      listLoading: true, // 加载圈
77
+      title : '',
75 78
     }
76 79
   },
77 80
   mounted() {
78 81
     // 获取数据
79 82
     this.dataQuery()
80 83
     // 截取角色
81
-    if(this.listQuery.roleName.length>1){
82
-      this.listQuery.roleName = this.listQuery.roleName.slice(0,10)+'...';
84
+    if(this.listQuery.roleName.length>this.listQuery.pageNum){
85
+      this.listQuery.roleName = this.listQuery.roleName.slice(0,this.listQuery.pageNum)+'...';
83 86
     }
84 87
   },
85 88
   methods: {