<template>
  <div class="head-input flex-center">
    <div class=" content flex-between">
       <div class=" images">
         <img src="~/assets/css/logo.jpg" >
      </div>
         <div class="head-input-title">捷安采</div>
      
       <div class="search flex-item">
         <div class="flex">
           <el-input
            placeholder="请输入您要搜索的公告"
            v-model="input"
            clearable>
          </el-input>
          <el-button type="primary" @click="toSearch">搜索</el-button>
         </div>
       </div>
    </div>
  </div>

</template>

<script>
import Cookies from "js-cookie"
  export default {
    methods:{
        /* toSearch(){
         Cookies.set("inputContent",this.input)
         Cookies.set("contentStatus",1)
         if(window.location.pathname !=="/notice/all"){
            this.$router.push('/notice/all')
            this.input = null
         }else{
           this.$message.error("请在下面查询!")
           this.input = null
         }
      } */
      toSearch(){
         sessionStorage.setItem("inputContent",this.input)
         sessionStorage.setItem("contentStatus",1)
         if(window.location.pathname !=="/notice/all"){
            this.$router.push('/notice/all')
            this.input = null
         }else{
           this.$message.error("请在下面查询!")
           this.input = null
         }
      }
    },
    data() {
      return {
        showdefault:false,
        input:"",
      }
    },
  }
</script>

<style>
.images{
  width:100px;
  height:20px;
  margin-left:0px;
  margin-top:-20px
}
.images>img{
    width:50%;
}
  .head-input{
     height: 100px;
   }
  .search>.search-title{
     width:.74rem;
     height:.42rem;
     background:rgba(4,134,254,1);
     border-radius:0px 4px 4px 0px;
     color:rgba(255,255,255,1);
   }
   .search>.el-input{
     width: 2.62rem;
   }
   .head-input-title{
     margin-top: 0px;
     margin-left: -610px;
     font-size:.28rem;
     color:rgba(0,0,0,1);
     font-weight: bold;
   }
   .t11{
     cursor: pointer;
   }
</style>
