<style>
  .empInfo_Dialog .drawerTop {
    width: 100%;
    height: 50px;
    display: flex;
    justify-content: space-between;
    background-color: #F0F5FB;
    padding: 5px 10px;
    align-items: center;
  }

  .empInfo_Dialog .classFirst {
    color: #000000;
    font-weight: bold;
  }

  .empInfo_Dialog .className {
    margin-left: 10px;
  }

  .empInfo_Dialog .classStatus {
    padding: 3px 8px;
    background-color: #c8d7fc;
    color: #2961FE;
    font-size: 12px;
    border-radius: 2px;
    margin-left: 20px;
  }

  .empInfo_Dialog .normalName {
    color: #999999;
  }

  .empInfo_Dialog .normalInner {
    color: #111111;
  }

</style>
<template>
  <q-dialog v-model="persistent" maximized full-height seamless position="right" @hide="closeShenheForm">
    <q-card style="margin-top:61px;width:800px" class="no-border-radius empInfo_Dialog">
      <div class="drawerTop">
        <div style="display:flex;align-items:center;">
          <q-avatar size="md" v-if="saveObj.UserIcon">
            <img :src="saveObj.UserIcon" />
          </q-avatar>
          <q-avatar size="md" color="teal-10" text-color="white"
            style="background:#d4dfff;color:#2961FE;font-weight:bold;" v-if="!saveObj.UserIcon">
            {{saveObj.EmployeeName.substring(0,1)}}</q-avatar>
          <div class="className">
            <div class="classFirst">{{saveObj.EmployeeName}}</div>
          </div>
        </div>
      </div>
      <div style="margin:20px;font-size:12px;">
        <div class="row wrap ">
          <div class="col-6">
            <span class="normalName">公司</span>
            <span class="normalInner">{{saveObj.SchoolName}}</span>
          </div>
          <div class="col-6">
            <span class="normalName">部门</span>
            <span class="normalInner"> {{saveObj.DeptName}}</span>
          </div>
          <div class="col-6">
            <span class="normalName">岗位</span>
            <span class="normalInner">{{saveObj.PostName}}</span>
          </div>
          <div class="col-6">
            <span class="normalName">电话</span>
            <span class="normalInner">{{saveObj.EmployeeTel}}</span>
          </div>
        </div>
      </div>
      <q-tabs style="margin-bottom:20px;" v-model="tabCheck" narrow-indicator dense align="left" class="text-primary">
        <q-tab :ripple="false" name="first" label="行政备注" />
        <q-tab :ripple="false" name="second" label="详细资料" />
        <q-tab :ripple="false" name="third" label="日志记录" />
        <q-tab :ripple="false" name="fourth" label="附件" />
        <q-tab :ripple="false" name="fifth" label="财务单据" />
      </q-tabs>
      <div v-if="tabCheck=='first'" style="margin:0 15px;">
        <employeeRemark :saveObj="saveObj"></employeeRemark>
      </div>
      <div v-if="tabCheck=='second'">
        <employeeDetails :saveObj="saveObj"></employeeDetails>
      </div>
      <div v-if="tabCheck=='third'">
        <employeeLog :saveObj="saveObj"></employeeLog>
      </div>
      <div v-if="tabCheck=='fourth'">
        <employeeFile :saveObj="saveObj"></employeeFile>
      </div>
      <div v-if="tabCheck=='fifth'">
        <employeeFinace :saveObj="saveObj"></employeeFinace>
      </div>
    </q-card>
  </q-dialog>
</template>

<script>
  import employeeDetails from '../manager/employee_details';
  import employeeRemark from '../manager/employee-remark';
  import employeeLog from '../manager/employee_log';
  import employeeFile from '../manager/employee_file';
  import employeeFinace from '../manager/employee_finace';
  export default {
    props: {
      saveObj: {
        type: Object,
        default: null
      }
    },
    components: {
      employeeDetails,
      employeeRemark,
      employeeLog,
      employeeFile,
      employeeFinace
    },
    data() {
      return {
        persistent: true,
        tabCheck: 'first', //默认选第一个
        loading: false,
      }
    },
    created() {},
    mounted() {
      console.log("aaa", this.saveObj);
    },
    methods: {
      closeShenheForm() {
        this.persistent = false;
        this.$emit('close');
      }
    },
  }

</script>
