shilipojs 2 anni fa
parent
commit
4cff9730f8

+ 2 - 2
src/components/MxCondition/condition-object/condition-video-grade.js

@@ -13,10 +13,10 @@ export default {
   title: '年级',
   getList: function(param,$ref) {
     return new Promise((resolve, reject) => {
-      videoGrades({ course:param.videoCourse.split(',')[0],subject:$ref.model.videoType }).then(res => resolve(
+      videoGrades({ course:param.videoCourse,subject:$ref.model.videoType }).then(res => resolve(
         res.rows.map(item => {
           return {
-            code:item.code + ',subject' +  param.videoCourse,
+            code:item.code,
             label:item.label
           }
         })

+ 5 - 5
src/components/MxCondition/condition-object/condition-video-pack.js

@@ -6,20 +6,20 @@ import {
 export default {
   ...conditionObjectBase,
   key: 'videoPack',
-  dependentKeys: ['videoVersion'],
+  dependentKeys: ['videoGrade'],
   isDependencyReady(params) {
-    return params.videoVersion
+    return  params.videoGrade
   },
   title: '学册',
   getList: function(param,$ref) {
     return new Promise((resolve, reject) => {
       packList({
-        course:$ref.model.videoCourse.split(',')[0],
+        course:$ref.model.videoCourse,
         subject:$ref.model.videoType,
-        grade:$ref.model.videoGrade.split(',')[0],
+        grade:param.videoGrade,
         pageNum:1,
         pageSize:20,
-        version:param.videoVersion.split(',')[0],
+        version:$ref.model.videoVersion
       }).then(res => resolve(res.rows))
         .catch(e => reject(e))
     })

+ 1 - 1
src/components/MxCondition/condition-object/condition-video-subject.js

@@ -16,7 +16,7 @@ export default {
       videoSubjects({ subject:param.videoType }).then(res => resolve(
         res.rows.map(item => {
           return {
-            code: item.code + ',type' + param.videoType,
+            code: item.code,
             label:item.label
           }
         })

+ 5 - 5
src/components/MxCondition/condition-object/condition-video-version.js

@@ -6,20 +6,20 @@ import {
 export default {
   ...conditionObjectBase,
   key: 'videoVersion',
-  dependentKeys: ['videoGrade'],
+  dependentKeys: ['videoCourse'],
   isDependencyReady(params) {
-    return params.videoGrade
+    return params.videoCourse
   },
   title: '版本',
   getList: function(param,$ref) {
     return new Promise((resolve, reject) => {
       videoVersions({
-        course:$ref.model.videoCourse.split(',')[0],
+        course:param.videoCourse,
         subject:$ref.model.videoType,
-        grade:param.videoGrade.split(',')[0] }).then(res => resolve(
+        grade:$ref.model.videoGrade }).then(res => resolve(
           res.rows.map(item => {
             return {
-              code: item.code + ',version' + $ref.model.videoCourse.split(',')[0],
+              code: item.code,
               label:item.label
             }
           })

+ 2 - 3
src/views/index/components/index-card-gktf.vue

@@ -18,11 +18,11 @@ import loginCheckMixin from '@/views/components/blocks/index-login-interceptor-m
 
 export default {
   mixins: [transferMixin, loginCheckMixin],
-  name: 'index-card-gksp',
+  name: 'index-card-gktf',
   components: { IndexImageItem, IndexCardContent, IndexCard },
   data() {
     return {
-      morePath: '/fuzhu/index_gksp',
+      morePath: '/fuzhu/index_gktf',
       list: [],
       lineSize: 4,
       queryParams: {
@@ -62,7 +62,6 @@ export default {
     },
     async handleMore() {
       await this.loginCheck()
-      if (!this.path) return
       this.transferTo(this.morePath)
     }
   }

+ 4 - 6
src/views/questioncenter/components/famous-paper.vue

@@ -26,11 +26,11 @@
               </div>
               <div class="shoucan">
                 <div @click="collect(item)" v-if="!item.collect">
-                  <img src="@/assets/images/icon_shoucang_n.png" alt=""/>
+                  <img class="mr10" src="@/assets/images/icon_shoucang_n.png" alt=""/>
                   <span>收藏</span>
                 </div>
                 <div @click="cancelCollect(item)" v-else>
-                  <img src="@/assets/images/icon_shoucang_s.png" alt=""/>
+                  <img class="mr10" src="@/assets/images/icon_shoucang_s.png" alt=""/>
                   <span>已收藏</span>
                 </div>
               </div>
@@ -205,13 +205,11 @@ export default {
   padding: 6px 0;
   display: flex;
   align-items: center;
-}
-
-.center_opera .shoucan img {
-  margin-right: 10px;
   cursor: pointer;
 }
 
+
+
 .center_opera .shoucan span {
   font-size: 14px;
   font-family: PingFangSC-Regular, PingFang SC;

+ 13 - 12
src/views/questioncenter/generating.vue

@@ -129,7 +129,7 @@
                   </div>
                 </div>
               </div>
-              <div class="que_footer">
+              <div class="que_footer pd20 fx-row ai-center jc-between">
                 <div class="spans">
                   <span class="id">ID: {{ item.id }}</span>
                   <span>题型: {{ item.qtpye }}</span>
@@ -150,7 +150,7 @@
                     <img src="@/assets/images/icon_jiucuo.png" alt="" />
                     <span>纠错</span>
                   </div>
-                  <div class="detail" @click="viewDetail(index)">
+                  <div class="detail" @click="viewDetail(item)">
                     <img src="@/assets/images/icon_chakan.png" alt="" />
                     <span>查看详情>></span>
                   </div>
@@ -161,7 +161,7 @@
                   </div>
                 </div>
               </div>
-              <div class="pd20" v-show="item.createTime" v-html="item.answer2"></div>
+              <div class="pd20" v-show="item.expand" v-html="item.answer2"></div>
             </div>
             <div v-if="queList.length == 0" class="empty-text">
               暂时没有内容
@@ -632,7 +632,6 @@ export default {
             questionId: item.id,
           }).then((res) => {
             this.queCardForm.queList.push(item);
-            console.log(res);
             console.log("this.queCardForm.queList", this.queCardForm.queList);
           });
         } else {
@@ -753,7 +752,10 @@ export default {
       }).then((res) => {
         console.log(res);
         this.total = res.total;
-        this.queList = res.rows;
+        this.queList = res.rows.map(item => {
+          item.expand  = false
+          return item
+        });
         this.$nextTick((_) => this.mxGlobal.MathQueue("question_list"));
       });
     },
@@ -774,7 +776,10 @@ export default {
       }).then((res) => {
         console.log(res);
         this.total = res.total;
-        this.queList = res.rows;
+        this.queList = res.rows.map(item => {
+          item.expand  = false
+          return item
+        });
         this.$nextTick((_) => this.mxGlobal.MathQueue("question_list"));
         console.log(this.queList);
       });
@@ -828,12 +833,8 @@ export default {
       this.getTree();
       this.getQueType();
     },
-    viewDetail(index) {
-      if (this.queList[index].createTime) {
-        this.queList[index].createTime = false;
-      } else {
-        this.queList[index].createTime = true;
-      }
+    viewDetail(item) {
+      item.expand = !item.expand
     },
     getKnowledges() {
       knowledgeTree({

+ 63 - 54
src/views/questioncenter/paper.vue

@@ -1,78 +1,83 @@
 <template>
-  <div class="app-container" id="paperContainer">
-    <el-card style="margin-bottom: 10px; text-align: center">
-      <el-input v-model="papername" style="width: 150px" />
-      <el-button style="margin-left: 10px" type="text" @click="savePaper" :loading="isLoading">保存试卷</el-button>
-      <el-button style="margin-left: 10px" type="text" @click="toQuestionList()">继续出题</el-button>
-    </el-card>
-    <el-card style="margin-bottom: 10px" v-for="(questionData, index) in questionList" :key="index">
-      <div :class="'drag_' + index">
-        <div slot="header" class="clearfix" @mouseover="showSorce(questionData, index)" @mouseout="hideSorce(questionData, index)" draggable="true" @dragstart="handleDragStart($event, questionData)" @dragover.prevent="handleDragOver($event, questionData)" @drop="handleDragEnter($event, questionData)" @dragend="handleDragEnd($event, questionData)">
+  <div class="app-container" >
+    <div id="paperContainer">
+      <el-card style="margin-bottom: 10px; text-align: center">
+        <el-input v-model="papername" style="width: 150px" />
+        <el-button style="margin-left: 10px" type="text" @click="savePaper" :loading="isLoading">保存试卷</el-button>
+        <el-button style="margin-left: 10px" type="text" @click="toQuestionList()">继续出题</el-button>
+      </el-card>
+      <el-card style="margin-bottom: 10px" v-for="(questionData, index) in questionList" :key="index">
+        <div :class="'drag_' + index">
+          <div slot="header" class="clearfix" @mouseover="showSorce(questionData, index)" @mouseout="hideSorce(questionData, index)" draggable="true" @dragstart="handleDragStart($event, questionData)" @dragover.prevent="handleDragOver($event, questionData)" @drop="handleDragEnter($event, questionData)" @dragend="handleDragEnd($event, questionData)">
           <span style="color: #000000; font-size: 14px; font-weight: bold">{{ NumberToChinese(index + 1) }}、{{ questionData.title }}(共{{
               questionData.num
             }}题;共{{ questionData.score }}分)</span>
-          <span style="float: right; display: none" :id="'parent_score_' + index">
+            <span style="float: right; display: none" :id="'parent_score_' + index">
             <el-button type="text" @click="
                 openParentScore = true;
                 currentIndex = index;
               ">批量设置得分</el-button>
             <el-button type="text" @click="deleteType(index)">删除分类</el-button>
           </span>
-        </div>
-        <div v-for="(questionInfo, index2) in questionData.list" :key="index2" style="margin-bottom: 10px" @mouseover="showQuestionSorce(index, index2)" @mouseout="hideQuestionSorce(index, index2)" @dragstart="handleQuestionDragStart($event, questionInfo, index2)" @dragover.prevent="handleQuestionDragOver($event, questionInfo)" @drop="handleQuestionDragEnter($event, questionInfo, index, index2)" @dragend="handleQuestionDragEnd($event, questionInfo)" draggable="true">
-          <div style="display: none" :id="'score_' + index + '_' + index2">
-            <el-button type="text" @click="
+          </div>
+          <div v-for="(questionInfo, index2) in questionData.list" :key="index2" style="margin-bottom: 10px" @mouseover="showQuestionSorce(index, index2)" @mouseout="hideQuestionSorce(index, index2)" @dragstart="handleQuestionDragStart($event, questionInfo, index2)" @dragover.prevent="handleQuestionDragOver($event, questionInfo)" @drop="handleQuestionDragEnter($event, questionInfo, index, index2)" @dragend="handleQuestionDragEnd($event, questionInfo)" draggable="true">
+            <div style="display: none" :id="'score_' + index + '_' + index2">
+              <el-button type="text" @click="
                 openScore = true;
                 currentIndex = index;
                 questionIndex = index2;
               ">设置得分</el-button>
-            <el-button type="text" @click="setCurrentVal(index, index2, questionInfo)">解析</el-button>
-            <el-button type="text" @click="deleteQuestion(index, index2)">删除题目</el-button>
+              <el-button type="text" @click="setCurrentVal(index, index2, questionInfo)">解析</el-button>
+              <el-button type="text" @click="deleteQuestion(index, index2)">删除题目</el-button>
+            </div>
+            <div>
+              {{ index2 + 1 }}.
+              <span style="color: #1890ff">题号:{{ questionInfo.id }}({{ questionInfo.score }}分)</span><span v-html="questionInfo.title"></span>
+            </div>
+            <!--<div v-for="child in questionInfo.subquestions" v-html="child.title"></div>-->
           </div>
-          <div>
-            {{ index2 + 1 }}.
-            <span style="color: #1890ff">题号:{{ questionInfo.id }}({{ questionInfo.score }}分)</span><span v-html="questionInfo.title"></span>
-          </div>
-          <!--<div v-for="child in questionInfo.subquestions" v-html="child.title"></div>-->
         </div>
-      </div>
-    </el-card>
+      </el-card>
 
-    <!-- 批量设置分数-->
-    <el-dialog :visible.sync="openParentScore" width="500px" append-to-body>
-      <el-form label-width="80px">
-        <el-form-item label="分数" prop="parentScore">
-          <el-input-number v-model.number="parentScore" :min="1" placeholder="请输入分数" />
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="setParentScore">确 定</el-button>
-        <el-button @click="openParentScore = false">取 消</el-button>
-      </div>
-    </el-dialog>
-    <!-- 设置题目分数 -->
-    <el-dialog :visible.sync="openScore" width="500px" append-to-body>
-      <el-form label-width="80px">
-        <el-form-item label="分数" prop="parentScore">
-          <el-input-number v-model.number="questionScore" :min="1" placeholder="请输入分数" />
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="setScore">确 定</el-button>
-        <el-button @click="openScore = false">取 消</el-button>
-      </div>
-    </el-dialog>
+      <!-- 批量设置分数-->
+      <el-dialog :visible.sync="openParentScore" width="500px" append-to-body>
+        <el-form label-width="80px">
+          <el-form-item label="分数" prop="parentScore">
+            <el-input-number v-model.number="parentScore" :min="1" placeholder="请输入分数" />
+          </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="setParentScore">确 定</el-button>
+          <el-button @click="openParentScore = false">取 消</el-button>
+        </div>
+      </el-dialog>
+      <!-- 设置题目分数 -->
+      <el-dialog :visible.sync="openScore" width="500px" append-to-body>
+        <el-form label-width="80px">
+          <el-form-item label="分数" prop="parentScore">
+            <el-input-number v-model.number="questionScore" :min="1" placeholder="请输入分数" />
+          </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="setScore">确 定</el-button>
+          <el-button @click="openScore = false">取 消</el-button>
+        </div>
+      </el-dialog>
+    </div>
     <!-- 试题篮 -->
-    <el-dialog title="解析" :visible.sync="openQuestionParseDialog" width="500px" append-to-body center>
-      <el-form label-width="80px">
+    <el-dialog v-if="openQuestionParseDialog" title="解析" :visible.sync="openQuestionParseDialog"  width="70%"   append-to-body center>
+      <el-form label-width="80px" id="paperDialog" >
         <el-form-item label="解析">
-          <editor v-model="currentQuestionParse" :min-height="122" />
-        </el-form-item>
-        <el-form-item label="答案1">
-          <editor v-model="currentQuestionAnswer1" :min-height="122" />
+          <div v-html="currentQuestionParse"></div>
+<!--          <editor v-model="currentQuestionParse" :min-height="122" />-->
         </el-form-item>
+<!--        <el-form-item label="答案1">-->
+<!--          <div v-html="currentQuestionAnswer1"></div>-->
+<!--&lt;!&ndash;          <editor v-model="currentQuestionAnswer1" :min-height="122" />&ndash;&gt;-->
+<!--        </el-form-item>-->
         <el-form-item label="答案2">
-          <editor v-model="currentQuestionAnswer2" :min-height="122" />
+          <div v-html="currentQuestionAnswer2"></div>
+<!--          <editor v-model="currentQuestionAnswer2" :min-height="122" />-->
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -86,6 +91,7 @@
 <script>
 import { savePaperInfo, deleteQuestionCard } from "@/api/webApi/webQue.js";
 import Editor from "@/components/Editor";
+
 export default {
   name: "Paper",
   components: {
@@ -134,6 +140,9 @@ export default {
       this.currentQuestionParse = questionInfo.parse;
       this.currentQuestionAnswer1 = questionInfo.answer1;
       this.currentQuestionAnswer2 = questionInfo.answer2;
+      setTimeout(_=>{
+        this.mxGlobal.MathQueue("paperDialog")
+      }, 500)
     },
     getQuestionList() {
       this.questionList = []

+ 3 - 3
src/views/videocourse/video_course.vue

@@ -107,10 +107,10 @@ export default {
     // 获取视频列表
     getVideoList() {
       videoList({
-        course: this.queryParams.videoCourse.split(',')[0], // 科目
+        course: this.queryParams.videoCourse, // 科目
         subject: this.queryParams.videoType, // 大类
-        grade: this.queryParams.videoGrade.split(',')[0], // 年级
-        version: this.queryParams.videoVersion.split(',')[0], // 版本
+        grade: this.queryParams.videoGrade, // 年级
+        version: this.queryParams.videoVersion, // 版本
         pack: this.queryParams.videoPack,
         ...this.pageForm,
         sectionName: this.sectionName