From 1f32ea02c1910c417f159cba81a296e66ae7484c Mon Sep 17 00:00:00 2001
From: zs <zhousong@weben-smart.com>
Date: 周一, 28 4月 2025 17:38:15 +0800
Subject: [PATCH] 初次提交修改

---
 HIAWms/web/src/widgets/HIAWms/Controllers/Sample.ts |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/WMS/web/app/template/MyPluginName/Controllers/MyEntityName.ts b/HIAWms/web/src/widgets/HIAWms/Controllers/Sample.ts
similarity index 88%
copy from WMS/web/app/template/MyPluginName/Controllers/MyEntityName.ts
copy to HIAWms/web/src/widgets/HIAWms/Controllers/Sample.ts
index 6c970ba..59a1d8d 100644
--- a/WMS/web/app/template/MyPluginName/Controllers/MyEntityName.ts
+++ b/HIAWms/web/src/widgets/HIAWms/Controllers/Sample.ts
@@ -1,6 +1,6 @@
 import { ref, onMounted, reactive, Ref, nextTick, computed } from 'vue'
 import { injectModel } from '@/libs/Provider/Provider'
-import { MyEntityName } from '../Models/MyEntityName'
+import { Sample } from '../Models/Sample'
 import { ElMessage } from 'element-plus'
 import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox'
 import { useFile } from './File'
@@ -9,8 +9,8 @@
   row: any
   index: number
 }
-export const useMyEntityName = (props: any, ctx?: any) => {
-  const myEntityName = injectModel<MyEntityName>('myEntityName')
+export const useSample = (props: any, ctx?: any) => {
+  const sample = injectModel<Sample>('sample')
   const { exportFile } = useFile()
   /**
    * 澶撮儴閰嶇疆
@@ -19,7 +19,7 @@
   /**
    * 鍔ㄦ�佸垪閰嶇疆
    */
-  const myEntityNameColumns = ref<Record<string, any>>([])
+  const sampleColumns = ref<Record<string, any>>([])
   /**
    * 鎼滅储鍊�
    */
@@ -112,7 +112,7 @@
     {
       label: '鍒涘缓鍓湰',
       fn: async ({ row }: CurrentType) => {
-        await myEntityName.cloneData([row.id])
+        await sample.cloneData([row.id])
         ElMessage.success('鍒涘缓鍓湰鎴愬姛')
         tableRef.value?.getList()
       },
@@ -127,7 +127,7 @@
           `鏄惁鍒犻櫎${names.length ? names.join(',') : c.row.name}`
         ).then(async () => {
           const ids = selection.value.map((item: { id: string }) => item.id)
-          await myEntityName.deleteMyEntityNames(ids.length ? ids : [c.row.id])
+          await sample.deleteSamples(ids.length ? ids : [c.row.id])
           ElMessage.success('鍒犻櫎鎴愬姛')
           tableRef.value.getList()
         })
@@ -140,7 +140,7 @@
     selection.value = records
   }
 
-  const onAddMyEntityName = () => {
+  const onAddSample = () => {
     const params = tableRef.value?.getPaginationParams()
     current.value = null
     dialogConfig.visible = true
@@ -149,7 +149,7 @@
     sort.value = params.totalCount + 1
   }
 
-  const onConfirmMyEntityName = async () => {
+  const onConfirmSample = async () => {
     dialogConfig.visible = false
     if (dialogConfig.isAdd) {
       tableRef.value?.scrollToRow({
@@ -173,9 +173,9 @@
   const onExport = () => {
     const params = tableRef.value?.getParams()
     exportFile(
-      '/api/v1/myPluginName/myEntityName/export',
+      '/api/v1/hiawms/sample/export',
       params,
-      'myPluginName'
+      'hiawms'
     )
   }
 
@@ -245,7 +245,7 @@
     current,
     search,
     sort,
-    myEntityNameColumns,
+    sampleColumns,
     paginationParams,
     headers,
     onBeforeUpload,
@@ -255,8 +255,8 @@
     onSearch,
     onExport,
     onRowClick,
-    onConfirmMyEntityName,
+    onConfirmSample,
     onCheck,
-    onAddMyEntityName,
+    onAddSample,
   }
 }

--
Gitblit v1.9.3