Pārlūkot izejas kodu

fix: 主体列表点击获取onChange:key,label的值

outaozhen 3 gadi atpakaļ
vecāks
revīzija
64ffb77288

+ 3 - 4
src/pages/Business/RuleCode/components/LeftMenu/index.tsx

@@ -4,7 +4,6 @@ import styles from './index.less'
 import { BusinessType } from '@/enums/gc'
 import { connect } from '@umijs/max'
 import classNames from 'classnames'
-import { approvalTypeMap } from '../..'
 
 type LeftMenuProps = {
   title?: string
@@ -27,10 +26,10 @@ const LeftMenu: React.FC<LeftMenuProps> = ({ title = '业务主体列表', onCha
   })
 
   const handleOnSelect = ({ key }) => {
-    const [value, label] = key.split('_')
+    const [value] = key.split('_')
     const option = {
-      value,
-      label: approvalTypeMap[label] + '审核'
+      value: value,
+      label: subjectList?.find(item => item.ID === value)?.name
     }
     if (onChange) {
       onChange(key, option)