Ben Lin
2024-06-24 c8f8a9c645f7857859a9d56fac96192d994be70b
src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_PV.ts
@@ -4,10 +4,13 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-22 23:00:34
 * @LastEditTime: 2024-06-22 23:40:02
 */
import { ActionItem, BasicColumn } from '/@/components/Table';
import { useI18n } from '/@/hooks/web/useI18n';
const { t } = useI18n();
function _default() {
  const ActionColumn: BasicColumn = {
@@ -23,7 +26,7 @@
     * @description: 获取新增按钮的行为
     * @return {*}
     */
    CreateAction: () => {
    CreateAction: (fnName: string) => {
      return {
        action: 'drawer', //drawer(打开左侧抽屉框) | go(跳转到新的页面)
      };
@@ -35,11 +38,51 @@
    ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => {
      return data;
    },
    GetSelectSuccess:(d, u) => {
    /**
     * @description: 选择过程变量弹出选择框成功返回赋值方法
     * @param {*} d
     * @param {*} u
     * @return {*}
     */
    GetSelectSuccess: (d, u) => {
      return {
        ITEM_CODE: d.values['val'],
        VAR_VALUE: d.values['val'],
      };
    }
    },
    OpenSelectItem:(openItemModal: Fn) => {
        openItemModal(true, {
          title: '过程变量列表',
          schemas: [
            {
              field: 'VAR_CODE',
              component: 'Input',
              label: '过程变量编码',
              colProps: {
                span: 12,
              },
            },
          ],
          ItemColumns: [
            {
              title: t('过程变量编码'),
              dataIndex: 'VAR_CODE',
              resizable: true,
              sorter: true,
              width: 200,
            },
            {
              title: t('过程变量名称'),
              dataIndex: 'VAR_NAME',
              resizable: true,
              sorter: true,
              width: 180,
            },
          ],
          tableName: 'BAS_LABEL_PV',
          rowKey: 'VAR_CODE',
          searchInfo: {TABLE_NAME: 'BAS_LABEL_PV'}
        });
      }
  };
  return [methods, ActionColumn];