|
@@ -202,6 +202,16 @@ const RulesCode = () => {
|
|
|
保存
|
|
|
</Button>
|
|
|
) : null
|
|
|
+
|
|
|
+ const handleMenuChange = (key: string) => {
|
|
|
+ const [subject, tab] = key.split('_')
|
|
|
+ setState({
|
|
|
+ ...state,
|
|
|
+ activeKey: key,
|
|
|
+ tabId: tab
|
|
|
+ })
|
|
|
+ tryRuleCode({ tab: tab, subjectID: subject })
|
|
|
+ }
|
|
|
return (
|
|
|
<PageContainer title={false}>
|
|
|
<div className="h-full w-full flex flex-row">
|
|
@@ -210,18 +220,11 @@ const RulesCode = () => {
|
|
|
title="业务主体列表"
|
|
|
options={state.subjectList}
|
|
|
value={state.activeKey}
|
|
|
- onChange={key => {
|
|
|
- setState({
|
|
|
- ...state,
|
|
|
- activeKey: key,
|
|
|
- tabId: key.split('_')[1]
|
|
|
- })
|
|
|
- tryRuleCode({ tab: key.split('_')[1], subjectID: key.split('_')[0] })
|
|
|
- }}
|
|
|
+ onChange={key => handleMenuChange(key)}
|
|
|
/>
|
|
|
) : null}
|
|
|
|
|
|
- <div className="w-6/7 ml-8 p-4 bg-white">
|
|
|
+ <div className="w-6/7 ml-8 p-4 pt-1 bg-white">
|
|
|
<Tabs
|
|
|
defaultActiveKey="yuS"
|
|
|
tabBarExtraContent={renderExtraTabContent()}
|