lsc 8 months ago
parent
commit
3f27247987

+ 25 - 12
src/components/pages/aiAddCourse/addCourse.vue

@@ -1008,7 +1008,7 @@
                       </el-option>
                       </el-option>
                     </el-select>
                     </el-select>
                     <el-select v-model="knowFileType" placeholder="请选择类型" @change="forceUpdate()" style="width: 125px;margin-right: 10px;" clearable>
                     <el-select v-model="knowFileType" placeholder="请选择类型" @change="forceUpdate()" style="width: 125px;margin-right: 10px;" clearable>
-                      <el-option v-for="(e, eIndex) in knowFileTypeArray" :key="eIndex" :label="e" :value="e">
+                      <el-option v-for="(e, eIndex) in getKnowType()" :key="eIndex" :label="e" :value="e">
                       </el-option>
                       </el-option>
                     </el-select>
                     </el-select>
                     <button class="c_pub_button_confirm" style="margin: 0 10px 0 0px;" @click="knowFileType1 = '',knowFileType2 = '',knowFileType = ''">重置</button>
                     <button class="c_pub_button_confirm" style="margin: 0 10px 0 0px;" @click="knowFileType1 = '',knowFileType2 = '',knowFileType = ''">重置</button>
@@ -1105,7 +1105,7 @@
                               </el-tooltip>
                               </el-tooltip>
                             </div>
                             </div>
                             <div class="chapter_upload_type">
                             <div class="chapter_upload_type">
-                              {{ getFileType(item1.name) }}
+                              {{ item1.file_type }}
                             </div>
                             </div>
                             <div class="chapter_upload_ic" style="width:80px;min-width: 80px;justify-content: center;margin:0 10px 0px auto;">
                             <div class="chapter_upload_ic" style="width:80px;min-width: 80px;justify-content: center;margin:0 10px 0px auto;">
                               <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
                               <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
@@ -1230,7 +1230,7 @@
                               </el-tooltip>
                               </el-tooltip>
                             </div>
                             </div>
                             <div class="chapter_upload_type">
                             <div class="chapter_upload_type">
-                              {{ getFileType(item1.name) }}
+                              {{ item1.file_type ? item1.file_type : '无'}}
                             </div>
                             </div>
                             <div class="chapter_upload_ic" style="width:80px;min-width: 80px;justify-content: center;margin:0 10px 0px auto;">
                             <div class="chapter_upload_ic" style="width:80px;min-width: 80px;justify-content: center;margin:0 10px 0px auto;">
                               <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
                               <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
@@ -8477,7 +8477,7 @@ export default {
     },
     },
     getFileType(){
     getFileType(){
       return function (name) {
       return function (name) {
-        let fileType = this.knowFileTypeArray;
+        let fileType = this.getKnowType();
         
         
         for (let type of fileType) {
         for (let type of fileType) {
           if (converter(name).includes(type)) {
           if (converter(name).includes(type)) {
@@ -8492,14 +8492,14 @@ export default {
       return function () {
       return function () {
         let knowInfoData = this.knowInfoData3;
         let knowInfoData = this.knowInfoData3;
         if(this.knowFileType){
         if(this.knowFileType){
-          if(converter(this.knowFileType) == '其他'){
-            let fileType = this.knowFileTypeArray.filter(item => item != '其他');
-            knowInfoData = knowInfoData.filter(item => {
-              return !fileType.some(type => converter(item.name).includes(type));
-            });
-          }else{
-            knowInfoData = knowInfoData.filter(item => converter(item.name).includes(this.knowFileType))
-          }
+          // if(converter(this.knowFileType) == '其他'){
+          //   let fileType = this.getKnowType().filter(item => item != '其他');
+          //   knowInfoData = knowInfoData.filter(item => {
+          //     return !fileType.some(type => converter(item.name).includes(type));
+          //   });
+          // }else{
+            knowInfoData = knowInfoData.filter(item => converter(item.file_type).includes(this.knowFileType))
+          // }
         }
         }
         if(this.knowFileType1){
         if(this.knowFileType1){
           knowInfoData = knowInfoData.filter(item => converter(item.name).includes(this.knowFileType1))
           knowInfoData = knowInfoData.filter(item => converter(item.name).includes(this.knowFileType1))
@@ -8510,6 +8510,18 @@ export default {
         return knowInfoData;
         return knowInfoData;
       };
       };
     },
     },
+    getKnowType(){
+      return function () {
+        let knowInfoData = this.knowInfoData3;
+        let array = []
+        for(var i = 0; i < knowInfoData.length; i++){
+          if(array.indexOf(knowInfoData[i].file_type) == -1){
+            array.push(knowInfoData[i].file_type)
+          }
+        }
+        return array;
+      };
+    },
     panknowInfoData3CheckAll(){
     panknowInfoData3CheckAll(){
       return function(){
       return function(){
         let files = this.allknowInfoData3();
         let files = this.allknowInfoData3();
@@ -25847,6 +25859,7 @@ ${msg}
                 uid: '',
                 uid: '',
                 type: _type,
                 type: _type,
                 fileid: '',
                 fileid: '',
+                file_type: el.file_type
                 // fileid == 1 ? '' : fileid
                 // fileid == 1 ? '' : fileid
               });
               });
               // if(fileid != 1){
               // if(fileid != 1){

+ 1 - 0
src/components/pages/aiEasy/addCourse.vue

@@ -8683,6 +8683,7 @@ export default {
             setTimeout(() => {
             setTimeout(() => {
               this.loading = false
               this.loading = false
               this.steps = 3;
               this.steps = 3;
+              this.openAiDialog(2, 'aiTask3','all', '');
             }, 0)
             }, 0)
             this.isClickColor = 1;
             this.isClickColor = 1;
             this.unitJson[
             this.unitJson[