Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
e56cc5f146
@ -6,7 +6,7 @@ NODE_ENV = 'development'
|
||||
# VUE_APP_BASE_API = 'https://joylink.club/jlcloud'
|
||||
# VUE_APP_BASE_API = 'http://192.168.3.4:9000'
|
||||
VUE_APP_BASE_API = 'http://192.168.3.6:9000'
|
||||
VUE_APP_VOICE_API = 'https://test.joylink.club/jlcloud/'
|
||||
VUE_APP_VOICE_API = 'https://joylink.club/oss/joylink'
|
||||
# VUE_APP_VOICE_API = 'http://192.168.8.110:9008'
|
||||
|
||||
|
||||
|
@ -4,4 +4,4 @@ VUE_APP_PRO = 'local'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = 'https://joylink.club/jlcloud'
|
||||
VUE_APP_VOICE_API = 'https://joylink.club/jlcloud/'
|
||||
VUE_APP_VOICE_API = 'https://joylink.club/oss/joylink'
|
||||
|
@ -3,4 +3,4 @@ NODE_ENV = 'production'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = 'https://joylink.club/jlcloud'
|
||||
VUE_APP_VOICE_API = 'https://joylink.club/jlcloud/'
|
||||
VUE_APP_VOICE_API = 'https://joylink.club/oss/joylink'
|
||||
|
@ -3,4 +3,4 @@ NODE_ENV = 'test'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = 'https://test.joylink.club/jlcloud'
|
||||
VUE_APP_VOICE_API = 'https://test.joylink.club/jlcloud/'
|
||||
VUE_APP_VOICE_API = 'https://joylink.club/oss/joylink'
|
||||
|
@ -28,11 +28,6 @@ export default {
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
path() {
|
||||
return window.location.pathname;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.simulationInvite': function (val) {
|
||||
if (val.creator) {
|
||||
@ -101,7 +96,8 @@ export default {
|
||||
},
|
||||
subscribe() {
|
||||
const token = getToken();
|
||||
if (token && this.$route.path != '/404' && !this.path.endsWith('login')) {
|
||||
const path = window.location.pathname;
|
||||
if (token && this.$route.path != '/404' && !path.endsWith('login')) {
|
||||
const header = { group: '', 'X-Token': token };
|
||||
this.$store.dispatch('subscribe', {header, type: getSessionStorage('project')});
|
||||
}
|
||||
|
@ -250,4 +250,10 @@ export function getPassengerHistoryList(group) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询地图数据版本list */
|
||||
export function getVersionList(mapId) {
|
||||
return request({
|
||||
url: `/api/map/${mapId}/dataVersions`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -61,6 +61,15 @@ export function getTrainingStepsDetailNew(trainingId, params) {
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
/** 仿真里加载实训 (新版地图) */
|
||||
export function loadTrainingInSimulation(group, id) {
|
||||
return request({
|
||||
url: `/api/v1/training/${group}/${id}/loadTraining`,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询实训列表(新版地图)*/
|
||||
export function pageQueryTrainingNew(params) {
|
||||
return request({
|
||||
|
@ -1,14 +1,5 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 检查房间存在
|
||||
export function checkRoomExistNew(params) {
|
||||
return request({
|
||||
url: `/api/simulationRoom`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
// 设置人员角色
|
||||
export function putUserRolesNew(data, group) {
|
||||
return request({
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
|
||||
class ESolidStand extends Group {
|
||||
constructor(model) {
|
||||
@ -28,6 +29,33 @@ class ESolidStand extends Group {
|
||||
}
|
||||
});
|
||||
this.add(this.stand);
|
||||
|
||||
const path = window.location.href;
|
||||
if (path.includes('/practiceDisplay')) {
|
||||
// 文字描述
|
||||
this.arrowText = new Text({
|
||||
zlevel: this.model.zlevel,
|
||||
z: this.model.z + 10,
|
||||
style: {
|
||||
x: model.position.x + 35,
|
||||
y: model.position.y - 20,
|
||||
text: `${'站台人数: ' + model.num ? model.num : 0}`,
|
||||
textFill: '#000',
|
||||
textAlign: 'left',
|
||||
textFont: 12 + 'px consolas',
|
||||
textPadding: 3,
|
||||
textBackgroundColor: style.tipBackgroundColor
|
||||
}
|
||||
});
|
||||
this.add(this.arrowText);
|
||||
this.arrowText.hide();
|
||||
this.on('mouseover', () => {
|
||||
this.arrowText.show();
|
||||
});
|
||||
this.on('mouseout', () => {
|
||||
this.arrowText.hide();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
@ -66,8 +94,10 @@ class ESolidStand extends Group {
|
||||
} else {
|
||||
this.setColor('#F00');
|
||||
}
|
||||
this.arrowText.setStyle('text', '站台人数: ' + num);
|
||||
} else {
|
||||
this.setColor('#29a909');
|
||||
this.arrowText.setStyle('text', '站台人数: 0');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,15 +46,22 @@ class EMouse extends Group {
|
||||
if (!store.state.map.mapConfig.upRight) {
|
||||
direction = this.device.model.right != 1;
|
||||
}
|
||||
if (LangStorage.getLang() == 'en') {
|
||||
text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${direction ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n Current Station: \n Train-ground communication: normal \n Operation Speed level: 4 \n Detained: ${this.device.model.hold ? 'Detained' : 'Normal'}\n \n 跳停状态: ${this.device.model.jump ? 'Skip to continue moving' : 'Normal'}Stationary: ${!this.device.model.stop ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m\nNumber of people: ${this.device.model.num ? this.device.model.num : 0}`;
|
||||
} else {
|
||||
if (Vue.prototype.$jlmap.lineCode == '11' || Vue.prototype.$jlmap.lineCode == '10') {
|
||||
text = `列车类型: ${trainType}\n来\0\0\0\0源:人工标记\n车\0组\0号: ${this.device.model.groupNumber}\n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n早\0晚\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\nATP报告方向: ${direction ? '上行' : '下行'}\n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车次通信: 通信车\n运行时间: \n停站时间: \n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n车载扣车: 不执行\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'}\n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车状态: ${this.device.model.runLevel || 'CTC'}车\n最高信号系统控制: CTC\n驾驶模式: ${this.device.model.driveMode}模式\n最高ATP模式: AM\nATP1状态: 激活\nATP2状态: 备用\n速度: ${this.device.model.speed || 0} km/h\n车门状态: ${this.device.model.speed ? '关闭' : direction ? '左开右关' : '左关右开'}\n制动状态: 无紧急制动\n停车保证: 可保证停车\n站台无法进入: 否\n前方站台停车点: 中间\n折法策略: \n折返状态: \n屏蔽门开门许可: 是\n运营里程: 无效\n总重量: 196T\n车长: 11860cm\n列车编组: 1`;
|
||||
// \nNumber of people: ${this.device.model.num ? this.device.model.num : 0}
|
||||
const path = window.location.href;
|
||||
if (!path.includes('/practiceDisplay')) {
|
||||
if (LangStorage.getLang() == 'en') {
|
||||
text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${direction ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n Current Station: \n Train-ground communication: normal \n Operation Speed level: 4 \n Detained: ${this.device.model.hold ? 'Detained' : 'Normal'}\n \n 跳停状态: ${this.device.model.jump ? 'Skip to continue moving' : 'Normal'}Stationary: ${!this.device.model.stop ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m`;
|
||||
} else {
|
||||
text = `列车类型: ${trainType} \n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.hold ? '扣车' : '正常'}\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m${this.device.model.num ? '\n车内人数: ' + this.device.model.num : ''}`;
|
||||
if (Vue.prototype.$jlmap.lineCode == '11' || Vue.prototype.$jlmap.lineCode == '10') {
|
||||
text = `列车类型: ${trainType}\n来\0\0\0\0源:人工标记\n车\0组\0号: ${this.device.model.groupNumber}\n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n早\0晚\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\nATP报告方向: ${direction ? '上行' : '下行'}\n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车次通信: 通信车\n运行时间: \n停站时间: \n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n车载扣车: 不执行\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'}\n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车状态: ${this.device.model.runLevel || 'CTC'}车\n最高信号系统控制: CTC\n驾驶模式: ${this.device.model.driveMode}模式\n最高ATP模式: AM\nATP1状态: 激活\nATP2状态: 备用\n速度: ${this.device.model.speed || 0} km/h\n车门状态: ${this.device.model.speed ? '关闭' : direction ? '左开右关' : '左关右开'}\n制动状态: 无紧急制动\n停车保证: 可保证停车\n站台无法进入: 否\n前方站台停车点: 中间\n折法策略: \n折返状态: \n屏蔽门开门许可: 是\n运营里程: 无效\n总重量: 196T\n车长: 11860cm\n列车编组: 1`;
|
||||
} else {
|
||||
text = `列车类型: ${trainType} \n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.hold ? '扣车' : '正常'}\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
text = `${'车内人数: ' + this.device.model.num}`;
|
||||
}
|
||||
|
||||
const trainTip = this.device.style.Train.common.trainTip;
|
||||
if (trainTip) {
|
||||
// 文字描述
|
||||
@ -66,12 +73,19 @@ class EMouse extends Group {
|
||||
y: this.device.model.point.y + 25,
|
||||
text: text,
|
||||
textFill: '#000',
|
||||
textAlign: 'letf',
|
||||
textAlign: 'left',
|
||||
textFont: 10 + 'px consolas',
|
||||
textPadding: 3,
|
||||
textBackgroundColor: this.device.style.tipBackgroundColor
|
||||
}
|
||||
});
|
||||
|
||||
if (path.includes('/practiceDisplay')) {
|
||||
this.arrowText.setStyle('textFont', 12 + 'px consolas');
|
||||
this.arrowText.setStyle('y', this.device.model.point.y + 15);
|
||||
this.arrowText.setStyle('x', this.device.model.point.x + 55);
|
||||
}
|
||||
|
||||
this.add(this.arrowText);
|
||||
this.arrowText.hide();
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ export default {
|
||||
operateType: 'Stand_Whole_Line_Cancel_Hold_Train',
|
||||
skinCode: '02',
|
||||
trainingName: '全线取消扣车({10}-{12}站台)',
|
||||
trainingRemark: '全线取消扣车功能(默认上行全线/下行全线,不做选择)',
|
||||
trainingRemark: '全线取消扣车功能(默认{12}全线,不做选择)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
@ -153,8 +153,8 @@ export default {
|
||||
minDuration: 8,
|
||||
operateType: 'Stand_Whole_Line_Cancel_Hold_Train',
|
||||
skinCode: '02',
|
||||
trainingName: '全线取消扣车({10}-{12}站台)',
|
||||
trainingRemark: '全线取消扣车功能(选择上/下行全线)',
|
||||
trainingName: '全线取消扣车({10}-{12}站台 / 取消{14}全线)',
|
||||
trainingRemark: '全线取消扣车功能(选择{14}全线)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
|
@ -101,7 +101,7 @@ export default {
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【扣车】' },
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【设置扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
@ -139,7 +139,7 @@ export default {
|
||||
operateType: 'Stand_Whole_Line_Cancel_Hold_Train',
|
||||
skinCode: '02',
|
||||
trainingName: '全线取消扣车({10}-{12}站台)',
|
||||
trainingRemark: '全线取消扣车功能(默认上行全线/下行全线,不做选择)',
|
||||
trainingRemark: '全线取消扣车功能(默认{12}全线,不做选择)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
@ -152,8 +152,8 @@ export default {
|
||||
minDuration: 8,
|
||||
operateType: 'Stand_Whole_Line_Cancel_Hold_Train',
|
||||
skinCode: '02',
|
||||
trainingName: '全线取消扣车({10}-{12}站台)',
|
||||
trainingRemark: '全线取消扣车功能(选择上/下行全线)',
|
||||
trainingName: '全线取消扣车({10}-{12}站台 / 取消{14}全线)',
|
||||
trainingRemark: '全线取消扣车功能(选择{14}全线)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
|
@ -952,6 +952,7 @@ const map = {
|
||||
},
|
||||
updateMapDevices: ({ commit, state }, models) => {
|
||||
return new Promise((resolve) => {
|
||||
// debugger;
|
||||
if (!(models instanceof Array)) {
|
||||
models = [models];
|
||||
}
|
||||
@ -969,7 +970,7 @@ const map = {
|
||||
});
|
||||
|
||||
const list = Object.values(dict);
|
||||
handleOperation(state, list);
|
||||
if (window.location.href.includes('/design/usermap/map/draw')) { handleOperation(state, list); }
|
||||
commit('mapRender', list);
|
||||
resolve(list);
|
||||
});
|
||||
|
@ -179,7 +179,7 @@ function handleRecordList(state, data) {
|
||||
value: data.message,
|
||||
self: isSelf,
|
||||
voice: data.isAudio,
|
||||
src: data.isAudio ? `/jlcloud/audio/${data.audioPath}` : '',
|
||||
src: data.isAudio ? `${data.audioPath}` : '',
|
||||
other: !isSelf,
|
||||
userName: data.member.nickName,
|
||||
chatTime: data.chatTime,
|
||||
|
@ -49,7 +49,7 @@ service.interceptors.response.use(
|
||||
router.push({ path: `/authorization` });
|
||||
}
|
||||
// 50008:非法的token; 50012:其他客户端登录了; 50014:Token 过期了;
|
||||
if (res.code == 40004 || res.code == 40005 || res.code == 40003) {
|
||||
if (res.code == 40004 || res.code == 40005) {
|
||||
// eslint-disable-next-line no-undef
|
||||
EventBus.$emit('stop');
|
||||
// eslint-disable-next-line no-undef
|
||||
|
@ -2,8 +2,8 @@
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
v-dialogLoading="pageLoading"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
:title="$t('global.synthesisTrainingTitle')"
|
||||
:visible.sync="dialogShow"
|
||||
width="600px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
@ -17,7 +17,7 @@
|
||||
class="filter-tree"
|
||||
default-expand-all
|
||||
:data="trainingList"
|
||||
:props="defaultProps"
|
||||
:props="{label: 'roomName'}"
|
||||
:filter-node-method="filterNode"
|
||||
:style="{height: height+'px'}"
|
||||
>
|
||||
@ -44,8 +44,6 @@
|
||||
<script>
|
||||
import { getSimulationListCantainUser } from '@/api/jointSimulation';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { creatSubscribe, clearSubscribe, roomTopic} from '@/utils/stomp';
|
||||
|
||||
export default {
|
||||
name: 'DeomonList',
|
||||
@ -54,45 +52,16 @@ export default {
|
||||
dialogShow: false,
|
||||
height: 120,
|
||||
trainingList: [],
|
||||
defaultProps: {
|
||||
label: 'roomName'
|
||||
},
|
||||
group: '',
|
||||
loading: false,
|
||||
pageLoading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow;
|
||||
},
|
||||
title() {
|
||||
return this.$t('global.synthesisTrainingTitle');
|
||||
},
|
||||
isWatch() {
|
||||
return true;
|
||||
},
|
||||
isjoin() {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
},
|
||||
async subscribe(group) {
|
||||
if (!this.$store.state.socket.roomIsSubscribe) {
|
||||
this.clearSubscribe(group);
|
||||
const header = { group: group || '', 'X-Token': getToken() };
|
||||
creatSubscribe(`${roomTopic}\/${group}`, header);
|
||||
await this.$store.dispatch('socket/setRoomSubscribe', true);
|
||||
}
|
||||
},
|
||||
async clearSubscribe(group) {
|
||||
clearSubscribe(`${roomTopic}\/${group}`);
|
||||
await this.$store.dispatch('socket/setRoomSubscribe', false);
|
||||
},
|
||||
async doShow() {
|
||||
try {
|
||||
this.pageLoading = true;
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
:title="$t('global.synthesisTrainingTitle')"
|
||||
:visible.sync="dialogShow"
|
||||
width="600px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
@ -20,8 +20,6 @@
|
||||
<script>
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { creatSubscribe, clearSubscribe, roomTopic} from '@/utils/stomp';
|
||||
// 仿真邀请消息
|
||||
export default {
|
||||
name: 'DeomonList',
|
||||
@ -30,47 +28,23 @@ export default {
|
||||
dialogShow: false,
|
||||
group: '',
|
||||
roomName: '',
|
||||
state: '',
|
||||
mapId: '',
|
||||
lineCode: '',
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow;
|
||||
},
|
||||
title() {
|
||||
return this.$t('global.synthesisTrainingTitle');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(data) {
|
||||
this.roomName = data.creator.nickname;
|
||||
this.group = data.group;
|
||||
this.mapId = data.mapId || data.map.id;
|
||||
this.lineCode = (data.map || {}).lineCode;
|
||||
this.state = data.state;
|
||||
this.dialogShow = true;
|
||||
this.loading = false;
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
async subscribe() {
|
||||
if (!this.$store.state.socket.roomIsSubscribe) {
|
||||
this.clearSubscribe();
|
||||
const header = { group: this.group || '', 'X-Token': getToken() };
|
||||
creatSubscribe(`${roomTopic}\/${this.group}`, header);
|
||||
await this.$store.dispatch('socket/setRoomSubscribe', true);
|
||||
}
|
||||
},
|
||||
async clearSubscribe() {
|
||||
clearSubscribe(`${roomTopic}\/${this.group}`);
|
||||
await this.$store.dispatch('socket/setRoomSubscribe', false);
|
||||
},
|
||||
async handleJoin() {
|
||||
try {
|
||||
this.loading = true;
|
||||
|
@ -11,7 +11,7 @@
|
||||
<p class="list-item">
|
||||
<span class="list-label">{{ $t('global.permissionList') }}</span>
|
||||
</p>
|
||||
<limit-list :ref="`limit`" :course-model="courseModel" @initLoadPage="refresh" />
|
||||
<limit-list ref="limit" :course-model="courseModel" @initLoadPage="refresh" />
|
||||
</div>
|
||||
<div class="btn-buy">
|
||||
<el-button v-if="!isLocal" type="success" :disabled="disabled" @click="buy">{{ $t('global.buy') }}</el-button>
|
||||
@ -31,7 +31,6 @@ import LimitList from '@/views/components/limits/index';
|
||||
import { getSubSystemDetail } from '@/api/trainingPlatform';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import localStore from 'storejs';
|
||||
import { checkRoomExistNew } from '@/api/jointTraining';
|
||||
|
||||
export default {
|
||||
name: 'ExamDetailList',
|
||||
@ -45,9 +44,7 @@ export default {
|
||||
tryUser: 0,
|
||||
loading: true,
|
||||
disabled: false,
|
||||
currentLessonId: '',
|
||||
currentPrdType: '',
|
||||
productList: [],
|
||||
courseModel: {
|
||||
id: '',
|
||||
name: '',
|
||||
@ -57,8 +54,6 @@ export default {
|
||||
prdType: '',
|
||||
pmsList: []
|
||||
},
|
||||
jointShow: false,
|
||||
jointGroup: '',
|
||||
lineCode:'',
|
||||
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts']
|
||||
};
|
||||
@ -109,7 +104,7 @@ export default {
|
||||
try {
|
||||
res = await getPublishMapInfo(this.mapId);
|
||||
} catch (error) {
|
||||
if (error.code == 30001) {
|
||||
if (error.code == 30001 || error.code == 10007) {
|
||||
const url = localStore.get('orignalTrainingPlatformRoute' + this.$store.state.user.id + this.project);
|
||||
localStore.remove();
|
||||
if (url) {
|
||||
@ -168,20 +163,6 @@ export default {
|
||||
refresh() {
|
||||
this.loadInitData();
|
||||
},
|
||||
async getJointTrainingList() {
|
||||
try {
|
||||
if (this.mapId) {
|
||||
const res = await checkRoomExistNew({mapId: this.mapId});
|
||||
this.jointGroup = res.data;
|
||||
this.jointShow = false;
|
||||
if (res.data) {
|
||||
this.jointShow = true;
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error, '获取是否拥有综合演练房间');
|
||||
}
|
||||
},
|
||||
async enterIntegratedSimulation() {
|
||||
const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType };
|
||||
createSimulationNew(data).then(resp => {
|
||||
@ -207,7 +188,7 @@ export default {
|
||||
this.$router.push({ path: `/displayIscs/system`, query: query });
|
||||
}
|
||||
} catch (error) {
|
||||
this.disabled = false;
|
||||
this.disabled = false;
|
||||
}
|
||||
},
|
||||
async enterScreen() {
|
||||
@ -224,54 +205,30 @@ export default {
|
||||
});
|
||||
},
|
||||
async start() {
|
||||
if (this.courseModel.prdType == '05') {
|
||||
this.jumpScheduling();
|
||||
} else if (this.courseModel.prdType == '03') {
|
||||
this.enterIntegratedSimulation();
|
||||
} else if (this.courseModel.prdType == '06') {
|
||||
this.enterISCS();
|
||||
} else if (this.courseModel.prdType == '07') {
|
||||
this.enterScreen();
|
||||
} else {
|
||||
this.jump();
|
||||
}
|
||||
const jumpFunc = ['jump', 'jump', 'enterIntegratedSimulation', 'jump', 'jumpScheduling', 'enterISCS', 'enterScreen'];
|
||||
this[jumpFunc[parseInt(this.courseModel.prdType) - 1]]();
|
||||
},
|
||||
jumpSimulation() {
|
||||
this.disabled = true;
|
||||
const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType };
|
||||
createSimulationNew(data).then(resp => {
|
||||
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser, project: this.project };
|
||||
this.$store.dispatch('training/setPrdType', this.currentPrdType); // 改变prdType
|
||||
if (this.loadingProjectList.includes(this.project)) {
|
||||
this.$store.dispatch('app/transitionAnimations');
|
||||
}
|
||||
this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query });
|
||||
launchFullscreen();
|
||||
}).catch(error=>{
|
||||
this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
|
||||
this.disabled = false;
|
||||
});
|
||||
},
|
||||
jumpScheduling() {
|
||||
this.disabled = true;
|
||||
setTimeout(() => {
|
||||
const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType };
|
||||
try {
|
||||
createSimulationNew(data).then(resp => {
|
||||
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser };
|
||||
if (this.loadingProjectList.includes(this.project)) {
|
||||
this.$store.dispatch('app/transitionAnimations');
|
||||
}
|
||||
this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query });
|
||||
launchFullscreen();
|
||||
});
|
||||
} catch (e) {
|
||||
this.$messageBox(this.$t('error.createSimulationFailed') + e.message);
|
||||
this.disabled = false;
|
||||
}
|
||||
}, 100);
|
||||
this.jumpSimulation();
|
||||
},
|
||||
jump() {
|
||||
this.disabled = true;
|
||||
setTimeout(() => {
|
||||
const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType };
|
||||
createSimulationNew(data).then(resp => {
|
||||
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser, project: this.project };
|
||||
this.$store.dispatch('training/setPrdType', this.currentPrdType); // 改变prdType
|
||||
if (this.loadingProjectList.includes(this.project)) {
|
||||
this.$store.dispatch('app/transitionAnimations');
|
||||
}
|
||||
this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
|
||||
this.disabled = false;
|
||||
});
|
||||
}, 100);
|
||||
this.jumpSimulation();
|
||||
},
|
||||
buy() {
|
||||
// this.disabled = true;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div style="width: 100%; height: 100%;">
|
||||
<div :id="iscsId" v-loading="loading" :style="{ width: widthCanvas +'px', height: canvasHeight +'px' }" class="iscs-canvas" />
|
||||
<div :id="iscsId" :style="{ width: widthCanvas +'px', height: canvasHeight +'px' }" class="iscs-canvas" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -8,7 +8,8 @@
|
||||
import Vue from 'vue';
|
||||
import Iscs from '@/iscs/iscs';
|
||||
import { parser } from '@/iscs/utils/parser';
|
||||
import {getIscsData} from '@/iscs/constant/iscsData';
|
||||
// import { getIscsData } from '@/iscs/constant/iscsData';
|
||||
import { getIscsData } from '@/api/iscs';
|
||||
|
||||
export default {
|
||||
name: 'Iscs',
|
||||
@ -45,7 +46,6 @@ export default {
|
||||
showBackButton: true,
|
||||
initTime: '',
|
||||
started: false,
|
||||
loading: false,
|
||||
stationCode: '',
|
||||
banUpOpenScreenDoor: false,
|
||||
banDownOpenScreenDoor: false
|
||||
@ -78,7 +78,20 @@ export default {
|
||||
this.iscsDestroy();
|
||||
},
|
||||
methods: {
|
||||
show (mode, system, part) {
|
||||
async getDetail(mode, system, part) {
|
||||
const params = {
|
||||
lineCode: this.$route.query.lineCode,
|
||||
totalSystem: mode,
|
||||
system: system,
|
||||
userInterface : part
|
||||
};
|
||||
const resp = await getIscsData(params);
|
||||
if (resp.data) {
|
||||
const data = JSON.parse(resp.data.graphData);
|
||||
return data;
|
||||
}
|
||||
},
|
||||
async show (mode, system, part) {
|
||||
if (!mode || !system || !part) {
|
||||
return;
|
||||
}
|
||||
@ -86,8 +99,8 @@ export default {
|
||||
return false;
|
||||
};
|
||||
this.iscsDestroy();
|
||||
this.loading = true;
|
||||
const data = parser(getIscsData(mode, system, part), {width: this.widthCanvas, height: this.canvasHeight});
|
||||
const dataIscs = await this.getDetail(mode, system, part);
|
||||
const data = parser(dataIscs, {width: this.widthCanvas, height: this.canvasHeight});
|
||||
this.$iscs = new Iscs({
|
||||
dom: document.getElementById(this.iscsId),
|
||||
config: {
|
||||
@ -109,8 +122,8 @@ export default {
|
||||
if (this.$route.params.mode) {
|
||||
this.$iscs.on('selected', this.onSelected, this);
|
||||
}
|
||||
this.setIscs(data, getIscsData(mode, system, part));
|
||||
this.$store.dispatch('iscs/setIscsData', getIscsData(mode, system, part));
|
||||
this.setIscs(data, dataIscs);
|
||||
this.$store.dispatch('iscs/setIscsData', dataIscs);
|
||||
window.document.oncontextmenu = function () {
|
||||
return false;
|
||||
};
|
||||
@ -118,8 +131,9 @@ export default {
|
||||
setIscs(data, oldData) {
|
||||
this.$iscs.setIscs(oldData, data, this.$route.query.lineCode);
|
||||
},
|
||||
iscsLoadData(mode, system, part) {
|
||||
this.$iscs.loadData(parser(getIscsData(mode, system, part), {width: this.widthCanvas, height: this.canvasHeight}));
|
||||
async iscsLoadData(mode, system, part) {
|
||||
const dataIscs = await this.getDetail(mode, system, part);
|
||||
this.$iscs.loadData(parser(dataIscs, {width: this.widthCanvas, height: this.canvasHeight}));
|
||||
},
|
||||
// 点击选择事件
|
||||
onSelected(em) {
|
||||
@ -147,7 +161,7 @@ export default {
|
||||
}
|
||||
},
|
||||
handleViewLoaded() {
|
||||
this.loading = false;
|
||||
|
||||
},
|
||||
statusMessage(val) {
|
||||
this.$iscs && this.$iscs.setDeviceStatus(val);
|
||||
|
@ -26,7 +26,6 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.iscsPlate.iscsLoadData('fas', 'stand', 'standPublicArea');
|
||||
});
|
||||
console.log(this.width);
|
||||
} else if (device && device._type === 'IscsButton' && device.function === 'GoBack') {
|
||||
this.width = 1100;
|
||||
this.$nextTick(() => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :title="this.$t('lesson.courseRelease')" :visible.sync="dialogShow" width="30%" :before-do-close="doClose">
|
||||
<el-dialog v-dialogDrag :title="$t('lesson.courseRelease')" :visible.sync="dialogShow" width="30%" :before-do-close="doClose">
|
||||
<div>
|
||||
<el-form
|
||||
ref="form"
|
||||
@ -9,8 +9,8 @@
|
||||
label-width="140px"
|
||||
@submit.native.prevent
|
||||
>
|
||||
<el-form-item :label="this.$t('lesson.publishCourseName')" prop="name">
|
||||
<el-input v-model="editModel.name" :disabled="!this.hasRelease" />
|
||||
<el-form-item :label="$t('lesson.publishCourseName')" prop="name">
|
||||
<el-input v-model="editModel.name" :disabled="!hasRelease" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isProject" label="课程所属班级:" prop="classIdList">
|
||||
<el-select v-model="editModel.classIdList" multiple placeholder="请选择">
|
||||
|
@ -450,7 +450,7 @@ export default {
|
||||
this.$store.dispatch('SetAccount', model.username);
|
||||
this.handleLoginSucessRoute();
|
||||
}).catch(error => {
|
||||
if (error.code === '30001') {
|
||||
if (error.code == '40003') {
|
||||
this.tipsMsg = this.$t('login.accountOrPasswordIsIncorrect');
|
||||
} else if (error.code == '10001') {
|
||||
this.tipsMsg = '教员机尚未登录,请稍后重试!';
|
||||
@ -494,6 +494,7 @@ export default {
|
||||
} else if (this.$route.query.type === 'ISCS_LW' || this.$route.query.type === 'ISCS_CW') {
|
||||
this.$router.push({ path: `/displayIscs/system`, query: {
|
||||
group: res.data.group,
|
||||
lineCode: resp.data.map.lineCode,
|
||||
projectDevice: this.$route.query.projectDevice,
|
||||
type: this.$route.query.type} });
|
||||
} else if (this.$route.query.type == 'CCTV') {
|
||||
|
@ -941,7 +941,7 @@ export default {
|
||||
resp.data.forEach(conversation => {
|
||||
(conversation.messageList || []).forEach(message => {
|
||||
const member = this.memberData[message.memberId];
|
||||
message.src = `/audio/${message.audioPath}`;
|
||||
message.src = `${message.audioPath}`;
|
||||
message.members = conversation.memberList;
|
||||
if (member) {
|
||||
message.self = this.$store.state.userId == member.userId;
|
||||
@ -950,7 +950,7 @@ export default {
|
||||
});
|
||||
const tempMessageList = [];
|
||||
!conversation.over && conversation.messageList.forEach(message => {
|
||||
message.src = `/audio/${message.audioPath}`;
|
||||
message.src = `${message.audioPath}`;
|
||||
tempMessageList.push(message);
|
||||
});
|
||||
!conversation.over && conversation.memberList.forEach(member => {
|
||||
|
@ -87,11 +87,11 @@ export default {
|
||||
'$store.state.socket.conversationInfo':function (val, old) { // 仿真聊天
|
||||
const conversationInfo = this.$store.state.socket.conversationInfo;
|
||||
const member = this.$store.state.training.memberData[val.message.memberId];
|
||||
conversationInfo.message.src = `/audio/${conversationInfo.message.audioPath}`;
|
||||
conversationInfo.message.src = `${conversationInfo.message.audioPath}`;
|
||||
this.$emit('changeMessageList', conversationInfo);
|
||||
if (this.conversitionId == val.id) {
|
||||
if (member && member.userId != this.$store.state.user.id) {
|
||||
this.currentAudioList.push({audioUrl:this.baseUrl + '/audio/' + conversationInfo.message.audioPath, id:val.message.id});
|
||||
this.currentAudioList.push({audioUrl:this.baseUrl + conversationInfo.message.audioPath, id:val.message.id});
|
||||
if (!this.isPlay) {
|
||||
this.isPlay = true;
|
||||
this.$store.dispatch('scriptRecord/updateAudioPlay', true);
|
||||
@ -101,7 +101,7 @@ export default {
|
||||
this.scrollTop();
|
||||
} else if (this.userRole === 'AUDIENCE' || this.commonConversation) {
|
||||
if (member && member.userId != this.$store.state.user.id) {
|
||||
this.currentAudioList.push({audioUrl:this.baseUrl + '/audio/' + conversationInfo.message.audioPath, id:val.message.id});
|
||||
this.currentAudioList.push({audioUrl:this.baseUrl + conversationInfo.message.audioPath, id:val.message.id});
|
||||
if (!this.isPlay) {
|
||||
this.isPlay = true;
|
||||
this.$store.dispatch('scriptRecord/updateAudioPlay', true);
|
||||
|
@ -163,6 +163,7 @@ export default {
|
||||
beforeDestroy() {
|
||||
this.destroy();
|
||||
this.clearSubscribe();
|
||||
this.$store.dispatch('runPlan/setPlanData', []);
|
||||
},
|
||||
methods: {
|
||||
async subscribe() {
|
||||
@ -280,7 +281,6 @@ export default {
|
||||
this.runSeries = this.PlanConvert.updateDataToModels(data, stations, this.kmRangeCoordMap,
|
||||
this.runPlanData, this.runSeries, { color: '#FF00DE', width: 2 }
|
||||
);
|
||||
// console.log(this.runSeries);
|
||||
const series = [...this.staticSeries, ...this.runSeries, ...this.selectSeries];
|
||||
this.myChart && this.myChart.setOption({series: series});
|
||||
},
|
||||
@ -486,7 +486,6 @@ export default {
|
||||
} else {
|
||||
option.series = [...this.staticSeries, ...this.runSeries, ...this.selectSeries];
|
||||
}
|
||||
// console.log('获取历史数据');
|
||||
this.myChart = echarts.init(document.getElementById(this.runPlanId));
|
||||
if (this.myChart) {
|
||||
this.myChart.setOption(option);
|
||||
|
@ -53,6 +53,10 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$store.dispatch('runPlan/setPlanData', []);
|
||||
this.$store.dispatch('runPlan/setInitialPlanData', []);
|
||||
},
|
||||
mounted() {
|
||||
// this.menus = this.$theme.loadPlanComponent(this.$route.query.lineCode);
|
||||
},
|
||||
|
@ -118,7 +118,9 @@ export default {
|
||||
}
|
||||
},
|
||||
$route() {
|
||||
this.initLoadData();
|
||||
if (!this.isLesson) {
|
||||
this.initLoadData();
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
<script>
|
||||
import { getPublishLessonTree } from '@/api/jmap/lesson';
|
||||
import { trainingNotifyNew } from '@/api/simulation';
|
||||
// import { trainingNotifyNew } from '@/api/simulation';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
@ -92,16 +92,16 @@ export default {
|
||||
if (obj && obj.type === 'Training') {
|
||||
if (obj.valid) {
|
||||
this.disabled = true;
|
||||
trainingNotifyNew({ trainingId: obj.id }).then(resp => {
|
||||
const query = {
|
||||
group: resp.data, trainingId: obj.id, lessonId: this.$route.query.lessonId, mapId: this.$route.query.mapId, lineCode:this.$route.query.lineCode, noPreLogout: this.$route.query.noPreLogout
|
||||
};
|
||||
this.$router.replace({ path: `${UrlConfig.displayNew}/teach`, query: query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('tip.createSimulationFaild')} : ${error.message}`);
|
||||
this.disabled = false;
|
||||
});
|
||||
// trainingNotifyNew({ trainingId: obj.id }).then(resp => {
|
||||
const query = {
|
||||
group: this.$route.query.group, trainingId: obj.id, lessonId: this.$route.query.lessonId, mapId: this.$route.query.mapId, lineCode:this.$route.query.lineCode, noPreLogout: this.$route.query.noPreLogout
|
||||
};
|
||||
this.$router.replace({ path: `${UrlConfig.displayNew}/teach`, query: query });
|
||||
launchFullscreen();
|
||||
// }).catch(error => {
|
||||
// this.$messageBox(`${this.$t('tip.createSimulationFaild')} : ${error.message}`);
|
||||
// this.disabled = false;
|
||||
// });
|
||||
} else {
|
||||
this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
|
@ -24,7 +24,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getTrainingDetailNew } from '@/api/jmap/training';
|
||||
// import { getTrainingDetailNew } from '@/api/jmap/training';
|
||||
import TipTrainingDetail from './tipTrainingDetail';
|
||||
import LeftSlider from './LeftSlider';
|
||||
import { mapGetters } from 'vuex';
|
||||
@ -33,7 +33,8 @@ import { startTrainingNew, endTrainingNew } from '@/api/jmap/training';
|
||||
import { trainingNotifyNew } from '@/api/simulation';
|
||||
import { TrainingMode, UrlConfig } from '@/scripts/ConstDic';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { getTrainingStepsDetailNew } from '@/api/jmap/training';
|
||||
import { getTrainingStepsDetailNew, loadTrainingInSimulation } from '@/api/jmap/training';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'MenuLesson',
|
||||
@ -110,28 +111,22 @@ export default {
|
||||
this.isDisable = false;
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount': function (val) {
|
||||
if (this.$route.query.trainingId) {
|
||||
// 获取实训步骤数据(新版地图)
|
||||
getTrainingStepsDetailNew(this.$route.query.trainingId, { group: this.group }).then(resp => {
|
||||
this.trainingObj = resp.data;
|
||||
this.$store.dispatch('training/setTrainingData', this.trainingObj); // 设置实训教学信息
|
||||
}).catch(error => {
|
||||
this.$messageBox(`初始化失败实训内容失败: ${error.message}`);
|
||||
});
|
||||
}
|
||||
this.$store.dispatch('training/end', null);
|
||||
this.$store.dispatch('training/reset');
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
this.isDisable = false;
|
||||
this.getTrainingData();
|
||||
},
|
||||
'$store.state.training.operateErrMsg': function (val) {
|
||||
this.tipInfo({ color: val.color, message: val.errMsg });
|
||||
},
|
||||
async $route() {
|
||||
loadTrainingInSimulation(this.group, this.$route.query.trainingId).then(resp => {
|
||||
this.setTrainingData(resp);
|
||||
this.endViewLoading(true);
|
||||
}).catch(error => {
|
||||
this.endViewLoading(true);
|
||||
this.$messageBox(`初始化实训内容失败: ${error.message}`);
|
||||
});
|
||||
this.resetTraining();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initData();
|
||||
},
|
||||
methods: {
|
||||
tipInfo(opt) {
|
||||
if (opt && opt.hasOwnProperty('color') && opt.hasOwnProperty('message')) {
|
||||
@ -143,6 +138,34 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
setTrainingData(resp) {
|
||||
this.trainingObj = resp.data;
|
||||
this.$store.dispatch('exam/setCenter', resp.data.locateDeviceCode);
|
||||
this.$store.dispatch('training/setTrainingData', this.trainingObj); // 设置实训教学信息
|
||||
const detail = resp.data;
|
||||
this.$store.dispatch('training/setPrdType', this.prdTypeMap[detail.prdType]);
|
||||
},
|
||||
resetTraining() {
|
||||
this.$store.dispatch('training/end', null);
|
||||
this.$store.dispatch('training/reset');
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
this.$store.dispatch('training/setStopCountTime');
|
||||
this.$store.dispatch('training/setScore', 0);
|
||||
this.$store.dispatch('training/setTrainingStart', false);
|
||||
this.isDisable = false;
|
||||
},
|
||||
getTrainingData() {
|
||||
if (this.$route.query.trainingId) {
|
||||
// 获取实训步骤数据(新版地图)
|
||||
getTrainingStepsDetailNew(this.$route.query.trainingId, { group: this.group }).then(resp => {
|
||||
this.setTrainingData(resp);
|
||||
}).catch(error => {
|
||||
this.$messageBox(`初始化实训内容失败: ${error.message}`);
|
||||
});
|
||||
}
|
||||
this.resetTraining();
|
||||
},
|
||||
overallTranslation(flag) {
|
||||
const panel = document.getElementById('leftSlider');
|
||||
if (flag) {
|
||||
@ -253,30 +276,14 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
// 课程和考试系统
|
||||
async initData() {
|
||||
// this.$store.dispatch('training/end', null);
|
||||
if (parseInt(this.$route.query.trainingId)) {
|
||||
// 设置地图数据
|
||||
// 设置实训数据
|
||||
const resp = await getTrainingDetailNew(this.$route.query.trainingId);
|
||||
this.$store.dispatch('exam/setCenter', resp.data.locateDeviceCode);
|
||||
if (resp && resp.code == 200) {
|
||||
const detail = resp.data;
|
||||
await this.$store.dispatch('training/setPrdType', this.prdTypeMap[detail.prdType]);
|
||||
} else {
|
||||
this.$messageBox(`获取实训步骤数据失败`);
|
||||
this.endViewLoading();
|
||||
}
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
},
|
||||
// 结束加载状态
|
||||
endViewLoading(isSuccess) {
|
||||
if (!isSuccess) {
|
||||
this.$store.dispatch('map/mapClear');
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
EventBus.$emit('viewLoading', false);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -385,43 +385,42 @@ export default {
|
||||
},
|
||||
// 点击选择事件
|
||||
onSelected(em) {
|
||||
console.log(em);
|
||||
|
||||
console.log(em);
|
||||
|
||||
const path = window.location.href;
|
||||
if (path.includes("/practiceDisplay")){
|
||||
if(em.deviceType == "StationStand"){
|
||||
if (path.includes('/practiceDisplay')) {
|
||||
if (em.deviceType == 'StationStand') {
|
||||
// console.log(em.deviceType );
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/trafficplan',
|
||||
query:{
|
||||
mapid:this.$route.query.mapId,
|
||||
group:this.$route.query.group,
|
||||
project: this.$route.query.project,
|
||||
noPreLogout: true,
|
||||
lineCode:this.$route.query.lineCode,
|
||||
deviceCode:em.deviceCode,
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
}
|
||||
if(em.deviceType == "Train"){
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/trafficplan',
|
||||
query:{
|
||||
mapid:this.$route.query.mapId,
|
||||
group:this.$route.query.group,
|
||||
project: this.$route.query.project,
|
||||
noPreLogout: true,
|
||||
lineCode:this.$route.query.lineCode,
|
||||
deviceCode:em.deviceCode
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
}
|
||||
if (em.deviceType == 'Train') {
|
||||
// console.log(em.deviceType );
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/traffictrain',
|
||||
query:{
|
||||
mapid:this.$route.query.mapId,
|
||||
group:this.$route.query.group,
|
||||
project: this.$route.query.project,
|
||||
noPreLogout: true,
|
||||
lineCode:this.$route.query.lineCode,
|
||||
deviceCode:em.deviceCode,
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
}
|
||||
}else{
|
||||
this.$emit('onSelect', em);
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/traffictrain',
|
||||
query:{
|
||||
mapid:this.$route.query.mapId,
|
||||
group:this.$route.query.group,
|
||||
project: this.$route.query.project,
|
||||
noPreLogout: true,
|
||||
lineCode:this.$route.query.lineCode,
|
||||
deviceCode:em.deviceCode
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
}
|
||||
} else {
|
||||
this.$emit('onSelect', em);
|
||||
}
|
||||
|
||||
},
|
||||
|
@ -11,6 +11,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getVersionList } from '@/api/jmap/map';
|
||||
export default {
|
||||
name: 'PublishMapDraft',
|
||||
props: {
|
||||
@ -20,11 +21,13 @@ export default {
|
||||
dialogVisible: false,
|
||||
cityList: [],
|
||||
lineCodeList: [],
|
||||
versionList: [],
|
||||
formModel: {
|
||||
mapId: '',
|
||||
cityCode: '',
|
||||
name: '',
|
||||
lineCode: ''
|
||||
lineCode: '',
|
||||
version: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -35,7 +38,8 @@ export default {
|
||||
items: [
|
||||
{ prop: 'name', label: this.$t('publish.mapName'), type: 'text', required: true },
|
||||
{ prop: 'cityCode', label: this.$t('publish.city'), type: 'select', required: true, options: this.cityList },
|
||||
{ prop: 'lineCode', label: '线路类型', type: 'select', required: true, options: this.lineCodeList }
|
||||
{ prop: 'lineCode', label: '线路类型', type: 'select', required: true, options: this.lineCodeList },
|
||||
{ prop: 'version', label: '数据版本', type: 'select', required: true, options: this.versionList}
|
||||
]
|
||||
};
|
||||
return form;
|
||||
@ -51,6 +55,9 @@ export default {
|
||||
],
|
||||
lineCode: [
|
||||
{ required: true, message: '请选择线路类型', trigger: 'change' }
|
||||
],
|
||||
version: [
|
||||
{ required: true, message: '请选择数据版本', trigger: 'change'}
|
||||
]
|
||||
};
|
||||
return crules;
|
||||
@ -64,7 +71,16 @@ export default {
|
||||
this.cityList = cityList;
|
||||
this.lineCodeList = lineCodeList;
|
||||
this.formModel.cityCode = row.cityCode;
|
||||
this.formModel.version = row.version + '';
|
||||
this.dialogVisible = true;
|
||||
this.versionList = [];
|
||||
getVersionList(row.id).then(resp => {
|
||||
(resp.data || []).forEach(item => {
|
||||
this.versionList.push({label: item, value: item});
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$message.error('获取数据版本列表失败!');
|
||||
});
|
||||
},
|
||||
doCreate() {
|
||||
const self = this;
|
||||
@ -74,9 +90,9 @@ export default {
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.$refs.dataform.resetForm();
|
||||
this.isShow = false;
|
||||
this.dialogVisible = false;
|
||||
this.$refs.dataform.clearValidate();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -361,6 +361,7 @@ export default {
|
||||
getPublishMapImportNew(row.id, JSON.parse(data)).then(res => {
|
||||
that.$message.success('导入成功!');
|
||||
that.$set(row, 'loading' + idx, false);
|
||||
that.reloadTable();
|
||||
}).catch(error => {
|
||||
that.$message.error('导入失败' + error.message);
|
||||
that.$set(row, 'loading' + idx, false);
|
||||
|
@ -4,14 +4,14 @@
|
||||
<span>{{ $t('global.mapList') }}</span>
|
||||
</div>
|
||||
<div class="left-map-list">
|
||||
<filter-city v-if="!getMapByCode" ref="filerCity" filter-empty :local-param-name="localParamName" @filterSelectChange="refresh" />
|
||||
<filter-city v-if="!getMapByCode" ref="filerCity" filter-empty local-param-name="training_cityCode" @filterSelectChange="refresh" />
|
||||
<el-input v-if="!getMapByCode" v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||
<div style="height: calc(100% - 76px); overflow: auto;">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
:data="treeList"
|
||||
node-key="key"
|
||||
:props="defaultProps"
|
||||
:props="{children: 'children',label: 'name'}"
|
||||
highlight-current
|
||||
:span="22"
|
||||
:filter-node-method="filterNode"
|
||||
@ -52,20 +52,14 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
defaultShowKeys: [],
|
||||
filterText: '',
|
||||
treeList: [],
|
||||
selected: {},
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
},
|
||||
node: {
|
||||
},
|
||||
mapId: '',
|
||||
expandList: [],
|
||||
filterSelect: '',
|
||||
localParamName: 'training_cityCode'
|
||||
filterSelect: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
@ -5,7 +5,7 @@
|
||||
</div>
|
||||
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
|
||||
<transition>
|
||||
<router-view :product-list="productList" />
|
||||
<router-view />
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
@ -25,19 +25,12 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
widthLeft: 450,
|
||||
productList: []
|
||||
widthLeft: 450
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
width() {
|
||||
return this.$store.state.app.width;
|
||||
},
|
||||
userId() {
|
||||
return this.$store.state.user.id;
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -51,9 +44,11 @@ export default {
|
||||
const againEnter = getSessionStorage('againEnter') || null;
|
||||
if (!againEnter) {
|
||||
launchFullscreen();
|
||||
const path = localStore.get('trainingPlatformRoute' + this.userId + this.project);
|
||||
const project = getSessionStorage('project');
|
||||
const userId = this.$store.state.user.id;
|
||||
const path = localStore.get('trainingPlatformRoute' + userId + project);
|
||||
if (path && path.startsWith('/trainingPlatform')) {
|
||||
localStore.set('orignalTrainingPlatformRoute' + this.userId + this.project, `/trainingPlatform/permission/${data[0].id}`);
|
||||
localStore.set('orignalTrainingPlatformRoute' + userId + project, `/trainingPlatform/permission/${data[0].id}`);
|
||||
this.$router.push(path);
|
||||
} else if (data && data[0]) {
|
||||
this.$router.push(`/trainingPlatform/permission/${data[0].id}`);
|
||||
|
Loading…
Reference in New Issue
Block a user