This commit is contained in:
fan 2020-05-26 09:21:59 +08:00
commit ff5f0d61cb
14 changed files with 160 additions and 115 deletions

View File

@ -75,7 +75,7 @@ export function getIsSignUp(raceId, params = {}) {
/** 分页查询竞赛报名人员 */
export function getRaceUserList(params) {
return request({
url: `/api/race/${params.raceId}/raceUser`,
url: `/api/race/${params.raceId}/raceUser/page`,
method: 'get',
params
});
@ -108,9 +108,9 @@ export function getCompetitionPractical(competitionId) {
}
/** 查询竞赛报名人员详情 */
export function getRaceUserById(raceId, userId) {
export function getRaceUserById(raceId) {
return request({
url: `/api/race/${raceId}/raceUser/${userId}`,
url: `/api/race/${raceId}/raceUser`,
method: 'get'
});
}

View File

@ -1,5 +1,5 @@
<template>
<div v-show="show" class="pop-menu" :style="{ height: height, left: tPosition.x+'px', top: tPosition.y+'px' }">
<div v-show="show" class="pop-menu" :class="popMenuClass" :style="{ height: height, left: tPosition.x+'px', top: tPosition.y+'px' }">
<div v-for="(item, index) in menu" :key="index" class="" :style="{ width: width }">
<div v-if="item.children">
<el-popover
@ -99,6 +99,12 @@ export default {
default() {
return '';
}
},
popMenuClass: {
type: String,
default() {
return '';
}
}
},
data() {

View File

@ -96,6 +96,21 @@ export default {
overflow: hidden !important;
}
.xian-01__systerm.pop-menu{
padding: 0;
padding-left: 20px;
}
.xian-01__systerm.pop-menu .dsp-block {
display: block;
text-align: left;
width: 100%;
border-radius: unset;
border: 1px solid transparent;
color: #000;
padding: 6px 6px;
border-left: 1px solid #bdbcbc;
}
.xian-01__systerm .el-dialog {
background: rgba(100, 100, 100, 0.3);
border: 2px solid rgb(144, 144, 144, 0.8);

View File

@ -1,6 +1,6 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="xian-01__systerm" />
<section-control ref="sectionControl" />
<section-cmd-control ref="sectionCmdControl" />
<speed-cmd-control ref="speedCmdControl" />

View File

@ -1,6 +1,6 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="xian-01__systerm" />
<route-selection ref="routeSelection" />
<route-lock ref="routeLock" />
<route-control ref="routeControl" />

View File

@ -1,6 +1,6 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="xian-01__systerm" />
<station-cmd-control ref="stationCmdControl" />
<station-human-control-all ref="stationHumanControlAll" />
<station-set-route-control-all ref="stationSetRouteControlAll" />

View File

@ -1,6 +1,6 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="xian-01__systerm" />
<stand-control ref="standControl" />
<stand-detail ref="standDetail" />
<stand-run-level ref="standRunLevel" />
@ -22,7 +22,7 @@ import StandStopTime from './dialog/standStopTime';
import StandDetainTrainAll from './dialog/standDetainTrainAll';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';

View File

@ -1,6 +1,6 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="xian-01__systerm" />
<switch-control ref="switchControl" />
<switch-cmd-control ref="switchCmdControl" />
<speed-cmd-control ref="speedCmdControl" />

View File

@ -1,6 +1,6 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="xian-01__systerm" />
<notice-info ref="noticeInfo" />
<train-control ref="trainControl" />
<train-delete ref="trainDelete" />
@ -53,34 +53,34 @@ export default {
Local: [],
Center: [
{
label: this.$t('menu.menuTrain.addTrainId'),
handler: this.addTrainId,
cmdType:''
label: '添加列车识别号',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: this.$t('menu.menuTrain.deleteTrainId'),
handler: this.delTrainId,
cmdType:''
label: '删除列车识别号',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: this.$t('menu.menuTrain.editTrainId'),
label: '修改列车识别号',
handler: this.editTrainId,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: this.$t('menu.menuTrain.editTrainNo'),
handler: this.editTrainNo,
cmdType:''
label: '修改车组号',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: this.$t('menu.menuTrain.moveTrainId'),
handler: this.moveTrainId,
cmdType:''
label: '移动列车识别号',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: this.$t('menu.menuTrain.switchTrainId'),
handler: this.switchTrainId,
cmdType:''
label: '交换列车识别号',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '标记ATP切除',
@ -94,7 +94,7 @@ export default {
},
{
label: '查看列车详细运行信息',
handler: this.checkTrainDetails,
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_INFO
}
]
@ -147,10 +147,9 @@ export default {
},
initMenu() {
//
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
this.menu = MenuContextHandler.covert(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
this.menu = [...this.menu, ...this.menuForce];
}
//
@ -162,28 +161,26 @@ export default {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
if (this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
if (this.$refs.popMenu) {
this.$refs.popMenu.close();
// this.$store.dispatch('map/setTrainWindowShow', false);
}
},
//
setStoppage() {
const step = {
start: true,
operation: OperationEvent.Train.stoppage.menu.operation,
cmdType: CMD.Train.CMD_STOPPAGE,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
@ -197,14 +194,13 @@ export default {
cancelStoppage() {
const step = {
start: true,
operation: OperationEvent.Train.cancelStoppage.menu.operation,
cmdType: CMD.Train.CMD_CANCEL_STOPPAGE,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
@ -218,14 +214,13 @@ export default {
limitSpeed() {
const step = {
start: true,
operation: OperationEvent.Train.limitSpeed.menu.operation,
cmdType: CMD.Train.CMD_LIMIT_SPEED,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
@ -239,13 +234,12 @@ export default {
addTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.addTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(step, this.selected);
@ -256,13 +250,12 @@ export default {
delTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.delTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDelete.doShow(step, this.selected);
@ -273,13 +266,12 @@ export default {
editTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.editTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(step, this.selected);
@ -290,13 +282,12 @@ export default {
editTrainNo() {
const step = {
start: true,
operation: OperationEvent.Train.editTrainNo.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainEditNumber.doShow(step, this.selected);
@ -307,20 +298,26 @@ export default {
moveTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.moveTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainMove.doShow(step, this.selected);
}
});
},
undeveloped() {},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
//
switchTrainId() {
const step = {
@ -330,7 +327,7 @@ export default {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainSwitch.doShow(step, this.selected);

View File

@ -56,15 +56,30 @@
<template v-else>
<div v-if="flag" class="apply_box">
<div class="img_box"><img :src="SAFS" alt=""></div>
<i class="el-icon-success" style="color: green; font-size: 40px;" />
<span class="title">报名成功!</span>
<div style="width: 100%;text-align:center;margin-top:120px;"><i class="el-icon-success" style="color: green; font-size: 100px;" /></div>
<div style="width: 100%;margin-top: 25px;">
<div class="apply_box_title">报名成功! 您的报名信息如下:<br>姓名{{ formModel.name }}
<br>公司{{ formModel.company }}
<br>部门{{ formModel.department }}
<br>职位{{ formModel.job }}
<br>电话{{ formModel.phone.replace(/^(\d{3})\d{4}(\d+)/,"$1****$2") }}
</div>
</div>
</div>
<div v-if="!flag" class="applyAready_box">
<div class="img_box"><img :src="SAFS" alt=""></div>
<div><img :src="applyAlready" class="applyAlready"></div>
<div><span style="margin-left:10px;">请按时参加竞赛</span></div>
<div style="width: 100%;text-align:center;margin-top:120px;"><img :src="applyAlready" class="applyAlready"></div>
<div style="width: 100%;margin-top: 25px;">
<div class="apply_box_title">
您的报名信息如下:<br>姓名{{ formModel.name }}
<br>公司{{ formModel.organization }}
<br>部门{{ formModel.department }}
<br>职位{{ formModel.position }}
<br>电话{{ formModel.mobile.replace(/^(\d{3})\d{4}(\d+)/,"$1****$2") }}
</div>
</template>
</div>
</div>
</template></div></template>
</div>
</template>
@ -76,8 +91,7 @@ import md5 from 'js-md5';
import Cookies from 'js-cookie';
import QrcodeVue from 'qrcode.vue';
import { getUserinfoMobileCode } from '@/api/management/user';
import { postSignUp } from '@/api/competition';
import { getIsSignUp } from '@/api/competition';
import { postSignUp, getRaceUserById } from '@/api/competition';
import applyAlready from '@/assets/applyAlready.png';
import SAFS from '@/assets/SAFS.png';
@ -190,9 +204,10 @@ export default {
if (this.checkLogin) {
this.clearTimer(this.checkLogin);
}
getIsSignUp(this.$route.query.raceId).then(res => {
getRaceUserById(this.$route.query.raceId).then(res => {
if (res.data) {
//
this.formModel = res.data;
this.applyFlag = false;
this.flag = false;
}
@ -389,15 +404,8 @@ export default {
width:150px;
}
.applyAready_box{
padding-top: 95px;
}
.applyAready_box div{
width:100%;
text-align:center;
font-size: 25px;
}
.dictionary_box{
padding-top: 10px;
.joylink-card{
width: 800px;
margin: 0 auto 20px;
@ -410,9 +418,6 @@ export default {
}
}
.img_box{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 80px;
img{
@ -421,17 +426,17 @@ export default {
}
}
.apply_box{
display: flex;
justify-content: center;
align-items: center;
margin-top: 95px;
// display: flex;
// justify-content: center;
// align-items: center;
font-size: 25px;
.title{
margin-left: 7px;
text-align: left;
font-size: 25px;
width: auto;
}
.apply_box_title{
font-size: 22px;
line-height: 35px;
margin-left: 50%;
transform: translateX(-50%);
display: inline-block;
}
/deep/{
.dialog-apply{

View File

@ -1,7 +1,7 @@
<template>
<div class="joylink-card">
<b class="title-name">{{ examType }}</b>
<img class="img_box" :src="applyImg" alt="">
<!-- <img class="img_box" :src="applyImg" alt=""> -->
<div class="btn-start">
<el-button :disabled="disabled" type="primary" @click="exmaStart">{{ $t('exam.startTheExam') }}</el-button>
</div>
@ -15,15 +15,16 @@ import LangStorage from '@/utils/lang';
import { getPublishMapInfo } from '@/api/jmap/map';
import ConstConfig from '@/scripts/ConstConfig';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { participantCreatTrainingRoom, getCompetitionPractical, getPracticalQuestion, getTheoryQuestion } from '@/api/competition';
import applyImg from '@/assets/apply.png';
import {getRaceUserById} from '@/api/competition';
import { participantCreatTrainingRoom, getPracticalQuestion, getTheoryQuestion } from '@/api/competition';
// import applyImg from '@/assets/apply.png';
export default {
name: 'ExamDetailView',
data() {
return {
disabled: false,
applyImg: applyImg,
// applyImg: applyImg,
examDetails: {
lessonId: '',
name: '',
@ -150,6 +151,8 @@ export default {
},
async exmaStart() {
if (this.$route.query.type == 'theory') {
const res = await getRaceUserById(this.$route.query.raceId);
if (res.data.status != 4 || res.data.status != 5) {
getTheoryQuestion(this.$route.query.raceId).then((resp)=>{
if (resp.data) {
this.$router.push(`/jsxt/theory/detail/${this.$route.query.mapId}?raceId=${this.$route.query.raceId}`);
@ -160,6 +163,11 @@ export default {
}).catch(()=>{
});
} else {
this.$router.replace({ path: `/jsxt/result`, query: { type: 'theory', raceId:this.$route.query.raceId } });
}
} else {
const res = await getRaceUserById(this.$route.query.raceId);
if (res.data.status != 4 || res.data.status != 6) {
getPracticalQuestion(this.$route.query.raceId).then((responese)=>{
if (responese.data) {
participantCreatTrainingRoom(this.$route.query.raceId, {mapId: 41, prdType: '02'}).then(resp => {
@ -171,8 +179,10 @@ export default {
} else {
this.$messageBox('试卷还没被加载');
}
});
} else {
this.$router.replace({ path: `/jsxt/result`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId, type: 'operate', raceId:this.$route.query.raceId } });
}
}
}
}
@ -196,11 +206,15 @@ export default {
height: 100%;
}
.title-name{
position: absolute;
left: 50%;
top: 66px;
transform: translateX(-80px);
// position: absolute;
// left: 50%;
// top: 66px;
// transform: translateX(-80px);
font-size: 30px;
text-align: center;
width: 100%;
margin-top: 50px;
display: block;
}
}
.img_box{

View File

@ -69,8 +69,16 @@ export default {
tagType: (row) => { return 'success'; }
},
{
title: '分数',
prop: 'score'
title: '理论分数',
prop: 'theoryScore'
},
{
title: '实操分数',
prop: 'practiceScore'
},
{
title: '总数',
prop: 'totalScore'
},
// {
// title: '',
@ -96,7 +104,7 @@ export default {
showControl: (row) => { return row.status == '4'; }
},
{
name: '打分',
name: '修改',
handleClick: this.gradeScore,
type: 'success',
showControl: (row) => { return row.status == '4'; }

View File

@ -88,8 +88,8 @@ export default {
'$store.state.socket.simulationRoleList': function (val) {
if (val && val.length) {
this.$nextTick(() => {
this.$refs.chatMemberList.setMemberStatus(val);
this.$refs.chatCoversitionList.setCoversitionStatus(val);
this.$refs.chatMemberList && this.$refs.chatMemberList.setMemberStatus(val);
this.$refs.chatCoversitionList && this.$refs.chatCoversitionList.setCoversitionStatus(val);
});
}
},

View File

@ -365,7 +365,7 @@ export default {
// 01 02 ''
let resp = {data: {}};
if (this.project == 'jsxt' ) {
resp = await getRaceUserById(this.$route.query.raceId, this.userId);
resp = await getRaceUserById(this.$route.query.raceId);
resp.data.userRole = resp.data.role;
} else if (this.project == 'refereeJsxt') {
resp['code'] = 200;