YangYuGang
2025-03-05 6cc2d85787171281c269f4a6c3290b4a0762bcb6
src/views/tigerprojects/system/lowcode/entityts/BAS_REASON.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-22 00:58:43
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-07-02 19:59:39
 * @LastEditTime: 2024-07-04 11:21:56
 */
import { Ref, h } from 'vue';
import { DeleteEntity, getEntity } from '/@/api/tigerapi/system';
@@ -15,7 +15,7 @@
import { formatToDateTime } from '/@/utils/dateUtil';
import { Tag } from 'ant-design-vue';
import { useDrawer } from '/@/components/Drawer';
import { EditOperation, Search } from '../data';
import { EditOperation, Search, custDel } from '../data';
function _default() {
  const ActionColumn: BasicColumn = {
@@ -35,7 +35,7 @@
     * @description: 获取新增按钮的行为
     * @return {*}
     */
    CreateAction: (fnName: string) => {
    CreateAction: (type: string) => {
      return {
        action: 'drawer', //drawer(打开左侧抽屉框) | go(跳转到新的页面)
      };
@@ -46,7 +46,7 @@
     */
    ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => {
      if (!isNullOrUnDef(data[1])) {
        data[1].popConfirm.confirm = rsnGrpDel.bind(null, args, params);
        data[1].popConfirm.confirm = custDel.bind(null, args, params);
      }
      return data;
    },
@@ -167,7 +167,7 @@
            submitFunc: () => Search('BAS_REASON', data, args[0]), //自定义查询提交按钮的方法,触发查询提交事件
          },
          useSearchForm: true,
          showTableSetting: true,
          showTableSetting: false,
          bordered: true,
          canResize: true,
          showIndexColumn: false,
@@ -201,7 +201,7 @@
      }
      return data;
    },
    OthersValues: (val: string, id: string) => {
    KeyFieldValues: (val: string, id: string) => {
      return { RSNG_CODE: val };
    },
    /**
@@ -218,35 +218,12 @@
        }
      };
    },
    GetUseForm: () => {
      return {};
    },
  };
  /* 以下是内部方法,不export,供上面的方法调用 */
  /**
   * @description: 自定义删除方法
   * @param {Fn} args
   * @param {*} params
   * @return {*}
   */
  function rsnGrpDel(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]();
        }
      });
    }
  }
  const baseColumns = {
    BAS_REASON: [