<template>
  <!-- 项目成效与反思 -->
  <div class="pb_content">
    <div class="race_content_body">
      <div class="raceBox">
        <div class="stepBg">
          <div class="steps">
            <div class="stepLeft" :class="steps == 0 ? 'isSteps' : ''">1</div>
            <div class="stepRightNav">
              <div>项目成效</div>
            </div>
            <div class="line" :class="steps == 0 ? 'isLine' : ''"></div>
          </div>
          <div class="steps">
            <div class="stepLeft" :class="steps == 1 ? 'isSteps' : ''">2</div>
            <div class="stepRightNav">
              <div>项目反思</div>
            </div>
            <!-- <div class="line" :class="steps == 1 ? 'isLine' : ''"></div> -->
          </div>
        </div>
        <div class="right">
          <div class="whiteBg">
            <div class="right_title">项目成效</div>
            <div class="basic_box1">
              <div class="editorCss">
                <editor-bar
                  v-model="raceEff.proEffText"
                  @change="upproEff"
                ></editor-bar>
              </div>
            </div>
          </div>
          <div class="whiteBg">
            <div class="right_title">项目反思</div>
            <div class="basic_box1">
              <div class="editorCss">
                <editor-bar
                  v-model="raceEff.proRefText"
                  @change="upproEff"
                ></editor-bar>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import EditorBar from "../../../tools/wangEnduit";
export default {
  components: { EditorBar },
  props: ["raceEffect"],
  data() {
    return {
      steps: 0,
      raceEff: {
        proEffText: "",
        proRefText: "",
      },
    };
  },
  methods: {
    handleClose(done) {
      done();
    },
    change(val) {
      console.log(val);
    },
    addImg(e) {
      var el = e.currentTarget;
      el.getElementsByTagName("input")[0].click();
    },
    getChapterData(e, i, j, ic, type) {
      e.stopPropagation();
      if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
        console.log("还不能下载图片喔");
      }
    },
    upproEff() {
      this.$emit("upproEff", this.raceEff);
    },
  },
  created() {
    this.raceEff.proEffText = this.raceEffect.proEffText;
    this.raceEff.proRefText = this.raceEffect.proRefText;
  },
};
</script>

<style scoped>
.pb_content {
  width: 100%;
  height: 100%;
}
.race_content_body {
  width: 100%;
  position: relative;
  margin: 0;
  height: 100%;
}

.raceBox {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
}

.stepBg {
  margin: 0 25px 0 0;
  width: 20%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: nowrap;
  background: #fff;
  /* min-height: 800px; */
  height: 100%;
  border: 1px solid #c2c2c2;
  border-radius: 15px;
  overflow: auto;
  min-width: 260px;
}

.steps {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  margin: 35px 20px 20px 20px;
  position: relative;
  align-items: center;
}

.stepLeft,
.isSteps {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  text-align: center;
  line-height: 30px;
  border: 2px solid #eee;
  color: #c0c0c0;
}

.isSteps {
  background: #1990ff;
  color: #fff;
  border: none;
}

.stepRightNav {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: flex-start;
  margin-left: 10px;
}

.line,
.isLine {
  position: absolute;
  width: 5px;
  height: 50px;
  border-left: 1px solid #dadada;
  top: 38px;
  left: 15px;
}

.isLine {
  border-left: 1px solid #1d92ff !important;
}

.right {
  width: calc(100% - 20%);
  background: rgb(255, 255, 255);
  border-radius: 10px;
  overflow: auto;
  height: 100%;
  border: 1px solid #c2c2c2;
  border-radius: 15px;
  /* max-height: 800px; */
  min-width: calc(100% - 260px);
}

.allBox {
  padding: 25px;
}

.allBox > div:nth-child(1) {
  color: #0f40f5;
  font-size: 18px;
  font-weight: bold;
}

.raceTop > div:nth-child(2) {
  width: 80%;
  margin-top: 10px;
}

.titleTop {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  width: 100%;
}

.titleTop > div:nth-child(2) {
  width: 82%;
  margin-left: 20px;
}

.editorCss {
  width: 90% !important;
}

.basic_box {
  position: relative;
  margin: 0;
  min-height: 0;
  width: 90%;
}

.add_info_box {
  margin: 20px 0;
}

.add_info_box button {
  margin: 0 10px 10px 0;
}

.add_chapters_box {
  text-align: left;
  background-color: rgb(232 234 237);
  width: 100%;
  padding: 0px 15px;
  border-radius: 15px;
  font-size: 16px;
  box-sizing: border-box;
  position: relative;
  padding: 0 10px 5px 10px;
  height: 185px;
  overflow-y: auto;
  overflow-x: hidden;
}

.chapter_upload {
  height: 50px;
  margin-top: 12px;
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 50px;
}

.chapter_upload_t {
  background-color: #fff;
  position: absolute;
  height: 100%;
  top: 0px;
  left: 0px;
  border-radius: 40px;
  box-sizing: border-box;
  box-shadow: 0 0 3px 3px #dfdfdf;
  width: 100%;
}

.chapter_upload_o {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}

.chapter_upload_ic {
  height: 30px;
  float: right;
  cursor: pointer;
  position: absolute;
  width: 45px;
  right: 0;
  top: 0;
}

.chapter_upload_ic_l {
  width: 50px;
  height: 50px;
  float: left;
}

.chapter_upload_ic_l div {
  width: 30px;
  height: 35px;
  background: url("../../../../assets/icon/icon.png");
}

.chapter_upload_ic_r {
  width: 50px;
  height: 50px;
  float: left;
  margin-left: 0px;
  display: flex;
  align-items: center;
  position: absolute;
}

.chapter_upload_ic_r div {
  width: 25px;
  height: 25px;
  background-image: url("../../../../assets/delete.png");
  background-size: 100% 100%;
}

.chapter_upload_n {
  display: flex;
  text-indent: 10px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  width: 55%;
  margin-left: 10px;
  cursor: pointer;
  margin-top: 2px;
}

.chapter_upload_l_i1 {
  background-image: url("../../../../assets/icon/video.png");
  width: 28px;
  height: 28px;
  background-size: 100% 100%;
}

.chapter_upload_l_i5 {
  background-image: url("../../../../assets/icon/word.png");
  width: 24px;
  height: 24px;
  background-size: 100% 100%;
  margin-left: 1px;
}

.chapter_upload_l_i8 {
  background-image: url("../../../../assets/icon/line.png");
  width: 24px;
  height: 24px;
  background-size: 100% 100%;
  margin-left: 1px;
}

.chapter_upload_ud {
  display: flex;
  flex-direction: column;
  margin-left: 5px;
  justify-content: center;
  z-index: 99;
}

.chapter_upload_up {
  background-image: url("../../../../assets/icon/up.png");
  width: 17px;
  height: 15px;
  background-size: 100% 100%;
  cursor: pointer;
}

.chapter_upload_down {
  background-image: url("../../../../assets/icon/down.png");
  width: 17px;
  height: 15px;
  margin: 2px auto 0 auto;
  background-size: 100% 100%;
  cursor: pointer;
}

.chapter_upload_l {
  padding: 1px 0 0 10px;
}

.first {
  border: none;
  outline: none;
  width: 80%;
  min-width: 215px;
  z-index: 99;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info_btn {
  color: #fff;
  background-color: #0f7eff;
  padding: 8px 24px;
  font-size: 0.9375rem;
  box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
    0px 3px 1px -2px rgb(0 0 0 / 12%);
  min-width: 64px;
  font-weight: 500;
  border-radius: 4px;
  box-sizing: border-box;
  border: none;
  cursor: pointer;
}

.info_btn:hover {
  background-color: #4f7cd5 !important;
}

.right_title {
  height: 30px;
  padding: 15px 0 15px 0;
  border-bottom: 1px solid #f2f2f2;
  font-size: 1.5em;
  font-weight: bold;
  color: #0f7eff;
  margin: 0 auto;
  width: 95%;
}
.whiteBg {
  background: #fff;
  border-radius: 10px;
}
.basic_box1 {
  margin: 10px auto;
  position: relative;
  padding: 0 20px 0 20px;
}
</style>