import { resultSuccess } from '../_util';

const list = {
  records: [
    {
      id: 1,
      approvalTemplateId: 1001,
      approvalOrder: 1,
      nodeDescription: '部门经理初审',
      approverType: 0,
      approverInfoList: [{ approverId: 101, approverName: '张三' }],
      approvalType: 0,
    },
    {
      id: 2,
      approvalTemplateId: 1001,
      approvalOrder: 2,
      nodeDescription: '总监审核',
      approverType: 0,
      approverInfoList: [{ approverId: 102, approverName: '李四' }],
      approvalType: 0,
    },
    {
      id: 3,
      approvalTemplateId: 1001,
      approvalOrder: 3,
      nodeDescription: '财务审核',
      approverType: 0,
      approverInfoList: [
        { approverId: 103, approverName: '王五' },
        { approverId: 104, approverName: '赵六' },
      ],
      approvalType: 1,
    },
    {
      id: 4,
      approvalTemplateId: 1001,
      approvalOrder: 4,
      nodeDescription: '人力资源确认',
      approverType: 0,
      approverInfoList: [{ approverId: 105, approverName: '孙七' }],
      approvalType: 0,
    },
    {
      id: 5,
      approvalTemplateId: 1001,
      approvalOrder: 5,
      nodeDescription: '分管副总审批',
      approverType: 0,
      approverInfoList: [{ approverId: 106, approverName: '周八' }],
      approvalType: 0,
    },
    {
      id: 6,
      approvalTemplateId: 1001,
      approvalOrder: 6,
      nodeDescription: '总经理终审',
      approverType: 0,
      approverInfoList: [{ approverId: 107, approverName: '吴九' }],
      approvalType: 0,
    },
    {
      id: 7,
      approvalTemplateId: 1002,
      approvalOrder: 1,
      nodeDescription: '项目经理初审',
      approverType: 0,
      approverInfoList: [{ approverId: 201, approverName: '郑十' }],
      approvalType: 0,
    },
    {
      id: 8,
      approvalTemplateId: 1002,
      approvalOrder: 2,
      nodeDescription: '技术总监审核',
      approverType: 0,
      approverInfoList: [{ approverId: 202, approverName: '钱十一' }],
      approvalType: 0,
    },
    {
      id: 9,
      approvalTemplateId: 1002,
      approvalOrder: 3,
      nodeDescription: '客户确认',
      approverType: 1,
      approverInfoList: [],
    },
    {
      id: 10,
      approvalTemplateId: 1002,
      approvalOrder: 4,
      nodeDescription: '归档',
      approverType: 0,
      approverInfoList: [{ approverId: 203, approverName: '孙十二' }],
      approvalType: 0,
    },
  ],
  totalRow: 10,
};

export default [
  {
    url: '/safety_mock_api/approvalManagement/queryApprovalTemplateDetail',
    timeout: 1000,
    method: 'post',
    response: () => {
      return resultSuccess(list);
    },
  },
];
