From 8099042b51891d1e58d6066f0247ba423f4457bd Mon Sep 17 00:00:00 2001
From: yyg1378265336 <1378265336@qq.com>
Date: 星期四, 27 二月 2025 09:27:17 +0800
Subject: [PATCH] Merge branch 'master' of http://47.115.28.255:8110/r/TigerClouds-Tech/BS/TigerAdmin_2024

---
 src/views/tigerprojects/system/lowcode/entityts/MES_TOOL.ts |  145 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 145 insertions(+), 0 deletions(-)

diff --git a/src/views/tigerprojects/system/lowcode/entityts/MES_TOOL.ts b/src/views/tigerprojects/system/lowcode/entityts/MES_TOOL.ts
new file mode 100644
index 0000000..e38ffee
--- /dev/null
+++ b/src/views/tigerprojects/system/lowcode/entityts/MES_TOOL.ts
@@ -0,0 +1,145 @@
+/*
+ * @Description: 宸ュ叿灞炴��
+ * @Author: Ben Lin
+ * @version:
+ * @Date: 2024-06-19 20:34:27
+ * @LastEditors: Ben Lin
+ * @LastEditTime: 2024-08-04 14:20:02
+ */
+
+import { ActionItem, BasicColumn } from '/@/components/Table';
+import { buildUUID } from '/@/utils/uuid';
+import { useI18n } from '/@/hooks/web/useI18n';
+import { isNullOrUnDef } from '/@/utils/is';
+
+const { t } = useI18n();
+function _default() {
+  const ActionColumn: BasicColumn = {
+    width: 100,
+    title: '鎿嶄綔',
+    dataIndex: 'action',
+    slots: { customRender: 'action' },
+    fixed: 'right',
+  };
+  /**
+   * @description: 涓�浜涜嚜瀹氫箟鏂规硶
+   * @return {*}
+   */
+  const methods = {
+    /**
+     * @description: 鑾峰彇鏂板鎸夐挳鐨勮涓�
+     * @return {*}
+     */
+    CreateAction: (type: string) => {
+      return {
+        action: 'go', //drawer(鎵撳紑宸︿晶鎶藉眽妗�) | go(璺宠浆鍒版柊鐨勯〉闈�) | edit(濡傛灉鏄〃鏍煎彲缂栬緫椤甸潰灏辨槸鑷畾涔夋柟娉�)
+        url: 'MES_TOOL_PROP/High',
+        params: {
+          CODE: '0',
+          ID: buildUUID(),
+          Name: 'MES_TOOL_PROP',
+          Title: '鏂板鐢熶骇宸ュ叿淇℃伅',
+          // pCode: 'DFTG_CODE',
+          IsID: false,
+          ifSave: false,
+          drawers: [{ name: 'MES_TOOL_PROP', code: 'TOOL_CODE', type: 'one', keyName: 'MES_TOOL_PROP' }], //drawers鏄彸杈瑰脊鍑哄鏀逛晶妗嗙殑鍚嶅瓧鍒楄〃
+        },
+      };
+    },
+    /**
+     * @description: 鎿嶄綔瀛楁鑷畾涔夋寜閽�
+     * @return {*}
+     */
+    ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => {
+      if (!isNullOrUnDef(data[0])) {
+        data[0].onClick =Redact.bind(null, args, params);
+      }
+      return data;
+    },
+    /**
+     * @description: 寮瑰嚭閫夋嫨妗嗘垚鍔熻繑鍥炴柟娉�
+     * @param {*} d
+     * @param {*} u
+     * @return {*}
+     */
+    GetSelectSuccess: (d, u) => {
+      return {
+        ITEM_CODE: d.values['val'],
+      };
+    },
+    /**
+     * @description: 寮瑰嚭閫夋嫨妗嗘墦寮�鏂规硶
+     * @param {Fn} openItemModal
+     * @return {*}
+     */
+    OpenSelectItem: (openItemModal: Fn, ...args) => {
+      openItemModal(true, {
+        title: '鐗╂枡鍒楄〃',
+        schemas: [
+          {
+            field: 'ITEM_CODE',
+            component: 'Input',
+            label: '鐗╂枡缂栫爜',
+            colProps: {
+              span: 12,
+            },
+          },
+        ],
+        ItemColumns: [
+          {
+            title: t('鐗╂枡缂栫爜'),
+            dataIndex: 'ITEM_CODE',
+            resizable: true,
+            sorter: true,
+            width: 200,
+          },
+          {
+            title: t('鐗╂枡鍚嶇О'),
+            dataIndex: 'ITEM_NAME',
+            resizable: true,
+            sorter: true,
+            width: 180,
+          },
+        ],
+        tableName: 'BAS_ITEM',
+        rowKey: 'ITEM_CODE',
+        searchInfo: { TABLE_NAME: 'BAS_ITEM' },
+      });
+    },
+    GetUseForm: () => {
+      return {};
+    },
+  };
+
+  /* 浠ヤ笅鏄唴閮ㄦ柟娉曪紝涓峞xport锛屼緵涓婇潰鐨勬柟娉曡皟鐢� */
+
+  /**
+   * @description: 鑷畾涔夌紪杈戞柟娉�
+   * @param {Fn} args
+   * @param {*} params
+   * @return {*}
+   */
+  function Redact(args: Fn[], params: {}) {
+    const param = {
+      CODE: params['record']['TOOL_CODE'],
+      ID: params['record']['ID'],
+      Name: 'MES_TOOL_PROP',
+      SessionName: 'MES_TOOL_PROP_update',
+      Title: `缂栬緫鐢熶骇宸ュ叿淇℃伅锛�${params['record']['TOOL_CODE']}`,
+      pCode: 'TOOL_CODE',
+      IsID: false,
+      ifSave: false,
+      drawers: [{ name: 'MES_TOOL_PROP', code: 'TOOL_CODE', type: 'one', keyName: 'MES_TOOL_PROP' }], //drawers鏄彸杈瑰脊鍑哄鏀逛晶妗嗙殑鍚嶅瓧鍒楄〃
+    };
+    // 灏嗗璞¤浆鎹负JSON瀛楃涓插苟淇濆瓨鍒皊essionStorage
+    sessionStorage.removeItem(`${param.SessionName}_params`);
+    sessionStorage.setItem(`${param.SessionName}_params`, encodeURI(JSON.stringify(param)));
+    args[5](
+      `/MES_TOOL_PROP/High/${encodeURI(JSON.stringify({ sName: param.SessionName, Name: param.Name }))}`,
+    );
+  }
+
+  return [methods, ActionColumn];
+}
+
+export default _default;

--
Gitblit v1.9.3