<template>
  <el-dialog :visible.sync="crud.props.searchToggle" title="查询条件">
    <date-range-picker start-placeholder="创建日期" v-model="query.createTime" class="date-item"/>
    <el-input
        v-model="query.jobId"
        clearable
        placeholder="任务编号"
        style="width: 140px;"
        class="filter-item"
        @keyup.enter.native="crud.toQuery"/>
    <el-input
v-model="query.startSlotCode"
clearable
placeholder="起点位置"
style="width: 120px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"/>
    <el-input
v-model="query.endSlotCode"
clearable
placeholder="终点位置"
style="width: 120px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"/>
    <el-input
v-model="query.stockTypeCode"
clearable
placeholder="容器类型"
style="width: 220px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"/>
    <el-select
v-model="query.status"
clearable
multiple
placeholder="任务状态"
style="width: 180px;"
class="filter-item">
      <el-option
          v-for="taskStatus in taskStatus"
          :key="taskStatus.id"
          :label="taskStatus.label"
          :value="taskStatus.value"
      />
    </el-select>
    <el-select v-model="query.jobType" @change="crud.toQuery" clearable placeholder="工作类型" style="width: 120px;" class="filter-item">
      <el-option
          v-for="taskType in taskTypes"
          :key="taskType.id"
          :label="taskType.label"
          :value="taskType.value"
      />
    </el-select>
    <el-input
v-model="query.jobPriorityType"
clearable
placeholder="执行时长/分钟"
style="width: 140px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"/>
    <rrOperation :crud="crud"/>
  </el-dialog>
</template>

<script>
import {header} from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import DateRangePicker from '@/components/DateRangePicker/index.vue'

// eslint-disable-next-line no-unused-vars
const defaultForm = {}
export default {
  name: 'QueryAgvTask',
  components: { DateRangePicker, rrOperation },
  mixins: [header()],
  computed: {
    taskStatus() {
      return this.$parent.dict.task_status
    },
    taskTypes() {
      return this.$parent.dict.task_type
    }
  }
}
</script>

<style scoped>

</style>
