Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
243a5763bc
@ -603,7 +603,7 @@ class SkinCode extends defaultStyle {
|
||||
defaultDirectionCode: 'D', // 默认车次号1
|
||||
defaultTripNumber: 'CCC', // 默认车次号2
|
||||
trainTargetOffset: { x: 42, y: 1}, // 列车车次号偏移
|
||||
smallColor: '#70ECEE', // 小交路颜色
|
||||
smallColor: '#00FFFF', // 小交路颜色
|
||||
bigColor: '#FFFFFF', // 大交路颜色
|
||||
inboundColor: '#00FF00', // 回库颜色
|
||||
planTypeColor: '#FFFFFF' // 计划车颜色
|
||||
|
@ -32,7 +32,7 @@ export const loginInfo = { // 页面title & 退出登录跳转路径
|
||||
loginPath: '/designgzb/login'
|
||||
},
|
||||
hyd: {
|
||||
title: '城市轨道交通实训平台',
|
||||
title: '城市轨道交通综合行车模拟仿真系统',
|
||||
loginPath: '/login'
|
||||
},
|
||||
designhyd: {
|
||||
|
@ -29,6 +29,9 @@ function handle(state, data) {
|
||||
case 'Simulation_Script_Tip': // 仿真-聊天界面用户进出仿真消息
|
||||
handleSimulationScriptTipInfo(state, msg); // 用户进出仿真消息
|
||||
break;
|
||||
case 'Simulation_Start_Conversation': // 综合演练仿真-聊天界面用户邀请其他人加入群聊
|
||||
state.inviteOtherIntoChat = msg;
|
||||
break;
|
||||
case 'Competition_Practical': // 竞赛裁判系统裁判员开始考试推送消息
|
||||
state.competitionStart++; // 竞赛裁判系统裁判员开始考试推送消息
|
||||
break;
|
||||
@ -213,7 +216,8 @@ const socket = {
|
||||
simulationStart: '', // 仿真-开始消息
|
||||
simulationOver:0, // 退出仿真推送消息
|
||||
simulationReset: '', // 仿真-异常消息
|
||||
simulationText: {}, // 仿真-用户交互消息(聊天/命令)
|
||||
simulationText: {}, // 仿真-用户交互消息(聊天/命令),
|
||||
inviteOtherIntoChat:{}, // 综合演练仿真-聊天界面用户邀请其他人加入群聊推送信息
|
||||
// coversitionList:{}, // 历史仿真-用户消息列表
|
||||
|
||||
message: {}, // 仿真聊天
|
||||
|
@ -15,14 +15,16 @@
|
||||
</div>
|
||||
|
||||
<div class="lcd_content_box">
|
||||
<div style="display: inline-block;">
|
||||
<div class="lcd_content_box_left_title">车站</div>
|
||||
<div class="lcd_content_box_left_title">选择</div>
|
||||
</div>
|
||||
<div v-for="(station, index) in stationList" :key="index" style="display: inline-block;text-align: center;">
|
||||
<div class="each_station_info">{{ station }}</div>
|
||||
<div class="button_default_content">
|
||||
<div class="button_default" :style="{background:selectedAreaList.includes(station.stationName + '-' + index)?'#2EFF74':'#CDCDCD'}" />
|
||||
<div>
|
||||
<div style="display: inline-block;">
|
||||
<div class="lcd_content_box_left_title">车站</div>
|
||||
<div class="lcd_content_box_left_title">选择</div>
|
||||
</div>
|
||||
<div v-for="(station, index) in stationList" :key="index" style="display: inline-block;text-align: center;">
|
||||
<div class="each_station_info">{{ station }}</div>
|
||||
<div class="button_default_content">
|
||||
<div class="button_default" :style="{background:selectedAreaList.includes(station.stationName + '-' + index)?'#2EFF74':'#CDCDCD'}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -14,7 +14,7 @@
|
||||
</div>
|
||||
</el-main>
|
||||
<el-footer class="quiz__container-footer layer-center" @click="returnTop">
|
||||
<div style="display: inline-block;position: relative;bottom: 20px;height: 40px;line-height: 40px;float: left;color:#F00;font-size: 12px;">温馨提示:考试过程中请不要刷新或关闭本页面!</div>
|
||||
<div style="display: inline-block;position: relative;bottom: 20px;height: 40px;line-height: 40px;float: left;color:#F00;font-size: 12px;">温馨提示:考试过程中请退出或关闭本页面不会终止计时!</div>
|
||||
<div style="display: inline-block;position: relative;bottom: 20px;height: 40px;line-height: 40px;margin-right: 10px;font-weight:bold;">{{ '剩余时间:'+countdownTime }}</div>
|
||||
<el-button-group class="buttons">
|
||||
<el-button v-loading="loading" type="primary" @click="commit">提 交</el-button>
|
||||
@ -28,6 +28,7 @@
|
||||
// import { commitExam, getExamInfo, getUserExam, saveExamAnswer } from '@/api/exam.js';
|
||||
// import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
import Question from './question';
|
||||
import localStore from 'storejs';
|
||||
import { postCompetitionTheory, getTheoryQuestion, quitCurrentRace } from '@/api/competition';
|
||||
|
||||
export default {
|
||||
@ -51,7 +52,7 @@ export default {
|
||||
passScore: 10
|
||||
},
|
||||
examQuestions: [],
|
||||
theoryAnswers: [],
|
||||
theoryAnswersMap: {},
|
||||
countdownTime: '00:00:00',
|
||||
theoryExamTime: 0,
|
||||
countdown: null
|
||||
@ -100,15 +101,32 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.theoryAnswers = [];
|
||||
// this.theoryAnswers = [];
|
||||
this.theoryAnswersMap = {};
|
||||
getTheoryQuestion(this.$route.query.raceId).then((resp)=>{
|
||||
const storeAnswersKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'theoryAnswers';
|
||||
const storeAnswers = localStore.get(storeAnswersKey);
|
||||
if (storeAnswers) {
|
||||
this.theoryAnswersMap = storeAnswers;
|
||||
}
|
||||
if (resp.data) {
|
||||
this.examQuestions = resp.data.questions.map((el, i) => {
|
||||
el.index = i;
|
||||
el.answer = this.theoryAnswersMap[el.id];
|
||||
return el;
|
||||
});
|
||||
this.theoryExamTime = resp.data.theoryExamTime * 60;
|
||||
this.countdownTime = this.computationTime(this.theoryExamTime);
|
||||
const storeKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'theory';
|
||||
const startTime = localStore.get(storeKey);
|
||||
|
||||
if (startTime) {
|
||||
const dt = new Date().getTime() - startTime;
|
||||
this.theoryExamTime = resp.data.theoryExamTime * 60 - Math.floor(dt / 1000);
|
||||
} else {
|
||||
const storeValue = new Date().getTime();
|
||||
localStore.set(storeKey, storeValue);
|
||||
}
|
||||
this.countdown = setInterval(() => {
|
||||
if (this.theoryExamTime <= 0) {
|
||||
if (this.countdown) {
|
||||
@ -157,20 +175,28 @@ export default {
|
||||
}
|
||||
},
|
||||
doEnd() {
|
||||
const theoryAnswers = [];
|
||||
for (const key in this.theoryAnswersMap) {
|
||||
theoryAnswers.push({questionId: key, answerOptionId: this.theoryAnswersMap[key]});
|
||||
}
|
||||
const params = {
|
||||
competitionId: this.$route.query.raceId,
|
||||
theoryAnswers: this.theoryAnswers
|
||||
theoryAnswers: theoryAnswers
|
||||
};
|
||||
postCompetitionTheory(params).then(()=>{
|
||||
this.$router.push({ path: `/jsxt/theory/result?raceId=${this.$route.query.raceId}` });
|
||||
});
|
||||
},
|
||||
onSave(data) {
|
||||
// console.log(data, '问答题');
|
||||
this.theoryAnswers.push({
|
||||
answerOptionId: data.answer,
|
||||
questionId: data.userExamQuestionId
|
||||
});
|
||||
// this.theoryAnswers.push({
|
||||
// answerOptionId: data.answer,
|
||||
// questionId: data.userExamQuestionId
|
||||
// });
|
||||
this.theoryAnswersMap[data.userExamQuestionId] = data.answer;
|
||||
// console.log(data, '问答题', this.theoryAnswers, this.theoryAnswersMap);
|
||||
const storeKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'theoryAnswers';
|
||||
localStore.set(storeKey, this.theoryAnswersMap);
|
||||
|
||||
},
|
||||
computationTime(time) {
|
||||
let hours = Math.floor(time / 3600);
|
||||
|
@ -69,7 +69,7 @@ import { setSessionStorage, removeSessionStorage } from '@/utils/auth';
|
||||
import Cookies from 'js-cookie';
|
||||
import md5 from 'js-md5';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { ProjectIcon } from '@/scripts/ProjectConfig';
|
||||
import { loginInfo, ProjectIcon } from '@/scripts/ProjectConfig';
|
||||
import { removeToken } from '@/utils/auth';
|
||||
import LangStorage from '@/utils/lang';
|
||||
import logoImgHyd from '@/assets/project_icon/logo_hyd.png';
|
||||
@ -121,7 +121,7 @@ export default {
|
||||
lang: 'zh',
|
||||
language: '中文',
|
||||
logoImg: logoImgHyd,
|
||||
title: '城市轨道交通实训平台'
|
||||
title: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -151,7 +151,9 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
if (this.project.startsWith('design')) {
|
||||
this.title = '城市轨道交通设计平台';
|
||||
this.title = loginInfo['designhyd'].title;
|
||||
} else {
|
||||
this.title = loginInfo['hyd'].title;
|
||||
}
|
||||
document.title = this.title;
|
||||
},
|
||||
|
@ -13,8 +13,8 @@
|
||||
style="height: 100%;"
|
||||
>
|
||||
<div v-if="lineCode=='10'||lineCode=='11'" class="menuTrainList">
|
||||
<div class="topTrainListInfo">下行列车详细信息</div>
|
||||
<el-table :data="topTrainList" height="45%" :highlight-current-row="true" @row-click="selectTrain">
|
||||
<div class="bottomTrainListInfo">下行列车详细信息</div>
|
||||
<el-table :data="bottomTrainList" height="45%" :highlight-current-row="true" @row-click="selectTrain">
|
||||
<el-table-column property="groupNumber" label="车组号" width="70" />
|
||||
<el-table-column property="tripNumber" label="车次号" width="70" />
|
||||
<el-table-column property="destinationCode" label="目的地号" width="100" />
|
||||
@ -163,7 +163,7 @@ export default {
|
||||
// padding: 5px;
|
||||
background: #fff;
|
||||
}
|
||||
.topTrainListInfo{
|
||||
.topTrainListInfo,.bottomTrainListInfo{
|
||||
padding: 10px 10px;
|
||||
background: #cde2ef;
|
||||
font-size: 13px;
|
||||
|
@ -43,6 +43,7 @@
|
||||
</div>
|
||||
<chat-setting ref="chatSetting" :form="form" @setSetting="setSetting" />
|
||||
<chat-create-group ref="createGroup" :group="group" @addCoversition="addCoversition" />
|
||||
<chat-tooltip />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -51,6 +52,7 @@ import ChatContent from './chatContent';
|
||||
import ChatMemberList from './chatMemberList';
|
||||
import ChatCoversitionList from './chatCoversitionList';
|
||||
import ChatCreateGroup from './chatCreateGroup';
|
||||
import ChatTooltip from './chatTooltip';
|
||||
import RecordRTC from 'recordrtc';
|
||||
import {uploadAudioFileNew} from '@/api/chat';
|
||||
export default {
|
||||
@ -60,7 +62,8 @@ export default {
|
||||
ChatContent,
|
||||
ChatMemberList,
|
||||
ChatCoversitionList,
|
||||
ChatCreateGroup
|
||||
ChatCreateGroup,
|
||||
ChatTooltip
|
||||
},
|
||||
props: {
|
||||
group: {
|
@ -12,8 +12,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
// import ConstConfig from '@/scripts/ConstConfig';
|
||||
// import Cookies from 'js-cookie';
|
||||
import {getSimulationConversationListNew} from '@/api/chat';
|
||||
export default {
|
||||
name:'ChatCoversitionList',
|
||||
@ -32,15 +32,15 @@ export default {
|
||||
if (resp.data) {
|
||||
const data = resp.data;
|
||||
data.map(coversition=>{
|
||||
if (coversition.name) {
|
||||
coversition.coverName = coversition.name;
|
||||
coversition.isOnline = true;
|
||||
} else {
|
||||
const objectCover = this.handleMemberName(coversition);
|
||||
coversition.coverName = objectCover.coversitionName;
|
||||
coversition.isOnline = objectCover.isOnline;
|
||||
}
|
||||
|
||||
// if (coversition.name) {
|
||||
coversition.coverName = coversition.name;
|
||||
coversition.isOnline = true;
|
||||
// }
|
||||
// else {
|
||||
// const objectCover = this.handleMemberName(coversition);
|
||||
// coversition.coverName = objectCover.coversitionName;
|
||||
// coversition.isOnline = objectCover.isOnline;
|
||||
// }
|
||||
return coversition;
|
||||
});
|
||||
this.coversitionList = data;
|
||||
@ -54,14 +54,15 @@ export default {
|
||||
addCoversition(data) {
|
||||
const index = this.coversitionList.findIndex(item=>{ return item.id == data.id; });
|
||||
if (index < 0) {
|
||||
const objectCover = this.handleMemberName(data);
|
||||
if (data.name) {
|
||||
data.coverName = data.name;
|
||||
data.isOnline = true;
|
||||
} else {
|
||||
data.coverName = objectCover.coversitionName;
|
||||
data.isOnline = objectCover.isOnline;
|
||||
}
|
||||
// const objectCover = this.handleMemberName(data);
|
||||
// if (data.name) {
|
||||
data.coverName = data.name;
|
||||
data.isOnline = true;
|
||||
// }
|
||||
// else {
|
||||
// data.coverName = objectCover.coversitionName;
|
||||
// data.isOnline = objectCover.isOnline;
|
||||
// }
|
||||
|
||||
this.coversitionList.push(data);
|
||||
this.currentCoversition = data;
|
||||
@ -74,62 +75,64 @@ export default {
|
||||
// this.$refs.chatContent.reloadData(this.currentCoversition);
|
||||
},
|
||||
changeCoversitionOther(coversition) {
|
||||
const objectCover = this.handleMemberName(coversition);
|
||||
coversition.coverName = objectCover.coversitionName;
|
||||
coversition.isOnline = objectCover.isOnline;
|
||||
// const objectCover = this.handleMemberName(coversition);
|
||||
// coversition.coverName = objectCover.coversitionName;
|
||||
// coversition.isOnline = objectCover.isOnline;
|
||||
coversition.coverName = coversition.name;
|
||||
coversition.isOnline = true;
|
||||
const index = this.coversitionList.findIndex(item=>{ return item.id == coversition.id; });
|
||||
if (index < 0) {
|
||||
this.coversitionList.push(coversition);
|
||||
}
|
||||
this.changeCoversition(coversition);
|
||||
},
|
||||
handleMemberName(conversition) {
|
||||
if (conversition.all) {
|
||||
return {coversitionName:conversition.name, isOnline:true};
|
||||
} else {
|
||||
let coversitionName = '';
|
||||
let isOnline = true;
|
||||
if (conversition.memberList) {
|
||||
conversition.memberList.forEach(member=>{
|
||||
if (member.userId != this.$store.state.user.id) {
|
||||
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
||||
let data = member.role;
|
||||
roleTypeList.forEach(function(element) {
|
||||
const rolename = element.value;
|
||||
if (Cookies.get('user_lang') == 'en') {
|
||||
data = data.replace(rolename, element.enLabel);
|
||||
} else {
|
||||
data = data.replace(rolename, element.label);
|
||||
}
|
||||
});
|
||||
const deviceName = member.deviceName ? '-' + member.deviceName : '';
|
||||
const memberName = member.name ? '-' + member.name : '';
|
||||
isOnline = member.online;
|
||||
coversitionName = data + deviceName + memberName;
|
||||
}
|
||||
});
|
||||
} else if (conversition.member) {
|
||||
const member = conversition.member;
|
||||
let data = member.role;
|
||||
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
||||
roleTypeList.forEach(function(element) {
|
||||
const rolename = element.value;
|
||||
if (Cookies.get('user_lang') == 'en') {
|
||||
data = data.replace(rolename, element.enLabel);
|
||||
} else {
|
||||
data = data.replace(rolename, element.label);
|
||||
}
|
||||
});
|
||||
const deviceName = member.deviceName ? '-' + member.deviceName : '';
|
||||
const memberName = member.name ? '-' + member.name : '';
|
||||
isOnline = member.online;
|
||||
coversitionName = data + deviceName + memberName;
|
||||
} else {
|
||||
coversitionName = conversition.name;
|
||||
}
|
||||
return {coversitionName:coversitionName, isOnline:isOnline};
|
||||
}
|
||||
}
|
||||
// handleMemberName(conversition) {
|
||||
// if (conversition.all) {
|
||||
// return {coversitionName:conversition.name, isOnline:true};
|
||||
// } else {
|
||||
// let coversitionName = '';
|
||||
// let isOnline = true;
|
||||
// if (conversition.memberList) {
|
||||
// conversition.memberList.forEach(member=>{
|
||||
// if (member.userId != this.$store.state.user.id) {
|
||||
// const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
||||
// let data = member.role;
|
||||
// roleTypeList.forEach(function(element) {
|
||||
// const rolename = element.value;
|
||||
// if (Cookies.get('user_lang') == 'en') {
|
||||
// data = data.replace(rolename, element.enLabel);
|
||||
// } else {
|
||||
// data = data.replace(rolename, element.label);
|
||||
// }
|
||||
// });
|
||||
// const deviceName = member.deviceName ? '-' + member.deviceName : '';
|
||||
// const memberName = member.name ? '-' + member.name : '';
|
||||
// isOnline = member.online;
|
||||
// coversitionName = data + deviceName + memberName;
|
||||
// }
|
||||
// });
|
||||
// } else if (conversition.member) {
|
||||
// const member = conversition.member;
|
||||
// let data = member.role;
|
||||
// const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
||||
// roleTypeList.forEach(function(element) {
|
||||
// const rolename = element.value;
|
||||
// if (Cookies.get('user_lang') == 'en') {
|
||||
// data = data.replace(rolename, element.enLabel);
|
||||
// } else {
|
||||
// data = data.replace(rolename, element.label);
|
||||
// }
|
||||
// });
|
||||
// const deviceName = member.deviceName ? '-' + member.deviceName : '';
|
||||
// const memberName = member.name ? '-' + member.name : '';
|
||||
// isOnline = member.online;
|
||||
// coversitionName = data + deviceName + memberName;
|
||||
// } else {
|
||||
// coversitionName = conversition.name;
|
||||
// }
|
||||
// return {coversitionName:coversitionName, isOnline:isOnline};
|
||||
// }
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,38 +1,40 @@
|
||||
<template>
|
||||
<div v-show="dialogVisible" class="chat-create-group">
|
||||
<div class="create-group-header">
|
||||
<div class="create-group-title">添加会话对象</div>
|
||||
<div class="create-group-close">
|
||||
<i class="el-icon-close" @click="dialogVisible=false" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="create-group-content">
|
||||
<div class="chat-member-list">
|
||||
<el-checkbox-group v-model="checkList">
|
||||
<el-checkbox
|
||||
v-for="member in memberList"
|
||||
:key="member.id"
|
||||
class="each-chat-member"
|
||||
:label="member"
|
||||
:disabled="member.userId === userId"
|
||||
>{{ member.memberName }}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div class="currentSelectList">
|
||||
<div
|
||||
v-for="member in checkList"
|
||||
:key="member.id"
|
||||
class="eachSelect"
|
||||
>
|
||||
{{ member.memberName }}
|
||||
<div v-show="dialogVisible" class="chat-create-group-all">
|
||||
<div class="chat-create-group">
|
||||
<div class="create-group-header">
|
||||
<div class="create-group-title">添加会话对象</div>
|
||||
<div class="create-group-close">
|
||||
<i class="el-icon-close" @click="dialogVisible=false" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="create-group-content">
|
||||
<div class="chat-member-list">
|
||||
<el-checkbox-group v-model="checkList">
|
||||
<el-checkbox
|
||||
v-for="member in memberList"
|
||||
:key="member.id"
|
||||
class="each-chat-member"
|
||||
:label="member"
|
||||
:disabled="member.userId === userId"
|
||||
>{{ member.memberName }}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div class="currentSelectList">
|
||||
<div
|
||||
v-for="member in checkList"
|
||||
:key="member.id"
|
||||
class="eachSelect"
|
||||
>
|
||||
{{ member.memberName }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- :style="member.userId === userId ?'color:red':''" -->
|
||||
</div>
|
||||
<div class="create-group-bottom">
|
||||
<el-button :loading="loading" size="small" type="primary" @click="doCreate">创建会话</el-button>
|
||||
<el-button size="small" @click="doClose">取消</el-button>
|
||||
</div>
|
||||
<div class="create-group-bottom">
|
||||
<el-button :loading="loading" size="small" type="primary" @click="doCreate">创建会话</el-button>
|
||||
<el-button size="small" @click="doClose">取消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -102,7 +104,7 @@ export default {
|
||||
this.checkList = [];
|
||||
}
|
||||
}).catch(error=>{
|
||||
this.$messageBox('创建会话失败: ' + error.messagfe);
|
||||
this.$messageBox('创建会话失败: ' + error.message);
|
||||
this.loading = false;
|
||||
this.dialogVisible = false;
|
||||
this.checkList = [];
|
||||
@ -118,6 +120,14 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.chat-create-group-all{
|
||||
position:absolute;
|
||||
width:100%;
|
||||
height:100%;
|
||||
left:0;
|
||||
top:0;
|
||||
z-index:10;
|
||||
}
|
||||
.chat-create-group{
|
||||
position: absolute;
|
||||
width: 70%;
|
94
src/views/newMap/jointTrainingNew/chatView/chatTooltip.vue
Normal file
94
src/views/newMap/jointTrainingNew/chatView/chatTooltip.vue
Normal file
@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<div v-show="dialogVisible" class="chatTooltipAll">
|
||||
<div class="chatTooltip">
|
||||
<div class="chatTooltipHeader">
|
||||
{{ userName }} 邀请您加入会话!
|
||||
</div>
|
||||
<div class="chatTooltipBootom">
|
||||
<div class="create-group-bottom">
|
||||
<el-button :loading="loading" size="small" type="primary" @click="doCreate">接受</el-button>
|
||||
<el-button size="small" @click="doClose">拒绝</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
export default {
|
||||
name:'ChatTooltip',
|
||||
data() {
|
||||
return {
|
||||
userName:'',
|
||||
dialogVisible:false,
|
||||
loading:false
|
||||
};
|
||||
},
|
||||
watch:{
|
||||
'$store.state.socket.inviteOtherIntoChat':function(val) {
|
||||
this.userName = this.coverName(val);
|
||||
this.dialogVisible = true;
|
||||
}
|
||||
},
|
||||
// {"conversationId":"22e10b17-7a6c-4b1b-8724-f87fb2053b76","from":{"id":"17","userId":"75","name":"赵",
|
||||
// "role":"STATION_SUPERVISOR","deviceType":"STATION","deviceCode":"Station32955","deviceName":"世纪大道","online":true,"robot":false}
|
||||
methods:{
|
||||
coverName(inviteUser) {
|
||||
const member = inviteUser.from;
|
||||
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
||||
let data = member.role;
|
||||
roleTypeList.forEach(function(element) {
|
||||
const rolename = element.value;
|
||||
if (Cookies.get('user_lang') == 'en') {
|
||||
data = data.replace(rolename, element.enLabel);
|
||||
} else {
|
||||
data = data.replace(rolename, element.label);
|
||||
}
|
||||
});
|
||||
const deviceName = member.deviceName ? '-' + member.deviceName : '';
|
||||
const memberName = member.name ? '-' + member.name : '';
|
||||
return data + deviceName + memberName;
|
||||
},
|
||||
doCreate() {
|
||||
|
||||
},
|
||||
doClose() {
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.chatTooltip{
|
||||
position: absolute;
|
||||
width: 290px;
|
||||
left: 32%;
|
||||
top: 42%;
|
||||
z-index: 5;
|
||||
background: #fff;
|
||||
padding: 15px;
|
||||
box-shadow: #969090 0px 0px 10px;
|
||||
border-radius: 4px;
|
||||
line-height: 20px;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
.chatTooltipHeader{
|
||||
margin-top:10px;
|
||||
font-size:14px;
|
||||
}
|
||||
.chatTooltipBootom{
|
||||
margin-top:10px;
|
||||
text-align: center;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.chatTooltipAll{
|
||||
position:absolute;
|
||||
width:100%;
|
||||
height:100%;
|
||||
left:0;
|
||||
top:0;
|
||||
z-index: 10;
|
||||
}
|
||||
</style>
|
@ -26,7 +26,7 @@
|
||||
|
||||
<script>
|
||||
import QrCode from '@/components/QrCode';
|
||||
import ChatBox from './chatBox';
|
||||
import ChatBox from './chatView/chatBox';
|
||||
import SetTime from '@/views/newMap/displayNew/demon/setTime';
|
||||
import { ranAsPlan, exitRunPlan } from '@/api/simulation';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
|
@ -13,8 +13,8 @@
|
||||
style="height: 100%;"
|
||||
>
|
||||
<div v-if="lineCode=='10'||lineCode=='11'" class="menuTrainList">
|
||||
<div class="topTrainListInfo">下行列车详细信息</div>
|
||||
<el-table :data="topTrainList" height="45%" :highlight-current-row="true" @row-click="selectTrain">
|
||||
<div class="bottomTrainListInfo">下行列车详细信息</div>
|
||||
<el-table :data="bottomTrainList" height="45%" :highlight-current-row="true" @row-click="selectTrain">
|
||||
<el-table-column property="groupNumber" label="车组号" width="70" />
|
||||
<el-table-column property="tripNumber" label="车次号" width="70" />
|
||||
<el-table-column property="destinationCode" label="目的地号" width="100" />
|
||||
@ -163,7 +163,7 @@ export default {
|
||||
// padding: 5px;
|
||||
background: #fff;
|
||||
}
|
||||
.topTrainListInfo{
|
||||
.topTrainListInfo,.bottomTrainListInfo{
|
||||
padding: 10px 10px;
|
||||
background: #cde2ef;
|
||||
font-size: 13px;
|
||||
|
@ -111,19 +111,20 @@ export default {
|
||||
'stationStandList'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
signalList: function (val, old) {
|
||||
const list = [];
|
||||
if (val && val.length) {
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
list.push({ label: val[i].uniqueName, value: val[i].code });
|
||||
}
|
||||
this.queryForm.queryObject.signalCode.config.data = list;
|
||||
}
|
||||
}
|
||||
},
|
||||
// watch: {
|
||||
// signalList: function (val, old) {
|
||||
// const list = [];
|
||||
// if (val && val.length) {
|
||||
// for (let i = 0; i < val.length; i++) {
|
||||
// list.push({ label: val[i].uniqueName, value: val[i].code });
|
||||
// }
|
||||
// this.queryForm.queryObject.signalCode.config.data = list;
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
mounted() {
|
||||
this.acquireMapList();
|
||||
this.initQueryObject();
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
@ -133,6 +134,16 @@ export default {
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
initQueryObject() {
|
||||
const list = [];
|
||||
const val = this.signalList;
|
||||
if (val && val.length) {
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
list.push({ label: val[i].uniqueName, value: val[i].code });
|
||||
}
|
||||
this.queryForm.queryObject.signalCode.config.data = list;
|
||||
}
|
||||
},
|
||||
formatName(code) {
|
||||
let name = '';
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
|
@ -155,36 +155,35 @@ export default {
|
||||
'stationList'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
stationList: function (val, old) {
|
||||
const list = [];
|
||||
if (val && val.length) {
|
||||
val.forEach(elem => {
|
||||
list.push({ label: this.formatName(elem.code), value: elem.code });
|
||||
});
|
||||
this.queryForm.queryObject.startStationCode.config.data = list;
|
||||
this.queryForm.queryObject.endStationCode.config.data = list;
|
||||
}
|
||||
},
|
||||
sectionList: function (val, old) {
|
||||
const list = [];
|
||||
if (val && val.length) {
|
||||
val.forEach(elem => {
|
||||
list.push({ label: this.formatName(elem.code), value: elem.code });
|
||||
});
|
||||
this.queryForm.queryObject.startSectionCode.config.data = list;
|
||||
this.queryForm.queryObject.endSectionCode.config.data = list;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.acquireMapList();
|
||||
this.initQueryObject();
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.show = true;
|
||||
this.reloadTable();
|
||||
},
|
||||
initQueryObject() {
|
||||
const stationList = [];
|
||||
if (this.stationList && this.stationList.length) {
|
||||
this.stationList.forEach(elem => {
|
||||
stationList.push({ label: this.formatName(elem.code), value: elem.code });
|
||||
});
|
||||
this.queryForm.queryObject.startStationCode.config.data = stationList;
|
||||
this.queryForm.queryObject.endStationCode.config.data = stationList;
|
||||
}
|
||||
const sectionList = [];
|
||||
if (this.sectionList && this.sectionList.length) {
|
||||
this.sectionList.forEach(elem => {
|
||||
if (elem.standTrack || elem.reentryTrack || elem.transferTrack) {
|
||||
sectionList.push({ label: this.formatName(elem.code), value: elem.code });
|
||||
}
|
||||
});
|
||||
this.queryForm.queryObject.startSectionCode.config.data = sectionList;
|
||||
this.queryForm.queryObject.endSectionCode.config.data = sectionList;
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
|
@ -158,26 +158,27 @@ export default {
|
||||
'stationList'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
sectionList: function (val, old) {
|
||||
const list = [];
|
||||
if (val && val.length) {
|
||||
val.forEach(elem => {
|
||||
list.push({ label: `${elem.name}(${elem.code})`, value: elem.code });
|
||||
});
|
||||
this.queryForm.queryObject.startSectionCode.config.data = list;
|
||||
this.queryForm.queryObject.endSectionCode.config.data = list;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.acquireMapList();
|
||||
this.initQueryObject();
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.show = true;
|
||||
this.reloadTable();
|
||||
},
|
||||
initQueryObject() {
|
||||
const sectionList = [];
|
||||
if (this.sectionList && this.sectionList.length) {
|
||||
this.sectionList.forEach(elem => {
|
||||
if (elem.standTrack || elem.reentryTrack || elem.transferTrack) {
|
||||
sectionList.push({ label: this.formatName(elem.code), value: elem.code });
|
||||
}
|
||||
});
|
||||
this.queryForm.queryObject.startSectionCode.config.data = sectionList;
|
||||
this.queryForm.queryObject.endSectionCode.config.data = sectionList;
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
|
@ -105,19 +105,9 @@ export default {
|
||||
'signalList'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
signalList: function (val, old) {
|
||||
const list = [];
|
||||
if (val && val.length) {
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
list.push({ label: val[i].name + '(' + val[i].code + ')', value: val[i].code });
|
||||
}
|
||||
this.queryForm.queryObject.signalCode.config.data = list;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.acquireMapList();
|
||||
this.initQueryObject();
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
@ -127,6 +117,16 @@ export default {
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
initQueryObject() {
|
||||
const list = [];
|
||||
const val = this.signalList;
|
||||
if (val && val.length) {
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
list.push({ label: val[i].name + '(' + val[i].code + ')', value: val[i].code });
|
||||
}
|
||||
this.queryForm.queryObject.signalCode.config.data = list;
|
||||
}
|
||||
},
|
||||
formatName(code) {
|
||||
let name = '';
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
|
Loading…
Reference in New Issue
Block a user