export default {
  id: 'file',
  title: '资料上传',
  showProgress: true,
  progress: 0,
  get: {
    action: '/zws/v1/enrollment/attachments?project_id=1001',
    callback(data) {
      let _data = {
        uploadArrs: []
      }
      data.forEach((item, index) => {
        _data.uploadArrs.push({
          url: item.file,
          id: item.id,
          'sso_file_name': item.sso_file_name
        })
      })
      return _data
    }
  },
  update: {
    action: '/zws/v1/enrollment/profiles',
    data: { project_id: 1000 },
    callback(data) {
      return data
    }
  },
  form: {
    options: {
    },
    items: [
      {
        type: 'upload-form',
        label: '有效身份证件（正面）',
        'model': 'uploadArrs',
        'action': '/zws/v1/enrollment/attachments',
        'deleteAction': '/zws/v1/enrollment/attachments',
        'data': {
          'file_type': 10,
          'project_id': 1001
        },
        'attrs': {
          'multiple': true
        },
        'html': `
          <div style="color: #72818c; font-size: 14px;">
            <p style="margin: 0;">申请者需要将有效身份证件原件扫描或者拍照后提交。</p>
            <p style="margin: 0;">请您提供有效身份证件的扫描件，身份证与台港澳居民大陆通行证应包括正反两面扫描件。</p>
            <p style="margin: 0;">只上传一个文件，多份文件需合并到一个文件后打印出来检查无误后再上传。</p>
            <p style="margin: 0;">上传文件仅限“jpg,jpeg,gif,png”格式，文件小于10MB。</p>
          </div>
        `
      }
    ]
  }
}
