<template>
       <div class="bgk1">
        <div class="d-flex jc-center title_wrap">
            <div class="timers">
            <span>{{props.name }}</span>
            <div class="headertime">
              <p class="datayear">{{  headertime.dateYear }}</p>
              <p class="dateday" >{{  headertime.dateDay }}</p>
            </div>
          </div>
          <div class="titlebtn titleanniu imgtupian" @click="handleSelect('1')">突水推演</div>
            <div class="titlebtn titleanniu imgtupian" style="margin-right: 20px;" @click="handleSelect('2')">火灾推演</div>
          <div class="d-flex jc-center s-content">
            <div class="title tiletimg">
            <div class="ve_logo_img">
              <el-image style="height: 100%" :src="logo" fit="contain"></el-image>
            </div>
          
              <span class="title-text">矿道灾情软件推演</span>
            </div>
          </div>
          
          <div class="titlebtn titleanniu imgtupian2" @click="handleSelect('3')" >瓦斯爆炸推演</div>
            <div class="titlebtn titleanniu imgtupian2" @click="handleSelect('4')"  >模型库</div>
        </div>
      </div>
     </template>
   <script setup>
import { ref, onMounted, reactive, } from "vue";
import {RouterView,RouterLink } from "vue-router"
import { request, uploadFile } from "@/utils/request";
import logo from "@/assets/logo.png";
import { ElMessage, ElButton, ElDialog, ElSelect } from 'element-plus'
import { timestampToTime,formatTime } from "@/js/lindex.js";
let emit = defineEmits(['handleSelect'])
const props = defineProps({
    name:{
        type:String
    },
 

});
 defineExpose({});
 let headerobj = ref({
  time: "",
  name: "",
});
 let headertime=ref({
       timing: null,
      loading: true,
      dateDay: null,
      dateYear: null,
      dateWeek: null,
      weekday: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
})
let headerid=ref();
onMounted(() => {
  timeFn();
});
// 当前时间
const timeFn=()=> {
  headertime.value.timing = setInterval(() => {
    headertime.value.dateDay = formatTime(new Date(), "HH: mm: ss");
    headertime.value.dateYear = formatTime(new Date(), "yyyy-MM-dd");
    headertime.value.dateWeek =  headertime.value.weekday[new Date().getDay()];
      }, 1000);
    }
 const handleSelect = (key) => {
    headerid.value=key;
    emit('handleSelect', key);
    props.name='';
};
   </script>
   <style  lang="scss" scoped>


   </style>
