Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
6012a5ce5c
@ -80,3 +80,29 @@ export function getRaceUserList(params) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 分页查询理论题列表 */
|
||||||
|
export function getCompetitionTheory(params) {
|
||||||
|
return request({
|
||||||
|
url: `/api/v1/competitionTheory`,
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交试卷 */
|
||||||
|
export function postCompetitionTheory(theoryId, data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/v1/competitionTheory/${theoryId}/submit`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询用户是否已经报名该竞赛 */
|
||||||
|
export function getCompetitionPractical(competitionId) {
|
||||||
|
return request({
|
||||||
|
url: `/api/v1/competitionPractical/competition/${competitionId}`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -47,6 +47,10 @@ function getRouteInfo(to) {
|
|||||||
} else {
|
} else {
|
||||||
const whitePage = PermissionParam[current_session] ? PermissionParam[current_session].whitePage : '';
|
const whitePage = PermissionParam[current_session] ? PermissionParam[current_session].whitePage : '';
|
||||||
loginPath = whitePage || loginPage;
|
loginPath = whitePage || loginPage;
|
||||||
|
if (current_session && current_session.startsWith('jsxt') || current_session && current_session.startsWith('refereeJsxt')) {
|
||||||
|
const raceId = getSessionStorage('raceId'); // 登陆时候保存 竞赛id
|
||||||
|
loginPath = `${loginPath}?raceId=${raceId}`;
|
||||||
|
}
|
||||||
if (current_session && current_session.startsWith('design')) {
|
if (current_session && current_session.startsWith('design')) {
|
||||||
removeToken();
|
removeToken();
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,11 @@ export function getBaseUrl() {
|
|||||||
let BASE_API;
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// BASE_API = 'https://joylink.club/jlcloud';
|
||||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
|
||||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||||
|
@ -70,12 +70,12 @@ export default {
|
|||||||
clickEvent(obj, data, ele) {
|
clickEvent(obj, data, ele) {
|
||||||
if (obj.type === 'Map') {
|
if (obj.type === 'Map') {
|
||||||
this.mapId = obj.id;
|
this.mapId = obj.id;
|
||||||
this.$router.push({ path: `/jsxt/home`});
|
this.$router.push({ path: `/jsxt/home`, query:{raceId:this.$route.query.raceId}});
|
||||||
} else if (obj.type === 'theory') {
|
} else if (obj.type === 'theory') {
|
||||||
const query = {type: 'theory', mapId: this.mapId};
|
const query = {type: 'theory', mapId: this.mapId, raceId:this.$route.query.raceId};
|
||||||
this.$router.push({path: `/jsxt/examDetail`, query: query});
|
this.$router.push({path: `/jsxt/examDetail`, query: query});
|
||||||
} else if (obj.type === 'operation') {
|
} else if (obj.type === 'operation') {
|
||||||
const query = {type: 'operation', mapId: this.mapId};
|
const query = {type: 'operation', mapId: this.mapId, raceId:this.$route.query.raceId};
|
||||||
this.$router.push({path: `/jsxt/examDetail`, query: query});
|
this.$router.push({path: `/jsxt/examDetail`, query: query});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ import LangStorage from '@/utils/lang';
|
|||||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import { participantCreatTrainingRoom } from '@/api/competition';
|
import { participantCreatTrainingRoom, getCompetitionTheory, getCompetitionPractical } from '@/api/competition';
|
||||||
import applyImg from '@/assets/apply.png';
|
import applyImg from '@/assets/apply.png';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -150,12 +150,17 @@ export default {
|
|||||||
},
|
},
|
||||||
async exmaStart() {
|
async exmaStart() {
|
||||||
if (this.$route.query.type == 'theory') {
|
if (this.$route.query.type == 'theory') {
|
||||||
this.$router.push(`/jsxt/theory/detail/${this.$route.query.mapId}`);
|
getCompetitionTheory({competitionId:this.$route.query.raceId}).then(()=>{
|
||||||
|
this.$router.push(`/jsxt/theory/detail/${this.$route.query.mapId}?raceId=${this.$route.query.raceId}`);
|
||||||
|
}).catch(()=>{
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
// this.disabled = true;
|
// this.disabled = true;
|
||||||
participantCreatTrainingRoom(1, {mapId: 41, prdType: '02'}).then(resp => {
|
getCompetitionPractical(this.$route.query.raceId).then(()=>{
|
||||||
const query = { lineCode: '11', mapId: '41', group: resp.data, roomId: '385' };
|
participantCreatTrainingRoom(this.$route.query.raceId, {mapId: 41, prdType: '02'}).then(resp => {
|
||||||
this.$router.replace({ path: `/jointTrainingNew`, query: query});
|
const query = { lineCode: '11', mapId: '41', group: resp.data, roomId: '385', raceId: this.$route.query.raceId};
|
||||||
|
this.$router.replace({ path: `/jointTrainingNew`, query: query});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,8 +125,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
back() {
|
back() {
|
||||||
const query = {type: 'operation', mapId: this.$route.query.mapId};
|
const query = {type: 'operation', mapId: this.$route.query.mapId, raceId:this.$route.query.raceId};
|
||||||
this.$router.push({path: `/jsxt/home`, query: query});
|
this.$router.push({path: `/jsxt/home`, query: query });
|
||||||
},
|
},
|
||||||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||||
if ((columnIndex === 0 || columnIndex === 1 || columnIndex === 2) && row.scoringPointLength) {
|
if ((columnIndex === 0 || columnIndex === 1 || columnIndex === 2) && row.scoringPointLength) {
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
// import { commitExam, getExamInfo, getUserExam, saveExamAnswer } from '@/api/exam.js';
|
// import { commitExam, getExamInfo, getUserExam, saveExamAnswer } from '@/api/exam.js';
|
||||||
// import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
// import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||||
import Question from './question';
|
import Question from './question';
|
||||||
|
import {postCompetitionTheory} from '@/api/competition';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -155,7 +156,10 @@ export default {
|
|||||||
doEnd() {
|
doEnd() {
|
||||||
// console.log('考试成绩');
|
// console.log('考试成绩');
|
||||||
// this.$router.push({ path: `/jsxt/home`});
|
// this.$router.push({ path: `/jsxt/home`});
|
||||||
this.$router.push({ path: `/jsxt/result`, query: { type: 'theory' } });
|
const params = {competitionId:this.$route.query.raceId};
|
||||||
|
postCompetitionTheory(1, params).then(()=>{
|
||||||
|
this.$router.push({ path: `/jsxt/result`, query: { type: 'theory', raceId:this.$route.query.raceId } });
|
||||||
|
});
|
||||||
},
|
},
|
||||||
onSave(data) {
|
onSave(data) {
|
||||||
console.log(data, '问答题');
|
console.log(data, '问答题');
|
||||||
|
@ -6,8 +6,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {refereeGetCompetitionList, refereeEnterSimulation} from '@/api/competition';
|
import { refereeEnterSimulation } from '@/api/competition';
|
||||||
import {getPermissionJointNew} from '@/api/jointTraining';
|
import {getPermissionJointNew} from '@/api/jointTraining';
|
||||||
|
import { getRaceUserList } from '@/api/competition';
|
||||||
// import QuestionList from './questionList';
|
// import QuestionList from './questionList';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -36,38 +37,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
queryList: {
|
queryList: {
|
||||||
data:[
|
data:[],
|
||||||
{
|
query: this.queryFunction,
|
||||||
name:'xxx',
|
|
||||||
mobile:'189xxxx0023',
|
|
||||||
organization:'xx企业',
|
|
||||||
department:'xx部门',
|
|
||||||
status:'01'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name:'xxx',
|
|
||||||
mobile:'189xxxx0023',
|
|
||||||
organization:'xx企业',
|
|
||||||
department:'xx部门',
|
|
||||||
status:'02'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name:'xxx',
|
|
||||||
mobile:'189xxxx0023',
|
|
||||||
organization:'xx企业',
|
|
||||||
department:'xx部门',
|
|
||||||
status:'03'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name:'xxx',
|
|
||||||
mobile:'189xxxx0023',
|
|
||||||
organization:'xx企业',
|
|
||||||
department:'xx部门',
|
|
||||||
status:'04',
|
|
||||||
score:80
|
|
||||||
}
|
|
||||||
],
|
|
||||||
// query: this.queryFunction,
|
|
||||||
selectCheckShow: false,
|
selectCheckShow: false,
|
||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
@ -87,6 +58,10 @@ export default {
|
|||||||
title: '部门',
|
title: '部门',
|
||||||
prop: 'department'
|
prop: 'department'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '报名时间',
|
||||||
|
prop: 'time'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
@ -169,9 +144,9 @@ export default {
|
|||||||
// 查询函数
|
// 查询函数
|
||||||
queryFunction(params) {
|
queryFunction(params) {
|
||||||
if (this.$route.query.raceId) {
|
if (this.$route.query.raceId) {
|
||||||
params['id'] = this.$route.query.raceId;
|
params['raceId'] = this.$route.query.raceId;
|
||||||
}
|
}
|
||||||
return refereeGetCompetitionList(this.$route.query.raceId);
|
return getRaceUserList(params);
|
||||||
},
|
},
|
||||||
handleClick(row) {
|
handleClick(row) {
|
||||||
const group = row.room.group;
|
const group = row.room.group;
|
||||||
|
@ -339,7 +339,8 @@ export default {
|
|||||||
if (this.$route.path.includes('jsxt/login')) {
|
if (this.$route.path.includes('jsxt/login')) {
|
||||||
getIsSignUp(this.$route.query.raceId).then(res => {
|
getIsSignUp(this.$route.query.raceId).then(res => {
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
this.$router.push({ path: this.path, query:{raceId:this.$route.query.raceId} });
|
setSessionStorage('raceId', this.$route.query.raceId);
|
||||||
|
this.$router.push({ path: this.path, query:{ raceId:this.$route.query.raceId } });
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox('您未报名该竞赛,所以无法进入竞赛系统');
|
this.$messageBox('您未报名该竞赛,所以无法进入竞赛系统');
|
||||||
}
|
}
|
||||||
@ -347,7 +348,8 @@ export default {
|
|||||||
this.$messageBox('您未报名该竞赛,所以无法进入竞赛系统');
|
this.$messageBox('您未报名该竞赛,所以无法进入竞赛系统');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$router.push({ path: this.path, query:{raceId:this.$route.query.raceId} });
|
setSessionStorage('raceId', this.$route.query.raceId);
|
||||||
|
this.$router.push({ path: this.path, query:{ raceId:this.$route.query.raceId } });
|
||||||
}
|
}
|
||||||
} else if (!this.$route.path.includes('jsxt/login') && !this.$route.path.includes('refereeJsxt/login')) {
|
} else if (!this.$route.path.includes('jsxt/login') && !this.$route.path.includes('refereeJsxt/login')) {
|
||||||
this.$router.push({ path: this.path });
|
this.$router.push({ path: this.path });
|
||||||
|
Loading…
Reference in New Issue
Block a user