Ben Lin
2024-06-23 8cfe56d782e4f8cddf0fa8f0cff84a5b4034aa3d
src/views/tigerprojects/system/lowcode/detail/basLabelVar.ts
@@ -1,13 +1,13 @@
/*
 * @Description: file content
 * @Description: 打印模板方法数据相关
 * @Author: Ben Lin
 * @version: 
 * @Date: 2024-06-13 16:18:39
 * @LastEditors: your name
 * @LastEditTime: 2024-06-13 22:47:11
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-22 23:39:08
 */
import { h, unref } from "vue";
import { ActionItem, BasicColumn, FormSchema } from "/@/components/Table";
import { BasicColumn, FormSchema } from "/@/components/Table";
import { Tag, Tooltip } from "ant-design-vue";
import { GetEnum } from "/@/api/tigerapi/system";
import { useLocale } from "/@/locales/useLocale";
@@ -77,7 +77,7 @@
export const secondColumns: BasicColumn[] = [];
let isShow = true;
let isShow = false;
export const firstFormSchemas: FormSchema[] = [
    {
        field: 'ID',
@@ -138,13 +138,13 @@
        },
    },
    {
        field:"BAS_LABEL_PV1PSelect_0",
        field:"BAS_LABEL_PV1PSelect_0", //按低代码配置的规则,实体名+序号+PSelect_0,序号用来区分多个的时候,PSelect_0这是个固定后缀
        label:"1",
        defaultValue:"BAS_LABEL_PV",
        component:"Input",
        colProps:{"span":4},
        ifShow: ({ values }) => isShow,
        colSlot:"BAS_LABEL_PV1add"
        colSlot:"BAS_LABEL_PV1add" //按低代码配置的规则,实体名+序号+add,序号用来区分多个的时候,add这是个固定后缀
    },
    {
        field: 'REMARK',
@@ -164,78 +164,4 @@
        colProps: { span: 8 },
        component: 'Input',
    },
];
export const labelActionItem: ActionItem[] = [
    {
        icon: 'clarity:info-standard-line',
        tooltip: '模板变量',
        onClick: () => { },
    },
];
/**
 * @description: 跳转到详情页面方法
 * @param {Fn} go
 * @return {*}
 */
export function goDetail(go: Fn, record: Recordable) {
    const id = {
        ID: 'BAS_LABEL_VAR',
        firstTabName: '标签模板变量',
        secondTabName:'', //'标签过程变量',
        firstTitle: '模板变量',
        secondTitle: '', //'过程变量',
        contentStr: '这里是标签模板变量管理页面,可以管理标签的模板变量或者打印过程中的变量',
        detailName: `模板[${record.LABEL_NAME}]`,
        others: { LABEL_ID: record.ID },
        colSlots: ['BAS_LABEL_PV1add'],
    };
    go(`/BAS_LABEL_VAR/${encodeURI(JSON.stringify(id))}`);
}
export function labelOpenSelectItem(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',
    });
  }
  /**
   * @description: 选择过程变量弹出选择框成功返回赋值方法
   * @param {*} d
   * @param {*} u
   * @return {*}
   */
  export function labelGetSelectSuccess(d, u) {
    return {
        VAR_VALUE: d.values['val'],
    };
  }
];