Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaochengxiang
szse
Commits
9c193ecc
Commit
9c193ecc
authored
Nov 12, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
不可点击按钮增加提示
parent
1881d552
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
6 deletions
+53
-6
ImportActionIndex.jsx
src/view/Manage/Model/Component/ImportActionIndex.jsx
+9
-1
ImportActionPartition.jsx
src/view/Manage/Model/Component/ImportActionPartition.jsx
+13
-1
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+9
-1
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+6
-1
VersionCompare.jsx
src/view/Manage/Model/Component/VersionCompare.jsx
+16
-2
No files found.
src/view/Manage/Model/Component/ImportActionIndex.jsx
View file @
9c193ecc
...
@@ -640,11 +640,19 @@ const ImportActionIndex = (props) => {
...
@@ -640,11 +640,19 @@ const ImportActionIndex = (props) => {
setKeyword
(
e
.
target
.
value
||
''
);
setKeyword
(
e
.
target
.
value
||
''
);
}
}
let
disableAdd
=
false
,
addTip
=
''
;
if
(
editingKey
!==
null
||
keyword
!==
''
)
{
disableAdd
=
true
;
addTip
=
'正在搜索或者编辑中,不允许新建'
;
}
return
(
return
(
<
div
className=
'model-import-action-index'
>
<
div
className=
'model-import-action-index'
>
<
div
className=
'd-flex mb-3'
style=
{
{
justifyContent
:
editable
?
'space-between'
:
'flex-end'
}
}
>
<
div
className=
'd-flex mb-3'
style=
{
{
justifyContent
:
editable
?
'space-between'
:
'flex-end'
}
}
>
{
{
editable
&&
<
Button
onClick=
{
onAddClick
}
disabled=
{
editingKey
!==
null
||
keyword
!==
''
}
>
新建
</
Button
>
editable
&&
<
Tooltip
title=
{
addTip
}
>
<
Button
onClick=
{
onAddClick
}
disabled=
{
disableAdd
}
>
新建
</
Button
>
</
Tooltip
>
}
}
<
div
className=
'd-flex'
style=
{
{
alignItems
:
'center'
}
}
>
<
div
className=
'd-flex'
style=
{
{
alignItems
:
'center'
}
}
>
<
Input
<
Input
...
...
src/view/Manage/Model/Component/ImportActionPartition.jsx
View file @
9c193ecc
...
@@ -236,6 +236,7 @@ const ImportActionPartition = (props) => {
...
@@ -236,6 +236,7 @@ const ImportActionPartition = (props) => {
}
}
const
remove
=
(
record
)
=>
{
const
remove
=
(
record
)
=>
{
setData
(
null
);
onChange
&&
onChange
(
null
);
onChange
&&
onChange
(
null
);
}
}
...
@@ -395,11 +396,22 @@ const ImportActionPartition = (props) => {
...
@@ -395,11 +396,22 @@ const ImportActionPartition = (props) => {
return
columns
;
return
columns
;
}
}
let
disableAdd
=
false
,
addTip
=
''
;
if
(
isEditing
)
{
disableAdd
=
true
;
addTip
=
'正在编辑中,不允许新建'
;
}
else
if
(
data
)
{
disableAdd
=
true
;
addTip
=
'已存在分区,不允许再新建'
;
}
return
(
return
(
<
div
className=
'model-import-action-index'
>
<
div
className=
'model-import-action-index'
>
{
{
editable
&&
<
div
className=
'd-flex mb-3'
>
editable
&&
<
div
className=
'd-flex mb-3'
>
<
Button
onClick=
{
onAddClick
}
disabled=
{
data
||
isEditing
}
>
新建
</
Button
>
<
Tooltip
title=
{
addTip
}
>
<
Button
onClick=
{
onAddClick
}
disabled=
{
disableAdd
}
>
新建
</
Button
>
</
Tooltip
>
</
div
>
</
div
>
}
}
<
div
className=
'mb-3'
id=
"containerId"
>
<
div
className=
'mb-3'
id=
"containerId"
>
...
...
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
9c193ecc
...
@@ -949,11 +949,19 @@ const ImportActionTable = (props) => {
...
@@ -949,11 +949,19 @@ const ImportActionTable = (props) => {
onValuesChange(currentChangedValues, form.getFieldsValue(), suggestOffset);
onValuesChange(currentChangedValues, form.getFieldsValue(), suggestOffset);
}
}
let disableAdd = false, addTip = '';
if (editingKey!=='' || keyword!=='') {
disableAdd = true;
addTip = '正在搜索或者编辑中,不允许新建';
}
return (
return (
<div className='model-import-action-table'>
<div className='model-import-action-table'>
<div className='d-flex mb-3' style={{ justifyContent: editable?'space-between':'flex-end' }}>
<div className='d-flex mb-3' style={{ justifyContent: editable?'space-between':'flex-end' }}>
{
{
editable && <Button onClick={onAddClick} disabled={ editingKey!=='' || keyword!=='' } >新建</Button>
editable && <Tooltip title={addTip}>
<Button onClick={onAddClick} disabled={disableAdd} >新建</Button>
</Tooltip>
}
}
<div className='d-flex' style={{ alignItems: 'center' }}>
<div className='d-flex' style={{ alignItems: 'center' }}>
<Input
<Input
...
...
src/view/Manage/Model/Component/ModelTable.jsx
View file @
9c193ecc
...
@@ -451,11 +451,16 @@ const ModelTable = (props) => {
...
@@ -451,11 +451,16 @@ const ModelTable = (props) => {
}
}
}
}
let
_columns
=
[...
columns
];
if
((
modelId
||
''
)
!==
''
)
{
_columns
=
columns
.
filter
(
item
=>
item
.
dataIndex
!==
'key'
)
}
return
(
return
(
<
div
className=
{
classes
}
>
<
div
className=
{
classes
}
>
<
Table
<
Table
rowSelection=
{
rowSelection
}
rowSelection=
{
rowSelection
}
columns=
{
columns
||
[]
}
columns=
{
_
columns
||
[]
}
rowKey=
{
'id'
}
rowKey=
{
'id'
}
dataSource=
{
modelId
?(
subData
||
[]):(
_data
||
[])
}
dataSource=
{
modelId
?(
subData
||
[]):(
_data
||
[])
}
pagination=
{
false
}
pagination=
{
false
}
...
...
src/view/Manage/Model/Component/VersionCompare.jsx
View file @
9c193ecc
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Form
,
Select
,
Spin
}
from
'antd'
;
import
{
Form
,
Select
,
Spin
,
Tooltip
}
from
'antd'
;
import
showdown
from
'showdown'
;
import
showdown
from
'showdown'
;
import
{
dispatch
,
dispatchLatest
}
from
'../../../../model'
;
import
{
dispatch
,
dispatchLatest
}
from
'../../../../model'
;
...
@@ -116,9 +116,23 @@ const VersionCompare = (props) => {
...
@@ -116,9 +116,23 @@ const VersionCompare = (props) => {
<
Select
loading=
{
loading
}
value=
{
basicVersion
}
style=
{
{
width
:
300
}
}
onChange=
{
onBasicChange
}
>
<
Select
loading=
{
loading
}
value=
{
basicVersion
}
style=
{
{
width
:
300
}
}
onChange=
{
onBasicChange
}
>
{
{
(
basicVersions
||
[]).
map
((
version
,
index
)
=>
{
(
basicVersions
||
[]).
map
((
version
,
index
)
=>
{
if
(
index
===
0
)
{
return
(
<
Option
key=
{
index
}
value=
{
version
.
id
||
''
}
disabled=
{
true
}
>
<
Tooltip
title=
{
'最近版本只能在增量版本中被选中'
}
>
{
version
.
name
||
''
}
</
Tooltip
>
</
Option
>
)
};
return
(
return
(
<
Option
key=
{
index
}
value=
{
version
.
id
||
''
}
disabled=
{
index
===
0
}
>
{
version
.
name
||
''
}
</
Option
>
<
Option
key=
{
index
}
value=
{
version
.
id
||
''
}
>
{
version
.
name
||
''
}
</
Option
>
);
);
})
})
}
}
</
Select
>
</
Select
>
...
...
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