SanHQin 7 月之前
父節點
當前提交
bb5d9e939c

+ 28 - 9
src/components/pages/appStore/views/appManagement.vue

@@ -1,16 +1,13 @@
 <template>
   <div class="appManagement">
     <div class="ac_left">
-      <!-- <recentUseCard/>
-			<collectCard/> -->
       <saveCard title="最近使用" :data="recentUse" :type="1" @saveClick="openApp"/>
       <saveCard title="收藏" :data="collect" :type="0" @saveClick="openApp"/>
     </div>
     <div class="ac_right">
       <div class="ac_header">
         <div class="ac_h_top">
-          <!-- <span>应用管理</span> -->
-          <span class="ac_h_t_active"-> <!-- class="ac_h_t_active"-->
+          <span class="ac_h_t_active"> <!-- class="ac_h_t_active"-->
             <svg
               width="20"
               height="20"
@@ -57,9 +54,9 @@
             >添加应用</el-button
           >
         </div>
-        <div class="ac_h_banner">
+        <div class="ac_h_banner" v-if="bannerObj">
           <img
-            src="https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/default%2FFrame+30141733970358224.svg"
+            :src="bannerObj.poster"
             alt="banner图"
           />
         </div>
@@ -79,7 +76,7 @@
             >
           </div>
           <div class="ac_h_b_selectList">
-          
+
             <el-select
               v-model="selectJuri"
               placeholder="请选择"
@@ -286,7 +283,8 @@ export default {
       dataList: [],
       recentUse: [],
       collect: [],
-      editAppCard: null
+      editAppCard: null,
+      bannerObj:null
     };
   },
   computed: {
@@ -668,6 +666,26 @@ export default {
     },
     changeShowPage(newPage) {
       this.$emit("changeShowCard", newPage);
+    },
+    getBanner(){
+      let params = {
+        uid:this.userId,
+        oid:this.oid,
+        org:this.org,
+        type:4
+      }
+
+      this.ajax.get(this.$store.state.api+"select_bannerByoidORorg",params).then(res=>{
+        let _data = res.data[0];
+        if(_data[0]){
+          this.bannerObj = _data[0];
+        }else{
+          this.bannerObj = null
+        }
+      }).catch(e=>{
+        console.log("获取banner图失败")
+        console.log(e)
+      })
     }
   },
   mounted() {
@@ -675,6 +693,7 @@ export default {
     this.getData();
     this.getCollect();
     this.getRecentUse();
+    this.getBanner()
   }
 };
 </script>
@@ -730,7 +749,7 @@ export default {
   box-sizing: border-box;
   padding: 0 15px;
   border-bottom: 1px solid #eeeeee;
-	
+
   position: relative;
   justify-content: center;
 }

+ 28 - 8
src/components/pages/appStore/views/workSpace.vue

@@ -1,8 +1,6 @@
 <template>
   <div class="workSpace">
     <div class="ac_left">
-      <!-- <recentUseCard/>
-			<collectCard/> -->
       <saveCard
         title="最近使用"
         :data="recentUse"
@@ -14,7 +12,6 @@
     <div class="ac_right">
       <div class="ac_header">
         <div class="ac_h_top">
-          <!-- <span>应用管理</span> -->
           <span @click="changeShowPage(0)">
             <svg
               width="20"
@@ -54,9 +51,9 @@
             工作空间</span
           >
         </div>
-				<div class="ac_h_banner">
+				<div class="ac_h_banner" v-if="bannerObj">
           <img
-            src="https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/default%2FFrame+30141733970358224.svg"
+            :src="bannerObj.poster"
             alt="banner图"
           />
         </div>
@@ -185,7 +182,7 @@
       ref="addAppDialogRef"
       :typeList="typeList"
       @success="addAppSuccess"
-    /> -->
+    />-->
   </div>
 </template>
 
@@ -242,7 +239,8 @@ export default {
       dataList: [1],
       recentUse: [],
       collect: [],
-      editAppCard: null
+      editAppCard: null,
+      bannerObj:null
     };
   },
   computed: {},
@@ -284,9 +282,31 @@ export default {
     },
     changeShowPage(newPage) {
       this.$emit("changeShowCard", newPage);
+    },
+    getBanner(){
+      let params = {
+        uid:this.userId,
+        oid:this.oid,
+        org:this.org,
+        type:4
+      }
+
+      this.ajax.get(this.$store.state.api+"select_bannerByoidORorg",params).then(res=>{
+        let _data = res.data[0];
+        if(_data[0]){
+          this.bannerObj = _data[0];
+        }else{
+          this.bannerObj = null
+        }
+      }).catch(e=>{
+        console.log("获取banner图失败")
+        console.log(e)
+      })
     }
   },
-  mounted() {}
+  mounted() {
+    this.getBanner()
+  }
 };
 </script>
 

+ 32 - 21
src/components/pages/test/check/index.vue

@@ -114,7 +114,7 @@
                   <el-input v-model="courseName" class="student_input" :disabled="!(!peopleId)" placeholder="请输入需要搜索的姓名"></el-input>
                   <span class="serach_icon" @click="searchCourse" ></span>
                 </div>
-                
+
                 <div class="btnA" v-if="stype == 1 && !pdfLoading" @click="exportPDF">导出PDF</div>
                 <div class="btnA" v-if="stype == 2" @mouseenter="btnDisplay = true" @mouseleave="btnDisplay = false">
                   导出数据
@@ -124,10 +124,10 @@
 										<div type="primary" v-if="stype == 2" @click="exportWordData">word导出</div>
                   </div>
                 </div>
-								
+
                 <div class="btnA" v-if="stype == 3" @click="exportAllWord2">导出人员数据</div>
                 <div class="btnA" @click="openChat" v-if="this.worksArray.length && !peopleId">AI分析</div><!--v-if="this.worksArray.length"-->
-								
+
               </div>
             </div>
              <!-- 手机端 查看切换 isDesktop-->
@@ -373,7 +373,7 @@
                     <div style="width: 100px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{ item.title }}</div>
                   </el-tooltip>
 
-                  
+
                 </div>
                 <div style="display: flex;">
                   <!-- <div v-if="item.type==7" style="right:0;position: absolute;">平均分:{{ getAverageScore(index) }}</div> -->
@@ -578,7 +578,12 @@
           <div class="table_content" v-if="stype == 2 && isDesktop">
             <el-table class="el-table" ref="table" :data="worksArray" border :fit="true" :key="2" v-loading="isLoading"
               style="width: 100%" :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
-              @filter-change="handleFilterChange">
+              @filter-change="handleFilterChange"  @selection-change="handleSelectionChange">
+              <el-table-column
+              label="序号"
+                type="selection"
+                width="55">
+              </el-table-column>
               <el-table-column fixed label="序号" width="80px" align="left">
                 <template slot-scope="scope">
                   {{ scope.$index + 1 }}
@@ -592,7 +597,7 @@
 								</template>
               </el-table-column>
               <el-table-column v-for="(item, index) in chapters" :key="index" :label="item.json.title"
-                :min-width="item.type == 5 ? 200 : 150" align="left" 
+                :min-width="item.type == 5 ? 200 : 150" align="left"
 								:filters="item.type == 1 ? item.nameFilters : (item.type ==  6 || item.type ==  11)? item.nameFilters : item.type==8?getTimeFilterText(item,index):null"
                 :filter-method="item.type == 1 ? (value, row) => { return filterName(value, row, index) } : (item.type == 6 || item.type == 11)?(value, row) => { return filterCourse(value, row, index)}:item.type==8?(value,row)=>{return filterTime(value,row,index)}:null"
                 :filter-placement="item.type == 8 ||item.type == 1 || item.type ==6|| item.type ==11 ? filterPlacement : null">
@@ -677,7 +682,7 @@
                               {{ k.json.title }}
                             </div>
                           </div>
-                          <div style="color: rgba(0, 0, 0, 0.4);">[{{ selectType2(k.type,k.json.type) }}]</div>  
+                          <div style="color: rgba(0, 0, 0, 0.4);">[{{ selectType2(k.type,k.json.type) }}]</div>
                         </div>
                         <div class="IsDAnswer">
                           <div v-for="(r, index2) in i.array[kin].json.answer2"
@@ -784,7 +789,7 @@
                   </div>
 
                 </div>
-                
+
                 <div style="width: 100%;display: flex;justify-content: end;">
                   <div @click="i.cut=!i.cut" style="display: flex;flex-direction: column;align-items: center">
                     <img src="../../../../assets/icon/fileIcon/retractImg.png" alt="">
@@ -897,7 +902,7 @@
       </div>
     </div>
 
-   
+
     <share-box :testJson="testJson" :TeachingValue="TeachingValue" :TeachName="TeachNameCpt"   :dialogVisibleShare.sync="dialogVisibleShare"></share-box>
     <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
     <wVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :url="wurl"></wVideo>
@@ -928,7 +933,7 @@ import XLSX from "xlsx-js-style";
 import aiBoxRight from './aiBoxRight.vue'
 
 // word模板
-import docxTemplateDialog from './docxTemplateDialog' 
+import docxTemplateDialog from './docxTemplateDialog'
 
 const getFile = (url) => {
     return new Promise((resolve, reject) => {
@@ -1037,6 +1042,7 @@ export default {
       btnDisplay: false,
 
       fileLoading: [],
+      selectWorkList:[]
       // fileLoadCount: [],
       // fileLoadNum: [],
       // infoprogress: [],
@@ -1481,7 +1487,7 @@ export default {
             } else if (topic.type == 11) {
               const uniqueArray = courseCount11.filter((item, index) => courseCount11.indexOf(item) === index);
               let _answer = uniqueArray
-              
+
               allCourseIds = allCourseIds.concat(_answer);
             }
             for (var j = 0; j < array.length; j++) {
@@ -1566,7 +1572,7 @@ export default {
                 result.forEach(elc=>{
                   if(this.chapters.find((f, index)=>index==i).nameFilters.find(c=>c.value==elc.title)==undefined && topic.answer2.includes(elc.courseId)){
                     this.chapters.find((c, index)=>index==i).nameFilters.push({text:elc.title,value:elc.title})
-                  }                
+                  }
                 })
               }
 
@@ -1585,7 +1591,7 @@ export default {
           this.testArray = testArray
           this.worksArray = array
           this.isLoading = false;
-          
+
         })
         .catch((err) => {
           console.error(err);
@@ -2041,7 +2047,7 @@ export default {
         } else if (item.type == 11 && item.json.answer2) {
             let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`
             _test += _option
-        } 
+        }
       }
       _test += `</div>`
       let _html = _title + _content + _detail + _test;
@@ -2103,7 +2109,7 @@ export default {
             result.forEach(i=>{
               _title.push(i.title)
             })
-            
+
             let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${ _title.length ? _title.join(',') : '' }</div>`
             _test += _option
         }
@@ -2143,8 +2149,9 @@ export default {
       return blob;
     },
     exportAllWord() {
+      if(this.selectWorkList.length<=0)return this.$message.info("请先选择需要导出的表单数据")
       this.pdfLoading = true;
-      const _chapInfo = this.worksArray;
+      const _chapInfo = this.selectWorkList;//this.worksArray
       let url = [];
       for (let i = 0; i < _chapInfo.length; i++) {
         url.push({
@@ -2338,10 +2345,10 @@ export default {
                   this.fileLoading[index].bool=false
                 }
         	  });
-           
+
 						promises.push(promise)
 					})
-					
+
 				}else{//只有一个文件的情况
 					promises.push(getFile(downFileArray[0].urlList[0].url).then((data) => {
 						if (data.data != 1) {
@@ -2423,8 +2430,12 @@ export default {
 			this.testJson.cover = data
 		},
 		exportWordData(){
-			this.$refs.docxTemplateDialogRef.open({fileData:this.testJson.cover?JSON.parse(this.testJson.cover):null,testJson:this.testJson,courseId:this.testJson.courseId,formData:this.worksArray})//这里可以传数据
-		}
+      if(this.selectWorkList.length<=0)return this.$message.info("请先选择需要导出的表单数据")
+			this.$refs.docxTemplateDialogRef.open({fileData:this.testJson.cover?JSON.parse(this.testJson.cover):null,testJson:this.testJson,courseId:this.testJson.courseId,formData:this.selectWorkList})//这里可以传数据this.worksArray
+		},
+    handleSelectionChange(value){
+      this.selectWorkList = value
+    }
   },
   beforeDestroy() {
     document.getElementsByTagName('html')[0].style.overflow = '';
@@ -3365,4 +3376,4 @@ export default {
   border-radius: 5px;
 	overflow: hidden;
 }
-</style>
+</style>