- 增加https参数

- 修复bug "「资产」无法通过「资产标签」过滤" close #33
- 修复bug "切換授權使用者登錄後,進入資產列表後會有錯誤" close #53
This commit is contained in:
dushixiang
2021-02-12 16:50:38 +08:00
parent 7599c09191
commit 1b7dd820b3
6 changed files with 37 additions and 8 deletions

View File

@ -67,7 +67,8 @@ class Asset extends Component {
queryParams: {
pageIndex: 1,
pageSize: 10,
protocol: ''
protocol: '',
tags: ''
},
loading: false,
modalVisible: false,
@ -75,6 +76,7 @@ class Asset extends Component {
modalConfirmLoading: false,
credentials: [],
tags: [],
selectedTags: [],
model: {},
selectedRowKeys: [],
delBtnLoading: false,
@ -171,6 +173,9 @@ class Asset extends Component {
};
handleTagsChange = tags => {
this.setState({
selectedTags: tags
})
let query = {
...this.state.queryParams,
'pageIndex': 1,
@ -604,6 +609,7 @@ class Asset extends Component {
<Select mode="multiple"
allowClear
value={this.state.selectedTags}
placeholder="资产标签" onChange={this.handleTagsChange}
style={{minWidth: 150}}>
{this.state.tags.map(tag => {
@ -628,7 +634,10 @@ class Asset extends Component {
<Button icon={<UndoOutlined/>} onClick={() => {
this.inputRefOfName.current.setValue('');
this.loadTableData({pageIndex: 1, pageSize: 10, protocol: ''})
this.setState({
selectedTags: []
})
this.loadTableData({pageIndex: 1, pageSize: 10, protocol: '', tags: ''})
}}>
</Button>