<template>
  <div>
    <el-form ref="form" :inline="true" :model="form" label-width="80px">
      <el-form-item>
        <Timeinterval ref="Timeinterval" :interval="3" />
      </el-form-item>
      <el-form-item
        ><el-button type="primary" icon="el-icon-search" @click="query"
          >查询</el-button
        >
      </el-form-item>
    </el-form>
    <el-row>
      <eventChance2 ref="eventChance2" :item="item" />
    </el-row>
  </div>
</template>
<script>
import eventChance2 from "@/views/Event-boot/components/echarts/eventChance2";
import Timeinterval from "@/views/components/TimePicker/index4";
export default {
  components: { eventChance2, Timeinterval },
  props: {},
  data() {
    return { item: ["", ""], form: {}, loading: false };
  },
  created() {},
  mounted() {
    this.item = this.$refs.Timeinterval.timeValue;
    this.$emit("Loading", true);
    setTimeout(() => {
      this.$emit("Loading", false);
    }, 1500);
  },
  methods: {
    // 查询
    query() {
      this.item = this.$refs.Timeinterval.timeValue;

      setTimeout(() => {
        this.$emit("Loading", true);
        this.$refs.eventChance2.query();
      }, 0);
      setTimeout(() => {
        this.$emit("Loading", false);
      }, 1500);
    },
  },

  computed: {},

  watch: {},
};
</script>
<style lang="scss" scoped></style>
