<template>
  <div v-if="crud.props.searchToggle">
    <el-input
      v-model="query.blurry"
      clearable
      size="mini"
      placeholder="请输入你要搜索的内容"
      style="width: 200px;"
      class="filter-item"
    />
    <el-select
      v-model="query.logType"
      clearable
      filterable
      size="mini"
      placeholder="日志类型"
      class="filter-item"
    >
      <el-option
        v-for="item in logTypeList"
        :label="item"
        :value="item"
      />
    </el-select>
    <date-range-picker v-model="query.createTime" class="date-item" />
    <rrOperation />
  </div>
</template>

<script>
import { header } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import DateRangePicker from '@/components/DateRangePicker'
import { getLogTypeList } from '@/views/monitor/interfaceLog/interfaceLog'
export default {
  components: { rrOperation, DateRangePicker },
  mixins: [header()],
  data() {
    return {
      logTypeList: []
    }
  },
  created() {
    getLogTypeList().then(res => {
      this.logTypeList = res
    })
  }
}
</script>
