Ben Lin
2024-08-04 54bd2e89b8689e9aa8ab6edcda003da46065cb19
src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_TEMP.ts
@@ -4,14 +4,16 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-07-31 22:23:50
 * @LastEditTime: 2024-08-04 14:20:29
 */
import { DeleteLabelTemplate } from '/@/api/tigerapi/mes/label';
import { CustModalParams } from '/@/api/tigerapi/model/systemModel';
import { ActionItem, BasicColumn } from '/@/components/Table';
import { useWebSocketStore } from '/@/store/modules/websocket';
import { useI18n } from '/@/hooks/web/useI18n';
const { t } = useI18n();
function _default() {
  const ActionColumn: BasicColumn = {
    width: 120,
@@ -104,6 +106,57 @@
        );
      }
    },
    /**
     * @description: 选择过程变量弹出选择框成功返回赋值方法
     * @param {*} d
     * @param {*} u
     * @return {*}
     */
    GetSelectSuccess: (d, u) => {
      return {
        LABEL_CODE: d.values['val'],
      };
    },
    /**
     * @description: 打开客户弹出选择框
     * @param {Fn} openItemModal
     * @param {array} args
     * @return {*}
     */
    OpenSelectItem: (openItemModal: Fn, ...args) => {
      openItemModal(true, {
        title: '打印模板列表',
        schemas: [
          {
            field: 'LABEL_CODE',
            component: 'Input',
            label: '模板编码',
            colProps: {
              span: 12,
            },
          },
        ],
        ItemColumns: [
          {
            title: t('模板编码'),
            dataIndex: 'LABEL_CODE',
            resizable: true,
            sorter: true,
            width: 200,
          },
          {
            title: t('模板名称'),
            dataIndex: 'LABEL_NAME',
            resizable: true,
            sorter: true,
            width: 180,
          },
        ],
        tableName: 'BAS_LABEL_TEMP',
        rowKey: 'LABEL_CODE',
        searchInfo: { TABLE_NAME: 'BAS_LABEL_TEMP' },
      });
    },
  };
  /* 以下是内部方法,不export,供上面的方法调用 */
@@ -122,6 +175,7 @@
      Title: `编辑模板${params['record']['LABEL_CODE']}的变量`,
      pCode: 'LABEL_CODE',
      IsID: true,
      ifSave: false,
      colSlots: params['colSlots'].value, //['BAS_LABEL_VAR1add', 'BAS_LABEL_VAR2add'],
      colSlotsInHigh: ['BAS_LABEL_VAR1add', 'BAS_LABEL_VAR2add'],
      drawers: [
@@ -164,7 +218,7 @@
   * @param {Fn} args
   * @param {*} params
   * @return {*}
   */
   */
  function Del(args: Fn[], params: {}) {
    const reload = args[1];
    DeleteLabelTemplate(params['record']['ID']).then((action) => {