Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
Project
Project
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
ReactWeb5
wisdom-components
Commits
cb8422c1
Commit
cb8422c1
authored
Mar 25, 2025
by
周宏民
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pref: 指标选择器 保存修改时 回调 添加参数判断
parent
c948851f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
index.js
packages/extend-components/EC_QuotaSelect/src/index.js
+5
-4
No files found.
packages/extend-components/EC_QuotaSelect/src/index.js
View file @
cb8422c1
...
@@ -106,6 +106,7 @@ const QuotaSelect = ({
...
@@ -106,6 +106,7 @@ const QuotaSelect = ({
updateMonitorConf
(
params
).
then
((
response
)
=>
{
updateMonitorConf
(
params
).
then
((
response
)
=>
{
if
(
response
.
code
===
0
)
{
if
(
response
.
code
===
0
)
{
message
.
success
(
'保存成功'
);
message
.
success
(
'保存成功'
);
onOk
(
'update'
)
}
else
{
}
else
{
message
.
error
(
response
.
msg
);
message
.
error
(
response
.
msg
);
}
}
...
@@ -203,22 +204,23 @@ const QuotaSelect = ({
...
@@ -203,22 +204,23 @@ const QuotaSelect = ({
}
}
};
};
const
onOk
=
()
=>
{
const
onOk
=
(
type
)
=>
{
onModalOk
&&
onModalOk
();
onModalOk
&&
onModalOk
();
handleOk
();
handleOk
(
type
);
setQuotaList
([]);
setQuotaList
([]);
setGroupQuotaList
([]);
setGroupQuotaList
([]);
setVisible
(
false
);
setVisible
(
false
);
setSearch
(
''
);
setSearch
(
''
);
};
};
const
handleOk
=
()
=>
{
const
handleOk
=
(
type
)
=>
{
const
curSelectList
=
JSON
.
parse
(
JSON
.
stringify
(
selectData
));
const
curSelectList
=
JSON
.
parse
(
JSON
.
stringify
(
selectData
));
const
curSelectKey
=
curSelectList
.
map
((
child
)
=>
child
.
key
);
const
curSelectKey
=
curSelectList
.
map
((
child
)
=>
child
.
key
);
onSelect
({
onSelect
({
device
:
selectDevice
,
device
:
selectDevice
,
selectKey
:
curSelectKey
,
selectKey
:
curSelectKey
,
selectList
:
curSelectList
,
selectList
:
curSelectList
,
type
:
type
,
});
});
};
};
...
@@ -373,7 +375,6 @@ const QuotaSelect = ({
...
@@ -373,7 +375,6 @@ const QuotaSelect = ({
type
=
"primary"
type
=
"primary"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
updateDeviceConf
();
updateDeviceConf
();
onOk
();
}}
}}
>
>
保存修改
保存修改
...
...
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