// 部门-资产分配 import { Tabs } from 'antd'; import { useIntl } from '@@/plugin-locale/localeExports'; import Product from './product'; import Device from '@/pages/system/Department/Assets/deivce'; import Member from '@/pages/system/Department/Member'; import { model } from '@formily/reactive'; import { observer } from '@formily/react'; // import { ExclamationCircleOutlined } from '@ant-design/icons'; import { useEffect } from 'react'; interface AssetsProps { parentId: string; } export enum ASSETS_TABS_ENUM { 'ProductCategory' = 'ProductCategory', 'Product' = 'Product', 'Device' = 'Device', 'User' = 'User', } export const AssetsModel = model<{ tabsIndex: string; bindModal: boolean; parentId: string; params: any; }>({ tabsIndex: ASSETS_TABS_ENUM.Product, bindModal: false, parentId: '', params: {}, }); const Assets = observer((props: AssetsProps) => { const intl = useIntl(); // 资产类型 const TabsArray = [ // { // intlTitle: '1', // defaultMessage: '产品分类', // key: ASSETS_TABS_ENUM.ProductCategory, // components: ProductCategory, // }, { intlTitle: '2', defaultMessage: '产品', key: ASSETS_TABS_ENUM.Product, components: Product, }, { intlTitle: '3', defaultMessage: '设备', key: ASSETS_TABS_ENUM.Device, components: Device, }, { intlTitle: '4', defaultMessage: '用户', key: ASSETS_TABS_ENUM.User, components: Member, }, ]; useEffect(() => { AssetsModel.parentId = props.parentId; }, [props.parentId]); return (