# Conflicts:
#	src/views/newMap/displayNew/chatView/chatBox.vue
This commit is contained in:
joylink_cuiweidong 2020-05-25 18:34:30 +08:00
commit 0967316106
14 changed files with 120 additions and 89 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
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

@ -2,11 +2,11 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// 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.6: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://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛

View File

@ -70,7 +70,7 @@ export default {
const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
const dir = stand.right ? '上行站台' : '下行站台';
if (stand) {
this.tip = this.tip + station.name + ':<br>' + dir + '站台存在扣车命令';
this.tip = this.tip + station.name + ':<br>' + dir + '站台存在扣车命令<br>';
}
});
}
@ -89,7 +89,7 @@ export default {
const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
const dir = stand.right ? '上行站台' : '下行站台';
if (stand) {
this.tip = this.tip + station.name + ':<br>' + dir + '站台存在跳停命令';
this.tip = this.tip + station.name + ':<br>' + dir + '站台存在跳停命令<br>';
}
});
}

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,29 +151,38 @@ export default {
},
async exmaStart() {
if (this.$route.query.type == 'theory') {
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}`);
} else {
this.$messageBox('试卷还没被加载');
}
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}`);
} else {
this.$messageBox('试卷还没被加载');
}
}).catch(()=>{
});
}).catch(()=>{
});
} else {
this.$router.replace({ path: `/jsxt/result`, query: { type: 'theory', raceId:this.$route.query.raceId } });
}
} else {
getPracticalQuestion(this.$route.query.raceId).then((responese)=>{
if (responese.data) {
participantCreatTrainingRoom(this.$route.query.raceId, {mapId: 41, prdType: '02'}).then(resp => {
// const query = { lineCode: '11', mapId: '41', group: resp.data, prdType: '03', raceId: this.$route.query.raceId};
// this.$router.replace({ path: `/displayNew/demon`, query: query});
const query = { lineCode: '11', mapId: '41', group: resp.data, raceId: this.$route.query.raceId};
this.$router.replace({ path: `/jointTrainingNew`, query: query});
});
} else {
this.$messageBox('试卷还没被加载');
}
});
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 => {
// const query = { lineCode: '11', mapId: '41', group: resp.data, prdType: '03', raceId: this.$route.query.raceId};
// this.$router.replace({ path: `/displayNew/demon`, query: query});
const query = { lineCode: '11', mapId: '41', group: resp.data, raceId: this.$route.query.raceId};
this.$router.replace({ path: `/jointTrainingNew`, query: query});
});
} 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

@ -88,9 +88,8 @@ export default {
'$store.state.socket.simulationRoleList': function (val) {
if (val && val.length) {
this.$nextTick(() => {
debugger;
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;