dev-QQq
qinzhenpen 2 years ago
commit d98fc2ce57

@ -148,7 +148,7 @@ export function creatWordCloud(query) {
// 实训任务提交 // 实训任务提交
export function submitTask(data) { export function submitTask(data) {
return request({ return request({
url: '/api/stu/digital/industrialization/practicalTrainingSubmission', url: '/api/userBehavior/practicalTrainingSubmission',
method: 'post', method: 'post',
params:data params:data
}) })

@ -28,7 +28,7 @@ export const uploadBusinessRegistrationCertificate=(data)=> {
//实训任务提交 //实训任务提交
export const submitTrainingTask=(data)=> { export const submitTrainingTask=(data)=> {
return request({ return request({
url: '/api/stu/digital/industrialization/practicalTrainingSubmission', url: '/api/userBehavior/practicalTrainingSubmission',
method: 'post', method: 'post',
params:data params:data
}) })

@ -141,7 +141,6 @@ export const dynamicRoutes = [
], ],
}, },
{ {
path: "", path: "",
component: Layout, component: Layout,

@ -16,8 +16,12 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
const service = axios.create({ const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分 // axios中请求配置有baseURL选项表示请求URL公共部分
// baseURL: import.meta.env.VITE_APP_BASE_API, // baseURL: import.meta.env.VITE_APP_BASE_API,
// baseURL:'http://118.31.7.2:9868/',
baseURL:'http://192.168.2.28:9868/', baseURL:'http://192.168.2.28:9868/',
// baseURL:'http://118.31.7.2:9868/',
=========
// baseURL:'http://118.31.7.2:9868/',
baseURL:'http://192.168.2.16:9868/',
>>>>>>>>> Temporary merge branch 2
// 超时 // 超时
timeout: 100000 timeout: 100000
}) })

@ -242,7 +242,7 @@ const submit = () => {
return proxy.$modal.msgWarning("请先完成实训") return proxy.$modal.msgWarning("请先完成实训")
} }
commonality commonality
.submitTask({module:'人工智能',numberOfErrors:errorCount.value>10?10:errorCount.value,taskName:'文字之别OCR',userId:JSON.parse(getUserInfo()).userId}) .submitTask({module:'文字识别',numberOfErrors:errorCount.value>10?10:errorCount.value,taskName:'文字识别',userId:JSON.parse(getUserInfo()).userId})
.then((response) => { .then((response) => {
proxy.$modal.msgSuccess("提交成功"); proxy.$modal.msgSuccess("提交成功");
textDialogVisible.value=false textDialogVisible.value=false

@ -2185,7 +2185,7 @@ p {
width: 84px; width: 84px;
height: 25px; height: 25px;
top: 208px; top: 208px;
left: 204px; left: 200px;
background: #FFFFFF; background: #FFFFFF;
cursor: pointer; cursor: pointer;
border-radius: 5px; border-radius: 5px;
@ -2194,6 +2194,6 @@ p {
padding: 2px; padding: 2px;
} }
.txPotion{ .txPotion{
left: 424px; left: 415px;
} }
</style> </style>

@ -1071,13 +1071,13 @@ const sendTask=async()=>{
module:'数字金融', module:'数字金融',
numberOfErrors:errorNumber > 10 ? 10 : errorNumber, numberOfErrors:errorNumber > 10 ? 10 : errorNumber,
taskName:'数字营销', taskName:'数字营销',
userId:getUserId() userId:JSON.parse(getUserInfo()).userId
} }
const res=await submitTrainingTask(sendData) const res=await submitTrainingTask(sendData)
proxy.$modal.msgSuccess("提交成功!") proxy.$modal.msgSuccess("提交成功!")
handleCloseSend() handleCloseSend()
dialogVisible.value=false dialogVisible.value=false
}catch{} }catch(e){console.log(e);}
} }
const gitListDig=async()=>{ const gitListDig=async()=>{
try{ try{
@ -1192,7 +1192,7 @@ const handleCloseSend=async()=>{
"stepTwoB": null, "stepTwoB": null,
"stepTwoC": null, "stepTwoC": null,
"subState": null, "subState": null,
"userId": getUserId() "userId": JSON.parse(getUserInfo()).userId
} }
const res=await digitalSavesAutomatically(sendData) const res=await digitalSavesAutomatically(sendData)
dialogVisible.value=false dialogVisible.value=false

@ -2,7 +2,7 @@
<div class="app-container2"> <div class="app-container2">
<div class="Hadoop"> <div class="Hadoop">
<div class="left"> <div class="left">
<el-scrollbar height="625px" style="height:93%"> <el-scrollbar height="615px" style="height:93%" ref="scrollbar">
<p>以下是Hadoop的技术框架图请选择相应的组件填入其中</p> <p>以下是Hadoop的技术框架图请选择相应的组件填入其中</p>
<div class="Module"> <div class="Module">
<div class="title"> <div class="title">
@ -142,7 +142,7 @@
</div> </div>
</el-scrollbar> </el-scrollbar>
<div class="dialog-footer"> <div class="dialog-footer" style="margin-top:5px">
<el-button @click="sendTitle()" class="tj">提交任务</el-button> <el-button @click="sendTitle()" class="tj">提交任务</el-button>
<el-button type="primary" @click="startOver" class="cxks"> <el-button type="primary" @click="startOver" class="cxks">
重新开始 重新开始
@ -474,6 +474,7 @@ const clickRadio=async(item1,index1)=>{
} }
}catch{} }catch{}
} }
const scrollbar = ref(null);
const selectIndex=ref(0) const selectIndex=ref(0)
const selectEnglish=(index)=>{ const selectEnglish=(index)=>{
if(selection.value[index-1]!==''){ if(selection.value[index-1]!==''){
@ -481,6 +482,17 @@ const selectEnglish=(index)=>{
} }
isHadoop.value=!isHadoop.value isHadoop.value=!isHadoop.value
selectIndex.value=index selectIndex.value=index
nextTick(() => {
setTimeout(() => {
const scrollContainer = scrollbar.value?.$el.querySelector('.el-scrollbar__wrap');
if (scrollContainer) {
scrollContainer.scrollTo({
top: scrollContainer.scrollHeight,
behavior: 'smooth' //
});
}
}, 100);
});
} }
watch(async()=>{ watch(async()=>{
const sendData={ const sendData={
@ -812,6 +824,8 @@ echoHaop()
div:nth-child(1) { div:nth-child(1) {
width: 270px; width: 270px;
margin-left: 258px; margin-left: 258px;
align-items: center;
display: flex;
} }
div:nth-child(2) { div:nth-child(2) {
display: flex; display: flex;
@ -838,6 +852,9 @@ echoHaop()
line-height: 44px; line-height: 44px;
background: linear-gradient(0deg, #5ea346 0%, #6bba4d 100%); background: linear-gradient(0deg, #5ea346 0%, #6bba4d 100%);
border-radius: 4px; border-radius: 4px;
span{
margin-top: 5px;
}
} }
} }
.right { .right {

@ -248,7 +248,7 @@ import { getUserInfo } from '@/utils/auth'
const sendTask=async()=>{ const sendTask=async()=>{
try{ try{
const sendData={ const sendData={
module:'大数据', module:'大数据技术框架',
numberOfErrors:errorNumber > 10 ? 10 :errorNumber , numberOfErrors:errorNumber > 10 ? 10 :errorNumber ,
taskName:'大数据技术框架', taskName:'大数据技术框架',
userId:JSON.parse(getUserInfo()).userId userId:JSON.parse(getUserInfo()).userId

@ -277,6 +277,7 @@ import { getUserInfo } from '@/utils/auth'
}, },
]); ]);
const error=ref()
const TaskAssessment1 = async (TaskData) => { const TaskAssessment1 = async (TaskData) => {
try { try {
const res = await submitJudgmentResults(TaskData); const res = await submitJudgmentResults(TaskData);
@ -300,7 +301,7 @@ import { getUserInfo } from '@/utils/auth'
module: "什么是大数据", module: "什么是大数据",
topicId: item.topicId, topicId: item.topicId,
type: item.topicType, type: item.topicType,
userId: JSON.parse(getUserInfo()).userId userId: JSON.parse(getUserInfo()).userId,
} }
}) })
newTable.forEach( newTable.forEach(

@ -2,7 +2,7 @@
* @Author: qinzhenpen qzp1807@126.com * @Author: qinzhenpen qzp1807@126.com
* @Date: 2024-08-20 17:50:08 * @Date: 2024-08-20 17:50:08
* @LastEditors: qinzhenpen qzp1807@126.com * @LastEditors: qinzhenpen qzp1807@126.com
* @LastEditTime: 2024-08-21 10:30:04 * @LastEditTime: 2024-08-21 17:25:35
* @FilePath: \vue3\src\views\digitalMarketTech\index.vue * @FilePath: \vue3\src\views\digitalMarketTech\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->

@ -424,19 +424,20 @@ const handleChange = (info) => {
}; };
const flag = ref(false); const flag = ref(false);
onMounted(() => { onMounted(()=>{
getList(); getList()
}); })
const optionData = () => { const optionData=()=>{
API.viewingMetrics({ userId: JSON.parse(getUserInfo()).userId, tableName: input.value, algorithmName: "关联规则挖掘" }).then((res) => { API.viewingMetrics({userId:JSON.parse(getUserInfo()).userId,tableName:input.value,algorithmName:'关联规则挖掘'}).then((res)=>{
tableData.value = []; tableData.value=[]
res.data.forEach((element) => { input3.value=''
tableData.value.push({ res.data.forEach(element => {
text: element, tableData.value.push({
}); text:element
}); })
}); })
}; })
}
const selectedRows = ref([]); const selectedRows = ref([]);
const handleSelectionChange = (selection) => { const handleSelectionChange = (selection) => {
selectedRows.value = selection; selectedRows.value = selection;

@ -371,110 +371,106 @@ onMounted(() => {
// //
myChart.setOption(option); myChart.setOption(option);
myChart2.setOption(option); myChart2.setOption(option);
}); })
const optionData = () => { const optionData=()=>{
API.viewingMetrics({ userId: JSON.parse(getUserInfo()).userId, tableName: input.value, algorithmName: "聚类分析" }).then((res) => { API.viewingMetrics({userId:JSON.parse(getUserInfo()).userId,tableName:input.value,algorithmName:'聚类分析'}).then((res)=>{
tableData.value = []; tableData.value=[]
res.data.forEach((element) => { input3.value=''
tableData.value.push({ res.data.forEach(element => {
text: element, tableData.value.push({
}); text:element
}); })
}); })
}; })
const selectedRows = ref([]);
const handleSelectionChange = (selection) => {
selectedRows.value = selection;
};
const tableData2 = ref([]);
const tableData3 = ref([]);
const resTable2 = ref();
const taskZB = () => {
flag.value = true;
if (selectedRows.value.length === 0) {
return proxy.$modal.msgWarning("请选择指标!");
} }
const sendData = { const selectedRows = ref([]);
tableName: input.value, const handleSelectionChange = (selection) => {
userId: JSON.parse(getUserInfo()).userId, selectedRows.value = selection;
fieldList: selectedRows.value.map((item) => item.text), };
}; const tableData2=ref([])
API.analysisDataDisplay(sendData).then((res) => { const tableData3=ref([])
tableLabel.length = 0; const resTable2=ref()
for (const key in res.data[0]) { const taskZB=()=>{
tableLabel.push({ flag.value=true
label: key, if(selectedRows.value.length===0){
prop: key, return
}); }
const sendData={
tableName:input.value,
userId:JSON.parse(getUserInfo()).userId,
fieldList:selectedRows.value.map(item=>item.text)
}
API.analysisDataDisplay(sendData).then((res)=>{
tableLabel.length=0
for (const key in res.data[0]) {
tableLabel.push({
label:key,
prop:key
})
}
tableData2.value=res.data
flag.value=true
})
} }
proxy.$modal.msgSuccess("计算完成!"); const formInline=reactive({
tableData2.value = res.data; user:'',
flag.value = true; region:''
}); })
}; const input=ref()
const formInline = reactive({ const options = ref([])
user: "", const input2=ref()
region: "", const options2=ref([
}); {
const input = ref(); value:'数据区重',
const options = ref([]); label:'数据去重'
const input2 = ref(); }
const options2 = ref([ ])
{ const input3=ref()
value: "数据区重", const options3=ref([
label: "数据去重", {
}, value:'缺失值处理--剔除数据',
]); label:'缺失值处理--剔除数据'
const input3 = ref(); },{
const options3 = ref([ value:'缺失值处理--均值替换',
{ label:'缺失值处理--均值替换'
value: "缺失值处理--剔除数据", },
label: "缺失值处理--剔除数据", ])
}, const input4=ref()
{ const options4=ref([
value: "缺失值处理--均值替换", {
label: "缺失值处理--均值替换", value:'K-means',
}, label:'K-means'
]); },
const input4 = ref(); ])
const options4 = ref([ const input5=ref()
{ const input6=ref()
value: "K-means", const taskSubmit=()=>{
label: "K-means", dialogVisible.value=true
},
]);
const input5 = ref();
const input6 = ref();
const taskSubmit = () => {
dialogVisible.value = true;
};
const tableData = ref([]);
const headerCellStyle = () => {
return {
backgroundColor: "#1882DE !important", //
color: "#ffffff !important",
};
};
const optionData2 = () => {
if (tableData2.value.length === 0) {
input2.value = "";
input3.value = "";
proxy.$modal.msgWarning("请先选择指标!");
return;
} }
if (input2.value && input3.value) { const tableData = ref([
const sendData = ref({
mapList: tableData2.value, ])
method: input3.value, const headerCellStyle=()=>{
userId: JSON.parse(getUserInfo()).userId, return {
}); backgroundColor: "#1882DE !important", //
API.dataPreprocessing(sendData.value).then((res) => { color: "#ffffff !important",
resTable2.value = res.data; };
tableData2.value = []; }
tableData2.value = res.data; const optionData2=()=>{
proxy.$modal.msgSuccess("预处理成功!"); if(input2.value&&input3.value){
}); const sendData=ref({
mapList:tableData2.value,
method:input3.value,
userId:JSON.parse(getUserInfo()).userId
})
API.dataPreprocessing(sendData.value).then((res)=>{
resTable2.value=res.data
tableData2.value=[]
tableData2.value=res.data
proxy.$modal.msgSuccess("预处理成功!");
})
}
} }
}; };

@ -77,33 +77,41 @@
<img src="../../../assets/images/重新开始.png" alt="" /> <img src="../../../assets/images/重新开始.png" alt="" />
<span>重新开始</span> <span>重新开始</span>
</div> </div>
</div>
</div> </div>
</div> <div class="main-right">
<div class="main-right"> <div>
<div> <span style="font-weight: bold;font-size: 18px;color: #3596EB;">分析数据</span>
<span style="font-weight: bold; font-size: 18px; color: #3596eb">分析数据</span> <el-table :data="tableData2" style="width: 94%;margin-top:10px" :header-cell-style="headerCellStyle" height="350">
<el-table :data="tableData2" style="width: 94%; margin-top: 10px" :header-cell-style="headerCellStyle" height="350"> <el-table-column v-for="column in tableLabel" :key="column.prop" :prop="column.prop" :label="column.label" align="center"/>
<el-table-column v-for="column in tableLabel" :key="column.prop" :prop="column.prop" :label="column.label" align="center" /> </el-table>
</el-table> <!-- <el-pagination style="margin-top:10px" background layout="prev, pager, next" :total="1000" /> -->
</div> </div>
<div class="analysisResults" style="margin-top: 20px"> <div class="analysisResults" style="margin-top: 20px">
<span style="font-weight: bold; font-size: 18px; color: #3596eb; display: block">分析结果</span> <span style="font-weight: bold;font-size: 18px;color: #3596EB;display: block;">分析结果</span>
<el-button class="imgBtn" v-if="flagUP" @click="upLoad"></el-button> <el-button class="imgBtn" v-if="flagUP" @click="upLoad"></el-button>
<el-table :data="tableData3" ref="exportTableRef" row-key="TSuid" style="width: 94%; margin-top: 10px" :header-cell-style="headerCellStyle" height="350"> <el-table :data="tableData3" ref="exportTableRef" row-key="TSuid" style="width: 94%;margin-top:10px" :header-cell-style="headerCellStyle" height="350">
<el-table-column v-for="column in tableLabel2" :key="column.prop" :prop="column.prop" :label="column.label" align="center" /> <el-table-column v-for="column in tableLabel2" :key="column.prop" :prop="column.prop" :label="column.label" align="center"/>
<el-table-column v-if="flagColumn" label="预测" align="center"> <el-table-column v-if="flagColumn" label="预测" align="center">
<template #default="scope"> <template #default="scope">
<el-button type="primary" link @click="handleClick(scope.row)" v-if="predictionResults === ''"></el-button> <el-button type="primary" link @click="handleClick(scope.row)" v-if="predictionResults===''"></el-button>
<span v-else>{{ predictionResults }}</span> <span v-else>{{predictionResults}}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div>
</div> </div>
</div> </div>
</div> </el-scrollbar>
</el-scrollbar>
<el-dialog v-model="dialogVisible" title="实训任务提交" width="600" custom-class="dialogClass" :show-close="false"> <el-dialog
v-model="dialogVisible"
title="实训任务提交"
width="600"
custom-class="dialogClass"
:show-close="false"
>
<template #header="{ close, titleId, titleClass }"> <template #header="{ close, titleId, titleClass }">
<div class="my-header"> <div class="my-header">
<span :id="titleId" :class="titleClass">实训任务提交</span> <span :id="titleId" :class="titleClass">实训任务提交</span>

@ -30,30 +30,42 @@
</div> </div>
<!-- action="http://qkljr.sztzjy.com:90/api/stu/concept/block/upload" --> <!-- 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> <template #trigger>
<el-button color="#626aef" round> <el-button color="#626aef" round>
<el-icon><UploadFilled /></el-icon> <el-icon><UploadFilled /></el-icon>
点击上传 点击上传
</el-button> </el-button>
</template> </template>
<!-- <div class="reportPromptFile" v-html="item[`${index}`].path"></div> --> </el-upload> -->
</el-upload>
<div class="study_main_but_foot"> <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="reportName" label="报告名称" width="289" align="center" />
<el-table-column prop="uploadTime" 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="fileSize" label="文件大小" width="150" align="center" />
<el-table-column prop="rating" label="评分" width="289" align="center" /> <el-table-column prop="tchScoreuploadTime" label="评分" width="150" align="center" />
<el-table-column label="操作" class="controls" width="286" align="center"> <el-table-column label="操作" class="controls" align="center">
<el-link type="success" @click="uploadReport"> <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-icon><Download /></el-icon>
下载 下载
</el-link> </el-link>
<el-link type="warning" @click="showComments"> <el-link type="warning" @click="showComments(scope.row)">
<el-icon><Tickets /></el-icon> <el-icon><Tickets /></el-icon>
查看评语 查看评语
</el-link> </el-link>
</div>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
@ -62,7 +74,7 @@
</div> </div>
<el-dialog v-model="dialogVisible" title="评语" width="30%" :before-close="handleClose"> <el-dialog v-model="dialogVisible" title="评语" width="30%" :before-close="handleClose">
<span>{{ tableData2[0].teacherComments }}</span> <span>{{ comments }}</span>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="dialogVisible = false">确定</el-button> <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 tableData = ref([]);
const tableData4 = ref([ const tableData4 = ref([
{ {
@ -191,12 +405,15 @@ const calculateAverageScore = () => {
}; };
const fileList = ref([]); const fileList = ref([]);
const data = ref({ const data = ref({
ascription: "", module: "",
userId: JSON.parse(getUserInfo()).userId, userId: JSON.parse(getUserInfo()).userId,
schoolId: JSON.parse(getUserInfo()).schoolId, schoolId: JSON.parse(getUserInfo()).schoolId,
count:""
}); });
const handleChange = (info) => { const handleChange = (info,rowData) => {
fileList.value.push(info); fileList.value.push(info);
data.value.module=rowData.module
data.value.count=rowData.ascription
let formData2 = new FormData(); let formData2 = new FormData();
formData2.append("file", fileList.value[0].raw); formData2.append("file", fileList.value[0].raw);
formData2.append("stuBlockProduct", JSON.stringify(data.value)); formData2.append("stuBlockProduct", JSON.stringify(data.value));
@ -206,14 +423,38 @@ const handleChange = (info) => {
}); });
}; };
const uploadRef = ref(null); 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); // 01
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 = () => { const getReports = () => {
API.getDetailsTrainingReport(data.value).then((res) => { API.getDetailsTrainingReport(data.value).then((res) => {
tableData2.value.splice(0, tableData2.value.length); // tableData2.value.splice(0, tableData2.value.length);
if (res.data !== null) { if (res.data !== null) {
tableData2.value.push(res.data); tableData2.value.forEach(item => {
tableData2.value[0].size = tableData2.value[0].size + "kb"; 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(), TOKEN: "Bearer " + getToken(),
}; };
// //
const uploadReport = async () => { const uploadReport = async (id) => {
window.open(`http://118.31.7.2:7899/api/stu/concept/block/download?TOKEN= ${"Bearer " + getToken()}&userId=${data2.userId}`); 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.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}`) // 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 isUpdate = ref(false);
// //
const showComments = () => { const comments=ref('')
if (tableData2.value.length <= 0) { const showComments = (item) => {
if (!item.tchComment) {
ElMessage({ ElMessage({
message: "暂无评语", message: "暂无评语",
type: "warning", type: "warning",
}); });
return; return;
} }
comments.value=item.tchComment
dialogVisible.value = true; dialogVisible.value = true;
}; };
onMounted(() => { onMounted(() => {
@ -380,10 +626,13 @@ const updateReportGrade = () => {
} }
} }
.is-underline:nth-child(1) { .is-underline:nth-child(1) {
margin-left: 26px; margin-left: 20px;
} }
.is-underline:nth-child(2) { .is-underline:nth-child(2) {
margin-left: 36px; margin-left: 20px;
}
.is-underline:nth-child(3) {
margin-left: 20px;
} }
.study_main_but_foot { .study_main_but_foot {
margin-top: 20px; margin-top: 20px;
@ -423,4 +672,11 @@ const updateReportGrade = () => {
font-family: "微软雅黑"; font-family: "微软雅黑";
font-weight: 300; font-weight: 300;
} }
.upload-item{
display: inline;
height: 23px !important;
:deep(.el-upload){
align-items:flex-end !important;
}
}
</style> </style>

Loading…
Cancel
Save