Ben Lin
2024-06-24 c8f8a9c645f7857859a9d56fac96192d994be70b
src/views/tigerprojects/system/lowcode/entityts/V_BAS_PROD.ts
@@ -4,26 +4,12 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-22 00:32:39
 * @LastEditTime: 2024-06-24 15:50:03
 */
import { ActionItem } from '/@/components/Table';
import { ActionItem, BasicColumn } from '/@/components/Table';
function _default() {
  /**
   * @description: 产品绑定工艺路线操作字段自定义按钮
   * @return {*}
   */
  function ActionItem(params: Recordable<any>, data, ...args): ActionItem[] {
    return [
      {
        icon: 'binding|svg',
        tooltip: '绑定工艺',
        onClick: handleBinding.bind(null, args[5], params),
      },
    ];
  }
  /**
   * @description: 跳转产品工艺绑定页面
   * @param {*} params
@@ -49,7 +35,43 @@
    // })
  }
  return [ActionItem];
  const ActionColumn: BasicColumn = {
    width: 80,
    title: '操作',
    dataIndex: 'action',
    slots: { customRender: 'action' },
    fixed: undefined,
  };
  const methods = {
    /**
     * @description: 获取新增按钮的行为
     * @return {*}
     */
    CreateAction: (fnName: string) => {
      return {
        action: 'drawer', //drawer(打开左侧抽屉框) | go(跳转到新的页面)
      };
    },
    /**
     * @description: 产品绑定工艺路线操作字段自定义按钮
     * @return {*}
     */
    ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => {
      return [
        {
          icon: 'binding|svg',
          tooltip: '绑定工艺',
          onClick: handleBinding.bind(null, args[5], params),
        },
      ];
    },
    OthersValues: (val: string, id: string) => {
      return { RSNG_CODE: val };
    },
  };
  return [methods, ActionColumn];
}
export default _default;