<template>
  <!-- 全流程管理组件 -->
  <div class="StepsMyBox">
    <div style="padding: 10px">
      <el-button type="primary" icon="el-icon-arrow-left" @click="backEvent()">返回上级</el-button>
    </div>
    <!-- 全流程管理主题 -->
    <div class="StepsMyBox_main">
      <!-- 左侧项目明细 -->
      <div class="StepsMyBox_main_left">
        <div class="StepsMyBox_main_left_main">
          <div class="StepsMyBox_main_left_main_title">2018年张江镇基本农田审计项目</div>
          <div class="StepsMyBox_main_left_main_info">基本信息</div>
          <div class="StepsMyBox_main_left_main_info">
            <div>年份:</div>
            <div>2018-05-12</div>
          </div>
          <div class="StepsMyBox_main_left_main_info">
            <div>项目类型:</div>
            <div>土地资源</div>
          </div>
          <div class="StepsMyBox_main_left_main_info">
            <div>涉及街镇:</div>
            <div>张江镇、川沙镇</div>
          </div>
          <div class="StepsMyBox_main_left_main_info">
            <div>参与人员:</div>
            <div>5个</div>
          </div>
          <div class="StepsMyBox_main_left_main_info">
            <div>追踪问题:</div>
            <div>5个</div>
          </div>
        </div>
      </div>
      <!-- 右侧流程明细 -->
      <div class="StepsMyBox_main_right">
        <div>
          <el-steps :active="stepsIndex" style="margin: 40px 40px 40px 80px">
            <el-step v-for="(item, index) in stepsList" :key="index">
              <template slot="title">
                <div
                  class="stepsTitle"
                  :style="{ background: stepsIndex == index + 1 ? '#00aaff' : '' }"
                  @click="changeStepsIndex(index + 1)"
                >
                  {{ item.title }}
                </div>
              </template>
            </el-step>
          </el-steps>
        </div>
        <div class="stepsInfoBox">
          <div>{{ stepsList[stepsIndex - 1].info.text }}</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
/**
 * 头部菜单（全流程管理）组件
 * @author: LiuMengxiang
 * @Date: 2022年11月21-25日
 */
export default {
  name: "StepsMyBox",
  data() {
    return {
      // 当前或默认选中的步骤条下标加一
      stepsIndex: 1,
      // 步骤条列表
      stepsList: [
        { title: "立项", info: { text: "2018-05-12 2018年张江基本农田审计项目通过立项" } },
        {
          title: "通知",
          info: { text: "2018年张江基本农田审计项目审计通知书.pdf", filePath: "" }
        },
        { title: "实施", info: { infos: [{ title: "用户A 完成张江镇xxx片区的审计", id: "001" }] } },
        {
          title: "报告",
          info: {
            tableData: [
              {
                id: "001",
                desc: "xxxxx问题",
                status: "已完成",
                endTime: "2023-01-12"
              },
              {
                id: "001",
                desc: "xxxxx问题",
                status: "未开始",
                endTime: "2023-01-12"
              },
              {
                id: "001",
                desc: "xxxxx问题",
                status: "已完成",
                endTime: "2023-01-12"
              }
            ]
          }
        },
        { title: "整改", info: { text: "2018-05-12 2018年张江基本农田审计项目通过立项" } }
      ]
    };
  },
  props: {},
  mounted() {},
  watch: {},
  methods: {
    // 返回上级
    backEvent() {
      this.$emit("hideStepsMyBoxState");
    },
    // 切换步骤条
    changeStepsIndex(index) {
      this.stepsIndex = index;
    }
  }
};
</script>
<style lang="less" scoped>
.StepsMyBox {
  padding: 0;
  position: absolute;
  display: flex;
  background: #001220 !important;
  z-index: 999;
  width: 100%;
  height: 100%;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -khtml-user-select: none;
  user-select: none;
  overflow: hidden;
  flex-direction: column;
  &_main {
    padding: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    display: flex;
    justify-content: space-between;
    &_left {
      width: calc(25% - 5px);
      height: 100%;
      background: #00274d !important;
      &_main {
        margin: 20px 30px;
        display: flex;
        flex-direction: column;
        &_title {
          font-size: 20px;
          font-family: pingfangSC;
          font-weight: 400;
          color: #4dc3ff;
          line-height: 58px;
        }
        &_info {
          display: flex;
          padding: 10px 0;
          font-size: 18px;
          font-family: pingfangSC;
          font-weight: bold;
          color: #ffffff;
          line-height: 60px;
          div {
            font-size: 16px;
            font-family: pingfangSC;
            font-weight: 400;
            color: #ffffff;
            line-height: 50px;
            width: 50%;
          }
        }
      }
    }
    &_right {
      width: calc(75% - 5px);
      height: 100%;
      background: #00274d !important;
      .stepsTitle {
        margin-top: 10px;
        transform: translate(-30%, 0%);
        width: 2rem;
        cursor: pointer;
        padding: 0px 20px;
        border: 1px solid #00aaff;
        border-radius: 3px;
        color: #ffffff;
        font-weight: bold;
      }
      .stepsInfoBox {
        width: calc(100% - 80px);
        height: calc(100% - 200px);
        margin: 40px;
        margin-top: 0px;
        font-size: 18px;
        font-weight: bold;
        font-family: pingfangSC;
        line-height: 30px;
        color: #ffffff;
      }
    }
  }
}
</style>
