import React, { useState } from 'react';

import { Input, Menu, Dropdown, Button, Icon, message, Table, Tooltip, Tabs, Radio, Divider, Tag, Select, Form, Alert } from 'antd';
import { FormattedMessage } from 'umi-plugin-react/locale';
import styles from '../../style/GoodsList.less';
import XForm, { FieldTypes } from '../../../components/XForm';
import Wangedit from '../../../components/Wangedit/Wangedit'
import channels from './channelList.less';

import Tagss from '../components/Tagss.jsx';

const { TextArea } = Input;


/**
 *
 *
 * @param {*} props
 * @returns
 */
const Edit = (props) => {

  const fields = [
    {
      label: '名称',
      name: 'staffName',
      type: FieldTypes.Text,
      // placeholder: '名称',
      value: ''
    },
    {
      label: '公司',
      name: 'staffCompany',
      type: FieldTypes.Text,
      placeholder: '请输入公司名称',
      value: ''
    },
    {
      label: '部门',
      name: 'staffDepartment',
      type: FieldTypes.Text,
      placeholder: '请输入部门',
      value: ''
    },
    {
      label: '职位',
      name: 'staffPosition',
      type: FieldTypes.Text,
      placeholder: '请输入职位',
      value: ''
    },
    {
      label: '电话',
      name: 'staffTel',
      type: FieldTypes.Text,
      placeholder: '请输入电话号码',
      value: ''
      // rules: [
      //   { message: '请输入电话号码'}
      // ]
    },
    {
      label: '标签',
      name: 'staffTag',
      render: 
      <Tagss/>
     
   
    },
    {
      label: '地址',
      name: 'staffAddress',
      type: FieldTypes.Text,
      placeholder: '请输入地址',
      value: ''

    },
    {
      label: '授权项目',
      name: 'staffProject',
      type: FieldTypes.Select,
      placeholder: '请选择',
      value: ''
    },

    // {
    //   label: '授权项目',
    //   name: 'staffProject',
    //   type: FieldTypes.Text,
    //   placeholder: '请选择'
    // },

    {
      label: '图片',
      name: 'staffImage',
      type: FieldTypes.ImageUploader,
      extra: '建议图片大小 640 * 640',
      value: ''
    },


    {
      label: '简介',
      name: 'staffIntroduction',
      render: <TextArea className={channels.inpuitTxt} ></TextArea>,
      value: ''

    },
    {
      label: '状态',
      name: 'staffstate',
      render: <Radio.Group>
        <Radio.Button style={{background:'#f0f0f0'}} value="a">禁用</Radio.Button>
        <Radio.Button style={{background:'#f0f0f0',color:'#ff7e48'}} value="b">启用</Radio.Button>
      </Radio.Group>,
      value: 'b'
    },

  ]

  const handleSubmit = val => {
    window.console.log('submit data --->', val)
  }
  return <XForm onSubmit={handleSubmit} fields={fields} push={8}></XForm>




}



export default Edit









