Browse Source

Merge branch 'beta' of https://git.cocorobo.cn/CocoRoboLabs/pbl-teacher-table into beta

SanHQin 7 months ago
parent
commit
a60c6368ec

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.3372c039b9d257c01095b00c91d19aa4.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.35dfb1d95a63059f336f.js></script><script type=text/javascript src=./static/js/app.86e7297a4fdb16b9a6ba.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.1a8216bf16480365c47a954381aa6b0c.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.35dfb1d95a63059f336f.js></script><script type=text/javascript src=./static/js/app.0d98abca3e201e8244bc.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.1a8216bf16480365c47a954381aa6b0c.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.1a8216bf16480365c47a954381aa6b0c.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.3372c039b9d257c01095b00c91d19aa4.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.3372c039b9d257c01095b00c91d19aa4.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.0d98abca3e201e8244bc.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.0d98abca3e201e8244bc.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.js.map


+ 11 - 10
src/components/pages/components/studentWorksDetail.vue

@@ -128,31 +128,32 @@
           :row-class-name="tableRowClassName"
           stripe
         >
-          <el-table-column
+          <!-- <el-table-column
             prop="sName"
             label="姓名"
             min-width="15"
             align="center"
-          ></el-table-column>
+          ></el-table-column> -->
           <el-table-column
-            prop="class"
-            label="班级"
+            prop="course"
+            label="课程"
             min-width="20"
             align="center"
             show-overflow-tooltip
           >
-            <template slot-scope="scope">
-              <div>{{ scope.row.class ? scope.row.class : "暂无班级" }}</div>
-            </template>
           </el-table-column>
           <el-table-column
-            prop="course"
-            label="课程"
+            prop="class"
+            label="班级"
             min-width="20"
             align="center"
             show-overflow-tooltip
           >
+            <template slot-scope="scope">
+              <div>{{ scope.row.class ? scope.row.class : "暂无班级" }}</div>
+            </template>
           </el-table-column>
+         
 
           <el-table-column
             prop="time"
@@ -160,7 +161,7 @@
             min-width="15"
             align="center"
           ></el-table-column>
-          <el-table-column label="操作" width="300px">
+          <el-table-column label="操作" align="center" width="300px">
             <template slot-scope="scope">
               <el-button
                 type="primary"

+ 8 - 7
src/components/pages/components/worksDetail2.vue

@@ -107,14 +107,13 @@
                 :key="index+'a'"
                 :label="item.name"
                 :value="item.id"
-
               ></el-option>
             </el-select>
 
             
             <div class="typeCheck">
               <el-switch v-model="typeCheck"></el-switch
-              ><span>查看所有学生</span>
+              ><span style="font-size: 14px;">查看所有学生</span>
             </div>
           </div>
         </div>
@@ -233,7 +232,7 @@
                 type="primary"
                 size="small"
                 @click="
-                  lookWork2(scope.row.id, scope.row.userid, scope.row.courseid)
+                  lookWork2(scope.row.id, scope.row.userid, scope.row.courseid, dyList[scope.row.stage].name,dyList[scope.row.stage].taskList[scope.row.task].name)
                 "
                 >导出作业集</el-button
               >
@@ -3340,7 +3339,7 @@ export default {
     },
     onPlayerPlay() {},
     // this.$store.commit("update", ["userInfo", userInfo]);
-    lookWork2(id, uid, cid) {
+    lookWork2(id, uid, cid,stage,task) {
       // this.scopeId = id;
       let params = {
         uid: uid,
@@ -3931,7 +3930,7 @@ export default {
             _bg +
             _cocopi +
             _word;
-          this.generate(_html);
+          this.generate(_html,stage,task);
         })
         .catch((err) => {
           console.error(err);
@@ -3962,7 +3961,7 @@ export default {
         this.navId = a;
       }
     },
-    async generate(a) {
+    async generate(a,stage,task) {
       // 将html文件中需要用到的数据挂载到store上
       this.$store.commit("update", ["report", a]);
       const content = `<!DOCTYPE html>
@@ -3980,7 +3979,7 @@ export default {
       // debugger
       // 生成报告
       const link = document.createElement("a");
-      let dname = this.sInfo.course + "-" + this.sInfo.sName + ".html";
+      let dname = this.sInfo.course + "-"+stage+"-" + task + this.sInfo.sName + ".html";
       // link.download = "报告.html"; // 文件名
       link.download = dname; // 文件名
       link.style.display = "none";
@@ -5773,12 +5772,14 @@ ol {
   margin-right: 15px;
   padding: 5px 0;
   cursor: pointer;
+  font-size: 14px;
 }
 .cutTab > .ctrlBtn2 {
   cursor: pointer;
   margin-right: 15px;
   border-bottom: 3px #409EFF solid;
   font-weight: 600;
+  font-size: 14px;
   padding: 5px 0;
   color: #409EFF;
 }

+ 6 - 1
src/components/pages/course.vue

@@ -58,7 +58,7 @@
               <div class="search">
                 <img src="../../assets/icon/search.png" alt="" />
               </div>
-              <input class="sInput" type="text" placeholder="请输入关键字" v-model="courseName" @input="getCourse()" />
+              <input class="sInput" type="text" placeholder="请输入关键字" v-model="courseName" />
             </div>
             <el-button type="primary" class="bgColor" style="margin-left: 10px;" @click="reset">重置</el-button>
           </div>
@@ -465,6 +465,11 @@ export default {
       oidArray:[]
     };
   },
+  watch: {
+    courseName(newValue, oldValue) {
+      this.searchCourse()
+    }
+  },
   methods: {
     getAIJ(){
       this.ajax

+ 167 - 12
src/components/pages/test/check/index.vue

@@ -144,7 +144,7 @@
               <div class="title">
                 <el-tooltip :content="selectType(item)" placement="top" effect="dark">
                   <span class="test_icon"
-                    :class="{ test_icon_check: item.type == 1 && item.atype == 2, test_icon_checkO: item.type == 1 && item.atype == 1, test_icon_gap: item.type == 3, test_icon_file: item.type == 5, test_course_file: item.type == 6, test_eva_file: item.type == 7,test_icon_time: item.type == 8 }"></span>
+                    :class="{ test_icon_check: item.type == 1 && item.atype == 2, test_icon_checkO: item.type == 1 && item.atype == 1, test_icon_gap: item.type == 3, test_icon_file: item.type == 5, test_course_file: item.type == 6 || item.type == 11, test_eva_file: item.type == 7,test_icon_time: item.type == 8 }"></span>
                 </el-tooltip>
                 <span style="line-height: 25px;">{{ item.title }}</span>
 								<el-button v-if="item.type == 5 && item.array.length>0" class="title_downBtn" type="primary" size="small" @click.stop="downloadFileType5(item.array,item.title,index)">批量下载附件</el-button>
@@ -313,6 +313,38 @@
                   </wordcloud>
                 </div>
               </div>
+              <div class="content4" v-if="item.type == 11">
+                <div class="out_box" v-for="(item, index) in item.courseArray" :key="index + '-' + index2">
+                  <div class="tup">
+                    <img :src="item.cover != null && item.cover != ''
+    ? JSON.parse(item.cover).length > 0
+      ? JSON.parse(item.cover)[0].url
+      : mr
+    : mr
+    " alt />
+                    <div class="bottom_box">
+                      <div>
+                        <el-tooltip :content="item.title" popper-class="text_tooltip" placement="top" effect="dark">
+                          <span>{{ item.title }}</span>
+                        </el-tooltip>
+                      </div>
+                      <div class="kc_t">
+                        <span>{{ item.username }}</span>
+                        <span>{{ item.state == 1 ? '阶段模式' : item.state == 2 ? '任务模式' : '极简模式' }}</span>
+                      </div>
+                      <div class="kc_time">
+                        <span style="color: #717C8D">创建日期:</span>{{ item.time }}
+                      </div>
+                      <div class="kc_time">
+                        <span style="color: #717C8D">修改日期:</span>{{ item.update_at }}
+                      </div>
+                    </div>
+                  </div>
+                </div>
+                <!-- <div class="courses" v-for="(courses, index2) in item.array" :key="index + '-' + index2">
+                  {{ courses }}
+                </div> -->
+              </div>
             </div>
           </div>
           <!-- 按题目手机端 !isDesktop-->
@@ -497,6 +529,38 @@
                   <div class="cutBtnCss" @click="item.cut=!item.cut">{{ item.cut?'查看详情':'查看视图' }}</div>
                 </div>
               </div>
+              <div class="content4" v-if="item.type == 11">
+                <div class="out_box" v-for="(item, index) in item.courseArray" :key="index + '-' + index2">
+                  <div class="tup">
+                    <img :src="item.cover != null && item.cover != ''
+    ? JSON.parse(item.cover).length > 0
+      ? JSON.parse(item.cover)[0].url
+      : mr
+    : mr
+    " alt />
+                    <div class="bottom_box">
+                      <div>
+                        <el-tooltip :content="item.title" popper-class="text_tooltip" placement="top" effect="dark">
+                          <span>{{ item.title }}</span>
+                        </el-tooltip>
+                      </div>
+                      <div class="kc_t">
+                        <span>{{ item.username }}</span>
+                        <span>{{ item.state == 1 ? '阶段模式' : item.state == 2 ? '任务模式' : '极简模式' }}</span>
+                      </div>
+                      <div class="kc_time">
+                        <span style="color: #717C8D">创建日期:</span>{{ item.time }}
+                      </div>
+                      <div class="kc_time">
+                        <span style="color: #717C8D">修改日期:</span>{{ item.update_at }}
+                      </div>
+                    </div>
+                  </div>
+                </div>
+                <!-- <div class="courses" v-for="(courses, index2) in item.array" :key="index + '-' + index2">
+                  {{ courses }}
+                </div> -->
+              </div>
             </div>
           </div>
 
@@ -518,9 +582,9 @@
 								</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" :filters="item.type == 1 ? item.nameFilters : item.type ==  6? item.nameFilters : null"
-                :filter-method="item.type == 1 ? (value, row) => { return filterName(value, row, index) } : item.type == 6?(value, row) => { return filterCourse(value, row, index)}:null"
-                :filter-placement="item.type == 1 || item.type ==6 ? filterPlacement : null">
+                :min-width="item.type == 5 ? 200 : 150" align="left" :filters="item.type == 1 ? item.nameFilters : (item.type ==  6 || item.type ==  11)? item.nameFilters : 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)}:null"
+                :filter-placement="item.type == 1 || item.type ==6|| item.type ==11 ? filterPlacement : null">
 
                 <template slot-scope="scope">
                   <div v-if="scope.row.array[index].type == 1" style="display: flex; flex-wrap: wrap;">
@@ -554,6 +618,9 @@
                   <div v-if="scope.row.array[index].type == 7" style="display: flex; flex-wrap: wrap;">
                     {{ getScore(scope.row.array[index].json) }}
                   </div>
+                  <div v-if="scope.row.array[index].type == 11" style="display: flex; flex-wrap: wrap;">
+                    {{ scope.row.array[index].json.answer2}}
+                  </div>
                 </template>
               </el-table-column>
               <el-table-column label="操作" width="300px" fixed="right" v-if="isN!=1">
@@ -684,6 +751,22 @@
                         </div>
                       </div>
                     </div>
+                    <div v-if="k.type.type == 11">
+                      <div class="isDTitle2">
+                        <div style="display: flex;justify-content: space-between;">
+                          <div style="display: flex;">
+                            <span class="topicTitCss">第{{kin+1}}题:</span>
+                            <div class="isDTitle2JsonTit">
+                              {{ k.json.title }}
+                            </div>
+                          </div>
+                          <div style="color: rgba(0, 0, 0, 0.4);">[{{ selectType2(k.type,k.json.type) }}]</div>
+                        </div>
+                        <div class="IsDAnswer">
+                          {{ i.array[kin].json.answer2 }}
+                        </div>
+                      </div>
+                    </div>
                   </div>
 
                 </div>
@@ -979,7 +1062,7 @@ export default {
           return '问答题'
         } else if (item.type == 5) {
           return '附件'
-        } else if (item.type == 6) {
+        } else if (item.type == 6 || item.type == 11) {
           return '课程'
         } else if (item.type == 7) {
           return '评分'
@@ -1077,7 +1160,7 @@ export default {
     },
 		// 筛选课程
 		filterCourse(value, row, index) {
-			return row.array[index].json.answer2 == value;
+			return row.array[index].json.answer2.indexOf(value) != -1;
     },
     wordClickHandler(name, value) {
       //  this.$notify({
@@ -1203,7 +1286,7 @@ export default {
           this.pcount = res.data[3][0].count
           let chapters = this.setJSON(this.setJson2(JSON.parse(JSON.stringify(JSON.parse(res.data[0][0].chapters)))))
           this.chapters = this.setFilter(this.JSONSetting(JSON.parse(JSON.stringify(JSON.parse(res.data[0][0].chapters)))))
-
+          let courseCount11 = []
           let testArray = []
           let array = []
           for (let i = 0; i < this.works.length; i++) {
@@ -1215,7 +1298,25 @@ export default {
                 let _json2 = _json[ja].json
                 if (_json[ja].type == 6) {
                   let _cjson = await this.getCourse(_json2.answer2)
-                  _json2.answer2 =  _cjson ? _cjson.title : ''
+                  _json[ja].json.answer2 =  _cjson ? _cjson.title : ''
+                }
+                if(_json[ja].type == 11){
+                  let _answer = _json2.answer2
+                  _answer.length ? courseCount11 = courseCount11.concat(_answer) : ''
+                  _json[ja].json.courseId = _answer ? _answer : [];
+                  let params = {
+                    cid:_answer.length ? _answer.join(",") : ''
+                  }
+
+                  let data = await this.ajax.get(this.$store.state.api + 'getCourseInfoTestAll',params);
+                  let result = data.data[0]
+                  let _title = []
+                  // this.chapters.find(i=>i.type==6).nameFilters = result.map(r=>{return{text:r.title,value:r.courseId}})
+                  result.forEach(i=>{
+                    _title.push(i.title)
+                  })
+                  
+                  _json[ja].json.answer2 = _title.length ? _title.join(',') : '';
                 }
               }
               array.push({
@@ -1291,6 +1392,29 @@ export default {
                   count: 0
                 })
               }
+            } else if (topic.type == 11) {
+              const uniqueArray = courseCount11.filter((item, index) => courseCount11.indexOf(item) === index);
+              let _answer = uniqueArray
+              topic.array = _answer
+              topic.courseArray = [];
+							let params = {
+								cid:topic.array ? topic.array.join(",") : ''
+							}
+
+							let data = await this.ajax.get(this.$store.state.api + 'getCourseInfoTestAll',params);
+							let result = data.data[0]
+							// this.chapters.find(i=>i.type==6).nameFilters = result.map(r=>{return{text:r.title,value:r.courseId}})
+							result.forEach(i=>{
+								if(this.chapters.find(f=>f.type==11).nameFilters.find(c=>c.value==i.title)==undefined){
+									this.chapters.find(i=>i.type==11).nameFilters.push({text:i.title,value:i.title})
+                  console.log(this.chapters);
+                  
+								}
+							})
+
+							result.forEach(i=>i.update_at=new Date(i.update_at).toLocaleString('zh-CN', {year: 'numeric',month: '2-digit',day: '2-digit',hour: '2-digit',minute: '2-digit',second: '2-digit',hour12: false}).replace(/\//g,'-'))
+							topic.courseArray = result;
+
             }
             for (var j = 0; j < array.length; j++) {
               let el2 = array[j]
@@ -1662,6 +1786,9 @@ export default {
         } else if (item.type == 8 && item.json.answer2) {
           let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
           _test += _option
+        } 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>`
@@ -1708,7 +1835,10 @@ export default {
         } else if (item.type == 8 && item.json.answer2) {
           let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
           _test += _option
-        } 
+        } 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;
@@ -1787,7 +1917,10 @@ export default {
         } else if (item.type == 8 && item.json.answer2) {
           let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
           _test += _option
-        }
+        } 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;
@@ -1834,6 +1967,24 @@ export default {
         } else if (item.type == 8 && item.json.answer2) {
           let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
           _test += _option
+        } else if (item.type == 11 && item.json.answer2 && item.json.answer2.length) {
+            let _answer = item.json.answer2
+            _answer.length ? courseCount11 = courseCount11.concat(_answer) : ''
+            _json[ja].json.courseId = _answer ? _answer : [];
+            let params = {
+              cid:_answer.length ? _answer.join(",") : ''
+            }
+
+            let data = await this.ajax.get(this.$store.state.api + 'getCourseInfoTestAll',params);
+            let result = data.data[0]
+            let _title = []
+            // this.chapters.find(i=>i.type==6).nameFilters = result.map(r=>{return{text:r.title,value:r.courseId}})
+            result.forEach(i=>{
+              _title.push(i.title)
+            })
+            
+            let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${ _title.length ? _title.join(',') : '' }</div>`
+            _test += _option
         }
       }
       _test += `</div>`
@@ -1971,6 +2122,8 @@ export default {
             _json[j + 1 + "." + chapters[j].json.title] = _score
           } else if (res[i].array[j].type == 8 && res[i].array[j].json.answer2) {
             _json[j + 1 + "." + chapters[j].json.title] = res[i].array[j].json.answer2
+          } else if (res[i].array[j].type == 11 && res[i].array[j].json.answer2) {
+            _json[j + 1 + "." + chapters[j].json.title] = res[i].array[j].json.answer2
           }
         }
         array.push(_json);
@@ -2958,8 +3111,10 @@ export default {
 
 .tup>img {
   width: 100%;
-  height: 100%;
-  object-fit: cover;
+  /* height: 100%; */
+  height: 150px;
+  /* object-fit: cover; */
+  object-fit: contain;
 }
 
 .kc_time {

+ 1 - 1
src/components/pages/testPerson/test/test.vue

@@ -30,7 +30,7 @@
                 <div class="test_panel_title">
                     <div class="title" :style="{paddingLeft: (item.array.length > 0 || item.carray.length > 0) ? '0' : '30px'}" @click="openWork(index)">
                         <span class="open" :class="{active: item.open}" v-if="item.array.length > 0 || item.carray.length > 0"></span>
-                        <el-tooltip :content="item.username" placement="top" effect="dark">
+                        <el-tooltip :content="item.title" placement="top" effect="dark">
                             <span class="titleN">{{ item.title }}</span>
                         </el-tooltip>
                     </div>

+ 2 - 1
src/components/pages/works.vue

@@ -256,7 +256,8 @@
                 }}
               </template>
             </el-table-column>
-            <el-table-column label="操作" min-width="30">
+             
+            <el-table-column label="操作"  align="center" min-width="30">
               <template slot-scope="scope">
                 <el-button
                   type="primary"

Some files were not shown because too many files changed in this diff