<template>
  <div class="view-NewTask">
    <div class="common-box">
      <div class="common-box-button">
        <el-button type="primary" @click="onSubmit">确认</el-button>
      </div>
      <div class="common-box-select">
        <div class="input-with-select">
          <el-select v-model="filesValue" placeholder="请选择">
            <el-option v-for="item in filesList" :key="item.value" :label="item.label" :value="item.value"> </el-option>
          </el-select>
        </div>
        <el-input placeholder="文件名称" v-model="searchValue" class="input-select">
          <el-button slot="append" icon="el-icon-search"></el-button>
        </el-input>
      </div>
    </div>
    <div class="common-box-select">
      <div class="input-box">
        <label>任务名称 : </label>
        <el-input placeholder="新建任务名称" v-model="taskValue" class="input-select"> </el-input>
      </div>
    </div>
    <div class="view-NewTask-FlightMission-table">
      <LTable ref="table" :defaultFetch="false" :columns="columns" :dataSource="tableData" :options="options" :fetch="fetchTableData" :pagination="tableRequset"></LTable>
    </div>
  </div>
</template>

<script>
import { tableData, columns, options, filesList } from '../index'
export default {
  name: 'NewTask',

  data() {
    // 这里存放数据
    return {
      filesList: filesList,
      filesValue: '1',
      searchValue: '',
      taskValue: '',
      columns: columns(this),
      options,
      tableData: tableData,
      tableRequset: {
        total: 0,
        pageIndex: 1,
        pageSize: 10,
        searchValue: ''
      }
    }
  },
  mounted() {},
  methods: {
    fetchTableData() {},
    onSubmit() {
      this.$emit('onSubmit', '知识加工')
    }
  }
}
</script>

<style lang="scss">
@import '../index.scss';
</style>
