修复普通用户首页错误的问题
This commit is contained in:
parent
1ee60dfe06
commit
a5853f82f8
@ -287,7 +287,7 @@ func (r assetRepository) ExistById(c context.Context, id string) (bool, error) {
|
||||
}
|
||||
|
||||
func (r assetRepository) FindMyAssets(c context.Context, pageIndex, pageSize int, name, protocol, tags string, assetIds []string, order, field string) (o []model.AssetForPage, total int64, err error) {
|
||||
db := r.GetDB(c).Table("assets").Select("assets.id,assets.name,assets.protocol,assets.active,assets.active_message,assets.tags,assets.description,assets.last_access_time,").
|
||||
db := r.GetDB(c).Table("assets").Select("assets.id,assets.name,assets.protocol,assets.active,assets.active_message,assets.tags,assets.description,assets.last_access_time").
|
||||
Where("id in ?", assetIds)
|
||||
dbCounter := r.GetDB(c).Table("assets").Where("id in ?", assetIds)
|
||||
|
||||
|
@ -34,11 +34,13 @@ var DefaultMenu = []*model.Menu{
|
||||
model.NewMenu("asset-add", "新建", "asset",
|
||||
model.NewPermission("POST", "/assets"),
|
||||
model.NewPermission("GET", "/access-gateways"),
|
||||
model.NewPermission("GET", "/credentials"),
|
||||
),
|
||||
model.NewMenu("asset-edit", "编辑", "asset",
|
||||
model.NewPermission("GET", "/assets/:id"),
|
||||
model.NewPermission("PUT", "/assets/:id"),
|
||||
model.NewPermission("GET", "/access-gateways"),
|
||||
model.NewPermission("GET", "/credentials"),
|
||||
),
|
||||
model.NewMenu("asset-del", "删除", "asset",
|
||||
model.NewPermission("DELETE", "/assets/:id"),
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import {Button, Layout, Result} from "antd";
|
||||
import {Button, Layout, Result, Space} from "antd";
|
||||
import {Link} from "react-router-dom";
|
||||
|
||||
const {Content} = Layout;
|
||||
@ -12,7 +12,13 @@ const NoMatch = () => {
|
||||
status="404"
|
||||
title="404"
|
||||
subTitle="抱歉,您似乎到达了预期之外的页面。"
|
||||
extra={<Button type="primary"><Link to={'/'}>回到首页</Link></Button>}
|
||||
extra={
|
||||
<Space>
|
||||
<Button type="primary" onClick={() => {navigate(-1);}}>返回上一页</Button>
|
||||
<Button type="primary"><Link to={'/my-asset'}>我的资产</Link></Button>
|
||||
<Button type="primary"><Link to={'/'}>后台首页</Link></Button>
|
||||
</Space>
|
||||
}
|
||||
/>
|
||||
</Content>
|
||||
</div>
|
||||
|
@ -17,11 +17,9 @@ const NoPermission = () => {
|
||||
subTitle="抱歉,您似乎没有此页面的权限。"
|
||||
extra={
|
||||
<Space>
|
||||
<Button type="primary" onClick={() => {
|
||||
navigate(-1);
|
||||
}
|
||||
}>返回上一页</Button>
|
||||
<Button type="primary"><Link to={'/'}>回到首页</Link></Button>
|
||||
<Button type="primary" onClick={() => {navigate(-1);}}>返回上一页</Button>
|
||||
<Button type="primary"><Link to={'/my-asset'}>我的资产</Link></Button>
|
||||
<Button type="primary"><Link to={'/'}>后台首页</Link></Button>
|
||||
</Space>
|
||||
}
|
||||
/>
|
||||
|
@ -153,8 +153,8 @@ const MyAsset = () => {
|
||||
<a
|
||||
key="access"
|
||||
href={url}
|
||||
// rel="noreferrer"
|
||||
// target='_blank'
|
||||
rel="noreferrer"
|
||||
target='_blank'
|
||||
>
|
||||
接入
|
||||
</a>,
|
||||
|
Loading…
Reference in New Issue
Block a user