def POST(self): ''' ''' # 获取用户列表 self.text = web.input().text self.authorityList = AuthorityManagement.selectAll(self.text) return Common.render.authority.list(self)
def GET(self): ''' ''' urlParam = web.input(un=None) self.userName = urlParam.un self.authorityList = AuthorityManagement.selectAll("") self.authorityId = AuthorityManagement.selectAuthorityByUserName(self.userName) for item in self.authorityList: if self.authorityId !=[] and item['id'] == self.authorityId['authorityId']: item['checked'] = 'checked' else: item['checked'] = '' return Common.render.userInfo.authority(self)