实验报告等修复

alioss
yujialong 2 years ago
parent 8744036725
commit 506eb20204
  1. 2
      src/components/pdf/index.vue
  2. 5
      src/layouts/header/index.vue
  3. 2
      src/pages/account/login/index.vue
  4. 6
      src/pages/ass/list/index.vue
  5. 1
      src/pages/info/details/index.vue
  6. 21
      src/pages/record/show/index.vue
  7. 23
      src/pages/station/preview/index.vue
  8. 7
      src/setting.js
  9. 3
      src/store/modules/user.js

@ -54,7 +54,7 @@ export default {
methods: { methods: {
closePdf() { closePdf() {
this.$emit("update:visible", false); this.$emit("update:visible", false);
this.$emit("update:src", ""); // this.$emit("update:src", "");
this.currentPage = 1; this.currentPage = 1;
}, },
changePdfPage(val) { changePdfPage(val) {

@ -69,7 +69,7 @@ export default {
}, },
methods: { methods: {
...mapMutations("user", [ ...mapMutations("user", [
'SET_CUSTOMERNAME' 'SET_CUSTOMERNAME', 'setUserId'
]), ]),
...mapActions("user", [ ...mapActions("user", [
"logout", "setTitle", "setLogoUrl", "setAvatar", "setUserName" "logout", "setTitle", "setLogoUrl", "setAvatar", "setUserName"
@ -86,8 +86,9 @@ export default {
// //
getUserInfo() { getUserInfo() {
this.$get(this.api.queryUserInfoDetails).then(res => { this.$get(this.api.queryUserInfoDetails).then(res => {
const {userAvatars, userName} = res.result.hrUserInfo || {} const {userAvatars, userName, userId} = res.result.hrUserInfo || {}
userAvatars && this.setAvatar(userAvatars); userAvatars && this.setAvatar(userAvatars);
this.setUserId(userId)
this.setUserName(userName); this.setUserName(userName);
if (!userName && !this.customerName) { if (!userName && !this.customerName) {
this.$get(this.api.isClient).then(res => { this.$get(this.api.isClient).then(res => {

@ -80,7 +80,7 @@
</div> </div>
<el-dialog title="绑定手机号" :visible.sync="phoneVisible" :close-on-click-modal="false" width="30%"> <el-dialog title="绑定手机号" :visible.sync="phoneVisible" :close-on-click-modal="false" width="30%">
<div style='padding: 0 13px 20px 13px;'> <div style='padding: 0 13px 20px 13px;'>
依据国家政策法规需绑定手机号进行网络实名才可登录使用本平台 依据国家政策法规需绑定手机号进行网络实名才可登录使用本平台
</div> </div>
<el-form label-width="60px"> <el-form label-width="60px">
<el-form-item label="手机号"> <el-form-item label="手机号">

@ -460,12 +460,16 @@ export default {
util.cookies.set("startTime", this.curRow.startTime) util.cookies.set("startTime", this.curRow.startTime)
util.cookies.set("stopTime", this.curRow.stopTime) util.cookies.set("stopTime", this.curRow.stopTime)
util.cookies.set("systemId", curriculumId); util.cookies.set("systemId", curriculumId);
util.cookies.set('fromManager', '', -1)
let href = '' let href = ''
if (curriculumId == 11){ 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}`; 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}`;
} else if (curriculumId == 12) {
//
window.open(`http://120.78.139.126:8879?systemId=${this.systemId}&courseId=${this.cid}&projectId=${this.projectId}&token=${token}&userId=${this.userId}&assessmentId=${this.assessmentId}&classId=${this.curRow.classId}`);
} else { } else {
if(process.env.NODE_ENV === 'development') { if(process.env.NODE_ENV === 'development') {
href = 'http://192.168.31.125:8080/#/' href = 'http://192.168.31.125:8085/#/'
} else { } else {
href = `${location.origin}/pyTrials` // 8pythoncookiesystemId href = `${location.origin}/pyTrials` // 8pythoncookiesystemId
} }

@ -110,6 +110,7 @@ export default {
} }
} }
.content{ .content{
padding: 0 150px;
line-height: 1.8; line-height: 1.8;
font-size: 16px; font-size: 16px;
text-indent: 2em; text-indent: 2em;

@ -114,7 +114,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="ruleAnswer" label="参考答案" style='word-wrap: break-word' align="center"> <el-table-column prop="ruleAnswer" label="参考答案" style='word-wrap: break-word'>
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if='scope.row.lcRuleRecords'> <div v-if='scope.row.lcRuleRecords'>
<div v-for="(item, index) in scope.row.lcRuleRecords" :key="index"> <div v-for="(item, index) in scope.row.lcRuleRecords" :key="index">
@ -126,7 +126,7 @@
<div v-else v-html="scope.row.referenceAnswer"></div> <div v-else v-html="scope.row.referenceAnswer"></div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="userAnswer" label="学生答案" align="center"> <el-table-column prop="userAnswer" label="学生答案">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if='scope.row.lcRuleRecords'> <div v-if='scope.row.lcRuleRecords'>
<div v-for="(item, index) in scope.row.lcRuleRecords" :key="index"> <div v-for="(item, index) in scope.row.lcRuleRecords" :key="index">
@ -139,6 +139,9 @@
</div> </div>
</div> </div>
<div v-else v-html='scope.row.answer' style='white-space: pre-wrap'></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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="quesScore" label="分值" width="80" align="center"></el-table-column> <el-table-column prop="quesScore" label="分值" width="80" align="center"></el-table-column>
@ -179,7 +182,8 @@ export default {
editing: false, editing: false,
loadIns: null, loadIns: null,
loading: false, loading: false,
project:false project:false,
userScores: []
}; };
}, },
components: { components: {
@ -212,6 +216,7 @@ export default {
} }
form.assessmentId && (this.breadPath = ['实验记录', '实验报告']) form.assessmentId && (this.breadPath = ['实验记录', '实验报告'])
const data = report.data const data = report.data
this.userScores = userScores
// data使 // data使
if (!data) { if (!data) {
this.handleList(userScores) this.handleList(userScores)
@ -220,7 +225,7 @@ export default {
data: JSON.stringify(userScores) data: JSON.stringify(userScores)
}).then(res => {}).catch(err => {}) }).then(res => {}).catch(err => {})
} else { } else {
this.handleList(JSON.parse(data)) this.handleList(userScores.find(e => e.lcRuleRecords) ? userScores : JSON.parse(data))
} }
}).catch(res => {}) }).catch(res => {})
}, },
@ -242,9 +247,12 @@ export default {
this.expData = list this.expData = list
}, },
exportPage() { exportPage() {
const form = JSON.parse(JSON.stringify(this.form)) const form = Object.assign(this.form, this.infoData)
const list = JSON.parse(JSON.stringify(this.expData)) const list = JSON.parse(JSON.stringify(this.expData))
list.map((e, i) => { 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 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.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;') if (e.answer && typeof e.answer === 'string') e.answer = e.answer.replace(/<[^>]+>/g, '').replace(/(&nbsp;|&amp;|%s)/g, '').replace(/>/g, '&gt;').replace(/</g, '&lt;')
@ -442,6 +450,9 @@ code, kbd, samp{
} }
} }
} }
.result-pic {
margin: 10px 0;
}
@media (max-width: 1650px) { @media (max-width: 1650px) {
.wrap { .wrap {
padding: 12px 200px 20px; padding: 12px 200px 20px;

@ -21,6 +21,7 @@
</template> </template>
</template> </template>
<div class="pdf" v-else-if="pdfSrc"> <div class="pdf" v-else-if="pdfSrc">
<img class="full" src="@/assets/img/screen/full.png" alt="" @click="fullScreen">
<p class="arrow"> <p class="arrow">
<span @click="changePdfPage(0)" class="turn el-icon-arrow-left" <span @click="changePdfPage(0)" class="turn el-icon-arrow-left"
:class="{grey: currentPage==1}"></span> :class="{grey: currentPage==1}"></span>
@ -105,6 +106,8 @@
<p class="tips">该课程订阅期限已到期请联系院校管理员续费</p> <p class="tips">该课程订阅期限已到期请联系院校管理员续费</p>
</div> </div>
</el-dialog> </el-dialog>
<pdfDia :key="pdfVisible" :visible.sync="pdfVisible" :src.sync="pdfSrc"/>
</div> </div>
</template> </template>
@ -116,10 +119,10 @@ import pdf from "vue-pdf";
import "quill/dist/quill.core.css"; import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css"; import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css"; import "quill/dist/quill.bubble.css";
import bus from "@/libs/bus";
import breadcrumb from '@/components/breadcrumb' import breadcrumb from '@/components/breadcrumb'
import pdfDia from '@/components/pdf'
export default { export default {
components: { pdf, breadcrumb }, components: { pdf, breadcrumb, pdfDia },
data() { data() {
return { return {
startTime: Date.now(), // startTime: Date.now(), //
@ -277,8 +280,6 @@ export default {
this.coverUrl = row.fileUrl; this.coverUrl = row.fileUrl;
} else if (row.fileType == "pdf") { } else if (row.fileType == "pdf") {
this.pdfSrc = row.fileUrl; this.pdfSrc = row.fileUrl;
console.log("🚀 ~ file: index.vue ~ line 246 ~ preview ~ this.pdfSrc", this.pdfSrc)
this.pdfVisible = true;
} else { } else {
this.$get(`${this.api.curriculumGetSubsection}/${row.id}`).then(res => { this.$get(`${this.api.curriculumGetSubsection}/${row.id}`).then(res => {
if (row.fileType == "pptx") { if (row.fileType == "pptx") {
@ -340,6 +341,10 @@ export default {
loadPdfHandler(e) { loadPdfHandler(e) {
this.currentPage = 1; this.currentPage = 1;
}, },
// pdf
fullScreen() {
this.pdfVisible = true
},
// //
selectProject(item) { selectProject(item) {
this.curProject = item.projectId this.curProject = item.projectId
@ -407,13 +412,12 @@ export default {
let token = util.local.get(Setting.tokenKey); let token = util.local.get(Setting.tokenKey);
let roleId = this.roleId == 4 ? 0 : 1; let roleId = this.roleId == 4 ? 0 : 1;
let userName = window.btoa(encodeURIComponent(this.userName)); let userName = window.btoa(encodeURIComponent(this.userName));
if (systemId == 11) { if (systemId == 11) {
// //
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` 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) { } else if (systemId == 12) {
// //
window.open(`http://120.78.139.126:8879?systemId=${systemId}&courseId=${this.courseId}&projectId=${this.curProject}&token=${token}`); window.open(`http://120.78.139.126:8879?systemId=${systemId}&courseId=${this.courseId}&projectId=${this.curProject}&token=${token}&userId=${this.userId}&classId=1`);
} else if (systemId == 21) { } else if (systemId == 21) {
window.open(`http://121.37.29.24:80/yyyflogin?userId=${this.userId}&userName=${userName}&userType=${roleId}&reqType=1&reqId=3989a0ad671849b99dcbdcc208782333&caseId=9681f86902314b10bc752909121f9ab9&authorization=87DIVy348Oxzj3ha&classId=1876&courserId=7ff5d4715b114b7398b6f26c20fac460`); window.open(`http://121.37.29.24:80/yyyflogin?userId=${this.userId}&userName=${userName}&userType=${roleId}&reqType=1&reqId=3989a0ad671849b99dcbdcc208782333&caseId=9681f86902314b10bc752909121f9ab9&authorization=87DIVy348Oxzj3ha&classId=1876&courserId=7ff5d4715b114b7398b6f26c20fac460`);
} else if (systemId == 22) { } else if (systemId == 22) {
@ -659,6 +663,13 @@ $height: 700px;
} }
} }
.pdf{ .pdf{
position: relative;
.full {
position: absolute;
top: 7px;
right: 10px;
cursor: pointer;
}
.arrow{ .arrow{
padding: 10px 0; padding: 10px 0;
display: flex; display: flex;

@ -11,7 +11,7 @@ const isZxy = url.includes('izhixinyun'); //是否是智信云
let systemPath = `${location.origin}/banksystem` let systemPath = `${location.origin}/banksystem`
let host = `${location.origin}/` let host = `${location.origin}/`
let uploadURL = `http://121.37.12.51/` let uploadURL = `${location.origin}/`
let title = isZxy ? let title = isZxy ?
'智信云' : '智信云' :
(isHh || isCH) ? (isHh || isCH) ?
@ -25,9 +25,10 @@ if (isPro) {
} else if (isDev) { } else if (isDev) {
// 本地 // 本地
systemPath = `http://${location.hostname}:8093` systemPath = `http://${location.hostname}:8093`
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.51:9000/"; // 榕 // host = "http://192.168.31.51:9000/"; // 榕
// host = "http://192.168.31.116:9000/"; // 赓 // host = "http://192.168.31.116:9000/"; // 赓
} }
@ -50,7 +51,7 @@ const Setting = {
tokenExpires: 1296000000, // token在localStorage的时间(毫秒) tokenExpires: 1296000000, // token在localStorage的时间(毫秒)
tokenKey: "oc_client_token", // localStorage里保存的token的key tokenKey: "oc_client_token", // localStorage里保存的token的key
storeKey: "oc_client_store", // localStorage里保存的vuex的key storeKey: "oc_client_store", // localStorage里保存的vuex的key
initialPassword: "111aaa", // 默认密码 initialPassword: "1122aa", // 默认密码
isDev, isDev,
isTest, isTest,
isPro, isPro,

@ -52,6 +52,9 @@ export default {
SET_LOG: (state) => { SET_LOG: (state) => {
state.logView = true state.logView = true
}, },
setUserId: (state, userId) => {
state.userId = userId
},
}, },
actions: { actions: {
login({ state, commit }, userInfo) { login({ state, commit }, userInfo) {

Loading…
Cancel
Save