<template>
  <div class="header-top">
    <!-- 顶部按钮 -->
    <div class="header-topleft">
      <div class="header-icon">
        <icon-font
          name="icon-doc-edit"
          size="11"
        />
      </div>
      <div class="header-title">{{ title }}</div>
    </div>
    <div class="header-topright">
      <!-- 快速查询 -->
      <icon-font
        class="search"
        name="icon-batch-search"
        size="12"
        @click="$emit('handleQuickSearch')"
      />
      <!-- 附件管理 -->
      <icon-font
        class="link"
        name="icon-link1"
        size="12"
        @click="$emit('handleattachmentVisible')"
      />
      <div class="devide">1</div>
      <!-- 现金流预览 -->
      <div
        class="handle"
        @click="$emit('handleModal',0)"
      >
        <icon-font
          name="icon-account"
          size="12"
        />
      </div>
      <!-- 操作风险 -->
      <div
        class="handle"
        @click="$emit('handleModal',1)"
      >
        <icon-font
          name="icon-operational-risk"
          size="12"
        />
      </div>
      <!-- 信用风险 -->
      <div
        class="handle"
        @click="$emit('handleModal',2)"
      >
        <icon-font
          name="icon-credit-risk"
          size="12"
        />
      </div>
      <!-- 市场风险 -->
      <div
        class="handle"
        @click="$emit('handleModal',3)"
      >
        <icon-font
          name="icon-market-risk"
          size="12"
        />
      </div>
      <!-- 估值分析 -->
      <icon-font
        class="info"
        name="icon-information-query"
        size="12"
      />
    </div>
  </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: '',
    },
  },
};
</script>

<style lang="scss" scoped>
.header-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 0 12px;
  background-color: var(--desktop-bg-color-1);
  z-index: 999;
  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  height: 37px;
  border-bottom: 1px solid var(--card-border);
  .header-topleft {
    display: flex;
    align-items: center;
    .header-icon {
      width: 20px;
      height: 20px;
      border-radius: 10px;
      background-color: var(--desktop-bg-color-1);
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .header-title {
      margin-left: 8px;
      font-size: 14px;
      font-weight: 800;
    }
  }
  .header-topright {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    .search {
      margin-right: 6px;
    }
    .link {
      margin-right: 17px;
    }
    .devide {
      border-right: 2px solid var(--desktop-bg-color-2);
      margin-right: 15px;
      margin-left: 8px;
      width: 0px;
      height: 12px;
      overflow: hidden;
    }
    .handle {
      margin-right: 4px;
      width: 24px;
      height: 24px;
      background-color: var(--desktop-bg-color-1);
      display: flex;
      justify-content: center;
      align-items: center;
      border-radius: 2px;
    }
    .info {
      margin-right: 10px;
    }
  }
}
</style>
