|
|
|
|
@ -1,265 +1,183 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
<div class="study_main">
|
|
|
|
|
<div class="study_main_up">
|
|
|
|
|
<div class="study_main_up_top">
|
|
|
|
|
<div class="study_main_up_left">
|
|
|
|
|
<img src="../../assets/icons/svg/score.svg" />
|
|
|
|
|
<span style="color:#FFFFFF">得分情况</span>
|
|
|
|
|
</div>
|
|
|
|
|
<el-button type="primary" :icon="Refresh" round @click="updateReportGrade">更新</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="study_main_up_foot">
|
|
|
|
|
<el-table
|
|
|
|
|
:data="tableData4"
|
|
|
|
|
:span-method="tableSpanMethod"
|
|
|
|
|
stripe
|
|
|
|
|
border
|
|
|
|
|
:header-cell-style="{background: '#A2C9FF'}"
|
|
|
|
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column prop="sid" label="序号" width="80" align="center" />
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="learningProjects"
|
|
|
|
|
label="学习项目"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="assessmentItems"
|
|
|
|
|
label="考核项目"
|
|
|
|
|
width="150"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="scoringCriteria"
|
|
|
|
|
label="计分标准"
|
|
|
|
|
width="314"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="totalScore"
|
|
|
|
|
label="总分"
|
|
|
|
|
width="129"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="scoreWeight"
|
|
|
|
|
label="成绩权重"
|
|
|
|
|
width="129"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="completionStatus"
|
|
|
|
|
label="完成情况"
|
|
|
|
|
width="225"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="schedule"
|
|
|
|
|
label="进度"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="scoreProject"
|
|
|
|
|
label="得分"
|
|
|
|
|
width="131"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="study_main_but">
|
|
|
|
|
<div class="study_main_but_left">
|
|
|
|
|
<img src="../../assets/icons/svg/sxbg.svg" />
|
|
|
|
|
<span style="color:#FFFFFF">实训报告</span>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- action="http://qkljr.sztzjy.com:90/api/stu/concept/block/upload" -->
|
|
|
|
|
|
|
|
|
|
<el-upload
|
|
|
|
|
ref="uploadRef"
|
|
|
|
|
class="upload-demo"
|
|
|
|
|
:file-list="fileList"
|
|
|
|
|
:auto-upload="false"
|
|
|
|
|
:on-change="handleChange"
|
|
|
|
|
:show-file-list="false"
|
|
|
|
|
multiple="multiple"
|
|
|
|
|
>
|
|
|
|
|
<template #trigger>
|
|
|
|
|
<el-button color="#626aef" round ><el-icon><UploadFilled /></el-icon>点击上传</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- <div class="reportPromptFile" v-html="item[`${index}`].path"></div> -->
|
|
|
|
|
</el-upload>
|
|
|
|
|
<div class="study_main_but_foot">
|
|
|
|
|
<el-table
|
|
|
|
|
:data="tableData2"
|
|
|
|
|
stripe
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
border
|
|
|
|
|
:header-cell-style="{background: '#A2C9FF'}"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="reportName"
|
|
|
|
|
label="报告名称"
|
|
|
|
|
width="289"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="uploadTime"
|
|
|
|
|
label="上传时间"
|
|
|
|
|
width="289"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="size"
|
|
|
|
|
label="文件大小"
|
|
|
|
|
width="290"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="rating"
|
|
|
|
|
label="评分"
|
|
|
|
|
width="289"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="操作"
|
|
|
|
|
class="controls"
|
|
|
|
|
width="286"
|
|
|
|
|
align="center"
|
|
|
|
|
>
|
|
|
|
|
<el-link type="success" @click="uploadReport"><el-icon><Download /></el-icon>下载</el-link>
|
|
|
|
|
<el-link type="warning" @click="showComments"><el-icon><Tickets /></el-icon>查看评语</el-link>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
v-model="dialogVisible"
|
|
|
|
|
title="评语"
|
|
|
|
|
width="30%"
|
|
|
|
|
:before-close="handleClose"
|
|
|
|
|
>
|
|
|
|
|
<span>{{tableData2[0].teacherComments}}</span>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<span class="dialog-footer">
|
|
|
|
|
<el-button @click="dialogVisible = false">确定</el-button>
|
|
|
|
|
<!-- <el-button type="primary" @click="dialogVisible = false">
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
<div class="study_main">
|
|
|
|
|
<div class="study_main_up">
|
|
|
|
|
<div class="study_main_up_top">
|
|
|
|
|
<div class="study_main_up_left">
|
|
|
|
|
<img src="../../assets/icons/svg/score.svg" />
|
|
|
|
|
<span style="color: #ffffff">得分情况</span>
|
|
|
|
|
</div>
|
|
|
|
|
<el-button type="primary" :icon="Refresh" round @click="updateReportGrade">更新</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="study_main_up_foot">
|
|
|
|
|
<el-table :data="tableData4" :span-method="tableSpanMethod" stripe border :header-cell-style="{ background: '#A2C9FF' }" style="width: 100%">
|
|
|
|
|
<el-table-column prop="sid" label="序号" width="80" align="center" />
|
|
|
|
|
<el-table-column prop="learningProjects" label="学习项目" align="center" />
|
|
|
|
|
<el-table-column prop="assessmentItems" label="考核项目" width="150" align="center" />
|
|
|
|
|
<el-table-column prop="scoringCriteria" label="计分标准" width="314" align="center" />
|
|
|
|
|
<el-table-column prop="totalScore" label="总分" width="129" align="center" />
|
|
|
|
|
<el-table-column prop="scoreWeight" label="成绩权重" width="129" align="center" />
|
|
|
|
|
<el-table-column prop="completionStatus" label="完成情况" width="225" align="center" />
|
|
|
|
|
<el-table-column prop="schedule" label="进度" align="center" />
|
|
|
|
|
<el-table-column prop="scoreProject" label="得分" width="131" align="center" />
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="study_main_but">
|
|
|
|
|
<div class="study_main_but_left">
|
|
|
|
|
<img src="../../assets/icons/svg/sxbg.svg" />
|
|
|
|
|
<span style="color: #ffffff">实训报告</span>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- action="http://qkljr.sztzjy.com:90/api/stu/concept/block/upload" -->
|
|
|
|
|
|
|
|
|
|
<el-upload ref="uploadRef" class="upload-demo" :file-list="fileList" :auto-upload="false" :on-change="handleChange" :show-file-list="false" multiple="multiple">
|
|
|
|
|
<template #trigger>
|
|
|
|
|
<el-button color="#626aef" round>
|
|
|
|
|
<el-icon><UploadFilled /></el-icon>
|
|
|
|
|
点击上传
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- <div class="reportPromptFile" v-html="item[`${index}`].path"></div> -->
|
|
|
|
|
</el-upload>
|
|
|
|
|
<div class="study_main_but_foot">
|
|
|
|
|
<el-table :data="tableData2" stripe style="width: 100%" border :header-cell-style="{ background: '#A2C9FF' }">
|
|
|
|
|
<el-table-column prop="reportName" label="报告名称" width="289" align="center" />
|
|
|
|
|
<el-table-column prop="uploadTime" label="上传时间" width="289" align="center" />
|
|
|
|
|
<el-table-column prop="size" label="文件大小" width="290" align="center" />
|
|
|
|
|
<el-table-column prop="rating" label="评分" width="289" align="center" />
|
|
|
|
|
<el-table-column label="操作" class="controls" width="286" align="center">
|
|
|
|
|
<el-link type="success" @click="uploadReport">
|
|
|
|
|
<el-icon><Download /></el-icon>
|
|
|
|
|
下载
|
|
|
|
|
</el-link>
|
|
|
|
|
<el-link type="warning" @click="showComments">
|
|
|
|
|
<el-icon><Tickets /></el-icon>
|
|
|
|
|
查看评语
|
|
|
|
|
</el-link>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<el-dialog v-model="dialogVisible" title="评语" width="30%" :before-close="handleClose">
|
|
|
|
|
<span>{{ tableData2[0].teacherComments }}</span>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<span class="dialog-footer">
|
|
|
|
|
<el-button @click="dialogVisible = false">确定</el-button>
|
|
|
|
|
<!-- <el-button type="primary" @click="dialogVisible = false">
|
|
|
|
|
Confirm
|
|
|
|
|
</el-button> -->
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</template>
|
|
|
|
|
<script setup>
|
|
|
|
|
import { Refresh } from "@element-plus/icons-vue";
|
|
|
|
|
import { onMounted, ref } from "vue";
|
|
|
|
|
import * as API from "@/api/prtrait/prtrait.js"
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</template>
|
|
|
|
|
<script setup>
|
|
|
|
|
import { Refresh } from "@element-plus/icons-vue";
|
|
|
|
|
import { onMounted, ref } from "vue";
|
|
|
|
|
import * as API from "@/api/prtrait/prtrait.js";
|
|
|
|
|
// import {Base64} from 'js-base64'
|
|
|
|
|
// import { useRouter } from "vue-router";
|
|
|
|
|
import {download} from '@/utils/request.js'
|
|
|
|
|
import { getToken,getUserInfo } from '@/utils/auth'
|
|
|
|
|
import { ElMessage } from "element-plus";
|
|
|
|
|
|
|
|
|
|
import { download } from "@/utils/request.js";
|
|
|
|
|
import { getToken, getUserInfo } from "@/utils/auth";
|
|
|
|
|
import { ElMessage } from "element-plus";
|
|
|
|
|
|
|
|
|
|
// const router=useRouter();
|
|
|
|
|
//评语弹窗
|
|
|
|
|
const dialogVisible = ref(false)
|
|
|
|
|
|
|
|
|
|
const tableSpanMethod = computed(() => {
|
|
|
|
|
// if (tableData.value.length >= 5) {
|
|
|
|
|
if (tableData4.value.length >= 6) {
|
|
|
|
|
return arraySpanMethod;
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
});
|
|
|
|
|
const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
|
|
|
|
if (rowIndex === tableData4.value.length - 1) {
|
|
|
|
|
if (columnIndex === 0) {
|
|
|
|
|
return [1, 5];
|
|
|
|
|
} else if (columnIndex === 1) {
|
|
|
|
|
return [0, 0];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const tableData2 =ref([])
|
|
|
|
|
const tableData=ref([])
|
|
|
|
|
const tableData4=ref([
|
|
|
|
|
{
|
|
|
|
|
sid:1,
|
|
|
|
|
assessmentItems:"阅读知识",
|
|
|
|
|
learningProjects:"知识概要",
|
|
|
|
|
scoreProject:null,
|
|
|
|
|
scoreWeight:null,
|
|
|
|
|
scoringCriteria:"",
|
|
|
|
|
schedule:'0%',
|
|
|
|
|
totalScore:100
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
sid:2,
|
|
|
|
|
assessmentItems:"观看资源",
|
|
|
|
|
learningProjects:"资源学习",
|
|
|
|
|
scoreProject:null,
|
|
|
|
|
scoreWeight:null,
|
|
|
|
|
scoringCriteria:"",
|
|
|
|
|
schedule:'0%',
|
|
|
|
|
totalScore:100
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
sid:3,
|
|
|
|
|
assessmentItems:"客观题测试",
|
|
|
|
|
learningProjects:"学习测评",
|
|
|
|
|
scoreProject:null,
|
|
|
|
|
scoreWeight:null,
|
|
|
|
|
scoringCriteria:"",
|
|
|
|
|
schedule:'0%',
|
|
|
|
|
totalScore:100
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
sid:4,
|
|
|
|
|
assessmentItems:"输错/选错次数",
|
|
|
|
|
learningProjects:"实验实训",
|
|
|
|
|
scoreProject:null,
|
|
|
|
|
scoreWeight:null,
|
|
|
|
|
scoringCriteria:"",
|
|
|
|
|
schedule:'0%',
|
|
|
|
|
totalScore:100
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
sid:5,
|
|
|
|
|
assessmentItems:"",
|
|
|
|
|
learningProjects:"实训报告",
|
|
|
|
|
scoreProject:null,
|
|
|
|
|
scoreWeight:null,
|
|
|
|
|
scoringCriteria:"",
|
|
|
|
|
schedule:'0%',
|
|
|
|
|
totalScore:100
|
|
|
|
|
},
|
|
|
|
|
])
|
|
|
|
|
const calculateAverageScore=()=>{
|
|
|
|
|
|
|
|
|
|
// 计算每个对象的权重乘以得分,并存储在一个新数组中
|
|
|
|
|
const weightedScores = tableData4.value.map(item => {
|
|
|
|
|
if(item.scoreProject!==null){
|
|
|
|
|
// 解析权重字符串,去掉百分号并转换为数字
|
|
|
|
|
const weight = parseFloat(item.scoreWeight.replace('%', ''))/100;
|
|
|
|
|
// 解析得分字符串并转换为数字
|
|
|
|
|
const score = parseFloat(item.scoreProject);
|
|
|
|
|
// 计算权重乘以得分
|
|
|
|
|
const weightedScore = weight * score;
|
|
|
|
|
return weightedScore;
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 使用 reduce 方法计算新数组中所有元素的总和
|
|
|
|
|
const totalWeightedScore = weightedScores.reduce((acc, curr) => acc + curr, 0);
|
|
|
|
|
// 最终结果是总和乘以5
|
|
|
|
|
const finalResult = totalWeightedScore;
|
|
|
|
|
const finalResult1=String(finalResult.toFixed())
|
|
|
|
|
const newData = {
|
|
|
|
|
//评语弹窗
|
|
|
|
|
const dialogVisible = ref(false);
|
|
|
|
|
|
|
|
|
|
const tableSpanMethod = computed(() => {
|
|
|
|
|
// if (tableData.value.length >= 5) {
|
|
|
|
|
if (tableData4.value.length >= 6) {
|
|
|
|
|
return arraySpanMethod;
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
});
|
|
|
|
|
const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
|
|
|
|
if (rowIndex === tableData4.value.length - 1) {
|
|
|
|
|
if (columnIndex === 0) {
|
|
|
|
|
return [1, 5];
|
|
|
|
|
} else if (columnIndex === 1) {
|
|
|
|
|
return [0, 0];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const tableData2 = ref([]);
|
|
|
|
|
const tableData = ref([]);
|
|
|
|
|
const tableData4 = ref([
|
|
|
|
|
{
|
|
|
|
|
sid: 1,
|
|
|
|
|
assessmentItems: "阅读知识",
|
|
|
|
|
learningProjects: "知识概要",
|
|
|
|
|
scoreProject: null,
|
|
|
|
|
scoreWeight: null,
|
|
|
|
|
scoringCriteria: "",
|
|
|
|
|
schedule: "0%",
|
|
|
|
|
totalScore: 100,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
sid: 2,
|
|
|
|
|
assessmentItems: "观看资源",
|
|
|
|
|
learningProjects: "资源学习",
|
|
|
|
|
scoreProject: null,
|
|
|
|
|
scoreWeight: null,
|
|
|
|
|
scoringCriteria: "",
|
|
|
|
|
schedule: "0%",
|
|
|
|
|
totalScore: 100,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
sid: 3,
|
|
|
|
|
assessmentItems: "客观题测试",
|
|
|
|
|
learningProjects: "学习测评",
|
|
|
|
|
scoreProject: null,
|
|
|
|
|
scoreWeight: null,
|
|
|
|
|
scoringCriteria: "",
|
|
|
|
|
schedule: "0%",
|
|
|
|
|
totalScore: 100,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
sid: 4,
|
|
|
|
|
assessmentItems: "输错/选错次数",
|
|
|
|
|
learningProjects: "实验实训",
|
|
|
|
|
scoreProject: null,
|
|
|
|
|
scoreWeight: null,
|
|
|
|
|
scoringCriteria: "",
|
|
|
|
|
schedule: "0%",
|
|
|
|
|
totalScore: 100,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
sid: 5,
|
|
|
|
|
assessmentItems: "",
|
|
|
|
|
learningProjects: "实训报告",
|
|
|
|
|
scoreProject: null,
|
|
|
|
|
scoreWeight: null,
|
|
|
|
|
scoringCriteria: "",
|
|
|
|
|
schedule: "0%",
|
|
|
|
|
totalScore: 100,
|
|
|
|
|
},
|
|
|
|
|
]);
|
|
|
|
|
const calculateAverageScore = () => {
|
|
|
|
|
// 计算每个对象的权重乘以得分,并存储在一个新数组中
|
|
|
|
|
const weightedScores = tableData4.value.map((item) => {
|
|
|
|
|
if (item.scoreProject !== null) {
|
|
|
|
|
// 解析权重字符串,去掉百分号并转换为数字
|
|
|
|
|
const weight = parseFloat(item.scoreWeight.replace("%", "")) / 100;
|
|
|
|
|
// 解析得分字符串并转换为数字
|
|
|
|
|
const score = parseFloat(item.scoreProject);
|
|
|
|
|
// 计算权重乘以得分
|
|
|
|
|
const weightedScore = weight * score;
|
|
|
|
|
return weightedScore;
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 使用 reduce 方法计算新数组中所有元素的总和
|
|
|
|
|
const totalWeightedScore = weightedScores.reduce((acc, curr) => acc + curr, 0);
|
|
|
|
|
// 最终结果是总和乘以5
|
|
|
|
|
const finalResult = totalWeightedScore;
|
|
|
|
|
const finalResult1 = String(finalResult.toFixed());
|
|
|
|
|
const newData = {
|
|
|
|
|
sid: "合计",
|
|
|
|
|
project: "",
|
|
|
|
|
assessmentItems: "100%",
|
|
|
|
|
@ -268,247 +186,241 @@
|
|
|
|
|
weight: "",
|
|
|
|
|
condition: "",
|
|
|
|
|
score: "",
|
|
|
|
|
}
|
|
|
|
|
tableData4.value.push(newData)
|
|
|
|
|
}
|
|
|
|
|
const fileList=ref([])
|
|
|
|
|
const data=ref({
|
|
|
|
|
"ascription":'',
|
|
|
|
|
"userId":JSON.parse(getUserInfo()).userId,
|
|
|
|
|
"schoolId":JSON.parse(getUserInfo()).schoolId
|
|
|
|
|
})
|
|
|
|
|
const handleChange =(info)=> {
|
|
|
|
|
fileList.value.push(info);
|
|
|
|
|
let formData2 = new FormData();
|
|
|
|
|
formData2.append("file", fileList.value[0].raw)
|
|
|
|
|
formData2.append("stuBlockProduct", JSON.stringify(data.value))
|
|
|
|
|
fileList.value.splice(0, fileList.value.length);
|
|
|
|
|
API.uploadTrainingReport(formData2).then(()=>{
|
|
|
|
|
getReports()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const uploadRef = ref(null);
|
|
|
|
|
|
|
|
|
|
const getReports=()=>{
|
|
|
|
|
API.getDetailsTrainingReport(data.value).then((res)=>{
|
|
|
|
|
tableData2.value.splice(0, tableData2.value.length);
|
|
|
|
|
if(res.data!==null){
|
|
|
|
|
tableData2.value.push(res.data)
|
|
|
|
|
tableData2.value[0].size=tableData2.value[0].size+"kb"
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const data2={
|
|
|
|
|
"userId":JSON.parse(getUserInfo()).userId,
|
|
|
|
|
"TOKEN":'Bearer '+getToken()
|
|
|
|
|
}
|
|
|
|
|
//下载
|
|
|
|
|
const uploadReport=async()=>{
|
|
|
|
|
};
|
|
|
|
|
tableData4.value.push(newData);
|
|
|
|
|
};
|
|
|
|
|
const fileList = ref([]);
|
|
|
|
|
const data = ref({
|
|
|
|
|
ascription: "",
|
|
|
|
|
userId: JSON.parse(getUserInfo()).userId,
|
|
|
|
|
schoolId: JSON.parse(getUserInfo()).schoolId,
|
|
|
|
|
});
|
|
|
|
|
const handleChange = (info) => {
|
|
|
|
|
fileList.value.push(info);
|
|
|
|
|
let formData2 = new FormData();
|
|
|
|
|
formData2.append("file", fileList.value[0].raw);
|
|
|
|
|
formData2.append("stuBlockProduct", JSON.stringify(data.value));
|
|
|
|
|
fileList.value.splice(0, fileList.value.length);
|
|
|
|
|
API.uploadTrainingReport(formData2).then(() => {
|
|
|
|
|
getReports();
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
const uploadRef = ref(null);
|
|
|
|
|
|
|
|
|
|
const getReports = () => {
|
|
|
|
|
API.getDetailsTrainingReport(data.value).then((res) => {
|
|
|
|
|
tableData2.value.splice(0, tableData2.value.length);
|
|
|
|
|
if (res.data !== null) {
|
|
|
|
|
tableData2.value.push(res.data);
|
|
|
|
|
tableData2.value[0].size = tableData2.value[0].size + "kb";
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
window.open(`http://118.31.7.2:7899/api/stu/concept/block/download?TOKEN= ${'Bearer '+getToken()}&userId=${data2.userId}`)
|
|
|
|
|
// window.open(`http://202.97.179.126:8800/api/stu/concept/block/download?reportName=${tableData2.value[0].reportName}&TOKEN= ${'Bearer '+getToken()}&module=${data2.module}&userId=${data.userId}`)
|
|
|
|
|
// window.open(`http://202.199.90.115:8800/api/stu/concept/block/download?reportName=${tableData2.value[0].reportName}&TOKEN= ${'Bearer '+getToken()}&module=${data2.module}&userId=${data.userId}`)
|
|
|
|
|
}
|
|
|
|
|
const isUpdate=ref(false)
|
|
|
|
|
//查看评语
|
|
|
|
|
const showComments=()=>{
|
|
|
|
|
if(tableData2.value.length<=0){
|
|
|
|
|
ElMessage({
|
|
|
|
|
message: "暂无评语",
|
|
|
|
|
type: "warning",
|
|
|
|
|
});
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
dialogVisible.value=true
|
|
|
|
|
}
|
|
|
|
|
onMounted(()=>{
|
|
|
|
|
const data2 = {
|
|
|
|
|
userId: JSON.parse(getUserInfo()).userId,
|
|
|
|
|
TOKEN: "Bearer " + getToken(),
|
|
|
|
|
};
|
|
|
|
|
//下载
|
|
|
|
|
const uploadReport = async () => {
|
|
|
|
|
window.open(`http://118.31.7.2:7899/api/stu/concept/block/download?TOKEN= ${"Bearer " + getToken()}&userId=${data2.userId}`);
|
|
|
|
|
// window.open(`http://202.97.179.126:8800/api/stu/concept/block/download?reportName=${tableData2.value[0].reportName}&TOKEN= ${'Bearer '+getToken()}&module=${data2.module}&userId=${data.userId}`)
|
|
|
|
|
// window.open(`http://202.199.90.115:8800/api/stu/concept/block/download?reportName=${tableData2.value[0].reportName}&TOKEN= ${'Bearer '+getToken()}&module=${data2.module}&userId=${data.userId}`)
|
|
|
|
|
};
|
|
|
|
|
const isUpdate = ref(false);
|
|
|
|
|
//查看评语
|
|
|
|
|
const showComments = () => {
|
|
|
|
|
if (tableData2.value.length <= 0) {
|
|
|
|
|
ElMessage({
|
|
|
|
|
message: "暂无评语",
|
|
|
|
|
type: "warning",
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
dialogVisible.value = true;
|
|
|
|
|
};
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
// data.value.module='数字营销'
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
cerateGrade()
|
|
|
|
|
}, 300);
|
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
getReports()
|
|
|
|
|
}, 600);
|
|
|
|
|
})
|
|
|
|
|
const cerateGrade=()=>{
|
|
|
|
|
API.academicRecordEnquiry(data.value).then((res)=>{
|
|
|
|
|
let currentId =1
|
|
|
|
|
const tableData3 = res.data.map(item => {
|
|
|
|
|
const weight1 = parseInt(item.scoreWeight*100)
|
|
|
|
|
const weight2 = `${weight1}%`;
|
|
|
|
|
if(item.learningProjects==="知识概要"){
|
|
|
|
|
const score=parseFloat(item.scoringCriteria)
|
|
|
|
|
const time = reactive({value: '/'});
|
|
|
|
|
if(item.completionStatus!==null){
|
|
|
|
|
time.value=parseFloat(item.completionStatus)
|
|
|
|
|
}
|
|
|
|
|
tableData4.value[0].scoringCriteria=`阅读1分钟得${score}分,1分钟以下不得分`
|
|
|
|
|
tableData4.value[0].completionStatus=`阅读${time.value}分钟`
|
|
|
|
|
tableData4.value[0].scoreProject=item.scoreProject
|
|
|
|
|
tableData4.value[0].scoreWeight=weight2
|
|
|
|
|
tableData4.value[0].schedule=item.schedule+'%'
|
|
|
|
|
}
|
|
|
|
|
if(item.learningProjects==="实验实训"){
|
|
|
|
|
const score=parseFloat(item.scoringCriteria)
|
|
|
|
|
const time = reactive({value: '/'});
|
|
|
|
|
if(item.completionStatus!==null){
|
|
|
|
|
time.value=parseFloat(item.completionStatus)
|
|
|
|
|
}
|
|
|
|
|
tableData4.value[3].scoringCriteria=`输错/选错次数扣${score}分`
|
|
|
|
|
tableData4.value[3].completionStatus=`输错/选错 ${time.value}次`
|
|
|
|
|
tableData4.value[3].scoreProject=item.scoreProject
|
|
|
|
|
tableData4.value[3].scoreWeight=weight2
|
|
|
|
|
tableData4.value[3].schedule=item.schedule+'%'
|
|
|
|
|
}
|
|
|
|
|
if(item.learningProjects==="资源学习"){
|
|
|
|
|
const score=parseFloat(item.scoringCriteria)
|
|
|
|
|
const time = reactive({value: '/'});
|
|
|
|
|
if(item.completionStatus!==null){
|
|
|
|
|
time.value=parseFloat(item.completionStatus)
|
|
|
|
|
}
|
|
|
|
|
tableData4.value[1].scoringCriteria=`观看资源1分钟得${score}分`
|
|
|
|
|
tableData4.value[1].completionStatus=`观看${time.value}分钟`
|
|
|
|
|
tableData4.value[1].scoreProject=item.scoreProject
|
|
|
|
|
tableData4.value[1].scoreWeight=weight2
|
|
|
|
|
tableData4.value[1].schedule=item.schedule+'%'
|
|
|
|
|
}
|
|
|
|
|
if(item.learningProjects==="学习测评"){
|
|
|
|
|
const time = reactive({value: '/'});
|
|
|
|
|
if(item.completionStatus!==null){
|
|
|
|
|
time.value=parseFloat(item.completionStatus)
|
|
|
|
|
}
|
|
|
|
|
const score=parseFloat(item.scoringCriteria)
|
|
|
|
|
tableData4.value[2].scoringCriteria=`${score}分/道`
|
|
|
|
|
tableData4.value[2].completionStatus=`错${time.value}道`
|
|
|
|
|
tableData4.value[2].scoreProject=item.scoreProject
|
|
|
|
|
tableData4.value[2].scoreWeight=weight2
|
|
|
|
|
tableData4.value[2].schedule=item.schedule+'%'
|
|
|
|
|
}
|
|
|
|
|
if(item.learningProjects==="实训报告"){
|
|
|
|
|
tableData4.value[4].scoringCriteria=`提交实训报告,教师评分`
|
|
|
|
|
tableData4.value[4].completionStatus=item.completionStatus
|
|
|
|
|
if(item.scoreProject!==null){
|
|
|
|
|
tableData4.value[4].scoreProject=item.scoreProject
|
|
|
|
|
}
|
|
|
|
|
tableData4.value[4].scoreWeight=weight2
|
|
|
|
|
tableData4.value[4].schedule=item.schedule+'%'
|
|
|
|
|
}
|
|
|
|
|
return {
|
|
|
|
|
...item
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
if(isUpdate.value){
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
tableData.value.push(...tableData3)
|
|
|
|
|
calculateAverageScore()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const updateReportGrade=()=>{
|
|
|
|
|
getReports()
|
|
|
|
|
cerateGrade()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.study_main {
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
width: 1443px;
|
|
|
|
|
.study_main_up {
|
|
|
|
|
.el-button {
|
|
|
|
|
margin-right: 0px;
|
|
|
|
|
height: 28px;
|
|
|
|
|
width: 125px;
|
|
|
|
|
background: #0E64FE;
|
|
|
|
|
}
|
|
|
|
|
.study_main_up_top {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
.study_main_up_left{
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
display: flex;
|
|
|
|
|
span{
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
img {
|
|
|
|
|
width: 30px !important;
|
|
|
|
|
height: 30px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.study_main_but {
|
|
|
|
|
margin-top: 25px;
|
|
|
|
|
.study_main_but_left {
|
|
|
|
|
align-items: center;
|
|
|
|
|
display: flex;
|
|
|
|
|
span{
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
}
|
|
|
|
|
img {
|
|
|
|
|
width: 30px;
|
|
|
|
|
height: 30px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.upload-demo{
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
.el-button {
|
|
|
|
|
margin-right: 0px;
|
|
|
|
|
height: 30px;
|
|
|
|
|
width: 125px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.is-underline:nth-child(1){
|
|
|
|
|
margin-left: 26px;
|
|
|
|
|
}
|
|
|
|
|
.is-underline:nth-child(2){
|
|
|
|
|
margin-left: 36px;
|
|
|
|
|
}
|
|
|
|
|
.study_main_but_foot{
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 设置表格行高度
|
|
|
|
|
:deep(.el-table__body tr,
|
|
|
|
|
.el-table__body td) {
|
|
|
|
|
padding: 0;
|
|
|
|
|
height: 40px !important;
|
|
|
|
|
border: 2px solid #8CA4EC;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-table__body tr:nth-child(6),
|
|
|
|
|
.el-table__body td) {
|
|
|
|
|
padding: 0;
|
|
|
|
|
height: 40px !important;
|
|
|
|
|
color: #FF8C01;
|
|
|
|
|
}
|
|
|
|
|
::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td {
|
|
|
|
|
background: #F2F5FB;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .study_main_up_foot .el-table {
|
|
|
|
|
--el-table-border-color: #8CA4EC;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .study_main_but_foot .el-table {
|
|
|
|
|
--el-table-border-color: #9E74FF;
|
|
|
|
|
}
|
|
|
|
|
::v-deep .el-table__header-wrapper{
|
|
|
|
|
background: red;
|
|
|
|
|
}
|
|
|
|
|
.reportPromptFile{
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
line-height: 7px;
|
|
|
|
|
font-family: '微软雅黑';
|
|
|
|
|
font-weight: 300;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
cerateGrade();
|
|
|
|
|
}, 300);
|
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
getReports();
|
|
|
|
|
}, 600);
|
|
|
|
|
});
|
|
|
|
|
const cerateGrade = () => {
|
|
|
|
|
API.academicRecordEnquiry(data.value).then((res) => {
|
|
|
|
|
let currentId = 1;
|
|
|
|
|
const tableData3 = res.data.map((item) => {
|
|
|
|
|
const weight1 = parseInt(item.scoreWeight * 100);
|
|
|
|
|
const weight2 = `${weight1}%`;
|
|
|
|
|
if (item.learningProjects === "知识概要") {
|
|
|
|
|
const score = parseFloat(item.scoringCriteria);
|
|
|
|
|
const time = reactive({ value: "/" });
|
|
|
|
|
if (item.completionStatus !== null) {
|
|
|
|
|
time.value = parseFloat(item.completionStatus);
|
|
|
|
|
}
|
|
|
|
|
tableData4.value[0].scoringCriteria = `阅读1分钟得${score}分,1分钟以下不得分`;
|
|
|
|
|
tableData4.value[0].completionStatus = `阅读${time.value}分钟`;
|
|
|
|
|
tableData4.value[0].scoreProject = item.scoreProject;
|
|
|
|
|
tableData4.value[0].scoreWeight = weight2;
|
|
|
|
|
tableData4.value[0].schedule = item.schedule + "%";
|
|
|
|
|
}
|
|
|
|
|
if (item.learningProjects === "实验实训") {
|
|
|
|
|
const score = parseFloat(item.scoringCriteria);
|
|
|
|
|
const time = reactive({ value: "/" });
|
|
|
|
|
if (item.completionStatus !== null) {
|
|
|
|
|
time.value = parseFloat(item.completionStatus);
|
|
|
|
|
}
|
|
|
|
|
tableData4.value[3].scoringCriteria = `输错/选错次数扣${score}分`;
|
|
|
|
|
tableData4.value[3].completionStatus = `输错/选错 ${time.value}次`;
|
|
|
|
|
tableData4.value[3].scoreProject = item.scoreProject;
|
|
|
|
|
tableData4.value[3].scoreWeight = weight2;
|
|
|
|
|
tableData4.value[3].schedule = item.schedule + "%";
|
|
|
|
|
}
|
|
|
|
|
if (item.learningProjects === "资源学习") {
|
|
|
|
|
const score = parseFloat(item.scoringCriteria);
|
|
|
|
|
const time = reactive({ value: "/" });
|
|
|
|
|
if (item.completionStatus !== null) {
|
|
|
|
|
time.value = parseFloat(item.completionStatus);
|
|
|
|
|
}
|
|
|
|
|
tableData4.value[1].scoringCriteria = `观看资源1分钟得${score}分`;
|
|
|
|
|
tableData4.value[1].completionStatus = `观看${time.value}分钟`;
|
|
|
|
|
tableData4.value[1].scoreProject = item.scoreProject;
|
|
|
|
|
tableData4.value[1].scoreWeight = weight2;
|
|
|
|
|
tableData4.value[1].schedule = item.schedule + "%";
|
|
|
|
|
}
|
|
|
|
|
if (item.learningProjects === "学习测评") {
|
|
|
|
|
const time = reactive({ value: "/" });
|
|
|
|
|
if (item.completionStatus !== null) {
|
|
|
|
|
time.value = parseFloat(item.completionStatus);
|
|
|
|
|
}
|
|
|
|
|
const score = parseFloat(item.scoringCriteria);
|
|
|
|
|
tableData4.value[2].scoringCriteria = `${score}分/道`;
|
|
|
|
|
tableData4.value[2].completionStatus = `错${time.value}道`;
|
|
|
|
|
tableData4.value[2].scoreProject = item.scoreProject;
|
|
|
|
|
tableData4.value[2].scoreWeight = weight2;
|
|
|
|
|
tableData4.value[2].schedule = item.schedule + "%";
|
|
|
|
|
}
|
|
|
|
|
if (item.learningProjects === "实训报告") {
|
|
|
|
|
tableData4.value[4].scoringCriteria = `提交实训报告,教师评分`;
|
|
|
|
|
tableData4.value[4].completionStatus = item.completionStatus;
|
|
|
|
|
if (item.scoreProject !== null) {
|
|
|
|
|
tableData4.value[4].scoreProject = item.scoreProject;
|
|
|
|
|
}
|
|
|
|
|
tableData4.value[4].scoreWeight = weight2;
|
|
|
|
|
tableData4.value[4].schedule = item.schedule + "%";
|
|
|
|
|
}
|
|
|
|
|
return {
|
|
|
|
|
...item,
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
if (isUpdate.value) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
tableData.value.push(...tableData3);
|
|
|
|
|
calculateAverageScore();
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const updateReportGrade = () => {
|
|
|
|
|
getReports();
|
|
|
|
|
cerateGrade();
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.study_main {
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
width: 1443px;
|
|
|
|
|
.study_main_up {
|
|
|
|
|
.el-button {
|
|
|
|
|
margin-right: 0px;
|
|
|
|
|
height: 28px;
|
|
|
|
|
width: 125px;
|
|
|
|
|
background: #0e64fe;
|
|
|
|
|
}
|
|
|
|
|
.study_main_up_top {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
.study_main_up_left {
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
display: flex;
|
|
|
|
|
span {
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
img {
|
|
|
|
|
width: 30px !important;
|
|
|
|
|
height: 30px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.study_main_but {
|
|
|
|
|
margin-top: 25px;
|
|
|
|
|
.study_main_but_left {
|
|
|
|
|
align-items: center;
|
|
|
|
|
display: flex;
|
|
|
|
|
span {
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
}
|
|
|
|
|
img {
|
|
|
|
|
width: 30px;
|
|
|
|
|
height: 30px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.upload-demo {
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
.el-button {
|
|
|
|
|
margin-right: 0px;
|
|
|
|
|
height: 30px;
|
|
|
|
|
width: 125px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.is-underline:nth-child(1) {
|
|
|
|
|
margin-left: 26px;
|
|
|
|
|
}
|
|
|
|
|
.is-underline:nth-child(2) {
|
|
|
|
|
margin-left: 36px;
|
|
|
|
|
}
|
|
|
|
|
.study_main_but_foot {
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 设置表格行高度
|
|
|
|
|
:deep(.el-table__body tr, .el-table__body td) {
|
|
|
|
|
padding: 0;
|
|
|
|
|
height: 40px !important;
|
|
|
|
|
border: 2px solid #8ca4ec;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.el-table__body tr:nth-child(6), .el-table__body td) {
|
|
|
|
|
padding: 0;
|
|
|
|
|
height: 40px !important;
|
|
|
|
|
color: #ff8c01;
|
|
|
|
|
}
|
|
|
|
|
::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td {
|
|
|
|
|
background: #f2f5fb;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .study_main_up_foot .el-table {
|
|
|
|
|
--el-table-border-color: #8ca4ec;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .study_main_but_foot .el-table {
|
|
|
|
|
--el-table-border-color: #9e74ff;
|
|
|
|
|
}
|
|
|
|
|
::v-deep .el-table__header-wrapper {
|
|
|
|
|
background: red;
|
|
|
|
|
}
|
|
|
|
|
.reportPromptFile {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
line-height: 7px;
|
|
|
|
|
font-family: "微软雅黑";
|
|
|
|
|
font-weight: 300;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|