From 21a4e09672b1177d40c2bb5b937a8780c5eaa7fb Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期六, 08 三月 2025 15:03:34 +0800
Subject: [PATCH] 一些更新

---
 src/views/tigerprojects/system/lowcode/entityts/BAS_DEFECT.ts |   78 ++++++++++++++++-----------------------
 1 files changed, 32 insertions(+), 46 deletions(-)

diff --git a/src/views/tigerprojects/system/lowcode/entityts/BAS_DEFECT.ts b/src/views/tigerprojects/system/lowcode/entityts/BAS_DEFECT.ts
index d2cd403..57e79ff 100644
--- a/src/views/tigerprojects/system/lowcode/entityts/BAS_DEFECT.ts
+++ b/src/views/tigerprojects/system/lowcode/entityts/BAS_DEFECT.ts
@@ -4,7 +4,7 @@
  * @version:
  * @Date: 2024-06-19 20:34:27
  * @LastEditors: Ben Lin
- * @LastEditTime: 2024-07-02 20:00:10
+ * @LastEditTime: 2024-07-04 11:21:28
  */
 
 import { Ref, h, unref } from 'vue';
@@ -17,7 +17,7 @@
 import { Tag } from 'ant-design-vue';
 import { useLocale } from '/@/locales/useLocale';
 import { useDrawer } from '/@/components/Drawer';
-import { EditOperation, Search } from '../data';
+import { EditOperation, Search, custDel } from '../data';
 
 const { getLocale } = useLocale();
 function _default() {
@@ -28,7 +28,7 @@
     slots: { customRender: 'action' },
     fixed: undefined,
   };
-  
+
   /**
    * @description: 浜涜嚜瀹氫箟鏂规硶
    * @return {*}
@@ -38,7 +38,7 @@
      * @description: 鑾峰彇鏂板鎸夐挳鐨勮涓�
      * @return {*}
      */
-    CreateAction: (fnName: string) => {
+    CreateAction: (type: string) => {
       return {
         action: 'drawer', //drawer(鎵撳紑宸︿晶鎶藉眽妗�) | go(璺宠浆鍒版柊鐨勯〉闈�)
       };
@@ -49,7 +49,7 @@
      */
     ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => {
       if (!isNullOrUnDef(data[1])) {
-        data[1].popConfirm.confirm = DftGrpDel.bind(null, args, params);
+        data[1].popConfirm.confirm = custDel.bind(null, args, params);
       }
       return data;
     },
@@ -58,7 +58,12 @@
      * @return {*}
      */
     GetHomeUrl: () => {
-      const param = { ID: 'BAS_DEFECT_GRP', colSlots: [], crudColSlots: [] };
+      const param = {
+        ID: 'BAS_DEFECT_GRP',
+        EntityName: 'BAS_DEFECT_GRP',
+        colSlots: [],
+        crudColSlots: [],
+      };
       return `/BAS_DEFECT_GRP/LC/${encodeURI(JSON.stringify(param))}`;
     },
     GetBaseColumns: (type: string) => {
@@ -112,7 +117,7 @@
     /**
      * @description: 鑾峰彇鍗$墖鍐呴厤缃垪琛紝浠ュ惊鐜樉绀哄涓崱鐗囧苟閰嶇疆澶氫釜鎻掓Ы
      * @return {*}
-     */    
+     */
     GetBaseCards: (type: string) => {
       return [
         {
@@ -134,18 +139,20 @@
     /**
      * @description: 鑾峰彇鍙充晶杈规use鏂规硶
      * @return {*}
-     */    
+     */
     GetUseDrawers: () => {
-      return [{
-        'BAS_DEFECT': useDrawer(),
-      }];
+      return [
+        {
+          BAS_DEFECT: useDrawer(),
+        },
+      ];
     },
     /**
      * @description: 鑾峰彇琛ㄦ牸use鍒楄〃
      * @param {string} type
      * @param {array} args
      * @return {*}
-     */    
+     */
     GetUseTables: (data: Ref<{}>, ...args) => {
       return {
         BAS_DEFECT: useTable({
@@ -158,7 +165,7 @@
             submitFunc: () => Search('BAS_DEFECT', data, args[0]), //鑷畾涔夋煡璇㈡彁浜ゆ寜閽殑鏂规硶锛岃Е鍙戞煡璇㈡彁浜や簨浠�
           },
           useSearchForm: true,
-          showTableSetting: true,
+          showTableSetting: false,
           bordered: true,
           canResize: true,
           showIndexColumn: false,
@@ -169,7 +176,7 @@
             slots: { customRender: 'action' },
             fixed: 'right',
           }, //鑷畾涔夋搷浣滃垪
-        })
+        }),
       };
     },
     /**
@@ -192,7 +199,7 @@
       }
       return data;
     },
-    OthersValues: (val: string, id: string) => {
+    KeyFieldValues: (val: string, id: string) => {
       return { DFTG_CODE: val };
     } /**
      * @description: 鑷畾涔夋槑缁嗚〃涓紪杈戣繑鍥炴柟娉�
@@ -214,7 +221,7 @@
           };
         return item;
       });
-      EditOperation(data,d, u, item, _data);
+      EditOperation(data, d, u, item, _data);
     },
     /**
      * @description: 鑾峰彇鏍囬淇℃伅
@@ -227,36 +234,15 @@
         pageContent: '杩欓噷鍙互娣诲姞鍜屼慨鏀逛笉鑹唬鐮佺粍鍜屼笉鑹唬鐮併��',
         tableTitle: {
           BAS_DEFECT: '涓嶈壇浠g爜绠$悊',
-        }
+        },
       };
+    },
+    GetUseForm: () => {
+      return {};
     },
   };
 
-  /**
-   * @description: 鑷畾涔夊垹闄ゆ柟娉�
-   * @param {Fn} args
-   * @param {*} params
-   * @return {*}
-   */
-  function DftGrpDel(args: Fn[], params: {}) {
-    if (!isNullOrEmpty(params['data'])) {
-      var _data = params['data'].value.filter((item) => item['ID'] != params['record']['ID']);
-      params['data'].value = _data;
-      args[6]({
-        dataSource: [],
-      });
-      args[6]({
-        dataSource: params['data'],
-      });
-      args[1]();
-    } else {
-      DeleteEntity(params['record'], params['entityName']).then((action) => {
-        if (action.IsSuccessed) {
-          args[1]();
-        }
-      });
-    }
-  }
+  /* 浠ヤ笅鏄唴閮ㄦ柟娉曪紝涓峞xport锛屼緵涓婇潰鐨勬柟娉曡皟鐢� */
 
   const baseColumns = {
     BAS_DEFECT: [
@@ -309,8 +295,8 @@
         title: '鏇存柊浜�',
         dataIndex: 'UPDATE_USER',
       },
-    ]
-  }
+    ],
+  };
 
   const searchForms = {
     BAS_DEFECT: [
@@ -331,7 +317,7 @@
         },
       },
     ] as FormSchema[],
-  }
+  };
 
   const crudForms = {
     BAS_DEFECT: [
@@ -405,7 +391,7 @@
         show: false,
       },
     ] as FormSchema[],
-  }
+  };
 
   return [methods, ActionColumn];
 }

--
Gitblit v1.9.3