dev_202412
yujialong 3 months ago
parent a5e95f7591
commit 87c2af5363
  1. 14
      src/components/upload/config.js
  2. 2
      src/pages/account/login/index.vue
  3. 12
      src/pages/match/details/index.vue
  4. 7
      src/pages/match/list/index.vue
  5. 32
      src/pages/theoryExam/index.vue
  6. 2
      src/setting.js

@ -2,10 +2,22 @@
* 阿里云oss配置
* */
import Util from '@/libs/util'
import router from '@/router'
import Setting from '@/setting'
export default async function () {
try {
let RE = localStorage.getItem('osc')
if (RE) RE = JSON.parse(RE)
if (RE) {
RE = JSON.parse(RE)
} else {
Util.local.remove(Setting.storeKey)
Util.local.remove(Setting.tokenKey)
Util.errorMsg('登录过期,请重新登录!')
router.replace({
path: '/login'
})
}
return RE ? {
// oss账号信息
config: {

@ -216,6 +216,8 @@ import Util from '@/libs/util'
import Setting from "@/setting";
import AccountApply from './accountApply'
import AccountApplyMatch from './accountApplyMatch'
import CryptoJS from 'crypto-js'
import JSEncrypt from 'jsencrypt'
export default {
data: function () {
return {

@ -424,7 +424,7 @@
</el-form-item>
</template>
<el-form-item label="大赛邀请码" v-if="form.completeCompetitionSetup.isNeedCode">
<el-input placeholder="请输入大赛邀请码" maxlength="6" v-model="enterForm.registrationInvitationCode"></el-input>
<el-input placeholder="请输入大赛邀请码" maxlength="4" v-model="enterForm.registrationInvitationCode"></el-input>
</el-form-item>
<p v-if="form.completeCompetitionSetup.competitionType" class="tips">
查找不到团队点击 <el-link :underline="false" type="primary" @click="toTeam">创建团队</el-link>
@ -476,10 +476,10 @@
</el-select>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入团队邀请码" maxlength="6" v-model="enterForm.invitationCode"></el-input>
<el-input placeholder="请输入团队邀请码" maxlength="6" v-model.trim="enterForm.invitationCode"></el-input>
</el-form-item>
<el-form-item v-if="form.completeCompetitionSetup.isNeedCode">
<el-input placeholder="请输入大赛邀请码" maxlength="6" v-model="enterForm.registrationInvitationCode"></el-input>
<el-input placeholder="请输入大赛邀请码" maxlength="4" v-model.trim="enterForm.registrationInvitationCode"></el-input>
</el-form-item>
<p class="tips">
查找不到团队点击 <el-link :underline="false" type="primary" @click="toTeam">创建团队</el-link>
@ -495,13 +495,13 @@
<el-dialog title="创建团队" :visible.sync="teamVisible" :close-on-click-modal="false" width="300px" @close="teamClose">
<el-form class="dia-form">
<el-form-item>
<el-input placeholder="请输入团队名称" maxlength="10" v-model="teamForm.teamName"></el-input>
<el-input placeholder="请输入团队名称" maxlength="10" v-model.trim="teamForm.teamName"></el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="请设置团队邀请码" maxlength="6" v-model="teamForm.invitationCode"></el-input>
<el-input placeholder="请设置团队邀请码" maxlength="6" v-model.trim="teamForm.invitationCode"></el-input>
</el-form-item>
<el-form-item v-if="form.completeCompetitionSetup.isNeedCode">
<el-input placeholder="请输入大赛邀请码" maxlength="6" v-model="teamForm.registrationInvitationCode"></el-input>
<el-input placeholder="请输入大赛邀请码" maxlength="4" v-model.trim="teamForm.registrationInvitationCode"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">

@ -196,7 +196,7 @@
</el-form-item>
</template>
<el-form-item label="大赛邀请码" v-if="curItem.isNeedCode">
<el-input placeholder="请输入大赛邀请码" maxlength="6" v-model="enterForm.registrationInvitationCode"></el-input>
<el-input placeholder="请输入大赛邀请码" maxlength="4" v-model="enterForm.registrationInvitationCode"></el-input>
</el-form-item>
<p v-if="curItem.competitionType" class="tips">
查找不到团队点击 <el-link :underline="false" type="primary" @click="toTeam">创建团队</el-link>
@ -247,10 +247,11 @@
</el-select>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入6位数团队邀请码" maxlength="6" v-model="enterForm.invitationCode"></el-input>
<el-input placeholder="请输入6位数团队邀请码" maxlength="6" v-model.trim="enterForm.invitationCode"></el-input>
</el-form-item>
<el-form-item v-if="curItem.isNeedCode">
<el-input placeholder="请输入4位数大赛邀请码" maxlength="4" v-model="enterForm.registrationInvitationCode"></el-input>
<el-input placeholder="请输入4位数大赛邀请码" maxlength="4"
v-model.trim="enterForm.registrationInvitationCode"></el-input>
</el-form-item>
<p class="tips">
查找不到团队点击 <el-link :underline="false" type="primary" @click="toTeam">创建团队</el-link>

@ -122,10 +122,10 @@
<UeditorPlus v-if="ques.richTextStatus" :ref="'essayAnswer' + ques.id" v-model="ques.answer"
@ready="editor => essayAnswerReady(editor, ques)" />
<div v-if="ques.allowAttachment" class="m-t-20">
<el-upload style="max-width: 700px;" accept=".csv,.xlsx,.xls,.docx,.doc,.pdf,.jpg,.png,.zip,.rar,.7z"
:before-upload="beforeUpload" :on-remove="e => handleRemove(ques)" :on-error="uploadError"
:before-remove="beforeRemove" :on-preview="handlePreview" :limit="1" action="#"
:on-exceed="handleExceed" :file-list="ques.fileList" :http-request="e => handleRequest(e, ques)">
<el-upload style="max-width: 700px;" :before-upload="beforeUpload"
:on-remove="e => handleRemove(ques)" :on-error="uploadError" :before-remove="beforeRemove"
:on-preview="handlePreview" :limit="1" action="#" :on-exceed="handleExceed"
:file-list="ques.fileList" :http-request="e => handleRequest(e, ques)">
<el-button type="primary" plain>上传文件</el-button>
</el-upload>
<div v-if="ques.uploadInstructions" class="flex m-t-10 fs-12">
@ -253,7 +253,7 @@ export default {
this.initOss()
}
per && sessionStorage.removeItem('theorySubmit')
this.per && sessionStorage.removeItem('theorySubmit')
},
methods: {
//
@ -295,7 +295,7 @@ export default {
paperId,
stageId
})
let cacheQues = []
let cacheQues
if (cache) {
this.entryTime = new Date(cache.startTime)
this.timeSumVal = (now - new Date(cache.startTime)) / 1000
@ -347,6 +347,7 @@ export default {
//
async handlePaper (r, cacheQues) {
try {
console.log("🚀 ~ handlePaper ~ this.form:", r, this.form)
const paper = r.paperOutline
const types = this.questionTypes
paper.map(e => {
@ -357,7 +358,7 @@ export default {
Object.assign(n, n.question)
const curQues = cacheQues ? cacheQues.find(m => m.outlineId === e.outlineId && m.questionVersionId === n.questionVersionId) : {} //
n.sign = curQues ? curQues.sign : 0
const opts = n.questionAnswerVersionsList
const opts = n.questionAnswerVersionsList || []
if (type !== 'fill_blank' && type !== 'essay' && opts) { //
opts.map(m => {
m.answer = curQues && curQues.answer && curQues.answer.length && curQues.answer.some(n => n == m.optionNumber) ? 1 : 0
@ -365,10 +366,12 @@ export default {
if (opts.some(m => m.answer)) n.answered = 1
} else if (type === 'fill_blank') { //
n.fills = curQues && curQues.answer && curQues.answer.length && curQues.answer.some(m => m) ? curQues.answer : ''
let { answerData } = opts[0]
if (answerData) answerData = JSON.parse(answerData)
n.answered = n.fills && answerData && answerData.length === n.fills.filter(m => m).length ? 1 : 0
n.partAnswer = n.fills && answerData && answerData.length !== n.fills.filter(m => m).length ? 1 : 0
if (opts.length) {
let { answerData } = opts[0]
if (answerData) answerData = JSON.parse(answerData)
n.answered = n.fills && answerData && answerData.length === n.fills.filter(m => m).length ? 1 : 0
n.partAnswer = n.fills && answerData && answerData.length !== n.fills.filter(m => m).length ? 1 : 0
}
n.stem = this.getQuesStem(n)
} else if (type === 'essay') { //
n.answer = type === 'essay' && curQues ? curQues.answerContent : ''
@ -394,7 +397,7 @@ export default {
})
})
this.form = r
console.log("🚀 ~ handlePaper ~ this.form:", this.form)
console.log("🚀 ~ h222:", this.form)
this.loading = false
// input
@ -619,8 +622,8 @@ export default {
},
//
beforeUpload (file) {
const oversize = file.size / 1024 / 1024 < 50
if (!oversize) Util.warningMsg('请上传小于50M的文件!')
const oversize = file.size / 1024 / 1024 < 100
if (!oversize) Util.warningMsg('请上传小于100M的文件!')
if (oversize) {
return true
} else {
@ -717,6 +720,7 @@ export default {
break
}
}
if (this.per) msg += `提交后将无法再次修改或重新提交,请确认信息无误后再进行操作。`
try {
await this.$confirm(msg, '提示', {
// confirmButtonText: '',

@ -30,7 +30,7 @@ if (isDev) {
host = "http://121.37.12.51/"; // 测试服
// host = 'https://www.occupationlab.com/' // 正式服
const ip = localStorage.getItem('localIp')
const ips = ['http://192.168.31.217:9000/', 'http://192.168.31.51:9000/', 'http://121.37.12.51/']
const ips = ['http://192.168.31.217:9000/', 'http://192.168.31.51:9000/', 'https://izhixinyun.com/']
host = ips[+ip]
// host = 'http://192.168.31.51:9000/'
} else if (isSq) {

Loading…
Cancel
Save