Explorar el Código

eep教材预览

natasha hace 3 semanas
padre
commit
30b8192748

+ 31 - 3
src/views/TextbookDetail.vue

@@ -107,7 +107,15 @@
           </div>
         </div>
         <div class="main" v-loading="loading" v-else>
-          <div class="bookDetail" v-if="detailSHow">
+          <div
+            class="bookDetail"
+            :class="[
+              TextbookData.courseware_category === 'EEP'
+                ? 'bookDetail-eep'
+                : '',
+            ]"
+            v-if="detailSHow"
+          >
             <div class="rightUp">
               <span>HOT</span>
             </div>
@@ -240,7 +248,15 @@
           </div>
         </div>
       </div> -->
-          <div class="cutDownOrimg" v-if="detailSHow">
+          <div
+            class="cutDownOrimg"
+            :class="[
+              TextbookData.courseware_category === 'EEP'
+                ? 'bookDetail-eep'
+                : '',
+            ]"
+            v-if="detailSHow"
+          >
             <div class="sele">
               <div
                 @click="SelectShowEvent('1')"
@@ -264,7 +280,16 @@
               </div>
             </div>
           </div>
-          <div v-if="SelectShow == '1'" class="Catalogue">
+
+          <div
+            v-if="SelectShow == '1'"
+            class="Catalogue"
+            :class="[
+              TextbookData.courseware_category === 'EEP'
+                ? 'bookDetail-eep'
+                : '',
+            ]"
+          >
             <BookView
               :bookId="TextBookId"
               @bookdetailShow="bookdetailShow"
@@ -1455,6 +1480,9 @@ export default {
     }
   }
 }
+.bookDetail-eep {
+  width: 1380px !important;
+}
 </style>
 <style lang="scss">
 .buyWindow {

+ 13 - 1
src/views/bookView.vue

@@ -125,6 +125,15 @@
               :currentTreeID="chapterId"
             />
           </template>
+          <template v-if="category == 'EEP'">
+            <BookEep
+              v-if="view_content && chapterId"
+              :id="chapterId"
+              :content-group-row-list="view_content.content_group_row_list"
+              :component-list="view_content.component_list"
+              :background="view_content.background"
+            ></BookEep>
+          </template>
         </div>
         <a
           v-if="chapterId && treeFlag"
@@ -170,6 +179,7 @@ export default {
       themeColor: "",
       chapterFree: "false", // 课件免费观看
       isAnswerItemShow: false,
+      view_content: null,
     };
   },
   mounted() {
@@ -242,7 +252,6 @@ export default {
         id: _this.chapterId,
       };
       getContent(MethodName, data).then((res) => {
-        console.log(res);
         this.category = res.category;
         this.themeColor = res.book_theme_color;
         if (res.content) {
@@ -263,6 +272,9 @@ export default {
           const _this = this;
           _this.context = null;
         }
+        if (res.category === "EEP") {
+          this.view_content = res;
+        }
       });
     },
     // 显示或隐藏答案

+ 34 - 4
src/views/courseList.vue

@@ -130,7 +130,10 @@
             />
             <el-table-column fixed="right" label="操作" prop width="300">
               <template slot-scope="scope">
-                <el-button type="text" @click="handleClick(scope.row)"
+                <el-button
+                  type="text"
+                  @click="handleClick(scope.row)"
+                  v-if="scope.row.courseware_category !== 'EEP'"
                   >编辑</el-button
                 >
                 <el-button type="text" @click="handleView(scope.row)"
@@ -196,7 +199,12 @@
           label-width="90px"
           prop="name"
         >
-          <el-input v-model="formDialog.name" autocomplete="off" name="name" />
+          <el-input
+            v-model="formDialog.name"
+            autocomplete="off"
+            name="name"
+            :disabled="formDialog.courseware_category === 'EEP'"
+          />
         </el-form-item>
         <el-form-item
           class="label-input"
@@ -208,6 +216,7 @@
             v-model="formDialog.name_english"
             autocomplete="off"
             name="name_english"
+            :disabled="formDialog.courseware_category === 'EEP'"
           />
         </el-form-item>
         <el-form-item label="教材类型" label-width="90px" prop="type_name_list">
@@ -221,6 +230,7 @@
             multiple
             allow-create
             default-first-option
+            :disabled="formDialog.courseware_category === 'EEP'"
           >
             <el-option
               v-for="(item, index) in typeList"
@@ -240,6 +250,7 @@
             v-model="formDialog.author"
             autocomplete="off"
             name="author"
+            :disabled="formDialog.courseware_category === 'EEP'"
           />
         </el-form-item>
         <el-form-item
@@ -252,6 +263,7 @@
             v-model="formDialog.edition"
             autocomplete="off"
             name="edition"
+            :disabled="formDialog.courseware_category === 'EEP'"
           />
         </el-form-item>
         <el-form-item
@@ -264,6 +276,7 @@
             v-model="formDialog.publisher"
             autocomplete="off"
             name="publisher"
+            :disabled="formDialog.courseware_category === 'EEP'"
           />
         </el-form-item>
         <el-form-item
@@ -276,6 +289,7 @@
             v-model="formDialog.publish_number"
             autocomplete="off"
             name="publish_number"
+            :disabled="formDialog.courseware_category === 'EEP'"
           />
         </el-form-item>
         <el-form-item
@@ -288,6 +302,7 @@
             autocomplete="off"
             name="series_code"
             v-model="formDialog.series_code"
+            :disabled="formDialog.courseware_category === 'EEP'"
           ></el-input>
         </el-form-item>
         <el-form-item
@@ -303,6 +318,7 @@
             type="number"
             @blur="blurPrice"
             @input="inputPrice"
+            :disabled="formDialog.courseware_category === 'EEP'"
           />
         </el-form-item>
         <el-form-item label="所属机构" label-width="90px" prop="org_id">
@@ -313,6 +329,7 @@
             name="agency"
             placeholder="请选择机构"
             @change="changeAgency"
+            :disabled="formDialog.courseware_category === 'EEP'"
           >
             <el-option
               v-for="(statusItem, index) in diaMyOrgList"
@@ -323,7 +340,11 @@
           </el-select>
         </el-form-item>
         <el-form-item label="教材描述" label-width="90px" prop="description">
-          <el-input v-model="formDialog.description" type="textarea" />
+          <el-input
+            v-model="formDialog.description"
+            type="textarea"
+            :disabled="formDialog.courseware_category === 'EEP'"
+          />
         </el-form-item>
         <!-- <el-form-item label="发布状态" label-width="90px">
                     <el-radio label="0" v-model="formDialog.publish_status">下架</el-radio>
@@ -347,7 +368,10 @@
             :key="'themeColor' + index"
             v-model="formDialog.courseware_category"
             :label="item.value"
-            :disabled="titleEdit === '编辑教材'"
+            :disabled="
+              titleEdit === '编辑教材' ||
+              formDialog.courseware_category === 'EEP'
+            "
             @change="handleChangeTheme"
           >
             {{ item.name }}
@@ -359,6 +383,7 @@
             :key="'themeColor' + index"
             v-model="formDialog.theme_color"
             :label="item.value"
+            :disabled="formDialog.courseware_category === 'EEP'"
           >
             {{ item.name }}
           </el-radio>
@@ -377,6 +402,7 @@
             list-type="picture"
             multiple
             style="width: 500px"
+            :disabled="formDialog.courseware_category === 'EEP'"
           >
             <el-button size="mini" type="success">点击上传</el-button>
           </el-upload>
@@ -451,6 +477,10 @@ export default {
           value: "RLC",
           name: "轻松学中文",
         },
+        {
+          value: "EEP",
+          name: "新版编辑器教材",
+        },
       ], // 课件类型
       tableData: [], // 数据内容
       currentPage: 1, // 当前页码

+ 13 - 0
src/views/courseView.vue

@@ -177,6 +177,15 @@
             :currentTreeID="chapterId"
           />
         </template>
+        <template v-if="category == 'EEP'">
+          <BookEep
+            v-if="view_content && chapterId"
+            :id="chapterId"
+            :content-group-row-list="view_content.content_group_row_list"
+            :component-list="view_content.component_list"
+            :background="view_content.background"
+          ></BookEep>
+        </template>
       </div>
     </div>
     <!-- <Preview :context="context" :queIndex="queIndex" /> -->
@@ -311,6 +320,7 @@ export default {
       isPad: false, //是否是平板打开
       showMenu: false, //是否展开菜单
       themeColorPhone: "", // 移动端护眼色
+      view_content: null,
     };
   },
   created() {
@@ -542,6 +552,9 @@ export default {
           const _this = this;
           _this.context = null;
         }
+        if (res.category === "EEP") {
+          this.view_content = res;
+        }
         this.loading = false;
       });
     },

+ 13 - 1
src/views/courseWare.vue

@@ -33,7 +33,6 @@
             @click="chooseCourseware"
           />
         </div>
-
         <template v-if="category == 'OC' || !category">
           <Preview
             v-if="chapterId && context"
@@ -113,6 +112,15 @@
             :currentTreeID="chapterId"
           />
         </template>
+        <template v-if="category == 'EEP'">
+          <BookEep
+            v-if="view_content && chapterId"
+            :id="chapterId"
+            :content-group-row-list="view_content.content_group_row_list"
+            :component-list="view_content.component_list"
+            :background="view_content.background"
+          ></BookEep>
+        </template>
       </div>
     </div>
   </div>
@@ -199,6 +207,7 @@ export default {
       previewGroupId: this.$route.query.CoursewareGroupIDSelectedInfo
         ? this.$route.query.CoursewareGroupIDSelectedInfo
         : "[]",
+      view_content: null,
     };
   },
   watch: {
@@ -321,6 +330,9 @@ export default {
           if (_this.ViewMode !== "Result") {
             this.loading = false;
           }
+          if (res.category === "EEP") {
+            this.view_content = res;
+          }
         });
       } else {
         getContens(MethodName, data, AccessToken, AppID).then((res) => {