Explorar el Código

中文文章编辑

natasha hace 1 año
padre
commit
88f3cf27ef

+ 4 - 2
src/views/cdkey_manage/AddGoods.vue

@@ -437,7 +437,9 @@ export default {
       },
       baozhiForm: {
         yearValue: -1,
-        studyValue: 11,
+        studyValue: window.localStorage.getItem("baozhiFormstudyValue")
+          ? window.localStorage.getItem("baozhiFormstudyValue") * 1
+          : 11,
         typeValue: 0,
       },
       jingduForm: {
@@ -692,7 +694,7 @@ export default {
               ? window.localStorage.getItem("baozhiFormstudyValue") * 1
               : res.study_phase_list[0]
               ? res.study_phase_list[0].study_phase
-              : -1;
+              : 11;
             if (this.itemType === "baozhi") {
               this.titleName = window.localStorage.getItem(
                 "baozhiFormstudyValueName"

+ 9 - 2
src/views/content_manage/album_manage/AddGoods.vue

@@ -435,7 +435,9 @@ export default {
       },
       baozhiForm: {
         yearValue: -1,
-        studyValue: -1,
+        studyValue: window.localStorage.getItem("baozhiFormstudyValue")
+          ? window.localStorage.getItem("baozhiFormstudyValue") * 1
+          : 11,
         typeValue: 0,
       },
       jingduForm: {
@@ -519,6 +521,11 @@ export default {
           this.baozhiForm.typeValue == 1 ? null : this.baozhiForm.typeValue;
         data.album_flag =
           this.baozhiForm.typeValue == 0 ? null : this.baozhiForm.typeValue;
+        data.comb_flag = -1;
+        // this.baozhiForm.typeValue == 1 ? null : this.baozhiForm.typeValue;
+        data.album_flag = this.baozhiForm.typeValue;
+        // this.baozhiForm.typeValue == 0 ? null : this.baozhiForm.typeValue;
+
         getLogin(MethodName, data)
           .then((res) => {
             this.tableLoading = false;
@@ -692,7 +699,7 @@ export default {
               ? window.localStorage.getItem("baozhiFormstudyValue") * 1
               : res.study_phase_list[0]
               ? res.study_phase_list[0].study_phase
-              : -1;
+              : 11;
             if (this.itemType === "baozhi") {
               this.titleName = window.localStorage.getItem(
                 "baozhiFormstudyValueName"

+ 76 - 67
src/views/content_manage/newspaper_manage/CreateArticle.vue

@@ -51,7 +51,7 @@
             </el-input>
           </el-form-item>
         </el-form>
-        <template v-if="en_flag === 1">
+        <template>
           <label class="item-label">课文读音</label>
           <div class="article-mp3-box">
             <ul
@@ -80,12 +80,21 @@
                     <el-button size="small" @click="handleSubtitle" :loading="subtitleLoading" v-else>重新生成</el-button>
                     <p class="error-tips"><svg-icon icon-class="error-warning-line"></svg-icon>生成失败</p> -->
             <el-button
+              v-if="en_flag === 1"
               type="primary"
               size="small"
-              @click="handleChangeCn"
+              @click="handleChangeCn(0)"
               :loading="changeCnLoading"
               >转成中文内容</el-button
             >
+            <el-button
+              v-else
+              type="primary"
+              size="small"
+              @click="handleChangeCn(1)"
+              :loading="changeCnLoading"
+              >转成英文内容</el-button
+            >
           </div>
         </template>
         <Editor
@@ -94,8 +103,8 @@
           :init="init"
         />
         <template v-if="en_flag === 0"> </template>
-        <template v-else>
-          <!-- <el-input
+        <!-- <template v-else> -->
+        <!-- <el-input
                     style="width: 100%"
                     type="textarea"
                     :autosize="{ minRows: 20 }"
@@ -103,64 +112,64 @@
                     v-model="articleForm.articleEn"
                     @blur="handleTrim('articleForm', 'articleEn')"
                 ></el-input> -->
-          <el-form
-            :model="articleRecourseForm"
-            ref="articleResourceForm"
-            label-width="40px"
-            class="registerForm"
-            style="margin-top: 16px"
-          >
-            <el-form-item label="生词" prop="newWordList">
-              <el-button
-                type="primary"
-                size="small"
-                plain
-                class="add-btn"
-                @click="handleAddWords()"
-                ><i class="el-icon-plus"></i> 添加生词</el-button
-              >
-            </el-form-item>
-            <new-word-list
-              :list="wordLit"
-              :colorObj="colorObj"
-              @handleAddWords="handleAddWords"
-              v-if="wordLit.length > 0"
-            ></new-word-list>
-            <el-form-item label="短语" prop="newWordList">
-              <el-button
-                type="primary"
-                size="small"
-                plain
-                class="add-btn"
-                @click="handleAddPhrase()"
-                ><i class="el-icon-plus"></i> 添加短语</el-button
-              >
-            </el-form-item>
-            <phrase-list
-              class="newWord-list"
-              :list="phraseList"
-              :colorObj="colorObj"
-              @handleAddPhrase="handleAddPhrase"
-              v-if="phraseList.length > 0"
-            ></phrase-list>
-            <el-form-item label="注释" prop="newWordList">
-              <el-button
-                type="primary"
-                size="small"
-                plain
-                class="add-btn"
-                @click="handleAddExplain()"
-                ><i class="el-icon-plus"></i> 添加注释</el-button
-              >
-            </el-form-item>
-            <annotation-list
-              class="newWord-list"
-              :list="annotationList"
-              :colorObj="colorObj"
-              @handleAddExplain="handleAddExplain"
-              v-if="annotationList.length > 0"
-            ></annotation-list>
-            <!-- <el-form-item label="图片" prop="pictureList">
+        <el-form
+          :model="articleRecourseForm"
+          ref="articleResourceForm"
+          label-width="40px"
+          class="registerForm"
+          style="margin-top: 16px"
+        >
+          <el-form-item label="生词" prop="newWordList">
+            <el-button
+              type="primary"
+              size="small"
+              plain
+              class="add-btn"
+              @click="handleAddWords()"
+              ><i class="el-icon-plus"></i> 添加生词</el-button
+            >
+          </el-form-item>
+          <new-word-list
+            :list="wordLit"
+            :colorObj="colorObj"
+            @handleAddWords="handleAddWords"
+            v-if="wordLit.length > 0"
+          ></new-word-list>
+          <el-form-item label="短语" prop="newWordList">
+            <el-button
+              type="primary"
+              size="small"
+              plain
+              class="add-btn"
+              @click="handleAddPhrase()"
+              ><i class="el-icon-plus"></i> 添加短语</el-button
+            >
+          </el-form-item>
+          <phrase-list
+            class="newWord-list"
+            :list="phraseList"
+            :colorObj="colorObj"
+            @handleAddPhrase="handleAddPhrase"
+            v-if="phraseList.length > 0"
+          ></phrase-list>
+          <el-form-item label="注释" prop="newWordList">
+            <el-button
+              type="primary"
+              size="small"
+              plain
+              class="add-btn"
+              @click="handleAddExplain()"
+              ><i class="el-icon-plus"></i> 添加注释</el-button
+            >
+          </el-form-item>
+          <annotation-list
+            class="newWord-list"
+            :list="annotationList"
+            :colorObj="colorObj"
+            @handleAddExplain="handleAddExplain"
+            v-if="annotationList.length > 0"
+          ></annotation-list>
+          <!-- <el-form-item label="图片" prop="pictureList">
                             <upload :datafileList="articleRecourseForm.pictureList" :changeFillId="handleAvatarSuccess" :uploadType="'image'" :fileName="'pictureList'" :filleNumber="99" tips="支持上传jpg、png格式图片,单张大小不超过2mb" :showList="true" />
                             <ul v-if="articleRecourseForm.pictureList.length>0" class="resource-list">
                                 <li v-for="(itemR,indexR) in articleRecourseForm.pictureList" :key="indexR">
@@ -177,7 +186,7 @@
                                 </li>
                             </ul>   
                         </el-form-item> -->
-            <!-- <el-divider></el-divider>
+          <!-- <el-divider></el-divider>
                         <el-form-item label="讲解教师" prop="teacher">
                             <el-input v-model="articleRecourseForm.teacher" autocomplete="off" placeholder="请输入" @blur="handleTrim('articleRecourseForm','teacher')" >
                             </el-input>
@@ -191,8 +200,8 @@
                                 </li>
                             </ul>   
                         </el-form-item> -->
-          </el-form>
-        </template>
+        </el-form>
+        <!-- </template> -->
       </div>
       <div class="save-btn">
         <el-button
@@ -889,13 +898,13 @@ export default {
       }
     },
     // 转成中文文章
-    handleChangeCn() {
+    handleChangeCn(flag) {
       this.changeCnLoading = true;
       let MethodName =
         "/PaperServer/Manager/ArticleManager/ChangeArticleEnCnFlag";
       let data = {
         id: this.id,
-        en_flag: 0,
+        en_flag: flag,
       };
       getLogin(MethodName, data)
         .then((res) => {