Ben Lin
2024-10-27 92cb62d60d38be56312be20cfae8638a5a9aa57a
src/views/tigerprojects/tsk/tsk_job/log.data.ts
@@ -1,43 +1,64 @@
import { ParamParams } from './../../../../api/tigerapi/model/systemModel';
import { h } from 'vue';
import { BasicColumn, FormSchema } from '/@/components/Table';
import { useMessage } from '/@/hooks/web/useMessage';
import { h, ref } from 'vue';
import { Tag } from 'ant-design-vue';
import { getTsk_LogListByPage } from '/@/api/tigerapi/tsk/tsk_log';
import { Tag, Tooltip } from 'ant-design-vue';
//界面列表显示
export const logcolumns: BasicColumn[] = [
  
  // {
  //   title: '开始时间',
  //   dataIndex: 'StartTime',
  //   width: 180,
  // },
  // {
  //   title: '结束时间',
  //   dataIndex: 'EndTime',
  //   width: 180,
  // },
  {
    title: '类名',
    dataIndex: 'TriggerType',
    width: 180,
    title: '开始时间',
    dataIndex: 'StartTime',
    sorter: true,
    resizable: true,
    width: 150,
  },
  {
    title: '结束时间',
    dataIndex: 'EndTime',
    sorter: true,
    resizable: true,
    width: 150,
  },
  // {
  //   title: '类名',
  //   dataIndex: 'TriggerType',
  //   width: 180,
  // },
  {
    title: '运行状态',
    dataIndex: 'Status',
    width: 180,
    width: 80,
    customRender: ({ record }) => {
      let text = '';
      let color = '';
      switch (record.Status) {
        case 'Successed':
          text = '成功';
          color = 'green';
          break;
        case 'Failed':
          text = '失败';
          color = 'red';
          break;
        case 'Warnning':
          text = '警告';
          color = 'orange';
          break;
        default:break;
      }
      return h(Tooltip, { title: text }, () => h(Tag, { color: color }, () => text));
  },
  {
    title: '操作类型',
    dataIndex: 'Operation',
    width: 180,
  },
  // {
  //   title: '操作类型',
  //   dataIndex: 'Operation',
  //   width: 180,
  // },
  {
    title: '本次执行耗时(s)',
    dataIndex: 'ElapsedTime',
    width: 180,
    width: 90,
  },
  // {
  //   title: '状态',
@@ -53,7 +74,8 @@
  {
    title: '描述',
    dataIndex: 'Remark',
    width: 180,
    resizable: true,
    width: 260,
  },
];