Compare commits
7 Commits
fab449cc96
...
906559134e
Author | SHA1 | Date |
---|---|---|
朱浩 | 906559134e | |
朱浩 | ed3559f34f | |
yangws | f224f8b048 | |
小杨 | 5790e87a85 | |
yangws | 4b6a7918a9 | |
小杨 | 7e71af0cb7 | |
zouyf | bdc508a0fa |
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "aix-win",
|
||||
"version": "2.1.18",
|
||||
"version": "2.1.19",
|
||||
"description": "",
|
||||
"main": "./out/main/index.js",
|
||||
"author": "上海交大重庆人工智能研究院",
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
<template>
|
||||
<el-drawer v-model="model" class="preview-drawer" :modal="true" :destroy-on-close="true" :with-header="false" :append-to-body="true"
|
||||
size="50%">
|
||||
<div class="drawer-content">
|
||||
<el-image v-for="(url,index) in srcList" :key="index" :src="url" lazy />
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script setup>
|
||||
import {ref} from 'vue'
|
||||
import {getImgPath} from "@/api/file/third";
|
||||
|
||||
const model = defineModel()
|
||||
//显示图片的路径
|
||||
const srcList = ref([])
|
||||
const init = (id) => {
|
||||
srcList.value = []
|
||||
getImgPath({itemId:id}).then(res => {
|
||||
if(res.code === 200){
|
||||
res.data.forEach(item => {
|
||||
item.subsets.forEach(previewItem => {
|
||||
previewItem.previewFiles.forEach(fileItem => {
|
||||
srcList.value.push(fileItem.fileUrl)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
@ -619,13 +619,13 @@ const checkWorkType = (params) => {
|
|||
// 获取学生答题列表
|
||||
|
||||
const score = extractedNumber(params.studentObj.scoingRate)
|
||||
if(0<=score<=59){
|
||||
if(0<=score && score<=59){
|
||||
classWorkFormScore.rating = 5
|
||||
}else if(60<=score<=69){
|
||||
}else if(60<=score && score<=69){
|
||||
classWorkFormScore.rating = 4
|
||||
}else if(70<=score<=79){
|
||||
}else if(70<=score && score<=79){
|
||||
classWorkFormScore.rating = 3
|
||||
}else if(80<=score<=99){
|
||||
}else if(80<=score && score<=99){
|
||||
classWorkFormScore.rating = 2
|
||||
}else{
|
||||
classWorkFormScore.rating = 1
|
||||
|
|
|
@ -149,7 +149,7 @@
|
|||
<!-- 训练报告-->
|
||||
<div v-else-if="classWorkAnalysis.view == 'report'" style="overflow-y: scroll">
|
||||
<!-- <ClassOverview :table-list="overviewData" :eval-id="courseObj.evalid"></ClassOverview> -->
|
||||
<ClassOverview :table-list="overviewData"></ClassOverview>
|
||||
<ClassOverview :active-data="classWorkActiveData" :table-list="overviewData"></ClassOverview>
|
||||
</div>
|
||||
|
||||
<!-- <template #footer>
|
||||
|
@ -393,11 +393,46 @@ const getClassWorkStudentList = (rowId) => {
|
|||
tableRadio.value = '1'
|
||||
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length
|
||||
tableRadio.num1 = tableRadio.list.length
|
||||
tableRadio.list = tableRadio.list.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
teacherRating : checkWorkType(item)
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
loading_dt_table.value = false
|
||||
})
|
||||
}
|
||||
const checkWorkType = (item) => {
|
||||
//这里判断题目类型
|
||||
const subType = classWorkActiveData.quizlist.map(item => item.worktype)
|
||||
const objectiveQuestion = ['单选题','多选题','判断题']
|
||||
let rating = 0
|
||||
//判断题目是不是客观题
|
||||
if(subType.every(item => objectiveQuestion.includes(item))){
|
||||
// 获取学生答题列表
|
||||
const score = extractedNumber(item.scoingRate)
|
||||
if(0<=score && score<=59){
|
||||
rating = 5
|
||||
}else if(60<=score && score<=69){
|
||||
rating = 4
|
||||
}else if(70<=score && score<=79){
|
||||
rating = 3
|
||||
}else if(80<=score && score<=99){
|
||||
rating = 2
|
||||
}else{
|
||||
rating = 1
|
||||
}
|
||||
}
|
||||
return rating
|
||||
|
||||
}
|
||||
// 获取百分比的数字
|
||||
const extractedNumber = (score) => {
|
||||
const match = score.match(/\d+/);
|
||||
return match ? parseInt(match[0], 10) : null;
|
||||
}
|
||||
/** 2、查看某一个学生的学习任务完成详情*/
|
||||
const getStudentClassWorkDataDetail = (row) => {
|
||||
// 这里取出的是学生完成情况
|
||||
|
|
|
@ -390,11 +390,46 @@ const getClassWorkStudentList = (rowId) => {
|
|||
tableRadio.value = '1'
|
||||
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length
|
||||
tableRadio.num1 = tableRadio.list.length
|
||||
tableRadio.list = tableRadio.list.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
teacherRating : checkWorkType(item)
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
loading_dt_table.value = false
|
||||
})
|
||||
}
|
||||
const checkWorkType = (item) => {
|
||||
//这里判断题目类型
|
||||
const subType = classWorkActiveData.quizlist.map(item => item.worktype)
|
||||
const objectiveQuestion = ['单选题','多选题','判断题']
|
||||
let rating = 0
|
||||
//判断题目是不是客观题
|
||||
if(subType.every(item => objectiveQuestion.includes(item))){
|
||||
// 获取学生答题列表
|
||||
const score = extractedNumber(item.scoingRate)
|
||||
if(0<=score && score<=59){
|
||||
rating = 5
|
||||
}else if(60<=score && score<=69){
|
||||
rating = 4
|
||||
}else if(70<=score && score<=79){
|
||||
rating = 3
|
||||
}else if(80<=score && score<=99){
|
||||
rating = 2
|
||||
}else{
|
||||
rating = 1
|
||||
}
|
||||
}
|
||||
return rating
|
||||
|
||||
}
|
||||
// 获取百分比的数字
|
||||
const extractedNumber = (score) => {
|
||||
const match = score.match(/\d+/);
|
||||
return match ? parseInt(match[0], 10) : null;
|
||||
}
|
||||
/** 2、查看某一个学生的学习任务完成详情*/
|
||||
const getStudentClassWorkDataDetail = (row) => {
|
||||
// 这里取出的是学生完成情况
|
||||
|
|
|
@ -7,12 +7,11 @@
|
|||
v-for="item in sourceStore.thirdResult.list"
|
||||
:key="item.itemId"
|
||||
class="list-item"
|
||||
@click="handleRow"
|
||||
@click="handleRow(item)"
|
||||
>
|
||||
<div class="item-left flex">
|
||||
<div style="position: relative" @click="clickImg(item.itemId)">
|
||||
<div style="position: relative">
|
||||
<FileImage :file-name="item.fileType" :size="50" />
|
||||
<el-icon style="position: absolute;top: 1px;right: 5px"><Search /></el-icon>
|
||||
</div>
|
||||
<div class="flex item-left-content">
|
||||
<div class="name flex" :title="item.title">
|
||||
|
@ -66,14 +65,7 @@
|
|||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
<el-dialog v-model="isViewImg" width="80%" :modal-append-to-body="false" :append-to-body="false">
|
||||
<div class="demo-image__lazy">
|
||||
<el-image v-for="(url,index) in srcList" :key="index" :src="url" lazy />
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- <video width="550" controls autoplay loop>-->
|
||||
<!-- <source src="https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-360p.mp4" type="video/mp4" />-->
|
||||
<!-- </video>-->
|
||||
<FilePreview ref="thirdPreview" v-model="isViewImg"></FilePreview>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -82,10 +74,9 @@ import { ref } from 'vue'
|
|||
// import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { Clock,View,Folder,Search } from '@element-plus/icons-vue'
|
||||
import FileImage from '@/components/file-image/index.vue'
|
||||
import { getFileSuffix } from '@/utils/ruoyi'
|
||||
import FilePreview from '@/components/thirdFile-preview/index.vue'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import useResoureStore from '../store'
|
||||
import {getImgPath} from "@/api/file/third";
|
||||
|
||||
const userstore = useUserStore()
|
||||
const sourceStore = useResoureStore()
|
||||
|
@ -93,8 +84,7 @@ const sourceStore = useResoureStore()
|
|||
// const userInfo = userstore.user
|
||||
//判断是否预览图片
|
||||
const isViewImg = ref(false)
|
||||
//显示图片的路径
|
||||
const srcList = ref([])
|
||||
const thirdPreview = ref()
|
||||
|
||||
// 分页change
|
||||
const handleSizeChange = (limit) => {
|
||||
|
@ -120,20 +110,9 @@ function timestampToDate(timestamp) {
|
|||
return `${year}-${month}-${day}`;
|
||||
}
|
||||
//获取图片的路径
|
||||
const clickImg = (id) => {
|
||||
srcList.value = []
|
||||
getImgPath({itemId:id}).then(res => {
|
||||
if(res.code === 200){
|
||||
isViewImg.value = true
|
||||
res.data.forEach(item => {
|
||||
item.subsets.forEach(previewItem => {
|
||||
previewItem.previewFiles.forEach(fileItem => {
|
||||
srcList.value.push(fileItem.fileUrl)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
const handleRow = (item) => {
|
||||
isViewImg.value = true
|
||||
thirdPreview.value.init(item.itemId)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue