import {
  remote
} from '@/views/EIS/remote/index.js'

const baseUrl = '/api/upcloud-base-wh'
const config = {
  remoteUrl: {
    url: baseUrl + '/directionPlan/queryWhDirectionPlanList',
    headers: {
      'Content-Type': 'application/JSON'
    },
    method: 'post',
  },
 items:[{
   span: 8,
   type: 'input',
   name: 'planName',
   label: '方案名称',
   value: ''
 }, {
   span: 8,
   type: 'input',
   name: 'remark',
   label: '备注',
   value: ''
 }, {
   span: 8,
   type: 'buttonGroup',
   style: {
     textAlign: 'left'
   },
   options: [{
       value: '查询',
       icon: 'search',
       btnType: 'primary',
       style: 'margin-right:10px',
       htmlType: 'submit'
     },
     {
       value: '重置',
       icon: 'redo',
       on: {
         click: (event, form) => {
           console.log(form)
           form.resetFields()
         }
       }
     }
   ]
 }],
 
  Modelitems: [{
    span: 24,
    type: 'input',
    name: 'id',
    required: true,
    disabled:true,
    label: 'id',
    value: '',
  },{
    span: 24,
    type: 'input',
    name: 'planName',
    required: true,
    label: '方案名称',
    value: '',
  }, {
    span: 24,
    type: 'input',
    name: 'remark',
    required: true,
    label: '备注',
    value: '',
  }],

  columns: [{
    title: '方案名称',
    dataIndex: 'planName',
    width: 100,
    align: 'center',
    key: 'planName'
  }, {
    title: '备注',
    dataIndex: 'remark',
    width: 100,
    align: 'center',
    key: 'remark'
  }, {
    title: '状态',
    dataIndex: 'isIssue',
    width: 100,
    align: 'center',
    key: 'isIssue',
    customRender(text) {
      text == 0 && (text = '未下发')
      text == 1 && (text = '下发')
      return text
    }
  }, {
    title: '是否取消',
    dataIndex: 'isCancel',
    width: 100,
    align: 'center',
    key: 'isCancel',
    customRender(text) {
      text == 0 && (text = '未取消')
      text == 1 && (text = '取消')
      return text
    }
  }, {
    title: '操作',
    key: 'operation',
    width: 100,
    scopedSlots: {
      customRender: 'operation'
    },
    //   fixed: 'right',
    align: 'center'
  }]
}
export default config
