|
|
@ -26,12 +26,12 @@ |
|
|
|
<el-table :data="infoData" class="info-table" stripe header-align="center"> |
|
|
|
<el-table :data="infoData" class="info-table" stripe header-align="center"> |
|
|
|
<el-table-column prop="userName" label="学生姓名" align="center"></el-table-column> |
|
|
|
<el-table-column prop="userName" label="学生姓名" align="center"></el-table-column> |
|
|
|
<el-table-column prop="workNumber" label="学生学号" align="center"></el-table-column> |
|
|
|
<el-table-column prop="workNumber" label="学生学号" align="center"></el-table-column> |
|
|
|
<el-table-column prop="experimentalClassName" label="学生班级" align="center"> |
|
|
|
<el-table-column prop="className" label="学生班级" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template v-if="editing"> |
|
|
|
<template v-if="editing"> |
|
|
|
<el-input v-model="form.experimentalClassName"></el-input> |
|
|
|
<el-input v-model="form.className"></el-input> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template v-else>{{ form.experimentalClassName }}</template> |
|
|
|
<template v-else>{{ form.className }}</template> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="instructor" label="指导老师" align="center"> |
|
|
|
<el-table-column prop="instructor" label="指导老师" align="center"> |
|
|
@ -60,7 +60,7 @@ |
|
|
|
<div class="meta-title-wrap"> |
|
|
|
<div class="meta-title-wrap"> |
|
|
|
<p class="meta-title"><img src="@/assets/img/cup.png" alt=""> 实验项目名称</p> |
|
|
|
<p class="meta-title"><img src="@/assets/img/cup.png" alt=""> 实验项目名称</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-input v-model="form.proName" type="textarea" :disabled="!editing" rows="5"></el-input> |
|
|
|
<el-input v-model="form.projectName" type="textarea" :disabled="!editing" rows="5"></el-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="m-b-20"> |
|
|
|
<div class="m-b-20"> |
|
|
@ -80,8 +80,7 @@ |
|
|
|
{{ scope.$index + 1 }} |
|
|
|
{{ scope.$index + 1 }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="judgmentName" label="任务名称"> |
|
|
|
<el-table-column prop="judgmentName" label="任务名称"></el-table-column> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="userAnswer" label="学生答案"> |
|
|
|
<el-table-column prop="userAnswer" label="学生答案"> |
|
|
|
<!-- |
|
|
|
<!-- |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
@ -94,7 +93,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="answer" label="参考答案"> |
|
|
|
<el-table-column prop="ruleAnswer" label="参考答案"> |
|
|
|
<!-- |
|
|
|
<!-- |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<pre v-html="scope.row.answer" style="white-space: pre-wrap"></pre> |
|
|
|
<pre v-html="scope.row.answer" style="white-space: pre-wrap"></pre> |
|
|
@ -124,76 +123,35 @@ |
|
|
|
import { Loading } from "element-ui"; |
|
|
|
import { Loading } from "element-ui"; |
|
|
|
import html2Canvas from "html2canvas"; |
|
|
|
import html2Canvas from "html2canvas"; |
|
|
|
import JsPDF from "jspdf"; |
|
|
|
import JsPDF from "jspdf"; |
|
|
|
import { mapState, mapActions } from "vuex"; |
|
|
|
|
|
|
|
import util from "@/libs/util"; |
|
|
|
import util from "@/libs/util"; |
|
|
|
import Setting from "@/setting"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
|
|
|
|
reportId: this.$route.query.reportId, |
|
|
|
title: "实验报告", |
|
|
|
title: "实验报告", |
|
|
|
form: { |
|
|
|
form: { |
|
|
|
analysis: "", |
|
|
|
className: "", |
|
|
|
conclusion: "", |
|
|
|
instructor: "", |
|
|
|
content: ``, |
|
|
|
|
|
|
|
data: "", |
|
|
|
|
|
|
|
purpose: ``, |
|
|
|
|
|
|
|
experimentId: "", |
|
|
|
|
|
|
|
experimentalClassName: "", |
|
|
|
|
|
|
|
improvement: "", |
|
|
|
|
|
|
|
laboratory: "", |
|
|
|
|
|
|
|
period: "", |
|
|
|
period: "", |
|
|
|
principle: ``, |
|
|
|
projectName: "", |
|
|
|
proName: "", |
|
|
|
|
|
|
|
score: 0, |
|
|
|
|
|
|
|
step: ``, |
|
|
|
|
|
|
|
submitTime: "", |
|
|
|
|
|
|
|
summarize: "", |
|
|
|
summarize: "", |
|
|
|
instructor: "", |
|
|
|
|
|
|
|
userId: this.userId, |
|
|
|
|
|
|
|
userName: "", |
|
|
|
|
|
|
|
workNumber: "" |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
type: this.$route.query.type, // type == 1 ? '练习' : '考核' |
|
|
|
|
|
|
|
id: this.$route.query.id, |
|
|
|
|
|
|
|
recordId: this.$route.query.recordId, |
|
|
|
|
|
|
|
reportId: this.$route.query.reportId, |
|
|
|
|
|
|
|
infoData: [], |
|
|
|
infoData: [], |
|
|
|
expData: [], |
|
|
|
expData: [], |
|
|
|
accountData: [], |
|
|
|
|
|
|
|
showData: "1", |
|
|
|
|
|
|
|
autograph: "1", |
|
|
|
|
|
|
|
pages: 1, |
|
|
|
|
|
|
|
ipVisible: false, |
|
|
|
|
|
|
|
fileList: [{ |
|
|
|
|
|
|
|
name: "food.jpeg", |
|
|
|
|
|
|
|
url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100" |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
name: "food2.jpeg", |
|
|
|
|
|
|
|
url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100" |
|
|
|
|
|
|
|
}], |
|
|
|
|
|
|
|
conclusionOptions: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
value: 1, |
|
|
|
|
|
|
|
label: "结论符合预期" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
editing: false, |
|
|
|
editing: false, |
|
|
|
loadIns: null, |
|
|
|
loadIns: null, |
|
|
|
loading: false |
|
|
|
loading: false |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
|
|
|
|
...mapState("user", [ |
|
|
|
|
|
|
|
"userId", "studentId" |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
getData() { |
|
|
|
goBack() { // 返回 |
|
|
|
if (!this.type) { |
|
|
|
this.$router.go(-1); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getData() { // 查询详情 |
|
|
|
this.$get(`${this.api.reportDetail}?reportId=${this.reportId}`).then(res => { |
|
|
|
this.$get(`${this.api.reportDetail}?reportId=${this.reportId}`).then(res => { |
|
|
|
this.form = res.report; |
|
|
|
this.form = res.report; |
|
|
|
this.expData = res.userScores; |
|
|
|
this.expData = res.userScores; |
|
|
@ -208,95 +166,9 @@ export default { |
|
|
|
score: form.score, |
|
|
|
score: form.score, |
|
|
|
userName: form.userName |
|
|
|
userName: form.userName |
|
|
|
}); |
|
|
|
}); |
|
|
|
}).catch(res => { |
|
|
|
}).catch(res => {}); |
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
let data = { |
|
|
|
|
|
|
|
studentId: this.studentId, |
|
|
|
|
|
|
|
projectId: this.id, |
|
|
|
|
|
|
|
recordId: this.recordId, |
|
|
|
|
|
|
|
reportId: this.reportId |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
this.$get(this.api.queryArchievement, data).then(res => { |
|
|
|
|
|
|
|
this.form = res.data.report ? res.data.report : {}; |
|
|
|
|
|
|
|
let expData = res.data.data; |
|
|
|
|
|
|
|
let form = this.form; |
|
|
|
|
|
|
|
let score = form.score; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (expData) { |
|
|
|
|
|
|
|
if (score) { |
|
|
|
|
|
|
|
expData.map(n => { |
|
|
|
|
|
|
|
if (n.isError) { |
|
|
|
|
|
|
|
score -= n.codeScore; |
|
|
|
|
|
|
|
n.codeScore = 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
form.score = score; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.expData = expData; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.infoData.push({ |
|
|
|
|
|
|
|
workNumber: form.workNumber, |
|
|
|
|
|
|
|
experimentalClassName: form.experimentalClassName, |
|
|
|
|
|
|
|
instructor: form.instructor, |
|
|
|
|
|
|
|
period: form.period, |
|
|
|
|
|
|
|
laboratory: form.laboratory, |
|
|
|
|
|
|
|
submitTime: form.submitTime, |
|
|
|
|
|
|
|
score: form.score, |
|
|
|
|
|
|
|
userName: form.userName |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}).catch(res => { |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handlePreview(file) { |
|
|
|
|
|
|
|
console.log(file); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
saveAdd() { |
|
|
|
|
|
|
|
let data = { |
|
|
|
|
|
|
|
systemId: this.configId, |
|
|
|
|
|
|
|
systemName: this.form.systemName, |
|
|
|
|
|
|
|
systemType: this.form.systemType, |
|
|
|
|
|
|
|
systemAttribution: this.form.systemAttribution |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
if (this.configId) { |
|
|
|
|
|
|
|
this.$post(this.api.updateServiceConfig, data).then((res) => { |
|
|
|
|
|
|
|
util.successMsg("编辑成功"); |
|
|
|
|
|
|
|
this.goBack(); |
|
|
|
|
|
|
|
}).catch((res) => { |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.$post(this.api.updateServiceConfig, data).then((res) => { |
|
|
|
|
|
|
|
util.successMsg("添加成功"); |
|
|
|
|
|
|
|
this.goBack(); |
|
|
|
|
|
|
|
}).catch((res) => { |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handleRemove(file, fileList) { |
|
|
|
|
|
|
|
console.log(file, fileList); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handlePictureCardPreview(file) { |
|
|
|
|
|
|
|
this.dialogImageUrl = file.url; |
|
|
|
|
|
|
|
this.dialogVisible = true; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
SpanMethod({ row, column, rowIndex, columnIndex }) { |
|
|
|
|
|
|
|
if (rowIndex % 2 === 0) { |
|
|
|
|
|
|
|
if (columnIndex === 6) { |
|
|
|
|
|
|
|
if (!row.Intranet) { |
|
|
|
|
|
|
|
return [1, 2]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// else if (columnIndex === 1) { |
|
|
|
|
|
|
|
// return [0, 0]; |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
goBack() { |
|
|
|
exportPage() { // 导出实验报告 |
|
|
|
this.$router.go(-1); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
exportPage() { |
|
|
|
|
|
|
|
document.querySelector("body").setAttribute("style", "overflow: visible"); |
|
|
|
document.querySelector("body").setAttribute("style", "overflow: visible"); |
|
|
|
this.loading = true; |
|
|
|
this.loading = true; |
|
|
|
this.loadIns = Loading.service({ |
|
|
|
this.loadIns = Loading.service({ |
|
|
@ -339,24 +211,16 @@ export default { |
|
|
|
); |
|
|
|
); |
|
|
|
}, 1000); |
|
|
|
}, 1000); |
|
|
|
}, |
|
|
|
}, |
|
|
|
editReport() { |
|
|
|
editReport() { // 编辑实验报告 |
|
|
|
if (this.editing) { |
|
|
|
if (this.editing) { |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
period: this.form.period, |
|
|
|
...this.form, |
|
|
|
proName: this.form.proName, |
|
|
|
|
|
|
|
purpose: this.form.purpose, |
|
|
|
|
|
|
|
summarize: this.form.summarize, |
|
|
|
|
|
|
|
instructor: this.form.instructor, |
|
|
|
|
|
|
|
reportId: Number(this.reportId), |
|
|
|
reportId: Number(this.reportId), |
|
|
|
experimentalClassName: this.form.experimentalClassName |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
this.$post(`${this.api.modifyReport}`, data) |
|
|
|
this.$post(`${this.api.updateReport}`, data).then(res => { |
|
|
|
.then(res => { |
|
|
|
|
|
|
|
this.editing = false; |
|
|
|
this.editing = false; |
|
|
|
util.successMsg("修改成功"); |
|
|
|
util.successMsg("修改成功"); |
|
|
|
console.log(11, this.form); |
|
|
|
}).catch(err => {}); |
|
|
|
}).catch(err => { |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.editing = true; |
|
|
|
this.editing = true; |
|
|
|
} |
|
|
|
} |
|
|
|