export default {
  id: 'training',
  title: '所受培训',
  showProgress: true,
  progress: 0,
  get: {
    action: '/zws/v1/enrollment/trainings?project_id=1001',
    callback(data) {
      data.date_of_starting_to_work = data.date_of_starting_to_work + ''
      return data
    }
  },
  update: {
    action: '/api/v1/enrollment/trainings',
    data: { project_id: 1001 },
    callback(data) {
      return data
    }
  },
  form: {
    options: {
      labelWidth: '80px'
    },
    items: [
      {
        type: 'date-picker-form',
        elemType: 'monthrange',
        label: '培训时间',
        model: 'times',
        required: true,
        attrs: { 'value-format': 'yyyy-MM' },
        rules: [{ required: true, message: '请选择培训时间', trigger: 'blur' }]
      },
      {
        type: 'input-form',
        label: '培训机构',
        model: 'school_name_cn',
        rules: [{ required: true, message: '请输入培训机构', trigger: 'blur' }]
      },
      {
        type: 'input-form',
        label: '课程名称',
        model: 'school_country',
        rules: [
          {
            required: true,
            message: '请输入课程名称',
            trigger: 'blur'
          }
        ]
      }
    ]
  }
}
