 AttackLog = React.createClass
   getInitialState: ->
     typeChoosed: '出击'
-    codeType: '选择文件编码格式'
   # componentWillMount: ->
   #   console.log "test"
   handleSetType: ->
     @setState
       typeChoosed: @refs.type.getValue()
-  handleSetCode: ->
-    @setState
-      codeType: @refs.codeType.getValue()
   showMessage: (message)->
     dialog.showMessageBox
       type: 'info'

        else
          @showMessage '发生错误！请报告开发者'
          return
      if @state.codeType isnt 'utf8' and @state.codeType isnt 'GBK'
        @showMessage '请选择编码格式'
      else
        filename = dialog.showSaveDialog
          title: "保存#{@state.typeChoosed}记录"
          defaultPath: "#{nickNameId}-#{logType}.csv"
        if filename?
          saveData = "#{@props.tableTab[logType].slice(1).join(',')}\n"
          for item in data
            saveData = "#{saveData}#{toDateLabel item[0]},#{item.slice(1).join(',')}\n"
          if @state.codeType is 'GBK'
            saveData = iconv.encode saveData, 'GBK'
          fs.writeFile filename, saveData, (err)->
            if err
              console.log "err! Save data error"
    else
      @showMessage '未找到相应的提督！是不是还没登录？'
  importLogHandle: ->

          </Col>
        </Row>
        <Row>
          <Col xs={4}>
            <Input type="select" ref="type" value={@state.typeChoosed} onChange={@handleSetType}>
                <option key={0} value={'出击'}>出击</option>
                <option key={1} value={'远征'}>远征</option>
