zhongshujie
19 小时以前 dbe633cefd288df06fc6d4b49a717800e9dceda7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<template>
  <div class="chapter" num="2">
    <!-- 1页 -->
    <div class="page-box" page="10">
      <div v-if="showPageList.indexOf(10) > -1">
        <div class="UnitCover">
          <h1 class="seriesTitle">第一章&nbsp;</h1>
          <h1 class="seriesTitle mb-20">婴幼儿运动安全与保护概述&nbsp;</h1>
          <p class="rotate-up">^</p>
          <p class="rotate-down">v</p>
          <p class="rotate-down">v</p>
          <p class="rotate-down">v</p>
          <p class="rotate-down">v</p>
          <p class="rotate-down">v</p>
          <p class="rotate-down">v</p>
          <p class="rotate-down mb-20">v</p>
          <p class="content">
            <img class="g-pic" src="../../assets/images/0013_01.jpg" alt="" />
          </p>
          <p class="quotation">1.理解婴幼儿运动安全与保护的意义。</p>
          <p class="quotation">2.掌握婴幼儿运动安全与保护的目标与内容。</p>
          <p class="quotation">3.理解婴幼儿运动风险的影响因素。</p>
          <p class="content">
            <img class="g-pic" src="../../assets/images/0013_02.jpg" alt="" />
          </p>
          <div class="bodyPic openImgBox">
            <img
              src="../../assets/images/0013-03.jpg"
              style="width: 100%"
              alt=""
              active="true"
            />
          </div>
          <p class="content">
            <img class="g-pic" src="../../assets/images/0013_04.jpg" alt="" />
          </p>
          <p class="quotation">
            每到户外活动时间,某幼儿园教师不愿意组织幼儿进行户外运动,认为幼儿在运动时,判断危险和自我保护能力都较弱,容易发生运动伤害。园长以及家长也非常关注幼儿的安全,担心幼儿在运动中如果出现意外伤害不能及时处理,会造成不必要的麻烦。因此能不出去就不出去,能少活动就少活动,抱着多动多危险、少动少危险、不动不危险的心态。
          </p>
          <p class="content">
            这种现象存在于不少幼教机构。教师不能正确理解婴幼儿运动与婴幼儿成长的关系,不能正确理解婴幼儿运动安全与保护的意义以及影响因素,本章将重点讨论这些内容。
          </p>
        </div>
      </div>
    </div>
    <!-- 2页 -->
    <div class="page-box" page="11">
      <div v-if="showPageList.indexOf(11) > -1">
        <div class="page-father">
          <ul class="header-left">
            <li class="headerText">
              婴<br />幼<br />儿<br />运<br />动<br />安<br />全<br />与<br />保<br />护
            </li>
            <li class="headerNumber">2</li>
            <img src="../../assets/images/a1.jpg" alt="" />
          </ul>
          <div class="bodystyle">
            
          </div>
        </div>
      </div>
    </div>
    <!-- 3页 -->
    <div class="page-box" page="12">
      <div v-if="showPageList.indexOf(12) > -1">
        <div class="page-father">
          <div class="bodystyle-left">
 
          </div>
          <ul class="header-right">
            <li class="header-right-img">
              <img src="../../assets/images/a2.jpg" alt="" />
            </li>
            <img class="header-right-imgTop" src="../../assets/images/a3.jpg" alt="" />
            <li class="header-right-Number">3</li>
            <li class="header-right-Text">
              第<br />一<br />章
            </li>
            <li class="header-right-Text-bottom">
              婴<br />幼<br />儿<br />运<br />动<br />安<br />全<br />与<br />保<br />护
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</template>
 
<script>
import { getResourcePath } from "@/assets/methods/resources";
import {
  getCollectResource,
  setCollectResource,
} from "@/assets/methods/resources";
import preView from "@/components/pdfview/index.vue";
export default {
  name: "chapterOne",
  props: {
    showPageList: {
      type: Array,
    },
  },
  components: {
    preView,
  },
  data() {
    return {
      dialogVisible: false,
      pdfDialogRef: "",
      somePdfTitleValue: "",
      p_md5: "",
      collectResourceList: [],
      chapter001: {
        pdfMd5: {
          1: {
            md5: "6a7118abdc38a24995f26c164d63648c",
            name: "拓展学习:从罗恩菲尔德的艺术教育思想",
          },
          2: {
            md5: "cfac1cfc4b845032d35937a0f6f201e1",
            name: "拓展学习:快乐童谣,帮助宝宝轻松学说话",
          },
        },
      },
      collectImg: require("../../assets/images/icon/heart.png"),
      collectCheck: require("../../assets/images/icon/heart-check.png"),
      videoPathOne: "",
      audioPathOne: "",
      chapterData: {
        isCollectVideoOne: false,
      },
      videoQuestionData: {
        one: "",
      },
    };
  },
  async mounted() {
    const videoData = localStorage.getItem(
      "artInitiationForAges0to3-book-chapter001-video"
    );
    if (videoData) {
      this.chapterData = JSON.parse(videoData);
    }
 
    const videoQuestionData = localStorage.getItem(
      "artInitiationForAges0to3-book-chapter001-videoQuestionData"
    );
    if (videoQuestionData) {
      this.videoQuestionData = JSON.parse(videoQuestionData);
    }
 
    this.getVidoePath();
    this.collectResourceList = await getCollectResource(
      this.config.activeBook.bookId
    );
  },
 
  methods: {
    async getVidoePath() {
      this.audioPathOne = await getResourcePath(
        "c19b26c585aecc086a286aa0829c9e3b"
      );
      this.videoPathOne = await getResourcePath(
        "afebf048dd2bf2cb09004976ea818dc4"
      );
    },
    toUrl(val) {
      if (val) {
        this.p_md5 = this.chapter001.pdfMd5[val].md5;
        this.somePdfTitleValue = this.chapter001.pdfMd5[val].name;
        this.$refs.pdfDialogRef.openDialog();
      }
    },
 
    handleCollect(e) {
      if (e == "video-01") {
        this.handleCollectResource(
          "afebf048dd2bf2cb09004976ea818dc4",
          "afebf048dd2bf2cb09004976ea818dc4",
          "",
          "视频",
          "bits",
          "活动视频:宝宝发现美"
        );
        this.chapterData.isCollectVideoOne =
          !this.chapterData.isCollectVideoOne;
      }
      this.saveVideoStatus();
    },
 
    saveVideoStatus() {
      localStorage.setItem(
        "artInitiationForAges0to3-book-chapter001-video",
        JSON.stringify(this.chapterData)
      );
    },
 
    saveVideoQuestionData() {
      localStorage.setItem(
        "artInitiationForAges0to3-book-chapter001-videoQuestionData",
        JSON.stringify(this.videoQuestionData)
      );
    },
    //资源收藏事件
    // resourcePath  文件路径,
    // resourceType  文件类型
    // source        文件来源
    handleCollectResource(
      id,
      md5,
      resourcePath,
      resourceType,
      source,
      resourceName
    ) {
      let list = this.collectResourceList;
      if (list.findIndex((item) => item.id == id) > -1) {
        list = list.filter((item) => item.id != id);
      } else {
        list.push({
          id,
          md5,
          resourcePath,
          resourceType,
          source,
          resourceName,
        });
      }
      this.collectResourceList = list;
      setCollectResource(
        this.config.activeBook.bookId,
        this.collectResourceList
      );
    },
  },
};
</script>
<style lang="less" scoped>
hr {
  margin-left: 0;
  margin-bottom: 25px;
  width: 25%;
  border: none;
  height: 1px;
  background-color: #000;
}
</style>