import { FormConfig } from '@/types/basic-form';

// 员工上报隐患管理表单配置（详情页，所有字段禁用）
export const ACADEMY_FILE_FORM_CONFIG: FormConfig[] = [
  {
    prop: 'hazardDesc',
    label: '隐患问题：',
    component: 'ElInput',
    componentProps: {
      placeholder: '隐患问题描述',
      disabled: true,
    },
  },
  {
    prop: 'location',
    label: '隐患地点：',
    component: 'ElInput',
    componentProps: {
      placeholder: '隐患地点',
      disabled: true,
    },
  },
  {
    prop: 'reportTime',
    label: '上报时间：',
    component: 'ElDatePicker',
    componentProps: {
      type: 'datetime',
      placeholder: '上报时间',
      valueFormat: 'YYYY-MM-DD HH:mm:ss',
      disabled: true,
    },
  },
  {
    prop: 'sourceTypeName',
    label: '提交类型：',
    component: 'ElInput',
    componentProps: {
      placeholder: '提交类型',
      disabled: true,
    },
  },
  {
    prop: 'reporterName',
    label: '姓名：',
    component: 'ElInput',
    componentProps: {
      placeholder: '姓名',
      disabled: true,
    },
  },
  {
    prop: 'reporterJobNo',
    label: '工号：',
    component: 'ElInput',
    componentProps: {
      placeholder: '工号',
      disabled: true,
    },
  },
  {
    prop: 'reporterMobile',
    label: '联系电话：',
    component: 'ElInput',
    componentProps: {
      placeholder: '联系电话',
      disabled: true,
    },
  },
  {
    prop: 'attachment',
    label: '附件：',
    slot: 'attachment',
  },
];

export const ACADEMY_FILE_FORM_DATA = {
  hazardDesc: '',
  location: '',
  reportTime: '',
  sourceTypeName: '',
  sourceType: 1 as number, // 提交类型：1-员工
  taskSource: '',
  categoryId: 0 as number,
  reporterName: '',
  reporterJobNo: '',
  reporterMobile: '',
  attachment: '',
};

export const ACADEMY_FILE_FORM_RULES = {};
