Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
41cc1af21a
@ -23,6 +23,13 @@ export function getProjectDeviceList(params) {
|
||||
params:params
|
||||
});
|
||||
}
|
||||
// export function getProjectDeviceList(params) {
|
||||
// return request({
|
||||
// url: `/api/device/paging`,
|
||||
// method: 'get',
|
||||
// params:params
|
||||
// });
|
||||
// }
|
||||
/** 删除项目设备 */
|
||||
export function deleteProjectDevice(id) {
|
||||
return request({
|
||||
@ -64,7 +71,7 @@ export function setSwitchConfig(id, data) {
|
||||
/** 查询项目下的所有设备 */
|
||||
export function getAllDeviceInProject(params) {
|
||||
return request({
|
||||
url: `/api/device/project`,
|
||||
url: `/api/project/device/project`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
|
@ -50,7 +50,7 @@ class EMouse extends Group {
|
||||
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 {
|
||||
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列车状态: CTC车\n最高信号系统控制: CTC\n驾驶模式: SM模式\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`;
|
||||
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列车状态: 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`;
|
||||
}
|
||||
|
@ -84,6 +84,7 @@ export default class Train extends Group {
|
||||
jump:model.jump,
|
||||
stop:model.stop,
|
||||
dt: model.dt,
|
||||
driveMode: model.driveMode,
|
||||
model: model
|
||||
});
|
||||
const rect = this.trainB.getBoundingRectOfFont().clone();
|
||||
|
@ -146,6 +146,7 @@ export default {
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.row = null;
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.restoreBeforeDevices();
|
||||
@ -156,7 +157,9 @@ export default {
|
||||
// 恢复之前选中设备
|
||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||
this.beforeSectionList.forEach(elem => {
|
||||
elem.cutOff = false;
|
||||
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem.code)); // 最新状态数据 覆盖
|
||||
section.cutOff = false;
|
||||
elem = Object.assign(elem, section);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@ export default {
|
||||
systemTitle: '',
|
||||
isHyd: false,
|
||||
isJyd: false,
|
||||
isTky: false,
|
||||
marginLeft: 'margin-left:60px;'
|
||||
};
|
||||
},
|
||||
@ -32,7 +33,7 @@ export default {
|
||||
this.isJyd = true;
|
||||
this.marginLeft = 'margin-left:140px;';
|
||||
} else if (project.endsWith('tky')) {
|
||||
this.isTky = true;
|
||||
this.isTky = true;
|
||||
this.marginLeft = 'margin-left:140px;';
|
||||
}
|
||||
},
|
||||
|
@ -86,7 +86,8 @@ function handleRoute(to, from, next, routeInfo) {
|
||||
// 除没有动态改变权限的需求可直接next() 删下方权限判断
|
||||
if (hasPermission(store.getters.roles, to.meta.roles)) {
|
||||
if (to.path === '/404' && to.redirectedFrom === '/') {
|
||||
next(localStore.get('trainingPlatformRoute' + store.getters.id) || '/trainingPlatform');
|
||||
const project = getSessionStorage('project');
|
||||
next(localStore.get('trainingPlatformRoute' + store.getters.id + project) || '/trainingPlatform');
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
|
@ -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'; // 张赛
|
||||
|
@ -30,7 +30,6 @@ import { PermissionType, UrlConfig } from '@/scripts/ConstDic';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { postCreateRoom, getjointTraining } from '@/api/chat';
|
||||
import { postCreateRoomNew, getjointTrainingNew, checkRoomExistNew } from '@/api/jointTraining';
|
||||
import { } from '@/scripts/ConstDic';
|
||||
import { simulationNotify, schedulingNotify, createSimulationNew } from '@/api/simulation';
|
||||
import LimitList from '@/views/components/limits/index';
|
||||
import { getSubSystemDetail } from '@/api/trainingPlatform';
|
||||
@ -98,6 +97,9 @@ export default {
|
||||
},
|
||||
mapId() {
|
||||
return this.$route.query.mapId;
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -117,7 +119,7 @@ export default {
|
||||
res = await getPublishMapInfo(this.mapId);
|
||||
} catch (error) {
|
||||
if (error.code == 30001) {
|
||||
const url = localStore.get('orignalTrainingPlatformRoute' + this.$store.state.user.id);
|
||||
const url = localStore.get('orignalTrainingPlatformRoute' + this.$store.state.user.id + this.project);
|
||||
localStore.remove();
|
||||
if (url) {
|
||||
this.$router.push(url);
|
||||
@ -313,7 +315,7 @@ export default {
|
||||
if (!this.drawWay) {
|
||||
const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType };
|
||||
simulationNotify(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: getSessionStorage('project') };
|
||||
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.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
@ -323,7 +325,7 @@ export default {
|
||||
} else {
|
||||
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: getSessionStorage('project') };
|
||||
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.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
|
@ -70,7 +70,7 @@ export default {
|
||||
}
|
||||
}).catch((error)=>{
|
||||
if (error.code == 30001) {
|
||||
const url = localStore.get('orignalTrainingPlatformRoute' + this.$store.state.user.id);
|
||||
const url = localStore.get('orignalTrainingPlatformRoute' + this.$store.state.user.id + this.project);
|
||||
if (url) {
|
||||
this.$router.push(url);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-wrapper">
|
||||
<div class="examList" :style="{width: widthLeft+'px'}">
|
||||
<demon-list ref="demonList" @goRoutePath="goRoutePath" />
|
||||
<demon-list ref="demonList" />
|
||||
</div>
|
||||
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
|
||||
<transition>
|
||||
@ -13,9 +13,7 @@
|
||||
<script>
|
||||
import demonList from './demonList';
|
||||
import drapLeft from '@/views/components/drapLeft/index';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import localStore from 'storejs';
|
||||
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||
|
||||
export default {
|
||||
name: 'TrainingPlatform',
|
||||
@ -43,20 +41,6 @@ export default {
|
||||
methods: {
|
||||
drapWidth(width) {
|
||||
this.widthLeft = Number(width);
|
||||
},
|
||||
goRoutePath(data) {
|
||||
const againEnter = getSessionStorage('againEnter') || null;
|
||||
if (!againEnter) {
|
||||
launchFullscreen();
|
||||
const path = localStore.get('trainingPlatformRoute' + this.userId);
|
||||
if (path && path.startsWith('/trainingPlatform')) {
|
||||
localStore.set('orignalTrainingPlatformRoute' + this.userId, `/trainingPlatform/permission/${data[0].id}`);
|
||||
this.$router.push(path);
|
||||
} else if (data && data[0]) {
|
||||
this.$router.push(`/trainingPlatform/permission/${data[0].id}`);
|
||||
}
|
||||
setSessionStorage('againEnter', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -238,11 +238,7 @@ export default {
|
||||
};
|
||||
},
|
||||
PhysicalSectionList() {
|
||||
let list = [];
|
||||
if (this.sectionList && this.sectionList.length) {
|
||||
list = this.sectionList.filter(elem => { return elem.type === '01' && !elem.switchSection; });
|
||||
}
|
||||
return list;
|
||||
return this.sectionList.filter(elem => { return elem.type === '01' && !elem.switchSection; });
|
||||
},
|
||||
|
||||
isPointsShow() {
|
||||
@ -269,7 +265,6 @@ export default {
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
console.log(this.editModel.nameFont, selected, '=========');
|
||||
// 被控制的车站数据
|
||||
const beCentralizedStation = {};
|
||||
this.relStationList = JSON.parse(JSON.stringify(this.stationList));
|
||||
@ -377,22 +372,18 @@ export default {
|
||||
createControlMode: item.control
|
||||
};
|
||||
const model = Object.assign(stationModel, data);
|
||||
this.sectionList.forEach(elem => {
|
||||
if (elem.code === item.sectionCode) {
|
||||
const l = 0;
|
||||
const r = elem.points.length - 1;
|
||||
model.position = {
|
||||
x: elem.points[l].x + (elem.points[r].x - elem.points[l].x) / 2,
|
||||
y: elem.points[l].y - this.addModel.positionY
|
||||
};
|
||||
if (item.control) {
|
||||
model.controlModePoint = {
|
||||
x: elem.points[l].x + (elem.points[r].x - elem.points[l].x) / 2,
|
||||
y: elem.points[l].y - this.addModel.positionY + 30
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
const sectionModel = this.$store.getters['map/getDeviceByCode'](item.sectionCode);
|
||||
const last = sectionModel.points.length - 1;
|
||||
model.position = {
|
||||
x: sectionModel.points[0].x + (sectionModel.points[last].x - sectionModel.points[0].x) / 2,
|
||||
y: sectionModel.points[0].y - this.addModel.positionY
|
||||
};
|
||||
if (item.control) {
|
||||
model.controlModePoint = {
|
||||
x: sectionModel.points[0].x + (sectionModel.points[last].x - sectionModel.points[0].x) / 2,
|
||||
y: sectionModel.points[0].y - this.addModel.positionY + 30
|
||||
};
|
||||
}
|
||||
models.push(model);
|
||||
});
|
||||
this.$emit('updateMapModel', models);
|
||||
@ -417,7 +408,7 @@ export default {
|
||||
// 删除对象
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
|
||||
if (selected && selected._type == 'Station') {
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
|
@ -70,7 +70,7 @@ export default {
|
||||
}
|
||||
}).catch((error)=>{
|
||||
if (error.code == 30001) {
|
||||
const url = localStore.get('orignalTrainingPlatformRoute' + this.$store.state.user.id);
|
||||
const url = localStore.get('orignalTrainingPlatformRoute' + this.$store.state.user.id + this.project);
|
||||
if (url) {
|
||||
this.$router.push(url);
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ export default {
|
||||
}
|
||||
},
|
||||
clickEvent(obj, data, ele) {
|
||||
localStore.set('trainingPlatformCheckId' + this.filterSelect + this.userId, obj.id);
|
||||
localStore.set('trainingPlatformCheckId' + this.filterSelect + this.userId + this.project, obj.key);
|
||||
while (data) {
|
||||
if (data.data.type === 'Map') {
|
||||
this.mapId = data.data.id;
|
||||
@ -150,11 +150,11 @@ export default {
|
||||
}
|
||||
},
|
||||
setLocalRoute(path) {
|
||||
localStore.set('trainingPlatformRoute' + this.userId, path);
|
||||
localStore.set('trainingPlatformRoute' + this.userId + this.project, path);
|
||||
},
|
||||
forTree(item) {
|
||||
item.children && item.children.forEach(childrenItem => {
|
||||
childrenItem.key = item.id + childrenItem.id + childrenItem.type;
|
||||
childrenItem.key = childrenItem.id + childrenItem.type;
|
||||
if (childrenItem.children && childrenItem.children.length) {
|
||||
this.forTree(childrenItem);
|
||||
}
|
||||
@ -179,7 +179,7 @@ export default {
|
||||
this.treeList = res.data;
|
||||
this.getExpandList(filterSelect);
|
||||
this.$nextTick(() => {
|
||||
const checkId = localStore.get('trainingPlatformCheckId' + filterSelect + this.userId) || null;
|
||||
const checkId = localStore.get('trainingPlatformCheckId' + filterSelect + this.userId + this.project) || null;
|
||||
this.$refs.tree && this.$refs.tree.setCurrentKey(checkId);
|
||||
this.loading = false;
|
||||
});
|
||||
@ -192,15 +192,15 @@ export default {
|
||||
const key = obj.id + obj.type;
|
||||
this.expandList = this.expandList.filter(item => item !== key);
|
||||
this.expandList.push(key);
|
||||
localStore.set('trainIngPlatformExpandList' + this.filterSelect + this.userId, this.expandList);
|
||||
localStore.set('trainIngPlatformExpandList' + this.filterSelect + this.userId + this.project, this.expandList);
|
||||
},
|
||||
nodeCollapse(obj, node, ele) {
|
||||
const key = obj.id + obj.type;
|
||||
this.expandList = this.expandList.filter(item => item !== key);
|
||||
localStore.set('trainIngPlatformExpandList' + this.filterSelect + this.userId, this.expandList);
|
||||
localStore.set('trainIngPlatformExpandList' + this.filterSelect + this.userId + this.project, this.expandList);
|
||||
},
|
||||
getExpandList(filterSelect) {
|
||||
let expand = localStore.get('trainIngPlatformExpandList' + filterSelect + this.userId);
|
||||
let expand = localStore.get('trainIngPlatformExpandList' + filterSelect + this.userId + this.project);
|
||||
expand = expand ? (expand + '').split(',') : '';
|
||||
if (expand instanceof Array) {
|
||||
this.expandList = expand;
|
||||
|
@ -35,6 +35,9 @@ export default {
|
||||
},
|
||||
userId() {
|
||||
return this.$store.state.user.id;
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -48,9 +51,9 @@ export default {
|
||||
const againEnter = getSessionStorage('againEnter') || null;
|
||||
if (!againEnter) {
|
||||
launchFullscreen();
|
||||
const path = localStore.get('trainingPlatformRoute' + this.userId);
|
||||
const path = localStore.get('trainingPlatformRoute' + this.userId + this.project);
|
||||
if (path && path.startsWith('/trainingPlatform')) {
|
||||
localStore.set('orignalTrainingPlatformRoute' + this.userId, `/trainingPlatform/permission/${data[0].id}`);
|
||||
localStore.set('orignalTrainingPlatformRoute' + this.userId + this.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