Compare commits
9 Commits
302c82503a
...
ed3559f34f
Author | SHA1 | Date |
---|---|---|
朱浩 | ed3559f34f | |
yangws | f224f8b048 | |
小杨 | 5790e87a85 | |
yangws | 4b6a7918a9 | |
小杨 | 7e71af0cb7 | |
zouyf | bdc508a0fa | |
“zouyf” | fab449cc96 | |
“zouyf” | 5879f3d5e8 | |
朱浩 | 4d20a27177 |
|
@ -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) => {
|
||||
// 这里取出的是学生完成情况
|
||||
|
|
|
@ -74,28 +74,28 @@
|
|||
|
||||
<div class="title">试题详情</div>
|
||||
<!-- 习题训练 -->
|
||||
<el-card style="max-width: 100%; margin-bottom: 10px; text-align: left;">
|
||||
<el-card class="item-card">
|
||||
<el-row>
|
||||
<el-col :span="24" style="padding: 10px">
|
||||
<!-- 题源、题目标题、题目选项 -->
|
||||
<span>{{ activeExam.worktag }}</span>
|
||||
<span style="margin-left: 4px" v-html="activeExam.titleFormat"></span>
|
||||
<div :span="24" style="padding: 6px" v-html="activeExam.workdescFormat"></div>
|
||||
<span v-html="activeExam.titleFormat"></span>
|
||||
<div :span="24" style="padding: 12px 6px 2px" v-html="activeExam.workdescFormat"></div>
|
||||
<!-- 折叠: 详情分析解答 -->
|
||||
<div class="demo-collapse">
|
||||
<el-collapse v-model="activeExamFlag">
|
||||
<el-collapse v-model="activeExamFlag" class="custom-collapse">
|
||||
<el-collapse-item title="详情分析解答" name="1">
|
||||
<el-row style=" padding: 6px 10px; border: 2px dotted;">
|
||||
<el-row style=" padding: 4px; border: 2px dotted;">
|
||||
<template #default="scope">
|
||||
<el-col :span="2" style="padding: 6px 0px"><em>【答案】</em></el-col>
|
||||
<el-col :span="21" style="padding: 6px 0px" v-html="activeExam.workanswerFormat"></el-col>
|
||||
<el-col :span="2" style="padding: 6px 0px"><em>【分析】</em></el-col>
|
||||
<el-col :span="21" style="padding: 6px 0px" v-html="activeExam.method"></el-col>
|
||||
<el-col :span="2" style="padding: 6px 0px"><em>【解答】</em></el-col>
|
||||
<el-col :span="21" style="padding: 6px 0px" v-html="activeExam.analyse"></el-col>
|
||||
<el-col :span="2" style="padding: 6px 0px"><em>【点评】</em></el-col>
|
||||
<el-col :span="21" style="padding: 6px 0px" v-html="activeExam.discuss"></el-col>
|
||||
<!-- <el-col :span="21" style="padding: 6px 0px" v-html="dataList[activeTopic-1].def.discuss"></el-col> -->
|
||||
<el-col :span="3" style="padding: 4px 0px"><em>【答案】</em></el-col>
|
||||
<el-col :span="21" style="padding: 4px 0px" v-html="activeExam.workanswerFormat"></el-col>
|
||||
<el-col :span="3" style="padding: 4px 0px"><em>【分析】</em></el-col>
|
||||
<el-col :span="21" style="padding: 4px 0px" v-html="activeExam.method"></el-col>
|
||||
<el-col :span="3" style="padding: 4px 0px"><em>【解答】</em></el-col>
|
||||
<el-col :span="21" style="padding: 4px 0px" v-html="activeExam.analyse"></el-col>
|
||||
<el-col :span="3" style="padding: 4px 0px"><em>【点评】</em></el-col>
|
||||
<el-col :span="21" style="padding: 4px 0px" v-html="activeExam.discuss"></el-col>
|
||||
<!-- <el-col :span="21" style="padding: 4px 0px" v-html="dataList[activeTopic-1].def.discuss"></el-col> -->
|
||||
</template>
|
||||
</el-row>
|
||||
</el-collapse-item>
|
||||
|
@ -433,6 +433,17 @@ watchEffect(() => { initData() })
|
|||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.item-card {
|
||||
max-width: 100%;
|
||||
margin-bottom: 10px;
|
||||
text-align: left;
|
||||
font-size: 18px;
|
||||
|
||||
:deep(.el-collapse-item__content){
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -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){
|
||||
const handleRow = (item) => {
|
||||
isViewImg.value = true
|
||||
res.data.forEach(item => {
|
||||
item.subsets.forEach(previewItem => {
|
||||
previewItem.previewFiles.forEach(fileItem => {
|
||||
srcList.value.push(fileItem.fileUrl)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
thirdPreview.value.init(item.itemId)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue