闫增涛
2024-05-31 75becee461cfdaac7efacee4931ad32b95afedac
Merge branch 'master' of http://182.92.203.7:2001/r/testbookLayout
5个文件已修改
131 ■■■■ 已修改文件
src/App.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/books/lifeCare/css/default.less 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/books/lifeCare/index.vue 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/books/lifeCare/view/chapter003.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/drawflow/index.vue 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/App.vue
@@ -70,7 +70,7 @@
        // embedded
        // english
        // artAndDance
        this.config.resourceCtx + "artAndDance"
        this.config.resourceCtx + "lifeCare"
      );
      // 测试试读30页
      // this.activeBook.tryPageCount = 10;
src/books/lifeCare/css/default.less
@@ -104,7 +104,6 @@
      line-height: 21px;
      background-color: #f49a4c;
      font-size: 20px;
    }
    .drawflow-node {
@@ -150,7 +149,7 @@
      .btn-export {
        float: right;
        position: absolute;
        top: 10px;
        top: 5px;
        right: 10px;
        color: #333;
        font-weight: bold;
@@ -162,12 +161,13 @@
        border-radius: 4px;
        cursor: pointer;
        z-index: 5;
        font-size: 16px;
      }
      .btn-clear {
        float: right;
        position: absolute;
        top: 10px;
        top: 5px;
        right: 85px;
        color: white;
        font-weight: bold;
@@ -179,6 +179,7 @@
        border-radius: 4px;
        cursor: pointer;
        z-index: 5;
        font-size: 16px;
      }
      .btn-export:hover {
@@ -197,9 +198,15 @@
  .drawContent_wall {
    width: 100%;
    height: 765px;
    .drawflow {
      display: flex;
      flex-direction: column;
      .content {
        border-top-width: 1px;
        border-top-style: solid;
      }
    }
  }
src/books/lifeCare/index.vue
@@ -186,7 +186,7 @@
  },
  mounted() {
    // 默认加载章节
    this.showCatalogList = [6];
    this.showCatalogList = [4];
    // 滚动监听节流
    this.throttledScrollHandler = _.throttle(
      this.scrollFun,
@@ -618,7 +618,7 @@
    initSwiper() {
      const doms = (
        this.container ? this.container : document
      ).querySelectorAll(".swiper-container");
      ).querySelectorAll(".swiper-img");
      for (let i = 0; i < doms.length; i++) {
        const dom = doms[i];
        new Swiper(dom, {
@@ -633,19 +633,66 @@
          spaceBetween: 30, // 间隔
          // 如果需要前进后退按钮
          navigation: {
            nextEl: ".swiper-button-next",
            prevEl: ".swiper-button-prev",
            nextEl: (this.container ? this.container : document).querySelector(
              ".swiper-button-next"
            ),
            prevEl: (this.container ? this.container : document).querySelector(
              ".swiper-button-prev"
            ),
          },
          // 窗口变化,重新init,针对F11全屏和放大缩小,必须加
          observer: true,
          observeParents: true,
          // // 如果需要分页器
          // pagination: {
          //   el: ".swiper-pagination",
          //   el: (this.container ? this.container : document).querySelector(
          //     ".swiper-pagination"
          //   ),
          //   clickable: true // 分页器可以点击
          // }
        });
      }
      const pptDoms = (
        this.container ? this.container : document
      ).querySelectorAll(".swiper_ppt");
      for (let i = 0; i < pptDoms.length; i++) {
        const dom = pptDoms[i];
        new Swiper(dom, {
        loop: false, // 无缝
        autoplay: false,
        paginationClickable: true,
        slidesPerView: 1, // 一组三个
        spaceBetween: 30, // 间隔
        // 如果需要前进后退按钮
        navigation: {
          nextEl: (this.container ? this.container : document).querySelector(
            ".swiper-button-next"
          ),
          prevEl: (this.container ? this.container : document).querySelector(
            ".swiper-button-prev"
          ),
        },
        // 窗口变化,重新init,针对F11全屏和放大缩小,必须加
        observer: true,
        observeParents: true,
        on: {
          init:(value) => {
            let currentPage = value.activeIndex + 1; // 获取当前页(从1开始计数)
            let totalPages = value.slides.length; // 获取总页数
            var paginationInfoEl = dom.querySelector('.pageBox');
            if(paginationInfoEl)
              paginationInfoEl.textContent = currentPage + '/' + totalPages;
          },
          slideChange:(value) => {
            let currentPage = value.activeIndex + 1; // 获取当前页(从1开始计数)
            let totalPages = value.slides.length; // 获取总页数
            var paginationInfoEl = dom.querySelector('.pageBox');
            if(paginationInfoEl)
              paginationInfoEl.textContent = currentPage + '/' + totalPages;
          },
        },
      });
      }
    },
    initViewer() {
      const doms = (
src/books/lifeCare/view/chapter003.vue
@@ -187,7 +187,7 @@
          <p>第六步:指尖在另一手的掌心搓擦(见图1-3-6)。</p>
          <p>第七步:旋转揉搓腕部至肘部(见图1-3-7)。</p>
          <div class="imgBox-003 openImgBox">
            <div class="swiper-container">
            <div class="swiper-container swiper-img">
              <div class="swiper-wrapper">
                <div class="swiper-slide">
                  <div class="imgBox" style="width: 100%; height: 100%">
@@ -2047,7 +2047,7 @@
        </div>
        <div class="bodystyle">
          <div class="imgBox-003 openImgBox">
            <div class="swiper-container">
            <div class="swiper-container swiper-img">
              <div class="swiper-wrapper">
                <div class="swiper-slide">
                  <div class="imgBox" style="width: 100%; height: 100%">
src/components/drawflow/index.vue
@@ -17,11 +17,42 @@
          @dragstart="drag"
          data-node="template"
        >
          <div class="draw-con">
            <span>
              <svg
                t="1717139048681"
                class="icon"
                viewBox="0 0 1024 1024"
                version="1.1"
                xmlns="http://www.w3.org/2000/svg"
                p-id="2522"
                xmlns:xlink="http://www.w3.org/1999/xlink"
                width="26"
                height="26"
              >
                <path
                  d="M270.0352 196.608C225.6192 213.12 206.9312 245.12 205.6512 279.04c-0.768 22.272 3.968 43.392 13.824 70.912-1.536-4.352 5.76 17.472 7.232 22.272 3.008 10.112-29.056-3.456-48.64 0.448-21.696 4.288-50.56 22.912-65.664 47.68-17.728 28.992-18.56 62.336-4.928 122.304 7.424 32.704 21.824 60.224 42.432 86.4 9.152 11.584 34.176 38.656 36.032 41.088l50.688 56.192c8.96 8.064 15.36 14.08 34.432 32.128 18.752 17.856 27.712 26.112 36.032 33.216 3.456 2.944 6.4 10.688 7.552 22.272a146.176 146.176 0 0 1-1.536 37.76 22.4 22.4 0 0 0 21.824 26.432c12.928 0.128 23.04 0.256 49.152 0.704l11.328 0.192c69.76 1.216 104.704 0.896 130.112-2.304 27.136-3.392 55.296-36.48 79.232-77.44 20.48 36.544 48.896 72.064 77.632 76.672 9.024 1.408 20.032 1.92 32.768 1.6a451.904 451.904 0 0 0 47.36-3.584 22.4 22.4 0 0 0 18.688-28.16 207.296 207.296 0 0 1-6.272-36.48 91.136 91.136 0 0 1-0.192-11.392 385.92 385.92 0 0 0 0.64-16.832l0.192-4.992a187.52 187.52 0 0 1 4.864-32.576c1.472-7.168 8.768-21.056 20.288-38.208a765.12 765.12 0 0 1 45.888-60.032 366.848 366.848 0 0 0 43.52-91.072c6.72-23.36 12.16-67.2 15.232-108.544 1.792-23.872 2.432-43.2 2.432-73.472v-10.56-12.352c0-9.344-0.256-18.688-1.216-41.536-1.856-48.512-28.48-80-67.712-86.016-33.408-5.12-63.296 4.864-76.352 18.88-4.48 4.8 0.192-16.64-12.928-37.248-9.792-15.36-35.392-35.2-55.04-39.04a187.328 187.328 0 0 0-65.792 0.448c-19.2 3.392-40.96 20.096-52.032 38.592-7.424 12.352 2.304-0.32-5.632-13.952-10.88-18.752-36.288-35.52-60.544-40.512a137.344 137.344 0 0 0-65.664 3.84c-25.92 7.68-60.8 36.672-56.704 68.992C367.7632 189.44 313.5552 180.416 270.0352 196.608z"
                  p-id="2523"
                ></path>
                <path
                  d="M501.5872 192.832c12.352 2.56 26.688 11.968 30.848 19.072 4.992 8.64 9.28 21.76 12.544 38.08 1.792 8.704 7.296 72.384 17.6 79.04 24.64 2.688 24.64 2.688 31.424-7.36 2.112-4.48 2.112-4.48 2.56-6.144 0.832-3.648 1.472-7.616 2.048-12.992l0.512-4.736v-0.448c0.384-3.904 2.688-27.072 3.456-33.728 2.304-18.56 5.248-31.488 8.32-36.672a54.144 54.144 0 0 1 25.792-18.048c16.768-3.008 35.2-3.328 49.344-0.576 6.464 1.28 22.144 13.44 25.856 19.2 7.68 12.032 15.04 50.688 19.2 89.344-0.576 2.816-0.576 2.816 9.856 17.28 34.88-3.904 34.88-3.904 34.048-10.368 0.96-2.304 1.728-4.992 2.752-9.024 2.56-9.6 4.16-15.104 6.656-21.248 1.728-4.352 3.52-8 5.376-10.88 7.232-11.392 25.92-19.136 42.24-16.64 17.6 2.752 28.8 16 29.888 43.52 0.896 22.4 1.152 31.36 1.216 40.064v22.656c0 29.184-0.64 47.424-2.368 70.144-2.88 38.208-8.064 80.128-13.632 99.584-5.632 19.84-22.464 56.768-35.84 76.032a808.96 808.96 0 0 0-47.744 62.4c-14.528 21.76-23.872 39.488-26.88 54.08a228.288 228.288 0 0 0-5.76 39.872l-0.256 5.76a347.648 347.648 0 0 1-0.576 15.232c-0.32 5.44-0.192 11.136 0.256 17.216 0.64 8.768 6.272 20.8 6.272 20.8s-13.824-0.704-22.336-0.576a146.496 146.496 0 0 1-24.704-1.088c-8.64-1.344-31.68-30.208-43.52-52.672-18.048-34.432-61.824-32.768-79.808-2.368-16 27.456-39.36 54.784-46.272 55.68-22.336 2.816-56.512 3.072-123.712 1.92-5.696-0.064-27.52-0.768-38.592-0.896-11.136-0.192 3.008-10.688 1.664-23.872-2.24-22.08-9.024-40.064-23.232-51.968-7.296-6.272-16-14.336-33.728-31.168l-12.672-12.032c-10.624-9.984-15.744-14.72-21.568-19.84l-47.872-53.184c-2.368-3.136-27.392-30.208-35.072-40a168.832 168.832 0 0 1-33.92-68.544C139.8592 483.072 140.4352 460.416 150.6112 443.648c8.256-13.44 26.24-25.088 36.224-27.008 10.24-2.112 32.96-1.024 37.12 1.28l9.792 5.44c2.176 1.28 3.584 2.304 4.928 3.456a53.312 53.312 0 0 1 7.36 8.32l8.512 11.584a61.696 61.696 0 0 0 8 9.472c16.768 15.36 40.832 1.92 38.848-19.456a75.904 75.904 0 0 0-3.2-14.144c-1.792-6.016-1.088-5.376-5.12-13.44l-4.032-7.872-6.4-12.544a140.544 140.544 0 0 1-10.432-24.128 1015.68 1015.68 0 0 0-10.432-29.568l-0.384-0.896 0.256 0.704c-8.064-22.592-11.776-38.912-11.2-54.208 0.64-17.152 9.6-32.576 35.072-42.048 24-8.896 64.384 0.064 72.064 16.64 2.56 5.568 5.312 12.672 8.32 21.12 2.24 6.656 8.64 26.432 10.24 31.488 1.984 6.08 3.2 9.408 4.48 12.16 0.192 3.712 0.192 3.712 21.184 13.824 24.96-17.408 24.96-17.408 22.72-22.4 0.32-5.248 0.448-10.368 0.576-22.336 0.128-13.952 0.256-19.776 0.64-27.456 0.768-17.6 2.56-30.528 5.504-38.144 5.504-14.208 15.104-24.448 26.496-27.84 14.592-4.48 30.72-5.504 43.776-2.816z m72.512 255.424a22.4 22.4 0 0 0-22.336 22.528l0.96 207.488a22.4 22.4 0 1 0 44.8-0.256l-0.96-207.424a22.4 22.4 0 0 0-22.464-22.336z m121.408 0.192a22.4 22.4 0 0 0-22.4 22.4v206.592a22.4 22.4 0 0 0 44.8 0V470.848a22.4 22.4 0 0 0-22.4-22.4z m-239.744 1.728a22.4 22.4 0 0 0-22.272 22.528l1.28 204.672a22.4 22.4 0 0 0 44.8-0.32l-1.28-204.608a22.4 22.4 0 0 0-22.528-22.272z"
                  fill="#FFFFFF"
                  p-id="2524"
                ></path>
              </svg>
            </span>
          <span>拖拽此处创建</span>
        </div>
      </div>
    </div>
    <div class="content" :style="{ borderColor: primaryColor ? primaryColor : '#ccc' }" :id="strId" @drop="drop" @dragover="allowDrop">
    </div>
    <div
      class="content"
      :style="{ borderColor: primaryColor ? primaryColor : '#ccc' }"
      :id="strId"
      @drop="drop"
      @dragover="allowDrop"
    >
      <div class="btn-export" @click="exportData">导出</div>
      <div class="btn-clear" @click="editor.clearModuleSelected()">清空</div>
    </div>
@@ -216,7 +247,7 @@
};
</script>
<style scoped>
<style scoped lang="less">
@import "drawflow/dist/drawflow.min.css";
.drawflow {
  width: 100%;
@@ -226,16 +257,28 @@
  background: #fff;
}
.menu {
  width: 160px;
  width: 150px;
  border-right: 1px solid #ccc;
}
.menuItem {
/* .menuItem {
  border-bottom: 1px solid #ccc;
}
}  */
.drag-drawflow {
  padding: 10px 20px;
  padding: 10px 10px;
  cursor: move;
  user-select: none;
  .draw-con {
    display: flex;
    justify-content: flex-start;
    padding-left: 28px;
    align-items: baseline;
    font-size: 16px;
    svg {
      top: 6px;
      left: 10px;
      fill: #f49a4c;
    }
  }
}
.content {
  flex: 1;