alioss V2.3.1
yujialong 2 years ago
parent 9fcff50232
commit 6a87d478c5
  1. 4
      src/layouts/header/index.vue
  2. 1
      src/pages/ass/list/index.vue
  3. 1
      src/pages/match/details/index.vue
  4. 1
      src/pages/match/list/index.vue
  5. 785
      src/pages/record/show/index.vue
  6. 171
      src/pages/station/list/index.vue
  7. 15
      src/pages/station/preview/index.vue

@ -150,8 +150,8 @@ export default {
},
initSocket ({ id, account }) {
// socket
// this.socket = new WebSocket(`ws://${Setting.isDev ? '192.168.31.51' : location.host}:9100/nakadai/websocket/${id}/${account}`)
this.socket = new WebSocket(`ws://121.37.12.51:9100/nakadai/websocket/${id}/${account}`)
this.socket = new WebSocket(`wss://${Setting.isDev ? '192.168.31.51' : location.host}/nakadai/websocket/${id}/${account}`)
// this.socket = new WebSocket(`ws://121.37.12.51:9100/nakadai/websocket/${id}/${account}`)
// socket
this.socket.onopen = this.open;
// socket

@ -507,6 +507,7 @@ export default {
util.cookies.set('fromManager', '', -1)
util.cookies.set('competitionId', '', -1)
util.cookies.set('isSubmit', '', -1)
util.cookies.set('language', '', -1)
let href = ''
if (curriculumId == 11) {
href = `${Setting.systemPath}/#/index/list?token=${token}&cid=${this.cid}&systemId=${this.systemId}&projectId=${this.projectId}&assessmentId=${this.assessmentId}&classId=${this.classId}&stopTime=${this.stopTime}`;

@ -1433,6 +1433,7 @@ export default {
util.cookies.set('resultsDetails', form.resultsDetails)
util.cookies.set('resultAnnouncementTime', form.resultAnnouncementTime)
util.cookies.set('fromManager', '', -1)
util.cookies.set('language', '', -1)
// 8pythoncookiesystemId
location.href = process.env.NODE_ENV === 'development' ?
`http://${location.hostname}:8085/#/` :

@ -783,6 +783,7 @@ export default {
util.cookies.set('resultAnnouncementTime', form.resultAnnouncementTime)
util.cookies.set('fromManager', '', -1)
util.cookies.set('isSubmit', '', -1)
util.cookies.set('language', '', -1)
// 8pythoncookiesystemId
location.href = process.env.NODE_ENV === 'development' ?
`http://${location.hostname}:8085/#/` :

@ -1,164 +1,241 @@
<template>
<!-- 实验报告 -->
<div class="wrap">
<div class="breadcrumb">
<el-breadcrumb separator=">">
<template v-for="(item, i) in breadPath">
<el-breadcrumb-item
v-if="!i"
:key="i"
:to="{ path: matchId ? '/match' : 'list' }">
{{item}}
</el-breadcrumb-item>
<el-breadcrumb-item
v-else-if="breadPath.length > 2 && i === 1"
:to="{ path: matchId ? '/match/details' : 'details', query: matchId ? { id: matchId } : { curriculumId, projectId } }"
:key="i">
{{item}}
</el-breadcrumb-item>
<el-breadcrumb-item
v-else
:key="i">
{{item}}
</el-breadcrumb-item>
</template>
</el-breadcrumb>
</div>
<div class="content" :class="{loading}" id="pdfDom">
<div class="text-right" v-if="!loading">
<el-button @click="editReport">
{{ editing ? "保存" : "编辑" }}
</el-button>
<el-button type="primary" @click="exportPage">导出报告</el-button>
<!-- 实验报告 -->
<div class="wrap">
<div class="breadcrumb">
<el-breadcrumb separator=">">
<template v-for="(item, i) in breadPath">
<el-breadcrumb-item v-if="!i"
:key="i"
:to="{ path: matchId ? '/match' : 'list' }">
{{item}}
</el-breadcrumb-item>
<el-breadcrumb-item v-else-if="breadPath.length > 2 && i === 1"
:to="{ path: matchId ? '/match/details' : 'details', query: matchId ? { id: matchId } : { curriculumId, projectId } }"
:key="i">
{{item}}
</el-breadcrumb-item>
<el-breadcrumb-item v-else
:key="i">
{{item}}
</el-breadcrumb-item>
</template>
</el-breadcrumb>
</div>
<div class="content"
:class="{loading}"
id="pdfDom">
<div class="text-right"
v-if="!loading">
<el-button @click="editReport">
{{ editing ? "保存" : "编辑" }}
</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/report1.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>
<h6 class="r-title">标准实验报告</h6>
<div class="info">
<h6 class="l-title">
<img src="@/assets/img/report1.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>
</li>
<li>
<label>学生班级</label>
<el-input v-if="editing" v-model="infoData.className"></el-input>
<span v-else>{{ infoData.className }}</span>
</li>
<li>
<label>指导老师</label>
<el-input v-if="editing" v-model="infoData.instructor"></el-input>
<span v-else>{{ infoData.instructor }}</span>
</li>
<li>
<label>实验学时</label>
<el-input v-if="editing" v-model="infoData.period"></el-input>
<span v-else>{{ infoData.period }}</span>
</li>
</ul>
<div class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report2.png" alt="">
实验项目名称
</h6>
<el-input v-if="editing" v-model="infoData.projectName" type="textarea"></el-input>
<div v-else class="pre-wrap" v-html="infoData.projectName"></div>
</div>
<div class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report3.png" alt="">
实验目的
</h6>
<quill v-if="editing" :border="true" v-model="infoData.purpose" :height="150" />
<div v-else :class="['pre-wrap', {edit: editing}]" v-html="infoData.purpose"></div>
</li>
<li>
<label>学生班级</label>
<el-input v-if="editing"
v-model="infoData.className"></el-input>
<span v-else>{{ infoData.className }}</span>
</li>
<li>
<label>指导老师</label>
<el-input v-if="editing"
v-model="infoData.instructor"></el-input>
<span v-else>{{ infoData.instructor }}</span>
</li>
<li>
<label>实验学时</label>
<el-input v-if="editing"
v-model="infoData.period"></el-input>
<span v-else>{{ infoData.period }}</span>
</li>
</ul>
<div class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report2.png"
alt="">
实验项目名称
</h6>
<el-input v-if="editing"
v-model="infoData.projectName"
type="textarea"></el-input>
<div v-else
class="pre-wrap"
v-html="infoData.projectName"></div>
</div>
<div class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report3.png"
alt="">
实验目的
</h6>
<quill v-if="editing"
:border="true"
v-model="infoData.purpose"
:height="150" />
<div v-else
:class="['pre-wrap', {edit: editing}]"
v-html="infoData.purpose"></div>
</div>
<div class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report4.png"
alt="">
实验数据
</h6>
<el-table :data="expData"
class="table"
border
stripe
header-align="center">
<el-table-column type="index"
label="序号"
align="center"
width="60">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="judgmentName"
label="判分点"
width="200"
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 class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report4.png" alt="">
实验数据
</h6>
<el-table :data="expData" class="table" border stripe header-align="center">
<el-table-column type="index" label="序号" align="center" width="60">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</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>
</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="quesScore" label="分值" width="80" align="center"></el-table-column>
<el-table-column prop="score" label="得分" width="80" align="center"></el-table-column>
</el-table>
</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 class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report5.png" alt="">
实验总结与体会
</h6>
<quill v-if="editing" :border="true" v-model="infoData.summarize" :height="150" :index="1" />
<div v-else class="pre-wrap" v-html="infoData.summarize"></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>
<div v-else
v-html='scope.row.answer'
style='white-space: pre-wrap'></div>
</template>
</el-table-column>
<el-table-column prop="runResult"
label="学生运行结果"
align="center">
<template slot-scope="scope">
<div class="m-b-20"
v-html='scope.row.runResult'
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="quesScore"
label="分值"
width="80"
align="center"></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="infoData.summarize"
:height="150"
:index="1" />
<div v-else
class="pre-wrap"
v-html="infoData.summarize"></div>
</div>
</div>
</div>
</div>
</template>
<script>
@ -169,212 +246,219 @@ import util from "@/libs/util";
import breadcrumb from '@/components/breadcrumb'
import quill from "@/components/quill";
export default {
data() {
return {
reportId: this.$route.query.reportId,
curriculumId: this.$route.query.curriculumId,
projectId: this.$route.query.projectId,
matchId: this.$route.query.matchId, //
matchName: this.$route.query.matchName, //
breadPath: ['实验记录', '实验情况', '实验报告'],
title: "实验报告",
form: {},
infoData: {},
expData: [],
editing: false,
loadIns: null,
loading: false,
project:false,
userScores: [],
quills: [],
quillIndex1: 0,
quillIndex2: 1,
};
},
components: {
breadcrumb,
quill,
},
mounted() {
this.getData()
},
methods: {
getData() { //
const { reportId } = this
this.$get(`${this.api.reportDetail}?reportId=${reportId}`).then(({ report, userScores }) => {
this.form = report
const form = this.form
this.infoData = {
reportId,
className: form.className,
workNumber: form.workNumber,
experimentalClassName: form.experimentalClassName,
instructor: form.instructor,
period: form.period,
laboratory: form.laboratory,
submitTime: form.submitTime,
score: form.score,
userName: form.userName,
projectName: form.projectName,
purpose: form.purpose,
summarize: form.summarize
}
//
form.assessmentId ?
(this.breadPath = ['实验记录', '实验报告']) :
this.matchName && (this.breadPath = ['全部赛事', this.matchName, '实验报告'])
data () {
return {
reportId: this.$route.query.reportId,
curriculumId: this.$route.query.curriculumId,
projectId: this.$route.query.projectId,
matchId: this.$route.query.matchId, //
matchName: this.$route.query.matchName, //
breadPath: ['实验记录', '实验情况', '实验报告'],
title: "实验报告",
form: {},
infoData: {},
expData: [],
editing: false,
loadIns: null,
loading: false,
project: false,
userScores: [],
quills: [],
quillIndex1: 0,
quillIndex2: 1,
};
},
components: {
breadcrumb,
quill,
},
mounted () {
this.getData()
},
methods: {
getData () { //
const { reportId } = this
this.$get(`${this.api.reportDetail}?reportId=${reportId}`).then(({ report, userScores }) => {
this.form = report
const form = this.form
this.infoData = {
reportId,
className: form.className,
workNumber: form.workNumber,
experimentalClassName: form.experimentalClassName,
instructor: form.instructor,
period: form.period,
laboratory: form.laboratory,
submitTime: form.submitTime,
score: form.score,
userName: form.userName,
projectName: form.projectName,
purpose: form.purpose,
summarize: form.summarize
}
//
form.assessmentId ?
(this.breadPath = ['实验记录', '实验报告']) :
this.matchName && (this.breadPath = ['全部赛事', this.matchName, '实验报告'])
const { data } = report
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}`
})
})
} else { // pythonuserScores
list.forEach(e => {
const item = this.userScores.find(n => n.judgmentId == e.judgmentId)
if (item && item.runThePictureList) e.runThePictureList = item.runThePictureList
})
}
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;')
const { data } = report
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}`
})
for (const i in form) {
if (form[i] && typeof form[i] === 'string') form[i] = form[i].replace(/<[^>]+>/g, '')
})
} else { // pythonuserScores
list.forEach(e => {
// e.runResult = e.runResult
const item = this.userScores.find(n => n.judgmentId == e.judgmentId)
if (item && item.runThePictureList) {
if (item.runThePictureList) e.runThePictureList = item.runThePictureList
if (item.runResult) e.runResult = item.runResult
}
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 => {})
},
exportPage1() { //
this.loading = true;
this.loadIns = Loading.service({
background: "#fff"
});
const edit = this.editing // false
this.editing = false
document.querySelector("#pdfDom").scrollTop = 0;
var title = this.title;
let dom = document.querySelector("#pdfDom");
setTimeout(() => {
html2Canvas(dom, {
height: dom.scrollHeight,
allowTaint: true
}).then((canvas) => {
let contentWidth = canvas.width;
let contentHeight = canvas.height;
let imgWidth = 595.28
let pageHeight = contentWidth / imgWidth * 841.89;
let leftHeight = contentHeight;
let position = 0;
let imgHeight = imgWidth / contentWidth * contentHeight;
let pageData = canvas.toDataURL("image/jpeg", 1.0);
let PDF = new JsPDF("", "pt", "a4");
if (leftHeight < pageHeight) {
PDF.addImage(pageData, "JPEG", 0, 0, imgWidth, imgHeight);
} else {
while (leftHeight > 0) {
PDF.addImage(pageData, "JPEG", 0, position, imgWidth, imgHeight);
leftHeight -= pageHeight;
position -= 841.89;
if (leftHeight > 0) {
PDF.addPage();
}
}
}
this.editing = edit
this.loadIns.close();
this.loading = false;
PDF.save(title + ".pdf");
}
);
}, 1000);
},
editReport() { //
if (this.editing) {
this.$post(`${this.api.updateReport}`, this.infoData).then(res => {
this.editing = false;
util.successMsg("修改成功");
}).catch(err => {});
} else {
this.editing = true;
})
}
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, '')
}
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 => { })
},
exportPage1 () { //
this.loading = true;
this.loadIns = Loading.service({
background: "#fff"
});
const edit = this.editing // false
this.editing = false
document.querySelector("#pdfDom").scrollTop = 0;
var title = this.title;
let dom = document.querySelector("#pdfDom");
setTimeout(() => {
html2Canvas(dom, {
height: dom.scrollHeight,
allowTaint: true
}).then((canvas) => {
let contentWidth = canvas.width;
let contentHeight = canvas.height;
let imgWidth = 595.28
let pageHeight = contentWidth / imgWidth * 841.89;
let leftHeight = contentHeight;
let position = 0;
let imgHeight = imgWidth / contentWidth * contentHeight;
let pageData = canvas.toDataURL("image/jpeg", 1.0);
let PDF = new JsPDF("", "pt", "a4");
if (leftHeight < pageHeight) {
PDF.addImage(pageData, "JPEG", 0, 0, imgWidth, imgHeight);
} else {
while (leftHeight > 0) {
PDF.addImage(pageData, "JPEG", 0, position, imgWidth, imgHeight);
leftHeight -= pageHeight;
position -= 841.89;
if (leftHeight > 0) {
PDF.addPage();
}
}
}
this.editing = edit
this.loadIns.close();
this.loading = false;
PDF.save(title + ".pdf");
}
);
}, 1000);
},
editReport () { //
if (this.editing) {
this.$post(`${this.api.updateReport}`, this.infoData).then(res => {
this.editing = false;
util.successMsg("修改成功");
}).catch(err => { });
} else {
this.editing = true;
}
}
}
};
</script>
<style lang="scss" scoped>
.breadcrumb {
margin: 4px 0 16px;
/deep/.el-breadcrumb__item {
.is-link, .el-breadcrumb__separator {
font-weight: 400;
color: $main-color;
}
&:last-child {
.is-link {
color: #0B1D30;
}
margin: 4px 0 16px;
/deep/.el-breadcrumb__item {
.is-link,
.el-breadcrumb__separator {
font-weight: 400;
color: $main-color;
}
&:last-child {
.is-link {
color: #0b1d30;
}
}
}
}
}
.wrap {
padding: 12px 300px 20px;
}
code, kbd, samp{
font-family: 'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif;
code,
kbd,
samp {
font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, 'microsoft yahei', arial, STHeiTi, sans-serif;
word-wrap: break-word;
white-space: pre-wrap;
}
/deep/ pre{
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
word-break:break-all;
overflow:hidden;
/deep/ pre {
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
word-break: break-all;
overflow: hidden;
font-size: 12px;
font-weight:400;
font-family:'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif
font-weight: 400;
font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, 'microsoft yahei', arial, STHeiTi, sans-serif;
}
.content {
padding: 16px 40px;
@ -390,11 +474,11 @@ code, kbd, samp{
}
.info {
padding: 20px 16px;
border: 1px solid #E1E6F2;
border: 1px solid #e1e6f2;
}
.l-title {
padding: 5px 8px;
background-color: #F7F9FC;
background-color: #f7f9fc;
}
.info-list {
display: flex;
@ -419,7 +503,7 @@ code, kbd, samp{
span {
min-width: 150px;
padding: 0 10px 3px;
border-bottom: 1px solid #E1E6F2;
border-bottom: 1px solid #e1e6f2;
}
/deep/.el-input {
width: 174px;
@ -428,7 +512,7 @@ code, kbd, samp{
.score-wrap {
position: relative;
min-width: 150px;
border-bottom: 1px solid #E1E6F2;
border-bottom: 1px solid #e1e6f2;
em {
position: absolute;
top: -12px;
@ -436,7 +520,7 @@ code, kbd, samp{
font-family: din;
font-size: 30px;
font-weight: 600;
color: #0B1D30;
color: #0b1d30;
}
img {
position: absolute;
@ -444,16 +528,17 @@ code, kbd, samp{
left: 0;
}
}
/deep/.el-textarea .el-textarea__inner, .pre-wrap {
/deep/.el-textarea .el-textarea__inner,
.pre-wrap {
min-height: 72px;
padding: 10px 16px;
font-size: 14px;
color: #333;
&.edit {
color: #ABB3C6;
border: 1px solid #CACFDB;
color: #abb3c6;
border: 1px solid #cacfdb;
border-radius: 4px;
background-color: #F6F7F9;
background-color: #f6f7f9;
}
}
/deep/ .table th {
@ -465,7 +550,7 @@ code, kbd, samp{
}
}
.result-pic {
margin: 10px 0;
margin: 10px 0;
}
@media (max-width: 1650px) {
.wrap {

@ -1,87 +1,101 @@
<template>
<!-- 实验台 -->
<div class="wrap index">
<div class="search">
<h6>创新实验智能教学</h6>
<div class="input">
<img src="@/assets/img/search.png" alt="">
<input type="text" placeholder="请输入关键词" v-model="keyword">
</div>
<!-- 实验台 -->
<div class="wrap index">
<div class="search">
<h6>创新实验智能教学</h6>
<div class="input">
<img src="@/assets/img/search.png"
alt="">
<input type="text"
placeholder="请输入关键词"
v-model="keyword">
</div>
</div>
<div class="station">
<div class="inner">
<div class="tabs">
<a class="item"
v-for="(item, i) in tabs"
:key="i"
:class="{active: item.id == active}"
@click="tabChange(item)">{{ item.name }}</a>
</div>
<div class="station">
<div class="inner">
<div class="tabs">
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{active: item.id == active}" @click="tabChange(item)">{{ item.name }}</a>
</div>
<div class="curs">
<template v-if="curriculumList.length">
<template v-for="(item,index) in curriculumList">
<div class="item" :title="item.curriculumName" @click="goPreview(item)" :key="index" v-if="!keyword || item.curriculumName.includes(keyword)">
<img :src="item.coverUrl" alt="">
<div class="bottom">
<p class="text"><span>{{ item.goodsName || item.curriculumName }}</span></p>
<a>进入实验</a>
</div>
</div>
</template>
</template>
<div class="empty flex-1" v-else>
<div>
<img src="@/assets/img/none.png" alt="">
<p>暂无数据</p>
</div>
<div class="curs">
<template v-if="curriculumList.length">
<template v-for="(item,index) in curriculumList">
<div class="item"
:title="item.curriculumName"
@click="goPreview(item)"
:key="index"
v-if="!keyword || item.curriculumName.includes(keyword)">
<img :src="item.coverUrl"
alt="">
<div class="bottom">
<p class="text"><span>{{ item.goodsName || item.curriculumName }}</span></p>
<a>进入实验</a>
</div>
</div>
</template>
</template>
<div class="empty flex-1"
v-else>
<div>
<img src="@/assets/img/none.png"
alt="">
<p>暂无数据</p>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import axios from 'axios'
export default {
data() {
return {
keyword: "",
active: 0,
tabs: [
{
id: 0,
name: '实验课程'
},
{
id: 1,
name: '最近使用'
}
],
curriculumList: []
data () {
return {
keyword: "",
active: 0,
tabs: [
{
id: 0,
name: '实验课程'
},
{
id: 1,
name: '最近使用'
}
],
curriculumList: []
}
},
mounted () {
this.getschoolCourse();
},
methods: {
getschoolCourse () { //
this.active ?
this.$post(this.api.recentUse, {
pageNum: 1,
pageSize: 100
}).then(({ page }) => {
this.curriculumList = page.records
}).catch(err => { }) :
this.$get(this.api.schoolCourse).then(res => {
this.curriculumList = res.data;
}).catch(err => { })
},
mounted() {
this.getschoolCourse();
goPreview (item) {
this.$router.push(`/station/preview?courseId=${item.cid}&curriculumName=${item.goodsName}&mallId=${item.mallId || ''}`);
},
methods: {
getschoolCourse() { //
this.active ?
this.$post(this.api.recentUse, {
pageNum: 1,
pageSize: 100
}).then(({ page }) => {
this.curriculumList = page.records
}).catch(err => {}) :
this.$get(this.api.schoolCourse).then(res => {
this.curriculumList = res.data;
}).catch(err => {})
},
goPreview(item) {
this.$router.push(`/station/preview?courseId=${item.cid}&curriculumName=${item.curriculumName}&mallId=${item.mallId || ''}`);
},
// tab
tabChange(item) {
this.active = item.id
this.getschoolCourse()
},
}
// tab
tabChange (item) {
this.active = item.id
this.getschoolCourse()
},
}
};
</script>
@ -133,18 +147,18 @@ export default {
border-bottom: 3px solid transparent;
cursor: pointer;
&.active {
color: #007EFF;
border-color: #007EFF;
color: #007eff;
border-color: #007eff;
}
}
}
.station {
min-height: calc(100vh - 520px);
background: url(../../../assets/img/station1.png) (top left)/auto no-repeat,
url(../../../assets/img/station2.png) bottom right/auto no-repeat;
background: url(../../../assets/img/station1.png) (top left) / auto no-repeat,
url(../../../assets/img/station2.png) bottom right/auto no-repeat;
.inner {
width: 1072px;
margin: 0 auto;
width: 1072px;
margin: 0 auto;
}
.curs {
display: flex;
@ -159,7 +173,7 @@ export default {
border-radius: 8px;
cursor: pointer;
&:hover {
opacity: .9;
opacity: 0.9;
}
img {
width: 215px;
@ -190,12 +204,11 @@ export default {
padding: 0 8px;
line-height: 28px;
font-size: 14px;
color: #7A7A7A;
color: #7a7a7a;
border-radius: 20px;
border: 1px solid #DADADA;
border: 1px solid #dadada;
}
}
}
}
</style>

@ -255,7 +255,8 @@
<div class="action">
<i class="icon el-icon-chat-dot-square"
@click="showReplay(item)"></i>
<i v-if="deleteIdentity || item.currentAccountId == item.createAccountId"
<!-- 当前用户是管理员 || 当前用户的account==该条评论的创建人accountId -->
<i v-if="item.currentRoleName.includes('管理员') || item.currentAccountId == item.createAccountId"
class="icon el-icon-delete"
@click="delComment(item)"></i>
<!-- <div class="like-wrap"
@ -296,7 +297,7 @@
<div class="texts">
<div class="name">{{reply.createUsername}}</div>
<div class="flex m-v-8">
<template>
<template v-if="reply.level !== 2">
回复
<span class="reply-name">@{{ reply.replyUsername }}</span>
</template>
@ -308,7 +309,8 @@
<div class="action">
<i class="icon el-icon-chat-dot-square"
@click="showReplay(reply)"></i>
<i v-if="deleteIdentity || reply.currentAccountId == reply.createAccountId"
<!-- 当前用户是管理员 || 当前用户的account==该条评论的创建人accountId -->
<i v-if="reply.currentRoleName.includes('管理员') || reply.currentAccountId == reply.createAccountId"
class="icon el-icon-delete"
@click="delComment(reply)"></i>
<!-- <div class="like-wrap"
@ -571,7 +573,7 @@ export default {
},
// 使
addRecord () {
this.$post(`${this.api.recordRecentUsage}?cid=${this.courseId}`).then(res => { }).catch(res => { })
this.$post(`${this.api.recordRecentUsage}?mallId=${this.mallId}`).then(res => { }).catch(res => { })
},
//
getStatus () {
@ -727,7 +729,7 @@ export default {
this.$post(this.api.addComment, {
cid: this.courseId,
content,
pid: row ? row.commentId : 0,
pid: reply ? reply.commentId : row ? row.commentId : 0,
replyAccountId: reply ? reply.createAccountId : row.createAccountId || '',
status: row ? 2 : 1,
replyCommentId: reply ? reply.commentId : row ? row.commentId : ''
@ -953,6 +955,7 @@ export default {
util.cookies.set('isSubmit', '', -1)
util.cookies.set('fromManager', '', -1)
util.cookies.set('competitionId', '', -1)
util.cookies.set('language', '', -1)
// 8pythoncookiesystemId
location.href = process.env.NODE_ENV === 'development' ?
`http://${location.hostname}:8085/#/` :
@ -968,6 +971,8 @@ export default {
let userName = window.btoa(encodeURIComponent(this.userName));
if (systemId == 11) {
//
sessionStorage.removeItem('projectId')
sessionStorage.removeItem('submited')
location.href = `${Setting.systemPath}/#/index/list?curriculumName=${this.curriculumName}&token=${token}&cid=${this.courseId}&systemId=${this.systemIds}&projectId=${this.curProject}&assessmentId=&classId=&stopTime=&test=true`
} else if (systemId == 12) {
//

Loading…
Cancel
Save