Merge remote-tracking branch 'origin/test'

This commit is contained in:
fan 2020-11-24 09:16:51 +08:00
commit 8988e979e1
380 changed files with 1521 additions and 10071 deletions

View File

@ -91,7 +91,8 @@ export default {
},
subscribeMessage(res) {
if (this.$refs.deomonTopic && !window.location.href.includes('trainroom')) {
if (getSessionStorage('project') != 'refereeJsxt' && getSessionStorage('project') != 'jsxt' && !(getSessionStorage('project').includes('design'))) {
// getSessionStorage('project') != 'refereeJsxt' && getSessionStorage('project') != 'jsxt' &&
if (!(getSessionStorage('project').includes('design'))) {
this.$refs.deomonTopic.doShow(res);
}
this.$store.dispatch('socket/setSimulationInvite');

View File

@ -1,118 +1,5 @@
import request from '@/utils/request';
/** 裁判退出仿真*/
export function refereeExitSimulation(group) {
return request({
url: `/api/v1/competition/room/${group}/refree`,
method: 'delete'
});
}
/** 参赛者创建演练房间 */
export function participantCreatTrainingRoom(id, data) {
return request({
url: `/api/v1/competition/${id}/room`,
method: 'post',
data: data
});
}
/** 查询用户是否已经报名该竞赛 */
export function getIsSignUp(raceId, params = {}) {
return request({
url: `/api/race/${raceId}/isSignUp`,
method: 'get',
params
});
}
/** 提交试卷 */
export function postCompetitionTheory(data) {
return request({
url: `/api/v1/competitionTheory/submit`,
method: 'post',
data
});
}
/** 查询竞赛报名人员详情 */
export function getRaceUserById(raceId) {
return request({
url: `/api/race/${raceId}/raceUser`,
method: 'get'
});
}
/** 查询加载的实操题 */
export function getPracticalQuestion(competitionId) {
return request({
url: `/api/v1/competitionPractical/competition/${competitionId}`,
method: 'get'
});
}
/** 查询加载的理论题 */
export function getTheoryQuestion(competitionId) {
return request({
url: `/api/v1/competitionTheory/competition/${competitionId}`,
method: 'get'
});
}
/** 查询理论题作答详情 */
export function getCompetitionDetail(competitionId) {
return request({
url: `/api/v1/competitionTheory/detail/competition/${competitionId}`,
method: 'get'
});
}
/** 根据id查询竞赛信息 */
export function getRaceById(id) {
return request({
url: `/api/race/${id}`,
method: 'get'
});
}
/** 退出当前赛场 */
export function quitCurrentRace(id, params) {
return request({
url: `/api/v1/competition/${id}/room`,
method: 'delete',
params
});
}
/** 查看加载的竞赛试题 */
export function getTestPaperDatail(competitionId) {
return request({
url: `/api/v1/competition/${competitionId}/testPaper`,
method: 'get'
});
}
/** 提交实操结果 */
export function submitPracticalCompetition(group, competitionId) {
return request({
url: `/api/v1/competitionPractical/${group}/${competitionId}/finish`,
method: 'put'
});
}
/** 开始实操竞赛 */
export function startPracticalCompetition(group, competitionId) {
return request({
url: `/api/v1/competitionPractical/${group}/${competitionId}/start`,
method: 'put'
});
}
/** 查询实操考试结果 */
export function getPracticalCompetitionResult(competitionId) {
return request({
url: `/api/v1/competitionPractical/${competitionId}/result`,
method: 'get'
});
}
// 以下drts项目使用
/** 项目获取试题列表 */

View File

@ -1,37 +1,5 @@
import request from '@/utils/request';
/** 发送步骤数据*/
export function sendTrainingNextStep(data, group) {
return request({
url: `/api/training/${data.trainingId}/nextStep`,
method: 'post',
data: data.operate,
params: {
group
}
});
}
/** 查询实训列表 0*/
export function pageQueryTraining(params) {
return request({
url: `/api/training/pagedQuery`,
method: 'get',
params: params
});
}
export function sendCommand(group, command) {
return request({
url: `/api/training/deviceChange?group=${group}`,
method: 'put',
data: {
param: command.val,
type: command.type,
code: command.code,
operation: command.operation
}
});
}
// 发送新的指令
export function sendCommandNew(group, commandDefinitionId, command) {
return request({

View File

@ -137,13 +137,6 @@ export function getUserinfoPassword(id, data) {
});
}
// 获取当前用户数量
export function getOnlineNmuber() {
return request({
url: `/api/cache/onlineUser`,
method: 'get'
});
}
// 生成线下环境用户
export function generateOfflineUser(data) {
return request({

View File

@ -362,7 +362,7 @@ export function postDailyRunPlanLoadGenerate(id) {
// 加载通用排班计划
export function postSchedulingCommonGenerate(mapId) {
return request({
url: `/api/scheduling/common/generate?mapId=${mapId}`,
url: `/api/v1/scheduling/generate/common?mapId=${mapId}`,
method: 'post'
});
}

View File

@ -1,12 +1,5 @@
import request from '@/utils/request';
export function generateSchedulingAgain(group) {
return request({
url: `/api/scheduling/${group}/rebuild`,
method: 'delete'
});
}
/** 查询某天的派班计划 */
export function querySechedulingNew (group, params) {
return request({

View File

@ -31,14 +31,6 @@ export function deleteFailureRule(id) {
});
}
/** 退出仿真系统*/
export function runDiagramQuit(group) {
return request({
url: `/api/simulation/${group}/quit`,
method: 'put'
});
}
/** 实训系统(新版地图) */
export function trainingNotifyNew({ trainingId }) {
return request({
@ -57,7 +49,7 @@ export function examNotifyNew({ examId }) {
/** 获取用户实训列表*/
export function getSimulationList(data) {
return request({
url: `/api/simulation/stats`,
url: `/api/stats/simulation`,
method: 'get',
params: data
});
@ -66,7 +58,7 @@ export function getSimulationList(data) {
/** 添加用户仿真数据*/
export function postSimulationStats(data) {
return request({
url: `/api/simulation/stats`,
url: `/api/stats/simulation`,
method: 'post',
data: data
});
@ -75,7 +67,7 @@ export function postSimulationStats(data) {
/** 更新用户仿真数据*/
export function putSimulationStats(data) {
return request({
url: `/api/simulation/${data.id}/stats`,
url: `/api/stats/${data.id}`,
method: 'put',
data: data
});
@ -84,7 +76,7 @@ export function putSimulationStats(data) {
/** 删除用户仿真数据*/
export function deleteSimulationStats(statsId) {
return request({
url: `/api/simulation/${statsId}`,
url: `/api/stats/${statsId}`,
method: 'delete'
});
}
@ -236,14 +228,6 @@ export function handlerIbpEvent(group, button, stationCode) {
});
}
/** 预览脚本仿真*/
export function scriptDraftRecordNotify(scriptId) {
return request({
url: `/api/simulation/scriptDraft/${scriptId}`,
method: 'get'
});
}
/** 预览脚本仿真(新版)*/
export function scriptDraftRecordNotifyNew(scriptId) {
return request({

View File

@ -188,6 +188,20 @@ export default {
},
mounted() {
this.content = this.value;
const that = this;
document.addEventListener('click', (e) => {
const emojiElem = document.getElementById('emoji-palette');
const emojiButtonList = document.getElementsByClassName('ql-emoji');
let flag = true;
for (let i = 0; i < emojiButtonList.length; i++) {
if (emojiButtonList[i].contains(e.target)) {
flag = false;
}
}
if (emojiElem && !emojiElem.contains(e.target) && flag) {
that.closeEmoji();
}
});
},
methods: {
onChange(e) {
@ -209,6 +223,11 @@ export default {
},
setContents(val) {
this.$refs.editor.quill.setContents(val);
},
closeEmoji() {
const ele_emoji_plate = document.getElementById('emoji-palette');
document.getElementById('emoji-close-div').style.display = 'none';
if (ele_emoji_plate) { ele_emoji_plate.remove(); }
}
}
};
@ -226,6 +245,20 @@ export default {
left: -30px;
}
}
/deep/ #emoji-palette{
top: -215 !important;
left: 0 !important;
max-width: 550px;
width: 550px;
#tab-toolbar{ text-align: left}
}
}
/deep/ #emoji-palette{
top: -215px !important;
left: 850px !important;
max-width: 550px;
width: 550px;
#tab-toolbar{ text-align: left}
#tab-panel{ height:175px}
}
</style>

View File

@ -1,262 +0,0 @@
//import request from '@/utils/request';
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
export function getmodels(data) {
let postmap = {
id:data.mapdata.id,
mapId:data.mapdata.mapId,
assets:"null",
sections:"null",
signals:"null",
trains:"null",
stands:"null",
switchs:"null"
};
console.log(data.mapdata);
if(data.mapdata.sectionlist.sections== undefined){
return postmap;
}
if(data == undefined){
return postmap;
}else{
let models = {
stationtexture:"0",
istexture:false,
assets:[],
};
//资源
let assets = [];
// for(let i=0;i<data.assetloader.modellist.length;i++){
// let asset = {
// id:data.assetloader.modellist[i].id,
// name:data.assetloader.modellist[i].name,
// deviceType:data.assetloader.modellist[i].deviceType,
// type:data.assetloader.modellist[i].type,
// assetUrl:data.assetloader.modellist[i].assetUrl
// }
// assets.push(asset);
// }
//信号机资源
let assetsignal = {
assetname:"信号机模型",
id:"1",
packageName:"高位三灯信号机",
deviceType:"SimulationSignal",
type:"signal",
url:JL3D_LOCAL_STATIC+"/MODEL/signal/d3d.FBX"
}
assets.push(assetsignal);
//列车资源
let assettrain = {
assetname:"列车模型",
id:"2",
packageName:"6节列车",
deviceType:"SimulationTrain",
type:"train",
url:JL3D_LOCAL_STATIC+"/MODEL/train/train.FBX"
}
assets.push(assettrain);
let assetneicestation = {
assetname:"内侧车站",
id:"3",
packageName:"沙盘驾驶内侧站台",
deviceType:"SimulationStation",
type:"stationInside",
url:JL3D_LOCAL_STATIC+"/MODEL/station/fuzhou.FBX"
}//JL3D_LOCAL_STATIC+"/MODEL/station/fuzhou/fuzhou.FBX"
assets.push(assetneicestation);
let assetswitch = {
assetname:"道岔模型",
id:"4",
packageName:"轨道通用道岔",
deviceType:"SimulationSwitch",
type:"switch",
url:JL3D_LOCAL_STATIC+"/MODEL/auto/autoswitch.FBX"
}
assets.push(assetswitch);
let assetwaicestation = {
assetname:"外侧车站",
id:"5",
packageName:"沙盘驾驶外侧站台",
deviceType:"SimulationStation",
type:"stationOutside",
url:JL3D_LOCAL_STATIC+"/MODEL/station/waicestation.FBX"
}
assets.push(assetwaicestation);
let assetstation3 = {
assetname:"特殊站台",
id:"6",
packageName:"沙盘驾驶特殊站台",
deviceType:"SimulationStation",
type:"stationThree",
url:JL3D_LOCAL_STATIC+"/MODEL/station/station3.FBX"
}
assets.push(assetstation3);
let backgroundmodel = {
assetname:"隧道背景",
id:"7",
packageName:"隧道背景",
deviceType:"SimulationBg",
type:"suidao",
url:JL3D_LOCAL_STATIC+"/MODEL/suidao/xiansuidao.FBX"
}
assets.push(backgroundmodel);
models.assets = assets;
models.stationtexture = "xian3";
models.istexture = true;
console.log(models);
postmap.assets = JSON.stringify(models);
//link轨道
// let links = [];
// for(let i=0;i<data.mapdata.linklist.linksgroup.children.length;i++){
// let link = {
// uuid:data.mapdata.linklist.linksgroup.children[i].uuid,
// code:data.mapdata.linklist.linksgroup.children[i].code,
// name:data.mapdata.linklist.linksgroup.children[i].name,
// lengthfact:data.mapdata.linklist.linksgroup.children[i].lengthfact,
// position:data.mapdata.linklist.linksgroup.children[i].position,
// rotation:data.mapdata.linklist.linksgroup.children[i].rotation,
// scale:data.mapdata.linklist.linksgroup.children[i].scale,
// rightlist:data.mapdata.linklist.linksgroup.children[i].rightlist,
// leftlist:data.mapdata.linklist.linksgroup.children[i].leftlist,
// lp:data.mapdata.linklist.linksgroup.children[i].lp,
// rp:data.mapdata.linklist.linksgroup.children[i].rp,
// rail:data.mapdata.linklist.linksgroup.children[i].rail,
// }
// links.push(link);
// }
// postmap.sections.link = JSON.stringify(links);
//section隧道
let sections = [];
// console.log(data.mapdata.sectionlist.sections.datalist);
for(let i in data.mapdata.sectionlist.sections.datalist){
let section = {
// uuid:data.mapdata.sectionlist.sections.modellist[i].uuid,
code:data.mapdata.sectionlist.sections.datalist[i].code,
name:data.mapdata.sectionlist.sections.datalist[i].name,
lengthFact:data.mapdata.sectionlist.sections.datalist[i].mesh.lengthFact,
standTrack:data.mapdata.sectionlist.sections.datalist[i].standTrack,
rp:data.mapdata.sectionlist.sections.datalist[i].rp,
lp:data.mapdata.sectionlist.sections.datalist[i].lp,
railpoint:data.mapdata.sectionlist.sections.datalist[i].mesh.railpoint,
rail:data.mapdata.sectionlist.sections.datalist[i].rail,
position:data.mapdata.sectionlist.sections.datalist[i].mesh.position,
rotation:data.mapdata.sectionlist.sections.datalist[i].mesh.rotation,
scale:data.mapdata.sectionlist.sections.datalist[i].mesh.scale,
}
let nowmesh = data.mapdata.sectionlist.sectiongroup.getObjectByProperty("code",section.code);
section.railpoint = nowmesh.railpoint
// console.log(nowmesh.railpoint);
// if(data.mapdata.sectionlist.sections.datalist[i].rsection){
// section.rsection = data.mapdata.sectionlist.sections.datalist[i].rsection;
// }
// if(data.mapdata.sectionlist.sections.datalist[i].lsection){
// section.lsection = data.mapdata.sectionlist.sections.datalist[i].lsection;
// }
// if(data.mapdata.sectionlist.sections.datalist[i].csection){
// section.csection = data.mapdata.sectionlist.sections.datalist[i].csection;
// }
// testmesh1.position.z = link.position.z;
sections.push(section);
}
let arrray = {
section:sections,
};
postmap.sections = JSON.stringify(arrray);
//道岔
let switchs = [];
for(let i=0;i<data.mapdata.switchlist.switchs.datalist.length;i++){
let switcha = {
// uuid:data.mapdata.switchlist.switchs.modellist[i].uuid,
code:data.mapdata.switchlist.switchs.datalist[i].code,
name:data.mapdata.switchlist.switchs.datalist[i].name,
pa:data.mapdata.switchlist.switchs.datalist[i].pa,
pb:data.mapdata.switchlist.switchs.datalist[i].pb,
pc:data.mapdata.switchlist.switchs.datalist[i].pc,
position:data.mapdata.switchlist.switchs.modellist[i].position,
rotation:data.mapdata.switchlist.switchs.modellist[i].rotation,
scale:data.mapdata.switchlist.switchs.modellist[i].scale
}
switchs.push(switcha);
}
postmap.switchs = JSON.stringify(switchs);
//信号
let signals = [];
for(let i=0;i<data.mapdata.signallist.list.length;i++){
let signal = {
// uuid:data.mapdata.signallist.list[i].mesh.uuid,
name:data.mapdata.signallist.list[i].mesh.name,
modelid:data.mapdata.signallist.list[i].mesh.modelid,
code:data.mapdata.signallist.list[i].mesh.code,
right:data.mapdata.signallist.list[i].mesh.right,
position:data.mapdata.signallist.list[i].mesh.position,
rotation:data.mapdata.signallist.list[i].mesh.rotation,
scale:data.mapdata.signallist.list[i].mesh.scale
}
signals.push(signal);
}
postmap.signals = JSON.stringify(signals);
//车站
let stands = [];
for(let i=0;i<data.mapdata.stationstandlist.list.length;i++){
let station = {
// uuid:data.mapdata.stationstandlist.list[i].uuid,
code:data.mapdata.stationstandlist.list[i].code,
name:data.mapdata.stationstandlist.list[i].name,
modelid:data.mapdata.stationstandlist.list[i].modelid,
position:data.mapdata.stationstandlist.list[i].mesh.position,
rotation:data.mapdata.stationstandlist.list[i].mesh.rotation,
scale:data.mapdata.stationstandlist.list[i].mesh.scale,
inside:data.mapdata.stationstandlist.list[i].inside,
direction1:{
name:data.mapdata.stationstandlist.list[i].direction1.name,
code:data.mapdata.stationstandlist.list[i].direction1.code
},
direction2:{
name:data.mapdata.stationstandlist.list[i].direction2.name,
code:data.mapdata.stationstandlist.list[i].direction2.code
}
}
stands.push(station);
}
postmap.stands = JSON.stringify(stands);
//列车
let trains = [];
for(let i=0;i<data.assetloader.modellist.length;i++){
if(data.assetloader.modellist[i].deviceType == "train"){
let train = {
id:data.assetloader.modellist[i].id,
name:data.assetloader.modellist[i].name,
deviceType:data.assetloader.modellist[i].deviceType,
type:data.assetloader.modellist[i].type,
assetUrl:data.assetloader.modellist[i].assetUrl
}
trains.push(train);
}
}
postmap.trains = JSON.stringify(trains);
return postmap;
}
}

View File

@ -3,13 +3,13 @@ import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
//信号机贴图
export function Signallightload(lights) {
settexture(lights, "red", JL3D_LOCAL_STATIC+'/MODEL/device/signal/1.jpg');
settexture(lights, "red", JL3D_LOCAL_STATIC+'/device/signal/1.jpg');
settexture(lights, "yellow", JL3D_LOCAL_STATIC+'/MODEL/device/signal/2.jpg');
settexture(lights, "yellow", JL3D_LOCAL_STATIC+'/device/signal/2.jpg');
settexture(lights, "green", JL3D_LOCAL_STATIC+'/MODEL/device/signal/3.jpg');
settexture(lights, "green", JL3D_LOCAL_STATIC+'/device/signal/3.jpg');
settexture(lights, "black", JL3D_LOCAL_STATIC+'/MODEL/device/signal/4.jpg');
settexture(lights, "black", JL3D_LOCAL_STATIC+'/device/signal/4.jpg');
}
//加载贴图

View File

@ -7,7 +7,7 @@ var Staticmodel = {
deviceType: "Switch",
type: "fuzhou",
picUrl: "",
assetUrl: JL3D_LOCAL_STATIC+"/MODEL/device/switch/ZD6D.FBX"
assetUrl: JL3D_LOCAL_STATIC+"/device/switch/ZD6D.FBX"
},//"https://joylink.club/oss/wx/switch/switch.FBX"
Signal: {
@ -16,7 +16,7 @@ var Staticmodel = {
deviceType: "Signal",
type: "low",
picUrl: "",
assetUrl: JL3D_LOCAL_STATIC+"/MODEL/device/signal/signal.FBX"
assetUrl: JL3D_LOCAL_STATIC+"/device/signal/signal.FBX"
},
stationstand: {
id: "3",
@ -24,7 +24,7 @@ var Staticmodel = {
deviceType: "stationstand",
type: "low",
picUrl: "",
assetUrl: JL3D_LOCAL_STATIC+"/MODEL/device/stationstand/stationstand.FBX"
assetUrl: JL3D_LOCAL_STATIC+"/device/stationstand/stationstand.FBX"
//https://joylink.club/oss/wx/stationstand/stationstand.FBX
@ -35,7 +35,7 @@ var Staticmodel = {
deviceType: "section",
type: "low",
picUrl: "",
assetUrl: JL3D_LOCAL_STATIC+"/MODEL/device/section/section.FBX"
assetUrl: JL3D_LOCAL_STATIC+"/device/section/section.FBX"
//https://joylink.club/oss/wx/stationstand/stationstand.FBX
@ -46,7 +46,7 @@ var Staticmodel = {
deviceType: "room",
type: "low",
picUrl: "",
assetUrl: JL3D_LOCAL_STATIC+"/MODEL/device/room/room.FBX"
assetUrl: JL3D_LOCAL_STATIC+"/device/room/room.FBX"
//https://joylink.club/oss/wx/stationstand/stationstand.FBX

View File

@ -1,4 +1,4 @@
import { Staticmodel } from '@/jlmap3d/jl3ddevice/config.js';
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
//loader

View File

@ -1,4 +1,4 @@
import { Staticmodel } from '@/jlmap3d/jl3ddevice/config.js';
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
//loader
import { FBXLoader } from '@/jlmap3d/main/loaders/FBXLoader';

View File

@ -1,4 +1,4 @@
import { Staticmodel } from '@/jlmap3d/jl3ddevice/config.js';
// import { Staticmodel } from '@/jlmap3d/jl3ddevice/config.js';
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
//loader
import { FBXLoader } from '@/jlmap3d/main/loaders/FBXLoader';

View File

@ -1,48 +1,41 @@
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
import { JL3D_LOCAL_STATIC,BASE_ASSET_API } from '@/api/jlmap3d/assets3d.js';
export function ModelManagerVR(){
let scope = this;
//
// this.testmodel = {
// code:"test",
// locateType:"01",
// mesh:null,
// url:JL3D_LOCAL_STATIC+"/vrtest/vrtest.FBX"
// };
this.stationIn = {
code:"stationIn",
locateType:"1",
mesh:null,
url:JL3D_LOCAL_STATIC+"/vrtest/stationIn.FBX"
url:BASE_ASSET_API+"/MODEL/2020-11-23/71-16438.FBX"
};
this.stationOut = {
code:"stationOut",
locateType:"2",
mesh:null,
url:JL3D_LOCAL_STATIC+"/vrtest/stationIn.FBX"
url:BASE_ASSET_API+"/MODEL/2020-11-23/71-16438.FBX"
};
this.otherDevice = {
code:"otherDevice",
locateType:"3",
mesh:null,
url:JL3D_LOCAL_STATIC+"/vrtest/otherDevice.FBX"
url:BASE_ASSET_API+"/MODEL/2020-11-23/1-56188.FBX"
};
this.train = {
code:"train",
locateType:"4",
mesh:null,
url:JL3D_LOCAL_STATIC+"/vrtest/vrTrain.FBX"
url:BASE_ASSET_API+"/MODEL/2020-11-23/72-72266.FBX"
};
this.human = {
code:"human",
locateType:"5",
mesh:null,
url:JL3D_LOCAL_STATIC+"/vrtest/vrHuman.FBX"
url:BASE_ASSET_API+"/MODEL/2020-11-23/73-61142.FBX"
};
this.loadpromise = function (mixers){

View File

@ -1,4 +1,4 @@
import { Staticmodel } from '@/jlmap3d/jl3ddevice/config.js';
// import { Staticmodel } from '@/jlmap3d/jl3ddevice/config.js';
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
//loader
@ -9,8 +9,6 @@ import { ModelManagerVR } from '@/jlmap3d/jl3dmaintainer/jl3dFaultDeviceVr/utils
import { TrainControl } from '@/jlmap3d/jl3dmaintainer/jl3dFaultDeviceVr/utils/trainControl.js';
import { MoveanimateVr } from '@/jlmap3d/jl3dmaintainer/jl3dFaultDeviceVr/utils/moveanimatevr.js';
import { Textconfig } from '@/jlmap3d/jl3ddevice/component/textconfig.js';
import {Materialload} from '@/jlmap3d/main/loaders/Materialload.js';

View File

@ -1,39 +1,39 @@
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
import { JL3D_LOCAL_STATIC,BASE_ASSET_API } from '@/api/jlmap3d/assets3d.js';
var TrainRescueStatic = {
animatemodel: {
id: "1",
name: "动画模型",
deviceType: "animatemodel",
type: "animatemodel",
url: JL3D_LOCAL_STATIC+"/vrtest/trainrescue/DH923.FBX"
url: BASE_ASSET_API+"/MODEL/2020-11-23/74-28231.FBX"
},//"https://joylink.club/oss/wx/switch/switch.FBX"
floorplane: {
id: "2",
name: "行走范围",
deviceType: "runplane",
type: "runplane",
url: JL3D_LOCAL_STATIC+"/vrtest/trainrescue/diban.FBX"
url: BASE_ASSET_API+"/MODEL/2020-11-23/75-84310.FBX"
},
controlmodel: {
id: "3",
name: "控制台",
deviceType: "controlmodel",
type: "controlmodel",
url: JL3D_LOCAL_STATIC+"/vrtest/trainrescue/kongzhigan.FBX"
url: BASE_ASSET_API+"/MODEL/2020-11-23/77-45640.FBX"
},
other: {
id: "4",
name: "其他",
deviceType: "other",
type: "other",
url: JL3D_LOCAL_STATIC+"/vrtest/trainrescue/TK.FBX"
url: BASE_ASSET_API+"/MODEL/2020-11-23/78-39158.FBX"
},
handR: {
id: "5",
name: "handr",
deviceType: "handr",
type: "handr",
url: JL3D_LOCAL_STATIC+"/vrtest/trainrescue/handr.FBX"
url: BASE_ASSET_API+"/MODEL/2020-11-23/76-34528.FBX"
}
}

View File

@ -1,71 +0,0 @@
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
var Staticmodel = {
man1: {
id: "1",
name: "人物1",
deviceType: "man",
type: "man",
picUrl: "",
assetUrl: JL3D_LOCAL_STATIC+"/MODEL/passflow/man1.FBX"
},//"https://joylink.club/oss/wx/switch/switch.FBX"
man2: {
id: "2",
name: "人物2",
deviceType: "man",
type: "man",
picUrl: "",
assetUrl: JL3D_LOCAL_STATIC+"/MODEL/passflow/man2.FBX"
},
station: {
id: "3",
name: "车站",
deviceType: "station",
type: "hrb",
picUrl: "",
assetUrl: JL3D_LOCAL_STATIC+"/MODEL/passflow/station.FBX"
},
zhajiin: {
id: "4",
name: "闸机",
deviceType: "zhajiin",
type: "hrb",
picUrl: "",
assetUrl: JL3D_LOCAL_STATIC+"/MODEL/passflow/zhajiin.FBX"
},
zhajiout: {
id: "5",
name: "闸机",
deviceType: "zhajiout",
type: "hrb",
picUrl: "",
assetUrl: JL3D_LOCAL_STATIC+"/MODEL/passflow/zhajiout.FBX"
},
monitor: {
id: "6",
name: "摄像机",
deviceType: "monitor",
type: "hrb",
picUrl: "",
assetUrl: JL3D_LOCAL_STATIC+"/MODEL/passflow/monitor.FBX"
},
train: {
id: "7",
name: "列车",
deviceType: "train",
type: "hrb",
picUrl: "",
assetUrl: JL3D_LOCAL_STATIC+"/MODEL/train/train.FBX"
},
section: {
id: "8",
name: "区段",
deviceType: "section",
type: "hrb",
picUrl: "",
assetUrl: JL3D_LOCAL_STATIC+"/MODEL/passflow/section.FBX"
},
}
export { Staticmodel }

View File

@ -1,4 +1,3 @@
import { Staticmodel } from '@/jlmap3d/jl3dpassflow/config.js';
//静态资源文件路劲
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
//loader

View File

@ -1,53 +1,53 @@
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
import { JL3D_LOCAL_STATIC,BASE_ASSET_API } from '@/api/jlmap3d/assets3d.js';
var Staticmodel = [
{
id: "1",
name: "人物1",
deviceType: "man1",
type: "man1",
url: "/cbtc/static/MODEL/passflow/man1.FBX"
url: BASE_ASSET_API + "/MODEL/2020-07-16/1-9933.FBX"
},{
id: "2",
name: "人物2",
deviceType: "man2",
type: "man2",
url: "/cbtc/static/MODEL/passflow/man2.FBX"
url: BASE_ASSET_API + "/MODEL/2020-07-16/2-87850.FBX"
},{
id: "3",
name: "车站",
deviceType: "cctvStation",
type: "cctvStation",
url: "/cbtc/static/trafficplan/station.FBX"
url: BASE_ASSET_API + "/MODEL/2020-11-23/79-95086.FBX"
},{
id: "4",
name: "闸机",
deviceType: "cctvGateIn",
type: "cctvGateIn",
url: "/cbtc/static/MODEL/passflow/zhajiin.FBX"
url: BASE_ASSET_API + "/MODEL/2020-07-20/42-7172.FBX"
},{
id: "5",
name: "闸机",
deviceType: "cctvGateOut",
type: "cctvGateOut",
url: "/cbtc/static/MODEL/passflow/zhajiout.FBX"
url: BASE_ASSET_API + "/MODEL/2020-07-20/43-8227.FBX"
},{
id: "6",
name: "摄像机",
deviceType: "cctvMonitor",
type: "cctvMonitor",
url: "/cbtc/static/MODEL/passflow/monitor.FBX"
url: BASE_ASSET_API + "/MODEL/2020-07-20/44-24100.FBX"
},{
id: "7",
name: "列车",
deviceType: "cctvTrain",
type: "cctvTrain",
url: "/cbtc/static/trafficplan/normaltrain.FBX"
url: BASE_ASSET_API + "/MODEL/2020-11-23/80-14604.FBX"
},{
id: "8",
name: "区段",
deviceType: "cctvSection",
type: "cctvSection",
url: "/cbtc/static/MODEL/passflow/section.FBX"
url: BASE_ASSET_API + "/MODEL/2020-07-20/45-36330.FBX"
}

View File

@ -1,25 +1,25 @@
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
import { JL3D_LOCAL_STATIC,BASE_ASSET_API } from '@/api/jlmap3d/assets3d.js';
var Staticmodel = [
{
id: "1",
name: "人物1",
deviceType: "man1",
type: "man1",
url: "/cbtc/static/trafficplan/man1.FBX"
url: BASE_ASSET_API + "/MODEL/2020-07-16/1-9933.FBX"
},
{
id: "2",
name: "人物2",
deviceType: "man2",
type: "man2",
url: "/cbtc/static/trafficplan/man2.FBX"
url: BASE_ASSET_API + "/MODEL/2020-07-16/2-87850.FBX"
},
{
id: "7",
name: "列车",
deviceType: "train",
type: "cctvTrain",
url: "/cbtc/static/trafficplan/train.FBX"
url: BASE_ASSET_API + "/MODEL/2020-11-16/48-14909.FBX"
},
];

View File

@ -2,9 +2,8 @@ import { AssetModel } from '@/jlmap3d/main/loaders/model/Assetmodel';
import { Assetmaterial } from '@/jlmap3d/main/loaders/model/Assetmaterial';
import { getBaseUrl } from '@/utils/baseUrl';
import { Loading } from 'element-ui';
import { BASE_ASSET_API } from '@/api/jlmap3d/assets3d.js';
const BASE_API = getBaseUrl();
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
import { JL3D_LOCAL_STATIC,BASE_ASSET_API } from '@/api/jlmap3d/assets3d.js';
let defaultsignal = {
id:"3",
@ -12,7 +11,7 @@ let defaultsignal = {
deviceType:"signal",
type:"low",
picUrl:"",
url:JL3D_LOCAL_STATIC+"/MODEL/signal/d3d.FBX"
url:BASE_ASSET_API+"/MODEL/signal/d3d.FBX"
}
let defaulttrain = {
@ -21,7 +20,7 @@ let defaulttrain = {
deviceType:"train",
type:"num4",
picUrl:"",
url:JL3D_LOCAL_STATIC+"/MODEL/train/train.FBX"
url:BASE_ASSET_API+"/MODEL/train/train.FBX"
}
@ -31,34 +30,24 @@ let defaultstation = {
deviceType:"stand",
type:"num4",
picUrl:"",
url:JL3D_LOCAL_STATIC+"/MODEL/station/fuzhou.FBX"
}//JL3D_LOCAL_STATIC+"/MODEL/station/fuzhou/fuzhou.FBX"
url:BASE_ASSET_API+"/MODEL/station/fuzhou.FBX"
}
let waicestation = {
id:"10",
name:"外侧车站",
deviceType:"standwaice",
type:"num4",
picUrl:"",
url:JL3D_LOCAL_STATIC+"/MODEL/station/waicestation.FBX"
url:BASE_ASSET_API+"/MODEL/station/waicestation.FBX"
}
let station3 = {
id:"10000",
name:"特殊站台",
deviceType:"station3",
type:"num4",
picUrl:"",
url:JL3D_LOCAL_STATIC+"/MODEL/station/station3.FBX"
}
//JL3D_LOCAL_STATIC+"/MODEL/station/fuzhou/fuzhou.FBX"
//https://test.joylink.club/oss/station/fuzhou/fuzhou.FBX
//https://joylink.club/oss/station/fuzhou/fuzhou.FBX
let defaultswitch = {
id:"11",
name:"道岔",
deviceType:"switch",
type:"fuzhou",
picUrl:"",
url:JL3D_LOCAL_STATIC+"/MODEL/daocha/daocha.FBX"
url:BASE_ASSET_API+"/MODEL/daocha/daocha.FBX"
}
@ -68,37 +57,19 @@ let defaultsuidao = {
deviceType:"suidao",
type:"suidao",
picUrl:"",
url:JL3D_LOCAL_STATIC+"/MODEL/suidao/suidao.FBX"
url:BASE_ASSET_API+"/MODEL/suidao/suidao.FBX"
}
let hebsuidao = {
id:"1010",
name:"hebsuidao",
deviceType:"hebsuidao",
type:"hebsuidao",
picUrl:"",
url:JL3D_LOCAL_STATIC+"/MODEL/suidao/hebsuidao.FBX"
}
let nbsuidao = {
id:"1010",
name:"nbsuidao",
deviceType:"nbsuidao",
type:"nbsuidao",
picUrl:"",
url:JL3D_LOCAL_STATIC+"/MODEL/suidao/nbsuidao.FBX"
}
let defaultbackground = {
id:"16",
name:"background",
deviceType:"background",
type:"background",
picUrl:"",
url:JL3D_LOCAL_STATIC+"/MODEL/suidao/background.FBX"
url:BASE_ASSET_API+"/MODEL/suidao/background.FBX"
}
//JL3D_LOCAL_STATIC+"/MODEL/suidao/suidao.FBX"
//https://test.joylink.club/oss/suidao/suidao.FBX
//https://joylink.club/oss/suidao/suidao.FBX
let defaultautorail = {
id:"100",
@ -106,7 +77,7 @@ let defaultautorail = {
deviceType:"autorail",
type:"autorail",
picUrl:"",
url:JL3D_LOCAL_STATIC+"/MODEL/auto/rail.FBX"
url:BASE_ASSET_API+"/MODEL/auto/rail.FBX"
}
let autoswitch = {
@ -115,7 +86,7 @@ let autoswitch = {
deviceType:"autoswitch",
type:"fuzhou",
picUrl:"",
url:JL3D_LOCAL_STATIC+"/MODEL/auto/autoswitch.FBX"
url:BASE_ASSET_API+"/MODEL/auto/autoswitch.FBX"
}
let autoswitch1 = {
@ -124,7 +95,7 @@ let autoswitch1 = {
deviceType:"autoswitch1",
type:"fuzhou",
picUrl:"",
url:JL3D_LOCAL_STATIC+"/MODEL/auto/switch1.FBX"
url:BASE_ASSET_API+"/MODEL/auto/switch1.FBX"
}
let autoswitch2 = {
@ -133,7 +104,7 @@ let autoswitch2 = {
deviceType:"autoswitch2",
type:"fuzhou",
picUrl:"",
url:JL3D_LOCAL_STATIC+"/MODEL/auto/switch2.FBX"
url:BASE_ASSET_API+"/MODEL/auto/switch2.FBX"
}
export function AssetLoader(){

View File

@ -68,7 +68,7 @@ export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,
let signaldata = JSON.parse(netdata.signals);
let standsdata = JSON.parse(netdata.stands);
let psddata = data.psdList;
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList,-13);
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList,0);
assetloader.assetPromiseOver(sceneload)
.then(function(data){

View File

@ -646,7 +646,7 @@ class SkinCode extends defaultStyle {
trainHeadArrowOffsetX: 2 // 列车车头三角偏移
},
common: {
trainHeight: 17, // 列车高度
trainHeight: 10, // 列车高度
trainHeadDistance: 2, // 列车和车头之间的间距
trainWidth: 76, // 列车长度
trainTextFontSize: 10, // 列车字号

View File

@ -125,7 +125,7 @@ deviceState[deviceType.StationStand] = {
assignSkip: 0, // 是否指定跳停
runLevelTime: 0, // 区间运行时间 自动为 0
parkingTime: 0, // 站台停车时间 自动为0
num:0, // 站台上等车人数
// /** 折返策略*/
// reentryStrategy: {
// Default: '01', /** 默认(缺省值)*/
@ -246,7 +246,9 @@ deviceState[deviceType.Train] = {
/** 列车精确位置 (成都一号线使用)*/
offsetp:0,
/** 列车所在物理区段 */
physicalCode:''
physicalCode:'',
/** 列车上的人数 */
num:0
};

View File

@ -24,7 +24,8 @@ class Status {
assignSkip: device.assignSkip, // 是否指定跳停
runLevelTime: device.runLevelTime, // 区间运行时间 自动为 0
parkingTime: device.parkingTime, // 站台停车时间 自动为0
fault: device.fault /** 非故障*/
fault: device.fault, /** 非故障*/
num:device.num
};
}
handleSection(device) {
@ -94,7 +95,8 @@ class Status {
jump: device.jump, /** 是否跳停 */
hold: device.hold, /** 是否扣车 */
offsetp:device.offsetp, /** 列车精确位置 (成都一号线使用)*/
physicalCode:device.physicalCode /** 列车所在物理区段 */
physicalCode:device.physicalCode, /** 列车所在物理区段 */
num:device.num /** 列车上的人数*/
};
}
handleStation(device) {

View File

@ -41,6 +41,8 @@ class ESolidStand extends Group {
setState(model) {
const style = this.model.style;
const path = window.location.href;
if (!path.includes('/practiceDisplay')) {
// 列车跳停
model.assignSkip && this.setColor(style.StationStand.solidStand.designatedJumpStopColor);
// 全部跳停
@ -49,6 +51,24 @@ class ESolidStand extends Group {
model.trainParking && this.setColor(style.StationStand.solidStand.stopColor);
// 紧急停车
model.emergencyClosed && this.setColor(this.style.StationStand.solidStand.spareColor);
} else {
this.handlePassagerColor(model.num);
}
}
handlePassagerColor(num) {
if (num && num > 0) {
const passagerNum = parseInt(num);
if (passagerNum < 40) {
this.setColor('#29a909');
} else if (passagerNum < 80 && passagerNum >= 40) {
this.setColor('#ffa500');
} else {
this.setColor('#F00');
}
} else {
this.setColor('#29a909');
}
}
}

View File

@ -47,12 +47,12 @@ class EMouse extends Group {
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`;
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`;
} 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`;
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 : ''}`;
}
}
const trainTip = this.device.style.Train.common.trainTip;

View File

@ -289,7 +289,8 @@ export default class TrainBody extends Group {
this.deviceModel.down = false;
}
setTrainColor(color) {
this.trainBodyBox && this.trainBodyBox.setStyle('fill', color);
this.trainBodyBox && this.trainBodyBox.setColor('fill', color);
// Style('fill', color);
}
setHShow(isShow) {
if (this.textH) {

View File

@ -84,6 +84,7 @@ export default class Train extends Group {
hold:model.hold,
jump:model.jump,
stop:model.stop,
num:model.num,
dt: model.dt,
driveMode: model.driveMode,
model: model
@ -335,24 +336,36 @@ export default class Train extends Group {
const flag = model.trainWindowModel ? model.trainWindowModel.reversal : false;
if (model) {
this.recover();
// if (this.style.Train.common.trainHeadColorChangeMode) {
// this.setDriveMode(model.driveMode + model.runLevel);
// } else {
// this.setDriveMode(model.driveMode);
// }
this.setRunStatus(model.stop, flag);
const path = window.location.href;
if (!path.includes('/practiceDisplay')) {
if (this.style.Train.common.trainHeadColorChangeMode) {
this.setDriveMode(model.driveMode + model.runLevel);
} else {
this.setDriveMode(model.driveMode);
}
this.setRunStatus(model.stop, flag);
this.setCommunicationStatus(model.runLevel);
this.setSoonerOrLater(model.dt);
}
this.setDoorStatus(model.doorCloseLock);
this.setAlarmStatus(model.alarmStatus);
this.setHoldStatus(model.hold);
this.setJumpStatus(model.jump);
this.setSoonerOrLater(model.dt);
// this.setSoonerOrLater(model.dt);
this.setTrainTypeColor(model.type);
this.setPlanRoutingTypeColor(model.planRoutingType);
const style = this.style;
if (style.Section.trainPosition.display) {
this.updateSection(object);
}
if (path.includes('/practiceDisplay')) {
this.handlePassagerColor(model.num);
}
}
}
setTrainTypeColor(type) {
@ -365,6 +378,31 @@ export default class Train extends Group {
this.trainB && this.trainB.removeTrainDetail();
}
handlePassagerColor(num) {
if (num) {
// && num > 0
const passagerNum = parseInt(num);
if (passagerNum < 100) {
this.trainB && this.trainB.setTrainColor('#29a909');
this.trainL && this.trainL.setColor('#29a909');
this.trainR && this.trainR.setColor('#29a909');
} else if (passagerNum < 200 && passagerNum >= 100) {
this.trainB && this.trainB.setTrainColor('#ffa500');
this.trainL && this.trainL.setColor('#ffa500');
this.trainR && this.trainR.setColor('#ffa500');
} else {
this.trainB && this.trainB.setTrainColor('#F00');
this.trainL && this.trainL.setColor('#F00');
this.trainR && this.trainR.setColor('#F00');
}
} else {
this.trainB && this.trainB.setTrainColor('#29a909');
this.trainL && this.trainL.setColor('#29a909');
this.trainR && this.trainR.setColor('#29a909');
}
}
getBoundingRect() {
const list = [this.trainB, this.trainL, this.trainR];
let rect = null;

View File

@ -407,8 +407,9 @@ export default {
[`集中站 ${this.model.stationName} 区段 ${this.model.sectionName}报告恢复计轴有效`]);
}
}).catch((error) => {
console.error(error);
this.loading = false;
this.$refs.noticeInfo.doShow(operate, error.message);
this.$refs.noticeInfo.doShow();
});
} else {
if (this.model.stationName != this.model.confirmStationName) {

View File

@ -121,7 +121,8 @@ export default {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -149,7 +149,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -178,7 +178,7 @@ export default {
}
}).catch(() => {
this.loading = false;
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow();
});
}
}

View File

@ -196,7 +196,8 @@ export default {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
} else {
this.doClose();

View File

@ -100,7 +100,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -119,7 +119,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -148,7 +148,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -146,7 +146,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
} else {
return false;

View File

@ -148,7 +148,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -127,7 +127,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -148,7 +148,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -148,7 +148,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -130,7 +130,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -132,7 +132,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -1,6 +1,5 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" />
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-button ref="menuButton" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
@ -18,7 +17,6 @@
<script>
import { mapGetters } from 'vuex';
import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal';
import MenuButton from './menuButton';
import MenuStationStand from './menuStationStand';
@ -37,7 +35,6 @@ export default {
components: {
MenuBar,
MenuButton,
MenuCancel,
MenuSignal,
MenuSwitch,
MenuSection,

View File

@ -356,7 +356,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
selectedChange() {
@ -384,7 +384,7 @@ export default {
this.$refs.password.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
}
@ -407,7 +407,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
}
break;
@ -429,7 +429,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
}
break;

View File

@ -1,122 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import { exitFullscreen } from '@/utils/screen';
import { runDiagramQuit } from '@/api/simulation';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'CancelMenu',
components: {
PopMenu
},
data() {
return {
menu: [],
menuNormal: [],
menuScreen: [
{
label: '放大地图',
handler: this.magnifyMap,
disabled: false
},
{
label: '缩小地图',
handler: this.shrinkMap,
disabled: false
},
{
label: '返回',
handler: this.back,
disabled: false
}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
isScreen() { //
return this.$route.params.mode === 'dp' ||
this.$store.state.training.roles == 'BigScreen';
},
group() {
return this.$route.query.group;
}
},
watch: {
'$store.state.menuOperation.buttonOperation': function (val, old) {
if (!this.isScreen && this.menu && this.menu.length > 1) {
this.menu[0].disabled = true;
this.menu[1].disabled = !((this.menu[1] && val));
}
},
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menuNormal = [];
if (this.isScreen) {
this.menu = [...this.menuScreen];
}
// else {
// this.menu = [...this.menuNormal];
// }
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
mapLocation(item) {
if (item) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
this.doClose();
}
},
//
magnifyMap() {
this.$store.dispatch('menuOperation/handleMagnifyCount');
},
//
shrinkMap() {
this.$store.dispatch('menuOperation/handleShrinkCount');
},
//
async back() {
await runDiagramQuit(this.group);
EventBus.$emit('trainingSubscribeStop');
history.go(-1);
exitFullscreen();
}
}
};
</script>

View File

@ -124,7 +124,8 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
}
}

View File

@ -151,7 +151,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
@ -175,7 +175,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
}
}

View File

@ -151,7 +151,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
@ -175,7 +175,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
}
}

View File

@ -135,13 +135,11 @@ export default {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
} else {
return false;

View File

@ -118,8 +118,6 @@ export default {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;

View File

@ -135,13 +135,10 @@ export default {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;

View File

@ -180,7 +180,7 @@ export default {
if (selectType.fault) {
this.faultUnlock(selectType);
} else {
this.$refs.noticeInfo.doShow({}, `该区段[${selectType.name}(${selectType.code})]没有故障`);
this.$refs.noticeInfo.doShow(`该区段[${selectType.name}(${selectType.code})]没有故障`);
}
break;
}

View File

@ -207,7 +207,7 @@ export default {
if (route) {
this.setRoute(route);
} else {
this.$refs.noticeInfo.doShow({}, `没有以[${this.oldSelected.name}(${this.oldSelected.code})]为始端信号机,以[${selectType.name}(${selectType.code})] 为终端信号机的进路`);
this.$refs.noticeInfo.doShow(`没有以[${this.oldSelected.name}(${this.oldSelected.code})]为始端信号机,以[${selectType.name}(${selectType.code})] 为终端信号机的进路`);
}
this.clickNum = 0;
} else {
@ -244,7 +244,7 @@ export default {
case OperationEvent.Signal.reopenSignal.button.operation: {
//
if (selectType.greenOpen) {
this.$refs.noticeInfo.doShow({}, `信号机[${selectType.name}(${selectType.code})]已开启,无需重开信号机`);
this.$refs.noticeInfo.doShow(`信号机[${selectType.name}(${selectType.code})]已开启,无需重开信号机`);
} else {
//
this.reopenSignalByRoute(selectType);
@ -266,7 +266,7 @@ export default {
}
} else {
this.$refs.noticeInfo.doShow({}, `信号机[${selectType.name}(${selectType.code})]没有已锁闭进路,不能设置联锁自动进路`);
this.$refs.noticeInfo.doShow(`信号机[${selectType.name}(${selectType.code})]没有已锁闭进路,不能设置联锁自动进路`);
}
break;
}
@ -313,7 +313,8 @@ export default {
setRoute(route) {
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:route.code}, 3).then(({valid, operate})=>{
}).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
@ -328,7 +329,8 @@ export default {
cancelTrainRouteByLow(selectType) {
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
}).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
@ -344,7 +346,8 @@ export default {
reopenSignalByRoute(selectType) {
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
}).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
@ -367,7 +370,8 @@ export default {
signalCloseByLow(selectType) {
commitOperate(menuOperate.Signal.signalClose, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
}).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
@ -390,14 +394,16 @@ export default {
singalPassModel(selectType) {
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
}).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
singalCancelPassModel(selectType) {
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
}).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//

View File

@ -198,7 +198,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
//
@ -214,7 +214,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
//

View File

@ -223,14 +223,16 @@ export default {
setDetainTrainByLow(selectType) {
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:selectType.code}, 3).then(({valid, operate})=>{
}).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
/** 取消扣车 */
cancleDetainTrainByLow(selectType) {
commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:selectType.code}, 3).then(({valid, operate})=>{
}).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//

View File

@ -226,7 +226,8 @@ export default {
lock(selectType) {
commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
}).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
@ -236,7 +237,8 @@ export default {
this.$refs.switchControl.doShow(operate, selectType);
}
}).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
@ -247,21 +249,24 @@ export default {
}
}).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
locate(selectType) {
commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
}).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
reverse(selectType) {
commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
}).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//

View File

@ -330,10 +330,6 @@ export default {
});
},
nextStation() {
// commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Ahead',
@ -342,14 +338,11 @@ export default {
};
commitTrainSend(group, param).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
routeBlockRun() {
// commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
const param = {
commandType: 'Route_Block_Drive',
@ -358,7 +351,8 @@ export default {
};
commitTrainSend(group, param).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleOverFuideSignal() {
@ -370,7 +364,8 @@ export default {
};
commitTrainSend(group, param).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleOverEedLight() {
@ -382,7 +377,8 @@ export default {
};
commitTrainSend(group, param).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
@ -397,10 +393,10 @@ export default {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
undeveloped() {

View File

@ -226,12 +226,12 @@ export default {
// if (valid) {
// this.doClose();
// } else {
// // this.$refs.noticeInfo.doShow(operate);
// // this.$refs.noticeInfo.doShow();
// }
// }).catch(error => {
// this.loading = false;
// this.doClose();
// // this.$refs.noticeInfo.doShow(operate);
// // this.$refs.noticeInfo.doShow();
// });
// } else {
// return false;

View File

@ -152,12 +152,12 @@ export default {
// if (valid) {
// this.doClose();
// } else {
// this.$refs.noticeInfo.doShow(operate);
// this.$refs.noticeInfo.doShow();
// }
// }).catch(() => {
// this.loading = false;
// this.doClose();
// this.$refs.noticeInfo.doShow(operate);
// this.$refs.noticeInfo.doShow();
// });
// } else {
// return false;

View File

@ -226,12 +226,12 @@ export default {
// if (valid) {
// this.doClose();
// } else {
// // this.$refs.noticeInfo.doShow(operate);
// // this.$refs.noticeInfo.doShow();
// }
// }).catch(error => {
// this.loading = false;
// this.doClose();
// // this.$refs.noticeInfo.doShow(operate);
// // this.$refs.noticeInfo.doShow();
// });
// } else {
// return false;

View File

@ -1,6 +1,5 @@
<template>
<div class="chengdou-01__menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" />
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-request ref="menuRequest" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
@ -19,7 +18,6 @@
<script>
import { mapGetters } from 'vuex';
import MenuRequest from './menuRequest';
import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal';
import MenuStationStand from './menuStationStand';
import MenuSwitch from './menuSwitch';

View File

@ -1,94 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import { exitFullscreen } from '@/utils/screen';
import { runDiagramQuit } from '@/api/simulation';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'CancelMenu',
components: {
PopMenu
},
data() {
return {
menu: [],
menuScreen: [
{
label: '放大地图',
handler: this.magnifyMap,
disabled: false
},
{
label: '缩小地图',
handler: this.shrinkMap,
disabled: false
},
{
label: '返回',
handler: this.back,
disabled: false
}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
group() {
return this.$route.query.group;
}
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
doShow(point) {
this.clickEvent();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
magnifyMap() {
this.$store.dispatch('menuOperation/handleMagnifyCount');
},
//
shrinkMap() {
this.$store.dispatch('menuOperation/handleShrinkCount');
},
//
async back() {
await runDiagramQuit(this.group);
EventBus.$emit('trainingSubscribeStop');
history.go(-1);
exitFullscreen();
}
}
};
</script>

View File

@ -129,7 +129,7 @@ export default {
}
}, 1000).catch(() => {
this.loading = true;
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
}
}

View File

@ -123,7 +123,6 @@ export default {
}).catch(() => {
this.loading = false;
// this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
}
}

View File

@ -186,10 +186,10 @@ export default {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
this.$refs.noticeInfo.doShow();
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
this.$refs.noticeInfo.doShow();
});
},
//

View File

@ -258,7 +258,7 @@ export default {
this.$refs.routeControl.doShow(step, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
this.$refs.noticeInfo.doShow();
});
},
//
@ -311,7 +311,7 @@ export default {
});
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
this.$refs.noticeInfo.doShow();
});
},
checkRoutes(routes) {
@ -377,7 +377,7 @@ export default {
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.lock.menu.operation, name: '终端信号机封锁', cmdType:CMD.Signal.CMD_SIGNAL_BLOCK}});
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
this.$refs.noticeInfo.doShow();
});
},
//

View File

@ -142,12 +142,12 @@ export default {
// if (valid) {
// this.doClose();
// } else {
// // this.$refs.noticeInfo.doShow(operate);
// // this.$refs.noticeInfo.doShow();
// }
// }).catch(error => {
// this.loading = false;
// this.doClose();
// // this.$refs.noticeInfo.doShow(operate);
// // this.$refs.noticeInfo.doShow();
// });
// } else {
// return false;

View File

@ -217,7 +217,7 @@ export default {
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
this.$refs.noticeInfo.doShow();
});
},
triggerFaultManagement() {

View File

@ -240,10 +240,6 @@ export default {
});
},
nextStation() {
// commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Ahead',
@ -252,14 +248,11 @@ export default {
};
commitTrainSend(group, param).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
routeBlockRun() {
// commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
const param = {
commandType: 'Route_Block_Drive',
@ -268,7 +261,8 @@ export default {
};
commitTrainSend(group, param).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleOverFuideSignal() {
@ -280,7 +274,8 @@ export default {
};
commitTrainSend(group, param).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleOverEedLight() {
@ -292,7 +287,8 @@ export default {
};
commitTrainSend(group, param).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
@ -308,10 +304,10 @@ export default {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
//
@ -327,7 +323,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(operate, this.selected);
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
}
});
},
@ -344,7 +340,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(operate, this.selected);
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
}
});
},
@ -361,7 +357,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(operate, this.selected);
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
}
});
},
@ -378,7 +374,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDetailInfo.doShow(operate, this.selected);
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
}
});
},

View File

@ -117,7 +117,8 @@ export default {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -149,7 +149,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -183,7 +183,7 @@ export default {
}
}).catch(() => {
this.loading = false;
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow();
});
}
}

View File

@ -180,7 +180,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -232,12 +232,12 @@ export default {
this.doClose();
} else {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
}
},

View File

@ -238,7 +238,8 @@ export default {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
@ -250,7 +251,8 @@ export default {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -271,7 +271,8 @@ export default {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
}
},
@ -285,7 +286,8 @@ export default {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -567,7 +567,8 @@ export default {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -257,7 +257,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
} else {
return false;
@ -281,7 +281,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
} else {
return false;
@ -305,7 +305,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
} else {
return false;

View File

@ -117,7 +117,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -148,7 +148,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;

View File

@ -131,7 +131,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
} else {
return false;

View File

@ -143,7 +143,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;

View File

@ -171,7 +171,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;

View File

@ -160,7 +160,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;

View File

@ -179,7 +179,8 @@ export default {
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
console.error(error);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;

View File

@ -1,6 +1,5 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" />
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-button ref="menuButton" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
@ -17,7 +16,6 @@
<script>
import { mapGetters } from 'vuex';
import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal';
import MenuButton from './menuButton';
import MenuStationStand from './menuStationStand';

View File

@ -238,7 +238,8 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
resetPosition() {
@ -356,11 +357,12 @@ export default {
});
if (!flag) {
this.deviceList = [];
this.$refs.noticeInfo.doShow(operate, '未找到选择进路!');
this.$refs.noticeInfo.doShow('未找到选择进路!');
}
}
},
handelFunctionButton(model, subType) {
debugger;
const operate = {
over: true,
operation: this.$store.state.menuOperation.buttonOperation,
@ -391,14 +393,15 @@ export default {
operate.param = {stationCodes: [model.code]};
break;
case 'emergency':
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL;
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
operate.param = {stationCodes: [model.code]};
break;
}
}
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch((error) => {
this.deviceList = [];
this.$refs.noticeInfo.doShow(operate, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handelTotalCancel(model, subType) {
@ -435,7 +438,8 @@ export default {
}
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch((error) => {
this.deviceList = [];
this.$refs.noticeInfo.doShow(operate, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleGuideRoute(deviceList) {
@ -458,7 +462,8 @@ export default {
this.$refs.password.doShow(operate);
}
}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
} else {
const operate = {
@ -476,7 +481,8 @@ export default {
this.$refs.password.doShow(operate);
}
}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
}
} else if (deviceList.length === 2) {
@ -494,13 +500,14 @@ export default {
this.deviceList = [];
flag = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
this.$refs.noticeInfo.doShow();
console.error(error);
});
}
});
if (!flag) {
this.deviceList = [];
this.$refs.noticeInfo.doShow(operate, '未找到选择进路!');
this.$refs.noticeInfo.doShow('未找到选择进路!');
}
}
},
@ -519,7 +526,8 @@ export default {
operate.param = {signalCode: model.code};
this.deviceList = [];
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
}
},
@ -540,7 +548,8 @@ export default {
operate.param = {signalCode: model.code, routeCodeList: routeCodeList};
this.deviceList = [];
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handelSwitchOperate(model) {
@ -552,7 +561,8 @@ export default {
param: { switchCode: model.code}
};
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handelBlockOrUnblock(model) {
@ -578,7 +588,8 @@ export default {
operate.param = {signalCode: model.code};
}
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handelGuideLock(model) {
@ -595,7 +606,8 @@ export default {
operate.cmdType = CMD.Station.CMD_STATION_SET_MASTER_GUIDE_LOCK;
}
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handelFaultSection(model) {
@ -607,7 +619,8 @@ export default {
param: {sectionCode: model.code}
};
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
selectedChange() {

View File

@ -1,94 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import { exitFullscreen } from '@/utils/screen';
import { runDiagramQuit } from '@/api/simulation';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'CancelMenu',
components: {
PopMenu
},
data() {
return {
menu: [],
menuScreen: [
{
label: '放大地图',
handler: this.magnifyMap,
disabled: false
},
{
label: '缩小地图',
handler: this.shrinkMap,
disabled: false
},
{
label: '返回',
handler: this.back,
disabled: false
}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
group() {
return this.$route.query.group;
}
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
doShow(point) {
this.clickEvent();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
magnifyMap() {
this.$store.dispatch('menuOperation/handleMagnifyCount');
},
//
shrinkMap() {
this.$store.dispatch('menuOperation/handleShrinkCount');
},
//
async back() {
await runDiagramQuit(this.group);
EventBus.$emit('trainingSubscribeStop');
history.go(-1);
exitFullscreen();
}
}
};
</script>

View File

@ -129,7 +129,7 @@ export default {
}
}, 1000).catch(() => {
this.loading = true;
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
}
}

View File

@ -1,6 +1,15 @@
<template>
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
@ -37,8 +46,8 @@
},
operation: null,
dialogShow: false,
loading: false,
}
loading: false
};
},
computed: {
...mapGetters('map', [
@ -54,13 +63,13 @@
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
},
title() {
return '设置限速'
return '设置限速';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -84,35 +93,34 @@
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
const operate = {
send: true,
operation: OperationEvent.Command.planTrain.addPlanTrain.operation,
}
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
console.error(error);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
let operate = {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -121,7 +129,7 @@
}).catch(error => { this.doClose(); });
}
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {

View File

@ -163,7 +163,7 @@ export default {
});
});
} else {
this.$refs.noticeInfo.doShow(operate, ['密码输入错误!']);
this.$refs.noticeInfo.doShow('密码输入错误!');
}
},
click(key) {

View File

@ -232,13 +232,12 @@ export default {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
console.error(error);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;

View File

@ -1,25 +1,37 @@
<template>
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
<span class="base-label">添加位置</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandCode">
<span slot="label">&emsp;&emsp;&emsp;:</span>
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
:value="item.code">
</el-option>
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="前车车次号:" prop="trainNumberLimber">
<el-input v-model="addModel.trainNumberLimber"></el-input>
<el-input v-model="addModel.trainNumberLimber" />
</el-form-item>
</div>
</div>
<el-form-item label="添加车次号:" label-width="115px" prop="groupNumber">
<el-input v-model="addModel.groupNumber"></el-input>
<el-input v-model="addModel.groupNumber" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
@ -47,7 +59,7 @@
addModel: {
groupNumber: '',
stationStandCode: '',
trainNumberLimber: '',
trainNumberLimber: ''
},
rules: {
@ -59,12 +71,12 @@
// ],
stationStandCode: [
{ required: true, message: '请选择终端', trigger: 'change' }
],
]
},
operation: null,
dialogShow: false,
loading: false,
}
loading: false
};
},
computed: {
...mapGetters('map', [
@ -80,13 +92,13 @@
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
},
title() {
return '添加计划车'
return '添加计划车';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -111,35 +123,34 @@
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
const operate = {
send: true,
operation: OperationEvent.Command.planTrain.addPlanTrain.operation,
}
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
console.error(error);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
let operate = {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -148,7 +159,7 @@
}).catch(error => { this.doClose(); });
}
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {

View File

@ -1,16 +1,24 @@
<template>
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
<el-form-item prop="stationStandCode">
<span slot="label">&emsp;&emsp;:</span>
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code">
</el-option>
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code" />
</el-select>
</el-form-item>
<el-form-item label="车 次 号:" prop="groupNumber">
<el-input v-model="addModel.groupNumber"></el-input>
<el-input v-model="addModel.groupNumber" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
@ -37,7 +45,7 @@
trainNoList: [],
addModel: {
groupNumber: '',
stationStandCode: '',
stationStandCode: ''
},
rules: {
@ -46,12 +54,12 @@
],
stationStandCode: [
{ required: true, message: '请选择终端', trigger: 'change' }
],
]
},
operation: null,
dialogShow: false,
loading: false,
}
loading: false
};
},
computed: {
...mapGetters('map', [
@ -67,13 +75,13 @@
return this.dialogShow ? OperationEvent.Command.planTrain.delPlanTrain.domId : '';
},
title() {
return '删除计划车'
return '删除计划车';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -98,35 +106,34 @@
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
const operate = {
send: true,
operation: OperationEvent.Command.planTrain.delPlanTrain.operation,
}
operation: OperationEvent.Command.planTrain.delPlanTrain.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
console.error(error);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
let operate = {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -135,7 +142,7 @@
}).catch(error => { this.doClose(); });
}
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {

View File

@ -1,9 +1,18 @@
<template>
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
<el-form-item label="车 次 号:" label-width="115px" prop="groupNumber">
<el-input v-model="addModel.groupNumber"></el-input>
<el-input v-model="addModel.groupNumber" />
</el-form-item>
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
<span class="base-label">目的</span>
@ -11,13 +20,16 @@
<el-form-item prop="stationStandCode">
<span slot="label">&emsp;&emsp;:</span>
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
:value="item.code">
</el-option>
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="车 次 号:" prop="trainNumberLimber">
<el-input v-model="addModel.trainNumberLimber"></el-input>
<el-input v-model="addModel.trainNumberLimber" />
</el-form-item>
</div>
</div>
@ -47,7 +59,7 @@
addModel: {
groupNumber: '',
stationStandCode: '',
trainNumberLimber: '',
trainNumberLimber: ''
},
rules: {
@ -59,12 +71,12 @@
],
stationStandCode: [
{ required: true, message: '请选择终端', trigger: 'change' }
],
]
},
operation: null,
dialogShow: false,
loading: false,
}
loading: false
};
},
computed: {
...mapGetters('map', [
@ -80,13 +92,13 @@
return this.dialogShow ? OperationEvent.Command.planTrain.translatPlanTrain.domId : '';
},
title() {
return '平移计划车'
return '平移计划车';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -111,35 +123,34 @@
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
const operate = {
send: true,
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation,
}
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
console.error(error);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
let operate = {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -148,5 +159,5 @@
}).catch(error => { this.doClose(); });
}
}
}
};
</script>

View File

@ -173,10 +173,10 @@ export default {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
this.$refs.noticeInfo.doShow();
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
this.$refs.noticeInfo.doShow();
});
},
//

View File

@ -219,10 +219,6 @@ export default {
});
},
nextStation() {
// commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Ahead',
@ -231,14 +227,11 @@ export default {
};
commitTrainSend(group, param).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
routeBlockRun() {
// commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
const param = {
commandType: 'Route_Block_Drive',
@ -247,7 +240,8 @@ export default {
};
commitTrainSend(group, param).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleOverFuideSignal() {
@ -259,7 +253,8 @@ export default {
};
commitTrainSend(group, param).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleOverEedLight() {
@ -271,7 +266,8 @@ export default {
};
commitTrainSend(group, param).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
@ -287,10 +283,10 @@ export default {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
//
@ -306,7 +302,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(operate, this.selected);
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
}
});
},
@ -323,7 +319,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(operate, this.selected);
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
}
});
},
@ -340,7 +336,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(operate, this.selected);
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
}
});
},
@ -357,7 +353,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDetailInfo.doShow(operate, this.selected);
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
}
});
},

Some files were not shown because too many files have changed in this diff Show More