- 修复资产、凭证、指令分页数量不正确的bug
- 修复资产标签出现空格的bug - 删除退出登录旁边的逗号
This commit is contained in:
parent
59ff60f1f3
commit
d8411c318d
@ -65,7 +65,7 @@ func FindAssetByConditions(protocol string, account User) (o []Asset, err error)
|
||||
|
||||
func FindPageAsset(pageIndex, pageSize int, name, protocol, tags string, account User, owner, sharer string) (o []AssetVo, total int64, err error) {
|
||||
db := global.DB.Table("assets").Select("assets.id,assets.name,assets.ip,assets.port,assets.protocol,assets.active,assets.owner,assets.created, users.nickname as owner_name,COUNT(resource_sharers.user_id) as sharer_count").Joins("left join users on assets.owner = users.id").Joins("left join resource_sharers on assets.id = resource_sharers.resource_id").Group("assets.id")
|
||||
dbCounter := global.DB.Table("assets").Select("DISTINCT assets.id").Joins("left join resource_sharers on assets.id = resource_sharers.resource_id")
|
||||
dbCounter := global.DB.Table("assets").Select("DISTINCT assets.id").Joins("left join resource_sharers on assets.id = resource_sharers.resource_id").Group("assets.id")
|
||||
|
||||
if TypeUser == account.Type {
|
||||
owner := account.ID
|
||||
|
@ -30,7 +30,7 @@ func (r *Command) TableName() string {
|
||||
func FindPageCommand(pageIndex, pageSize int, name, content string, account User) (o []CommandVo, total int64, err error) {
|
||||
|
||||
db := global.DB.Table("commands").Select("commands.id,commands.name,commands.content,commands.owner,commands.created, users.nickname as owner_name,COUNT(resource_sharers.user_id) as sharer_count").Joins("left join users on commands.owner = users.id").Joins("left join resource_sharers on commands.id = resource_sharers.resource_id").Group("commands.id")
|
||||
dbCounter := global.DB.Table("commands").Select("DISTINCT commands.id").Joins("left join resource_sharers on commands.id = resource_sharers.resource_id")
|
||||
dbCounter := global.DB.Table("commands").Select("DISTINCT commands.id").Joins("left join resource_sharers on commands.id = resource_sharers.resource_id").Group("commands.id")
|
||||
|
||||
if TypeUser == account.Type {
|
||||
owner := account.ID
|
||||
|
@ -54,7 +54,7 @@ func FindAllCredential(account User) (o []CredentialSimpleVo, err error) {
|
||||
|
||||
func FindPageCredential(pageIndex, pageSize int, name string, account User) (o []CredentialVo, total int64, err error) {
|
||||
db := global.DB.Table("credentials").Select("credentials.id,credentials.name,credentials.type,credentials.username,credentials.owner,credentials.created,users.nickname as owner_name,COUNT(resource_sharers.user_id) as sharer_count").Joins("left join users on credentials.owner = users.id").Joins("left join resource_sharers on credentials.id = resource_sharers.resource_id").Group("credentials.id")
|
||||
dbCounter := global.DB.Table("credentials").Select("DISTINCT credentials.id").Joins("left join resource_sharers on credentials.id = resource_sharers.resource_id")
|
||||
dbCounter := global.DB.Table("credentials").Select("DISTINCT credentials.id").Joins("left join resource_sharers on credentials.id = resource_sharers.resource_id").Group("credentials.id")
|
||||
|
||||
if TypeUser == account.Type {
|
||||
owner := account.ID
|
||||
|
@ -171,10 +171,6 @@ class Asset extends Component {
|
||||
};
|
||||
|
||||
handleTagsChange = tags => {
|
||||
console.log(tags)
|
||||
// this.setState({
|
||||
// tags: tags
|
||||
// })
|
||||
let query = {
|
||||
...this.state.queryParams,
|
||||
'pageIndex': 1,
|
||||
@ -248,7 +244,7 @@ class Asset extends Component {
|
||||
}
|
||||
|
||||
if (asset['tags'] && typeof (asset['tags']) === 'string') {
|
||||
if (asset['tags'] === '-') {
|
||||
if (asset['tags'] === '' || asset['tags'] === '-') {
|
||||
asset['tags'] = [];
|
||||
} else {
|
||||
asset['tags'] = asset['tags'].split(',');
|
||||
|
@ -27,7 +27,7 @@ class Logout extends Component {
|
||||
>
|
||||
<Button key="login-btn" type="dashed">
|
||||
退出登录
|
||||
</Button>,
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user