progress.vue 5.58 KB
<template>
  <div class="progress_container">
    <main class="progress_content">
      <section class="progress_own">
        <h3 class="section_title">{{progressTitle}}</h3>
        <div class="section_content">
          <van-steps direction="vertical" :active="1">
            <van-step v-for="stepItem in stepsInfo" :key="stepItem.id">
              <van-icon slot="active-icon" :name="actIcon" />
              <van-icon slot="inactive-icon" :name="normalIcon" />
              <van-icon slot="finish-icon" :name="normalIcon" />
              <div class="step_content">
                <span class="step_left">
                  <h3 class="step_title">{{stepItem.title}}</h3>
                  <a href="" class="step_link" v-if="stepItem.link">{{stepItem.link}}</a>
                </span>
                <span class="step_right">{{stepItem.time}}</span>
              </div>
            </van-step>
          </van-steps>
        </div>
      </section>
      <section v-if="progressTitle === '变更进度'" class="progress_expand">
        <h3 class="section_title">
          <slot name="title">
          </slot>
        </h3>
        <main class="section_content">
          <slot name="content">
          </slot>
        </main>
      </section>
      <section class="progress_dialogue">
        <h3 class="section_title">
          留言
        </h3>
        <main>
          <h3 class="dialogue_time">
            2021.05.31 14:00:00
          </h3>
          <div class="association">
            <div class="avator">

            </div>
            <div class="left">
              <h4 class="dialogue_name">aaaaaaa</h4>
              <div class="dialogue_content">
                <span class="arrow"></span>
                你打开手机都是宝宝辅食的吧
              </div>
            </div>
          </div>
          <div class="member_org">
            <div class="right">
              <h4 class="dialogue_name">bbbbbb</h4>
              <div class="dialogue_content">
                <span class="arrow"></span>
                城市的见客户反馈技术的开发计划第三空间发挥打开手机话费快结束的
              </div>
            </div>
            <div class="avator">

            </div>
          </div>
        </main>
      </section>

    </main>
  </div>
</template>
<script>
export default {
  name: "ProgressComponent",
  props: {
    stepsInfo: {
      type: Object|Object,
      default: ()=> {
        return {}
      }
    },
    progressTitle: {
      type: String,
      default: ()=> {
        return ''
      }
    }
  },
  data() {
    return {
      actIcon: require('@/assets/icon/progress_act.png'),
      normalIcon: require('@/assets/icon/progress_normal.png')
    }
  },
}
</script>
<style lang="less" scoped>
.progress_container {
  margin: 15px;
  .section_title {
    font-size: 16px;
    line-height: 16px;
    padding-left: 6px;
    color: #222222;
    font-family: PingFangSC-Semibold;
    border-left: 2.5px solid #135faa;
  }
  .section_content {
    margin: 15px 0;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0px 0px 6px 0px rgba(2, 15, 41, 0.06);
  }
}
.van-steps {
  border-radius: 8px;
}
::v-deep .van-step--vertical {
  opacity: 0.3;
  .van-step__circle-container {
    margin-left: 0.9px;
  }
  .van-step__line {
    opacity: 0.3;
  }
}
::v-deep .van-step--finish,
::v-deep .van-step--process {
  opacity: 1;
}
::v-deep .van-step--finish {
  .van-step__line {
    opacity: 1;
  }
}
::v-deep .van-step__line {
  background: linear-gradient(
    to bottom,
    #106abc,
    #106abc 2px,
    transparent 2px,
    transparent
  );
  background-size: 100% 4px;
}
::v-deep .van-hairline::after {
  border: none;
}

.step_content {
  display: flex;
  justify-content: space-between;
  .step_left {
    .step_title {
      font-size: 15px;
      color: #333333;
      line-height: 21px;
    }
    .step_link {
      font-size: 12px;
      line-height: 17px;
      color: #388de2;
      text-decoration: underline;
    }
  }
  .step_right {
    font-size: 12px;
    color: #666666;
    line-height: 17px;
  }
}
.progress_dialogue {
  .dialogue_time {
    font-size: 10px;
    font-family: PingFangSC-Regular;
    color: #999999;
    margin: 15px 0;
    text-align: center;
  }
  .association {
    margin-right: 46px;
  }
  .member_org {
    margin-left: 46px;
  }
  .association,
  .member_org {
    display: flex;
    justify-content: space-between;
    .avator {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: 1px solid red;
    }
    .dialogue_name {
      font-size: 11px;
      font-family: PingFangSC-Regular;
      color: #737373;
    }
    .dialogue_content {
      width: 290px;
      padding: 10px;
      font-size: 14px;
      color: #202020;
      line-height: 20px;
      margin-bottom: 15px;
      position: relative;
      border-radius: 4px;
      box-shadow: 0px 0px 6px 0px rgba(2, 15, 41, 0.06);
      z-index: 5;
      .arrow {
        display: block;
        position: absolute;
        top: 10px;
        width: 10px;
        height: 10px;
        background-color: #ffffff;
      }
    }
    .left {
      .dialogue_name {
        text-align: left;
      }
      .dialogue_content {
        background-color: #ffffff;
        .arrow {
          left: -5px;
          background-color: #ffffff;
          transform: rotate(-45deg);
        }
      }
    }
    .right {
      .dialogue_name {
        text-align: right;
      }
      .dialogue_content {
        background-color: #ecf2ff;
        .arrow {
          right: -5px;
          background-color: #ecf2ff;
          transform: rotate(45deg);
        }
      }
    }
  }
}
</style>