理论考试相关

dev_202412
yujialong 6 months ago
parent 838a5b9ed7
commit 32953b4698
  1. 3
      public/index-occupationlab.html
  2. 3
      public/index-zxy.html
  3. 4
      public/index.html
  4. 3
      public/static/ueditorPlus/ueditor.config.js
  5. 21
      src/layouts/header/index.vue
  6. 51
      src/pages/account/login/index.vue
  7. 7
      src/pages/match/details/index.vue
  8. 4
      src/pages/match/list/index.vue
  9. 28
      src/pages/match/theoryExam/index.vue

@ -30,5 +30,8 @@
<div id="app"></div>
<!-- built files will be auto injected -->
<script src="/styles/tinymce/tinymce.min.js"></script>
<script src='./static/ueditorPlus/ueditor.config.js?v=3'></script>
<script src='./static/ueditorPlus/ueditor.all.js?v=3'></script>
<script src='./static/ueditorPlus/lang/zh-cn/zh-cn.js'></script>
</body>
</html>

@ -30,5 +30,8 @@
<div id="app"></div>
<!-- built files will be auto injected -->
<script src="/styles/tinymce/tinymce.min.js"></script>
<script src='./static/ueditorPlus/ueditor.config.js?v=3'></script>
<script src='./static/ueditorPlus/ueditor.all.js?v=3'></script>
<script src='./static/ueditorPlus/lang/zh-cn/zh-cn.js'></script>
</body>
</html>

@ -28,10 +28,10 @@
<strong>We're sorry but vms doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
<script src="/styles/tinymce/tinymce.min.js"></script>
<script src='./static/ueditorPlus/ueditor.config.js?v=3'></script>
<script src='./static/ueditorPlus/ueditor.all.js?v=3'></script>
<script src='./static/ueditorPlus/lang/zh-cn/zh-cn.js'></script>
<script src="/styles/tinymce/tinymce.min.js"></script>
</body>
</html>

@ -48,7 +48,7 @@
// 需要能跨域的静态资源请求,主要用户弹窗页面等静态资源
UEDITOR_CORS_URL: CORS_URL,
loadConfigFromServer: false,
// 服务器统一请求接口路径
serverUrl: "http://192.168.31.51:9000/exam/exam/upload/configAndUpload",
imageActionName: "imgUpload",
@ -95,7 +95,6 @@
// return true;
// }
}
// 插入图片自定义配置
, imageConfig: {
// 禁止本地上传

@ -68,8 +68,8 @@
</template>
<script>
import { mapState, mapMutations, mapActions } from "vuex";
import Setting from "@/setting";
import util from "@/libs/util";
import Util from '@/libs/util'
import Setting from '@/setting'
import navbar from "../navbar";
import axios from 'axios'
import Bus from '@/libs/bus'
@ -79,15 +79,16 @@ export default {
isDev: Setting.isDev,
isZj: location.host === '10.60.32.76', //
isSq: Setting.isSq,
token: util.local.get(Setting.tokenKey), // token
serverToken: util.local.get('oc_server_token'), // token
cName: util.cookies.get('customerName'),
token: Util.local.get(Setting.tokenKey), // token
serverToken: Util.local.get('oc_server_token'), // token
cName: Util.cookies.get('customerName'),
isIndex: Setting.whiteList.find(e => e === this.$route.path), //
isZxy: Setting.isZxy,
notices: [],
noticeTimer: null,
ip: localStorage.getItem('localIp') ? +localStorage.getItem('localIp') : 0,
mobileMenuStatus: false
mobileMenuStatus: false,
timer: null,
};
},
components: {
@ -99,7 +100,7 @@ export default {
])
},
mounted () {
if (util.local.get(Setting.tokenKey)) {
if (Util.local.get(Setting.tokenKey)) {
this.getSystemDetail();
this.getUserInfo();
this.getNotice()
@ -174,8 +175,8 @@ export default {
},
//
heartbeatDetection () {
setInterval(async () => {
await this.$get(this.api.heartbeatDetection)
this.timer = setInterval(async () => {
Util.local.get(Setting.tokenKey) ? await this.$get(this.api.heartbeatDetection) : clearInterval(this.timer)
}, 58 * 1000)
},
@ -223,7 +224,7 @@ export default {
// tab
toNew (path) {
//
if (util.cookies.get('serverLogin') === 'true' && util.local.get('oc_server_token')) {
if (Util.cookies.get('serverLogin') === 'true' && Util.local.get('oc_server_token')) {
const defaultPath = '/station/list' //
//
axios.get(`${this.api.getUserRolesPermissionMenu}?platformId=1`, {

@ -3,6 +3,7 @@
<div class="login">
<div class="form">
<h6 class="title">欢迎使用请登录</h6>
<ul class="tab">
<li v-for="(item, i) in tabList" :key="i" :class="{ active: form.distinguish == item.id }"
@click="typeClick(item)">{{ item.label }}</li>
@ -12,8 +13,7 @@
<div v-show="!form.distinguish && !verCodeLogin" class="items">
<el-form-item class="flex-1" prop="workNumber">
<label class="label account"></label>
<el-input v-model.trim="form.workNumber" placeholder="请输入学号/工号/手机号/邮箱"
@keyup.enter.native="submit"></el-input>
<el-input v-model.trim="form.workNumber" placeholder="请输入账号/手机号" @keyup.enter.native="submit"></el-input>
</el-form-item>
</div>
<!-- 手机号邮箱登录 -->
@ -22,10 +22,11 @@
<el-input v-model.trim="form.account" placeholder="请输入账号" @keyup.enter.native="submit"></el-input>
</el-form-item>
<template v-if="verCodeLogin">
<el-form-item prop="account">
<el-form-item prop="account" ref="phoneItem">
<label class="label account"></label>
<el-input v-model.trim="form.account" placeholder="请输入手机号/邮箱" @input="val => checkAccountByPhone(val, 0)"
@keyup.enter.native="submit"></el-input>
<p v-if="diaClientMsg" class="el-form-item__error">{{ diaClientMsg }}</p>
</el-form-item>
<el-form-item prop="code">
<label class="label code"></label>
@ -55,8 +56,8 @@
<div class="bottom">
<el-link :underline="false" type="primary" @click="switchType">{{ verCodeLogin ? '密码' : '验证码' }}登录</el-link>
<el-link v-if="person" :underline="false" type="primary" @click="toAccount">没有账号点击申请</el-link>
<!-- v-else-if="toMatch" -->
<el-link :underline="false" type="primary" @click="accountApplyVisible = true">暂无账号点击申请</el-link>
<el-link v-else-if="toMatch" :underline="false" type="primary"
@click="accountApplyVisible = true">暂无账号点击申请</el-link>
</div>
<el-button class="submit" type="primary" @click="submit">登录</el-button>
</el-form>
@ -101,7 +102,7 @@
</el-dialog>
<el-dialog title="请选择您要登录的用户" :visible.sync="userVisible" :close-on-click-modal="false" custom-class="user-dia"
width="500px">
<p class="tips">该手机号已绑定以下用户信息</p>
<p class="tips">{{ verCodeLogin ? '手机号已绑定' : '账号存在' }}以下用户信息</p>
<ul class="users">
<li :class="{ isEnable: !user.isEnable }" v-for="(user, i) in users" :key="i" @click="chooseUser(user)">
<span>{{ user.typeName }}{{ user.schoolName }}{{ user.userName }}{{ user.workNumber }}{{
@ -134,9 +135,10 @@
<el-dialog title="重设密码" :visible.sync="resetPwVisible" :close-on-click-modal="false" width="500px">
<el-form class="dia-form" ref="pwForm" label-width="110px" :model="pwForm" :rules="pwRules">
<el-form-item prop="phoneOrEmail" label="手机号/邮箱">
<el-form-item prop="phoneOrEmail" label="手机号/邮箱" ref="diaPhoneItem">
<el-input placeholder="请输入手机号/邮箱" v-model.trim="pwForm.phoneOrEmail"
@input="val => checkAccountByPhone(val, 1)"></el-input>
<p v-if="diaClientMsg" class="el-form-item__error">{{ diaClientMsg }}</p>
</el-form-item>
<el-form-item prop="code" label="验证码">
<div class="ver-code">
@ -147,12 +149,10 @@
</div>
</el-form-item>
<el-form-item prop="newPassword" label="登录密码">
<el-input placeholder="请输入登录密码" type="password" maxlength="6" v-model="pwForm.newPassword"
:disabled="!diaClientExist"></el-input>
<el-input placeholder="请输入登录密码" type="password" maxlength="6" v-model="pwForm.newPassword"></el-input>
</el-form-item>
<el-form-item prop="newPasswordTwo" label="确认登录密码">
<el-input placeholder="请再次输入登录密码" type="password" maxlength="6" v-model="pwForm.newPasswordTwo"
:disabled="!diaClientExist"></el-input>
<el-input placeholder="请再次输入登录密码" type="password" maxlength="6" v-model="pwForm.newPasswordTwo"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -225,7 +225,7 @@ export default {
distinguish: 0,
},
rules: {
workNumber: [{ required: true, message: "请输入学号/工号/手机号/邮箱", trigger: "blur" }],
workNumber: [{ required: true, message: "请输入学号/工号", trigger: "blur" }],
account: [{ required: false, message: "请输入账号", trigger: "blur" }],
password: [{ required: true, message: "请输入密码", trigger: "blur" }],
code: [{ required: true, message: "请输入验证码", trigger: "blur" }]
@ -269,6 +269,7 @@ export default {
resetPwVisible: false,
diaClientExist: false,
diaClientMsg: '',
pwForm: {
code: '',
newPassword: '',
@ -329,7 +330,7 @@ export default {
'请输入账号' :
this.verCodeLogin ?
'请输入手机号/邮箱' :
'请输入学号/工号/手机号/邮箱'
'请输入学号/工号'
},
//
typeClick (tab) {
@ -402,7 +403,7 @@ export default {
this.SET_CUSTOMERNAME(data.customerName)
this.selectVisible = true
} else {
!data.customer || data.typeName === '学生端' ? this.setLogin() : this.toMang()
data.typeName === '学生端' ? this.setLogin() : this.toMang()
}
}
} else {
@ -463,6 +464,7 @@ export default {
}
this.diaClientExist = false
this.resetPwVisible = true
this.diaClientMsg = ''
},
//
@ -490,18 +492,27 @@ export default {
// type01
async checkAccountByPhone (val, type) {
if (!this.phoneReg.test(val) && !this.mailReg.test(val)) return false
if (!this.phoneReg.test(val) && !this.mailReg.test(val)) {
this.$refs[type ? 'diaPhoneItem' : 'phoneItem'].clearValidate()
this.diaClientMsg = ''
return false
}
try {
const { message } = await this.$get(`${this.api.forgotPreVerification}?phoneOrEmail=${val}&platform=${Setting.platformId}`)
const exist = message === 'success' //
this[type ? 'diaClientExist' : 'verFormEnable'] = exist
} catch (e) { }
this.diaClientMsg = exist ? '' : message
} catch (e) {
this[type ? 'diaClientExist' : 'verFormEnable'] = false
this.diaClientMsg = e.message
}
},
//
switchType () {
this.verCodeLogin = !this.verCodeLogin
this.$refs.form.clearValidate()
this.form.code = ''
this.handleRule()
},
@ -754,7 +765,7 @@ export default {
.form {
width: 436px;
padding: 38px 38px 60px;
padding: 57px 38px 60px;
margin: 0 auto 0;
border-radius: 6px;
background-color: #fff;
@ -1011,6 +1022,12 @@ export default {
justify-content: center;
align-items: center;
}
.err-msg {
font-size: 12px;
color: #F56C6C;
line-height: 1;
}
}
.buy {

@ -520,7 +520,7 @@
import { mapState, mapMutations } from "vuex";
import breadcrumb from '@/components/breadcrumb'
import Util from '@/libs/util'
import Setting from "@/setting"
import Setting from '@/setting'
import Const from '@/const/match'
import OSS from 'ali-oss'
import OssConfig from '@/components/upload/config.js'
@ -1639,10 +1639,11 @@ export default {
//
toSub () {
const { form } = this
const { systemId, systemName, projectId, cid, stageId, startTime, endTime, mallId, resultAnnouncementTime, method } = this.curStage
let { systemId, systemName, projectId, cid, stageId, startTime, endTime, mallId, resultAnnouncementTime, method } = this.curStage
const competitionId = form.id
const teamId = form.competitionRegistration.teamId || ''
cid = cid || ''
mallId = mallId || ''
//
if (method === 1) {
this.$router.push(`/match/theoryExam?id=${form.id}&stageId=${stageId}&teamId=${teamId}`)

@ -967,10 +967,12 @@ export default {
//
toSub () {
const form = this.curItem
const { systemId, systemName, projectId, cid, stageId, startTime, endTime, mallId, resultAnnouncementTime, method } = form.curStage
let { systemId, systemName, projectId, cid, stageId, startTime, endTime, mallId, resultAnnouncementTime, method } = form.curStage
const competitionId = form.id
const teamId = form.teamId || ''
cid = cid || ''
mallId = mallId || ''
//
if (method === 1) {
this.$router.push(`/match/theoryExam?id=${form.id}&stageId=${stageId}&teamId=${teamId}`)

@ -80,7 +80,7 @@
<span class="label">{{ j + 1 }} / {{ item.questionNum }}</span>
<span class="label">{{ item.questionTypeName }}</span>
</div>
<div class="stem" :id="'stem' + ques.id" v-html="getQuesStem(ques)"></div>
<div class="stem html-parse" :id="'stem' + ques.id" v-html="getQuesStem(ques)"></div>
<p>{{ ques.score }}</p>
<img class="tag" :src="require('@/assets/img/' + (ques.sign ? 'tag-active' : 'tag') + '.svg')" alt=""
@click="ques.sign = ques.sign ? 0 : 1">
@ -96,7 +96,7 @@
@change="singleChange(ques, j)"></el-radio>
<span>{{ numToLetter(j) }}.&nbsp;</span>
<div class="text" v-html="opt.optionText"></div>
<div class="text html-parse" v-html="opt.optionText"></div>
</div>
</template>
<!-- 简答题需要展示题干文件及富文本 -->
@ -530,7 +530,7 @@ export default {
const inputs = stem.querySelectorAll('.fill-input')
if (inputs) {
for (const e of inputs) {
answer.push(e.value)
e.value && answer.push(e.value)
}
}
}
@ -574,7 +574,7 @@ export default {
if (this.id) {
const time = curStage.resultAnnouncementTime
const msg =
time === '0' ? '提交成功!成绩将在比赛结束后公布,请前往参赛信息模块查看' : time > 0 ? `提交成功!成绩将在比赛结束后${time}小时公布,请前往参赛信息模块查看` : '提交成功';
time === 0 ? '提交成功!成绩将在比赛结束后公布,请前往参赛信息模块查看' : time > 0 ? `提交成功!成绩将在比赛结束后${time}小时公布,请前往参赛信息模块查看` : '提交成功';
this.$alert(msg, '提示', {
confirmButtonText: '确定',
type: 'success',
@ -792,6 +792,20 @@ export default {
}
}
.html-parse {
table {
display: table;
margin-bottom: 10px;
border-collapse: collapse;
th,
td {
padding: 5px 10px;
border: 1px solid #DDD;
}
}
}
.item:not(:last-child) {
padding-bottom: 15px;
margin-bottom: 15px;
@ -804,6 +818,10 @@ export default {
margin-bottom: 10px;
}
img {
max-width: 100%;
}
.tag {
margin-left: 10px;
cursor: pointer;
@ -834,7 +852,7 @@ export default {
}
.fill-input {
width: 100px;
width: 200px;
height: 28px;
padding: 0 15px;
margin: 0 10px;

Loading…
Cancel
Save