浏览代码

Fix: 修复区级查看评测活动数据异常问题

Psycho 2 年之前
父节点
当前提交
3ef1c09298

+ 4 - 14
TEAMModelOS/ClientApp/src/view/areaArtExam/AcQuos.vue

@@ -254,20 +254,7 @@ export default {
                                     ? _this.$t('ae.ae1')
                                     ? _this.$t('ae.ae1')
                                     : ""
                                     : ""
                         ),
                         ),
-                        node.data.type === 2 ? h("Tag",
-                            {
-                                class: "type-setting",
-                                props: {
-                                    color: "primary",
-                                },
-                                nativeOn: {
-                                    click: (evt) => {
-                                        _this.uploadStatus = true
-                                        _this.uploadNode = node.data
-                                    }
-                                }
-                            },
-                            '批量导入') : undefined,
+                        
                         _this.activeNode?.id == node.data.id &&
                         _this.activeNode?.id == node.data.id &&
                             node.data.type === 1
                             node.data.type === 1
                             ? h(
                             ? h(
@@ -275,6 +262,7 @@ export default {
                                 {
                                 {
                                     class: ["data-wrap"],
                                     class: ["data-wrap"],
                                     props: {
                                     props: {
+                                        schoolCode: _this.artInfo.school,
                                         taskInfo: _this.getNodeSetting(node.data.id),
                                         taskInfo: _this.getNodeSetting(node.data.id),
                                         curClass: _this.curClass,
                                         curClass: _this.curClass,
                                         subjectId: _this.subjectId
                                         subjectId: _this.subjectId
@@ -290,6 +278,7 @@ export default {
                                     class: ["data-wrap"],
                                     class: ["data-wrap"],
                                     ref: node.data.id + '_data',
                                     ref: node.data.id + '_data',
                                     props: {
                                     props: {
+                                        artExamId: _this.artInfo.id,
                                         taskInfo: _this.getNodeSetting(node.data.id),
                                         taskInfo: _this.getNodeSetting(node.data.id),
                                         curClass: _this.curClass,
                                         curClass: _this.curClass,
                                         subjectId: _this.subjectId,
                                         subjectId: _this.subjectId,
@@ -304,6 +293,7 @@ export default {
     },
     },
     mounted() {
     mounted() {
         console.log('*****', this.treeData)
         console.log('*****', this.treeData)
+        console.log('*****', this.artInfo)
         if (this.treeData && this.treeData.length) {
         if (this.treeData && this.treeData.length) {
             this.activeNode = this.getDefaultOpenNode(this.treeData)
             this.activeNode = this.getDefaultOpenNode(this.treeData)
 			console.log(this.activeNode)
 			console.log(this.activeNode)

+ 5 - 1
TEAMModelOS/ClientApp/src/view/areaArtExam/ExamData.vue

@@ -49,6 +49,10 @@ export default {
         subjectId: {
         subjectId: {
             type: String,
             type: String,
             default: ''
             default: ''
+        },
+        schoolCode: {
+            type: String,
+            default: ''
         }
         }
     },
     },
     data() {
     data() {
@@ -126,7 +130,7 @@ export default {
             this.tableLoading = true
             this.tableLoading = true
             let requestData = {
             let requestData = {
                 id: examId,
                 id: examId,
-                code: this.$store.state.userInfo.schoolCode,
+                code: this.schoolCode,
                 subjectId: this.subjectId,
                 subjectId: this.subjectId,
                 classId: this.curClass.id,
                 classId: this.curClass.id,
             };
             };

+ 27 - 12
TEAMModelOS/ClientApp/src/view/areaArtExam/WorkData.vue

@@ -21,9 +21,15 @@
             <img v-else-if="item.type == 'res'" src="../../assets/icon/htex.png" />
             <img v-else-if="item.type == 'res'" src="../../assets/icon/htex.png" />
             <img v-else src="../../assets/source/unknow.png" />
             <img v-else src="../../assets/source/unknow.png" />
           </div>
           </div>
-          <p class="work-file-name" @click="handlePreviewHw(item)">
+          <!-- <p class="work-file-name" @click="handlePreviewHw(item)">
             {{item.name}}
             {{item.name}}
-          </p>
+          </p> -->
+          <p v-if="item.type != 'zy'" class="work-file-name" @click="handlePreviewHw(item)">
+              {{ item.name }}
+            </p>
+            <a v-else :href="item.url" target="_blank">
+              {{ item.name }}
+            </a>
         </div>
         </div>
       </template>
       </template>
       <template slot-scope="{ row }" slot="createTime">
       <template slot-scope="{ row }" slot="createTime">
@@ -47,7 +53,7 @@
           <source :src="hwPreviewFile.url+schoolSas.sas">
           <source :src="hwPreviewFile.url+schoolSas.sas">
           {{$t('teachContent.notAudio')}}
           {{$t('teachContent.notAudio')}}
         </audio>
         </audio>
-        <img v-else-if="hwPreviewFile.type == 'image'" :src="hwPreviewFile.url+schoolSas.sas" style="border-radius: 5px;max-height: 800px;max-width:870px;" />
+        <img v-else-if="hwPreviewFile.type == 'image'" :src="hwPreviewFile.url" style="border-radius: 5px;max-height: 800px;max-width:870px;" />
       </div>
       </div>
     </Modal>
     </Modal>
   </div>
   </div>
@@ -71,7 +77,11 @@ export default {
     subjectId: {
     subjectId: {
       type: String,
       type: String,
       default: ''
       default: ''
-    }
+    },
+    artExamId: {
+      type: String,
+      default: ''
+    },
   },
   },
   data() {
   data() {
     let _this = this
     let _this = this
@@ -120,8 +130,10 @@ export default {
      * 预览/下载作业文件
      * 预览/下载作业文件
      * @param {string} type video 删除研修视频 file 删除资料
      * @param {string} type video 删除研修视频 file 删除资料
      */
      */
-    handlePreviewHw(info) {
+    async handlePreviewHw(info) {
       if (info.type === 'image' || info.type === 'video' || info.type === 'audio') {
       if (info.type === 'image' || info.type === 'video' || info.type === 'audio') {
+        let fullUrl = await this.$tools.getFileSas(info.url)
+        info.url = fullUrl.url
         this.hwPreviewFile = info
         this.hwPreviewFile = info
         this.hwViewStatus = true
         this.hwViewStatus = true
       } else if (info.type === 'doc') {
       } else if (info.type === 'doc') {
@@ -171,8 +183,8 @@ export default {
       console.log(`output->this.taskInfo`, this.taskInfo)
       console.log(`output->this.taskInfo`, this.taskInfo)
       if (!workId || !this.subjectId || !this.curClass.id) return
       if (!workId || !this.subjectId || !this.curClass.id) return
       let req = {
       let req = {
-        id: workId,
-        // taskId:workId,
+        id: this.artExamId,
+        taskId: workId,
         subject: this.subjectId,
         subject: this.subjectId,
         classId: this.curClass.id
         classId: this.curClass.id
       }
       }
@@ -194,17 +206,19 @@ export default {
         students.forEach(s => {
         students.forEach(s => {
           let work = data.find(w => w.stuId === s.id)
           let work = data.find(w => w.stuId === s.id)
           let hasWork = work && work.attachments?.length
           let hasWork = work && work.attachments?.length
+          let hasZY = work && work.url
           let info = {
           let info = {
             id: s.id,
             id: s.id,
             name: s.name,
             name: s.name,
           }
           }
-          info.status = hasWork ? 1 : 0
-          info.createTime = hasWork ? work.attachments[0].createTime : 0
-          info.count = hasWork ? work.attachments.length : 0
-          info.files = hasWork ? work.attachments : []
+          info.status = hasWork || hasZY ? 1 : 0
+          info.createTime = hasWork ? work.attachments[0].createTime : hasZY ? work.createTime : 0
+          info.count = hasWork ? work.attachments.length : hasZY ? 1 : 0
+          info.files = hasWork ? work.attachments : hasZY ? [{ type: 'zy', name: '评唱结果', url: work.url }] : []
           this.workData.push(info)
           this.workData.push(info)
         })
         })
       }
       }
+      console.log(this.workData);
       this.pageChange(1)
       this.pageChange(1)
     },
     },
     // 分页页面变化
     // 分页页面变化
@@ -213,7 +227,8 @@ export default {
       let end = this.pageSize * page
       let end = this.pageSize * page
       this.currentPage = page
       this.currentPage = page
       this.tableData = this.workData.slice(start, end)
       this.tableData = this.workData.slice(start, end)
-    },
+      console.log(this.tableData);
+    }
   },
   },
   watch: {
   watch: {
     subjectId: {
     subjectId: {