| | |
| | | onMounted, |
| | | } from 'vue' |
| | | import styles from './HIAWms.module.scss' |
| | | // import WmsContainer from './Pages/WmsContainer/WmsContainer' |
| | | // import WmsContainer from './Pages/HIAWms/WmsContainer' |
| | | import Tab from '@/components/Tab/Tab' |
| | | import { useProvideModels } from '@/libs/Provider/app' |
| | | import { usePermission } from '@/libs/Permission/Permission' |
| | | import { permissionCodes } from '../enum' |
| | | import { ModuleType, TabItem } from '../type/Type' |
| | | import { getEntityNames } from '../../hook' |
| | | import { getEntityNames } from '@/hooks/hook' |
| | | import TabPane from '@/components/Tab/TabPane' |
| | | |
| | | const Models: ModuleType = import.meta.glob('./config/*.json', { |
| | |
| | | }) |
| | | |
| | | const entityNames = getEntityNames(Models) |
| | | |
| | | const nameToLabelMap = [{ name: 'WmsMaterial', label: '物料基础' }] |
| | | |
| | | export default defineComponent({ |
| | | name: 'HIAWms', |
| | |
| | | for (const i in entityNames) { |
| | | const name = entityNames[i] |
| | | const module = await import(`./Pages/${name}/${name}.tsx`) |
| | | const WmsContainer = markRaw(module.default) |
| | | const WmsPlaces = markRaw(module.default) |
| | | const foundLabel = |
| | | nameToLabelMap.find((item) => item.name === name)?.label || name |
| | | tabData.value.push({ |
| | | label: name, |
| | | label: foundLabel, |
| | | name, |
| | | component: WmsContainer, |
| | | component: WmsPlaces, |
| | | }) |
| | | } |
| | | } |
| | |
| | | return ( |
| | | <TabPane label={widgetInfo.label} name={widgetInfo.name}> |
| | | <Widget |
| | | ref={(r: any) => (rf.value['WmsContainer'] = r)} |
| | | ref={(r: any) => (rf.value['WmsMaterial'] = r)} |
| | | ></Widget> |
| | | </TabPane> |
| | | ) |