<template>
  <div>
    <div class="demo-input-size">
      <el-input :placeholder="placeholder" suffix-icon="el-icon-search" v-model.trim="obj.input_value_one" class="in"
        @change="TheSearchers">
      </el-input>
      <el-input :placeholder="placeholderfn" suffix-icon="el-icon-search" v-model.trim="obj.input_value_two" class="in"
        @change="TheSearchers">
      </el-input>
      <div class="CapitalAccount" v-if="flag === false">
        <span>资金账户 ：</span>
        <el-select v-model="select" placeholder="选择资金账户类型" class="choose">
          <el-option label="餐厅名" value="1"></el-option>
          <el-option label="订单号" value="2"></el-option>
          <el-option label="用户电话" value="3"></el-option>
        </el-select>
      </div>
      <div>
        <el-button class="add" @click="TheJumpPage">+ 新增操作员</el-button>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "ListHead",
    props: {
      operator: {
        type: String
      },
      flag: {
        default: true,
        type: Boolean
      },
      placeholder: {
        default: "姓名",
        type: String
      },
      placeholderfn: {
        default: "角色",
        type: String
      }
    },
    data() {
      return {
        obj: {
          input_value_one: "",
          input_value_two: "",
        },
        select: [],
      };
    },
    methods: {
      TheSearchers() {
        // let data = {}
        fql.getUserInfo().then(res => {
          console.log(res)
          // console.log(123);
          this.$emit('getuser', this.obj)
        })
      },
      TheJumpPage(){
        this.$router.replace("/AddOperator")
      }
    },
  }
</script>

<style scoped>
    /* 图标 */
  .el-input--suffix >>> .el-input__icon {
    line-height: 30px !important;
  }
  .el-button:focus, .el-button:hover {
    background-color: #2e5ded;
  }
  .demo-input-size {
    display: flex;
    position: relative;
  }
  .el-input--suffix >>> .el-input__inner {
    background-color: #394b87;
    border-radius: 2px;
    border: 1px solid rgba(77, 103, 186, 0.75);
    height: 30px;
    padding: 0px 10px;
    color: #FFF;
  }
  .in {
    width: 145px !important;
    height: 30px !important;
    margin: 24px 24px 0 20px;
    float: left;
    font-size: 14px;
    margin-left: 24px;
  }
  /*   资金账户 */
  .CapitalAccount {
    margin-top: 22px;
    margin-left: 10px;
    color: #a1a8cb;
    font-size: 14px;
  }
  .choose {
    width: 155px;
    height: 30px;
    font-size: 12px;
    padding-right: 25px !important;
  }
  .add {
    position: absolute;
    top: 24px;
    right: 26px;
    width: 102px;
    height: 30px;
    line-height: 30px;
    padding: 0 8px;
    font-size: 14px;
    background-color: #2e5ded;
    border-radius: 2px;
    color: #fff;
    font-family: '思源黑体 CN Regular';
    font-weight: 400;
    border: 0px solid #000;
  }
</style>