|
|
|
|
@ -30,30 +30,42 @@
|
|
|
|
|
</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">
|
|
|
|
|
<!-- <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>
|
|
|
|
|
</el-upload> -->
|
|
|
|
|
<div class="study_main_but_foot">
|
|
|
|
|
<el-table :data="tableData2" stripe style="width: 100%" border :header-cell-style="{ background: '#A2C9FF' }">
|
|
|
|
|
<el-table :data="tableData2" :span-method="arraySpanMethod2" stripe style="width: 100%" border :header-cell-style="{ background: '#A2C9FF' }">
|
|
|
|
|
<el-table-column prop="module" label="模块" width="289" align="center" />
|
|
|
|
|
<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-table-column prop="fileSize" label="文件大小" width="150" align="center" />
|
|
|
|
|
<el-table-column prop="tchScoreuploadTime" label="评分" width="150" align="center" />
|
|
|
|
|
<el-table-column label="操作" class="controls" align="center">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<div style="display:flex;margin-left:10px">
|
|
|
|
|
<el-upload class="upload-item" ref="uploadRef" :file-list="fileList" :auto-upload="false" :on-change="(info) => handleChange(info, scope.row)" :show-file-list="false" multiple="multiple">
|
|
|
|
|
<template #trigger>
|
|
|
|
|
<el-link type="primary">
|
|
|
|
|
<el-icon><Plus /></el-icon>
|
|
|
|
|
上传
|
|
|
|
|
</el-link>
|
|
|
|
|
</template>
|
|
|
|
|
</el-upload>
|
|
|
|
|
<el-link type="success" @click="uploadReport(scope.row.id)">
|
|
|
|
|
<el-icon><Download /></el-icon>
|
|
|
|
|
下载
|
|
|
|
|
</el-link>
|
|
|
|
|
<el-link type="warning" @click="showComments">
|
|
|
|
|
<el-link type="warning" @click="showComments(scope.row)">
|
|
|
|
|
<el-icon><Tickets /></el-icon>
|
|
|
|
|
查看评语
|
|
|
|
|
</el-link>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
|
|
|
|
@ -62,7 +74,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<el-dialog v-model="dialogVisible" title="评语" width="30%" :before-close="handleClose">
|
|
|
|
|
<span>{{ tableData2[0].teacherComments }}</span>
|
|
|
|
|
<span>{{ comments }}</span>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<span class="dialog-footer">
|
|
|
|
|
<el-button @click="dialogVisible = false">确定</el-button>
|
|
|
|
|
@ -103,7 +115,209 @@ const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const tableData2 = ref([]);
|
|
|
|
|
const arraySpanMethod2=({
|
|
|
|
|
row,
|
|
|
|
|
column,
|
|
|
|
|
rowIndex,
|
|
|
|
|
columnIndex,
|
|
|
|
|
})=>{
|
|
|
|
|
if (columnIndex === 0) {
|
|
|
|
|
if (rowIndex % 3 === 0) {
|
|
|
|
|
return {
|
|
|
|
|
rowspan: 3,
|
|
|
|
|
colspan: 1,
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return {
|
|
|
|
|
rowspan: 0,
|
|
|
|
|
colspan: 0,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const tableData2 = ref([
|
|
|
|
|
{
|
|
|
|
|
module:"AI文生图",
|
|
|
|
|
reportName:"",
|
|
|
|
|
updateTime:"",
|
|
|
|
|
fileSize:"",
|
|
|
|
|
id:"",
|
|
|
|
|
filePath:"",
|
|
|
|
|
tchScore:"",
|
|
|
|
|
ascription:"1",
|
|
|
|
|
tchComment:""
|
|
|
|
|
},{
|
|
|
|
|
module:"AI文生图",
|
|
|
|
|
reportName:"",
|
|
|
|
|
updateTime:"",
|
|
|
|
|
fileSize:"",
|
|
|
|
|
id:"",
|
|
|
|
|
filePath:"",
|
|
|
|
|
tchScore:"",
|
|
|
|
|
tchComment:"",
|
|
|
|
|
ascription:"2",
|
|
|
|
|
},{
|
|
|
|
|
module:"AI文生图",
|
|
|
|
|
reportName:"",
|
|
|
|
|
updateTime:"",
|
|
|
|
|
fileSize:"",
|
|
|
|
|
id:"",
|
|
|
|
|
filePath:"",
|
|
|
|
|
tchScore:"",
|
|
|
|
|
tchComment:"",
|
|
|
|
|
ascription:"3",
|
|
|
|
|
},{
|
|
|
|
|
module:"AI修图",
|
|
|
|
|
reportName:"",
|
|
|
|
|
updateTime:"",
|
|
|
|
|
fileSize:"",
|
|
|
|
|
id:"",
|
|
|
|
|
filePath:"",
|
|
|
|
|
tchScore:"",
|
|
|
|
|
tchComment:"",
|
|
|
|
|
ascription:"1",
|
|
|
|
|
},{
|
|
|
|
|
module:"AI修图",
|
|
|
|
|
reportName:"",
|
|
|
|
|
updateTime:"",
|
|
|
|
|
fileSize:"",
|
|
|
|
|
id:"",
|
|
|
|
|
filePath:"",
|
|
|
|
|
tchScore:"",
|
|
|
|
|
tchComment:"",
|
|
|
|
|
ascription:"2",
|
|
|
|
|
},{
|
|
|
|
|
module:"AI修图",
|
|
|
|
|
reportName:"",
|
|
|
|
|
updateTime:"",
|
|
|
|
|
fileSize:"",
|
|
|
|
|
id:"",
|
|
|
|
|
filePath:"",
|
|
|
|
|
tchScore:"",
|
|
|
|
|
tchComment:"",
|
|
|
|
|
ascription:"3",
|
|
|
|
|
},{
|
|
|
|
|
module:"AI视频",
|
|
|
|
|
reportName:"",
|
|
|
|
|
updateTime:"",
|
|
|
|
|
fileSize:"",
|
|
|
|
|
id:"",
|
|
|
|
|
filePath:"",
|
|
|
|
|
tchScore:"",
|
|
|
|
|
tchComment:"",
|
|
|
|
|
ascription:"1",
|
|
|
|
|
},{
|
|
|
|
|
module:"AI视频",
|
|
|
|
|
reportName:"",
|
|
|
|
|
updateTime:"",
|
|
|
|
|
fileSize:"",
|
|
|
|
|
id:"",
|
|
|
|
|
filePath:"",
|
|
|
|
|
tchScore:"",
|
|
|
|
|
tchComment:"",
|
|
|
|
|
ascription:"2",
|
|
|
|
|
},{
|
|
|
|
|
module:"AI视频",
|
|
|
|
|
reportName:"",
|
|
|
|
|
updateTime:"",
|
|
|
|
|
fileSize:"",
|
|
|
|
|
id:"",
|
|
|
|
|
filePath:"",
|
|
|
|
|
tchScore:"",
|
|
|
|
|
tchComment:"",
|
|
|
|
|
ascription:"3",
|
|
|
|
|
},{
|
|
|
|
|
module:"AI写作",
|
|
|
|
|
reportName:"",
|
|
|
|
|
updateTime:"",
|
|
|
|
|
fileSize:"",
|
|
|
|
|
id:"",
|
|
|
|
|
filePath:"",
|
|
|
|
|
tchScore:"",
|
|
|
|
|
tchComment:"",
|
|
|
|
|
ascription:"1",
|
|
|
|
|
},{
|
|
|
|
|
module:"AI写作",
|
|
|
|
|
reportName:"",
|
|
|
|
|
updateTime:"",
|
|
|
|
|
fileSize:"",
|
|
|
|
|
id:"",
|
|
|
|
|
filePath:"",
|
|
|
|
|
tchScore:"",
|
|
|
|
|
tchComment:"",
|
|
|
|
|
ascription:"2",
|
|
|
|
|
},{
|
|
|
|
|
module:"AI写作",
|
|
|
|
|
reportName:"",
|
|
|
|
|
updateTime:"",
|
|
|
|
|
fileSize:"",
|
|
|
|
|
id:"",
|
|
|
|
|
filePath:"",
|
|
|
|
|
tchScore:"",
|
|
|
|
|
tchComment:"",
|
|
|
|
|
ascription:"3",
|
|
|
|
|
},{
|
|
|
|
|
module:"AI数据分析",
|
|
|
|
|
reportName:"",
|
|
|
|
|
updateTime:"",
|
|
|
|
|
fileSize:"",
|
|
|
|
|
id:"",
|
|
|
|
|
filePath:"",
|
|
|
|
|
tchScore:"",
|
|
|
|
|
tchComment:"",
|
|
|
|
|
ascription:"1",
|
|
|
|
|
},{
|
|
|
|
|
module:"AI数据分析",
|
|
|
|
|
reportName:"",
|
|
|
|
|
updateTime:"",
|
|
|
|
|
fileSize:"",
|
|
|
|
|
id:"",
|
|
|
|
|
filePath:"",
|
|
|
|
|
tchScore:"",
|
|
|
|
|
tchComment:"",
|
|
|
|
|
ascription:"2",
|
|
|
|
|
},{
|
|
|
|
|
module:"AI数据分析",
|
|
|
|
|
reportName:"",
|
|
|
|
|
updateTime:"",
|
|
|
|
|
fileSize:"",
|
|
|
|
|
id:"",
|
|
|
|
|
filePath:"",
|
|
|
|
|
tchScore:"",
|
|
|
|
|
tchComment:"",
|
|
|
|
|
ascription:"3",
|
|
|
|
|
},{
|
|
|
|
|
module:"BI可视化分析",
|
|
|
|
|
reportName:"",
|
|
|
|
|
updateTime:"",
|
|
|
|
|
fileSize:"",
|
|
|
|
|
id:"",
|
|
|
|
|
filePath:"",
|
|
|
|
|
tchScore:"",
|
|
|
|
|
tchComment:"",
|
|
|
|
|
ascription:"1",
|
|
|
|
|
},{
|
|
|
|
|
module:"BI可视化分析",
|
|
|
|
|
reportName:"",
|
|
|
|
|
updateTime:"",
|
|
|
|
|
fileSize:"",
|
|
|
|
|
id:"",
|
|
|
|
|
filePath:"",
|
|
|
|
|
tchScore:"",
|
|
|
|
|
tchComment:"",
|
|
|
|
|
ascription:"2",
|
|
|
|
|
},{
|
|
|
|
|
module:"BI可视化分析",
|
|
|
|
|
reportName:"",
|
|
|
|
|
updateTime:"",
|
|
|
|
|
fileSize:"",
|
|
|
|
|
id:"",
|
|
|
|
|
filePath:"",
|
|
|
|
|
tchScore:"",
|
|
|
|
|
tchComment:"",
|
|
|
|
|
ascription:"3",
|
|
|
|
|
},
|
|
|
|
|
]);
|
|
|
|
|
const tableData = ref([]);
|
|
|
|
|
const tableData4 = ref([
|
|
|
|
|
{
|
|
|
|
|
@ -191,12 +405,15 @@ const calculateAverageScore = () => {
|
|
|
|
|
};
|
|
|
|
|
const fileList = ref([]);
|
|
|
|
|
const data = ref({
|
|
|
|
|
ascription: "",
|
|
|
|
|
module: "",
|
|
|
|
|
userId: JSON.parse(getUserInfo()).userId,
|
|
|
|
|
schoolId: JSON.parse(getUserInfo()).schoolId,
|
|
|
|
|
count:""
|
|
|
|
|
});
|
|
|
|
|
const handleChange = (info) => {
|
|
|
|
|
const handleChange = (info,rowData) => {
|
|
|
|
|
fileList.value.push(info);
|
|
|
|
|
data.value.module=rowData.module
|
|
|
|
|
data.value.count=rowData.ascription
|
|
|
|
|
let formData2 = new FormData();
|
|
|
|
|
formData2.append("file", fileList.value[0].raw);
|
|
|
|
|
formData2.append("stuBlockProduct", JSON.stringify(data.value));
|
|
|
|
|
@ -206,14 +423,38 @@ const handleChange = (info) => {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
const uploadRef = ref(null);
|
|
|
|
|
function padZero(value) {
|
|
|
|
|
return value.toString().padStart(2, '0');
|
|
|
|
|
}
|
|
|
|
|
const formt=(timestamp)=>{
|
|
|
|
|
const date = new Date(timestamp);
|
|
|
|
|
|
|
|
|
|
const year = date.getFullYear();
|
|
|
|
|
const month = padZero(date.getMonth() + 1); // 月份从0开始,所以需要加1
|
|
|
|
|
const day = padZero(date.getDate());
|
|
|
|
|
const hours = padZero(date.getHours());
|
|
|
|
|
const minutes = padZero(date.getMinutes());
|
|
|
|
|
const seconds = padZero(date.getSeconds());
|
|
|
|
|
|
|
|
|
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
|
|
|
}
|
|
|
|
|
const getReports = () => {
|
|
|
|
|
API.getDetailsTrainingReport(data.value).then((res) => {
|
|
|
|
|
tableData2.value.splice(0, tableData2.value.length);
|
|
|
|
|
// 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";
|
|
|
|
|
}
|
|
|
|
|
tableData2.value.forEach(item => {
|
|
|
|
|
const match = res.data.find(dataItem => dataItem.module === item.module && dataItem.ascription === item.ascription);
|
|
|
|
|
if (match) {
|
|
|
|
|
item.reportName = match.reportName
|
|
|
|
|
item.uploadTime = formt(match.uploadTime);
|
|
|
|
|
item.fileSize = (match.size/1024).toFixed(2)+'KB';
|
|
|
|
|
item.filePath = match.url;
|
|
|
|
|
item.tchScore = match.rating;
|
|
|
|
|
item.tchComment = match.teacherComments;
|
|
|
|
|
item.id=match.id
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
@ -222,21 +463,26 @@ const data2 = {
|
|
|
|
|
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}`);
|
|
|
|
|
const uploadReport = async (id) => {
|
|
|
|
|
if(!id){
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
window.open(`http://192.168.2.16:9868/api/stu/concept/block/download?TOKEN=${'Bearer '+getToken()}&id=${id}`);
|
|
|
|
|
// 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) {
|
|
|
|
|
const comments=ref('')
|
|
|
|
|
const showComments = (item) => {
|
|
|
|
|
if (!item.tchComment) {
|
|
|
|
|
ElMessage({
|
|
|
|
|
message: "暂无评语",
|
|
|
|
|
type: "warning",
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
comments.value=item.tchComment
|
|
|
|
|
dialogVisible.value = true;
|
|
|
|
|
};
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
@ -380,10 +626,13 @@ const updateReportGrade = () => {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.is-underline:nth-child(1) {
|
|
|
|
|
margin-left: 26px;
|
|
|
|
|
margin-left: 20px;
|
|
|
|
|
}
|
|
|
|
|
.is-underline:nth-child(2) {
|
|
|
|
|
margin-left: 36px;
|
|
|
|
|
margin-left: 20px;
|
|
|
|
|
}
|
|
|
|
|
.is-underline:nth-child(3) {
|
|
|
|
|
margin-left: 20px;
|
|
|
|
|
}
|
|
|
|
|
.study_main_but_foot {
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
@ -423,4 +672,11 @@ const updateReportGrade = () => {
|
|
|
|
|
font-family: "微软雅黑";
|
|
|
|
|
font-weight: 300;
|
|
|
|
|
}
|
|
|
|
|
.upload-item{
|
|
|
|
|
display: inline;
|
|
|
|
|
height: 23px !important;
|
|
|
|
|
:deep(.el-upload){
|
|
|
|
|
align-items:flex-end !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|