Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
elegantDeepKinase
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangshufen
elegantDeepKinase
Commits
3a8b772b
Commit
3a8b772b
authored
Feb 20, 2023
by
wangshufen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature:kiniase功能优化修改
parent
e08523de
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
90 additions
and
76 deletions
+90
-76
src/routes/Home/TargetDetails/index.js
+0
-0
src/routes/Kinase/SearchDetails/index.js
+5
-5
src/routes/Kinase/SearchList/index.js
+0
-0
src/routes/Kinase/TargetDetails/index.js
+4
-8
src/routes/Kinase/index.js
+38
-24
src/store/index.js
+5
-5
src/store/kinaseSearch.js
+16
-0
src/utils/request.js
+22
-34
No files found.
src/routes/Home/TargetDetails/index.js
View file @
3a8b772b
This diff is collapsed.
Click to expand it.
src/routes/Kinase/SearchDetails/index.js
View file @
3a8b772b
...
...
@@ -950,11 +950,11 @@ export default class SearchDetails extends Component {
<
Table
bordered
rowKey
=
'dataid'
dataSource
=
{
DetailsData
.
Indication
}
pagination
=
{
false
}
columns
=
{
columns2
}
/
>
<
Pagination
showSizeChanger
onShowSizeChange
=
{
this
.
onShowSizeChange3
}
onChange
=
{
this
.
onChange3
}
total
=
{
total_num3
}
/
>
<
/Panel
>
<
Panel
header
=
'Target'
key
=
'1'
id
=
'Target
'
>
<
Panel
header
=
'Target'
id
=
'Target'
key
=
'1
'
>
<
Table
bordered
rowKey
=
'index'
dataSource
=
{
DetailsData
.
Target
}
pagination
=
{
false
}
columns
=
{
columns
}
/
>
<
Pagination
showSizeChanger
onShowSizeChange
=
{
this
.
onShowSizeChange2
}
onChange
=
{
this
.
onChange2
}
total
=
{
total_num
}
/
>
<
/Panel
>
<
Panel
header
=
'Biological Propeties'
id
=
'BiologicalPropeties'
key
=
'5'
>
<
Panel
header
=
'Biological Propeties
0
'
id
=
'BiologicalPropeties'
key
=
'5'
>
<
div
className
=
'Calcilated'
>
<
div
className
=
'div-list'
>
<
div
className
=
'list-one'
>
...
...
@@ -996,11 +996,11 @@ export default class SearchDetails extends Component {
<
/div
>
<
/Panel
>
<
Panel
header
=
'Bioassay'
key
=
'2'
id
=
'Bioassay
'
>
<
Panel
header
=
'Bioassay'
id
=
'Bioassay'
key
=
'2
'
>
<
Table
bordered
rowKey
=
'dataid'
dataSource
=
{
DetailsData
.
Bioassay
}
pagination
=
{
false
}
columns
=
{
columns3
}
expandedRowRender
=
{
expandedRowRender
}
/
>
<
Pagination
showSizeChanger
onShowSizeChange
=
{
this
.
onShowSizeChange
}
onChange
=
{
this
.
onChange
}
total
=
{
total_num2
}
/
>
<
/Panel
>
<
Panel
header
=
'Calculated Propeties'
key
=
'3'
id
=
'CalculatedPropeties
'
>
<
Panel
header
=
'Calculated Propeties'
id
=
'CalculatedPropeties'
key
=
'3
'
>
<
div
>
<
div
className
=
'Calcilated'
>
<
div
className
=
'list-one2'
>
...
...
@@ -1041,7 +1041,7 @@ export default class SearchDetails extends Component {
<
/div
>
<
/div
>
<
/Panel
>
<
Panel
header
=
'Structure'
key
=
'4'
id
=
'Structure
'
>
<
Panel
header
=
'Structure'
id
=
'Structure'
key
=
'4
'
>
<
Tabs
defaultActiveKey
=
'0'
// type="card"
...
...
src/routes/Kinase/SearchList/index.js
View file @
3a8b772b
This diff is collapsed.
Click to expand it.
src/routes/Kinase/TargetDetails/index.js
View file @
3a8b772b
...
...
@@ -1232,26 +1232,22 @@ export default class TargetDetails extends Component {
<
div
className
=
'div-list'
>
<
div
className
=
'list-one'
>
<
div
>
Gene
name
<
/div
>
<
div
/>
{
targetsDetail
.
Gene_name
.
map
((
item
)
=>
{
return
<
Tag
>
{
item
}
<
/Tag>
;
})}
<
/div
>
<
div
className
=
'list-one'
>
<
div
>
Species
<
/div
>
<
div
/>
<
div
>
Species00
<
/div
>
{
targetsDetail
.
Species
}
<
/div
>
<
div
className
=
'list-one'
>
<
div
>
Uniprot
id
<
/div
>
<
div
/>
{
targetsDetail
.
Uniport_id
}
<
/div
>
{
/* <div className="list-one"
>
<
div
className
=
'list-one'
>
<
div
>
Class
<
/div
>
<div />
{targetsDetail.Class}
</div> */
}
{
targetsDetail
.
Class
||
''
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
src/routes/Kinase/index.js
View file @
3a8b772b
...
...
@@ -3,10 +3,15 @@ import { Form, Input, Button, Select, Tabs, message, Radio, Checkbox, Row, Col }
import
LogoTitlte
from
'../../components/LogoTitlte/index'
;
import
{
Jsme
}
from
'jsme-react'
;
import
qs
from
'qs'
;
import
{
inject
,
observer
}
from
'mobx-react'
;
import
request
from
'../../utils/request'
;
import
{
getQueryString
}
from
'../../utils/utils'
;
import
'./style.css'
;
import
{
withRouter
}
from
'react-router-dom'
;
const
{
TabPane
}
=
Tabs
;
const
{
Option
}
=
Select
;
@
inject
(
'kinaseSearch'
)
@
observer
class
Home
extends
React
.
Component
{
state
=
{
select_db
:
'Ligands'
,
...
...
@@ -71,6 +76,7 @@ class Home extends React.Component {
compoundList
:
[
'DrugName'
,
'Smiles'
],
targetList
:
[
'TargetName'
,
'UniprotId'
],
optionsList
:
[{
label
:
'查询drug相关靶点'
,
value
:
1
},
{
label
:
'查询ligand相关靶点'
,
value
:
2
,
disabled
:
false
},
{
label
:
'是否有PDB结构'
,
value
:
3
}],
activeKey
:
this
.
props
.
kinaseSearch
.
activeTabKey
||
'Drug'
,
};
// Mutation
CheckChange
=
(
e
)
=>
{
...
...
@@ -346,11 +352,18 @@ class Home extends React.Component {
this
.
setState
(()
=>
({
searchData
:
searchData
}));
// this.setState(()=>({data:e }))
};
componentDidMount
()
{
console
.
log
(
'111'
,
this
.
props
.
kinaseSearch
.
searchParams
);
if
(
this
.
props
.
kinaseSearch
.
searchParams
.
drugs_data
)
{
this
.
state
.
searchData
=
this
.
props
.
kinaseSearch
.
searchParams
;
}
// console.log('222',qs.parse(this.props.location.search.slice(1)),)
// this.getList()
// this.getSelectList()
this
.
getTargetSelectList
();
}
getSelectList
=
()
=>
{
request
.
get
(
'/kinase/target_class/drug'
)
...
...
@@ -373,28 +386,26 @@ class Home extends React.Component {
});
};
//首页启动调用接口 先checkToken == localStorage.getItem('token')
getTargetSelectList
=
()
=>
{
localStorage
.
getItem
(
'token'
)
&&
request
.
get
(
'/kinase/target_class/target'
)
.
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
data
.
code
===
200
)
{
console
.
log
(
res
.
data
.
data
);
request
.
get
(
'/kinase/target_class/target'
)
.
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
data
.
code
===
200
)
{
console
.
log
(
res
.
data
.
data
);
this
.
setState
({
TargetClassList
:
res
.
data
.
data
,
TargetAllClassList
:
res
.
data
.
data
,
});
console
.
log
(
this
.
state
);
}
else
{
message
.
error
(
res
.
data
.
msg
);
}
})
.
catch
((
err
)
=>
{
console
.
error
(
err
);
});
this
.
setState
({
TargetClassList
:
res
.
data
.
data
,
TargetAllClassList
:
res
.
data
.
data
,
});
console
.
log
(
this
.
state
);
}
else
{
message
.
error
(
res
.
data
.
msg
);
}
})
.
catch
((
err
)
=>
{
console
.
error
(
err
);
});
};
getValue
=
(
e
)
=>
{
const
{
value
}
=
e
.
target
;
...
...
@@ -465,6 +476,7 @@ class Home extends React.Component {
};
getDrugsList
=
()
=>
{
let
data
=
this
.
state
.
searchData
;
this
.
props
.
kinaseSearch
.
addSearchParams
(
data
);
if
(
data
.
drugs_data
==
''
)
{
return
message
.
warning
(
'请输入查询条件!'
);
}
...
...
@@ -501,6 +513,8 @@ class Home extends React.Component {
searchData
.
name
=
e
;
this
.
setState
(()
=>
({
searchData
:
searchData
}));
console
.
log
(
this
.
state
.
searchData
);
this
.
setState
({
activeKey
:
e
});
this
.
props
.
kinaseSearch
.
setActiveKey
(
e
);
};
getJsme
=
()
=>
{
console
.
log
(
1
);
...
...
@@ -524,11 +538,11 @@ class Home extends React.Component {
<
div
className
=
'home'
>
<
div
className
=
'home-div'
>
{
/* <LogoTitlte></LogoTitlte> */
}
<
Tabs
onChange
=
{
this
.
callback
}
type
=
'card'
>
<
Tabs
onChange
=
{
this
.
callback
}
activeKey
=
{
this
.
state
.
activeKey
}
type
=
'card'
>
<
TabPane
tab
=
'Drug'
key
=
'Drug'
>
<
div
className
=
'top-div'
>
<
div
>
<
Form
layout
=
'horizontal'
>
<
Form
onSubmit
=
{
this
.
getDrugsList
}
layout
=
'horizontal'
>
<
Form
.
Item
label
=
'请输入药物名或Smiles'
{...
formItemLayout
}
>
<
Input
placeholder
=
'请输入化合物'
style
=
{{
width
:
250
}}
size
=
'large'
onChange
=
{
this
.
getValue
}
value
=
{
this
.
state
.
searchData
.
drugs_data
}
/
>
<
/Form.Item
>
...
...
@@ -556,7 +570,7 @@ class Home extends React.Component {
<
/Radio.Group
>
<
/Form.Item
>
<
Form
.
Item
label
=
''
{...
formTailLayout
}
>
<
Button
type
=
'primary'
style
=
{{
width
:
150
}}
size
=
'large'
loading
=
{
this
.
state
.
loading
}
onClick
=
{
this
.
getDrugsList
}
>
<
Button
type
=
'primary'
style
=
{{
width
:
150
}}
htmlType
=
'submit'
size
=
'large'
loading
=
{
this
.
state
.
loading
}
>
Search
<
/Button
>
<
/Form.Item
>
...
...
@@ -679,4 +693,4 @@ class Home extends React.Component {
}
}
export
default
Home
;
export
default
withRouter
(
Home
)
;
src/store/index.js
View file @
3a8b772b
import
appStore
from
'./appStore'
import
appStore
from
'./appStore'
;
// import stepFormStore from '../routes/Entry/FormDemo/store'
import
kinaseSearch
from
'./kinaseSearch'
;
const
store
=
{
appStore
,
// stepFormStore
}
export
default
store
\ No newline at end of file
kinaseSearch
,
};
export
default
store
;
src/store/kinaseSearch.js
0 → 100644
View file @
3a8b772b
import
{
observable
,
action
}
from
'mobx'
;
class
KianseSearch
{
@
observable
searchParams
=
{};
@
observable
activeKey
=
''
;
@
action
addSearchParams
(
data
)
{
console
.
log
(
'data'
,
data
);
this
.
searchParams
=
data
;
}
@
action
setActiveKey
=
(
key
)
=>
{
console
.
log
(
'key----'
,
key
)
this
.
activeTabKey
=
key
;
};
}
export
default
new
KianseSearch
();
src/utils/request.js
View file @
3a8b772b
...
...
@@ -17,36 +17,28 @@ function disableF12() {
}
// disableF12();
//对axios二次封装
// 封装同步Ajax请求
function
checkAjaxToken
()
{
const
token
=
getQueryString
(
'token'
)
||
localStorage
.
getItem
(
'token'
);
let
xhr
=
new
XMLHttpRequest
();
xhr
.
open
(
'GET'
,
'http://69.235.144.91:8048/yszh-login/auth/checkToken'
,
false
);
xhr
.
setRequestHeader
(
'accessToken'
,
token
);
xhr
.
send
(
null
);
console
.
log
(
xhr
);
//准备状态
if
(
xhr
.
status
==
200
&&
JSON
.
parse
(
xhr
.
responseText
).
code
==
200
)
{
// 获取响应结果
// console.log(xhr.responseText);
token
&&
localStorage
.
setItem
(
'token'
,
token
);
return
true
;
}
else
{
console
.
log
(
'状态码:'
+
xhr
.
status
+
',原因:'
+
xhr
.
responseText
);
return
false
;
}
}
checkAjaxToken
();
const
token
=
getQueryString
(
'token'
)
||
localStorage
.
getItem
(
'token'
);
function
checkFetchToken
()
{
fetch
(
'http://69.235.144.91:8048/yszh-login/auth/checkToken'
,
{
method
:
'GET'
,
headers
:
{
accessToken
:
token
,
},
})
.
then
((
res
)
=>
res
.
json
())
.
then
((
res
)
=>
{
console
.
log
(
'fetch--res'
,
res
);
if
(
res
.
code
===
200
)
{
//校验通过,存储token
token
&&
localStorage
.
setItem
(
'token'
,
token
);
}
else
{
alert
(
'token校验失败,返回登录页'
);
// window.open('http://localhost:3000/#/login', '_self');
// window.open('http://69.235.144.91:3048/#/login', '_self');
window
.
open
(
'http://ysplatform.atelligence-ai.com/#/login'
,
'_self'
);
}
})
.
catch
(
function
(
err
)
{
console
.
log
(
'err'
,
err
);
// window.open('http://69.235.144.91:3048/#/login', '_self');
window
.
open
(
'http://ysplatform.atelligence-ai.com/#/login'
,
'_self'
);
});
}
checkFetchToken
();
const
baseURL
=
'http://52.83.169.190:8002/'
;
//线上正式环境
// const baseURL = 'http://69.235.144.91:8002/'; 测试环境
...
...
@@ -62,15 +54,11 @@ const request = axios.create({
//拦截器
request
.
interceptors
.
request
.
use
((
config
)
=>
{
// alert('拦截器..');
console
.
log
(
'token---'
,
'拦截器方法校验token'
);
console
.
log
(
config
);
if
(
localStorage
.
getItem
(
'token'
))
{
config
.
headers
[
'accessToken'
]
=
localStorage
.
getItem
(
'token'
);
console
.
log
(
'config'
,
config
);
if
(
checkAjaxToken
())
{
return
config
;
}
else
{
console
.
log
(
'token为空....'
);
// window.open('http://69.235.144.91:3048/#/login', '_self');
window
.
open
(
'http://ysplatform.atelligence-ai.com/#/login'
,
'_self'
);
}
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment