import { Component } from '@angular/core';
import { Flow, MyFlowItemComponent } from './my-flow-item/my-flow-item.component';

const getMockFlow = (): Flow => {
  // 获取mock数据
  return {
    category: '隐患',
    title: 'XX隐患治理上报',
    time: '2024-09-20 10:00',
    status: '待审批',
    creator: '高鹏', // 发起人
  };
};

@Component({
  selector: 'workbench-my-flow',
  standalone: true,
  imports: [MyFlowItemComponent],
  templateUrl: './my-flow.component.html',
  styleUrl: './my-flow.component.less',
})
export class MyFlowComponent {
  // 当前选中的tab
  activeTab = '待处理';
  tabs = ['待处理', '抄送我的', '我发起的'];

  flows: Flow[] = Array.from({ length: 10 }).map(() => getMockFlow());
}
