Commit cab522e8 by zhaochengxiang

模型对比

parent 346879ec
...@@ -171,7 +171,7 @@ const Basic = React.forwardRef(function ({}, ref) { ...@@ -171,7 +171,7 @@ const Basic = React.forwardRef(function ({}, ref) {
const getDataModels = () => { const getDataModels = () => {
if (args.keyword) { if (args.keyword) {
getModelsByKeywordAndCatalog()
} else { } else {
if (type === 'dir') { if (type === 'dir') {
getDirModelsByCatalog() getDirModelsByCatalog()
...@@ -235,6 +235,28 @@ const Basic = React.forwardRef(function ({}, ref) { ...@@ -235,6 +235,28 @@ const Basic = React.forwardRef(function ({}, ref) {
}) })
} }
const getModelsByKeywordAndCatalog = () => {
let params = { term: args.keyword }
if (type === 'state') {
params = {...params, stateId: node?.id }
} else if (type === 'branch') {
params = {...params, branchId: node?.id }
}
setLoading(true)
dispatch({
type: 'datamodel.searchModel',
payload: params,
callback: (data) => {
setLoading(false)
setData(data)
},
error: () => {
setLoading(false)
}
})
}
const onChange = (val) => { const onChange = (val) => {
setSelectedRows(val) setSelectedRows(val)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment