From 3aedad63dd01f1fc5154cb520af32edab967d6e0 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周一, 12 5月 2025 09:15:26 +0800
Subject: [PATCH] Merge branch 'master' of http://222.71.245.114:9086/r/HIA24016N_PipeLineDemo

---
 PipeLineLems/pipelinelems_web/src/widgets/CallMaterialOrder/Views/CallMaterialOrder.tsx |   80 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 80 insertions(+), 0 deletions(-)

diff --git a/PipeLineLems/pipelinelems_web/src/widgets/CallMaterialOrder/Views/CallMaterialOrder.tsx b/PipeLineLems/pipelinelems_web/src/widgets/CallMaterialOrder/Views/CallMaterialOrder.tsx
new file mode 100644
index 0000000..c9025ad
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/CallMaterialOrder/Views/CallMaterialOrder.tsx
@@ -0,0 +1,80 @@
+import { 
+  Component, 
+  DefineComponent, 
+  defineComponent, 
+  markRaw, 
+  ref, 
+  SetupContext, 
+  onMounted, 
+} from 'vue' 
+import styles from './CallMaterialOrder.module.scss' 
+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 '@/hooks/hook' 
+import TabPane from '@/components/Tab/TabPane' 
+ 
+const Models: ModuleType = import.meta.glob('./config/*.json', { 
+  eager: true, 
+}) 
+ 
+const entityNames = getEntityNames(Models) 
+ 
+const nameToLabelMap = [{ name: 'CallMaterialOrder', label: '鍙枡鍗�' }] 
+ 
+export default defineComponent({ 
+  name: 'CallMaterialOrder', 
+ 
+  setup(props, ctx: SetupContext) { 
+    useProvideModels() 
+    usePermission(props, permissionCodes) 
+ 
+    const rf = ref<{ 
+      [key: string]: any 
+    }>({}) 
+ 
+    const tabData = ref<TabItem[]>([]) 
+ 
+    const onTabChange = (v: string) => { 
+      rf.value?.[v]?.reloadList() 
+    } 
+ 
+    const initTableData = async () => { 
+      for (const i in entityNames) { 
+        const name = entityNames[i] 
+        const module = await import(`./Pages/${name}/${name}.tsx`) 
+        const CallMaterialOrder = markRaw(module.default) 
+        const foundLabel = 
+          nameToLabelMap.find((item) => item.name === name)?.label || name 
+        tabData.value.push({ 
+          label: foundLabel, 
+          name, 
+          component: CallMaterialOrder, 
+        }) 
+      } 
+    } 
+ 
+    initTableData() 
+ 
+    return () => { 
+      return ( 
+        <div class={styles.CallMaterialOrder}> 
+          <Tab data={tabData.value} type="list" onTab={onTabChange}> 
+            {tabData.value.map((widgetInfo) => { 
+              const Widget: any = widgetInfo.component 
+              return ( 
+                <TabPane label={widgetInfo.label} name={widgetInfo.name}> 
+                  <Widget 
+                    ref={(r: any) => (rf.value['CallMaterialOrder'] = r)} 
+                  ></Widget> 
+                </TabPane> 
+              ) 
+            })} 
+          </Tab> 
+        </div> 
+      ) 
+    } 
+  }, 
+}) 

--
Gitblit v1.9.3