Branch_d40a2540
yujialong 1 year ago
parent 25a23d85d6
commit 5420b23e61
  1. 9
      src/api/index.js
  2. 29
      src/pages/achievement/info/course.vue
  3. 19
      src/pages/achievement/info/project.vue
  4. 4
      src/pages/achievement/list/project.vue
  5. 1
      src/pages/match/add/set.vue
  6. 553
      src/pages/match/manage/matchReport.vue
  7. 76
      src/pages/product/list/index.vue
  8. 4
      src/pages/project/add/index.vue
  9. 6
      src/pages/project/list/index.vue
  10. 3
      src/pages/screen/index.vue
  11. 3
      src/pages/station/preview/index.vue
  12. 2
      src/setting.js
  13. 3
      src/styles/page/station.scss

@ -1,7 +1,7 @@
import Setting from "@/setting"; import Setting from "@/setting";
const host = Setting.apiBaseURL const host = Setting.apiBaseURL
const uploadURL = Setting.upload.apiURL; const uploadURL = Setting.upload.apiURL;
const host2 = 'http://192.168.31.52:9000/' const host2 = 'http://121.37.12.51/'
export default { export default {
queryToken: `liuwanr/userInfo/queryToken`, queryToken: `liuwanr/userInfo/queryToken`,
@ -411,9 +411,10 @@ export default {
detailsOfGoods: `nakadai/mall/detailsOfGoods`, detailsOfGoods: `nakadai/mall/detailsOfGoods`,
addLearningRecord: `nakadai/mallCourseLearningRecord/addLearningRecord`, addLearningRecord: `nakadai/mallCourseLearningRecord/addLearningRecord`,
// 课程管理三级联查 // 课程管理三级联查
courseDiscipline: `nakadai/nakadai/subject/courseDiscipline`, //课程学科类别 courseDiscipline: `nakadai/nakadai/subject/courseDiscipline`,
courseProfessionalClass: `nakadai/nakadai/subject/courseProfessionalClass`, //课程专业类 courseProfessionalClass: `nakadai/nakadai/subject/courseProfessionalClass`,
courseProfessional: `nakadai/nakadai/subject/courseProfessional`, //课程专业 courseProfessional: `nakadai/nakadai/subject/courseProfessional`,
subjectCategoryCited: `nakadai/nakadai/subject/subjectCategoryCited`,
// 营销推广 // 营销推广
listMarketing: `nakadai/nakadai/mall/marketing/promotion/pagingQueryList`, listMarketing: `nakadai/nakadai/mall/marketing/promotion/pagingQueryList`,

@ -48,11 +48,11 @@
<div class="wrong"> <div class="wrong">
<div class="line"> <div class="line">
<span class="jud-name">错误率最高{{ max.projectName }}</span> <span class="jud-name">错误率最高{{ max.projectName }}</span>
<span>参加考试{{ max.numberOfParticipants }}&emsp;&emsp;{{ curTab == 1 ? `${max.itemErrorCount}人做错,` : '' }}错误率{{ max.errorRate }}%</span> <span>参加考试{{ max.numberOfParticipants }}&emsp;&emsp;{{ curTab == 1 ? `${max.itemErrorCount || ''}人做错,` : '' }}错误率{{ max.errorRate }}%</span>
</div> </div>
<div class="line"> <div class="line">
<span class="jud-name">错误率最低{{ min.projectName }}</span> <span class="jud-name">错误率最低{{ min.projectName }}</span>
<span>参加考试{{ min.numberOfParticipants }}&emsp;&emsp;{{ curTab == 1 ? `${min.itemErrorCount}人做错,` : '' }}错误率{{ min.errorRate }}%</span> <span>参加考试{{ min.numberOfParticipants }}&emsp;&emsp;{{ curTab == 1 ? `${min.itemErrorCount || ''}人做错,` : '' }}错误率{{ min.errorRate }}%</span>
</div> </div>
</div> </div>
<div class="chart" <div class="chart"
@ -259,6 +259,7 @@
</template> </template>
<script> <script>
import { Loading } from "element-ui";
import Setting from "@/setting"; import Setting from "@/setting";
import util from "@/libs/util"; import util from "@/libs/util";
import echarts from "echarts"; import echarts from "echarts";
@ -295,7 +296,7 @@ export default {
avgScore: 0, // avgScore: 0, //
maxScore: 0, maxScore: 0,
minScore: 0, minScore: 0,
errorAnalysis: {}, errorAnalysis: [],
max: {}, max: {},
min: {}, min: {},
token: util.local.get(Setting.tokenKey), token: util.local.get(Setting.tokenKey),
@ -306,15 +307,16 @@ export default {
pageSizeDetail: 5, pageSizeDetail: 5,
totalDetail: 0, totalDetail: 0,
curRow: {}, curRow: {},
stageNumber: [] stageNumber: [],
loadIns: null
}; };
}, },
watch: { watch: {
keyword: function (val) { keyword: function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initData(); this.initData()
}, 500); }, 500)
} }
}, },
mounted () { mounted () {
@ -324,6 +326,9 @@ export default {
methods: { methods: {
// //
async getData () { async getData () {
this.loadIns = Loading.service({
background: "rgba(255,255,255,.6)"
})
const per = +this.curTab const per = +this.curTab
const res = await this.$post(this.api.productReadScore, { const res = await this.$post(this.api.productReadScore, {
pageNum: this.page, pageNum: this.page,
@ -346,8 +351,9 @@ export default {
e.errorRate = (+e.errorRate).toFixed(2) e.errorRate = (+e.errorRate).toFixed(2)
}) })
this.errorAnalysis = err this.errorAnalysis = err
this.max = err[0] this.max = err[0] || {}
this.min = err[err.length - 1] this.min = err[err.length - 1] || {}
this.errorChart()
const { row } = this.$store.state.achievement const { row } = this.$store.state.achievement
row && this.$nextTick(() => { row && this.$nextTick(() => {
window.scrollTo(0, document.documentElement.scrollHeight) window.scrollTo(0, document.documentElement.scrollHeight)
@ -356,7 +362,6 @@ export default {
}) })
this.handlePage() this.handlePage()
this.getChart() this.getChart()
this.errorChart()
}, },
initData () { initData () {
this.page = 1 this.page = 1
@ -520,7 +525,7 @@ export default {
toReport (row) { toReport (row) {
this.$store.commit('achievement/setRow', this.curRow) this.$store.commit('achievement/setRow', this.curRow)
// //
this.$router.push(this.curTab == 1 ? `show?reportId=${row.reportId}` : `project?id=${row.projectId}&projectName=${row.goodsName}&classId=${this.curRow.classId || ''}&workNumber=${row.workNumber || row.userName}`) this.$router.push(this.curTab == 1 ? `show?reportId=${row.reportId}` : `project?id=${row.projectId}&projectName=${row.goodsName}&classId=${this.curRow.classId || ''}&workNumber=${row.workNumber || row.userName}&mallId=${this.id}`)
}, },
getChart () { // 线 getChart () { // 线
const data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] const data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
@ -575,11 +580,13 @@ export default {
areaStyle: {}, areaStyle: {},
color: ["#8191fd"] color: ["#8191fd"]
}] }]
}); })
this.loadIns.close()
}, },
// //
errorChart () { errorChart () {
const data = this.errorAnalysis const data = this.errorAnalysis
console.log("🚀 ~ file: course.vue:585 ~ errorChart ~ data:", data)
const maxFontLength = data.length > 13 ? 6 : 10 const maxFontLength = data.length > 13 ? 6 : 10
const option = { const option = {
tooltip: { tooltip: {

@ -268,6 +268,7 @@
</template> </template>
<script> <script>
import { Loading } from "element-ui";
import Setting from "@/setting"; import Setting from "@/setting";
import util from "@/libs/util"; import util from "@/libs/util";
import echarts from "echarts"; import echarts from "echarts";
@ -281,6 +282,7 @@ export default {
permissions: +this.$route.query.permissions, permissions: +this.$route.query.permissions,
experimentalName: this.$route.query.projectName, experimentalName: this.$route.query.projectName,
id: this.$route.query.id, id: this.$route.query.id,
mallId: this.$route.query.mallId,
workNumber: this.$route.query.workNumber, workNumber: this.$route.query.workNumber,
keyword: "", keyword: "",
searchTimer: null, searchTimer: null,
@ -310,6 +312,7 @@ export default {
pageActivation: 1, pageActivation: 1,
pageSizeActivation: 10, pageSizeActivation: 10,
totalActivation: 0, totalActivation: 0,
loadIns: null
}; };
}, },
components: { components: {
@ -349,10 +352,13 @@ export default {
}, },
// //
async getData () { async getData () {
this.loadIns = Loading.service({
background: "rgba(255,255,255,.6)"
})
// //
const res = this.permissions ? const res = this.permissions ?
await this.$post(`${this.api.getAssessmentDetail}?pageNum=${this.page}&pageSize=10000&assessmentId=${this.id}&classId=${this.classId}&keyword=${this.keyword}`) : await this.$post(`${this.api.getAssessmentDetail}?pageNum=${this.page}&pageSize=10000&assessmentId=${this.id}&classId=${this.classId}&keyword=${this.keyword}&mallId=${this.mallId}`) :
await this.$post(`${this.api.getPracticeDetail}?pageNum=${this.page}&pageSize=10000&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}`) await this.$post(`${this.api.getPracticeDetail}?pageNum=${this.page}&pageSize=10000&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`)
this.listDataAll = res.page.records this.listDataAll = res.page.records
this.total = res.page.total this.total = res.page.total
this.avgScore = (+res.avgScore).toFixed(2) this.avgScore = (+res.avgScore).toFixed(2)
@ -369,7 +375,7 @@ export default {
// //
async getActivity () { async getActivity () {
// //
const { message } = await this.$post(`${this.api.practiceActivity}?pageNum=${this.pageActivation}&pageSize=${this.pageSizeActivation}&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}`) const { message } = await this.$post(`${this.api.practiceActivity}?pageNum=${this.pageActivation}&pageSize=${this.pageSizeActivation}&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`)
this.activations = message.records this.activations = message.records
this.totalActivation = message.total this.totalActivation = message.total
}, },
@ -393,7 +399,7 @@ export default {
// //
let url = this.permissions let url = this.permissions
? `${this.api.exportAssessmentInfo}?assessmentId=${this.id}&classId=${this.classId}` ? `${this.api.exportAssessmentInfo}?assessmentId=${this.id}&classId=${this.classId}`
: `${this.api.exportPracticeInfo}?projectId=${this.id}` : `${this.api.exportPracticeInfo}?projectId=${this.id}&mallId=${this.mallId}`
// id // id
if (this.multipleSelection.length) { if (this.multipleSelection.length) {
const ids = this.multipleSelection.map(e => e.reportId) const ids = this.multipleSelection.map(e => e.reportId)
@ -493,7 +499,7 @@ export default {
responseType: 'blob' responseType: 'blob'
}) })
} else { } else {
res = await axios.get(`${this.api.exportAllActivity}?projectId=${this.id}`, { res = await axios.get(`${this.api.exportAllActivity}?projectId=${this.id}&mallId=${this.mallId}`, {
headers: { headers: {
token: this.token token: this.token
}, },
@ -535,7 +541,8 @@ export default {
areaStyle: {}, areaStyle: {},
color: ["#8191fd"] color: ["#8191fd"]
}] }]
}); })
this.loadIns.close()
}, },
// //
errorChart () { errorChart () {

@ -268,7 +268,7 @@ export default {
getData () { getData () {
this.loadIns = Loading.service({ this.loadIns = Loading.service({
background: "rgba(255,255,255,.6)" background: "rgba(255,255,255,.6)"
}); })
const per = this.projectPermissions const per = this.projectPermissions
const { mallId } = this const { mallId } = this
const cur = this.curs.find(e => e.mallId == mallId) || {} const cur = this.curs.find(e => e.mallId == mallId) || {}
@ -353,7 +353,7 @@ export default {
}, },
// //
entry (row) { entry (row) {
this.$router.push(`project?id=${row.assessmentId || row.projectId}&projectName=${row.projectName}&permissions=${row.permissions || 0}`) this.$router.push(`project?id=${row.assessmentId || row.projectId}&projectName=${row.projectName}&permissions=${row.permissions || 0}&mallId=${this.mallId}`)
}, },
handleDelete (row) { // handleDelete (row) { //
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", { this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", {

@ -176,6 +176,7 @@ export default {
// //
const first = res.data[0] const first = res.data[0]
this.mallIds = [mallId || first.mallId, systemId || data[0].id] this.mallIds = [mallId || first.mallId, systemId || data[0].id]
this.form.mallId = mallId || first.mallId
this.form.cid = cid || first.cid this.form.cid = cid || first.cid
this.sysId = systemId || first.systemId this.sysId = systemId || first.systemId
this.loadIns = Loading.service() this.loadIns = Loading.service()

@ -1,239 +1,303 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover"
<el-page-header @back="$router.back()" content="查看报告"></el-page-header> class="m-b-20">
</el-card> <el-page-header @back="$router.back()"
content="查看报告"></el-page-header>
</el-card>
<div class="content"> <div class="content">
<div class="text-right"> <div class="text-right">
<el-button type="primary" @click="exportPage">导出报告</el-button> <el-button type="primary"
@click="exportPage">导出报告</el-button>
</div>
<h6 class="r-title">标准实验报告</h6>
<div class="info">
<h6 class="l-title">
<img src="@/assets/img/info1.png"
alt="">
基本信息
</h6>
<ul :class="['info-list', {edit: editing}]">
<li>
<label>学生姓名</label>
<el-input v-if="editing"
v-model="infoData.userName"
disabled></el-input>
<span v-else>{{ infoData.userName }}</span>
</li>
<li>
<label>学生学号</label>
<el-input v-if="editing"
v-model="infoData.workNumber"
disabled></el-input>
<span v-else>{{ infoData.workNumber }}</span>
</li>
<li>
<label>实验时间</label>
<el-input v-if="editing"
v-model="infoData.submitTime"
disabled></el-input>
<span v-else>{{ infoData.submitTime }}</span>
</li>
<li>
<label>实验成绩</label>
<el-input v-if="editing"
v-model="infoData.score"
disabled></el-input>
<div v-else
class="score-wrap">
<em>{{ infoData.score }}</em>
<img src="@/assets/img/point.png"
alt="">
</div> </div>
<h6 class="r-title">标准实验报告</h6> </li>
<div class="info"> <li>
<h6 class="l-title"> <label>学生班级</label>
<img src="@/assets/img/info1.png" alt=""> <el-input v-if="editing"
基本信息 v-model="infoData.className"></el-input>
</h6> <span v-else>{{ infoData.className }}</span>
<ul :class="['info-list', {edit: editing}]"> </li>
<li> <li>
<label>学生姓名</label> <label>指导老师</label>
<el-input v-if="editing" v-model="infoData.userName" disabled></el-input> <el-input v-if="editing"
<span v-else>{{ infoData.userName }}</span> v-model="infoData.instructor"></el-input>
</li> <span v-else>{{ infoData.instructor }}</span>
<li> </li>
<label>学生学号</label> <li>
<el-input v-if="editing" v-model="infoData.workNumber" disabled></el-input> <label>实验学时</label>
<span v-else>{{ infoData.workNumber }}</span> <el-input v-if="editing"
</li> v-model="infoData.period"></el-input>
<li> <span v-else>{{ infoData.period }}</span>
<label>实验时间</label> </li>
<el-input v-if="editing" v-model="infoData.submitTime" disabled></el-input> </ul>
<span v-else>{{ infoData.submitTime }}</span> <div class="m-b-20">
</li> <h6 class="l-title">
<li> <img src="@/assets/img/report2.png"
<label>实验成绩</label> alt="">
<el-input v-if="editing" v-model="infoData.score" disabled></el-input> 实验项目名称
<div v-else class="score-wrap"> </h6>
<em>{{ infoData.score }}</em> <el-input v-if="editing"
<img src="@/assets/img/point.png" alt=""> v-model="form.projectName"
</div> type="textarea"></el-input>
</li> <div v-else
<li> class="pre-wrap"
<label>学生班级</label> v-html="form.projectName"></div>
<el-input v-if="editing" v-model="infoData.className"></el-input> </div>
<span v-else>{{ infoData.className }}</span> <div class="m-b-20">
</li> <h6 class="l-title">
<li> <img src="@/assets/img/report3.png"
<label>指导老师</label> alt="">
<el-input v-if="editing" v-model="infoData.instructor"></el-input> 实验目的
<span v-else>{{ infoData.instructor }}</span> </h6>
</li> <div :class="['pre-wrap', {edit: editing}]"
<li> v-html="form.purpose"></div>
<label>实验学时</label> </div>
<el-input v-if="editing" v-model="infoData.period"></el-input> <div class="m-b-20">
<span v-else>{{ infoData.period }}</span> <h6 class="l-title">
</li> <img src="@/assets/img/report4.png"
</ul> alt="">
<div class="m-b-20"> 实验数据
<h6 class="l-title"> </h6>
<img src="@/assets/img/report2.png" alt=""> <el-table :data="expData"
实验项目名称 class="table"
</h6> border
<el-input v-if="editing" v-model="form.projectName" type="textarea"></el-input> stripe
<div v-else class="pre-wrap" v-html="form.projectName"></div> header-align="center">
</div> <el-table-column type="index"
<div class="m-b-20"> label="序号"
<h6 class="l-title"> align="center"
<img src="@/assets/img/report3.png" alt=""> width="60">
实验目的 <template slot-scope="scope">
</h6> {{ scope.$index + 1 }}
<div :class="['pre-wrap', {edit: editing}]" v-html="form.purpose"></div> </template>
</el-table-column>
<el-table-column prop="judgmentName"
label="判分点"
width="270"
align="center"></el-table-column>
<el-table-column v-if='project'
prop="judgmentName"
label="考核点"
align="center"
width="150">
<template slot-scope="scope">
<div v-for="(item, index) in scope.row.lcRuleRecords"
:key="index">
<span>
<span>{{index+1}}. </span>{{item.name}}
</span>
</div> </div>
<div class="m-b-20"> </template>
<h6 class="l-title"> </el-table-column>
<img src="@/assets/img/report4.png" alt=""> <el-table-column prop="ruleAnswer"
实验数据 label="参考答案"
</h6> style='word-wrap: break-word'>
<el-table :data="expData" class="table" border stripe header-align="center"> <template slot-scope="scope">
<el-table-column type="index" label="序号" align="center" width="60"> <div v-if='scope.row.lcRuleRecords'>
<template slot-scope="scope"> <div v-for="(item, index) in scope.row.lcRuleRecords"
{{ scope.$index + 1 }} :key="index">
</template> <span>
</el-table-column> <span>{{index+1}}. </span>{{item.ruleAnswer}}
<el-table-column prop="judgmentName" label="判分点" width="270" align="center"></el-table-column> </span>
<el-table-column v-if='project' prop="judgmentName" label="考核点" align="center" width="150"> </div>
<template slot-scope="scope">
<div v-for="(item, index) in scope.row.lcRuleRecords" :key="index">
<span>
<span>{{index+1}}. </span>{{item.name}}
</span>
</div>
</template>
</el-table-column>
<el-table-column prop="ruleAnswer" label="参考答案" style='word-wrap: break-word'>
<template slot-scope="scope">
<div v-if='scope.row.lcRuleRecords'>
<div v-for="(item, index) in scope.row.lcRuleRecords" :key="index">
<span>
<span>{{index+1}}. </span>{{item.ruleAnswer}}
</span>
</div>
</div>
<div v-else v-html="scope.row.referenceAnswer"></div>
</template>
</el-table-column>
<el-table-column prop="userAnswer" label="学生答案">
<template slot-scope="scope">
<div v-if='scope.row.lcRuleRecords'>
<div v-for="(item, index) in scope.row.lcRuleRecords" :key="index">
<span v-if='item.userAnswer'>
<span>{{index+1}}. </span>{{item.userAnswer}}
</span>
<span v-else>
<span>{{index+1}}. </span>未填写
</span>
</div>
</div>
<div v-else v-html='scope.row.answer' style='white-space: pre-wrap'></div>
<template v-if="scope.row.runThePictureList">
<img v-for="(img, i) in scope.row.runThePictureList" :key="i" width="200" class="result-pic" :src="img" alt="">
</template>
</template>
</el-table-column>
<el-table-column prop="score" label="得分" width="80" align="center"></el-table-column>
</el-table>
</div> </div>
<div class="m-b-20"> <div v-else
<h6 class="l-title"> v-html="scope.row.referenceAnswer"></div>
<img src="@/assets/img/report5.png" alt=""> </template>
实验总结与体会 </el-table-column>
</h6> <el-table-column prop="userAnswer"
<quill v-if="editing" :border="true" v-model="form.summarize" :minHeight="150" :height="150" /> label="学生答案">
<div v-else class="pre-wrap" v-html="form.summarize"></div> <template slot-scope="scope">
<div v-if='scope.row.lcRuleRecords'>
<div v-for="(item, index) in scope.row.lcRuleRecords"
:key="index">
<span v-if='item.userAnswer'>
<span>{{index+1}}. </span>{{item.userAnswer}}
</span>
<span v-else>
<span>{{index+1}}. </span>未填写
</span>
</div>
</div> </div>
</div> <div v-else
v-html='scope.row.answer'
style='white-space: pre-wrap'></div>
<template v-if="scope.row.runThePictureList">
<img v-for="(img, i) in scope.row.runThePictureList"
:key="i"
width="200"
class="result-pic"
:src="img"
alt="">
</template>
</template>
</el-table-column>
<el-table-column prop="score"
label="得分"
width="80"
align="center"></el-table-column>
</el-table>
</div>
<div class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report5.png"
alt="">
实验总结与体会
</h6>
<quill v-if="editing"
:border="true"
v-model="form.summarize"
:minHeight="150"
:height="150" />
<div v-else
class="pre-wrap"
v-html="form.summarize"></div>
</div> </div>
</div>
</div> </div>
</div>
</template> </template>
<script> <script>
import util from "@/libs/util"; import util from "@/libs/util";
export default { export default {
data() { data () {
return { return {
reportId: this.$route.query.reportId, reportId: this.$route.query.reportId,
title: "实验报告", title: "实验报告",
form: { form: {
className: "", className: "",
instructor: "", instructor: "",
period: "", period: "",
projectName: "", projectName: "",
summarize: "", summarize: "",
}, },
infoData: {}, infoData: {},
expData: [], expData: [],
editing: false, editing: false,
loadIns: null, loadIns: null,
loading: false, loading: false,
project:false, project: false,
userScores: [] userScores: []
}; };
}, },
mounted() { mounted () {
this.getData() this.getData()
},
methods: {
getData () { //
this.$get(`${this.api.reportDetail}?reportId=${this.reportId}`).then(({ report, userScores }) => {
this.form = report
this.expData = userScores
this.project = this.expData.find(e => e.lcRuleRecords) // lcRuleRecords
let form = this.form;
this.infoData = {
workNumber: form.workNumber,
experimentalClassName: form.experimentalClassName,
instructor: form.instructor,
period: form.period,
laboratory: form.laboratory,
submitTime: form.submitTime,
score: form.score,
className: form.className,
userName: form.userName
}
const data = report.data
this.userScores = userScores
// data使
if (!data) {
this.handleList(userScores)
this.$post(this.api.editExperimentalData, {
reportId,
data: JSON.stringify(userScores)
}).then(res => { }).catch(err => { })
} else {
this.handleList(userScores.find(e => e.lcRuleRecords) ? userScores : JSON.parse(data))
}
}).catch(res => { })
}, },
methods: { //
getData() { // handleList (list) {
this.$get(`${this.api.reportDetail}?reportId=${this.reportId}`).then(({ report, userScores }) => { this.project = list.find(e => e.lcRuleRecords) // lcRuleRecords
this.form = report if (this.project) {
this.expData = userScores list.map(e => {
this.project = this.expData.find(e => e.lcRuleRecords) // lcRuleRecords e.assessmentPoint = ''
let form = this.form; e.referenceAnswer = ''
this.infoData = { e.answer = ''
workNumber: form.workNumber, e.lcRuleRecords.map((n, i) => {
experimentalClassName: form.experimentalClassName, e.assessmentPoint += `${i + 1}.${n.name}`
instructor: form.instructor, e.referenceAnswer += `${i + 1}.${n.ruleAnswer}`
period: form.period, e.answer += `${i + 1}.${n.userAnswer}`
laboratory: form.laboratory,
submitTime: form.submitTime,
score: form.score,
userName: form.userName
}
const data = report.data
this.userScores = userScores
// data使
if (!data) {
this.handleList(userScores)
this.$post(this.api.editExperimentalData, {
reportId,
data: JSON.stringify(userScores)
}).then(res => {}).catch(err => {})
} else {
this.handleList(userScores.find(e => e.lcRuleRecords) ? userScores : JSON.parse(data))
}
}).catch(res => {})
},
//
handleList(list) {
this.project = list.find(e => e.lcRuleRecords) // lcRuleRecords
if (this.project) {
list.map(e => {
e.assessmentPoint = ''
e.referenceAnswer = ''
e.answer = ''
e.lcRuleRecords.map((n, i) => {
e.assessmentPoint += `${i + 1}.${n.name}`
e.referenceAnswer += `${i + 1}.${n.ruleAnswer}`
e.answer += `${i + 1}.${n.userAnswer}`
})
})
}
this.expData = list
},
exportPage() {
const form = Object.assign(this.form, this.infoData)
const list = JSON.parse(JSON.stringify(this.expData))
list.map((e, i) => {
const item = this.userScores.find(n => n.judgmentId == e.judgmentId)
if (item && item.runThePicture) e.runThePicture = item.runThePicture
if (item && item.runThePictureList) e.runThePictureList = item.runThePictureList
e.id = i + 1
// if (e.referenceAnswer && typeof e.referenceAnswer === 'string') e.referenceAnswer = e.referenceAnswer.replace(/<[^>]+>/g, '').replace(/(&nbsp;|&amp;|%s)/g, '').replace(/>/g, '&gt;').replace(/</g, '&lt;')
if (e.answer && typeof e.answer === 'string') e.answer = e.answer.replace(/<[^>]+>/g, '').replace(/(&nbsp;|&amp;|%s)/g, '').replace(/>/g, '&gt;').replace(/</g, '&lt;')
}) })
for (const i in form) { })
if (form[i] && typeof form[i] === 'string') form[i] = form[i].replace(/<[^>]+>/g, '') }
} this.expData = list
form.purpose = form.purpose.replace(/<[^>]+>/g, '') },
this.$post(this.project ? this.api.exportBankExperimentReport : this.api.exportLabReport, { exportPage () {
...form, const form = Object.assign(this.form, this.infoData)
experimentalData: list const list = JSON.parse(JSON.stringify(this.expData))
}).then(res => { list.map((e, i) => {
console.log(res) const item = this.userScores.find(n => n.judgmentId == e.judgmentId)
util.downloadFileDirect(`实验报告.docx`,new Blob([res])) if (item && item.runThePicture) e.runThePicture = item.runThePicture
}).catch(res => {}) if (item && item.runThePictureList) e.runThePictureList = item.runThePictureList
}, e.id = i + 1
} // if (e.referenceAnswer && typeof e.referenceAnswer === 'string') e.referenceAnswer = e.referenceAnswer.replace(/<[^>]+>/g, '').replace(/(&nbsp;|&amp;|%s)/g, '').replace(/>/g, '&gt;').replace(/</g, '&lt;')
if (e.answer && typeof e.answer === 'string') e.answer = e.answer.replace(/<[^>]+>/g, '').replace(/(&nbsp;|&amp;|%s)/g, '').replace(/>/g, '&gt;').replace(/</g, '&lt;')
})
for (const i in form) {
if (form[i] && typeof form[i] === 'string') form[i] = form[i].replace(/<[^>]+>/g, '')
}
form.purpose = form.purpose.replace(/<[^>]+>/g, '')
this.$post(this.project ? this.api.exportBankExperimentReport : this.api.exportLabReport, {
...form,
experimentalData: list
}).then(res => {
console.log(res)
util.downloadFileDirect(`实验报告.docx`, new Blob([res]))
}).catch(res => { })
},
}
}; };
</script> </script>
@ -242,24 +306,26 @@ export default {
padding: 12px 300px 20px; padding: 12px 300px 20px;
} }
.text-right { .text-right {
text-align: right; text-align: right;
} }
code, kbd, samp{ code,
font-family: 'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif; kbd,
samp {
font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, 'microsoft yahei', arial, STHeiTi, sans-serif;
word-wrap: break-word; word-wrap: break-word;
white-space: pre-wrap; white-space: pre-wrap;
} }
/deep/ pre{ /deep/ pre {
white-space: pre-wrap; /* css-3 */ white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: pre-wrap; /* Opera 4-6 */ white-space: pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */ white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */ word-wrap: break-word; /* Internet Explorer 5.5+ */
word-break:break-all; word-break: break-all;
overflow:hidden; overflow: hidden;
font-size: 12px; font-size: 12px;
font-weight:400; font-weight: 400;
font-family:'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, 'microsoft yahei', arial, STHeiTi, sans-serif;
} }
.content { .content {
padding: 16px 40px; padding: 16px 40px;
@ -275,7 +341,7 @@ code, kbd, samp{
} }
.info { .info {
padding: 20px 16px; padding: 20px 16px;
border: 1px solid #E1E6F2; border: 1px solid #e1e6f2;
} }
.l-title { .l-title {
display: flex; display: flex;
@ -309,7 +375,7 @@ code, kbd, samp{
span { span {
min-width: 150px; min-width: 150px;
padding: 0 10px 3px; padding: 0 10px 3px;
border-bottom: 1px solid #E1E6F2; border-bottom: 1px solid #e1e6f2;
} }
/deep/.el-input { /deep/.el-input {
width: 174px; width: 174px;
@ -318,7 +384,7 @@ code, kbd, samp{
.score-wrap { .score-wrap {
position: relative; position: relative;
min-width: 150px; min-width: 150px;
border-bottom: 1px solid #E1E6F2; border-bottom: 1px solid #e1e6f2;
em { em {
position: absolute; position: absolute;
top: -12px; top: -12px;
@ -326,7 +392,7 @@ code, kbd, samp{
font-family: din; font-family: din;
font-size: 30px; font-size: 30px;
font-weight: 600; font-weight: 600;
color: #0B1D30; color: #0b1d30;
} }
img { img {
position: absolute; position: absolute;
@ -334,16 +400,17 @@ code, kbd, samp{
left: 0; left: 0;
} }
} }
/deep/.el-textarea .el-textarea__inner, .pre-wrap { /deep/.el-textarea .el-textarea__inner,
.pre-wrap {
min-height: 72px; min-height: 72px;
padding: 10px 16px; padding: 10px 16px;
font-size: 14px; font-size: 14px;
color: #333; color: #333;
&.edit { &.edit {
color: #ABB3C6; color: #abb3c6;
border: 1px solid #CACFDB; border: 1px solid #cacfdb;
border-radius: 4px; border-radius: 4px;
background-color: #F6F7F9; background-color: #f6f7f9;
} }
} }
/deep/ .table th { /deep/ .table th {
@ -355,7 +422,7 @@ code, kbd, samp{
} }
} }
.result-pic { .result-pic {
margin: 10px 0; margin: 10px 0;
} }
@media (max-width: 1650px) { @media (max-width: 1650px) {
.wrap { .wrap {

@ -379,46 +379,32 @@ export default {
// //
async getSubject () { async getSubject () {
// //
this.$get(this.api.courseDiscipline).then(({ list }) => { this.$get(this.api.subjectCategoryCited).then(({ list }) => {
list = list.filter(e => e.level > 1).slice(1) // level>1
const result = [] const result = []
const promises = [] const promises = []
list = list.filter(e => e.disciplineId != 1)
list.map((e, i) => { list.map((e, i) => {
promises.push(new Promise((resolve, reject) => { //
// e.professionalClasses.map(e => {
this.$get(this.api.courseProfessionalClass, { e.value = e.professionalClassId
disciplineId: e.disciplineId e.label = e.professionalClassName
}).then(({ list }) => {
list = list.filter(e => e.level > 1)
list.map(e => {
e.value = e.professionalClassId
e.label = e.professionalClassName
// //
this.$get(this.api.courseProfessional, { e.professionals.map(e => {
professionalClassId: e.value e.value = e.professionalId
}).then(({ list }) => { e.label = e.professionalName
list = list.filter(e => e.level > 1) })
list.map(e => { e.children = e.professionals
e.value = e.professionalId })
e.label = e.professionalName result.push({
}) val: [],
if (list.length) e.children = list disciplineId: e.disciplineId,
resolve() name: e.disciplineName,
}).catch(err => { }) categoryName: e.disciplineName,
}) list: e.professionalClasses
result.push({ })
val: [],
disciplineId: e.disciplineId,
name: e.disciplineName,
categoryName: e.disciplineName,
list
})
}).catch(err => { })
}))
}) })
Promise.all(promises).then(_ => { Promise.all(promises).then(_ => {
console.log("🚀 ~ file: index.vue:378 ~ this.$get ~ result:", result) console.log("🚀 ~ file: index.vue:378 ~ this.$get ~ result:", result)
this.category = result this.category = result
@ -451,28 +437,6 @@ export default {
this.professionalId = val[1] || '' this.professionalId = val[1] || ''
this.initData() this.initData()
}, },
getProfessionalClassData (id) {
const i = id === 1 ? 1 : 0
this.$get(this.api.courseProfessionalClass, {
disciplineId: id || this.categoryId
}).then(({ list }) => {
this.professionalClassList = list.slice(i)
if (id) this.professionalCategoryId = list[i].professionalClassId
this.getProfessionalData(list[i].professionalClassId)
}).catch(err => { })
},
//
getProfessionalData (id) {
const i = id === 1 ? 1 : 0
this.$get(this.api.courseProfessional, {
professionalClassId: id || this.professionalCategoryId
}).then(({ list }) => {
this.professionalList = list.slice(i)
if (id) this.professionalId = list[i].professionalId
this.handleCategoryName()
this.initData()
}).catch(err => { })
},
// name // name
handleCategoryName () { handleCategoryName () {
if (this.subjectList.length) { if (this.subjectList.length) {

@ -47,7 +47,7 @@
placeholder="20个字符以内" placeholder="20个字符以内"
@blur="projectNameExistis"></el-input> @blur="projectNameExistis"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="项目权限"> <el-form-item label="项目用途">
<el-select v-model="projectManage.permissions" <el-select v-model="projectManage.permissions"
placeholder="请选择" placeholder="请选择"
@change="permissionChange"> @change="permissionChange">
@ -302,7 +302,7 @@ export default {
projectManage: { projectManage: {
founder: 1, // (0 1) founder: 1, // (0 1)
projectName: "", // projectName: "", //
permissions: 0, // (0 1 2) permissions: 0, // (0 1 2)
systemId: this.$store.state.project.lastSystemId, // id systemId: this.$store.state.project.lastSystemId, // id
mallId: '', mallId: '',
hintOpen: 0, // (0 1 0) hintOpen: 0, // (0 1 0)

@ -34,7 +34,7 @@
</el-select> </el-select>
</li> </li>
<li> <li>
<label>权限</label> <label>用途</label>
<el-select v-model="queryData.permissions" <el-select v-model="queryData.permissions"
placeholder="请选择" placeholder="请选择"
@change="initData"> @change="initData">
@ -99,7 +99,7 @@
{{ founderKeys[scope.row.founder] }} {{ founderKeys[scope.row.founder] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="权限" <el-table-column label="用途"
min-width="120" min-width="120"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -225,7 +225,7 @@ export default {
platformId: 1, // :1 :3 platformId: 1, // :1 :3
founder: +this.$route.query.founder || 2, // (0: 1: 2:) founder: +this.$route.query.founder || 2, // (0: 1: 2:)
state: "", // (0:稿 1:) state: "", // (0:稿 1:)
permissions: "", // (0: 1: 2:) permissions: "", // (0: 1: 2:)
cid: '', cid: '',
mallId: '' mallId: ''
}, },

@ -475,6 +475,9 @@ export default {
// //
this.$post(this.api.activityRanking).then(({ list }) => { this.$post(this.api.activityRanking).then(({ list }) => {
list.sort((a, b) => {
return +b.activityIndex - +a.activityIndex
})
this.actives = list this.actives = list
}).catch(res => { }) }).catch(res => { })
this.scrollTable() this.scrollTable()

@ -1300,7 +1300,8 @@ $height: 700px;
background-color: #fff; background-color: #fff;
.title { .title {
margin-bottom: 10px; margin-bottom: 10px;
font-size: 16px; font-size: 15px;
font-weight: 400;
} }
.arches { .arches {
margin-top: 20px; margin-top: 20px;

@ -26,7 +26,7 @@ if (isPro) {
uploadURL = `http://121.37.12.51/` uploadURL = `http://121.37.12.51/`
host = "http://121.37.12.51/"; // 中台测试服 host = "http://121.37.12.51/"; // 中台测试服
// host = 'https://www.occupationlab.com/' // 正式服 // host = 'https://www.occupationlab.com/' // 正式服
host = "http://192.168.31.217:9000/"; // 榕 // host = "http://192.168.31.217:9000/"; // 榕
// host = 'http://192.168.31.51:9000/'; // 赓 // host = 'http://192.168.31.51:9000/'; // 赓
} }

@ -26,6 +26,9 @@
color: rgba(0, 0, 0, 0.45); color: rgba(0, 0, 0, 0.45);
font-size: 14px; font-size: 14px;
} }
/deep/img {
max-width: 95%;
}
} }
.reply-name { .reply-name {
color: #9076ff; color: #9076ff;

Loading…
Cancel
Save